diff --git a/.travis.yml b/.travis.yml index 9306173d18..976ecac1ac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,10 +52,6 @@ jobs: # define a separate script for each "examples/*" folder # this will run it in a separate job on TravisCI # all these jobs belong to same stage "test" thus will run in parallel - - stage: test - env: - - CYPRESS_framework=ampersand - <<: *defaults - stage: test env: - CYPRESS_framework=angular-dart @@ -68,14 +64,6 @@ jobs: env: - CYPRESS_framework=angularjs <<: *defaults - - stage: test - env: - - CYPRESS_framework=ariatemplates - <<: *defaults - - stage: test - env: - - CYPRESS_framework=atmajs - <<: *defaults - stage: test env: - CYPRESS_framework=aurelia @@ -104,10 +92,6 @@ jobs: env: - CYPRESS_framework=canjs_require <<: *defaults - - stage: test - env: - - CYPRESS_framework=chaplin-brunch - <<: *defaults - stage: test env: - CYPRESS_framework=closure @@ -144,18 +128,6 @@ jobs: env: - CYPRESS_framework=extjs_deftjs <<: *defaults - - stage: test - env: - - CYPRESS_framework=flight - <<: *defaults - - stage: test - env: - - CYPRESS_framework=foam - <<: *defaults - - stage: test - env: - - CYPRESS_framework=humble - <<: *defaults - stage: test env: - CYPRESS_framework=jquery @@ -188,34 +160,18 @@ jobs: env: - CYPRESS_framework=lavaca_require <<: *defaults - - stage: test - env: - - CYPRESS_framework=meteor - <<: *defaults - stage: test env: - CYPRESS_framework=mithril <<: *defaults - - stage: test - env: - - CYPRESS_framework=olives - <<: *defaults - stage: test env: - CYPRESS_framework=polymer <<: *defaults - - stage: test - env: - - CYPRESS_framework=puremvc - <<: *defaults - stage: test env: - CYPRESS_framework=ractive <<: *defaults - - stage: test - env: - - CYPRESS_framework=rappidjs - <<: *defaults - stage: test env: - CYPRESS_framework=react @@ -248,30 +204,14 @@ jobs: env: - CYPRESS_framework=scalajs-react <<: *defaults - - stage: test - env: - - CYPRESS_framework=serenadejs - <<: *defaults - stage: test env: - CYPRESS_framework=socketstream <<: *defaults - - stage: test - env: - - CYPRESS_framework=somajs - <<: *defaults - - stage: test - env: - - CYPRESS_framework=somajs_require - <<: *defaults - stage: test env: - CYPRESS_framework=spine <<: *defaults - - stage: test - env: - - CYPRESS_framework=troopjs_require - <<: *defaults - stage: test env: - CYPRESS_framework=typescript-angular @@ -300,8 +240,3 @@ jobs: env: - CYPRESS_framework=vue <<: *defaults - - stage: test - env: - - CYPRESS_framework=webrx - <<: *defaults - diff --git a/contributing.md b/contributing.md index aab9b0b444..d52966f6a6 100644 --- a/contributing.md +++ b/contributing.md @@ -49,7 +49,7 @@ If the app breaks for a decent amount of time, we will (temporarily) remove it f ## Browser Compatibility -Modern browser (latest: Chrome, Firefox, Opera, Safari, IE9) +Modern browser (latest: Chrome, Firefox, Opera, Safari, IE11) ## Unit Tests diff --git a/examples/ampersand/.gitignore b/examples/ampersand/.gitignore deleted file mode 100644 index f24e65db1c..0000000000 --- a/examples/ampersand/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -node_modules/.bin -node_modules/browserify -node_modules/watchify -node_modules/jadeify -node_modules/jade -node_modules/debounce -node_modules/ampersand-* - -node_modules/todomvc-app-css -!node_modules/todomvc-app-css/index.css -node_modules/todomvc-common -!node_modules/todomvc-common/base.css -!node_modules/todomvc-common/base.js diff --git a/examples/ampersand/index.html b/examples/ampersand/index.html deleted file mode 100644 index 558cfd62cd..0000000000 --- a/examples/ampersand/index.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - Ampersand.js • TodoMVC - - - - -
-
-

todos

- -
-
- - - -
- -
- - - - - diff --git a/examples/ampersand/js/app.js b/examples/ampersand/js/app.js deleted file mode 100644 index a2a67e21a1..0000000000 --- a/examples/ampersand/js/app.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -var MainView = require('./views/main'); -var Me = require('./models/me'); -var Router = require('./router'); - - -window.app = { - init: function () { - // Model representing state for - // user using the app. Calling it - // 'me' is a bit of convention but - // it's basically 'app state'. - this.me = new Me(); - // Our main view - this.view = new MainView({ - el: document.body, - model: this.me - }); - // Create and fire up the router - this.router = new Router(); - this.router.history.start(); - } -}; - -window.app.init(); diff --git a/examples/ampersand/js/models/me.js b/examples/ampersand/js/models/me.js deleted file mode 100644 index cdc270d889..0000000000 --- a/examples/ampersand/js/models/me.js +++ /dev/null @@ -1,89 +0,0 @@ -// typically we us a 'me' model to represent state for the -// user of the app. So in an app where you have a logged in -// user this is where we'd store username, etc. -// We also use it to store session properties, which is the -// non-persisted state that we use to track application -// state for this user in this session. -'use strict'; - -var State = require('ampersand-state'); -var Todos = require('./todos'); - - -module.exports = State.extend({ - initialize: function () { - // Listen to changes to the todos collection that will - // affect lengths we want to calculate. - this.listenTo(this.todos, 'change:completed add remove', this.handleTodosUpdate); - // We also want to calculate these values once on init - this.handleTodosUpdate(); - // Listen for changes to `mode` so we can update - // the collection mode. - this.listenTo(this, 'change:mode', this.handleModeChange); - }, - collections: { - todos: Todos - }, - // We used only session properties here because there's - // no API or persistance layer for these in this app. - session: { - activeCount: { - type: 'number', - default: 0 - }, - completedCount: { - type: 'number', - default: 0 - }, - totalCount:{ - type: 'number', - default: 0 - }, - allCompleted: { - type: 'boolean', - default: false - }, - mode: { - type: 'string', - values: [ - 'all', - 'completed', - 'active' - ], - default: 'all' - } - }, - derived: { - // We produce this as an HTML snippet here - // for convenience since it also has to be - // pluralized it was easier this way. - itemsLeftHtml: { - deps: ['activeCount'], - fn: function () { - var plural = (this.activeCount === 1) ? '' : 's'; - return '' + this.activeCount + ' item' + plural + ' left'; - } - } - }, - // Calculate and set various lengths we're - // tracking. We set them as session properties - // so they're easy to listen to and bind to DOM - // where needed. - handleTodosUpdate: function () { - var total = this.todos.length; - // use a method we defined on the collection itself - // to count how many todos are completed - var completed = this.todos.getCompletedCount(); - // We use `set` here in order to update multiple attributes at once - // It's possible to set directely using `this.completedCount = completed` ... - this.set({ - completedCount: completed, - activeCount: total - completed, - totalCount: total, - allCompleted: total === completed - }); - }, - handleModeChange: function () { - this.todos.setMode(this.mode); - } -}); diff --git a/examples/ampersand/js/models/todo.js b/examples/ampersand/js/models/todo.js deleted file mode 100644 index ed8f7187b9..0000000000 --- a/examples/ampersand/js/models/todo.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -// We're using 'ampersand-state' here instead of 'ampersand-model' -// because we don't need any of the RESTful -// methods for this app. -var State = require('ampersand-state'); - - -module.exports = State.extend({ - // Properties this model will store - props: { - title: { - type: 'string', - default: '' - }, - completed: { - type: 'boolean', - default: false - } - }, - // session properties work the same way as `props` - // but will not be included when serializing. - session: { - editing: { - type: 'boolean', - default: false - } - }, - destroy: function () { - if (this.collection) { - this.collection.remove(this); - } - } -}); diff --git a/examples/ampersand/js/models/todos.js b/examples/ampersand/js/models/todos.js deleted file mode 100644 index 3edeb18041..0000000000 --- a/examples/ampersand/js/models/todos.js +++ /dev/null @@ -1,82 +0,0 @@ -'use strict' - -var Collection = require('ampersand-collection') -var SubCollection = require('ampersand-subcollection') -var debounce = require('debounce') -var Todo = require('./todo') -var STORAGE_KEY = 'todos-ampersand' - -module.exports = Collection.extend({ - model: Todo, - initialize: function () { - // Attempt to read from localStorage - this.readFromLocalStorage() - - // This is what we'll actually render - // it's a subcollection of the whole todo collection - // that we'll add/remove filters to accordingly. - this.subset = new SubCollection(this) - - // We put a slight debounce on this since it could possibly - // be called in rapid succession. - this.writeToLocalStorage = debounce(this.writeToLocalStorage, 100) - - // Listen for storage events on the window to keep multiple - // tabs in sync - window.addEventListener('storage', this.handleStorageEvent.bind(this)) - - // We listen for changes to the collection - // and persist on change - this.on('all', this.writeToLocalStorage, this) - }, - getCompletedCount: function () { - return this.reduce(function (total, todo) { - return todo.completed ? ++total : total - }, 0) - }, - // Helper for removing all completed items - clearCompleted: function () { - var toRemove = this.filter(function (todo) { - return todo.completed - }) - this.remove(toRemove) - }, - // Updates the collection to the appropriate mode. - // mode can 'all', 'completed', or 'active' - setMode: function (mode) { - if (mode === 'all') { - this.subset.clearFilters() - } else { - this.subset.configure( - { - where: { - completed: mode === 'completed' - } - }, - true - ) - } - }, - // The following two methods are all we need in order - // to add persistance to localStorage - writeToLocalStorage: function () { - const s = JSON.stringify(this) - console.log('writing to local storage', s) - localStorage.setItem(STORAGE_KEY, s) - }, - readFromLocalStorage: function () { - var existingData = localStorage.getItem(STORAGE_KEY) - if (existingData) { - console.log('read from local storage', existingData) - this.set(JSON.parse(existingData)) - } - }, - // Handles events from localStorage. Browsers will fire - // this event in other tabs on the same domain. - handleStorageEvent: function (e) { - if (e.key === STORAGE_KEY) { - console.log('on storage event') - this.readFromLocalStorage() - } - } -}) diff --git a/examples/ampersand/js/router.js b/examples/ampersand/js/router.js deleted file mode 100644 index 8b942fe31e..0000000000 --- a/examples/ampersand/js/router.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; -/*global app */ - -var Router = require('ampersand-router'); - - -module.exports = Router.extend({ - routes: { - '*filter': 'setFilter' - }, - setFilter: function (arg) { - app.me.mode = arg || 'all'; - } -}); diff --git a/examples/ampersand/js/templates/todo.jade b/examples/ampersand/js/templates/todo.jade deleted file mode 100644 index 21ec9a1426..0000000000 --- a/examples/ampersand/js/templates/todo.jade +++ /dev/null @@ -1,16 +0,0 @@ -//- - Note that the use of data-hook is optional. We use is as a - non-css related way to grab items to give desigers ability - the easily edit templates without fear of breaking the app. - - This is also one of the big reasons we break templates out - into their own separate files. It makes it easy to find/edit - by a designer without having to dig into the JS too much. - - more info: http://ampersandjs.com/learn/data-hook-attribute -li - .view - input.toggle(type="checkbox", data-hook="checkbox") - label(data-hook="title") - button.destroy(data-hook="action-delete") - input.edit(data-hook="input") diff --git a/examples/ampersand/js/views/main.js b/examples/ampersand/js/views/main.js deleted file mode 100644 index dc020cb006..0000000000 --- a/examples/ampersand/js/views/main.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; -/*global app */ - -var View = require('ampersand-view'); -var TodoView = require('./todo'); -var ENTER_KEY = 13; - - -module.exports = View.extend({ - events: { - 'keypress [data-hook~=todo-input]': 'handleMainInput', - 'click [data-hook~=mark-all]': 'handleMarkAllClick', - 'click [data-hook~=clear-completed]': 'handleClearClick' - }, - // Declaratively bind all our data to the template. - // This means only changed data in the DOM is updated - // with this approach we *only* ever touch the DOM with - // appropriate dom methods. Not just `innerHTML` which - // makes it about as fast as possible. - // These get re-applied if the view's element is replaced - // or if the model isn't there yet, etc. - // Binding type reference: - // http://ampersandjs.com/docs#ampersand-dom-bindings-binding-types - bindings: { - // Show hide main and footer - // based on truthiness of totalCount - 'model.totalCount': { - type: 'toggle', - selector: '#main, #footer' - }, - 'model.completedCount': [ - // Hides when there are none - { - type: 'toggle', - hook: 'clear-completed' - }, - // Inserts completed count - { - type: 'text', - hook: 'completed-count' - } - ], - // Inserts HTML from model that also - // does pluralizing. - 'model.itemsLeftHtml': { - type: 'innerHTML', - hook: 'todo-count' - }, - // Add 'selected' to right - // element - 'model.mode': { - type: 'switchClass', - name: 'selected', - cases: { - all: '[data-hook=all-mode]', - active: '[data-hook=active-mode]', - completed: '[data-hook=completed-mode]' - } - }, - // Bind 'checked' state of checkbox - 'model.allCompleted': { - type: 'booleanAttribute', - name: 'checked', - hook: 'mark-all' - } - }, - // cache - initialize: function () { - this.mainInput = this.queryByHook('todo-input'); - this.renderCollection(app.me.todos.subset, TodoView, this.queryByHook('todo-container')); - }, - // handles DOM event from main input - handleMainInput: function (e) { - var val = this.mainInput.value.trim(); - if (e.which === ENTER_KEY && val) { - app.me.todos.add({title: val}); - this.mainInput.value = ''; - } - }, - // Here we set all to state provided. - handleMarkAllClick: function () { - var targetState = !app.me.allCompleted; - app.me.todos.each(function (todo) { - todo.completed = targetState; - }); - }, - // Handler for clear click - handleClearClick: function () { - app.me.todos.clearCompleted(); - } -}); diff --git a/examples/ampersand/js/views/todo.js b/examples/ampersand/js/views/todo.js deleted file mode 100644 index dea3ec05bf..0000000000 --- a/examples/ampersand/js/views/todo.js +++ /dev/null @@ -1,102 +0,0 @@ -'use strict'; - -var View = require('ampersand-view'); -var todoTemplate = require('../templates/todo.jade'); -var ENTER_KEY = 13; -var ESC_KEY = 27; - - -module.exports = View.extend({ - // note that Ampersand is extrememly flexible with templating. - // This template property can be: - // 1. A plain HTML string - // 2. A function that returns an HTML string - // 3. A function that returns a DOM element - // - // Here we're using a jade template. A browserify transform - // called 'jadeify' lets us require a ".jade" file as if - // it were a module and it will compile it to a function - // for us. This function returns HTML as per #2 above. - template: todoTemplate, - // Events work like backbone they're all delegated to - // root element. - events: { - 'change [data-hook=checkbox]': 'handleCheckboxChange', - 'click [data-hook=action-delete]': 'handleDeleteClick', - 'dblclick [data-hook=title]': 'handleDoubleClick', - 'keyup [data-hook=input]': 'handleKeypress', - 'blur [data-hook=input]': 'handleBlur' - }, - // Declarative data bindings - bindings: { - 'model.title': [ - { - type: 'text', - hook: 'title' - }, - { - type: 'value', - hook: 'input' - } - ], - 'model.editing': [ - { - type: 'toggle', - yes: '[data-hook=input]', - no: '[data-hook=view]' - }, - { - type: 'booleanClass' - } - ], - 'model.completed': [ - { - type: 'booleanAttribute', - name: 'checked', - hook: 'checkbox' - }, - { - type: 'booleanClass' - } - ] - }, - render: function () { - // Render this with template provided. - // Note that unlike backbone this includes the root element. - this.renderWithTemplate(); - // cache reference to `input` for speed/convenience - this.input = this.queryByHook('input'); - }, - handleCheckboxChange: function (e) { - this.model.completed = e.target.checked; - }, - handleDeleteClick: function () { - this.model.destroy(); - }, - // Just put us in edit mode and focus - handleDoubleClick: function () { - this.model.editing = true; - this.input.focus(); - }, - handleKeypress: function (e) { - if (e.which === ENTER_KEY) { - this.input.blur(); - } else if (e.which === ESC_KEY) { - this.input.value = this.model.title; - this.input.blur(); - } - }, - // Since we always blur even in the other - // scenarios we use this as a 'save' point. - handleBlur: function () { - var val = this.input.value.trim(); - if (val) { - this.model.set({ - title: val, - editing: false - }); - } else { - this.model.destroy(); - } - } -}); diff --git a/examples/ampersand/node_modules/todomvc-app-css/index.css b/examples/ampersand/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/ampersand/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/ampersand/node_modules/todomvc-common/base.css b/examples/ampersand/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/ampersand/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/ampersand/node_modules/todomvc-common/base.js b/examples/ampersand/node_modules/todomvc-common/base.js deleted file mode 100644 index a56b5aaca9..0000000000 --- a/examples/ampersand/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,249 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-31081062-1', 'auto'); - ga('send', 'pageview'); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length; - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/ampersand/package.json b/examples/ampersand/package.json deleted file mode 100644 index aa200c9aa6..0000000000 --- a/examples/ampersand/package.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "private": true, - "dependencies": { - "ampersand-collection": "^1.3.16", - "ampersand-router": "^1.0.5", - "ampersand-state": "^4.3.12", - "ampersand-subcollection": "^1.4.5", - "ampersand-view": "^7.1.4", - "debounce": "^1.0.0", - "todomvc-app-css": "^2.1.0", - "todomvc-common": "^1.0.1" - }, - "devDependencies": { - "browserify": "5.10.1", - "jade": "^1.7.0", - "jadeify": "^2.7.0", - "watchify": "^2.0.0" - }, - "scripts": { - "build": "browserify js/app.js -t jadeify -o todomvc.bundle.js", - "start": "watchify js/app.js -t jadeify -o todomvc.bundle.js" - } -} diff --git a/examples/ampersand/readme.md b/examples/ampersand/readme.md deleted file mode 100644 index 91d6ef9cd5..0000000000 --- a/examples/ampersand/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# Ampersand.js TodoMVC Example - -> A highly modular, loosely coupled, non-frameworky framework for building advanced JavaScript apps. - -> _[Ampersand.js - ampersandjs.com](http://ampersandjs.com)_ - - -## Learning Ampersand.js - -The [Ampersand.js website](http://ampersandjs.com) is a great resource for getting started. - -Here are some links you may find helpful: - -* [Guides](http://ampersandjs.com/learn) -* [API Reference](http://ampersandjs.com/docs) -* [Curated Front-end Modules](http://tools.ampersandjs.com) - -Articles and guides from the community: - -* [Introducing Ampersand Blogpost](http://blog.andyet.com/2014/06/25/introducing-ampersand-js/) - -Get help from other Ampersand.js users: - -* #&yet IRC Channel on Freenode ([logs here](https://botbot.me/freenode/andyet/)) -* [@ampersandjs](http://twitter.com/ampersandjs) -* [&yet – The team behind Ampersand.js](http://andyet.com) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ - - -## Implementation - -The app spec says to use bower for dependency management unless it goes against the best practices of the framework. Ampersand.js is very specifically uses npm for dependency management so that's what we're using here. - - -## Credit - -This TodoMVC application was created by [@HenrikJoreteg](http://twitter.com/henrikjoreteg), [@LukeKarrys](http://twitter.com/lukekarrys), and [@philip_roberts](https://twitter.com/philip_roberts). diff --git a/examples/ampersand/todomvc.bundle.js b/examples/ampersand/todomvc.bundle.js deleted file mode 100644 index ee8be54477..0000000000 --- a/examples/ampersand/todomvc.bundle.js +++ /dev/null @@ -1,15185 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o' + this.activeCount + ' item' + plural + ' left'; - } - } - }, - // Calculate and set various lengths we're - // tracking. We set them as session properties - // so they're easy to listen to and bind to DOM - // where needed. - handleTodosUpdate: function () { - var total = this.todos.length; - // use a method we defined on the collection itself - // to count how many todos are completed - var completed = this.todos.getCompletedCount(); - // We use `set` here in order to update multiple attributes at once - // It's possible to set directely using `this.completedCount = completed` ... - this.set({ - completedCount: completed, - activeCount: total - completed, - totalCount: total, - allCompleted: total === completed - }); - }, - handleModeChange: function () { - this.todos.setMode(this.mode); - } -}); - -},{"./todos":4,"ampersand-state":24}],3:[function(require,module,exports){ -'use strict'; - -// We're using 'ampersand-state' here instead of 'ampersand-model' -// because we don't need any of the RESTful -// methods for this app. -var State = require('ampersand-state'); - - -module.exports = State.extend({ - // Properties this model will store - props: { - title: { - type: 'string', - default: '' - }, - completed: { - type: 'boolean', - default: false - } - }, - // session properties work the same way as `props` - // but will not be included when serializing. - session: { - editing: { - type: 'boolean', - default: false - } - }, - destroy: function () { - if (this.collection) { - this.collection.remove(this); - } - } -}); - -},{"ampersand-state":24}],4:[function(require,module,exports){ -'use strict' - -var Collection = require('ampersand-collection') -var SubCollection = require('ampersand-subcollection') -var debounce = require('debounce') -var Todo = require('./todo') -var STORAGE_KEY = 'todos-ampersand' - -module.exports = Collection.extend({ - model: Todo, - initialize: function () { - // Attempt to read from localStorage - this.readFromLocalStorage() - - // This is what we'll actually render - // it's a subcollection of the whole todo collection - // that we'll add/remove filters to accordingly. - this.subset = new SubCollection(this) - - // We put a slight debounce on this since it could possibly - // be called in rapid succession. - this.writeToLocalStorage = debounce(this.writeToLocalStorage, 100) - - // Listen for storage events on the window to keep multiple - // tabs in sync - window.addEventListener('storage', this.handleStorageEvent.bind(this)) - - // We listen for changes to the collection - // and persist on change - this.on('all', this.writeToLocalStorage, this) - }, - getCompletedCount: function () { - return this.reduce(function (total, todo) { - return todo.completed ? ++total : total - }, 0) - }, - // Helper for removing all completed items - clearCompleted: function () { - var toRemove = this.filter(function (todo) { - return todo.completed - }) - this.remove(toRemove) - }, - // Updates the collection to the appropriate mode. - // mode can 'all', 'completed', or 'active' - setMode: function (mode) { - if (mode === 'all') { - this.subset.clearFilters() - } else { - this.subset.configure( - { - where: { - completed: mode === 'completed' - } - }, - true - ) - } - }, - // The following two methods are all we need in order - // to add persistance to localStorage - writeToLocalStorage: function () { - const s = JSON.stringify(this) - console.log('writing to local storage', s) - localStorage.setItem(STORAGE_KEY, s) - }, - readFromLocalStorage: function () { - var existingData = localStorage.getItem(STORAGE_KEY) - if (existingData) { - console.log('read from local storage', existingData) - this.set(JSON.parse(existingData)) - } - }, - // Handles events from localStorage. Browsers will fire - // this event in other tabs on the same domain. - handleStorageEvent: function (e) { - if (e.key === STORAGE_KEY) { - console.log('on storage event') - this.readFromLocalStorage() - } - } -}) - -},{"./todo":3,"ampersand-collection":18,"ampersand-subcollection":25,"debounce":34}],5:[function(require,module,exports){ -'use strict'; -/*global app */ - -var Router = require('ampersand-router'); - - -module.exports = Router.extend({ - routes: { - '*filter': 'setFilter' - }, - setFilter: function (arg) { - app.me.mode = arg || 'all'; - } -}); - -},{"ampersand-router":23}],6:[function(require,module,exports){ -var jade = require("jade/runtime"); - -module.exports = function template(locals) { -var buf = []; -var jade_mixins = {}; -var jade_interp; - -buf.push("
  • ");;return buf.join(""); -}; -},{"jade/runtime":39}],7:[function(require,module,exports){ -'use strict'; -/*global app */ - -var View = require('ampersand-view'); -var TodoView = require('./todo'); -var ENTER_KEY = 13; - - -module.exports = View.extend({ - events: { - 'keypress [data-hook~=todo-input]': 'handleMainInput', - 'click [data-hook~=mark-all]': 'handleMarkAllClick', - 'click [data-hook~=clear-completed]': 'handleClearClick' - }, - // Declaratively bind all our data to the template. - // This means only changed data in the DOM is updated - // with this approach we *only* ever touch the DOM with - // appropriate dom methods. Not just `innerHTML` which - // makes it about as fast as possible. - // These get re-applied if the view's element is replaced - // or if the model isn't there yet, etc. - // Binding type reference: - // http://ampersandjs.com/docs#ampersand-dom-bindings-binding-types - bindings: { - // Show hide main and footer - // based on truthiness of totalCount - 'model.totalCount': { - type: 'toggle', - selector: '#main, #footer' - }, - 'model.completedCount': [ - // Hides when there are none - { - type: 'toggle', - hook: 'clear-completed' - }, - // Inserts completed count - { - type: 'text', - hook: 'completed-count' - } - ], - // Inserts HTML from model that also - // does pluralizing. - 'model.itemsLeftHtml': { - type: 'innerHTML', - hook: 'todo-count' - }, - // Add 'selected' to right - // element - 'model.mode': { - type: 'switchClass', - name: 'selected', - cases: { - all: '[data-hook=all-mode]', - active: '[data-hook=active-mode]', - completed: '[data-hook=completed-mode]' - } - }, - // Bind 'checked' state of checkbox - 'model.allCompleted': { - type: 'booleanAttribute', - name: 'checked', - hook: 'mark-all' - } - }, - // cache - initialize: function () { - this.mainInput = this.queryByHook('todo-input'); - this.renderCollection(app.me.todos.subset, TodoView, this.queryByHook('todo-container')); - }, - // handles DOM event from main input - handleMainInput: function (e) { - var val = this.mainInput.value.trim(); - if (e.which === ENTER_KEY && val) { - app.me.todos.add({title: val}); - this.mainInput.value = ''; - } - }, - // Here we set all to state provided. - handleMarkAllClick: function () { - var targetState = !app.me.allCompleted; - app.me.todos.each(function (todo) { - todo.completed = targetState; - }); - }, - // Handler for clear click - handleClearClick: function () { - app.me.todos.clearCompleted(); - } -}); - -},{"./todo":8,"ampersand-view":26}],8:[function(require,module,exports){ -'use strict'; - -var View = require('ampersand-view'); -var todoTemplate = require('../templates/todo.jade'); -var ENTER_KEY = 13; -var ESC_KEY = 27; - - -module.exports = View.extend({ - // note that Ampersand is extrememly flexible with templating. - // This template property can be: - // 1. A plain HTML string - // 2. A function that returns an HTML string - // 3. A function that returns a DOM element - // - // Here we're using a jade template. A browserify transform - // called 'jadeify' lets us require a ".jade" file as if - // it were a module and it will compile it to a function - // for us. This function returns HTML as per #2 above. - template: todoTemplate, - // Events work like backbone they're all delegated to - // root element. - events: { - 'change [data-hook=checkbox]': 'handleCheckboxChange', - 'click [data-hook=action-delete]': 'handleDeleteClick', - 'dblclick [data-hook=title]': 'handleDoubleClick', - 'keyup [data-hook=input]': 'handleKeypress', - 'blur [data-hook=input]': 'handleBlur' - }, - // Declarative data bindings - bindings: { - 'model.title': [ - { - type: 'text', - hook: 'title' - }, - { - type: 'value', - hook: 'input' - } - ], - 'model.editing': [ - { - type: 'toggle', - yes: '[data-hook=input]', - no: '[data-hook=view]' - }, - { - type: 'booleanClass' - } - ], - 'model.completed': [ - { - type: 'booleanAttribute', - name: 'checked', - hook: 'checkbox' - }, - { - type: 'booleanClass' - } - ] - }, - render: function () { - // Render this with template provided. - // Note that unlike backbone this includes the root element. - this.renderWithTemplate(); - // cache reference to `input` for speed/convenience - this.input = this.queryByHook('input'); - }, - handleCheckboxChange: function (e) { - this.model.completed = e.target.checked; - }, - handleDeleteClick: function () { - this.model.destroy(); - }, - // Just put us in edit mode and focus - handleDoubleClick: function () { - this.model.editing = true; - this.input.focus(); - }, - handleKeypress: function (e) { - if (e.which === ENTER_KEY) { - this.input.blur(); - } else if (e.which === ESC_KEY) { - this.input.value = this.model.title; - this.input.blur(); - } - }, - // Since we always blur even in the other - // scenarios we use this as a 'save' point. - handleBlur: function () { - var val = this.input.value.trim(); - if (val) { - this.model.set({ - title: val, - editing: false - }); - } else { - this.model.destroy(); - } - } -}); - -},{"../templates/todo.jade":6,"ampersand-view":26}],9:[function(require,module,exports){ -var isFunction = require('amp-is-function'); -var isObject = require('amp-is-object'); -var nativeBind = Function.prototype.bind; -var slice = Array.prototype.slice; -var Ctor = function () {}; - - -module.exports = function bind(func, context) { - var args, bound; - if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!isFunction(func)) throw new TypeError('Bind must be called on a function'); - args = slice.call(arguments, 2); - bound = function() { - if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments))); - Ctor.prototype = func.prototype; - var self = new Ctor(); - Ctor.prototype = null; - var result = func.apply(self, args.concat(slice.call(arguments))); - if (isObject(result)) return result; - return self; - }; - return bound; -}; - -},{"amp-is-function":11,"amp-is-object":12}],10:[function(require,module,exports){ -var isObject = require('amp-is-object'); - - -module.exports = function(obj) { - if (!isObject(obj)) return obj; - var source, prop; - for (var i = 1, length = arguments.length; i < length; i++) { - source = arguments[i]; - for (prop in source) { - obj[prop] = source[prop]; - } - } - return obj; -}; - -},{"amp-is-object":12}],11:[function(require,module,exports){ -var toString = Object.prototype.toString; -var func = function isFunction(obj) { - return toString.call(obj) === '[object Function]'; -}; - -// Optimize `isFunction` if appropriate. Work around an IE 11 bug. -if (typeof /./ !== 'function') { - func = function isFunction(obj) { - return typeof obj == 'function' || false; - }; -} - -module.exports = func; - -},{}],12:[function(require,module,exports){ -module.exports = function isObject(obj) { - var type = typeof obj; - return !!obj && (type === 'function' || type === 'object'); -}; - -},{}],13:[function(require,module,exports){ -var toString = Object.prototype.toString; - - -module.exports = function isRegExp(obj) { - return toString.call(obj) === '[object RegExp]'; -}; - -},{}],14:[function(require,module,exports){ -var isFunction = require('amp-is-function'); - - -module.exports = function result(object, property, defaultValue) { - var value = object == null ? void 0 : object[property]; - if (value === void 0) { - return isFunction(defaultValue) ? defaultValue() : defaultValue; - } - return isFunction(value) ? object[property]() : value; -}; - -},{"amp-is-function":11}],15:[function(require,module,exports){ -var assign = require('lodash.assign'); - -/// Following code is largely pasted from Backbone.js - -// Helper function to correctly set up the prototype chain, for subclasses. -// Similar to `goog.inherits`, but uses a hash of prototype properties and -// class properties to be extended. -var extend = function(protoProps) { - var parent = this; - var child; - var args = [].slice.call(arguments); - - // The constructor function for the new subclass is either defined by you - // (the "constructor" property in your `extend` definition), or defaulted - // by us to simply call the parent's constructor. - if (protoProps && protoProps.hasOwnProperty('constructor')) { - child = protoProps.constructor; - } else { - child = function () { - return parent.apply(this, arguments); - }; - } - - // Add static properties to the constructor function from parent - assign(child, parent); - - // Set the prototype chain to inherit from `parent`, without calling - // `parent`'s constructor function. - var Surrogate = function(){ this.constructor = child; }; - Surrogate.prototype = parent.prototype; - child.prototype = new Surrogate(); - - // Mix in all prototype properties to the subclass if supplied. - if (protoProps) { - args.unshift(child.prototype); - assign.apply(null, args); - } - - // Set a convenience property in case the parent's prototype is needed - // later. - child.__super__ = parent.prototype; - - return child; -}; - -// Expose the extend function -module.exports = extend; - -},{"lodash.assign":71}],16:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-collection-underscore-mixin"] = window.ampersand["ampersand-collection-underscore-mixin"] || []; window.ampersand["ampersand-collection-underscore-mixin"].push("1.0.4");} -var _ = require('underscore'); -var slice = [].slice; -var mixins = {}; - - -// Underscore methods that we want to implement on the Collection. -var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl', - 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select', - 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', - 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest', - 'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle', - 'lastIndexOf', 'isEmpty', 'chain', 'sample', 'partition' -]; - -// Mix in each Underscore method as a proxy to `Collection#models`. -_.each(methods, function (method) { - if (!_[method]) return; - mixins[method] = function () { - var args = slice.call(arguments); - args.unshift(this.models); - return _[method].apply(_, args); - }; -}); - -// Underscore methods that take a property name as an argument. -var attributeMethods = ['groupBy', 'countBy', 'sortBy', 'indexBy']; - -// Use attributes instead of properties. -_.each(attributeMethods, function (method) { - if (!_[method]) return; - mixins[method] = function (value, context) { - var iterator = _.isFunction(value) ? value : function (model) { - return model.get ? model.get(value) : model[value]; - }; - return _[method](this.models, iterator, context); - }; -}); - -// Return models with matching attributes. Useful for simple cases of -// `filter`. -mixins.where = function (attrs, first) { - if (_.isEmpty(attrs)) return first ? void 0 : []; - return this[first ? 'find' : 'filter'](function (model) { - var value; - for (var key in attrs) { - value = model.get ? model.get(key) : model[key]; - if (attrs[key] !== value) return false; - } - return true; - }); -}; - -// Return the first model with matching attributes. Useful for simple cases -// of `find`. -mixins.findWhere = function (attrs) { - return this.where(attrs, true); -}; - -// Plucks an attribute from each model in the collection. -mixins.pluck = function (attr) { - return _.invoke(this.models, 'get', attr); -}; - -module.exports = mixins; - -},{"underscore":175}],17:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-collection-view"] = window.ampersand["ampersand-collection-view"] || []; window.ampersand["ampersand-collection-view"].push("1.4.0");} -var assign = require('lodash.assign'); -var invoke = require('lodash.invoke'); -var pick = require('lodash.pick'); -var find = require('lodash.find'); -var difference = require('lodash.difference'); -var Events = require('ampersand-events'); -var ampExtend = require('ampersand-class-extend'); - -// options -var options = ['collection', 'el', 'viewOptions', 'view', 'emptyView', 'filter', 'reverse', 'parent']; - - -function CollectionView(spec) { - if (!spec) { - throw new ReferenceError('Collection view missing required parameters: collection, el'); - } - if (!spec.collection) { - throw new ReferenceError('Collection view requires a collection'); - } - if (!spec.el && !this.insertSelf) { - throw new ReferenceError('Collection view requires an el'); - } - assign(this, pick(spec, options)); - this.views = []; - this.listenTo(this.collection, 'add', this._addViewForModel); - this.listenTo(this.collection, 'remove', this._removeViewForModel); - this.listenTo(this.collection, 'sort', this._rerenderAll); - this.listenTo(this.collection, 'refresh reset', this._reset); -} - -assign(CollectionView.prototype, Events, { - // for view contract compliance - render: function () { - this._renderAll(); - return this; - }, - remove: function () { - invoke(this.views, 'remove'); - this.stopListening(); - }, - _getViewByModel: function (model) { - return find(this.views, function (view) { - return model === view.model; - }); - }, - _createViewForModel: function (model, renderOpts) { - var defaultViewOptions = {model: model, collection: this.collection, parent: this}; - var view = new this.view(assign(defaultViewOptions, this.viewOptions)); - this.views.push(view); - view.renderedByParentView = true; - view.render(renderOpts); - return view; - }, - _getOrCreateByModel: function (model, renderOpts) { - return this._getViewByModel(model) || this._createViewForModel(model, renderOpts); - }, - _addViewForModel: function (model, collection, options) { - var matches = this.filter ? this.filter(model) : true; - if (!matches) { - return; - } - if (this.renderedEmptyView) { - this.renderedEmptyView.remove(); - delete this.renderedEmptyView; - } - var view = this._getOrCreateByModel(model, {containerEl: this.el}); - if (options && options.rerender) { - this._insertView(view); - } else { - this._insertViewAtIndex(view); - } - }, - _insertViewAtIndex: function (view) { - if (!view.insertSelf) { - var pos = this.collection.indexOf(view.model); - var modelToInsertBefore, viewToInsertBefore; - - if (this.reverse) { - modelToInsertBefore = this.collection.at(pos - 1); - } else { - modelToInsertBefore = this.collection.at(pos + 1); - } - - viewToInsertBefore = this._getViewByModel(modelToInsertBefore); - - // FIX IE bug (https://developer.mozilla.org/en-US/docs/Web/API/Node.insertBefore) - // "In Internet Explorer an undefined value as referenceElement will throw errors, while in rest of the modern browsers, this works fine." - if(viewToInsertBefore) { - this.el.insertBefore(view.el, viewToInsertBefore && viewToInsertBefore.el); - } else { - this.el.appendChild(view.el); - } - } - }, - _insertView: function (view) { - if (!view.insertSelf) { - if (this.reverse && this.el.firstChild) { - this.el.insertBefore(view.el, this.el.firstChild); - } else { - this.el.appendChild(view.el); - } - } - }, - _removeViewForModel: function (model) { - var view = this._getViewByModel(model); - if (!view) { - return; - } - var index = this.views.indexOf(view); - if (index !== -1) { - // remove it if we found it calling animateRemove - // to give user option of gracefully destroying. - view = this.views.splice(index, 1)[0]; - this._removeView(view); - if (this.views.length === 0) { - this._renderEmptyView(); - } - } - }, - _removeView: function (view) { - if (view.animateRemove) { - view.animateRemove(); - } else { - view.remove(); - } - }, - _renderAll: function () { - this.collection.each(this._addViewForModel, this); - if (this.views.length === 0) { - this._renderEmptyView(); - } - }, - _rerenderAll: function (collection, options) { - options = options || {}; - this.collection.each(function (model) { - this._addViewForModel(model, this, assign(options, {rerender: true})); - }, this); - }, - _renderEmptyView: function() { - if (this.emptyView && !this.renderedEmptyView) { - var view = this.renderedEmptyView = new this.emptyView({parent: this}); - this.el.appendChild(view.render().el); - } - }, - _reset: function () { - var newViews = this.collection.map(this._getOrCreateByModel, this); - - //Remove existing views from the ui - var toRemove = difference(this.views, newViews); - toRemove.forEach(this._removeView, this); - - //Rerender the full list with the new views - this.views = newViews; - this._rerenderAll(); - if (this.views.length === 0) { - this._renderEmptyView(); - } - } -}); - -CollectionView.extend = ampExtend; - -module.exports = CollectionView; - -},{"ampersand-class-extend":15,"ampersand-events":21,"lodash.assign":71,"lodash.difference":74,"lodash.find":76,"lodash.invoke":82,"lodash.pick":98}],18:[function(require,module,exports){ -var AmpersandEvents = require('ampersand-events'); -var classExtend = require('ampersand-class-extend'); -var isArray = require('lodash.isarray'); -var bind = require('lodash.bind'); -var assign = require('lodash.assign'); -var slice = [].slice; - -function Collection(models, options) { - options || (options = {}); - if (options.model) this.model = options.model; - if (options.comparator) this.comparator = options.comparator; - if (options.parent) this.parent = options.parent; - if (!this.mainIndex) { - var idAttribute = this.model && this.model.prototype && this.model.prototype.idAttribute; - this.mainIndex = idAttribute || 'id'; - } - this._reset(); - this.initialize.apply(this, arguments); - if (models) this.reset(models, assign({silent: true}, options)); -} - -assign(Collection.prototype, AmpersandEvents, { - initialize: function () {}, - - isModel: function (model) { - return this.model && model instanceof this.model; - }, - - add: function (models, options) { - return this.set(models, assign({merge: false, add: true, remove: false}, options)); - }, - - // overridable parse method - parse: function (res, options) { - return res; - }, - - // overridable serialize method - serialize: function () { - return this.map(function (model) { - if (model.serialize) { - return model.serialize(); - } else { - var out = {}; - assign(out, model); - delete out.collection; - return out; - } - }); - }, - - toJSON: function () { - return this.serialize(); - }, - - set: function (models, options) { - options = assign({add: true, remove: true, merge: true}, options); - if (options.parse) models = this.parse(models, options); - var singular = !isArray(models); - models = singular ? (models ? [models] : []) : models.slice(); - var id, model, attrs, existing, sort, i, length; - var at = options.at; - var sortable = this.comparator && (at == null) && options.sort !== false; - var sortAttr = ('string' === typeof this.comparator) ? this.comparator : null; - var toAdd = [], toRemove = [], modelMap = {}; - var add = options.add, merge = options.merge, remove = options.remove; - var order = !sortable && add && remove ? [] : false; - var targetProto = this.model && this.model.prototype || Object.prototype; - - // Turn bare objects into model references, and prevent invalid models - // from being added. - for (i = 0, length = models.length; i < length; i++) { - attrs = models[i] || {}; - if (this.isModel(attrs)) { - id = model = attrs; - } else if (targetProto.generateId) { - id = targetProto.generateId(attrs); - } else { - id = attrs[this.mainIndex]; - if (id === undefined && this._isDerivedIndex(targetProto)) { - id = targetProto._derived[this.mainIndex].fn.call(attrs); - } - } - - // If a duplicate is found, prevent it from being added and - // optionally merge it into the existing model. - if (existing = this.get(id)) { - if (remove) modelMap[existing.cid || existing[this.mainIndex]] = true; - if (merge) { - attrs = attrs === model ? model.attributes : attrs; - if (options.parse) attrs = existing.parse(attrs, options); - // if this is model - if (existing.set) { - existing.set(attrs, options); - if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true; - } else { - // if not just update the properties - assign(existing, attrs); - } - } - models[i] = existing; - - // If this is a new, valid model, push it to the `toAdd` list. - } else if (add) { - model = models[i] = this._prepareModel(attrs, options); - if (!model) continue; - toAdd.push(model); - this._addReference(model, options); - } - - // Do not add multiple models with the same `id`. - model = existing || model; - if (!model) continue; - if (order && ((model.isNew && model.isNew() || !model[this.mainIndex]) || !modelMap[model.cid || model[this.mainIndex]])) order.push(model); - modelMap[model[this.mainIndex]] = true; - } - - // Remove nonexistent models if appropriate. - if (remove) { - for (i = 0, length = this.length; i < length; i++) { - model = this.models[i]; - if (!modelMap[model.cid || model[this.mainIndex]]) toRemove.push(model); - } - if (toRemove.length) this.remove(toRemove, options); - } - - // See if sorting is needed, update `length` and splice in new models. - if (toAdd.length || (order && order.length)) { - if (sortable) sort = true; - if (at != null) { - for (i = 0, length = toAdd.length; i < length; i++) { - this.models.splice(at + i, 0, toAdd[i]); - } - } else { - var orderedModels = order || toAdd; - for (i = 0, length = orderedModels.length; i < length; i++) { - this.models.push(orderedModels[i]); - } - } - } - - // Silently sort the collection if appropriate. - if (sort) this.sort({silent: true}); - - // Unless silenced, it's time to fire all appropriate add/sort events. - if (!options.silent) { - for (i = 0, length = toAdd.length; i < length; i++) { - model = toAdd[i]; - if (model.trigger) { - model.trigger('add', model, this, options); - } else { - this.trigger('add', model, this, options); - } - } - if (sort || (order && order.length)) this.trigger('sort', this, options); - } - - // Return the added (or merged) model (or models). - return singular ? models[0] : models; - }, - - get: function (query, indexName) { - if (query == null) return; - var index = this._indexes[indexName || this.mainIndex]; - return (index && (index[query] || index[query[this.mainIndex]])) || this._indexes.cid[query] || this._indexes.cid[query.cid]; - }, - - // Get the model at the given index. - at: function (index) { - return this.models[index]; - }, - - remove: function (models, options) { - var singular = !isArray(models); - var i, length, model, index; - - models = singular ? [models] : slice.call(models); - options || (options = {}); - for (i = 0, length = models.length; i < length; i++) { - model = models[i] = this.get(models[i]); - if (!model) continue; - this._deIndex(model); - index = this.models.indexOf(model); - this.models.splice(index, 1); - if (!options.silent) { - options.index = index; - if (model.trigger) { - model.trigger('remove', model, this, options); - } else { - this.trigger('remove', model, this, options); - } - } - this._removeReference(model, options); - } - return singular ? models[0] : models; - }, - - // When you have more items than you want to add or remove individually, - // you can reset the entire set with a new list of models, without firing - // any granular `add` or `remove` events. Fires `reset` when finished. - // Useful for bulk operations and optimizations. - reset: function (models, options) { - options || (options = {}); - for (var i = 0, length = this.models.length; i < length; i++) { - this._removeReference(this.models[i], options); - } - options.previousModels = this.models; - this._reset(); - models = this.add(models, assign({silent: true}, options)); - if (!options.silent) this.trigger('reset', this, options); - return models; - }, - - sort: function (options) { - var self = this; - if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); - options || (options = {}); - - if (typeof this.comparator === 'string') { - this.models.sort(function (left, right) { - if (left.get) { - left = left.get(self.comparator); - right = right.get(self.comparator); - } else { - left = left[self.comparator]; - right = right[self.comparator]; - } - if (left > right || left === void 0) return 1; - if (left < right || right === void 0) return -1; - return 0; - }); - } else if (this.comparator.length === 1) { - this.models.sort(function (left, right) { - left = self.comparator(left); - right = self.comparator(right); - if (left > right || left === void 0) return 1; - if (left < right || right === void 0) return -1; - return 0; - }); - } else { - this.models.sort(bind(this.comparator,this)); - } - - if (!options.silent) this.trigger('sort', this, options); - return this; - }, - - // Private method to reset all internal state. Called when the collection - // is first initialized or reset. - _reset: function () { - var list = slice.call(this.indexes || []); - var i = 0; - list.push(this.mainIndex); - list.push('cid'); - var l = list.length; - this.models = []; - this._indexes = {}; - for (; i < l; i++) { - this._indexes[list[i]] = {}; - } - }, - - _prepareModel: function (attrs, options) { - // if we haven't defined a constructor, skip this - if (!this.model) return attrs; - - if (this.isModel(attrs)) { - if (!attrs.collection) attrs.collection = this; - return attrs; - } else { - options = options ? assign({}, options) : {}; - options.collection = this; - var model = new this.model(attrs, options); - if (!model.validationError) return model; - this.trigger('invalid', this, model.validationError, options); - return false; - } - }, - - _deIndex: function (model, attribute, value) { - var indexVal; - if (attribute !== undefined) { - if (undefined === this._indexes[attribute]) throw new Error('Given attribute is not an index'); - delete this._indexes[attribute][value]; - return; - } - // Not a specific attribute - for (var indexAttr in this._indexes) { - indexVal = model.hasOwnProperty(indexAttr) ? model[indexAttr] : (model.get && model.get(indexAttr)); - delete this._indexes[indexAttr][indexVal]; - } - }, - - _index: function (model, attribute) { - var indexVal; - if (attribute !== undefined) { - if (undefined === this._indexes[attribute]) throw new Error('Given attribute is not an index'); - indexVal = model[attribute] || (model.get && model.get(attribute)); - if (indexVal) this._indexes[attribute][indexVal] = model; - return; - } - // Not a specific attribute - for (var indexAttr in this._indexes) { - indexVal = model.hasOwnProperty(indexAttr) ? model[indexAttr] : (model.get && model.get(indexAttr)); - if (indexVal != null) this._indexes[indexAttr][indexVal] = model; - } - }, - - _isDerivedIndex: function(proto) { - if (!proto || typeof proto._derived !== 'object') { - return false; - } - return Object.keys(proto._derived).indexOf(this.mainIndex) >= 0; - }, - - // Internal method to create a model's ties to a collection. - _addReference: function (model, options) { - this._index(model); - if (!model.collection) model.collection = this; - if (model.on) model.on('all', this._onModelEvent, this); - }, - - // Internal method to sever a model's ties to a collection. - _removeReference: function (model, options) { - if (this === model.collection) delete model.collection; - this._deIndex(model); - if (model.off) model.off('all', this._onModelEvent, this); - }, - - _onModelEvent: function (event, model, collection, options) { - var eventName = event.split(':')[0]; - var attribute = event.split(':')[1]; - - if ((eventName === 'add' || eventName === 'remove') && collection !== this) return; - if (eventName === 'destroy') this.remove(model, options); - if (model && eventName === 'change' && attribute && this._indexes[attribute]) { - this._deIndex(model, attribute, model.previousAttributes()[attribute]); - this._index(model, attribute); - } - this.trigger.apply(this, arguments); - } -}); - -Object.defineProperties(Collection.prototype, { - length: { - get: function () { - return this.models.length; - } - }, - isCollection: { - get: function () { - return true; - } - } -}); - -var arrayMethods = [ - 'indexOf', - 'lastIndexOf', - 'every', - 'some', - 'forEach', - 'map', - 'filter', - 'reduce', - 'reduceRight' -]; - -arrayMethods.forEach(function (method) { - Collection.prototype[method] = function () { - return this.models[method].apply(this.models, arguments); - }; -}); - -// alias each/forEach for maximum compatibility -Collection.prototype.each = Collection.prototype.forEach; - -Collection.extend = classExtend; - -module.exports = Collection; - -},{"ampersand-class-extend":15,"ampersand-events":21,"lodash.assign":71,"lodash.bind":73,"lodash.isarray":84}],19:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-dom-bindings"] = window.ampersand["ampersand-dom-bindings"] || []; window.ampersand["ampersand-dom-bindings"].push("3.9.2");} -var Store = require('key-tree-store'); -var dom = require('ampersand-dom'); -var matchesSelector = require('matches-selector'); -var partial = require('lodash/partial'); -var slice = Array.prototype.slice; - -function getMatches(el, selector, firstOnly) { - if (selector === '') return [el]; - var matches = []; - if (!selector) return matches; - if (firstOnly) { - if (matchesSelector(el, selector)) return [el]; - return el.querySelector(selector) ? [el.querySelector(selector)] : []; - } else { - if (matchesSelector(el, selector)) matches.push(el); - return matches.concat(slice.call(el.querySelectorAll(selector))); - } -} -function setAttributes(el, attrs) { - for (var name in attrs) { - dom.setAttribute(el, name, attrs[name]); - } -} - -function removeAttributes(el, attrs) { - for (var name in attrs) { - dom.removeAttribute(el, name); - } -} - -function makeArray(val) { - return Array.isArray(val) ? val : [val]; -} - -function switchHandler(binding, el, value) { - // the element selector to show - var showValue = binding.cases[value]; - - var firstMatchOnly = binding.firstMatchOnly; - - // hide all the other elements with a different value - for (var item in binding.cases) { - var curValue = binding.cases[item]; - - if (value !== item && curValue !== showValue) { - getMatches(el, curValue, firstMatchOnly).forEach(function (match) { - dom.hide(match); - }); - } - } - getMatches(el, showValue, firstMatchOnly).forEach(function (match) { - dom.show(match); - }); -} - -function getSelector(binding) { - if (typeof binding.selector === 'string') { - return binding.selector; - } else if (binding.hook) { - return '[data-hook~="' + binding.hook + '"]'; - } else { - return ''; - } -} - -function getBindingFunc(binding, context) { - var type = binding.type || 'text'; - var isCustomBinding = typeof type === 'function'; - var selector = getSelector(binding); - var firstMatchOnly = binding.firstMatchOnly; - var yes = binding.yes; - var no = binding.no; - var hasYesNo = !!(yes || no); - - // storage variable for previous if relevant - var previousValue; - - if (isCustomBinding) { - return function (el, value) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - type.call(context, match, value, previousValue); - }); - previousValue = value; - }; - } else if (type === 'text') { - return function (el, value) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - dom.text(match, value); - }); - }; - } else if (type === 'class') { - return function (el, value) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - dom.switchClass(match, previousValue, value); - }); - previousValue = value; - }; - } else if (type === 'attribute') { - if (!binding.name) throw Error('attribute bindings must have a "name"'); - return function (el, value) { - var names = makeArray(binding.name); - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - names.forEach(function (name) { - dom.setAttribute(match, name, value); - }); - }); - previousValue = value; - }; - } else if (type === 'value') { - return function (el, value) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - if (!value && value !== 0) value = ''; - // only apply bindings if element is not currently focused - if (document.activeElement !== match) match.value = value; - }); - previousValue = value; - }; - } else if (type === 'booleanClass') { - // if there's a `no` case this is actually a switch - if (hasYesNo) { - yes = makeArray(yes || ''); - no = makeArray(no || ''); - return function (el, value) { - var prevClass = value ? no : yes; - var newClass = value ? yes : no; - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - prevClass.forEach(function (pc) { - dom.removeClass(match, pc); - }); - newClass.forEach(function (nc) { - dom.addClass(match, nc); - }); - }); - }; - } else { - return function (el, value, keyName) { - var name = makeArray(binding.name || keyName); - var invert = (binding.invert || false); - value = (invert ? (value ? false : true) : value); - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - name.forEach(function (className) { - dom[value ? 'addClass' : 'removeClass'](match, className); - }); - }); - }; - } - } else if (type === 'booleanAttribute') { - // if there are `yes` and `no` selectors, this swaps between them - if (hasYesNo) { - yes = makeArray(yes || ''); - no = makeArray(no || ''); - return function (el, value) { - var prevAttribute = value ? no : yes; - var newAttribute = value ? yes : no; - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - prevAttribute.forEach(function (pa) { - if (pa) { - dom.removeAttribute(match, pa); - } - }); - newAttribute.forEach(function (na) { - if (na) { - dom.addAttribute(match, na); - } - }); - }); - }; - } else { - return function (el, value, keyName) { - var name = makeArray(binding.name || keyName); - var invert = (binding.invert || false); - value = (invert ? (value ? false : true) : value); - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - name.forEach(function (attr) { - dom[value ? 'addAttribute' : 'removeAttribute'](match, attr); - }); - }); - }; - } - } else if (type === 'toggle') { - var mode = (binding.mode || 'display'); - var invert = (binding.invert || false); - // this doesn't require a selector since we can pass yes/no selectors - if (hasYesNo) { - return function (el, value) { - getMatches(el, yes, firstMatchOnly).forEach(function (match) { - dom[value ? 'show' : 'hide'](match, mode); - }); - getMatches(el, no, firstMatchOnly).forEach(function (match) { - dom[value ? 'hide' : 'show'](match, mode); - }); - }; - } else { - return function (el, value) { - value = (invert ? (value ? false : true) : value); - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - dom[value ? 'show' : 'hide'](match, mode); - }); - }; - } - } else if (type === 'switch') { - if (!binding.cases) throw Error('switch bindings must have "cases"'); - return partial(switchHandler, binding); - } else if (type === 'innerHTML') { - return function (el, value) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - dom.html(match, value); - }); - }; - } else if (type === 'switchClass') { - if (!binding.cases) throw Error('switchClass bindings must have "cases"'); - return function (el, value, keyName) { - var name = makeArray(binding.name || keyName); - for (var item in binding.cases) { - getMatches(el, binding.cases[item], firstMatchOnly).forEach(function (match) { - name.forEach(function (className) { - dom[value === item ? 'addClass' : 'removeClass'](match, className); - }); - }); - } - }; - } else if (type === 'switchAttribute') { - if (!binding.cases) throw Error('switchAttribute bindings must have "cases"'); - return function (el, value, keyName) { - getMatches(el, selector, firstMatchOnly).forEach(function (match) { - if (previousValue) { - removeAttributes(match, previousValue); - } - - if (value in binding.cases) { - var attrs = binding.cases[value]; - if (typeof attrs === 'string') { - attrs = {}; - attrs[binding.name || keyName] = binding.cases[value]; - } - setAttributes(match, attrs); - - previousValue = attrs; - } - }); - }; - } else { - throw new Error('no such binding type: ' + type); - } -} - -// returns a key-tree-store of functions -// that can be applied to any element/model. - -// all resulting functions should be called -// like func(el, value, lastKeyName) -module.exports = function (bindings, context) { - var store = new Store(); - var key, current; - - for (key in bindings) { - current = bindings[key]; - if (typeof current === 'string') { - store.add(key, getBindingFunc({ - type: 'text', - selector: current - })); - } else if (current.forEach) { - current.forEach(function (binding) { - store.add(key, getBindingFunc(binding, context)); - }); - } else { - store.add(key, getBindingFunc(current, context)); - } - } - - return store; -}; - -},{"ampersand-dom":20,"key-tree-store":40,"lodash/partial":169,"matches-selector":174}],20:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-dom"] = window.ampersand["ampersand-dom"] || []; window.ampersand["ampersand-dom"].push("1.5.0");} -var dom = module.exports = { - text: function (el, val) { - el.textContent = getString(val); - }, - // optimize if we have classList - addClass: function (el, cls) { - cls = getString(cls); - if (!cls) return; - if (Array.isArray(cls)) { - cls.forEach(function(c) { - dom.addClass(el, c); - }); - } else if (el.classList) { - el.classList.add(cls); - } else { - if (!hasClass(el, cls)) { - if (el.classList) { - el.classList.add(cls); - } else { - el.className += ' ' + cls; - } - } - } - }, - removeClass: function (el, cls) { - if (Array.isArray(cls)) { - cls.forEach(function(c) { - dom.removeClass(el, c); - }); - } else if (el.classList) { - cls = getString(cls); - if (cls) el.classList.remove(cls); - } else { - // may be faster to not edit unless we know we have it? - el.className = el.className.replace(new RegExp('(^|\\b)' + cls.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); - } - }, - hasClass: hasClass, - switchClass: function (el, prevCls, newCls) { - if (prevCls) this.removeClass(el, prevCls); - this.addClass(el, newCls); - }, - // makes sure attribute (with no content) is added - // if exists it will be cleared of content - addAttribute: function (el, attr) { - // setting to empty string does same - el.setAttribute(attr, ''); - // Some browsers won't update UI for boolean attributes unless you - // set it directly. So we do both - if (hasBooleanProperty(el, attr)) el[attr] = true; - }, - // completely removes attribute - removeAttribute: function (el, attr) { - el.removeAttribute(attr); - if (hasBooleanProperty(el, attr)) el[attr] = false; - }, - // sets attribute to string value given, clearing any current value - setAttribute: function (el, attr, value) { - el.setAttribute(attr, getString(value)); - }, - getAttribute: function (el, attr) { - return el.getAttribute(attr); - }, - hasAttribute: function (el, attr) { - return el.hasAttribute(attr); - }, - hide: function (el, mode) { - if (!mode) mode = 'display'; - if (!isHidden(el)) { - storeDisplayStyle(el, mode); - hide(el, mode); - } - }, - // show element - show: function (el, mode) { - if (!mode) mode = 'display'; - show(el, mode); - }, - toggle: function (el, mode) { - if (!isHidden(el)) { - dom.hide(el, mode); - } else { - dom.show(el, mode); - } - }, - html: function (el, content) { - el.innerHTML = content; - } -}; - -// helpers -function getString(val) { - if (!val && val !== 0) { - return ''; - } else { - return val; - } -} - -function hasClass(el, cls) { - if (el.classList) { - return el.classList.contains(cls); - } else { - return new RegExp('(^| )' + cls + '( |$)', 'gi').test(el.className); - } -} - -function hasBooleanProperty(el, prop) { - var val = el[prop]; - return prop in el && (val === true || val === false); -} - -function isHidden (el) { - return dom.getAttribute(el, 'data-anddom-hidden') === 'true'; -} - -function storeDisplayStyle (el, mode) { - dom.setAttribute(el, 'data-anddom-' + mode, el.style[mode]); -} - -function show (el, mode) { - el.style[mode] = dom.getAttribute(el, 'data-anddom-' + mode) || ''; - dom.removeAttribute(el, 'data-anddom-hidden'); -} - -function hide (el, mode) { - dom.setAttribute(el, 'data-anddom-hidden', 'true'); - el.style[mode] = (mode === 'visibility' ? 'hidden' : 'none'); -} - -},{}],21:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-events"] = window.ampersand["ampersand-events"] || []; window.ampersand["ampersand-events"].push("1.1.1");} -var runOnce = require('lodash.once'); -var uniqueId = require('lodash.uniqueid'); -var keys = require('lodash.keys'); -var isEmpty = require('lodash.isempty'); -var each = require('lodash.foreach'); -var bind = require('lodash.bind'); -var assign = require('lodash.assign'); -var slice = Array.prototype.slice; -var eventSplitter = /\s+/; - - -var Events = { - // Bind an event to a `callback` function. Passing `"all"` will bind - // the callback to all events fired. - on: function(name, callback, context) { - if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; - this._events || (this._events = {}); - var events = this._events[name] || (this._events[name] = []); - events.push({callback: callback, context: context, ctx: context || this}); - return this; - }, - - // Bind an event to only be triggered a single time. After the first time - // the callback is invoked, it will be removed. - once: function(name, callback, context) { - if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; - var self = this; - var once = runOnce(function() { - self.off(name, once); - callback.apply(this, arguments); - }); - once._callback = callback; - return this.on(name, once, context); - }, - - // Remove one or many callbacks. If `context` is null, removes all - // callbacks with that function. If `callback` is null, removes all - // callbacks for the event. If `name` is null, removes all bound - // callbacks for all events. - off: function(name, callback, context) { - var retain, ev, events, names, i, l, j, k; - if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; - if (!name && !callback && !context) { - this._events = void 0; - return this; - } - names = name ? [name] : keys(this._events); - for (i = 0, l = names.length; i < l; i++) { - name = names[i]; - if (events = this._events[name]) { - this._events[name] = retain = []; - if (callback || context) { - for (j = 0, k = events.length; j < k; j++) { - ev = events[j]; - if ((callback && callback !== ev.callback && callback !== ev.callback._callback) || - (context && context !== ev.context)) { - retain.push(ev); - } - } - } - if (!retain.length) delete this._events[name]; - } - } - - return this; - }, - - // Trigger one or many events, firing all bound callbacks. Callbacks are - // passed the same arguments as `trigger` is, apart from the event name - // (unless you're listening on `"all"`, which will cause your callback to - // receive the true name of the event as the first argument). - trigger: function(name) { - if (!this._events) return this; - var args = slice.call(arguments, 1); - if (!eventsApi(this, 'trigger', name, args)) return this; - var events = this._events[name]; - var allEvents = this._events.all; - if (events) triggerEvents(events, args); - if (allEvents) triggerEvents(allEvents, arguments); - return this; - }, - - // Tell this object to stop listening to either specific events ... or - // to every object it's currently listening to. - stopListening: function(obj, name, callback) { - var listeningTo = this._listeningTo; - if (!listeningTo) return this; - var remove = !name && !callback; - if (!callback && typeof name === 'object') callback = this; - if (obj) (listeningTo = {})[obj._listenId] = obj; - for (var id in listeningTo) { - obj = listeningTo[id]; - obj.off(name, callback, this); - if (remove || isEmpty(obj._events)) delete this._listeningTo[id]; - } - return this; - }, - - // extend an object with event capabilities if passed - // or just return a new one. - createEmitter: function (obj) { - return assign(obj || {}, Events); - } -}; - -Events.bind = Events.on; -Events.unbind = Events.off; - - -// Implement fancy features of the Events API such as multiple event -// names `"change blur"` and jQuery-style event maps `{change: action}` -// in terms of the existing API. -var eventsApi = function(obj, action, name, rest) { - if (!name) return true; - - // Handle event maps. - if (typeof name === 'object') { - for (var key in name) { - obj[action].apply(obj, [key, name[key]].concat(rest)); - } - return false; - } - - // Handle space separated event names. - if (eventSplitter.test(name)) { - var names = name.split(eventSplitter); - for (var i = 0, l = names.length; i < l; i++) { - obj[action].apply(obj, [names[i]].concat(rest)); - } - return false; - } - - return true; -}; - -// A difficult-to-believe, but optimized internal dispatch function for -// triggering events. Tries to keep the usual cases speedy. -var triggerEvents = function(events, args) { - var ev; - var i = -1; - var l = events.length; - var a1 = args[0]; - var a2 = args[1]; - var a3 = args[2]; - switch (args.length) { - case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return; - case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return; - case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return; - case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return; - default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); return; - } -}; - -var listenMethods = { - listenTo: 'on', - listenToOnce: 'once' -}; - -// Inversion-of-control versions of `on` and `once`. Tell *this* object to -// listen to an event in another object ... keeping track of what it's -// listening to. -each(listenMethods, function(implementation, method) { - Events[method] = function(obj, name, callback, run) { - var listeningTo = this._listeningTo || (this._listeningTo = {}); - var id = obj._listenId || (obj._listenId = uniqueId('l')); - listeningTo[id] = obj; - if (!callback && typeof name === 'object') callback = this; - obj[implementation](name, callback, this); - return this; - }; -}); - -Events.listenToAndRun = function (obj, name, callback) { - Events.listenTo.apply(this, arguments); - if (!callback && typeof name === 'object') callback = this; - callback.apply(this); - return this; -}; - -module.exports = Events; - -},{"lodash.assign":71,"lodash.bind":73,"lodash.foreach":78,"lodash.isempty":86,"lodash.keys":92,"lodash.once":96,"lodash.uniqueid":102}],22:[function(require,module,exports){ -var Events = require('backbone-events-standalone'); -var extend = require('amp-extend'); -var bind = require('amp-bind'); - - -// Handles cross-browser history management, based on either -// [pushState](http://diveintohtml5.info/history.html) and real URLs, or -// [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange) -// and URL fragments. If the browser supports neither. -var History = function () { - this.handlers = []; - this.checkUrl = bind(this.checkUrl, this); - - // Ensure that `History` can be used outside of the browser. - if (typeof window !== 'undefined') { - this.location = window.location; - this.history = window.history; - } -}; - -// Cached regex for stripping a leading hash/slash and trailing space. -var routeStripper = /^[#\/]|\s+$/g; - -// Cached regex for stripping leading and trailing slashes. -var rootStripper = /^\/+|\/+$/g; - -// Cached regex for stripping urls of hash. -var pathStripper = /#.*$/; - -// Has the history handling already been started? -History.started = false; - -// Set up all inheritable **Backbone.History** properties and methods. -extend(History.prototype, Events, { - - // The default interval to poll for hash changes, if necessary, is - // twenty times a second. - interval: 50, - - // Are we at the app root? - atRoot: function () { - var path = this.location.pathname.replace(/[^\/]$/, '$&/'); - return path === this.root && !this.location.search; - }, - - // Gets the true hash value. Cannot use location.hash directly due to bug - // in Firefox where location.hash will always be decoded. - getHash: function (window) { - var match = (window || this).location.href.match(/#(.*)$/); - return match ? match[1] : ''; - }, - - // Get the pathname and search params, without the root. - getPath: function () { - var path = decodeURI(this.location.pathname + this.location.search); - var root = this.root.slice(0, -1); - if (!path.indexOf(root)) path = path.slice(root.length); - return path.slice(1); - }, - - // Get the cross-browser normalized URL fragment from the path or hash. - getFragment: function (fragment) { - if (fragment == null) { - if (this._hasPushState || !this._wantsHashChange) { - fragment = this.getPath(); - } else { - fragment = this.getHash(); - } - } - return fragment.replace(routeStripper, ''); - }, - - // Start the hash change handling, returning `true` if the current URL matches - // an existing route, and `false` otherwise. - start: function (options) { - if (History.started) throw new Error("Backbone.history has already been started"); - History.started = true; - - // Figure out the initial configuration. - // Is pushState desired ... is it available? - this.options = extend({root: '/'}, this.options, options); - this.root = this.options.root; - this._wantsHashChange = this.options.hashChange !== false; - this._hasHashChange = 'onhashchange' in window; - this._wantsPushState = !!this.options.pushState; - this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState); - this.fragment = this.getFragment(); - - // Add a cross-platform `addEventListener` shim for older browsers. - var addEventListener = window.addEventListener; - - // Normalize root to always include a leading and trailing slash. - this.root = ('/' + this.root + '/').replace(rootStripper, '/'); - - // Depending on whether we're using pushState or hashes, and whether - // 'onhashchange' is supported, determine how we check the URL state. - if (this._hasPushState) { - addEventListener('popstate', this.checkUrl, false); - } else if (this._wantsHashChange && this._hasHashChange) { - addEventListener('hashchange', this.checkUrl, false); - } else if (this._wantsHashChange) { - this._checkUrlInterval = setInterval(this.checkUrl, this.interval); - } - - // Transition from hashChange to pushState or vice versa if both are - // requested. - if (this._wantsHashChange && this._wantsPushState) { - - // If we've started off with a route from a `pushState`-enabled - // browser, but we're currently in a browser that doesn't support it... - if (!this._hasPushState && !this.atRoot()) { - this.location.replace(this.root + '#' + this.getPath()); - // Return immediately as browser will do redirect to new url - return true; - - // Or if we've started out with a hash-based route, but we're currently - // in a browser where it could be `pushState`-based instead... - } else if (this._hasPushState && this.atRoot()) { - this.navigate(this.getHash(), {replace: true}); - } - } - - if (!this.options.silent) return this.loadUrl(); - }, - - // Disable Backbone.history, perhaps temporarily. Not useful in a real app, - // but possibly useful for unit testing Routers. - stop: function () { - // Add a cross-platform `removeEventListener` shim for older browsers. - var removeEventListener = window.removeEventListener; - - // Remove window listeners. - if (this._hasPushState) { - removeEventListener('popstate', this.checkUrl, false); - } else if (this._wantsHashChange && this._hasHashChange) { - removeEventListener('hashchange', this.checkUrl, false); - } - - // Some environments will throw when clearing an undefined interval. - if (this._checkUrlInterval) clearInterval(this._checkUrlInterval); - History.started = false; - }, - - // Add a route to be tested when the fragment changes. Routes added later - // may override previous routes. - route: function (route, callback) { - this.handlers.unshift({route: route, callback: callback}); - }, - - // Checks the current URL to see if it has changed, and if it has, - // calls `loadUrl`. - checkUrl: function (e) { - var current = this.getFragment(); - if (current === this.fragment) return false; - this.loadUrl(); - }, - - // Attempt to load the current URL fragment. If a route succeeds with a - // match, returns `true`. If no defined routes matches the fragment, - // returns `false`. - loadUrl: function (fragment) { - fragment = this.fragment = this.getFragment(fragment); - return this.handlers.some(function (handler) { - if (handler.route.test(fragment)) { - handler.callback(fragment); - return true; - } - }); - }, - - // Save a fragment into the hash history, or replace the URL state if the - // 'replace' option is passed. You are responsible for properly URL-encoding - // the fragment in advance. - // - // The options object can contain `trigger: true` if you wish to have the - // route callback be fired (not usually desirable), or `replace: true`, if - // you wish to modify the current URL without adding an entry to the history. - navigate: function (fragment, options) { - if (!History.started) return false; - if (!options || options === true) options = {trigger: !!options}; - - var url = this.root + (fragment = this.getFragment(fragment || '')); - - // Strip the hash and decode for matching. - fragment = decodeURI(fragment.replace(pathStripper, '')); - - if (this.fragment === fragment) return; - this.fragment = fragment; - - // Don't include a trailing slash on the root. - if (fragment === '' && url !== '/') url = url.slice(0, -1); - - // If pushState is available, we use it to set the fragment as a real URL. - if (this._hasPushState) { - this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url); - - // If hash changes haven't been explicitly disabled, update the hash - // fragment to store history. - } else if (this._wantsHashChange) { - this._updateHash(this.location, fragment, options.replace); - // If you've told us that you explicitly don't want fallback hashchange- - // based history, then `navigate` becomes a page refresh. - } else { - return this.location.assign(url); - } - if (options.trigger) return this.loadUrl(fragment); - }, - - // Update the hash location, either replacing the current entry, or adding - // a new one to the browser history. - _updateHash: function (location, fragment, replace) { - if (replace) { - var href = location.href.replace(/(javascript:|#).*$/, ''); - location.replace(href + '#' + fragment); - } else { - // Some browsers require that `hash` contains a leading #. - location.hash = '#' + fragment; - } - } - -}); - -module.exports = new History(); - -},{"amp-bind":9,"amp-extend":10,"backbone-events-standalone":29}],23:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-router"] = window.ampersand["ampersand-router"] || []; window.ampersand["ampersand-router"].push("1.0.7");} -var classExtend = require('ampersand-class-extend'); -var Events = require('backbone-events-standalone'); -var ampHistory = require('./ampersand-history'); -var extend = require('amp-extend'); -var isRegexp = require('amp-is-regexp'); -var isFunction = require('amp-is-function'); -var result = require('amp-result'); - -// Routers map faux-URLs to actions, and fire events when routes are -// matched. Creating a new one sets its `routes` hash, if not set statically. -var Router = module.exports = function (options) { - options || (options = {}); - this.history = options.history || ampHistory; - if (options.routes) this.routes = options.routes; - this._bindRoutes(); - this.initialize.apply(this, arguments); -}; - -// Cached regular expressions for matching named param parts and splatted -// parts of route strings. -var optionalParam = /\((.*?)\)/g; -var namedParam = /(\(\?)?:\w+/g; -var splatParam = /\*\w+/g; -var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g; - -// Set up all inheritable **Backbone.Router** properties and methods. -extend(Router.prototype, Events, { - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function () {}, - - // Manually bind a single named route to a callback. For example: - // - // this.route('search/:query/p:num', 'search', function (query, num) { - // ... - // }); - // - route: function (route, name, callback) { - if (!isRegexp(route)) route = this._routeToRegExp(route); - if (isFunction(name)) { - callback = name; - name = ''; - } - if (!callback) callback = this[name]; - var router = this; - this.history.route(route, function (fragment) { - var args = router._extractParameters(route, fragment); - if (router.execute(callback, args, name) !== false) { - router.trigger.apply(router, ['route:' + name].concat(args)); - router.trigger('route', name, args); - router.history.trigger('route', router, name, args); - } - }); - return this; - }, - - // Execute a route handler with the provided parameters. This is an - // excellent place to do pre-route setup or post-route cleanup. - execute: function (callback, args, name) { - if (callback) callback.apply(this, args); - }, - - // Simple proxy to `ampHistory` to save a fragment into the history. - navigate: function (fragment, options) { - this.history.navigate(fragment, options); - return this; - }, - - // Helper for doing `internal` redirects without adding to history - // and thereby breaking backbutton functionality. - redirectTo: function (newUrl) { - this.navigate(newUrl, {replace: true, trigger: true}); - }, - - // Bind all defined routes to `history`. We have to reverse the - // order of the routes here to support behavior where the most general - // routes can be defined at the bottom of the route map. - _bindRoutes: function () { - if (!this.routes) return; - this.routes = result(this, 'routes'); - var route, routes = Object.keys(this.routes); - while ((route = routes.pop()) != null) { - this.route(route, this.routes[route]); - } - }, - - // Convert a route string into a regular expression, suitable for matching - // against the current location hash. - _routeToRegExp: function (route) { - route = route - .replace(escapeRegExp, '\\$&') - .replace(optionalParam, '(?:$1)?') - .replace(namedParam, function (match, optional) { - return optional ? match : '([^/?]+)'; - }) - .replace(splatParam, '([^?]*?)'); - return new RegExp('^' + route + '(?:\\?([\\s\\S]*))?$'); - }, - - // Given a route, and a URL fragment that it matches, return the array of - // extracted decoded parameters. Empty or unmatched parameters will be - // treated as `null` to normalize cross-browser behavior. - _extractParameters: function (route, fragment) { - var params = route.exec(fragment).slice(1); - return params.map(function (param, i) { - // Don't decode the search params. - if (i === params.length - 1) return param || null; - return param ? decodeURIComponent(param) : null; - }); - } - -}); - -Router.extend = classExtend; - -},{"./ampersand-history":22,"amp-extend":10,"amp-is-function":11,"amp-is-regexp":13,"amp-result":14,"ampersand-class-extend":15,"backbone-events-standalone":29}],24:[function(require,module,exports){ -'use strict'; -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-state"] = window.ampersand["ampersand-state"] || []; window.ampersand["ampersand-state"].push("4.9.1");} -var uniqueId = require('lodash.uniqueid'); -var assign = require('lodash.assign'); -var cloneObj = function(obj) { return assign({}, obj); }; -var omit = require('lodash.omit'); -var escape = require('lodash.escape'); -var forOwn = require('lodash.forown'); -var includes = require('lodash.includes'); -var isString = require('lodash.isstring'); -var isObject = require('lodash.isobject'); -var isDate = require('lodash.isdate'); -var isFunction = require('lodash.isfunction'); -var _isEqual = require('lodash.isequal'); // to avoid shadowing -var has = require('lodash.has'); -var result = require('lodash.result'); -var bind = require('lodash.bind'); // because phantomjs doesn't have Function#bind -var union = require('lodash.union'); -var Events = require('ampersand-events'); -var KeyTree = require('key-tree-store'); -var arrayNext = require('array-next'); -var changeRE = /^change:/; -var noop = function () {}; - -function Base(attrs, options) { - options || (options = {}); - this.cid || (this.cid = uniqueId('state')); - this._events = {}; - this._values = {}; - this._definition = Object.create(this._definition); - if (options.parse) attrs = this.parse(attrs, options); - this.parent = options.parent; - this.collection = options.collection; - this._keyTree = new KeyTree(); - this._initCollections(); - this._initChildren(); - this._cache = {}; - this._previousAttributes = {}; - if (attrs) this.set(attrs, assign({silent: true, initial: true}, options)); - this._changed = {}; - if (this._derived) this._initDerived(); - if (options.init !== false) this.initialize.apply(this, arguments); -} - -assign(Base.prototype, Events, { - // can be allow, ignore, reject - extraProperties: 'ignore', - - idAttribute: 'id', - - namespaceAttribute: 'namespace', - - typeAttribute: 'modelType', - - // Stubbed out to be overwritten - initialize: function () { - return this; - }, - - // Get ID of model per configuration. - // Should *always* be how ID is determined by other code. - getId: function () { - return this[this.idAttribute]; - }, - - // Get namespace of model per configuration. - // Should *always* be how namespace is determined by other code. - getNamespace: function () { - return this[this.namespaceAttribute]; - }, - - // Get type of model per configuration. - // Should *always* be how type is determined by other code. - getType: function () { - return this[this.typeAttribute]; - }, - - // A model is new if it has never been saved to the server, and lacks an id. - isNew: function () { - return this.getId() == null; - }, - - // get HTML-escaped value of attribute - escape: function (attr) { - return escape(this.get(attr)); - }, - - // Check if the model is currently in a valid state. - isValid: function (options) { - return this._validate({}, assign(options || {}, { validate: true })); - }, - - // Parse can be used remap/restructure/rename incoming properties - // before they are applied to attributes. - parse: function (resp, options) { - //jshint unused:false - return resp; - }, - - // Serialize is the inverse of `parse` it lets you massage data - // on the way out. Before, sending to server, for example. - serialize: function (options) { - var attrOpts = assign({props: true}, options); - var res = this.getAttributes(attrOpts, true); - forOwn(this._children, function (value, key) { - res[key] = this[key].serialize(); - }, this); - forOwn(this._collections, function (value, key) { - res[key] = this[key].serialize(); - }, this); - return res; - }, - - // Main set method used by generated setters/getters and can - // be used directly if you need to pass options or set multiple - // properties at once. - set: function (key, value, options) { - var self = this; - var extraProperties = this.extraProperties; - var wasChanging, changeEvents, newType, newVal, def, cast, err, attr, - attrs, dataType, silent, unset, currentVal, initial, hasChanged, isEqual, onChange; - - // Handle both `"key", value` and `{key: value}` -style arguments. - if (isObject(key) || key === null) { - attrs = key; - options = value; - } else { - attrs = {}; - attrs[key] = value; - } - - options = options || {}; - - if (!this._validate(attrs, options)) return false; - - // Extract attributes and options. - unset = options.unset; - silent = options.silent; - initial = options.initial; - - // Initialize change tracking. - wasChanging = this._changing; - this._changing = true; - changeEvents = []; - - // if not already changing, store previous - if (initial) { - this._previousAttributes = {}; - } else if (!wasChanging) { - this._previousAttributes = this.attributes; - this._changed = {}; - } - - // For each `set` attribute... - for (var i = 0, keys = Object.keys(attrs), len = keys.length; i < len; i++) { - attr = keys[i]; - newVal = attrs[attr]; - newType = typeof newVal; - currentVal = this._values[attr]; - def = this._definition[attr]; - - if (!def) { - // if this is a child model or collection - if (this._children[attr] || this._collections[attr]) { - if (!isObject(newVal)) { - newVal = {}; - } - - this[attr].set(newVal, options); - continue; - } else if (extraProperties === 'ignore') { - continue; - } else if (extraProperties === 'reject') { - throw new TypeError('No "' + attr + '" property defined on ' + (this.type || 'this') + ' model and extraProperties not set to "ignore" or "allow"'); - } else if (extraProperties === 'allow') { - def = this._createPropertyDefinition(attr, 'any'); - } else if (extraProperties) { - throw new TypeError('Invalid value for extraProperties: "' + extraProperties + '"'); - } - } - - isEqual = this._getCompareForType(def.type); - onChange = this._getOnChangeForType(def.type); - dataType = this._dataTypes[def.type]; - - // check type if we have one - if (dataType && dataType.set) { - cast = dataType.set(newVal); - newVal = cast.val; - newType = cast.type; - } - - // If we've defined a test, run it - if (def.test) { - err = def.test.call(this, newVal, newType); - if (err) { - throw new TypeError('Property \'' + attr + '\' failed validation with error: ' + err); - } - } - - // If we are required but undefined, throw error. - // If we are null and are not allowing null, throw error - // If we have a defined type and the new type doesn't match, and we are not null, throw error. - // If we require specific value and new one is not one of them, throw error (unless it has default value or we're unsetting it with undefined). - - if (newVal === undefined && def.required) { - throw new TypeError('Required property \'' + attr + '\' must be of type ' + def.type + '. Tried to set ' + newVal); - } - if (newVal === null && def.required && !def.allowNull) { - throw new TypeError('Property \'' + attr + '\' must be of type ' + def.type + ' (cannot be null). Tried to set ' + newVal); - } - if ((def.type && def.type !== 'any' && def.type !== newType) && newVal !== null && newVal !== undefined) { - throw new TypeError('Property \'' + attr + '\' must be of type ' + def.type + '. Tried to set ' + newVal); - } - if (def.values && !includes(def.values, newVal)) { - var defaultValue = result(def, 'default'); - if (unset && defaultValue !== undefined) { - newVal = defaultValue; - } else if (!unset || (unset && newVal !== undefined)) { - throw new TypeError('Property \'' + attr + '\' must be one of values: ' + def.values.join(', ') + '. Tried to set ' + newVal); - } - } - - // We know this has 'changed' if it's the initial set, so skip a potentially expensive isEqual check. - hasChanged = initial || !isEqual(currentVal, newVal, attr); - - // enforce `setOnce` for properties if set - if (def.setOnce && currentVal !== undefined && hasChanged) { - throw new TypeError('Property \'' + attr + '\' can only be set once.'); - } - - // set/unset attributes. - // If this is not the initial set, keep track of changed attributes - // and push to changeEvents array so we can fire events. - if (hasChanged) { - - // This fires no matter what, even on initial set. - onChange(newVal, currentVal, attr); - - // If this is a change (not an initial set), mark the change. - // Note it's impossible to unset on the initial set (it will already be unset), - // so we only include that logic here. - if (!initial) { - this._changed[attr] = newVal; - this._previousAttributes[attr] = currentVal; - if (unset) { - // FIXME delete is very slow. Can we get away with setting to undefined? - delete this._values[attr]; - } - if (!silent) { - changeEvents.push({prev: currentVal, val: newVal, key: attr}); - } - } - if (!unset) { - this._values[attr] = newVal; - } - } else { - // Not changed - // FIXME delete is very slow. Can we get away with setting to undefined? - delete this._changed[attr]; - } - } - - // Fire events. This array is not populated if we are told to be silent. - if (changeEvents.length) this._pending = true; - changeEvents.forEach(function (change) { - self.trigger('change:' + change.key, self, change.val, options); - }); - - // You might be wondering why there's a `while` loop here. Changes can - // be recursively nested within `"change"` events. - if (wasChanging) return this; - while (this._pending) { - this._pending = false; - this.trigger('change', this, options); - } - this._pending = false; - this._changing = false; - return this; - }, - - get: function (attr) { - return this[attr]; - }, - - // Toggle boolean properties or properties that have a `values` - // array in its definition. - toggle: function (property) { - var def = this._definition[property]; - if (def.type === 'boolean') { - // if it's a bool, just flip it - this[property] = !this[property]; - } else if (def && def.values) { - // If it's a property with an array of values - // skip to the next one looping back if at end. - this[property] = arrayNext(def.values, this[property]); - } else { - throw new TypeError('Can only toggle properties that are type `boolean` or have `values` array.'); - } - return this; - }, - - // Get all of the attributes of the model at the time of the previous - // `"change"` event. - previousAttributes: function () { - return cloneObj(this._previousAttributes); - }, - - // Determine if the model has changed since the last `"change"` event. - // If you specify an attribute name, determine if that attribute has changed. - hasChanged: function (attr) { - if (attr == null) return !!Object.keys(this._changed).length; - if (has(this._derived, attr)) { - return this._derived[attr].depList.some(function (dep) { - return this.hasChanged(dep); - }, this); - } - return has(this._changed, attr); - }, - - // Return an object containing all the attributes that have changed, or - // false if there are no changed attributes. Useful for determining what - // parts of a view need to be updated and/or what attributes need to be - // persisted to the server. Unset attributes will be set to undefined. - // You can also pass an attributes object to diff against the model, - // determining if there *would be* a change. - changedAttributes: function (diff) { - if (!diff) return this.hasChanged() ? cloneObj(this._changed) : false; - var val, changed = false; - var old = this._changing ? this._previousAttributes : this.attributes; - var def, isEqual; - for (var attr in diff) { - def = this._definition[attr]; - if (!def) continue; - isEqual = this._getCompareForType(def.type); - if (isEqual(old[attr], (val = diff[attr]))) continue; - (changed || (changed = {}))[attr] = val; - } - return changed; - }, - - toJSON: function () { - return this.serialize(); - }, - - unset: function (attrs, options) { - var self = this; - attrs = Array.isArray(attrs) ? attrs : [attrs]; - attrs.forEach(function (key) { - var def = self._definition[key]; - if (!def) return; - var val; - if (def.required) { - val = result(def, 'default'); - return self.set(key, val, options); - } else { - return self.set(key, val, assign({}, options, {unset: true})); - } - }); - }, - - clear: function (options) { - var self = this; - Object.keys(this.attributes).forEach(function (key) { - self.unset(key, options); - }); - return this; - }, - - previous: function (attr) { - if (attr == null || !Object.keys(this._previousAttributes).length) return null; - return this._previousAttributes[attr]; - }, - - // Get default values for a certain type - _getDefaultForType: function (type) { - var dataType = this._dataTypes[type]; - return dataType && dataType['default']; - }, - - // Determine which comparison algorithm to use for comparing a property - _getCompareForType: function (type) { - var dataType = this._dataTypes[type]; - if (dataType && dataType.compare) return bind(dataType.compare, this); - return _isEqual; // if no compare function is defined, use _.isEqual - }, - - _getOnChangeForType : function(type){ - var dataType = this._dataTypes[type]; - if (dataType && dataType.onChange) return bind(dataType.onChange, this); - return noop; - }, - - // Run validation against the next complete set of model attributes, - // returning `true` if all is well. Otherwise, fire an `"invalid"` event. - _validate: function (attrs, options) { - if (!options.validate || !this.validate) return true; - attrs = assign({}, this.attributes, attrs); - var error = this.validationError = this.validate(attrs, options) || null; - if (!error) return true; - this.trigger('invalid', this, error, assign(options || {}, {validationError: error})); - return false; - }, - - _createPropertyDefinition: function (name, desc, isSession) { - return createPropertyDefinition(this, name, desc, isSession); - }, - - // just makes friendlier errors when trying to define a new model - // only used when setting up original property definitions - _ensureValidType: function (type) { - return includes(['string', 'number', 'boolean', 'array', 'object', 'date', 'state', 'any'] - .concat(Object.keys(this._dataTypes)), type) ? type : undefined; - }, - - getAttributes: function (options, raw) { - options = assign({ - session: false, - props: false, - derived: false - }, options || {}); - var res = {}; - var val, def; - for (var item in this._definition) { - def = this._definition[item]; - if ((options.session && def.session) || (options.props && !def.session)) { - val = raw ? this._values[item] : this[item]; - if (raw && val && isFunction(val.serialize)) val = val.serialize(); - if (typeof val === 'undefined') val = result(def, 'default'); - if (typeof val !== 'undefined') res[item] = val; - } - } - if (options.derived) { - for (var derivedItem in this._derived) res[derivedItem] = this[derivedItem]; - } - return res; - }, - - _initDerived: function () { - var self = this; - - forOwn(this._derived, function (value, name) { - var def = self._derived[name]; - def.deps = def.depList; - - var update = function (options) { - options = options || {}; - - var newVal = def.fn.call(self); - - if (self._cache[name] !== newVal || !def.cache) { - if (def.cache) { - self._previousAttributes[name] = self._cache[name]; - } - self._cache[name] = newVal; - self.trigger('change:' + name, self, self._cache[name]); - } - }; - - def.deps.forEach(function (propString) { - self._keyTree.add(propString, update); - }); - }); - - this.on('all', function (eventName) { - if (changeRE.test(eventName)) { - self._keyTree.get(eventName.split(':')[1]).forEach(function (fn) { - fn(); - }); - } - }, this); - }, - - _getDerivedProperty: function (name, flushCache) { - // is this a derived property that is cached - if (this._derived[name].cache) { - //set if this is the first time, or flushCache is set - if (flushCache || !this._cache.hasOwnProperty(name)) { - this._cache[name] = this._derived[name].fn.apply(this); - } - return this._cache[name]; - } else { - return this._derived[name].fn.apply(this); - } - }, - - _initCollections: function () { - var coll; - if (!this._collections) return; - for (coll in this._collections) { - this._safeSet(coll, new this._collections[coll](null, {parent: this})); - } - }, - - _initChildren: function () { - var child; - if (!this._children) return; - for (child in this._children) { - this._safeSet(child, new this._children[child]({}, {parent: this})); - this.listenTo(this[child], 'all', this._getEventBubblingHandler(child)); - } - }, - - // Returns a bound handler for doing event bubbling while - // adding a name to the change string. - _getEventBubblingHandler: function (propertyName) { - return bind(function (name, model, newValue) { - if (changeRE.test(name)) { - this.trigger('change:' + propertyName + '.' + name.split(':')[1], model, newValue); - } else if (name === 'change') { - this.trigger('change', this); - } - }, this); - }, - - // Check that all required attributes are present - _verifyRequired: function () { - var attrs = this.attributes; // should include session - for (var def in this._definition) { - if (this._definition[def].required && typeof attrs[def] === 'undefined') { - return false; - } - } - return true; - }, - - // expose safeSet method - _safeSet: function safeSet(property, value) { - if (property in this) { - throw new Error('Encountered namespace collision while setting instance property `' + property + '`'); - } - this[property] = value; - return this; - } -}); - -// getter for attributes -Object.defineProperties(Base.prototype, { - attributes: { - get: function () { - return this.getAttributes({props: true, session: true}); - } - }, - all: { - get: function () { - return this.getAttributes({ - session: true, - props: true, - derived: true - }); - } - }, - isState: { - get: function () { return true; }, - set: function () { } - } -}); - -// helper for creating/storing property definitions and creating -// appropriate getters/setters -function createPropertyDefinition(object, name, desc, isSession) { - var def = object._definition[name] = {}; - var type, descArray; - - if (isString(desc)) { - // grab our type if all we've got is a string - type = object._ensureValidType(desc); - if (type) def.type = type; - } else { - //Transform array of ['type', required, default] to object form - if (Array.isArray(desc)) { - descArray = desc; - desc = { - type: descArray[0], - required: descArray[1], - 'default': descArray[2] - }; - } - - type = object._ensureValidType(desc.type); - if (type) def.type = type; - - if (desc.required) def.required = true; - - if (desc['default'] && typeof desc['default'] === 'object') { - throw new TypeError('The default value for ' + name + ' cannot be an object/array, must be a value or a function which returns a value/object/array'); - } - - def['default'] = desc['default']; - - def.allowNull = desc.allowNull ? desc.allowNull : false; - if (desc.setOnce) def.setOnce = true; - if (def.required && def['default'] === undefined && !def.setOnce) def['default'] = object._getDefaultForType(type); - def.test = desc.test; - def.values = desc.values; - } - if (isSession) def.session = true; - - if (!type) { - type = isString(desc) ? desc : desc.type; - // TODO: start throwing a TypeError in future major versions instead of warning - console.warn('Invalid data type of `' + type + '` for `' + name + '` property. Use one of the default types or define your own'); - } - - // define a getter/setter on the prototype - // but they get/set on the instance - Object.defineProperty(object, name, { - set: function (val) { - this.set(name, val); - }, - get: function () { - if (!this._values) { - throw Error('You may be trying to `extend` a state object with "' + name + '" which has been defined in `props` on the object being extended'); - } - var value = this._values[name]; - var typeDef = this._dataTypes[def.type]; - if (typeof value !== 'undefined') { - if (typeDef && typeDef.get) { - value = typeDef.get(value); - } - return value; - } - var defaultValue = result(def, 'default'); - this._values[name] = defaultValue; - // If we've set a defaultValue, fire a change handler effectively marking - // its change from undefined to the default value. - if (typeof defaultValue !== 'undefined') { - var onChange = this._getOnChangeForType(def.type); - onChange(defaultValue, value, name); - } - return defaultValue; - } - }); - - return def; -} - -// helper for creating derived property definitions -function createDerivedProperty(modelProto, name, definition) { - var def = modelProto._derived[name] = { - fn: isFunction(definition) ? definition : definition.fn, - cache: (definition.cache !== false), - depList: definition.deps || [] - }; - - // add to our shared dependency list - def.depList.forEach(function (dep) { - modelProto._deps[dep] = union(modelProto._deps[dep] || [], [name]); - }); - - // defined a top-level getter for derived names - Object.defineProperty(modelProto, name, { - get: function () { - return this._getDerivedProperty(name); - }, - set: function () { - throw new TypeError("`" + name + "` is a derived property, it can't be set directly."); - } - }); -} - -var dataTypes = { - string: { - 'default': function () { - return ''; - } - }, - date: { - set: function (newVal) { - var newType; - if (newVal == null) { - newType = typeof null; - } else if (!isDate(newVal)) { - var err = null; - var dateVal = new Date(newVal).valueOf(); - if (isNaN(dateVal)) { - // If the newVal cant be parsed, then try parseInt first - dateVal = new Date(parseInt(newVal, 10)).valueOf(); - if (isNaN(dateVal)) err = true; - } - newVal = dateVal; - newType = 'date'; - if (err) { - newType = typeof newVal; - } - } else { - newType = 'date'; - newVal = newVal.valueOf(); - } - - return { - val: newVal, - type: newType - }; - }, - get: function (val) { - if (val == null) { return val; } - return new Date(val); - }, - 'default': function () { - return new Date(); - } - }, - array: { - set: function (newVal) { - return { - val: newVal, - type: Array.isArray(newVal) ? 'array' : typeof newVal - }; - }, - 'default': function () { - return []; - } - }, - object: { - set: function (newVal) { - var newType = typeof newVal; - // we have to have a way of supporting "missing" objects. - // Null is an object, but setting a value to undefined - // should work too, IMO. We just override it, in that case. - if (newType !== 'object' && newVal === undefined) { - newVal = null; - newType = 'object'; - } - return { - val: newVal, - type: newType - }; - }, - 'default': function () { - return {}; - } - }, - // the `state` data type is a bit special in that setting it should - // also bubble events - state: { - set: function (newVal) { - var isInstance = newVal instanceof Base || (newVal && newVal.isState); - if (isInstance) { - return { - val: newVal, - type: 'state' - }; - } else { - return { - val: newVal, - type: typeof newVal - }; - } - }, - compare: function (currentVal, newVal) { - return currentVal === newVal; - }, - - onChange : function(newVal, previousVal, attributeName){ - // if this has changed we want to also handle - // event propagation - if (previousVal) { - this.stopListening(previousVal); - } - - if (newVal != null) { - this.listenTo(newVal, 'all', this._getEventBubblingHandler(attributeName)); - } - } - } -}; - -// the extend method used to extend prototypes, maintain inheritance chains for instanceof -// and allow for additions to the model definitions. -function extend(protoProps) { - /*jshint validthis:true*/ - var parent = this; - var child; - - // The constructor function for the new subclass is either defined by you - // (the "constructor" property in your `extend` definition), or defaulted - // by us to simply call the parent's constructor. - if (protoProps && protoProps.hasOwnProperty('constructor')) { - child = protoProps.constructor; - } else { - child = function () { - return parent.apply(this, arguments); - }; - } - - // Add static properties to the constructor function from parent - assign(child, parent); - - // Set the prototype chain to inherit from `parent`, without calling - // `parent`'s constructor function. - var Surrogate = function () { this.constructor = child; }; - Surrogate.prototype = parent.prototype; - child.prototype = new Surrogate(); - - // set prototype level objects - child.prototype._derived = assign({}, parent.prototype._derived); - child.prototype._deps = assign({}, parent.prototype._deps); - child.prototype._definition = assign({}, parent.prototype._definition); - child.prototype._collections = assign({}, parent.prototype._collections); - child.prototype._children = assign({}, parent.prototype._children); - child.prototype._dataTypes = assign({}, parent.prototype._dataTypes || dataTypes); - - // Mix in all prototype properties to the subclass if supplied. - if (protoProps) { - var omitFromExtend = [ - 'dataTypes', 'props', 'session', 'derived', 'collections', 'children' - ]; - for(var i = 0; i < arguments.length; i++) { - var def = arguments[i]; - if (def.dataTypes) { - forOwn(def.dataTypes, function (def, name) { - child.prototype._dataTypes[name] = def; - }); - } - if (def.props) { - forOwn(def.props, function (def, name) { - createPropertyDefinition(child.prototype, name, def); - }); - } - if (def.session) { - forOwn(def.session, function (def, name) { - createPropertyDefinition(child.prototype, name, def, true); - }); - } - if (def.derived) { - forOwn(def.derived, function (def, name) { - createDerivedProperty(child.prototype, name, def); - }); - } - if (def.collections) { - forOwn(def.collections, function (constructor, name) { - child.prototype._collections[name] = constructor; - }); - } - if (def.children) { - forOwn(def.children, function (constructor, name) { - child.prototype._children[name] = constructor; - }); - } - assign(child.prototype, omit(def, omitFromExtend)); - } - } - - // Set a convenience property in case the parent's prototype is needed - // later. - child.__super__ = parent.prototype; - - return child; -} - -Base.extend = extend; - -// Our main exports -module.exports = Base; - -},{"ampersand-events":21,"array-next":27,"key-tree-store":40,"lodash.assign":71,"lodash.bind":73,"lodash.escape":75,"lodash.forown":79,"lodash.has":80,"lodash.includes":81,"lodash.isdate":85,"lodash.isequal":87,"lodash.isfunction":88,"lodash.isobject":89,"lodash.isstring":90,"lodash.omit":95,"lodash.result":100,"lodash.union":101,"lodash.uniqueid":102}],25:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-subcollection"] = window.ampersand["ampersand-subcollection"] || []; window.ampersand["ampersand-subcollection"].push("1.5.0");} -var _ = require('underscore'); -var Events = require('backbone-events-standalone'); -var classExtend = require('ampersand-class-extend'); -var underscoreMixins = require('ampersand-collection-underscore-mixin'); -var slice = Array.prototype.slice; - - -function SubCollection(collection, spec) { - spec || (spec = {}); - this.collection = collection; - this._reset(); - this._watched = spec.watched || []; - this._parseFilters(spec); - this._runFilters(); - this.listenTo(this.collection, 'all', this._onCollectionEvent); -} - - -_.extend(SubCollection.prototype, Events, underscoreMixins, { - // add a filter function directly - addFilter: function (filter) { - this.swapFilters([filter], []); - }, - - // remove filter function directly - removeFilter: function (filter) { - this.swapFilters([], [filter]); - }, - - // clears filters fires events for changes - clearFilters: function () { - this._reset(); - this._runFilters(); - }, - - // Swap out a set of old filters with a set of - // new filters - swapFilters: function (newFilters, oldFilters) { - var self = this; - - if (!oldFilters) { - oldFilters = this._filters; - } else if (!_.isArray(oldFilters)) { - oldFilters = [oldFilters]; - } - - if (!newFilters) { - newFilters = []; - } else if (!_.isArray(newFilters)) { - newFilters = [newFilters]; - } - - oldFilters.forEach(function (filter) { - self._removeFilter(filter); - }); - - newFilters.forEach(function (filter) { - self._addFilter(filter); - }); - - this._runFilters(); - }, - - // Update sub collection config, if `clear` - // then clear existing filters before start. - // This takes all the same filter arguments - // as the init function. So you can pass: - // { - // where: { - // name: 'something' - // }, - // limit: 20 - // } - configure: function (opts, clear) { - if (clear) this._resetFilters(); - this._parseFilters(opts); - this._runFilters(); - }, - - // gets a model at a given index - at: function (index) { - return this.models[index]; - }, - - // proxy `get` method to the underlying collection - get: function (query, indexName) { - var model = this.collection.get(query, indexName); - if (model && this.contains(model)) return model; - }, - - // remove filter if found - _removeFilter: function (filter) { - var index = this._filters.indexOf(filter); - if (index !== -1) { - this._filters.splice(index, 1); - } - }, - - // clear all filters, reset everything - _reset: function () { - this.models = []; - this._resetFilters(); - }, - - // just reset filters, no model changes - _resetFilters: function () { - this._filters = []; - this._watched = []; - this.limit = undefined; - this.offset = undefined; - }, - - // internal method registering new filter function - _addFilter: function (filter) { - this._filters.push(filter); - }, - - // adds a property or array of properties to watch, ensures uniquness. - _watch: function (item) { - this._watched = _.union(this._watched, _.isArray(item) ? item : [item]); - }, - - // removes a watched property - _unwatch: function (item) { - this._watched = _.without(this._watched, item); - }, - - _parseFilters: function (spec) { - if (spec.where) { - _.each(spec.where, function (value, item) { - this._addFilter(function (model) { - return (model.get ? model.get(item) : model[item]) === value; - }); - }, this); - // also make sure we watch all `where` keys - this._watch(_.keys(spec.where)); - } - if (spec.hasOwnProperty('limit')) this.limit = spec.limit; - if (spec.hasOwnProperty('offset')) this.offset = spec.offset; - if (spec.filter) { - this._addFilter(spec.filter, false); - } - if (spec.filters) { - spec.filters.forEach(this._addFilter, this); - } - if (spec.comparator) { - this.comparator = spec.comparator; - } - }, - - _runFilters: function () { - // make a copy of the array for comparisons - var existingModels = slice.call(this.models); - var rootModels = slice.call(this.collection.models); - var offset = (this.offset || 0); - var newModels, toAdd, toRemove; - - // reduce base model set by applying filters - if (this._filters.length) { - newModels = _.reduce(this._filters, function (startingArray, filterFunc) { - return startingArray.filter(filterFunc); - }, rootModels); - } else { - newModels = slice.call(rootModels); - } - - // sort it - if (this.comparator) newModels = _.sortBy(newModels, this.comparator); - - // trim it to length - if (this.limit || this.offset) newModels = newModels.slice(offset, this.limit + offset); - - // now we've got our new models time to compare - toAdd = _.difference(newModels, existingModels); - toRemove = _.difference(existingModels, newModels); - - // save 'em - this.models = newModels; - - _.each(toRemove, function (model) { - this.trigger('remove', model, this); - }, this); - - _.each(toAdd, function (model) { - this.trigger('add', model, this); - }, this); - - // if they contain the same models, but in new order, trigger sort - if (!_.isEqual(existingModels, newModels)) { - this.trigger('sort', this); - } - }, - - _onCollectionEvent: function (eventName, model) { - // conditions under which we should re-run filters - if (_.contains(this._watched, eventName.split(':')[1]) || _.contains(['add', 'remove', 'reset', 'sync'], eventName)) { - this._runFilters(); - } - // conditions under which we should proxy the events - if ((_.contains(['sync', 'invalid', 'destroy']) || eventName.indexOf('change') !== -1) && this.contains(model)) { - this.trigger.apply(this, arguments); - } - } -}); - -Object.defineProperty(SubCollection.prototype, 'length', { - get: function () { - return this.models.length; - } -}); - -Object.defineProperty(SubCollection.prototype, 'isCollection', { - get: function () { - return true; - } -}); - -SubCollection.extend = classExtend; - -module.exports = SubCollection; - -},{"ampersand-class-extend":15,"ampersand-collection-underscore-mixin":16,"backbone-events-standalone":29,"underscore":175}],26:[function(require,module,exports){ -;if (typeof window !== "undefined") { window.ampersand = window.ampersand || {}; window.ampersand["ampersand-view"] = window.ampersand["ampersand-view"] || []; window.ampersand["ampersand-view"].push("7.4.2");} -var State = require('ampersand-state'); -var CollectionView = require('ampersand-collection-view'); -var domify = require('domify'); -var uniqueId = require("lodash.uniqueid"); -var pick = require("lodash.pick"); -var assign = require("lodash.assign"); -var forEach = require("lodash.foreach"); -var result = require("lodash.result"); -var last = require("lodash.last"); -var isString = require("lodash.isstring"); -var bind = require("lodash.bind"); -var flatten = require("lodash.flatten"); -var invoke = require("lodash.invoke"); -var events = require('events-mixin'); -var matches = require('matches-selector'); -var bindings = require('ampersand-dom-bindings'); -var getPath = require('get-object-path'); - - -function View(attrs) { - this.cid = uniqueId('view'); - attrs || (attrs = {}); - var parent = attrs.parent; - delete attrs.parent; - BaseState.call(this, attrs, {init: false, parent: parent}); - this.on('change:el', this._handleElementChange, this); - this._parsedBindings = bindings(this.bindings, this); - this._initializeBindings(); - if (attrs.el && !this.autoRender) { - this._handleElementChange(); - } - this._initializeSubviews(); - this.template = attrs.template || this.template; - this.initialize.apply(this, arguments); - this.set(pick(attrs, viewOptions)); - if (this.autoRender && this.template) { - this.render(); - } -} - -var BaseState = State.extend({ - dataTypes: { - element: { - set: function (newVal) { - return { - val: newVal, - type: newVal instanceof Element ? 'element' : typeof newVal - }; - }, - compare: function (el1, el2) { - return el1 === el2; - } - }, - collection: { - set: function (newVal) { - return { - val: newVal, - type: newVal && newVal.isCollection ? 'collection' : typeof newVal - }; - }, - compare: function (currentVal, newVal) { - return currentVal === newVal; - } - } - }, - props: { - model: 'state', - el: 'element', - collection: 'collection' - }, - derived: { - rendered: { - deps: ['el'], - fn: function () { - return !!this.el; - } - }, - hasData: { - deps: ['model'], - fn: function () { - return !!this.model; - } - } - } -}); - -// Cached regex to split keys for `delegate`. -var delegateEventSplitter = /^(\S+)\s*(.*)$/; - -// List of view options to be merged as properties. -var viewOptions = ['model', 'collection', 'el']; - -View.prototype = Object.create(BaseState.prototype); - -// Set up all inheritable properties and methods. -assign(View.prototype, { - // ## query - // Get an single element based on CSS selector scoped to this.el - // if you pass an empty string it return `this.el`. - // If you pass an element we just return it back. - // This lets us use `get` to handle cases where users - // can pass a selector or an already selected element. - query: function (selector) { - if (!selector) return this.el; - if (typeof selector === 'string') { - if (matches(this.el, selector)) return this.el; - return this.el.querySelector(selector) || undefined; - } - return selector; - }, - - // ## queryAll - // Returns an array of elements based on CSS selector scoped to this.el - // if you pass an empty string it return `this.el`. Also includes root - // element. - queryAll: function (selector) { - var res = []; - if (!this.el) return res; - if (selector === '') return [this.el]; - if (matches(this.el, selector)) res.push(this.el); - return res.concat(Array.prototype.slice.call(this.el.querySelectorAll(selector))); - }, - - // ## queryByHook - // Convenience method for fetching element by it's `data-hook` attribute. - // Also tries to match against root element. - // Also supports matching 'one' of several space separated hooks. - queryByHook: function (hook) { - return this.query('[data-hook~="' + hook + '"]'); - }, - - // ## queryAllByHook - // Convenience method for fetching all elements by their's `data-hook` attribute. - queryAllByHook: function (hook) { - return this.queryAll('[data-hook~="' + hook + '"]'); - }, - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function () {}, - - // **render** is the core function that your view can override, its job is - // to populate its element (`this.el`), with the appropriate HTML. - render: function () { - this.renderWithTemplate(this); - return this; - }, - - // Remove this view by taking the element out of the DOM, and removing any - // applicable events listeners. - remove: function () { - var parsedBindings = this._parsedBindings; - if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); - if (this._subviews) invoke(flatten(this._subviews), 'remove'); - this.trigger('remove', this); - this.stopListening(); - // TODO: Not sure if this is actually necessary. - // Just trying to de-reference this potentially large - // amount of generated functions to avoid memory leaks. - forEach(parsedBindings, function (properties, modelName) { - forEach(properties, function (value, key) { - delete parsedBindings[modelName][key]; - }); - delete parsedBindings[modelName]; - }); - return this; - }, - - // Change the view's element (`this.el` property), including event - // re-delegation. - _handleElementChange: function (element, delegate) { - if (this.eventManager) this.eventManager.unbind(); - this.eventManager = events(this.el, this); - this.delegateEvents(); - this._applyBindingsForKey(); - return this; - }, - - // Set callbacks, where `this.events` is a hash of - // - // *{"event selector": "callback"}* - // - // { - // 'mousedown .title': 'edit', - // 'click .button': 'save', - // 'click .open': function (e) { ... } - // } - // - // pairs. Callbacks will be bound to the view, with `this` set properly. - // Uses event delegation for efficiency. - // Omitting the selector binds the event to `this.el`. - // This only works for delegate-able events: not `focus`, `blur`, and - // not `change`, `submit`, and `reset` in Internet Explorer. - delegateEvents: function (events) { - if (!(events || (events = result(this, 'events')))) return this; - this.undelegateEvents(); - for (var key in events) { - this.eventManager.bind(key, events[key]); - } - return this; - }, - - // Clears all callbacks previously bound to the view with `delegateEvents`. - // You usually don't need to use this, but may wish to if you have multiple - // Backbone views attached to the same DOM element. - undelegateEvents: function () { - this.eventManager.unbind(); - return this; - }, - - // ## registerSubview - // Pass it a view. This can be anything with a `remove` method - registerSubview: function (view) { - // Storage for our subviews. - this._subviews || (this._subviews = []); - this._subviews.push(view); - // set the parent reference if it has not been set - if (!view.parent) view.parent = this; - return view; - }, - - // ## renderSubview - // Pass it a view instance and a container element - // to render it in. It's `remove` method will be called - // when the parent view is destroyed. - renderSubview: function (view, container) { - if (typeof container === 'string') { - container = this.query(container); - } - this.registerSubview(view); - view.render(); - (container || this.el).appendChild(view.el); - return view; - }, - - _applyBindingsForKey: function (name) { - if (!this.el) return; - var fns = this._parsedBindings.getGrouped(name); - var item; - for (item in fns) { - fns[item].forEach(function (fn) { - fn(this.el, getPath(this, item), last(item.split('.'))); - }, this); - } - }, - - _initializeBindings: function () { - if (!this.bindings) return; - this.on('all', function (eventName) { - if (eventName.slice(0, 7) === 'change:') { - this._applyBindingsForKey(eventName.split(':')[1]); - } - }, this); - }, - - // ## _initializeSubviews - // this is called at setup and grabs declared subviews - _initializeSubviews: function () { - if (!this.subviews) return; - for (var item in this.subviews) { - this._parseSubview(this.subviews[item], item); - } - }, - - // ## _parseSubview - // helper for parsing out the subview declaration and registering - // the `waitFor` if need be. - _parseSubview: function (subview, name) { - var self = this; - var opts = { - selector: subview.container || '[data-hook="' + subview.hook + '"]', - waitFor: subview.waitFor || '', - prepareView: subview.prepareView || function (el) { - return new subview.constructor({ - el: el, - parent: self - }); - } - }; - function action() { - var el, subview; - // if not rendered or we can't find our element, stop here. - if (!this.el || !(el = this.query(opts.selector))) return; - if (!opts.waitFor || getPath(this, opts.waitFor)) { - subview = this[name] = opts.prepareView.call(this, el); - subview.render(); - this.registerSubview(subview); - this.off('change', action); - } - } - // we listen for main `change` items - this.on('change', action, this); - }, - - - // Shortcut for doing everything we need to do to - // render and fully replace current root element. - // Either define a `template` property of your view - // or pass in a template directly. - // The template can either be a string or a function. - // If it's a function it will be passed the `context` - // argument. - renderWithTemplate: function (context, templateArg) { - var template = templateArg || this.template; - if (!template) throw new Error('Template string or function needed.'); - var newDom = isString(template) ? template : template.call(this, context || this); - if (isString(newDom)) newDom = domify(newDom); - var parent = this.el && this.el.parentNode; - if (parent) parent.replaceChild(newDom, this.el); - if (newDom.nodeName === '#document-fragment') throw new Error('Views can only have one root element, including comment nodes.'); - this.el = newDom; - return this; - }, - - // ## cacheElements - // This is a shortcut for adding reference to specific elements within your view for - // access later. This avoids excessive DOM queries and makes it easier to update - // your view if your template changes. - // - // In your `render` method. Use it like so: - // - // render: function () { - // this.basicRender(); - // this.cacheElements({ - // pages: '#pages', - // chat: '#teamChat', - // nav: 'nav#views ul', - // me: '#me', - // cheatSheet: '#cheatSheet', - // omniBox: '#awesomeSauce' - // }); - // } - // - // Then later you can access elements by reference like so: `this.pages`, or `this.chat`. - cacheElements: function (hash) { - for (var item in hash) { - this[item] = this.query(hash[item]); - } - return this; - }, - - // ## listenToAndRun - // Shortcut for registering a listener for a model - // and also triggering it right away. - listenToAndRun: function (object, events, handler) { - var bound = bind(handler, this); - this.listenTo(object, events, bound); - bound(); - }, - - // ## animateRemove - // Placeholder for if you want to do something special when they're removed. - // For example fade it out, etc. - // Any override here should call `.remove()` when done. - animateRemove: function () { - this.remove(); - }, - - // ## renderCollection - // Method for rendering a collections with individual views. - // Just pass it the collection, and the view to use for the items in the - // collection. The collectionView is returned. - renderCollection: function (collection, ViewClass, container, opts) { - var containerEl = (typeof container === 'string') ? this.query(container) : container; - var config = assign({ - collection: collection, - el: containerEl || this.el, - view: ViewClass, - parent: this, - viewOptions: { - parent: this - } - }, opts); - var collectionView = new CollectionView(config); - collectionView.render(); - return this.registerSubview(collectionView); - } -}); - -View.extend = BaseState.extend; -module.exports = View; - -},{"ampersand-collection-view":17,"ampersand-dom-bindings":19,"ampersand-state":24,"domify":36,"events-mixin":37,"get-object-path":38,"lodash.assign":71,"lodash.bind":73,"lodash.flatten":77,"lodash.foreach":78,"lodash.invoke":82,"lodash.isstring":90,"lodash.last":94,"lodash.pick":98,"lodash.result":100,"lodash.uniqueid":102,"matches-selector":174}],27:[function(require,module,exports){ -module.exports = function arrayNext(array, currentItem) { - var len = array.length; - var newIndex = array.indexOf(currentItem) + 1; - if (newIndex > (len - 1)) newIndex = 0; - return array[newIndex]; -}; - -},{}],28:[function(require,module,exports){ -/** - * Standalone extraction of Backbone.Events, no external dependency required. - * Degrades nicely when Backone/underscore are already available in the current - * global context. - * - * Note that docs suggest to use underscore's `_.extend()` method to add Events - * support to some given object. A `mixin()` method has been added to the Events - * prototype to avoid using underscore for that sole purpose: - * - * var myEventEmitter = BackboneEvents.mixin({}); - * - * Or for a function constructor: - * - * function MyConstructor(){} - * MyConstructor.prototype.foo = function(){} - * BackboneEvents.mixin(MyConstructor.prototype); - * - * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. - * (c) 2013 Nicolas Perriault - */ -/* global exports:true, define, module */ -(function() { - var root = this, - breaker = {}, - nativeForEach = Array.prototype.forEach, - hasOwnProperty = Object.prototype.hasOwnProperty, - slice = Array.prototype.slice, - idCounter = 0; - - // Returns a partial implementation matching the minimal API subset required - // by Backbone.Events - function miniscore() { - return { - keys: Object.keys, - - uniqueId: function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }, - - has: function(obj, key) { - return hasOwnProperty.call(obj, key); - }, - - each: function(obj, iterator, context) { - if (obj == null) return; - if (nativeForEach && obj.forEach === nativeForEach) { - obj.forEach(iterator, context); - } else if (obj.length === +obj.length) { - for (var i = 0, l = obj.length; i < l; i++) { - if (iterator.call(context, obj[i], i, obj) === breaker) return; - } - } else { - for (var key in obj) { - if (this.has(obj, key)) { - if (iterator.call(context, obj[key], key, obj) === breaker) return; - } - } - } - }, - - once: function(func) { - var ran = false, memo; - return function() { - if (ran) return memo; - ran = true; - memo = func.apply(this, arguments); - func = null; - return memo; - }; - } - }; - } - - var _ = miniscore(), Events; - - // Backbone.Events - // --------------- - - // A module that can be mixed in to *any object* in order to provide it with - // custom events. You may bind with `on` or remove with `off` callback - // functions to an event; `trigger`-ing an event fires all callbacks in - // succession. - // - // var object = {}; - // _.extend(object, Backbone.Events); - // object.on('expand', function(){ alert('expanded'); }); - // object.trigger('expand'); - // - Events = { - - // Bind an event to a `callback` function. Passing `"all"` will bind - // the callback to all events fired. - on: function(name, callback, context) { - if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; - this._events || (this._events = {}); - var events = this._events[name] || (this._events[name] = []); - events.push({callback: callback, context: context, ctx: context || this}); - return this; - }, - - // Bind an event to only be triggered a single time. After the first time - // the callback is invoked, it will be removed. - once: function(name, callback, context) { - if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; - var self = this; - var once = _.once(function() { - self.off(name, once); - callback.apply(this, arguments); - }); - once._callback = callback; - return this.on(name, once, context); - }, - - // Remove one or many callbacks. If `context` is null, removes all - // callbacks with that function. If `callback` is null, removes all - // callbacks for the event. If `name` is null, removes all bound - // callbacks for all events. - off: function(name, callback, context) { - var retain, ev, events, names, i, l, j, k; - if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; - if (!name && !callback && !context) { - this._events = {}; - return this; - } - - names = name ? [name] : _.keys(this._events); - for (i = 0, l = names.length; i < l; i++) { - name = names[i]; - if (events = this._events[name]) { - this._events[name] = retain = []; - if (callback || context) { - for (j = 0, k = events.length; j < k; j++) { - ev = events[j]; - if ((callback && callback !== ev.callback && callback !== ev.callback._callback) || - (context && context !== ev.context)) { - retain.push(ev); - } - } - } - if (!retain.length) delete this._events[name]; - } - } - - return this; - }, - - // Trigger one or many events, firing all bound callbacks. Callbacks are - // passed the same arguments as `trigger` is, apart from the event name - // (unless you're listening on `"all"`, which will cause your callback to - // receive the true name of the event as the first argument). - trigger: function(name) { - if (!this._events) return this; - var args = slice.call(arguments, 1); - if (!eventsApi(this, 'trigger', name, args)) return this; - var events = this._events[name]; - var allEvents = this._events.all; - if (events) triggerEvents(events, args); - if (allEvents) triggerEvents(allEvents, arguments); - return this; - }, - - // Tell this object to stop listening to either specific events ... or - // to every object it's currently listening to. - stopListening: function(obj, name, callback) { - var listeners = this._listeners; - if (!listeners) return this; - var deleteListener = !name && !callback; - if (typeof name === 'object') callback = this; - if (obj) (listeners = {})[obj._listenerId] = obj; - for (var id in listeners) { - listeners[id].off(name, callback, this); - if (deleteListener) delete this._listeners[id]; - } - return this; - } - - }; - - // Regular expression used to split event strings. - var eventSplitter = /\s+/; - - // Implement fancy features of the Events API such as multiple event - // names `"change blur"` and jQuery-style event maps `{change: action}` - // in terms of the existing API. - var eventsApi = function(obj, action, name, rest) { - if (!name) return true; - - // Handle event maps. - if (typeof name === 'object') { - for (var key in name) { - obj[action].apply(obj, [key, name[key]].concat(rest)); - } - return false; - } - - // Handle space separated event names. - if (eventSplitter.test(name)) { - var names = name.split(eventSplitter); - for (var i = 0, l = names.length; i < l; i++) { - obj[action].apply(obj, [names[i]].concat(rest)); - } - return false; - } - - return true; - }; - - // A difficult-to-believe, but optimized internal dispatch function for - // triggering events. Tries to keep the usual cases speedy (most internal - // Backbone events have 3 arguments). - var triggerEvents = function(events, args) { - var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; - switch (args.length) { - case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return; - case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return; - case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return; - case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return; - default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); - } - }; - - var listenMethods = {listenTo: 'on', listenToOnce: 'once'}; - - // Inversion-of-control versions of `on` and `once`. Tell *this* object to - // listen to an event in another object ... keeping track of what it's - // listening to. - _.each(listenMethods, function(implementation, method) { - Events[method] = function(obj, name, callback) { - var listeners = this._listeners || (this._listeners = {}); - var id = obj._listenerId || (obj._listenerId = _.uniqueId('l')); - listeners[id] = obj; - if (typeof name === 'object') callback = this; - obj[implementation](name, callback, this); - return this; - }; - }); - - // Aliases for backwards compatibility. - Events.bind = Events.on; - Events.unbind = Events.off; - - // Mixin utility - Events.mixin = function(proto) { - var exports = ['on', 'once', 'off', 'trigger', 'stopListening', 'listenTo', - 'listenToOnce', 'bind', 'unbind']; - _.each(exports, function(name) { - proto[name] = this[name]; - }, this); - return proto; - }; - - // Export Events as BackboneEvents depending on current context - if (typeof define === "function") { - define(function() { - return Events; - }); - } else if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = Events; - } - exports.BackboneEvents = Events; - } else { - root.BackboneEvents = Events; - } -})(this); - -},{}],29:[function(require,module,exports){ -module.exports = require('./backbone-events-standalone'); - -},{"./backbone-events-standalone":28}],30:[function(require,module,exports){ - -},{}],31:[function(require,module,exports){ -var matches = require('matches-selector') - -module.exports = function (element, selector, checkYoSelf) { - var parent = checkYoSelf ? element : element.parentNode - - while (parent && parent !== document) { - if (matches(parent, selector)) return parent; - parent = parent.parentNode - } -} - -},{"matches-selector":32}],32:[function(require,module,exports){ - -/** - * Element prototype. - */ - -var proto = Element.prototype; - -/** - * Vendor function. - */ - -var vendor = proto.matchesSelector - || proto.webkitMatchesSelector - || proto.mozMatchesSelector - || proto.msMatchesSelector - || proto.oMatchesSelector; - -/** - * Expose `match()`. - */ - -module.exports = match; - -/** - * Match `el` to `selector`. - * - * @param {Element} el - * @param {String} selector - * @return {Boolean} - * @api public - */ - -function match(el, selector) { - if (vendor) return vendor.call(el, selector); - var nodes = el.parentNode.querySelectorAll(selector); - for (var i = 0; i < nodes.length; ++i) { - if (nodes[i] == el) return true; - } - return false; -} -},{}],33:[function(require,module,exports){ -var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', - unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', - prefix = bind !== 'addEventListener' ? 'on' : ''; - -/** - * Bind `el` event `type` to `fn`. - * - * @param {Element} el - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @return {Function} - * @api public - */ - -exports.bind = function(el, type, fn, capture){ - el[bind](prefix + type, fn, capture || false); - return fn; -}; - -/** - * Unbind `el` event `type`'s callback `fn`. - * - * @param {Element} el - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @return {Function} - * @api public - */ - -exports.unbind = function(el, type, fn, capture){ - el[unbind](prefix + type, fn, capture || false); - return fn; -}; -},{}],34:[function(require,module,exports){ -/** - * Returns a function, that, as long as it continues to be invoked, will not - * be triggered. The function will be called after it stops being called for - * N milliseconds. If `immediate` is passed, trigger the function on the - * leading edge, instead of the trailing. The function also has a property 'clear' - * that is a function which will clear the timer to prevent previously scheduled executions. - * - * @source underscore.js - * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/ - * @param {Function} function to wrap - * @param {Number} timeout in ms (`100`) - * @param {Boolean} whether to execute at the beginning (`false`) - * @api public - */ - -module.exports = function debounce(func, wait, immediate){ - var timeout, args, context, timestamp, result; - if (null == wait) wait = 100; - - function later() { - var last = Date.now() - timestamp; - - if (last < wait && last >= 0) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - context = args = null; - } - } - }; - - var debounced = function(){ - context = this; - args = arguments; - timestamp = Date.now(); - var callNow = immediate && !timeout; - if (!timeout) timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - context = args = null; - } - - return result; - }; - - debounced.clear = function() { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - }; - - debounced.flush = function() { - if (timeout) { - result = func.apply(context, args); - context = args = null; - - clearTimeout(timeout); - timeout = null; - } - }; - - return debounced; -}; - -},{}],35:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var closest = require('closest') - , event = require('component-event'); - -/** - * Delegate event `type` to `selector` - * and invoke `fn(e)`. A callback function - * is returned which may be passed to `.unbind()`. - * - * @param {Element} el - * @param {String} selector - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @return {Function} - * @api public - */ - -// Some events don't bubble, so we want to bind to the capture phase instead -// when delegating. -var forceCaptureEvents = ['focus', 'blur']; - -exports.bind = function(el, selector, type, fn, capture){ - if (forceCaptureEvents.indexOf(type) !== -1) capture = true; - - return event.bind(el, type, function(e){ - var target = e.target || e.srcElement; - e.delegateTarget = closest(target, selector, true, el); - if (e.delegateTarget) { - console.log('delegate target', e.delegateTarget) - console.log('for event', e.type, e.key) - fn.call(el, e); - } - }, capture); -}; - -/** - * Unbind event `type`'s callback `fn`. - * - * @param {Element} el - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @api public - */ - -exports.unbind = function(el, type, fn, capture){ - if (forceCaptureEvents.indexOf(type) !== -1) capture = true; - - event.unbind(el, type, fn, capture); -}; - -},{"closest":31,"component-event":33}],36:[function(require,module,exports){ - -/** - * Expose `parse`. - */ - -module.exports = parse; - -/** - * Tests for browser support. - */ - -var innerHTMLBug = false; -var bugTestDiv; -if (typeof document !== 'undefined') { - bugTestDiv = document.createElement('div'); - // Setup - bugTestDiv.innerHTML = '
    a'; - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - innerHTMLBug = !bugTestDiv.getElementsByTagName('link').length; - bugTestDiv = undefined; -} - -/** - * Wrap map from jquery. - */ - -var map = { - legend: [1, '
    ', '
    '], - tr: [2, '', '
    '], - col: [2, '', '
    '], - // for script/link/style tags to work in IE6-8, you have to wrap - // in a div with a non-whitespace character in front, ha! - _default: innerHTMLBug ? [1, 'X
    ', '
    '] : [0, '', ''] -}; - -map.td = -map.th = [3, '', '
    ']; - -map.option = -map.optgroup = [1, '']; - -map.thead = -map.tbody = -map.colgroup = -map.caption = -map.tfoot = [1, '', '
    ']; - -map.polyline = -map.ellipse = -map.polygon = -map.circle = -map.text = -map.line = -map.path = -map.rect = -map.g = [1, '','']; - -/** - * Parse `html` and return a DOM Node instance, which could be a TextNode, - * HTML DOM Node of some kind (
    for example), or a DocumentFragment - * instance, depending on the contents of the `html` string. - * - * @param {String} html - HTML string to "domify" - * @param {Document} doc - The `document` instance to create the Node for - * @return {DOMNode} the TextNode, DOM Node, or DocumentFragment instance - * @api private - */ - -function parse(html, doc) { - if ('string' != typeof html) throw new TypeError('String expected'); - - // default to the global `document` object - if (!doc) doc = document; - - // tag name - var m = /<([\w:]+)/.exec(html); - if (!m) return doc.createTextNode(html); - - html = html.replace(/^\s+|\s+$/g, ''); // Remove leading/trailing whitespace - - var tag = m[1]; - - // body support - if (tag == 'body') { - var el = doc.createElement('html'); - el.innerHTML = html; - return el.removeChild(el.lastChild); - } - - // wrap map - var wrap = map[tag] || map._default; - var depth = wrap[0]; - var prefix = wrap[1]; - var suffix = wrap[2]; - var el = doc.createElement('div'); - el.innerHTML = prefix + html + suffix; - while (depth--) el = el.lastChild; - - // one element - if (el.firstChild == el.lastChild) { - return el.removeChild(el.firstChild); - } - - // several elements - var fragment = doc.createDocumentFragment(); - while (el.firstChild) { - fragment.appendChild(el.removeChild(el.firstChild)); - } - - return fragment; -} - -},{}],37:[function(require,module,exports){ - -/** - * Module dependencies. - */ - -var events = require('component-event'); -var delegate = require('delegate-events'); -var forceCaptureEvents = ['focus', 'blur']; - -/** - * Expose `Events`. - */ - -module.exports = Events; - -/** - * Initialize an `Events` with the given - * `el` object which events will be bound to, - * and the `obj` which will receive method calls. - * - * @param {Object} el - * @param {Object} obj - * @api public - */ - -function Events(el, obj) { - if (!(this instanceof Events)) return new Events(el, obj); - if (!el) throw new Error('element required'); - if (!obj) throw new Error('object required'); - this.el = el; - this.obj = obj; - this._events = {}; -} - -/** - * Subscription helper. - */ - -Events.prototype.sub = function(event, method, cb){ - this._events[event] = this._events[event] || {}; - this._events[event][method] = cb; -}; - -/** - * Bind to `event` with optional `method` name. - * When `method` is undefined it becomes `event` - * with the "on" prefix. - * - * Examples: - * - * Direct event handling: - * - * events.bind('click') // implies "onclick" - * events.bind('click', 'remove') - * events.bind('click', 'sort', 'asc') - * - * Delegated event handling: - * - * events.bind('click li > a') - * events.bind('click li > a', 'remove') - * events.bind('click a.sort-ascending', 'sort', 'asc') - * events.bind('click a.sort-descending', 'sort', 'desc') - * - * Multiple events handling: - * - * events.bind({ - * 'click .remove': 'remove', - * 'click .add': 'add' - * }); - * - * @param {String|object} - object is used for multiple binding, - * string for single event binding - * @param {String|function} [arg2] - method to call (optional) - * @param {*} [arg3] - data for single event binding (optional) - * @return {Function} callback - * @api public - */ - -Events.prototype.bind = function(arg1, arg2){ - var bindEvent = function(event, method) { - var e = parse(event); - var el = this.el; - var obj = this.obj; - var name = e.name; - var method = method || 'on' + name; - var args = [].slice.call(arguments, 2); - - // callback - function cb(){ - var a = [].slice.call(arguments).concat(args); - - if (typeof method === 'function') { - method.apply(obj, a); - return; - } - - if (!obj[method]) { - throw new Error(method + ' method is not defined'); - } else { - obj[method].apply(obj, a); - } - } - - // bind - if (e.selector) { - cb = delegate.bind(el, e.selector, name, cb); - } else { - events.bind(el, name, cb); - } - - // subscription for unbinding - this.sub(name, method, cb); - - return cb; - }; - - if (typeof arg1 == 'string') { - bindEvent.apply(this, arguments); - } else { - for(var key in arg1) { - if (arg1.hasOwnProperty(key)) { - bindEvent.call(this, key, arg1[key]); - } - } - } -}; - -/** - * Unbind a single binding, all bindings for `event`, - * or all bindings within the manager. - * - * Examples: - * - * Unbind direct handlers: - * - * events.unbind('click', 'remove') - * events.unbind('click') - * events.unbind() - * - * Unbind delegate handlers: - * - * events.unbind('click', 'remove') - * events.unbind('click') - * events.unbind() - * - * @param {String|Function} [event] - * @param {String|Function} [method] - * @api public - */ - -Events.prototype.unbind = function(event, method){ - if (0 == arguments.length) return this.unbindAll(); - if (1 == arguments.length) return this.unbindAllOf(event); - - // no bindings for this event - var bindings = this._events[event]; - var capture = (forceCaptureEvents.indexOf(event) !== -1); - if (!bindings) return; - - // no bindings for this method - var cb = bindings[method]; - if (!cb) return; - - events.unbind(this.el, event, cb, capture); -}; - -/** - * Unbind all events. - * - * @api private - */ - -Events.prototype.unbindAll = function(){ - for (var event in this._events) { - this.unbindAllOf(event); - } -}; - -/** - * Unbind all events for `event`. - * - * @param {String} event - * @api private - */ - -Events.prototype.unbindAllOf = function(event){ - var bindings = this._events[event]; - if (!bindings) return; - - for (var method in bindings) { - this.unbind(event, method); - } -}; - -/** - * Parse `event`. - * - * @param {String} event - * @return {Object} - * @api private - */ - -function parse(event) { - var parts = event.split(/ +/); - return { - name: parts.shift(), - selector: parts.join(' ') - } -} - -},{"component-event":33,"delegate-events":35}],38:[function(require,module,exports){ -module.exports = get; - -function get (context, path) { - if (path.indexOf('.') == -1 && path.indexOf('[') == -1) { - return context[path]; - } - - var crumbs = path.split(/\.|\[|\]/g); - var i = -1; - var len = crumbs.length; - var result; - - while (++i < len) { - if (i == 0) result = context; - if (!crumbs[i]) continue; - if (result == undefined) break; - result = result[crumbs[i]]; - } - - return result; -} - -},{}],39:[function(require,module,exports){ -(function (global){ -(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.jade = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o} escaped - * @return {String} - */ -exports.cls = function cls(classes, escaped) { - var buf = []; - for (var i = 0; i < classes.length; i++) { - if (escaped && escaped[i]) { - buf.push(exports.escape(joinClasses([classes[i]]))); - } else { - buf.push(joinClasses(classes[i])); - } - } - var text = joinClasses(buf); - if (text.length) { - return ' class="' + text + '"'; - } else { - return ''; - } -}; - - -exports.style = function (val) { - if (val && typeof val === 'object') { - return Object.keys(val).map(function (style) { - return style + ':' + val[style]; - }).join(';'); - } else { - return val; - } -}; -/** - * Render the given attribute. - * - * @param {String} key - * @param {String} val - * @param {Boolean} escaped - * @param {Boolean} terse - * @return {String} - */ -exports.attr = function attr(key, val, escaped, terse) { - if (key === 'style') { - val = exports.style(val); - } - if ('boolean' == typeof val || null == val) { - if (val) { - return ' ' + (terse ? key : key + '="' + key + '"'); - } else { - return ''; - } - } else if (0 == key.indexOf('data') && 'string' != typeof val) { - if (JSON.stringify(val).indexOf('&') !== -1) { - console.warn('Since Jade 2.0.0, ampersands (`&`) in data attributes ' + - 'will be escaped to `&`'); - }; - if (val && typeof val.toISOString === 'function') { - console.warn('Jade will eliminate the double quotes around dates in ' + - 'ISO form after 2.0.0'); - } - return ' ' + key + "='" + JSON.stringify(val).replace(/'/g, ''') + "'"; - } else if (escaped) { - if (val && typeof val.toISOString === 'function') { - console.warn('Jade will stringify dates in ISO form after 2.0.0'); - } - return ' ' + key + '="' + exports.escape(val) + '"'; - } else { - if (val && typeof val.toISOString === 'function') { - console.warn('Jade will stringify dates in ISO form after 2.0.0'); - } - return ' ' + key + '="' + val + '"'; - } -}; - -/** - * Render the given attributes object. - * - * @param {Object} obj - * @param {Object} escaped - * @return {String} - */ -exports.attrs = function attrs(obj, terse){ - var buf = []; - - var keys = Object.keys(obj); - - if (keys.length) { - for (var i = 0; i < keys.length; ++i) { - var key = keys[i] - , val = obj[key]; - - if ('class' == key) { - if (val = joinClasses(val)) { - buf.push(' ' + key + '="' + val + '"'); - } - } else { - buf.push(exports.attr(key, val, false, terse)); - } - } - } - - return buf.join(''); -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -var jade_encode_html_rules = { - '&': '&', - '<': '<', - '>': '>', - '"': '"' -}; -var jade_match_html = /[&<>"]/g; - -function jade_encode_char(c) { - return jade_encode_html_rules[c] || c; -} - -exports.escape = jade_escape; -function jade_escape(html){ - var result = String(html).replace(jade_match_html, jade_encode_char); - if (result === '' + html) return html; - else return result; -}; - -/** - * Re-throw the given `err` in context to the - * the jade in `filename` at the given `lineno`. - * - * @param {Error} err - * @param {String} filename - * @param {String} lineno - * @api private - */ - -exports.rethrow = function rethrow(err, filename, lineno, str){ - if (!(err instanceof Error)) throw err; - if ((typeof window != 'undefined' || !filename) && !str) { - err.message += ' on line ' + lineno; - throw err; - } - try { - str = str || require('fs').readFileSync(filename, 'utf8') - } catch (ex) { - rethrow(err, null, lineno) - } - var context = 3 - , lines = str.split('\n') - , start = Math.max(lineno - context, 0) - , end = Math.min(lines.length, lineno + context); - - // Error context - var context = lines.slice(start, end).map(function(line, i){ - var curr = i + start + 1; - return (curr == lineno ? ' > ' : ' ') - + curr - + '| ' - + line; - }).join('\n'); - - // Alter exception message - err.path = filename; - err.message = (filename || 'Jade') + ':' + lineno - + '\n' + context + '\n\n' + err.message; - throw err; -}; - -exports.DebugItem = function DebugItem(lineno, filename) { - this.lineno = lineno; - this.filename = filename; -} - -},{"fs":2}],2:[function(require,module,exports){ - -},{}]},{},[1])(1) -}); -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"fs":30}],40:[function(require,module,exports){ -var slice = Array.prototype.slice; - -// our constructor -function KeyTreeStore(options) { - options = options || {}; - if (typeof options !== 'object') { - throw new TypeError('Options must be an object'); - } - var DEFAULT_SEPARATOR = '.'; - - this.storage = {}; - this.separator = options.separator || DEFAULT_SEPARATOR; -} - -// add an object to the store -KeyTreeStore.prototype.add = function (keypath, obj) { - var arr = this.storage[keypath] || (this.storage[keypath] = []); - arr.push(obj); -}; - -// remove an object -KeyTreeStore.prototype.remove = function (obj) { - var path, arr; - for (path in this.storage) { - arr = this.storage[path]; - arr.some(function (item, index) { - if (item === obj) { - arr.splice(index, 1); - return true; - } - }); - } -}; - -// get array of all all relevant functions, without keys -KeyTreeStore.prototype.get = function (keypath) { - var res = []; - var key; - - for (key in this.storage) { - if (!keypath || keypath === key || key.indexOf(keypath + this.separator) === 0) { - res = res.concat(this.storage[key]); - } - } - - return res; -}; - -// get all results that match keypath but still grouped by key -KeyTreeStore.prototype.getGrouped = function (keypath) { - var res = {}; - var key; - - for (key in this.storage) { - if (!keypath || keypath === key || key.indexOf(keypath + this.separator) === 0) { - res[key] = slice.call(this.storage[key]); - } - } - - return res; -}; - -// get all results that match keypath but still grouped by key -KeyTreeStore.prototype.getAll = function (keypath) { - var res = {}; - var key; - - for (key in this.storage) { - if (keypath === key || key.indexOf(keypath + this.separator) === 0) { - res[key] = slice.call(this.storage[key]); - } - } - - return res; -}; - -// run all matches with optional context -KeyTreeStore.prototype.run = function (keypath, context) { - var args = slice.call(arguments, 2); - this.get(keypath).forEach(function (fn) { - fn.apply(context || this, args); - }); -}; - -module.exports = KeyTreeStore; - -},{}],41:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A specialized version of `_.forEach` for arrays without support for callback - * shorthands or `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; - -},{}],42:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A specialized version of `_.map` for arrays without support for callback - * shorthands or `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ -function arrayMap(array, iteratee) { - var index = -1, - length = array.length, - result = Array(length); - - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; -} - -module.exports = arrayMap; - -},{}],43:[function(require,module,exports){ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCopy = require('lodash._basecopy'), - keys = require('lodash.keys'); - -/** - * The base implementation of `_.assign` without support for argument juggling, - * multiple sources, and `customizer` functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. - */ -function baseAssign(object, source) { - return source == null - ? object - : baseCopy(source, keys(source), object); -} - -module.exports = baseAssign; - -},{"lodash._basecopy":45,"lodash.keys":92}],44:[function(require,module,exports){ -/** - * lodash 3.3.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseIsEqual = require('lodash._baseisequal'), - bindCallback = require('lodash._bindcallback'), - isArray = require('lodash.isarray'), - pairs = require('lodash.pairs'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - return value == null ? '' : (value + ''); -} - -/** - * The base implementation of `_.callback` which supports specifying the - * number of arguments to provide to `func`. - * - * @private - * @param {*} [func=_.identity] The value to convert to a callback. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function baseCallback(func, thisArg, argCount) { - var type = typeof func; - if (type == 'function') { - return thisArg === undefined - ? func - : bindCallback(func, thisArg, argCount); - } - if (func == null) { - return identity; - } - if (type == 'object') { - return baseMatches(func); - } - return thisArg === undefined - ? property(func) - : baseMatchesProperty(func, thisArg); -} - -/** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; - } - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[path[index++]]; - } - return (index && index == length) ? object : undefined; -} - -/** - * The base implementation of `_.isMatch` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to inspect. - * @param {Array} matchData The propery names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparing objects. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. - */ -function baseIsMatch(object, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = toObject(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var result = customizer ? customizer(objValue, srcValue, key) : undefined; - if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) { - return false; - } - } - } - return true; -} - -/** - * The base implementation of `_.matches` which does not clone `source`. - * - * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new function. - */ -function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - var key = matchData[0][0], - value = matchData[0][1]; - - return function(object) { - if (object == null) { - return false; - } - return object[key] === value && (value !== undefined || (key in toObject(object))); - }; - } - return function(object) { - return baseIsMatch(object, matchData); - }; -} - -/** - * The base implementation of `_.matchesProperty` which does not clone `srcValue`. - * - * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to compare. - * @returns {Function} Returns the new function. - */ -function baseMatchesProperty(path, srcValue) { - var isArr = isArray(path), - isCommon = isKey(path) && isStrictComparable(srcValue), - pathKey = (path + ''); - - path = toPath(path); - return function(object) { - if (object == null) { - return false; - } - var key = pathKey; - object = toObject(object); - if ((isArr || !isCommon) && !(key in object)) { - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - key = last(path); - object = toObject(object); - } - return object[key] === srcValue - ? (srcValue !== undefined || (key in object)) - : baseIsEqual(srcValue, object[key], undefined, true); - }; -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * A specialized version of `baseProperty` which supports deep paths. - * - * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - */ -function basePropertyDeep(path) { - var pathKey = (path + ''); - path = toPath(path); - return function(object) { - return baseGet(object, path, pathKey); - }; -} - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -/** - * Gets the propery names, values, and compare flags of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. - */ -function getMatchData(object) { - var result = pairs(object), - length = result.length; - - while (length--) { - result[length][2] = isStrictComparable(result[length][1]); - } - return result; -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -/** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. - */ -function isStrictComparable(value) { - return value === value && !isObject(value); -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ -function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -} - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -/** - * Creates a function that returns the property value at `path` on a - * given object. - * - * @static - * @memberOf _ - * @category Utility - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new function. - * @example - * - * var objects = [ - * { 'a': { 'b': { 'c': 2 } } }, - * { 'a': { 'b': { 'c': 1 } } } - * ]; - * - * _.map(objects, _.property('a.b.c')); - * // => [2, 1] - * - * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c'); - * // => [1, 2] - */ -function property(path) { - return isKey(path) ? baseProperty(path) : basePropertyDeep(path); -} - -module.exports = baseCallback; - -},{"lodash._baseisequal":54,"lodash._bindcallback":58,"lodash.isarray":84,"lodash.pairs":97}],45:[function(require,module,exports){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Copies properties of `source` to `object`. - * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property names to copy. - * @param {Object} [object={}] The object to copy properties to. - * @returns {Object} Returns `object`. - */ -function baseCopy(source, props, object) { - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - object[key] = source[key]; - } - return object; -} - -module.exports = baseCopy; - -},{}],46:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseIndexOf = require('lodash._baseindexof'), - cacheIndexOf = require('lodash._cacheindexof'), - createCache = require('lodash._createcache'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.difference` which accepts a single array - * of values to exclude. - * - * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @returns {Array} Returns the new array of filtered values. - */ -function baseDifference(array, values) { - var length = array ? array.length : 0, - result = []; - - if (!length) { - return result; - } - var index = -1, - indexOf = baseIndexOf, - isCommon = true, - cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null, - valuesLength = values.length; - - if (cache) { - indexOf = cacheIndexOf; - isCommon = false; - values = cache; - } - outer: - while (++index < length) { - var value = array[index]; - - if (isCommon && value === value) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === value) { - continue outer; - } - } - result.push(value); - } - else if (indexOf(values, value, 0) < 0) { - result.push(value); - } - } - return result; -} - -module.exports = baseDifference; - -},{"lodash._baseindexof":53,"lodash._cacheindexof":59,"lodash._createcache":61}],47:[function(require,module,exports){ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var keys = require('lodash.keys'); - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.forEach` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object|string} Returns `collection`. - */ -var baseEach = createBaseEach(baseForOwn); - -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Creates a `baseEach` or `baseEachRight` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - return eachFunc(collection, iteratee); - } - var index = fromRight ? length : -1, - iterable = toObject(collection); - - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; -} - -/** - * Creates a base function for `_.forIn` or `_.forInRight`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var iterable = toObject(object), - props = keysFunc(object), - length = props.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - var key = props[index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = baseEach; - -},{"lodash.keys":92}],48:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`, - * without support for callback shorthands and `this` binding, which iterates - * over `collection` using the provided `eachFunc`. - * - * @private - * @param {Array|Object|string} collection The collection to search. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @param {boolean} [retKey] Specify returning the key of the found element - * instead of the element itself. - * @returns {*} Returns the found element or its key, else `undefined`. - */ -function baseFind(collection, predicate, eachFunc, retKey) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = retKey ? key : value; - return false; - } - }); - return result; -} - -module.exports = baseFind; - -},{}],49:[function(require,module,exports){ -/** - * lodash 3.6.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for callback shorthands and `this` binding. - * - * @private - * @param {Array} array The array to search. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; - -},{}],50:[function(require,module,exports){ -/** - * lodash 3.1.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ -function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; - - while (++index < length) { - array[offset + index] = values[index]; - } - return array; -} - -/** - * The base implementation of `_.flatten` with added support for restricting - * flattening and specifying the start index. - * - * @private - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param {boolean} [isStrict] Restrict flattening to arrays-like objects. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. - */ -function baseFlatten(array, isDeep, isStrict, result) { - result || (result = []); - - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index]; - if (isObjectLike(value) && isArrayLike(value) && - (isStrict || isArray(value) || isArguments(value))) { - if (isDeep) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, isDeep, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; - } - } - return result; -} - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -module.exports = baseFlatten; - -},{"lodash.isarguments":83,"lodash.isarray":84}],51:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `baseForIn` and `baseForOwn` which iterates - * over `object` properties returned by `keysFunc` invoking `iteratee` for - * each property. Iteratee functions may exit iteration early by explicitly - * returning `false`. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ -var baseFor = createBaseFor(); - -/** - * Creates a base function for methods like `_.forIn`. - * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. - */ -function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; -} - -module.exports = baseFor; - -},{}],52:[function(require,module,exports){ -/** - * lodash 3.7.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `get` without support for string paths - * and default values. - * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path of the property to get. - * @param {string} [pathKey] The key representation of path. - * @returns {*} Returns the resolved value. - */ -function baseGet(object, path, pathKey) { - if (object == null) { - return; - } - if (pathKey !== undefined && pathKey in toObject(object)) { - path = [pathKey]; - } - var index = 0, - length = path.length; - - while (object != null && index < length) { - object = object[path[index++]]; - } - return (index && index == length) ? object : undefined; -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = baseGet; - -},{}],53:[function(require,module,exports){ -/** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.indexOf` without support for binary searches. - * - * @private - * @param {Array} array The array to search. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return indexOfNaN(array, fromIndex); - } - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -/** - * Gets the index at which the first occurrence of `NaN` is found in `array`. - * If `fromRight` is provided elements of `array` are iterated from right to left. - * - * @private - * @param {Array} array The array to search. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched `NaN`, else `-1`. - */ -function indexOfNaN(array, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 0 : -1); - - while ((fromRight ? index-- : ++index < length)) { - var other = array[index]; - if (other !== other) { - return index; - } - } - return -1; -} - -module.exports = baseIndexOf; - -},{}],54:[function(require,module,exports){ -/** - * lodash 3.0.7 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArray = require('lodash.isarray'), - isTypedArray = require('lodash.istypedarray'), - keys = require('lodash.keys'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * A specialized version of `_.some` for arrays without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function arraySome(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (predicate(array[index], index, array)) { - return true; - } - } - return false; -} - -/** - * The base implementation of `_.isEqual` without support for `this` binding - * `customizer` functions. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ -function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) { - return value !== value && other !== other; - } - return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB); -} - -/** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing objects. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA=[]] Tracks traversed `value` objects. - * @param {Array} [stackB=[]] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = arrayTag, - othTag = arrayTag; - - if (!objIsArr) { - objTag = objToString.call(object); - if (objTag == argsTag) { - objTag = objectTag; - } else if (objTag != objectTag) { - objIsArr = isTypedArray(object); - } - } - if (!othIsArr) { - othTag = objToString.call(other); - if (othTag == argsTag) { - othTag = objectTag; - } else if (othTag != objectTag) { - othIsArr = isTypedArray(other); - } - } - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; - - if (isSameTag && !(objIsArr || objIsObj)) { - return equalByTag(object, other, objTag); - } - if (!isLoose) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - - if (objIsWrapped || othIsWrapped) { - return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB); - } - } - if (!isSameTag) { - return false; - } - // Assume cyclic values are equal. - // For more information on detecting circular references see https://es5.github.io/#JO. - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == object) { - return stackB[length] == other; - } - } - // Add `object` and `other` to the stack of traversed objects. - stackA.push(object); - stackB.push(other); - - var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB); - - stackA.pop(); - stackB.pop(); - - return result; -} - -/** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. - * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing arrays. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. - */ -function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) { - var index = -1, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isLoose && othLength > arrLength)) { - return false; - } - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index], - result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined; - - if (result !== undefined) { - if (result) { - continue; - } - return false; - } - // Recursively compare arrays (susceptible to call stack limits). - if (isLoose) { - if (!arraySome(other, function(othValue) { - return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB); - })) { - return false; - } - } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) { - return false; - } - } - return true; -} - -/** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. - * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. - * - * @private - * @param {Object} value The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalByTag(object, other, tag) { - switch (tag) { - case boolTag: - case dateTag: - // Coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0` treating invalid dates coerced to `NaN` as not equal. - return +object == +other; - - case errorTag: - return object.name == other.name && object.message == other.message; - - case numberTag: - // Treat `NaN` vs. `NaN` as equal. - return (object != +object) - ? other != +other - : object == +other; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings primitives and string - // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details. - return object == (other + ''); - } - return false; -} - -/** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. - * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Function} [customizer] The function to customize comparing values. - * @param {boolean} [isLoose] Specify performing partial comparisons. - * @param {Array} [stackA] Tracks traversed `value` objects. - * @param {Array} [stackB] Tracks traversed `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. - */ -function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) { - var objProps = keys(object), - objLength = objProps.length, - othProps = keys(other), - othLength = othProps.length; - - if (objLength != othLength && !isLoose) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - var skipCtor = isLoose; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key], - result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined; - - // Recursively compare objects (susceptible to call stack limits). - if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) { - return false; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (!skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - return false; - } - } - return true; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = baseIsEqual; - -},{"lodash.isarray":84,"lodash.istypedarray":91,"lodash.keys":92}],55:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.slice` without an iteratee call guard. - * - * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. - */ -function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - start = start == null ? 0 : (+start || 0); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : (+end || 0); - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; -} - -module.exports = baseSlice; - -},{}],56:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseIndexOf = require('lodash._baseindexof'), - cacheIndexOf = require('lodash._cacheindexof'), - createCache = require('lodash._createcache'); - -/** Used as the size to enable large array optimizations. */ -var LARGE_ARRAY_SIZE = 200; - -/** - * The base implementation of `_.uniq` without support for callback shorthands - * and `this` binding. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The function invoked per iteration. - * @returns {Array} Returns the new duplicate-value-free array. - */ -function baseUniq(array, iteratee) { - var index = -1, - indexOf = baseIndexOf, - length = array.length, - isCommon = true, - isLarge = isCommon && length >= LARGE_ARRAY_SIZE, - seen = isLarge ? createCache() : null, - result = []; - - if (seen) { - indexOf = cacheIndexOf; - isCommon = false; - } else { - isLarge = false; - seen = iteratee ? [] : result; - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value, index, array) : value; - - if (isCommon && value === value) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (indexOf(seen, computed, 0) < 0) { - if (iteratee || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; -} - -module.exports = baseUniq; - -},{"lodash._baseindexof":53,"lodash._cacheindexof":59,"lodash._createcache":61}],57:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * returned by `keysFunc`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - var index = -1, - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; -} - -module.exports = baseValues; - -},{}],58:[function(require,module,exports){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A specialized version of `baseCallback` which only supports `this` binding - * and specifying the number of arguments to provide to `func`. - * - * @private - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {number} [argCount] The number of arguments to provide to `func`. - * @returns {Function} Returns the callback. - */ -function bindCallback(func, thisArg, argCount) { - if (typeof func != 'function') { - return identity; - } - if (thisArg === undefined) { - return func; - } - switch (argCount) { - case 1: return function(value) { - return func.call(thisArg, value); - }; - case 3: return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - case 5: return function(value, other, key, object, source) { - return func.call(thisArg, value, other, key, object, source); - }; - } - return function() { - return func.apply(thisArg, arguments); - }; -} - -/** - * This method returns the first argument provided to it. - * - * @static - * @memberOf _ - * @category Utility - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'user': 'fred' }; - * - * _.identity(object) === object; - * // => true - */ -function identity(value) { - return value; -} - -module.exports = bindCallback; - -},{}],59:[function(require,module,exports){ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is in `cache` mimicking the return signature of - * `_.indexOf` by returning `0` if the value is found, else `-1`. - * - * @private - * @param {Object} cache The cache to search. - * @param {*} value The value to search for. - * @returns {number} Returns `0` if `value` is found, else `-1`. - */ -function cacheIndexOf(cache, value) { - var data = cache.data, - result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value]; - - return result ? 0 : -1; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = cacheIndexOf; - -},{}],60:[function(require,module,exports){ -/** - * lodash 3.1.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var bindCallback = require('lodash._bindcallback'), - isIterateeCall = require('lodash._isiterateecall'), - restParam = require('lodash.restparam'); - -/** - * Creates a function that assigns properties of source object(s) to a given - * destination object. - * - * **Note:** This function is used to create `_.assign`, `_.defaults`, and `_.merge`. - * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. - */ -function createAssigner(assigner) { - return restParam(function(object, sources) { - var index = -1, - length = object == null ? 0 : sources.length, - customizer = length > 2 ? sources[length - 2] : undefined, - guard = length > 2 ? sources[2] : undefined, - thisArg = length > 1 ? sources[length - 1] : undefined; - - if (typeof customizer == 'function') { - customizer = bindCallback(customizer, thisArg, 5); - length -= 2; - } else { - customizer = typeof thisArg == 'function' ? thisArg : undefined; - length -= (customizer ? 1 : 0); - } - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, customizer); - } - } - return object; - }); -} - -module.exports = createAssigner; - -},{"lodash._bindcallback":58,"lodash._isiterateecall":65,"lodash.restparam":99}],61:[function(require,module,exports){ -(function (global){ -/** - * lodash 3.1.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var getNative = require('lodash._getnative'); - -/** Native method references. */ -var Set = getNative(global, 'Set'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeCreate = getNative(Object, 'create'); - -/** - * - * Creates a cache object to store unique values. - * - * @private - * @param {Array} [values] The values to cache. - */ -function SetCache(values) { - var length = values ? values.length : 0; - - this.data = { 'hash': nativeCreate(null), 'set': new Set }; - while (length--) { - this.push(values[length]); - } -} - -/** - * Adds `value` to the cache. - * - * @private - * @name push - * @memberOf SetCache - * @param {*} value The value to cache. - */ -function cachePush(value) { - var data = this.data; - if (typeof value == 'string' || isObject(value)) { - data.set.add(value); - } else { - data.hash[value] = true; - } -} - -/** - * Creates a `Set` cache object to optimize linear searches of large arrays. - * - * @private - * @param {Array} [values] The values to cache. - * @returns {null|Object} Returns the new cache object if `Set` is supported, else `null`. - */ -function createCache(values) { - return (nativeCreate && Set) ? new SetCache(values) : null; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -// Add functions to the `Set` cache. -SetCache.prototype.push = cachePush; - -module.exports = createCache; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"lodash._getnative":63}],62:[function(require,module,exports){ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var root = require('lodash._root'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - BIND_KEY_FLAG = 2, - CURRY_BOUND_FLAG = 4, - CURRY_FLAG = 8, - CURRY_RIGHT_FLAG = 16, - PARTIAL_FLAG = 32, - PARTIAL_RIGHT_FLAG = 64, - ARY_FLAG = 128, - FLIP_FLAG = 512; - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - var length = args.length; - switch (length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - if (array[index] === placeholder) { - array[index] = PLACEHOLDER; - result[++resIndex] = index; - } - } - return result; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max, - nativeMin = Math.min; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} prototype The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(prototype) { - if (isObject(prototype)) { - object.prototype = prototype; - var result = new object; - object.prototype = undefined; - } - return result || {}; - }; -}()); - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders) { - var holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - leftIndex = -1, - leftLength = partials.length, - result = Array(leftLength + argsLength); - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - while (argsLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array|Object} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders) { - var holdersIndex = -1, - holdersLength = holders.length, - argsIndex = -1, - argsLength = nativeMax(args.length - holdersLength, 0), - rightIndex = -1, - rightLength = partials.length, - result = Array(argsLength + rightLength); - - while (++argsIndex < argsLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - return result; -} - -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBaseWrapper(func, bitmask, thisArg) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtorWrapper(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. - // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurryWrapper(func, bitmask, arity) { - var Ctor = createCtorWrapper(func); - - function wrapper() { - var length = arguments.length, - index = length, - args = Array(length), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func, - placeholder = wrapper.placeholder; - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - return length < arity - ? createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, undefined, args, holders, undefined, undefined, arity - length) - : apply(fn, this, args); - } - return wrapper; -} - -/** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & ARY_FLAG, - isBind = bitmask & BIND_FLAG, - isBindKey = bitmask & BIND_KEY_FLAG, - isCurry = bitmask & CURRY_FLAG, - isCurryRight = bitmask & CURRY_RIGHT_FLAG, - isFlip = bitmask & FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtorWrapper(func); - - function wrapper() { - var length = arguments.length, - index = length, - args = Array(length); - - while (index--) { - args[index] = arguments[index]; - } - if (partials) { - args = composeArgs(args, partials, holders); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight); - } - if (isCurry || isCurryRight) { - var placeholder = wrapper.placeholder, - argsHolders = replaceHolders(args, placeholder); - - length -= argsHolders.length; - if (length < arity) { - return createRecurryWrapper(func, bitmask, createHybridWrapper, placeholder, thisArg, args, argsHolders, argPos, ary, arity - length); - } - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && args.length > 1) { - args.reverse(); - } - if (isAry && ary < args.length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtorWrapper(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg` and the `partials` prepended to those provided to - * the wrapper. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to the new function. - * @returns {Function} Returns the new wrapped function. - */ -function createPartialWrapper(func, bitmask, thisArg, partials) { - var isBind = bitmask & BIND_FLAG, - Ctor = createCtorWrapper(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; -} - -/** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask of wrapper flags. See `createWrapper` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder to replace. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createRecurryWrapper(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & CURRY_FLAG, - newArgPos = argPos ? copyArray(argPos) : undefined, - newsHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG); - - if (!(bitmask & CURRY_BOUND_FLAG)) { - bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG); - } - var result = wrapFunc(func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, arity); - - result.placeholder = placeholder; - return result; -} - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask of wrapper flags. - * The bitmask may be composed of the following flags: - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity]; - - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] == null - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (CURRY_FLAG | CURRY_RIGHT_FLAG)) { - bitmask &= ~(CURRY_FLAG | CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == BIND_FLAG) { - var result = createBaseWrapper(func, bitmask, thisArg); - } else if (bitmask == CURRY_FLAG || bitmask == CURRY_RIGHT_FLAG) { - result = createCurryWrapper(func, bitmask, arity); - } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !holders.length) { - result = createPartialWrapper(func, bitmask, thisArg, partials); - } else { - result = createHybridWrapper.apply(undefined, newData); - } - return result; -} - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Converts `value` to an integer. - * - * **Note:** This function is loosely based on [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3'); - * // => 3 - */ -function toInteger(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - var remainder = value % 1; - return value === value ? (remainder ? value - remainder : value) : 0; -} - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3); - * // => 3 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3'); - * // => 3 - */ -function toNumber(value) { - if (isObject(value)) { - var other = isFunction(value.valueOf) ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = createWrapper; - -},{"lodash._root":69}],63:[function(require,module,exports){ -/** - * lodash 3.9.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); -} - -module.exports = getNative; - -},{}],64:[function(require,module,exports){ -/** - * lodash 3.7.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseGet = require('lodash._baseget'), - baseSlice = require('lodash._baseslice'), - toPath = require('lodash._topath'), - isArray = require('lodash.isarray'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Invokes the method at `path` on `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. - */ -function invokePath(object, path, args) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - path = last(path); - } - var func = object == null ? object : object[path]; - return func == null ? undefined : func.apply(object, args); -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = invokePath; - -},{"lodash._baseget":52,"lodash._baseslice":55,"lodash._topath":70,"lodash.isarray":84}],65:[function(require,module,exports){ -/** - * lodash 3.0.9 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if the provided arguments are from an iteratee call. - * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`. - */ -function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object)) { - var other = object[index]; - return value === value ? (value === other) : (other !== other); - } - return false; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isIterateeCall; - -},{}],66:[function(require,module,exports){ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * A specialized version of `_.pick` which picks `object` properties specified - * by `props`. - * - * @private - * @param {Object} object The source object. - * @param {string[]} props The property names to pick. - * @returns {Object} Returns the new object. - */ -function pickByArray(object, props) { - object = toObject(object); - - var index = -1, - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - return result; -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = pickByArray; - -},{}],67:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFor = require('lodash._basefor'), - keysIn = require('lodash.keysin'); - -/** - * The base implementation of `_.forIn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForIn(object, iteratee) { - return baseFor(object, iteratee, keysIn); -} - -/** - * A specialized version of `_.pick` that picks `object` properties `predicate` - * returns truthy for. - * - * @private - * @param {Object} object The source object. - * @param {Function} predicate The function invoked per iteration. - * @returns {Object} Returns the new object. - */ -function pickByCallback(object, predicate) { - var result = {}; - baseForIn(object, function(value, key, object) { - if (predicate(value, key, object)) { - result[key] = value; - } - }); - return result; -} - -module.exports = pickByCallback; - -},{"lodash._basefor":51,"lodash.keysin":93}],68:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = -1, - result = []; - - while (++index < length) { - if (array[index] === placeholder) { - array[index] = PLACEHOLDER; - result[++resIndex] = index; - } - } - return result; -} - -module.exports = replaceHolders; - -},{}],69:[function(require,module,exports){ -(function (global){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used to determine if values are of the language type `Object`. */ -var objectTypes = { - 'function': true, - 'object': true -}; - -/** Detect free variable `exports`. */ -var freeExports = (objectTypes[typeof exports] && exports && !exports.nodeType) - ? exports - : undefined; - -/** Detect free variable `module`. */ -var freeModule = (objectTypes[typeof module] && module && !module.nodeType) - ? module - : undefined; - -/** Detect free variable `global` from Node.js. */ -var freeGlobal = checkGlobal(freeExports && freeModule && typeof global == 'object' && global); - -/** Detect free variable `self`. */ -var freeSelf = checkGlobal(objectTypes[typeof self] && self); - -/** Detect free variable `window`. */ -var freeWindow = checkGlobal(objectTypes[typeof window] && window); - -/** Detect `this` as the global object. */ -var thisGlobal = checkGlobal(objectTypes[typeof this] && this); - -/** - * Used as a reference to the global object. - * - * The `this` value is used if it's the global object to avoid Greasemonkey's - * restricted `window` object, otherwise the `window` object is used. - */ -var root = freeGlobal || - ((freeWindow !== (thisGlobal && thisGlobal.window)) && freeWindow) || - freeSelf || thisGlobal || Function('return this')(); - -/** - * Checks if `value` is a global object. - * - * @private - * @param {*} value The value to check. - * @returns {null|Object} Returns `value` if it's a global object, else `null`. - */ -function checkGlobal(value) { - return (value && value.Object === Object) ? value : null; -} - -module.exports = root; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],70:[function(require,module,exports){ -/** - * lodash 3.8.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArray = require('lodash.isarray'); - -/** Used to match property names within property paths. */ -var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g; - -/** Used to match backslashes in property paths. */ -var reEscapeChar = /\\(\\)?/g; - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` or `undefined` values. - * - * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. - */ -function baseToString(value) { - return value == null ? '' : (value + ''); -} - -/** - * Converts `value` to property path array if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Array} Returns the property path array. - */ -function toPath(value) { - if (isArray(value)) { - return value; - } - var result = []; - baseToString(value).replace(rePropName, function(match, number, quote, string) { - result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; -} - -module.exports = toPath; - -},{"lodash.isarray":84}],71:[function(require,module,exports){ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseAssign = require('lodash._baseassign'), - createAssigner = require('lodash._createassigner'), - keys = require('lodash.keys'); - -/** - * A specialized version of `_.assign` for customizing assigned values without - * support for argument juggling, multiple sources, and `this` binding `customizer` - * functions. - * - * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. - */ -function assignWith(object, source, customizer) { - var index = -1, - props = keys(source), - length = props.length; - - while (++index < length) { - var key = props[index], - value = object[key], - result = customizer(value, source[key], key, object, source); - - if ((result === result ? (result !== value) : (value === value)) || - (value === undefined && !(key in object))) { - object[key] = result; - } - } - return object; -} - -/** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources overwrite property assignments of previous sources. - * If `customizer` is provided it is invoked to produce the assigned values. - * The `customizer` is bound to `thisArg` and invoked with five arguments: - * (objectValue, sourceValue, key, object, source). - * - * **Note:** This method mutates `object` and is based on - * [`Object.assign`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign). - * - * @static - * @memberOf _ - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {Object} Returns `object`. - * @example - * - * _.assign({ 'user': 'barney' }, { 'age': 40 }, { 'user': 'fred' }); - * // => { 'user': 'fred', 'age': 40 } - * - * // using a customizer callback - * var defaults = _.partialRight(_.assign, function(value, other) { - * return _.isUndefined(value) ? other : value; - * }); - * - * defaults({ 'user': 'barney' }, { 'age': 36 }, { 'user': 'fred' }); - * // => { 'user': 'barney', 'age': 36 } - */ -var assign = createAssigner(function(object, source, customizer) { - return customizer - ? assignWith(object, source, customizer) - : baseAssign(object, source); -}); - -module.exports = assign; - -},{"lodash._baseassign":43,"lodash._createassigner":60,"lodash.keys":92}],72:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it is called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. - * - * @static - * @memberOf _ - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * jQuery('#add').on('click', _.before(5, addContactToList)); - * // => allows adding up to 4 contacts to the list - */ -function before(n, func) { - var result; - if (typeof func != 'function') { - if (typeof n == 'function') { - var temp = n; - n = func; - func = temp; - } else { - throw new TypeError(FUNC_ERROR_TEXT); - } - } - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; -} - -module.exports = before; - -},{}],73:[function(require,module,exports){ -/** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var createWrapper = require('lodash._createwrapper'), - replaceHolders = require('lodash._replaceholders'), - restParam = require('lodash.restparam'); - -/** Used to compose bitmasks for wrapper metadata. */ -var BIND_FLAG = 1, - PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and prepends any additional `_.bind` arguments to those provided to the - * bound function. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind` this method does not set the `length` - * property of bound functions. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var greet = function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * }; - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * // using placeholders - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' - */ -var bind = restParam(function(func, thisArg, partials) { - var bitmask = BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, bind.placeholder); - bitmask |= PARTIAL_FLAG; - } - return createWrapper(func, bitmask, thisArg, partials, holders); -}); - -// Assign default placeholders. -bind.placeholder = {}; - -module.exports = bind; - -},{"lodash._createwrapper":62,"lodash._replaceholders":68,"lodash.restparam":99}],74:[function(require,module,exports){ -/** - * lodash 3.2.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseDifference = require('lodash._basedifference'), - baseFlatten = require('lodash._baseflatten'), - restParam = require('lodash.restparam'); - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Creates an array of unique `array` values not included in the other - * provided arrays using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The arrays of values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @example - * - * _.difference([1, 2, 3], [4, 2]); - * // => [1, 3] - */ -var difference = restParam(function(array, values) { - return (isObjectLike(array) && isArrayLike(array)) - ? baseDifference(array, baseFlatten(values, false, true)) - : []; -}); - -module.exports = difference; - -},{"lodash._basedifference":46,"lodash._baseflatten":50,"lodash.restparam":99}],75:[function(require,module,exports){ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var root = require('lodash._root'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used to match HTML entities and HTML characters. */ -var reUnescapedHtml = /[&<>"'`]/g, - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - -/** Used to map characters to HTML entities. */ -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' -}; - -/** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ -function escapeHtmlChar(chr) { - return htmlEscapes[chr]; -} - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Converts the characters "&", "<", ">", '"', "'", and "\`" in `string` to - * their corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. - * See [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * Backticks are escaped because in IE < 9, they can break out of - * attribute values or HTML comments. See [#59](https://html5sec.org/#59), - * [#102](https://html5sec.org/#102), [#108](https://html5sec.org/#108), and - * [#133](https://html5sec.org/#133) of the [HTML5 Security Cheatsheet](https://html5sec.org/) - * for more details. - * - * When working with HTML you should always [quote attribute values](http://wonko.com/post/html-escaping) - * to reduce XSS vectors. - * - * @static - * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example - * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ -function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; -} - -module.exports = escape; - -},{"lodash._root":69}],76:[function(require,module,exports){ -/** - * lodash 3.2.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseCallback = require('lodash._basecallback'), - baseEach = require('lodash._baseeach'), - baseFind = require('lodash._basefind'), - baseFindIndex = require('lodash._basefindindex'), - isArray = require('lodash.isarray'); - -/** - * Creates a `_.find` or `_.findLast` function. - * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new find function. - */ -function createFind(eachFunc, fromRight) { - return function(collection, predicate, thisArg) { - predicate = baseCallback(predicate, thisArg, 3); - if (isArray(collection)) { - var index = baseFindIndex(collection, predicate, fromRight); - return index > -1 ? collection[index] : undefined; - } - return baseFind(collection, predicate, eachFunc); - }; -} - -/** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is bound to `thisArg` and - * invoked with three arguments: (value, index|key, collection). - * - * If a property name is provided for `predicate` the created `_.property` - * style callback returns the property value of the given element. - * - * If a value is also provided for `thisArg` the created `_.matchesProperty` - * style callback returns `true` for elements that have a matching property - * value, else `false`. - * - * If an object is provided for `predicate` the created `_.matches` style - * callback returns `true` for elements that have the properties of the given - * object, else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {*} Returns the matched element, else `undefined`. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.result(_.find(users, function(chr) { - * return chr.age < 40; - * }), 'user'); - * // => 'barney' - * - * // using the `_.matches` callback shorthand - * _.result(_.find(users, { 'age': 1, 'active': true }), 'user'); - * // => 'pebbles' - * - * // using the `_.matchesProperty` callback shorthand - * _.result(_.find(users, 'active', false), 'user'); - * // => 'fred' - * - * // using the `_.property` callback shorthand - * _.result(_.find(users, 'active'), 'user'); - * // => 'barney' - */ -var find = createFind(baseEach); - -module.exports = find; - -},{"lodash._basecallback":44,"lodash._baseeach":47,"lodash._basefind":48,"lodash._basefindindex":49,"lodash.isarray":84}],77:[function(require,module,exports){ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFlatten = require('lodash._baseflatten'), - isIterateeCall = require('lodash._isiterateecall'); - -/** - * Flattens a nested array. If `isDeep` is `true` the array is recursively - * flattened, otherwise it is only flattened a single level. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to flatten. - * @param {boolean} [isDeep] Specify a deep flatten. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Array} Returns the new flattened array. - * @example - * - * _.flatten([1, [2, 3, [4]]]); - * // => [1, 2, 3, [4]] - * - * // using `isDeep` - * _.flatten([1, [2, 3, [4]]], true); - * // => [1, 2, 3, 4] - */ -function flatten(array, isDeep, guard) { - var length = array ? array.length : 0; - if (guard && isIterateeCall(array, isDeep, guard)) { - isDeep = false; - } - return length ? baseFlatten(array, isDeep) : []; -} - -module.exports = flatten; - -},{"lodash._baseflatten":50,"lodash._isiterateecall":65}],78:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayEach = require('lodash._arrayeach'), - baseEach = require('lodash._baseeach'), - bindCallback = require('lodash._bindcallback'), - isArray = require('lodash.isarray'); - -/** - * Creates a function for `_.forEach` or `_.forEachRight`. - * - * @private - * @param {Function} arrayFunc The function to iterate over an array. - * @param {Function} eachFunc The function to iterate over a collection. - * @returns {Function} Returns the new each function. - */ -function createForEach(arrayFunc, eachFunc) { - return function(collection, iteratee, thisArg) { - return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection)) - ? arrayFunc(collection, iteratee) - : eachFunc(collection, bindCallback(iteratee, thisArg, 3)); - }; -} - -/** - * Iterates over elements of `collection` invoking `iteratee` for each element. - * The `iteratee` is bound to `thisArg` and invoked with three arguments: - * (value, index|key, collection). Iteratee functions may exit iteration early - * by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" property - * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn` - * may be used for object iteration. - * - * @static - * @memberOf _ - * @alias each - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Array|Object|string} Returns `collection`. - * @example - * - * _([1, 2]).forEach(function(n) { - * console.log(n); - * }).value(); - * // => logs each value from left to right and returns the array - * - * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) { - * console.log(n, key); - * }); - * // => logs each value-key pair and returns the object (iteration order is not guaranteed) - */ -var forEach = createForEach(arrayEach, baseEach); - -module.exports = forEach; - -},{"lodash._arrayeach":41,"lodash._baseeach":47,"lodash._bindcallback":58,"lodash.isarray":84}],79:[function(require,module,exports){ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFor = require('lodash._basefor'), - bindCallback = require('lodash._bindcallback'), - keys = require('lodash.keys'); - -/** - * The base implementation of `_.forOwn` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. - */ -function baseForOwn(object, iteratee) { - return baseFor(object, iteratee, keys); -} - -/** - * Creates a function for `_.forOwn` or `_.forOwnRight`. - * - * @private - * @param {Function} objectFunc The function to iterate over an object. - * @returns {Function} Returns the new each function. - */ -function createForOwn(objectFunc) { - return function(object, iteratee, thisArg) { - if (typeof iteratee != 'function' || thisArg !== undefined) { - iteratee = bindCallback(iteratee, thisArg, 3); - } - return objectFunc(object, iteratee); - }; -} - -/** - * Iterates over own enumerable properties of an object invoking `iteratee` - * for each property. The `iteratee` is bound to `thisArg` and invoked with - * three arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [thisArg] The `this` binding of `iteratee`. - * @returns {Object} Returns `object`. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => logs 'a' and 'b' (iteration order is not guaranteed) - */ -var forOwn = createForOwn(baseForOwn); - -module.exports = forOwn; - -},{"lodash._basefor":51,"lodash._bindcallback":58,"lodash.keys":92}],80:[function(require,module,exports){ -/** - * lodash 3.2.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseGet = require('lodash._baseget'), - baseSlice = require('lodash._baseslice'), - toPath = require('lodash._topath'), - isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `path` is a direct property. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` is a direct property, else `false`. - * @example - * - * var object = { 'a': { 'b': { 'c': 3 } } }; - * - * _.has(object, 'a'); - * // => true - * - * _.has(object, 'a.b.c'); - * // => true - * - * _.has(object, ['a', 'b', 'c']); - * // => true - */ -function has(object, path) { - if (object == null) { - return false; - } - var result = hasOwnProperty.call(object, path); - if (!result && !isKey(path)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - if (object == null) { - return false; - } - path = last(path); - result = hasOwnProperty.call(object, path); - } - return result || (isLength(object.length) && isIndex(path, object.length) && - (isArray(object) || isArguments(object))); -} - -module.exports = has; - -},{"lodash._baseget":52,"lodash._baseslice":55,"lodash._topath":70,"lodash.isarguments":83,"lodash.isarray":84}],81:[function(require,module,exports){ -/** - * lodash 3.1.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseIndexOf = require('lodash._baseindexof'), - baseValues = require('lodash._basevalues'), - isIterateeCall = require('lodash._isiterateecall'), - isArray = require('lodash.isarray'), - isString = require('lodash.isstring'), - keys = require('lodash.keys'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is in `collection` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it is used as the offset - * from the end of `collection`. - * - * @static - * @memberOf _ - * @alias contains, include - * @category Collection - * @param {Array|Object|string} collection The collection to search. - * @param {*} target The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`. - * @returns {boolean} Returns `true` if a matching element is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'user': 'fred', 'age': 40 }, 'fred'); - * // => true - * - * _.includes('pebbles', 'eb'); - * // => true - */ -function includes(collection, target, fromIndex, guard) { - var length = collection ? getLength(collection) : 0; - if (!isLength(length)) { - collection = values(collection); - length = collection.length; - } - if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) { - fromIndex = 0; - } else { - fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0); - } - return (typeof collection == 'string' || !isArray(collection) && isString(collection)) - ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1) - : (!!length && baseIndexOf(collection, target, fromIndex) > -1); -} - -/** - * Creates an array of the own enumerable property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return baseValues(object, keys(object)); -} - -module.exports = includes; - -},{"lodash._baseindexof":53,"lodash._basevalues":57,"lodash._isiterateecall":65,"lodash.isarray":84,"lodash.isstring":90,"lodash.keys":92}],82:[function(require,module,exports){ -/** - * lodash 3.2.3 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseEach = require('lodash._baseeach'), - invokePath = require('lodash._invokepath'), - isArray = require('lodash.isarray'), - restParam = require('lodash.restparam'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `methodName` is a function it is - * invoked for, and `this` bound to, each element in `collection`. - * - * @static - * @memberOf _ - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Array} Returns the array of results. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ -var invoke = restParam(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - isProp = isKey(path), - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined); - result[++index] = func ? func.apply(value, args) : invokePath(value, path, args); - }); - return result; -}); - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = invoke; - -},{"lodash._baseeach":47,"lodash._invokepath":64,"lodash.isarray":84,"lodash.restparam":99}],83:[function(require,module,exports){ -/** - * lodash (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is likely an `arguments` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - // Safari 8.1 makes `arguments.callee` enumerable in strict mode. - return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') && - (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag); -} - -/** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - * @example - * - * _.isArrayLike([1, 2, 3]); - * // => true - * - * _.isArrayLike(document.body.children); - * // => true - * - * _.isArrayLike('abc'); - * // => true - * - * _.isArrayLike(_.noop); - * // => false - */ -function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); -} - -/** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. - * @example - * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true - * - * _.isArrayLikeObject('abc'); - * // => false - * - * _.isArrayLikeObject(_.noop); - * // => false - */ -function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); -} - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8-9 which returns 'object' for typed array and other constructors. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isArguments; - -},{}],84:[function(require,module,exports){ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]', - funcTag = '[object Function]'; - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var fnToString = Function.prototype.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = object == null ? undefined : object[key]; - return isNative(value) ? value : undefined; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(function() { return arguments; }()); - * // => false - */ -var isArray = nativeIsArray || function(value) { - return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag; -}; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 equivalents which return 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Checks if `value` is a native function. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, else `false`. - * @example - * - * _.isNative(Array.prototype.push); - * // => true - * - * _.isNative(_); - * // => false - */ -function isNative(value) { - if (value == null) { - return false; - } - if (isFunction(value)) { - return reIsNative.test(fnToString.call(value)); - } - return isObjectLike(value) && reIsHostCtor.test(value); -} - -module.exports = isArray; - -},{}],85:[function(require,module,exports){ -/** - * lodash 3.0.3 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var dateTag = '[object Date]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Date` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - * - * _.isDate('Mon April 23 2012'); - * // => false - */ -function isDate(value) { - return isObjectLike(value) && objectToString.call(value) == dateTag; -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -module.exports = isDate; - -},{}],86:[function(require,module,exports){ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'), - isFunction = require('lodash.isfunction'), - isString = require('lodash.isstring'), - keys = require('lodash.keys'); - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is empty. A value is considered empty unless it is an - * `arguments` object, array, string, or jQuery-like collection with a length - * greater than `0` or an object with own enumerable properties. - * - * @static - * @memberOf _ - * @category Lang - * @param {Array|Object|string} value The value to inspect. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. - * @example - * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({ 'a': 1 }); - * // => false - */ -function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || - (isObjectLike(value) && isFunction(value.splice)))) { - return !value.length; - } - return !keys(value).length; -} - -module.exports = isEmpty; - -},{"lodash.isarguments":83,"lodash.isarray":84,"lodash.isfunction":88,"lodash.isstring":90,"lodash.keys":92}],87:[function(require,module,exports){ -/** - * lodash 3.0.4 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseIsEqual = require('lodash._baseisequal'), - bindCallback = require('lodash._bindcallback'); - -/** - * Performs a deep comparison between two values to determine if they are - * equivalent. If `customizer` is provided it is invoked to compare values. - * If `customizer` returns `undefined` comparisons are handled by the method - * instead. The `customizer` is bound to `thisArg` and invoked with three - * arguments: (value, other [, index|key]). - * - * **Note:** This method supports comparing arrays, booleans, `Date` objects, - * numbers, `Object` objects, regexes, and strings. Objects are compared by - * their own, not inherited, enumerable properties. Functions and DOM nodes - * are **not** supported. Provide a customizer function to extend support - * for comparing other values. - * - * @static - * @memberOf _ - * @alias eq - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize value comparisons. - * @param {*} [thisArg] The `this` binding of `customizer`. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * var object = { 'user': 'fred' }; - * var other = { 'user': 'fred' }; - * - * object == other; - * // => false - * - * _.isEqual(object, other); - * // => true - * - * // using a customizer callback - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqual(array, other, function(value, other) { - * if (_.every([value, other], RegExp.prototype.test, /^h(?:i|ello)$/)) { - * return true; - * } - * }); - * // => true - */ -function isEqual(value, other, customizer, thisArg) { - customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, customizer) : !!result; -} - -module.exports = isEqual; - -},{"lodash._baseisequal":54,"lodash._bindcallback":58}],88:[function(require,module,exports){ -/** - * lodash 3.0.8 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var funcTag = '[object Function]', - genTag = '[object GeneratorFunction]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 8 which returns 'object' for typed array constructors, and - // PhantomJS 1.9 which returns 'function' for `NodeList` instances. - var tag = isObject(value) ? objectToString.call(value) : ''; - return tag == funcTag || tag == genTag; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isFunction; - -},{}],89:[function(require,module,exports){ -/** - * lodash 3.0.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - -},{}],90:[function(require,module,exports){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** - * Checks if `value` is object-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a `String` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isString('abc'); - * // => true - * - * _.isString(1); - * // => false - */ -function isString(value) { - return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); -} - -module.exports = isString; - -},{}],91:[function(require,module,exports){ -/** - * lodash 3.0.6 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright jQuery Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ - -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - funcTag = '[object Function]', - mapTag = '[object Map]', - numberTag = '[object Number]', - objectTag = '[object Object]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - weakMapTag = '[object WeakMap]'; - -var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - -/** Used to identify `toStringTag` values of typed arrays. */ -var typedArrayTags = {}; -typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = -typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = -typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = -typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = -typedArrayTags[uint32Tag] = true; -typedArrayTags[argsTag] = typedArrayTags[arrayTag] = -typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = -typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = -typedArrayTags[errorTag] = typedArrayTags[funcTag] = -typedArrayTags[mapTag] = typedArrayTags[numberTag] = -typedArrayTags[objectTag] = typedArrayTags[regexpTag] = -typedArrayTags[setTag] = typedArrayTags[stringTag] = -typedArrayTags[weakMapTag] = false; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, - * else `false`. - * @example - * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false - * - * _.isLength(Infinity); - * // => false - * - * _.isLength('3'); - * // => false - */ -function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, - * else `false`. - * @example - * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false - */ -function isTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; -} - -module.exports = isTypedArray; - -},{}],92:[function(require,module,exports){ -/** - * lodash 3.1.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var getNative = require('lodash._getnative'), - isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new function. - */ -function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; -} - -/** - * Gets the "length" property value of `object`. - * - * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792) - * that affects Safari on at least iOS 8.1-8.3 ARM64. - * - * @private - * @param {Object} object The object to query. - * @returns {*} Returns the "length" value. - */ -var getLength = baseProperty('length'); - -/** - * Checks if `value` is array-like. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. - */ -function isArrayLike(value) { - return value != null && isLength(getLength(value)); -} - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * A fallback implementation of `Object.keys` which creates an array of the - * own enumerable property names of `object`. - * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ -function shimKeys(object) { - var props = keysIn(object), - propsLength = props.length, - length = propsLength && object.length; - - var allowIndexes = !!length && isLength(length) && - (isArray(object) || isArguments(object)); - - var index = -1, - result = []; - - while (++index < propsLength) { - var key = props[index]; - if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) { - result.push(key); - } - } - return result; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys) - * for more details. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) - * - * _.keys('hi'); - * // => ['0', '1'] - */ -var keys = !nativeKeys ? shimKeys : function(object) { - var Ctor = object == null ? undefined : object.constructor; - if ((typeof Ctor == 'function' && Ctor.prototype === object) || - (typeof object != 'function' && isArrayLike(object))) { - return shimKeys(object); - } - return isObject(object) ? nativeKeys(object) : []; -}; - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = keys; - -},{"lodash._getnative":63,"lodash.isarguments":83,"lodash.isarray":84}],93:[function(require,module,exports){ -/** - * lodash 3.0.8 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var isArguments = require('lodash.isarguments'), - isArray = require('lodash.isarray'); - -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used as the [maximum length](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.max_safe_integer) - * of an array-like value. - */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1; - length = length == null ? MAX_SAFE_INTEGER : length; - return value > -1 && value % 1 == 0 && value < length; -} - -/** - * Checks if `value` is a valid array-like length. - * - * **Note:** This function is based on [`ToLength`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength). - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. - */ -function isLength(value) { - return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Creates an array of the own and inherited enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) - */ -function keysIn(object) { - if (object == null) { - return []; - } - if (!isObject(object)) { - object = Object(object); - } - var length = object.length; - length = (length && isLength(length) && - (isArray(object) || isArguments(object)) && length) || 0; - - var Ctor = object.constructor, - index = -1, - isProto = typeof Ctor == 'function' && Ctor.prototype === object, - result = Array(length), - skipIndexes = length > 0; - - while (++index < length) { - result[index] = (index + ''); - } - for (var key in object) { - if (!(skipIndexes && isIndex(key, length)) && - !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } - } - return result; -} - -module.exports = keysIn; - -},{"lodash.isarguments":83,"lodash.isarray":84}],94:[function(require,module,exports){ -/** - * lodash 3.0.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.7.0 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -module.exports = last; - -},{}],95:[function(require,module,exports){ -/** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var arrayMap = require('lodash._arraymap'), - baseDifference = require('lodash._basedifference'), - baseFlatten = require('lodash._baseflatten'), - bindCallback = require('lodash._bindcallback'), - pickByArray = require('lodash._pickbyarray'), - pickByCallback = require('lodash._pickbycallback'), - keysIn = require('lodash.keysin'), - restParam = require('lodash.restparam'); - -/** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable properties of `object` that are not omitted. - * Property names may be specified as individual arguments or as arrays of - * property names. If `predicate` is provided it is invoked for each property - * of `object` omitting the properties `predicate` returns truthy for. The - * predicate is bound to `thisArg` and invoked with three arguments: - * (value, key, object). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to omit, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.omit(object, 'age'); - * // => { 'user': 'fred' } - * - * _.omit(object, _.isNumber); - * // => { 'user': 'fred' } - */ -var omit = restParam(function(object, props) { - if (object == null) { - return {}; - } - if (typeof props[0] != 'function') { - var props = arrayMap(baseFlatten(props), String); - return pickByArray(object, baseDifference(keysIn(object), props)); - } - var predicate = bindCallback(props[0], props[1], 3); - return pickByCallback(object, function(value, key, object) { - return !predicate(value, key, object); - }); -}); - -module.exports = omit; - -},{"lodash._arraymap":42,"lodash._basedifference":46,"lodash._baseflatten":50,"lodash._bindcallback":58,"lodash._pickbyarray":66,"lodash._pickbycallback":67,"lodash.keysin":93,"lodash.restparam":99}],96:[function(require,module,exports){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var before = require('lodash.before'); - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first call. The `func` is invoked - * with the `this` binding and arguments of the created function. - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` invokes `createApplication` once - */ -function once(func) { - return before(2, func); -} - -module.exports = once; - -},{"lodash.before":72}],97:[function(require,module,exports){ -/** - * lodash 3.0.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var keys = require('lodash.keys'); - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * Creates a two dimensional array of the key-value pairs for `object`, - * e.g. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the new array of key-value pairs. - * @example - * - * _.pairs({ 'barney': 36, 'fred': 40 }); - * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed) - */ -function pairs(object) { - object = toObject(object); - - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; -} - -module.exports = pairs; - -},{"lodash.keys":92}],98:[function(require,module,exports){ -/** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFlatten = require('lodash._baseflatten'), - bindCallback = require('lodash._bindcallback'), - pickByArray = require('lodash._pickbyarray'), - pickByCallback = require('lodash._pickbycallback'), - restParam = require('lodash.restparam'); - -/** - * Creates an object composed of the picked `object` properties. Property - * names may be specified as individual arguments or as arrays of property - * names. If `predicate` is provided it is invoked for each property of `object` - * picking the properties `predicate` returns truthy for. The predicate is - * bound to `thisArg` and invoked with three arguments: (value, key, object). - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {Function|...(string|string[])} [predicate] The function invoked per - * iteration or property names to pick, specified as individual property - * names or arrays of property names. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'user': 'fred', 'age': 40 }; - * - * _.pick(object, 'user'); - * // => { 'user': 'fred' } - * - * _.pick(object, _.isString); - * // => { 'user': 'fred' } - */ -var pick = restParam(function(object, props) { - if (object == null) { - return {}; - } - return typeof props[0] == 'function' - ? pickByCallback(object, bindCallback(props[0], props[1], 3)) - : pickByArray(object, baseFlatten(props)); -}); - -module.exports = pick; - -},{"lodash._baseflatten":50,"lodash._bindcallback":58,"lodash._pickbyarray":66,"lodash._pickbycallback":67,"lodash.restparam":99}],99:[function(require,module,exports){ -/** - * lodash 3.6.1 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ - -/** Used as the `TypeError` message for "Functions" methods. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as an array. - * - * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters). - * - * @static - * @memberOf _ - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - * @example - * - * var say = _.restParam(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); - * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' - */ -function restParam(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - rest = Array(length); - - while (++index < length) { - rest[index] = args[start + index]; - } - switch (start) { - case 0: return func.call(this, rest); - case 1: return func.call(this, args[0], rest); - case 2: return func.call(this, args[0], args[1], rest); - } - var otherArgs = Array(start + 1); - index = -1; - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = rest; - return func.apply(this, otherArgs); - }; -} - -module.exports = restParam; - -},{}],100:[function(require,module,exports){ -/** - * lodash 3.1.2 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseGet = require('lodash._baseget'), - baseSlice = require('lodash._baseslice'), - toPath = require('lodash._topath'), - isArray = require('lodash.isarray'), - isFunction = require('lodash.isfunction'); - -/** Used to match property names within property paths. */ -var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/; - -/** - * Checks if `value` is a property name and not a property path. - * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. - */ -function isKey(value, object) { - var type = typeof value; - if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') { - return true; - } - if (isArray(value)) { - return false; - } - var result = !reIsDeepProp.test(value); - return result || (object != null && value in toObject(object)); -} - -/** - * Converts `value` to an object if it's not one. - * - * @private - * @param {*} value The value to process. - * @returns {Object} Returns the object. - */ -function toObject(value) { - return isObject(value) ? value : Object(value); -} - -/** - * Gets the last element of `array`. - * - * @static - * @memberOf _ - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - */ -function last(array) { - var length = array ? array.length : 0; - return length ? array[length - 1] : undefined; -} - -/** - * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ -function isObject(value) { - // Avoid a V8 JIT bug in Chrome 19-20. - // See https://code.google.com/p/v8/issues/detail?id=2291 for more details. - var type = typeof value; - return !!value && (type == 'object' || type == 'function'); -} - -/** - * This method is like `_.get` except that if the resolved value is a function - * it is invoked with the `this` binding of its parent object and its result - * is returned. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned if the resolved value is `undefined`. - * @returns {*} Returns the resolved value. - * @example - * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 - * - * _.result(object, 'a.b.c', 'default'); - * // => 'default' - * - * _.result(object, 'a.b.c', _.constant('default')); - * // => 'default' - */ -function result(object, path, defaultValue) { - var result = object == null ? undefined : object[path]; - if (result === undefined) { - if (object != null && !isKey(path, object)) { - path = toPath(path); - object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1)); - result = object == null ? undefined : object[last(path)]; - } - result = result === undefined ? defaultValue : result; - } - return isFunction(result) ? result.call(object) : result; -} - -module.exports = result; - -},{"lodash._baseget":52,"lodash._baseslice":55,"lodash._topath":70,"lodash.isarray":84,"lodash.isfunction":88}],101:[function(require,module,exports){ -/** - * lodash 3.1.0 (Custom Build) - * Build: `lodash modern modularize exports="npm" -o ./` - * Copyright 2012-2015 The Dojo Foundation - * Based on Underscore.js 1.8.2 - * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var baseFlatten = require('lodash._baseflatten'), - baseUniq = require('lodash._baseuniq'), - restParam = require('lodash.restparam'); - -/** - * Creates an array of unique values, in order, of the provided arrays using - * `SameValueZero` for equality comparisons. - * - * **Note:** [`SameValueZero`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-samevaluezero) - * comparisons are like strict equality comparisons, e.g. `===`, except that - * `NaN` matches `NaN`. - * - * @static - * @memberOf _ - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. - * @example - * - * _.union([1, 2], [4, 2], [2, 1]); - * // => [1, 2, 4] - */ -var union = restParam(function(arrays) { - return baseUniq(baseFlatten(arrays, false, true)); -}); - -module.exports = union; - -},{"lodash._baseflatten":50,"lodash._baseuniq":56,"lodash.restparam":99}],102:[function(require,module,exports){ -/** - * lodash 3.2.0 (Custom Build) - * Build: `lodash modularize exports="npm" -o ./` - * Copyright 2012-2016 The Dojo Foundation - * Based on Underscore.js 1.8.3 - * Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - * Available under MIT license - */ -var root = require('lodash._root'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0; - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to generate unique IDs. */ -var idCounter = 0; - -/** - * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objectToString = objectProto.toString; - -/** Built-in value references. */ -var Symbol = root.Symbol; - -/** Used to convert symbols to primitives and strings. */ -var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolToString = Symbol ? symbolProto.toString : undefined; - -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return !!value && typeof value == 'object'; -} - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && objectToString.call(value) == symbolTag); -} - -/** - * Converts `value` to a string if it's not one. An empty string is returned - * for `null` and `undefined` values. The sign of `-0` is preserved. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to process. - * @returns {string} Returns the string. - * @example - * - * _.toString(null); - * // => '' - * - * _.toString(-0); - * // => '-0' - * - * _.toString([1, 2, 3]); - * // => '1,2,3' - */ -function toString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (value == null) { - return ''; - } - if (isSymbol(value)) { - return Symbol ? symbolToString.call(value) : ''; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; -} - -/** - * Generates a unique ID. If `prefix` is provided the ID is appended to it. - * - * @static - * @memberOf _ - * @category Util - * @param {string} [prefix] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ -function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; -} - -module.exports = uniqueId; - -},{"lodash._root":69}],103:[function(require,module,exports){ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** Used as references for the maximum length and index of an array. */ -var MAX_ARRAY_LENGTH = 4294967295; - -/** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. - * - * @private - * @constructor - * @param {*} value The value to wrap. - */ -function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; -} - -// Ensure `LazyWrapper` is an instance of `baseLodash`. -LazyWrapper.prototype = baseCreate(baseLodash.prototype); -LazyWrapper.prototype.constructor = LazyWrapper; - -module.exports = LazyWrapper; - -},{"./_baseCreate":110,"./_baseLodash":116}],104:[function(require,module,exports){ -var baseCreate = require('./_baseCreate'), - baseLodash = require('./_baseLodash'); - -/** - * The base constructor for creating `lodash` wrapper objects. - * - * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. - */ -function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; -} - -LodashWrapper.prototype = baseCreate(baseLodash.prototype); -LodashWrapper.prototype.constructor = LodashWrapper; - -module.exports = LodashWrapper; - -},{"./_baseCreate":110,"./_baseLodash":116}],105:[function(require,module,exports){ -var root = require('./_root'); - -/** Built-in value references. */ -var Symbol = root.Symbol; - -module.exports = Symbol; - -},{"./_root":152}],106:[function(require,module,exports){ -var getNative = require('./_getNative'), - root = require('./_root'); - -/* Built-in method references that are verified to be native. */ -var WeakMap = getNative(root, 'WeakMap'); - -module.exports = WeakMap; - -},{"./_getNative":137,"./_root":152}],107:[function(require,module,exports){ -/** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ -function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); - } - return func.apply(thisArg, args); -} - -module.exports = apply; - -},{}],108:[function(require,module,exports){ -/** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ -function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; - - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; - } - } - return array; -} - -module.exports = arrayEach; - -},{}],109:[function(require,module,exports){ -var baseIndexOf = require('./_baseIndexOf'); - -/** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ -function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; -} - -module.exports = arrayIncludes; - -},{"./_baseIndexOf":113}],110:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** Built-in value references. */ -var objectCreate = Object.create; - -/** - * The base implementation of `_.create` without support for assigning - * properties to the created object. - * - * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. - */ -var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; -}()); - -module.exports = baseCreate; - -},{"./isObject":165}],111:[function(require,module,exports){ -/** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); - - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; -} - -module.exports = baseFindIndex; - -},{}],112:[function(require,module,exports){ -var Symbol = require('./_Symbol'), - getRawTag = require('./_getRawTag'), - objectToString = require('./_objectToString'); - -/** `Object#toString` result references. */ -var nullTag = '[object Null]', - undefinedTag = '[object Undefined]'; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ -function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; - } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); -} - -module.exports = baseGetTag; - -},{"./_Symbol":105,"./_getRawTag":138,"./_objectToString":147}],113:[function(require,module,exports){ -var baseFindIndex = require('./_baseFindIndex'), - baseIsNaN = require('./_baseIsNaN'), - strictIndexOf = require('./_strictIndexOf'); - -/** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); -} - -module.exports = baseIndexOf; - -},{"./_baseFindIndex":111,"./_baseIsNaN":114,"./_strictIndexOf":157}],114:[function(require,module,exports){ -/** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ -function baseIsNaN(value) { - return value !== value; -} - -module.exports = baseIsNaN; - -},{}],115:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isMasked = require('./_isMasked'), - isObject = require('./isObject'), - toSource = require('./_toSource'); - -/** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ -var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; - -/** Used to detect host constructors (Safari). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** Used for built-in method references. */ -var funcProto = Function.prototype, - objectProto = Object.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Used to detect if a method is native. */ -var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * The base implementation of `_.isNative` without bad shim checks. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. - */ -function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); -} - -module.exports = baseIsNative; - -},{"./_isMasked":144,"./_toSource":158,"./isFunction":164,"./isObject":165}],116:[function(require,module,exports){ -/** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ -function baseLodash() { - // No operation performed. -} - -module.exports = baseLodash; - -},{}],117:[function(require,module,exports){ -var identity = require('./identity'), - overRest = require('./_overRest'), - setToString = require('./_setToString'); - -/** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. - */ -function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); -} - -module.exports = baseRest; - -},{"./_overRest":148,"./_setToString":154,"./identity":162}],118:[function(require,module,exports){ -var identity = require('./identity'), - metaMap = require('./_metaMap'); - -/** - * The base implementation of `setData` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; -}; - -module.exports = baseSetData; - -},{"./_metaMap":146,"./identity":162}],119:[function(require,module,exports){ -var constant = require('./constant'), - defineProperty = require('./_defineProperty'), - identity = require('./identity'); - -/** - * The base implementation of `setToString` without support for hot loop shorting. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); -}; - -module.exports = baseSetToString; - -},{"./_defineProperty":132,"./constant":161,"./identity":162}],120:[function(require,module,exports){ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; -} - -module.exports = composeArgs; - -},{}],121:[function(require,module,exports){ -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. - * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. - */ -function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; -} - -module.exports = composeArgsRight; - -},{}],122:[function(require,module,exports){ -/** - * Copies the values of `source` to `array`. - * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. - * @returns {Array} Returns `array`. - */ -function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; - } - return array; -} - -module.exports = copyArray; - -},{}],123:[function(require,module,exports){ -var root = require('./_root'); - -/** Used to detect overreaching core-js shims. */ -var coreJsData = root['__core-js_shared__']; - -module.exports = coreJsData; - -},{"./_root":152}],124:[function(require,module,exports){ -/** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ -function countHolders(array, placeholder) { - var length = array.length, - result = 0; - - while (length--) { - if (array[length] === placeholder) { - ++result; - } - } - return result; -} - -module.exports = countHolders; - -},{}],125:[function(require,module,exports){ -var createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); - } - return wrapper; -} - -module.exports = createBind; - -},{"./_createCtor":126,"./_root":152}],126:[function(require,module,exports){ -var baseCreate = require('./_baseCreate'), - isObject = require('./isObject'); - -/** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. - * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. - */ -function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); - - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; -} - -module.exports = createCtor; - -},{"./_baseCreate":110,"./isObject":165}],127:[function(require,module,exports){ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - createHybrid = require('./_createHybrid'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** - * Creates a function that wraps `func` to enable currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); - - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); - } - return wrapper; -} - -module.exports = createCurry; - -},{"./_apply":107,"./_createCtor":126,"./_createHybrid":128,"./_createRecurry":130,"./_getHolder":136,"./_replaceHolders":151,"./_root":152}],128:[function(require,module,exports){ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - countHolders = require('./_countHolders'), - createCtor = require('./_createCtor'), - createRecurry = require('./_createRecurry'), - getHolder = require('./_getHolder'), - reorder = require('./_reorder'), - replaceHolders = require('./_replaceHolders'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_ARY_FLAG = 128, - WRAP_FLIP_FLAG = 512; - -/** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); - } - return wrapper; -} - -module.exports = createHybrid; - -},{"./_composeArgs":120,"./_composeArgsRight":121,"./_countHolders":124,"./_createCtor":126,"./_createRecurry":130,"./_getHolder":136,"./_reorder":150,"./_replaceHolders":151,"./_root":152}],129:[function(require,module,exports){ -var apply = require('./_apply'), - createCtor = require('./_createCtor'), - root = require('./_root'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1; - -/** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. - */ -function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; -} - -module.exports = createPartial; - -},{"./_apply":107,"./_createCtor":126,"./_root":152}],130:[function(require,module,exports){ -var isLaziable = require('./_isLaziable'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/** - * Creates a function that wraps `func` to continue currying. - * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); - } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); - } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); -} - -module.exports = createRecurry; - -},{"./_isLaziable":143,"./_setData":153,"./_setWrapToString":155}],131:[function(require,module,exports){ -var baseSetData = require('./_baseSetData'), - createBind = require('./_createBind'), - createCurry = require('./_createCurry'), - createHybrid = require('./_createHybrid'), - createPartial = require('./_createPartial'), - getData = require('./_getData'), - mergeData = require('./_mergeData'), - setData = require('./_setData'), - setWrapToString = require('./_setWrapToString'), - toInteger = require('./toInteger'); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. - * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. - */ -function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); -} - -module.exports = createWrap; - -},{"./_baseSetData":118,"./_createBind":125,"./_createCurry":127,"./_createHybrid":128,"./_createPartial":129,"./_getData":134,"./_mergeData":145,"./_setData":153,"./_setWrapToString":155,"./toInteger":171}],132:[function(require,module,exports){ -var getNative = require('./_getNative'); - -var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} -}()); - -module.exports = defineProperty; - -},{"./_getNative":137}],133:[function(require,module,exports){ -(function (global){ -/** Detect free variable `global` from Node.js. */ -var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; - -module.exports = freeGlobal; - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],134:[function(require,module,exports){ -var metaMap = require('./_metaMap'), - noop = require('./noop'); - -/** - * Gets metadata for `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. - */ -var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); -}; - -module.exports = getData; - -},{"./_metaMap":146,"./noop":168}],135:[function(require,module,exports){ -var realNames = require('./_realNames'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Gets the name of `func`. - * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. - */ -function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } - } - return result; -} - -module.exports = getFuncName; - -},{"./_realNames":149}],136:[function(require,module,exports){ -/** - * Gets the argument placeholder value for `func`. - * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ -function getHolder(func) { - var object = func; - return object.placeholder; -} - -module.exports = getHolder; - -},{}],137:[function(require,module,exports){ -var baseIsNative = require('./_baseIsNative'), - getValue = require('./_getValue'); - -/** - * Gets the native function at `key` of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. - */ -function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; -} - -module.exports = getNative; - -},{"./_baseIsNative":115,"./_getValue":139}],138:[function(require,module,exports){ -var Symbol = require('./_Symbol'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** Built-in value references. */ -var symToStringTag = Symbol ? Symbol.toStringTag : undefined; - -/** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. - */ -function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } - } - return result; -} - -module.exports = getRawTag; - -},{"./_Symbol":105}],139:[function(require,module,exports){ -/** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ -function getValue(object, key) { - return object == null ? undefined : object[key]; -} - -module.exports = getValue; - -},{}],140:[function(require,module,exports){ -/** Used to match wrap detail comments. */ -var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; - -/** - * Extracts wrapper details from the `source` body comment. - * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. - */ -function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; -} - -module.exports = getWrapDetails; - -},{}],141:[function(require,module,exports){ -/** Used to match wrap detail comments. */ -var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/; - -/** - * Inserts wrapper `details` in a comment at the top of the `source` body. - * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ -function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); -} - -module.exports = insertWrapDetails; - -},{}],142:[function(require,module,exports){ -/** Used as references for various `Number` constants. */ -var MAX_SAFE_INTEGER = 9007199254740991; - -/** Used to detect unsigned integer values. */ -var reIsUint = /^(?:0|[1-9]\d*)$/; - -/** - * Checks if `value` is a valid array-like index. - * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. - */ -function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && - (typeof value == 'number' || reIsUint.test(value)) && - (value > -1 && value % 1 == 0 && value < length); -} - -module.exports = isIndex; - -},{}],143:[function(require,module,exports){ -var LazyWrapper = require('./_LazyWrapper'), - getData = require('./_getData'), - getFuncName = require('./_getFuncName'), - lodash = require('./wrapperLodash'); - -/** - * Checks if `func` has a lazy counterpart. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. - */ -function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; - - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; - } - var data = getData(other); - return !!data && func === data[0]; -} - -module.exports = isLaziable; - -},{"./_LazyWrapper":103,"./_getData":134,"./_getFuncName":135,"./wrapperLodash":173}],144:[function(require,module,exports){ -var coreJsData = require('./_coreJsData'); - -/** Used to detect methods masquerading as native. */ -var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; -}()); - -/** - * Checks if `func` has its source masked. - * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ -function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); -} - -module.exports = isMasked; - -},{"./_coreJsData":123}],145:[function(require,module,exports){ -var composeArgs = require('./_composeArgs'), - composeArgsRight = require('./_composeArgsRight'), - replaceHolders = require('./_replaceHolders'); - -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Merges the function metadata of `source` into `data`. - * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. - * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ -function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; -} - -module.exports = mergeData; - -},{"./_composeArgs":120,"./_composeArgsRight":121,"./_replaceHolders":151}],146:[function(require,module,exports){ -var WeakMap = require('./_WeakMap'); - -/** Used to store function metadata. */ -var metaMap = WeakMap && new WeakMap; - -module.exports = metaMap; - -},{"./_WeakMap":106}],147:[function(require,module,exports){ -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. - */ -var nativeObjectToString = objectProto.toString; - -/** - * Converts `value` to a string using `Object.prototype.toString`. - * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. - */ -function objectToString(value) { - return nativeObjectToString.call(value); -} - -module.exports = objectToString; - -},{}],148:[function(require,module,exports){ -var apply = require('./_apply'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; - -/** - * A specialized version of `baseRest` which transforms the rest array. - * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ -function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; -} - -module.exports = overRest; - -},{"./_apply":107}],149:[function(require,module,exports){ -/** Used to lookup unminified function names. */ -var realNames = {}; - -module.exports = realNames; - -},{}],150:[function(require,module,exports){ -var copyArray = require('./_copyArray'), - isIndex = require('./_isIndex'); - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMin = Math.min; - -/** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. - * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ -function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; -} - -module.exports = reorder; - -},{"./_copyArray":122,"./_isIndex":142}],151:[function(require,module,exports){ -/** Used as the internal argument placeholder. */ -var PLACEHOLDER = '__lodash_placeholder__'; - -/** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ -function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; - } - } - return result; -} - -module.exports = replaceHolders; - -},{}],152:[function(require,module,exports){ -var freeGlobal = require('./_freeGlobal'); - -/** Detect free variable `self`. */ -var freeSelf = typeof self == 'object' && self && self.Object === Object && self; - -/** Used as a reference to the global object. */ -var root = freeGlobal || freeSelf || Function('return this')(); - -module.exports = root; - -},{"./_freeGlobal":133}],153:[function(require,module,exports){ -var baseSetData = require('./_baseSetData'), - shortOut = require('./_shortOut'); - -/** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. - * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ -var setData = shortOut(baseSetData); - -module.exports = setData; - -},{"./_baseSetData":118,"./_shortOut":156}],154:[function(require,module,exports){ -var baseSetToString = require('./_baseSetToString'), - shortOut = require('./_shortOut'); - -/** - * Sets the `toString` method of `func` to return `string`. - * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ -var setToString = shortOut(baseSetToString); - -module.exports = setToString; - -},{"./_baseSetToString":119,"./_shortOut":156}],155:[function(require,module,exports){ -var getWrapDetails = require('./_getWrapDetails'), - insertWrapDetails = require('./_insertWrapDetails'), - setToString = require('./_setToString'), - updateWrapDetails = require('./_updateWrapDetails'); - -/** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. - * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. - */ -function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); -} - -module.exports = setWrapToString; - -},{"./_getWrapDetails":140,"./_insertWrapDetails":141,"./_setToString":154,"./_updateWrapDetails":159}],156:[function(require,module,exports){ -/** Used to detect hot functions by number of calls within a span of milliseconds. */ -var HOT_COUNT = 800, - HOT_SPAN = 16; - -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeNow = Date.now; - -/** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. - * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. - */ -function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); - - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } - } else { - count = 0; - } - return func.apply(undefined, arguments); - }; -} - -module.exports = shortOut; - -},{}],157:[function(require,module,exports){ -/** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ -function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; - - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; -} - -module.exports = strictIndexOf; - -},{}],158:[function(require,module,exports){ -/** Used for built-in method references. */ -var funcProto = Function.prototype; - -/** Used to resolve the decompiled source of functions. */ -var funcToString = funcProto.toString; - -/** - * Converts `func` to its source code. - * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ -function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; -} - -module.exports = toSource; - -},{}],159:[function(require,module,exports){ -var arrayEach = require('./_arrayEach'), - arrayIncludes = require('./_arrayIncludes'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; - -/** Used to associate wrap methods with their bit flags. */ -var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] -]; - -/** - * Updates wrapper `details` based on `bitmask` flags. - * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. - */ -function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); - } - }); - return details.sort(); -} - -module.exports = updateWrapDetails; - -},{"./_arrayEach":108,"./_arrayIncludes":109}],160:[function(require,module,exports){ -var LazyWrapper = require('./_LazyWrapper'), - LodashWrapper = require('./_LodashWrapper'), - copyArray = require('./_copyArray'); - -/** - * Creates a clone of `wrapper`. - * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. - */ -function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; -} - -module.exports = wrapperClone; - -},{"./_LazyWrapper":103,"./_LodashWrapper":104,"./_copyArray":122}],161:[function(require,module,exports){ -/** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ -function constant(value) { - return function() { - return value; - }; -} - -module.exports = constant; - -},{}],162:[function(require,module,exports){ -/** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ -function identity(value) { - return value; -} - -module.exports = identity; - -},{}],163:[function(require,module,exports){ -/** - * Checks if `value` is classified as an `Array` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. - * @example - * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false - * - * _.isArray('abc'); - * // => false - * - * _.isArray(_.noop); - * // => false - */ -var isArray = Array.isArray; - -module.exports = isArray; - -},{}],164:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var asyncTag = '[object AsyncFunction]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - proxyTag = '[object Proxy]'; - -/** - * Checks if `value` is classified as a `Function` object. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - * - * _.isFunction(/abc/); - * // => false - */ -function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; -} - -module.exports = isFunction; - -},{"./_baseGetTag":112,"./isObject":165}],165:[function(require,module,exports){ -/** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(_.noop); - * // => true - * - * _.isObject(null); - * // => false - */ -function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); -} - -module.exports = isObject; - -},{}],166:[function(require,module,exports){ -/** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. - * @example - * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false - * - * _.isObjectLike(null); - * // => false - */ -function isObjectLike(value) { - return value != null && typeof value == 'object'; -} - -module.exports = isObjectLike; - -},{}],167:[function(require,module,exports){ -var baseGetTag = require('./_baseGetTag'), - isObjectLike = require('./isObjectLike'); - -/** `Object#toString` result references. */ -var symbolTag = '[object Symbol]'; - -/** - * Checks if `value` is classified as a `Symbol` primitive or object. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. - * @example - * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false - */ -function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); -} - -module.exports = isSymbol; - -},{"./_baseGetTag":112,"./isObjectLike":166}],168:[function(require,module,exports){ -/** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ -function noop() { - // No operation performed. -} - -module.exports = noop; - -},{}],169:[function(require,module,exports){ -var baseRest = require('./_baseRest'), - createWrap = require('./_createWrap'), - getHolder = require('./_getHolder'), - replaceHolders = require('./_replaceHolders'); - -/** Used to compose bitmasks for function metadata. */ -var WRAP_PARTIAL_FLAG = 32; - -/** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. - * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. - * - * @static - * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * function greet(greeting, name) { - * return greeting + ' ' + name; - * } - * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' - * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' - */ -var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); -}); - -// Assign default placeholders. -partial.placeholder = {}; - -module.exports = partial; - -},{"./_baseRest":117,"./_createWrap":131,"./_getHolder":136,"./_replaceHolders":151}],170:[function(require,module,exports){ -var toNumber = require('./toNumber'); - -/** Used as references for various `Number` constants. */ -var INFINITY = 1 / 0, - MAX_INTEGER = 1.7976931348623157e+308; - -/** - * Converts `value` to a finite number. - * - * @static - * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. - * @example - * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toFinite('3.2'); - * // => 3.2 - */ -function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; - } - return value === value ? value : 0; -} - -module.exports = toFinite; - -},{"./toNumber":172}],171:[function(require,module,exports){ -var toFinite = require('./toFinite'); - -/** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. - * @example - * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 - * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 - * - * _.toInteger('3.2'); - * // => 3 - */ -function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; -} - -module.exports = toInteger; - -},{"./toFinite":170}],172:[function(require,module,exports){ -var isObject = require('./isObject'), - isSymbol = require('./isSymbol'); - -/** Used as references for various `Number` constants. */ -var NAN = 0 / 0; - -/** Used to match leading and trailing whitespace. */ -var reTrim = /^\s+|\s+$/g; - -/** Used to detect bad signed hexadecimal string values. */ -var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - -/** Used to detect binary string values. */ -var reIsBinary = /^0b[01]+$/i; - -/** Used to detect octal string values. */ -var reIsOctal = /^0o[0-7]+$/i; - -/** Built-in method references without a dependency on `root`. */ -var freeParseInt = parseInt; - -/** - * Converts `value` to a number. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. - * @example - * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toNumber(Infinity); - * // => Infinity - * - * _.toNumber('3.2'); - * // => 3.2 - */ -function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ''); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); -} - -module.exports = toNumber; - -},{"./isObject":165,"./isSymbol":167}],173:[function(require,module,exports){ -var LazyWrapper = require('./_LazyWrapper'), - LodashWrapper = require('./_LodashWrapper'), - baseLodash = require('./_baseLodash'), - isArray = require('./isArray'), - isObjectLike = require('./isObjectLike'), - wrapperClone = require('./_wrapperClone'); - -/** Used for built-in method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ -function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } - } - return new LodashWrapper(value); -} - -// Ensure wrappers are instances of `baseLodash`. -lodash.prototype = baseLodash.prototype; -lodash.prototype.constructor = lodash; - -module.exports = lodash; - -},{"./_LazyWrapper":103,"./_LodashWrapper":104,"./_baseLodash":116,"./_wrapperClone":160,"./isArray":163,"./isObjectLike":166}],174:[function(require,module,exports){ -'use strict'; - -var proto = typeof Element !== 'undefined' ? Element.prototype : {}; -var vendor = proto.matches - || proto.matchesSelector - || proto.webkitMatchesSelector - || proto.mozMatchesSelector - || proto.msMatchesSelector - || proto.oMatchesSelector; - -module.exports = match; - -/** - * Match `el` to `selector`. - * - * @param {Element} el - * @param {String} selector - * @return {Boolean} - * @api public - */ - -function match(el, selector) { - if (!el || el.nodeType !== 1) return false; - if (vendor) return vendor.call(el, selector); - var nodes = el.parentNode.querySelectorAll(selector); - for (var i = 0; i < nodes.length; i++) { - if (nodes[i] == el) return true; - } - return false; -} - -},{}],175:[function(require,module,exports){ -// Underscore.js 1.8.3 -// http://underscorejs.org -// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` in the browser, or `exports` on the server. - var root = this; - - // Save the previous value of the `_` variable. - var previousUnderscore = root._; - - // Save bytes in the minified (but not gzipped) version: - var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype; - - // Create quick reference variables for speed access to core prototypes. - var - push = ArrayProto.push, - slice = ArrayProto.slice, - toString = ObjProto.toString, - hasOwnProperty = ObjProto.hasOwnProperty; - - // All **ECMAScript 5** native function implementations that we hope to use - // are declared here. - var - nativeIsArray = Array.isArray, - nativeKeys = Object.keys, - nativeBind = FuncProto.bind, - nativeCreate = Object.create; - - // Naked function reference for surrogate-prototype-swapping. - var Ctor = function(){}; - - // Create a safe reference to the Underscore object for use below. - var _ = function(obj) { - if (obj instanceof _) return obj; - if (!(this instanceof _)) return new _(obj); - this._wrapped = obj; - }; - - // Export the Underscore object for **Node.js**, with - // backwards-compatibility for the old `require()` API. If we're in - // the browser, add `_` as a global object. - if (typeof exports !== 'undefined') { - if (typeof module !== 'undefined' && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.8.3'; - - // Internal function that returns an efficient (for current engines) version - // of the passed-in callback, to be repeatedly applied in other Underscore - // functions. - var optimizeCb = function(func, context, argCount) { - if (context === void 0) return func; - switch (argCount == null ? 3 : argCount) { - case 1: return function(value) { - return func.call(context, value); - }; - case 2: return function(value, other) { - return func.call(context, value, other); - }; - case 3: return function(value, index, collection) { - return func.call(context, value, index, collection); - }; - case 4: return function(accumulator, value, index, collection) { - return func.call(context, accumulator, value, index, collection); - }; - } - return function() { - return func.apply(context, arguments); - }; - }; - - // A mostly-internal function to generate callbacks that can be applied - // to each element in a collection, returning the desired result — either - // identity, an arbitrary callback, a property matcher, or a property accessor. - var cb = function(value, context, argCount) { - if (value == null) return _.identity; - if (_.isFunction(value)) return optimizeCb(value, context, argCount); - if (_.isObject(value)) return _.matcher(value); - return _.property(value); - }; - _.iteratee = function(value, context) { - return cb(value, context, Infinity); - }; - - // An internal function for creating assigner functions. - var createAssigner = function(keysFunc, undefinedOnly) { - return function(obj) { - var length = arguments.length; - if (length < 2 || obj == null) return obj; - for (var index = 1; index < length; index++) { - var source = arguments[index], - keys = keysFunc(source), - l = keys.length; - for (var i = 0; i < l; i++) { - var key = keys[i]; - if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - }; - - // An internal function for creating a new object that inherits from another. - var baseCreate = function(prototype) { - if (!_.isObject(prototype)) return {}; - if (nativeCreate) return nativeCreate(prototype); - Ctor.prototype = prototype; - var result = new Ctor; - Ctor.prototype = null; - return result; - }; - - var property = function(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - }; - - // Helper for collection methods to determine whether a collection - // should be iterated as an array or as an object - // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength - // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 - var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; - var getLength = property('length'); - var isArrayLike = function(collection) { - var length = getLength(collection); - return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX; - }; - - // Collection Functions - // -------------------- - - // The cornerstone, an `each` implementation, aka `forEach`. - // Handles raw objects in addition to array-likes. Treats all - // sparse array-likes as if they were dense. - _.each = _.forEach = function(obj, iteratee, context) { - iteratee = optimizeCb(iteratee, context); - var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { - var keys = _.keys(obj); - for (i = 0, length = keys.length; i < length; i++) { - iteratee(obj[keys[i]], keys[i], obj); - } - } - return obj; - }; - - // Return the results of applying the iteratee to each element. - _.map = _.collect = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - results = Array(length); - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - results[index] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Create a reducing function iterating left or right. - function createReduce(dir) { - // Optimized iterator function as using arguments.length - // in the main function will deoptimize the, see #1991. - function iterator(obj, iteratee, memo, keys, index, length) { - for (; index >= 0 && index < length; index += dir) { - var currentKey = keys ? keys[index] : index; - memo = iteratee(memo, obj[currentKey], currentKey, obj); - } - return memo; - } - - return function(obj, iteratee, memo, context) { - iteratee = optimizeCb(iteratee, context, 4); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - index = dir > 0 ? 0 : length - 1; - // Determine the initial value if none is provided. - if (arguments.length < 3) { - memo = obj[keys ? keys[index] : index]; - index += dir; - } - return iterator(obj, iteratee, memo, keys, index, length); - }; - } - - // **Reduce** builds up a single result from a list of values, aka `inject`, - // or `foldl`. - _.reduce = _.foldl = _.inject = createReduce(1); - - // The right-associative version of reduce, also known as `foldr`. - _.reduceRight = _.foldr = createReduce(-1); - - // Return the first value which passes a truth test. Aliased as `detect`. - _.find = _.detect = function(obj, predicate, context) { - var key; - if (isArrayLike(obj)) { - key = _.findIndex(obj, predicate, context); - } else { - key = _.findKey(obj, predicate, context); - } - if (key !== void 0 && key !== -1) return obj[key]; - }; - - // Return all the elements that pass a truth test. - // Aliased as `select`. - _.filter = _.select = function(obj, predicate, context) { - var results = []; - predicate = cb(predicate, context); - _.each(obj, function(value, index, list) { - if (predicate(value, index, list)) results.push(value); - }); - return results; - }; - - // Return all the elements for which a truth test fails. - _.reject = function(obj, predicate, context) { - return _.filter(obj, _.negate(cb(predicate)), context); - }; - - // Determine whether all of the elements match a truth test. - // Aliased as `all`. - _.every = _.all = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (!predicate(obj[currentKey], currentKey, obj)) return false; - } - return true; - }; - - // Determine if at least one element in the object matches a truth test. - // Aliased as `any`. - _.some = _.any = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length; - for (var index = 0; index < length; index++) { - var currentKey = keys ? keys[index] : index; - if (predicate(obj[currentKey], currentKey, obj)) return true; - } - return false; - }; - - // Determine if the array or object contains a given item (using `===`). - // Aliased as `includes` and `include`. - _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - if (typeof fromIndex != 'number' || guard) fromIndex = 0; - return _.indexOf(obj, item, fromIndex) >= 0; - }; - - // Invoke a method (with arguments) on every item in a collection. - _.invoke = function(obj, method) { - var args = slice.call(arguments, 2); - var isFunc = _.isFunction(method); - return _.map(obj, function(value) { - var func = isFunc ? method : value[method]; - return func == null ? func : func.apply(value, args); - }); - }; - - // Convenience version of a common use case of `map`: fetching a property. - _.pluck = function(obj, key) { - return _.map(obj, _.property(key)); - }; - - // Convenience version of a common use case of `filter`: selecting only objects - // containing specific `key:value` pairs. - _.where = function(obj, attrs) { - return _.filter(obj, _.matcher(attrs)); - }; - - // Convenience version of a common use case of `find`: getting the first object - // containing specific `key:value` pairs. - _.findWhere = function(obj, attrs) { - return _.find(obj, _.matcher(attrs)); - }; - - // Return the maximum element (or element-based computation). - _.max = function(obj, iteratee, context) { - var result = -Infinity, lastComputed = -Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Return the minimum element (or element-based computation). - _.min = function(obj, iteratee, context) { - var result = Infinity, lastComputed = Infinity, - value, computed; - if (iteratee == null && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(value, index, list) { - computed = iteratee(value, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = value; - lastComputed = computed; - } - }); - } - return result; - }; - - // Shuffle a collection, using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - _.shuffle = function(obj) { - var set = isArrayLike(obj) ? obj : _.values(obj); - var length = set.length; - var shuffled = Array(length); - for (var index = 0, rand; index < length; index++) { - rand = _.random(0, index); - if (rand !== index) shuffled[index] = shuffled[rand]; - shuffled[rand] = set[index]; - } - return shuffled; - }; - - // Sample **n** random values from a collection. - // If **n** is not specified, returns a single random element. - // The internal `guard` argument allows it to work with `map`. - _.sample = function(obj, n, guard) { - if (n == null || guard) { - if (!isArrayLike(obj)) obj = _.values(obj); - return obj[_.random(obj.length - 1)]; - } - return _.shuffle(obj).slice(0, Math.max(0, n)); - }; - - // Sort the object's values by a criterion produced by an iteratee. - _.sortBy = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - return _.pluck(_.map(obj, function(value, index, list) { - return { - value: value, - index: index, - criteria: iteratee(value, index, list) - }; - }).sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }), 'value'); - }; - - // An internal function used for aggregate "group by" operations. - var group = function(behavior) { - return function(obj, iteratee, context) { - var result = {}; - iteratee = cb(iteratee, context); - _.each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); - }); - return result; - }; - }; - - // Groups the object's values by a criterion. Pass either a string attribute - // to group by, or a function that returns the criterion. - _.groupBy = group(function(result, value, key) { - if (_.has(result, key)) result[key].push(value); else result[key] = [value]; - }); - - // Indexes the object's values by a criterion, similar to `groupBy`, but for - // when you know that your index values will be unique. - _.indexBy = group(function(result, value, key) { - result[key] = value; - }); - - // Counts instances of an object that group by a certain criterion. Pass - // either a string attribute to count by, or a function that returns the - // criterion. - _.countBy = group(function(result, value, key) { - if (_.has(result, key)) result[key]++; else result[key] = 1; - }); - - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (isArrayLike(obj)) return _.map(obj, _.identity); - return _.values(obj); - }; - - // Return the number of elements in an object. - _.size = function(obj) { - if (obj == null) return 0; - return isArrayLike(obj) ? obj.length : _.keys(obj).length; - }; - - // Split a collection into two arrays: one whose elements all satisfy the given - // predicate, and one whose elements all do not satisfy the predicate. - _.partition = function(obj, predicate, context) { - predicate = cb(predicate, context); - var pass = [], fail = []; - _.each(obj, function(value, key, obj) { - (predicate(value, key, obj) ? pass : fail).push(value); - }); - return [pass, fail]; - }; - - // Array Functions - // --------------- - - // Get the first element of an array. Passing **n** will return the first N - // values in the array. Aliased as `head` and `take`. The **guard** check - // allows it to work with `_.map`. - _.first = _.head = _.take = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[0]; - return _.initial(array, array.length - n); - }; - - // Returns everything but the last entry of the array. Especially useful on - // the arguments object. Passing **n** will return all the values in - // the array, excluding the last N. - _.initial = function(array, n, guard) { - return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); - }; - - // Get the last element of an array. Passing **n** will return the last N - // values in the array. - _.last = function(array, n, guard) { - if (array == null) return void 0; - if (n == null || guard) return array[array.length - 1]; - return _.rest(array, Math.max(0, array.length - n)); - }; - - // Returns everything but the first entry of the array. Aliased as `tail` and `drop`. - // Especially useful on the arguments object. Passing an **n** will return - // the rest N values in the array. - _.rest = _.tail = _.drop = function(array, n, guard) { - return slice.call(array, n == null || guard ? 1 : n); - }; - - // Trim out all falsy values from an array. - _.compact = function(array) { - return _.filter(array, _.identity); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, strict, startIndex) { - var output = [], idx = 0; - for (var i = startIndex || 0, length = getLength(input); i < length; i++) { - var value = input[i]; - if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) { - //flatten current level of array or arguments object - if (!shallow) value = flatten(value, shallow, strict); - var j = 0, len = value.length; - output.length += len; - while (j < len) { - output[idx++] = value[j++]; - } - } else if (!strict) { - output[idx++] = value; - } - } - return output; - }; - - // Flatten out an array, either recursively (by default), or just one level. - _.flatten = function(array, shallow) { - return flatten(array, shallow, false); - }; - - // Return a version of the array that does not contain the specified value(s). - _.without = function(array) { - return _.difference(array, slice.call(arguments, 1)); - }; - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // Aliased as `unique`. - _.uniq = _.unique = function(array, isSorted, iteratee, context) { - if (!_.isBoolean(isSorted)) { - context = iteratee; - iteratee = isSorted; - isSorted = false; - } - if (iteratee != null) iteratee = cb(iteratee, context); - var result = []; - var seen = []; - for (var i = 0, length = getLength(array); i < length; i++) { - var value = array[i], - computed = iteratee ? iteratee(value, i, array) : value; - if (isSorted) { - if (!i || seen !== computed) result.push(value); - seen = computed; - } else if (iteratee) { - if (!_.contains(seen, computed)) { - seen.push(computed); - result.push(value); - } - } else if (!_.contains(result, value)) { - result.push(value); - } - } - return result; - }; - - // Produce an array that contains the union: each distinct element from all of - // the passed-in arrays. - _.union = function() { - return _.uniq(flatten(arguments, true, true)); - }; - - // Produce an array that contains every item shared between all the - // passed-in arrays. - _.intersection = function(array) { - var result = []; - var argsLength = arguments.length; - for (var i = 0, length = getLength(array); i < length; i++) { - var item = array[i]; - if (_.contains(result, item)) continue; - for (var j = 1; j < argsLength; j++) { - if (!_.contains(arguments[j], item)) break; - } - if (j === argsLength) result.push(item); - } - return result; - }; - - // Take the difference between one array and a number of other arrays. - // Only the elements present in just the first array will remain. - _.difference = function(array) { - var rest = flatten(arguments, true, true, 1); - return _.filter(array, function(value){ - return !_.contains(rest, value); - }); - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = function() { - return _.unzip(arguments); - }; - - // Complement of _.zip. Unzip accepts an array of arrays and groups - // each array's elements on shared indices - _.unzip = function(array) { - var length = array && _.max(array, getLength).length || 0; - var result = Array(length); - - for (var index = 0; index < length; index++) { - result[index] = _.pluck(array, index); - } - return result; - }; - - // Converts lists into objects. Pass either a single array of `[key, value]` - // pairs, or two parallel arrays of the same length -- one of keys, and one of - // the corresponding values. - _.object = function(list, values) { - var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } - return result; - }; - - // Generator function to create the findIndex and findLastIndex functions - function createPredicateIndexFinder(dir) { - return function(array, predicate, context) { - predicate = cb(predicate, context); - var length = getLength(array); - var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } - return -1; - }; - } - - // Returns the first index on an array-like that passes a predicate test - _.findIndex = createPredicateIndexFinder(1); - _.findLastIndex = createPredicateIndexFinder(-1); - - // Use a comparator function to figure out the smallest index at which - // an object should be inserted so as to maintain order. Uses binary search. - _.sortedIndex = function(array, obj, iteratee, context) { - iteratee = cb(iteratee, context, 1); - var value = iteratee(obj); - var low = 0, high = getLength(array); - while (low < high) { - var mid = Math.floor((low + high) / 2); - if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; - } - return low; - }; - - // Generator function to create the indexOf and lastIndexOf functions - function createIndexFinder(dir, predicateFind, sortedIndex) { - return function(array, item, idx) { - var i = 0, length = getLength(array); - if (typeof idx == 'number') { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { - idx = sortedIndex(array, item); - return array[idx] === item ? idx : -1; - } - if (item !== item) { - idx = predicateFind(slice.call(array, i, length), _.isNaN); - return idx >= 0 ? idx + i : -1; - } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } - return -1; - }; - } - - // Return the position of the first occurrence of an item in an array, - // or -1 if the item is not included in the array. - // If the array is large and already in sort order, pass `true` - // for **isSorted** to use binary search. - _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex); - _.lastIndexOf = createIndexFinder(-1, _.findLastIndex); - - // Generate an integer Array containing an arithmetic progression. A port of - // the native Python `range()` function. See - // [the Python documentation](http://docs.python.org/library/functions.html#range). - _.range = function(start, stop, step) { - if (stop == null) { - stop = start || 0; - start = 0; - } - step = step || 1; - - var length = Math.max(Math.ceil((stop - start) / step), 0); - var range = Array(length); - - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } - - return range; - }; - - // Function (ahem) Functions - // ------------------ - - // Determines whether to execute a function as a constructor - // or a normal function with the provided arguments - var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) { - if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); - var self = baseCreate(sourceFunc.prototype); - var result = sourceFunc.apply(self, args); - if (_.isObject(result)) return result; - return self; - }; - - // Create a function bound to a given object (assigning `this`, and arguments, - // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if - // available. - _.bind = function(func, context) { - if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1)); - if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); - var args = slice.call(arguments, 2); - var bound = function() { - return executeBound(func, bound, context, this, args.concat(slice.call(arguments))); - }; - return bound; - }; - - // Partially apply a function by creating a version that has had some of its - // arguments pre-filled, without changing its dynamic `this` context. _ acts - // as a placeholder, allowing any combination of arguments to be pre-filled. - _.partial = function(func) { - var boundArgs = slice.call(arguments, 1); - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }; - - // Bind a number of an object's methods to that object. Remaining arguments - // are the method names to be bound. Useful for ensuring that all callbacks - // defined on an object belong to it. - _.bindAll = function(obj) { - var i, length = arguments.length, key; - if (length <= 1) throw new Error('bindAll must be passed function names'); - for (i = 1; i < length; i++) { - key = arguments[i]; - obj[key] = _.bind(obj[key], obj); - } - return obj; - }; - - // Memoize an expensive function by storing its results. - _.memoize = function(func, hasher) { - var memoize = function(key) { - var cache = memoize.cache; - var address = '' + (hasher ? hasher.apply(this, arguments) : key); - if (!_.has(cache, address)) cache[address] = func.apply(this, arguments); - return cache[address]; - }; - memoize.cache = {}; - return memoize; - }; - - // Delays a function for the given number of milliseconds, and then calls - // it with the arguments supplied. - _.delay = function(func, wait) { - var args = slice.call(arguments, 2); - return setTimeout(function(){ - return func.apply(null, args); - }, wait); - }; - - // Defers a function, scheduling it to run after the current call stack has - // cleared. - _.defer = _.partial(_.delay, _, 1); - - // Returns a function, that, when invoked, will only be triggered at most once - // during a given window of time. Normally, the throttled function will run - // as much as it can, without ever going more than once per `wait` duration; - // but if you'd like to disable the execution on the leading edge, pass - // `{leading: false}`. To disable execution on the trailing edge, ditto. - _.throttle = function(func, wait, options) { - var context, args, result; - var timeout = null; - var previous = 0; - if (!options) options = {}; - var later = function() { - previous = options.leading === false ? 0 : _.now(); - timeout = null; - result = func.apply(context, args); - if (!timeout) context = args = null; - }; - return function() { - var now = _.now(); - if (!previous && options.leading === false) previous = now; - var remaining = wait - (now - previous); - context = this; - args = arguments; - if (remaining <= 0 || remaining > wait) { - if (timeout) { - clearTimeout(timeout); - timeout = null; - } - previous = now; - result = func.apply(context, args); - if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } - return result; - }; - }; - - // Returns a function, that, as long as it continues to be invoked, will not - // be triggered. The function will be called after it stops being called for - // N milliseconds. If `immediate` is passed, trigger the function on the - // leading edge, instead of the trailing. - _.debounce = function(func, wait, immediate) { - var timeout, args, context, timestamp, result; - - var later = function() { - var last = _.now() - timestamp; - - if (last < wait && last >= 0) { - timeout = setTimeout(later, wait - last); - } else { - timeout = null; - if (!immediate) { - result = func.apply(context, args); - if (!timeout) context = args = null; - } - } - }; - - return function() { - context = this; - args = arguments; - timestamp = _.now(); - var callNow = immediate && !timeout; - if (!timeout) timeout = setTimeout(later, wait); - if (callNow) { - result = func.apply(context, args); - context = args = null; - } - - return result; - }; - }; - - // Returns the first function passed as an argument to the second, - // allowing you to adjust arguments, run code before and after, and - // conditionally execute the original function. - _.wrap = function(func, wrapper) { - return _.partial(wrapper, func); - }; - - // Returns a negated version of the passed-in predicate. - _.negate = function(predicate) { - return function() { - return !predicate.apply(this, arguments); - }; - }; - - // Returns a function that is the composition of a list of functions, each - // consuming the return value of the function that follows. - _.compose = function() { - var args = arguments; - var start = args.length - 1; - return function() { - var i = start; - var result = args[start].apply(this, arguments); - while (i--) result = args[i].call(this, result); - return result; - }; - }; - - // Returns a function that will only be executed on and after the Nth call. - _.after = function(times, func) { - return function() { - if (--times < 1) { - return func.apply(this, arguments); - } - }; - }; - - // Returns a function that will only be executed up to (but not including) the Nth call. - _.before = function(times, func) { - var memo; - return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } - if (times <= 1) func = null; - return memo; - }; - }; - - // Returns a function that will be executed at most one time, no matter how - // often you call it. Useful for lazy initialization. - _.once = _.partial(_.before, 2); - - // Object Functions - // ---------------- - - // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. - var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); - var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', - 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; - - function collectNonEnumProps(obj, keys) { - var nonEnumIdx = nonEnumerableProps.length; - var constructor = obj.constructor; - var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto; - - // Constructor is a special case. - var prop = 'constructor'; - if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop); - - while (nonEnumIdx--) { - prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) { - keys.push(prop); - } - } - } - - // Retrieve the names of an object's own properties. - // Delegates to **ECMAScript 5**'s native `Object.keys` - _.keys = function(obj) { - if (!_.isObject(obj)) return []; - if (nativeKeys) return nativeKeys(obj); - var keys = []; - for (var key in obj) if (_.has(obj, key)) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve all the property names of an object. - _.allKeys = function(obj) { - if (!_.isObject(obj)) return []; - var keys = []; - for (var key in obj) keys.push(key); - // Ahem, IE < 9. - if (hasEnumBug) collectNonEnumProps(obj, keys); - return keys; - }; - - // Retrieve the values of an object's properties. - _.values = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[keys[i]]; - } - return values; - }; - - // Returns the results of applying the iteratee to each element of the object - // In contrast to _.map it returns an object - _.mapObject = function(obj, iteratee, context) { - iteratee = cb(iteratee, context); - var keys = _.keys(obj), - length = keys.length, - results = {}, - currentKey; - for (var index = 0; index < length; index++) { - currentKey = keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Convert an object into a list of `[key, value]` pairs. - _.pairs = function(obj) { - var keys = _.keys(obj); - var length = keys.length; - var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [keys[i], obj[keys[i]]]; - } - return pairs; - }; - - // Invert the keys and values of an object. The values must be serializable. - _.invert = function(obj) { - var result = {}; - var keys = _.keys(obj); - for (var i = 0, length = keys.length; i < length; i++) { - result[obj[keys[i]]] = keys[i]; - } - return result; - }; - - // Return a sorted list of the function names available on the object. - // Aliased as `methods` - _.functions = _.methods = function(obj) { - var names = []; - for (var key in obj) { - if (_.isFunction(obj[key])) names.push(key); - } - return names.sort(); - }; - - // Extend a given object with all the properties in passed-in object(s). - _.extend = createAssigner(_.allKeys); - - // Assigns a given object with all the own properties in the passed-in object(s) - // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) - _.extendOwn = _.assign = createAssigner(_.keys); - - // Returns the first key on an object that passes a predicate test - _.findKey = function(obj, predicate, context) { - predicate = cb(predicate, context); - var keys = _.keys(obj), key; - for (var i = 0, length = keys.length; i < length; i++) { - key = keys[i]; - if (predicate(obj[key], key, obj)) return key; - } - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = function(object, oiteratee, context) { - var result = {}, obj = object, iteratee, keys; - if (obj == null) return result; - if (_.isFunction(oiteratee)) { - keys = _.allKeys(obj); - iteratee = optimizeCb(oiteratee, context); - } else { - keys = flatten(arguments, false, false, 1); - iteratee = function(value, key, obj) { return key in obj; }; - obj = Object(obj); - } - for (var i = 0, length = keys.length; i < length; i++) { - var key = keys[i]; - var value = obj[key]; - if (iteratee(value, key, obj)) result[key] = value; - } - return result; - }; - - // Return a copy of the object without the blacklisted properties. - _.omit = function(obj, iteratee, context) { - if (_.isFunction(iteratee)) { - iteratee = _.negate(iteratee); - } else { - var keys = _.map(flatten(arguments, false, false, 1), String); - iteratee = function(value, key) { - return !_.contains(keys, key); - }; - } - return _.pick(obj, iteratee, context); - }; - - // Fill in a given object with default properties. - _.defaults = createAssigner(_.allKeys, true); - - // Creates an object that inherits from the given prototype object. - // If additional properties are provided then they will be added to the - // created object. - _.create = function(prototype, props) { - var result = baseCreate(prototype); - if (props) _.extendOwn(result, props); - return result; - }; - - // Create a (shallow-cloned) duplicate of an object. - _.clone = function(obj) { - if (!_.isObject(obj)) return obj; - return _.isArray(obj) ? obj.slice() : _.extend({}, obj); - }; - - // Invokes interceptor with the obj, and then returns obj. - // The primary purpose of this method is to "tap into" a method chain, in - // order to perform operations on intermediate results within the chain. - _.tap = function(obj, interceptor) { - interceptor(obj); - return obj; - }; - - // Returns whether an object has a given set of `key:value` pairs. - _.isMatch = function(object, attrs) { - var keys = _.keys(attrs), length = keys.length; - if (object == null) return !length; - var obj = Object(object); - for (var i = 0; i < length; i++) { - var key = keys[i]; - if (attrs[key] !== obj[key] || !(key in obj)) return false; - } - return true; - }; - - - // Internal recursive comparison function for `isEqual`. - var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a === 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - if (a instanceof _) a = a._wrapped; - if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className !== toString.call(b)) return false; - switch (className) { - // Strings, numbers, regular expressions, dates, and booleans are compared by value. - case '[object RegExp]': - // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return '' + a === '' + b; - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. - // Object(NaN) is equivalent to NaN - if (+a !== +a) return +b !== +b; - // An `egal` comparison is performed for other numeric values. - return +a === 0 ? 1 / +a === 1 / b : +a === +b; - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a === +b; - } - - var areArrays = className === '[object Array]'; - if (!areArrays) { - if (typeof a != 'object' || typeof b != 'object') return false; - - // Objects with different constructors are not equivalent, but `Object`s or `Array`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && - _.isFunction(bCtor) && bCtor instanceof bCtor) - && ('constructor' in a && 'constructor' in b)) { - return false; - } - } - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - - // Initializing stack of traversed objects. - // It's done here since we only need them for objects and arrays comparison. - aStack = aStack || []; - bStack = bStack || []; - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] === a) return bStack[length] === b; - } - - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - - // Recursively compare objects and arrays. - if (areArrays) { - // Compare array lengths to determine if a deep comparison is necessary. - length = a.length; - if (length !== b.length) return false; - // Deep compare the contents, ignoring non-numeric properties. - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } - } else { - // Deep compare objects. - var keys = _.keys(a), key; - length = keys.length; - // Ensure that both objects contain the same number of properties before comparing deep equality. - if (_.keys(b).length !== length) return false; - while (length--) { - // Deep compare each member - key = keys[length]; - if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return true; - }; - - // Perform a deep comparison to check if two objects are equal. - _.isEqual = function(a, b) { - return eq(a, b); - }; - - // Is a given array, string, or object empty? - // An "empty" object has no enumerable own-properties. - _.isEmpty = function(obj) { - if (obj == null) return true; - if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0; - return _.keys(obj).length === 0; - }; - - // Is a given value a DOM element? - _.isElement = function(obj) { - return !!(obj && obj.nodeType === 1); - }; - - // Is a given value an array? - // Delegates to ECMA5's native Array.isArray - _.isArray = nativeIsArray || function(obj) { - return toString.call(obj) === '[object Array]'; - }; - - // Is a given variable an object? - _.isObject = function(obj) { - var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; - }; - - // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError. - _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) { - _['is' + name] = function(obj) { - return toString.call(obj) === '[object ' + name + ']'; - }; - }); - - // Define a fallback version of the method in browsers (ahem, IE < 9), where - // there isn't any inspectable "Arguments" type. - if (!_.isArguments(arguments)) { - _.isArguments = function(obj) { - return _.has(obj, 'callee'); - }; - } - - // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8, - // IE 11 (#1621), and in Safari 8 (#1929). - if (typeof /./ != 'function' && typeof Int8Array != 'object') { - _.isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? (NaN is the only number which does not equal itself). - _.isNaN = function(obj) { - return _.isNumber(obj) && obj !== +obj; - }; - - // Is a given value a boolean? - _.isBoolean = function(obj) { - return obj === true || obj === false || toString.call(obj) === '[object Boolean]'; - }; - - // Is a given value equal to null? - _.isNull = function(obj) { - return obj === null; - }; - - // Is a given variable undefined? - _.isUndefined = function(obj) { - return obj === void 0; - }; - - // Shortcut function for checking if an object has a given property directly - // on itself (in other words, not on a prototype). - _.has = function(obj, key) { - return obj != null && hasOwnProperty.call(obj, key); - }; - - // Utility Functions - // ----------------- - - // Run Underscore.js in *noConflict* mode, returning the `_` variable to its - // previous owner. Returns a reference to the Underscore object. - _.noConflict = function() { - root._ = previousUnderscore; - return this; - }; - - // Keep the identity function around for default iteratees. - _.identity = function(value) { - return value; - }; - - // Predicate-generating functions. Often useful outside of Underscore. - _.constant = function(value) { - return function() { - return value; - }; - }; - - _.noop = function(){}; - - _.property = property; - - // Generates a function for a given object that returns a given property. - _.propertyOf = function(obj) { - return obj == null ? function(){} : function(key) { - return obj[key]; - }; - }; - - // Returns a predicate for checking whether an object has a given set of - // `key:value` pairs. - _.matcher = _.matches = function(attrs) { - attrs = _.extendOwn({}, attrs); - return function(obj) { - return _.isMatch(obj, attrs); - }; - }; - - // Run a function **n** times. - _.times = function(n, iteratee, context) { - var accum = Array(Math.max(0, n)); - iteratee = optimizeCb(iteratee, context, 1); - for (var i = 0; i < n; i++) accum[i] = iteratee(i); - return accum; - }; - - // Return a random integer between min and max (inclusive). - _.random = function(min, max) { - if (max == null) { - max = min; - min = 0; - } - return min + Math.floor(Math.random() * (max - min + 1)); - }; - - // A (possibly faster) way to get the current timestamp as an integer. - _.now = Date.now || function() { - return new Date().getTime(); - }; - - // List of HTML entities for escaping. - var escapeMap = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''', - '`': '`' - }; - var unescapeMap = _.invert(escapeMap); - - // Functions for escaping and unescaping strings to/from HTML interpolation. - var createEscaper = function(map) { - var escaper = function(match) { - return map[match]; - }; - // Regexes for identifying a key that needs to be escaped - var source = '(?:' + _.keys(map).join('|') + ')'; - var testRegexp = RegExp(source); - var replaceRegexp = RegExp(source, 'g'); - return function(string) { - string = string == null ? '' : '' + string; - return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; - }; - }; - _.escape = createEscaper(escapeMap); - _.unescape = createEscaper(unescapeMap); - - // If the value of the named `property` is a function then invoke it with the - // `object` as context; otherwise, return it. - _.result = function(object, property, fallback) { - var value = object == null ? void 0 : object[property]; - if (value === void 0) { - value = fallback; - } - return _.isFunction(value) ? value.call(object) : value; - }; - - // Generate a unique integer id (unique within the entire client session). - // Useful for temporary DOM ids. - var idCounter = 0; - _.uniqueId = function(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; - }; - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\u2028|\u2029/g; - - var escapeChar = function(match) { - return '\\' + escapes[match]; - }; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - // NB: `oldSettings` only exists for backwards compatibility. - _.template = function(text, settings, oldSettings) { - if (!settings && oldSettings) settings = oldSettings; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset).replace(escaper, escapeChar); - index = offset + match.length; - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - - // Adobe VMs need the match returned to produce the correct offest. - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + 'return __p;\n'; - - try { - var render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled source as a convenience for precompilation. - var argument = settings.variable || 'obj'; - template.source = 'function(' + argument + '){\n' + source + '}'; - - return template; - }; - - // Add a "chain" function. Start chaining a wrapped Underscore object. - _.chain = function(obj) { - var instance = _(obj); - instance._chain = true; - return instance; - }; - - // OOP - // --------------- - // If Underscore is called as a function, it returns a wrapped object that - // can be used OO-style. This wrapper holds altered versions of all the - // underscore functions. Wrapped objects may be chained. - - // Helper function to continue chaining intermediate results. - var result = function(instance, obj) { - return instance._chain ? _(obj).chain() : obj; - }; - - // Add your own custom functions to the Underscore object. - _.mixin = function(obj) { - _.each(_.functions(obj), function(name) { - var func = _[name] = obj[name]; - _.prototype[name] = function() { - var args = [this._wrapped]; - push.apply(args, arguments); - return result(this, func.apply(_, args)); - }; - }); - }; - - // Add all of the Underscore functions to the wrapper object. - _.mixin(_); - - // Add all mutator Array functions to the wrapper. - _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - var obj = this._wrapped; - method.apply(obj, arguments); - if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0]; - return result(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - _.each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return result(this, method.apply(this._wrapped, arguments)); - }; - }); - - // Extracts the result from a wrapped and chained object. - _.prototype.value = function() { - return this._wrapped; - }; - - // Provide unwrapping proxy for some methods used in engine operations - // such as arithmetic and JSON stringification. - _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; - - _.prototype.toString = function() { - return '' + this._wrapped; - }; - - // AMD registration happens at the end for compatibility with AMD loaders - // that may not enforce next-turn semantics on modules. Even though general - // practice for AMD registration is to be anonymous, underscore registers - // as a named module because, like jQuery, it is a base library that is - // popular enough to be bundled in a third party lib, but not be part of - // an AMD load request. Those cases could generate an error when an - // anonymous define() is called outside of a loader request. - if (typeof define === 'function' && define.amd) { - define('underscore', [], function() { - return _; - }); - } -}.call(this)); - -},{}]},{},[1]); diff --git a/examples/ariatemplates/.gitignore b/examples/ariatemplates/.gitignore deleted file mode 100644 index c85575bcf7..0000000000 --- a/examples/ariatemplates/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -node_modules/todomvc-app-css -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common -!node_modules/todomvc-common/base.js -!node_modules/todomvc-common/base.css diff --git a/examples/ariatemplates/index.html b/examples/ariatemplates/index.html deleted file mode 100644 index ddf5ca9643..0000000000 --- a/examples/ariatemplates/index.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Aria Templates • TodoMVC - - - - -
    -
    - - - - - - - - diff --git a/examples/ariatemplates/js/ITodoCtrl.js b/examples/ariatemplates/js/ITodoCtrl.js deleted file mode 100644 index cb9a095b49..0000000000 --- a/examples/ariatemplates/js/ITodoCtrl.js +++ /dev/null @@ -1,13 +0,0 @@ -/* global Aria:true */ -'use strict'; - -Aria.interfaceDefinition({ - $classpath: 'js.ITodoCtrl', - $extends: 'aria.templates.IModuleCtrl', - - $interface: { - saveTasks: function () {}, - addTask: function (description) {}, - deleteTask: function (idx) {} - } -}); diff --git a/examples/ariatemplates/js/TodoCtrl.js b/examples/ariatemplates/js/TodoCtrl.js deleted file mode 100644 index 5ebe5ca4ad..0000000000 --- a/examples/ariatemplates/js/TodoCtrl.js +++ /dev/null @@ -1,40 +0,0 @@ -/* global aria:true, Aria:true */ -'use strict'; - -Aria.classDefinition({ - $classpath: 'js.TodoCtrl', - $extends: 'aria.templates.ModuleCtrl', - $implements: ['js.ITodoCtrl'], - $dependencies: ['aria.storage.LocalStorage'], - - $statics: { - STORAGE_NAME: 'todos-ariatemplates' - }, - - $constructor: function (storagename) { - var tasklist; - this.$ModuleCtrl.constructor.call(this); - this._storage = new aria.storage.LocalStorage(); - this.__storagename = storagename || this.STORAGE_NAME; - tasklist = this._storage.getItem(this.__storagename); - this.setData({ - todolist: (tasklist ? tasklist : []) - }); - }, - - $prototype: { - $publicInterfaceName: 'js.ITodoCtrl', - - saveTasks: function () { - this._storage.setItem(this.__storagename, this._data.todolist); - }, - - addTask: function (description) { - this.json.add(this._data.todolist, {title: description, completed: false}); - }, - - deleteTask: function (idx) { - this.json.removeAt(this._data.todolist, idx); - } - } -}); diff --git a/examples/ariatemplates/js/lib/aria/ariatemplates-1.3.5.js b/examples/ariatemplates/js/lib/aria/ariatemplates-1.3.5.js deleted file mode 100644 index 1880a51027..0000000000 --- a/examples/ariatemplates/js/lib/aria/ariatemplates-1.3.5.js +++ /dev/null @@ -1,281 +0,0 @@ -/* - * Aria Templates 1.3.5 - 22 Feb 2013 - * - * Copyright 2009-2013 Amadeus s.a.s. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -(function(){typeof Aria=="undefined"&&(Aria={}),Aria.version="1.3.5",Aria._start=(new Date).getTime(),Aria.$global=function(){return this}(),!Aria.$frameworkWindow&&Aria.$global.window&&(Aria.$frameworkWindow=Aria.$global),Aria.$window=Aria.$window||Aria.$frameworkWindow;var e={_abstract:1,_boolean:1,_break:1,_byte:1,_case:1,_catch:1,_char:1,_class:1,_const:1,_continue:1,_debugger:1,_default:1,_delete:1,_do:1,_double:1,_else:1,_enum:1,_export:1,_extends:1,_false:1,_final:1,_finally:1,_float:1,_for:1,_function -:1,_goto:1,_if:1,_implements:1,_import:1,_in:1,_instanceof:1,_int:1,_interface:1,_long:1,_native:1,_new:1,_null:1,_package:1,_private:1,_protected:1,_public:1,_return:1,_short:1,_static:1,_super:1,_switch:1,_synchronized:1,_this:1,_throw:1,_throws:1,_transient:1,_true:1,_try:1,_typeof:1,_var:1,_void:1,_volatile:1,_while:1,_with:1,_constructor:1,_prototype:1};Aria.NULL_CLASSPATH="$classpath argument (or both $class and $package arguments) is mandatory and must be a string.",Aria.INVALID_NAMESPACE="Invalid namespace: %1" -,Aria.INVALID_DEFCLASSPATH="Invalid definition classpath: %1",Aria.INVALID_CLASSNAME_FORMAT="%2Invalid class name : '%1'. Class name must be a string and start with a capital case.",Aria.INVALID_CLASSNAME_RESERVED="%2Invalid class name: '%1'. Class name must be a string cannot be a reserved word.",Aria.INVALID_PACKAGENAME_FORMAT="%2Invalid package name : '%1'. Package name must be a string must start with a small case.",Aria.INVALID_PACKAGENAME_RESERVED="%2Invalid package name: '%1'. Package name must be a string cannot be a reserved word." -,Aria.INSTANCE_OF_UNKNOWN_CLASS="Cannot create instance of class '%1'",Aria.DUPLICATE_CLASSNAME="class names in a class hierarchy must be different: %1",Aria.WRONG_BASE_CLASS="super class for %1 is not properly defined: base classes (%2) must be defined through Aria.classDefinition()",Aria.BASE_CLASS_UNDEFINED="super class for %1 is undefined (%2)",Aria.INCOHERENT_CLASSPATH="$class or $package is incoherent with $classpath",Aria.INVALID_INTERFACES="Invalid interface definition in Class %1",Aria.PARENT_NOTCALLED="Error: the %1 of %2 was not called in %3." -,Aria.WRONGPARENT_CALLED="Error: the %1 of %2 was called instead of %3 in %4.",Aria.REDECLARED_EVENT="Redeclared event name: %1 in %2",Aria.INVALID_EXTENDSTYPE="Invalid $extendsType property for class %1.",Aria.TEXT_TEMPLATE_HANDLE_CONFLICT="Template error: can't load text template '%1' defined in '%2'. A macro, a library, a resource, a variable or another text template has already been declared with the same name.",Aria.RESOURCES_HANDLE_CONFLICT="Template error: can't load resources '%1' defined in '%2'. A macro, a library, a text template, a variable or another resource has already been declared with the same name." -,Aria.CANNOT_EXTEND_SINGLETON="Class %1 cannot extend singleton class %2",Aria.FUNCTION_PROTOTYPE_RETURN_NULL="Prototype function of %1 cannot returns null",Aria.$classpath="Aria",Aria.$logDebug=function(){},Aria.$logInfo=function(){},Aria.$logWarn=function(){},Aria.$logError=function(){};var t=function(e,t){if(!e||typeof e!="string")return Aria.$logError(Aria.NULL_CLASSPATH),!1;var i=e.split("."),s=i.length,o;for(var u=0;u=0;f--){var h=c[f];Aria.dispose(h)}c=null;var p=Aria.memCheckMode;Aria=null;if(p)return{nbConstructions:s,nbDestructions:o,nbNotDisposed:s-o,notDisposed:u}}},Aria.nspace=function(e,t,n){n==null&&(n=Aria.$global),t=t!==!1;if( -e==="")return n;if(!e||typeof e!="string")return Aria.$logError(Aria.INVALID_NAMESPACE,[e]),null;var r=e.split("."),i=r.length,s;for(var o=0;o-1?(u=f.slice(0,l),a=f.slice(l+1)):(u="",a=f);if(r&&r!=a||s&&s!=u)return Aria -.$logError(Aria.INCOHERENT_CLASSPATH);e.$class=a,e.$package=u}else a=r,u=e.$package,f=u+"."+a,e.$classpath=f;if(!t(f,"classDefinition: "))return;e.$events||(e.$events={}),e.$noargConstructor=new Function,(!o||o.match(/^\s*$/))&&f!="aria.core.JsObject"&&(o=e.$extends="aria.core.JsObject"),e.$constructor||(e.$constructor=new Function(e.$extends+".prototype.constructor.apply(this, arguments);")),this.$classDefinitions[f]=e;var c=!0;if(i){var h={TPL:e.$templates,CSS:e.$css,TML:e.$macrolibs,CML:e.$csslibs},p=[],d= -e.$dependencies||[];e.$implements&&e.$implements.length>0&&(d=d.concat(e.$implements));if(aria.utils.Type.isObject(e.$resources))for(var v in e.$resources)e.$resources.hasOwnProperty(v)&&(e.$resources[v].hasOwnProperty("provider")?d.push(e.$resources[v].provider):p.push(e.$resources[v]));aria.utils.Type.isObject(e.$texts)&&(h.TXT=aria.utils.Array.extractValuesFromMap(e.$texts)),h.RES=p,h.JS=d;if(o!="aria.core.JsObject"){var m=e.$extendsType||"JS";if(m!=="JS"&&m!=="TPL"&&m!=="TML"&&m!=="CSS"&&m!=="CML"&&m!=="TXT" -)return Aria.$logError(Aria.INVALID_EXTENDSTYPE,[a]);h[m]?h[m].push(o):h[m]=[o]}c=i.loadClassDependencies(f,h,{fn:Aria.loadClass,scope:Aria,args:f})}c&&this.loadClass(f,f)},Aria.interfaceDefinition=function(e){var n=e.$classpath;if(!t(n,"interfaceDefinition"))return;e.$events==null&&(e.$events={});var r=!0;i&&(r=i.loadClassDependencies(n,{JS:e.$extends?[e.$extends]:[]},{fn:aria.core.Interfaces.loadInterface,scope:aria.core.Interfaces,args:e})),r&&aria.core.Interfaces.loadInterface(e)},Aria.copyObject=function( -e,t){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};var g=Aria.$global.navigator,y=g?g.userAgent.toLowerCase().indexOf("msie")!=-1:!1;Aria.loadClass=function(e,n){n||(n=e);if(!t(n,"loadClass"))return;var r=this.$classDefinitions[e];if(!r)return Aria.$logError(Aria.INVALID_DEFCLASSPATH,[e]);var s=r.$prototype,o=r.$statics,u=r.$events,l=r.$beans,p=r.$resources,m=r.$texts,g=r.$implements,b="",w=n,E=n.lastIndexOf(".");E>-1&&(b=n.slice(0,E),w=n.slice(E+1));var S=Aria.nspace(b),x=null;if(r.$extends){if(!t(r.$extends -,"parentClass"))return d(r.$classpath);x=Aria.getClassRef(r.$extends);if(!x)return d(r.$classpath,Aria.BASE_CLASS_UNDEFINED,[r.$classpath,r.$extends]);if(!x.classDefinition)return d(r.$classpath,Aria.WRONG_BASE_CLASS,[r.$classpath,r.$extends]);if(x.classDefinition.$singleton)return d(r.$classpath,Aria.CANNOT_EXTEND_SINGLETON,[r.$classpath,r.$extends])}var T;x?T=new x.classDefinition.$noargConstructor:T={},T.$classpath=r.$classpath,T.$class=r.$class,T.$package=r.$package;var N={};T.$resources?(N=T.$resources, -T.$resources={},Aria.copyObject(N,T.$resources),Aria.copyObject(p,T.$resources)):T.$resources=r.$resources;var C={};T.$texts?(C=T.$texts,T.$texts={},Aria.copyObject(C,T.$texts),Aria.copyObject(m,T.$texts)):T.$texts=r.$texts,r.$css&&(T.$css=r.$css);if(s){typeof s=="function"&&(s=s.apply({}),s||(Aria.$logError(Aria.FUNCTION_PROTOTYPE_RETURN_NULL,[n]),s={}),Aria.copyObject(s,r.$prototype));for(var k in s)s.hasOwnProperty(k)&&k!="$init"&&(typeof s[k]=="function"&&(s[k].displayName="#"+k),T[k]=s[k]);y&&(s.hasOwnProperty -("toString")&&(T.toString=s.toString),s.hasOwnProperty("valueOf")&&(T.valueOf=s.valueOf))}var L={};if(p)for(var k in p)p.hasOwnProperty(k)&&(T[k]&&!N[k]?Aria.$logError(Aria.RESOURCES_HANDLE_CONFLICT,[k,n]):p[k].provider!=null?(L[k]=p[k],T[k]=Aria.getClassInstance(p[k].provider),T[k].getData=function(e){return function(){return e.__getData(w)}}(T[k]),T[k].__refName=k):T[k]=Aria.getClassRef(p[k]));if(m)for(var k in m)m.hasOwnProperty(k)&&(T[k]&&!C[k]?Aria.$logError(Aria.TEXT_TEMPLATE_HANDLE_CONFLICT,[k,n]):T[k -]=Aria.getClassRef(m[k]));o&&Aria.copyObject(o,T),l,T.$events={},x&&v(T.$events,x.prototype.$events,T.$classpath);if(g)if(aria.utils.Type.isArray(g)){for(var k=0,A=g.length;k0){var t=f.pop();t.prot.fetchData({fn:this.loadSyncProviders,scope:this,args:{calledback:!0}},e)}else{var n=e,r=a[n].def,s=a[n].p,o=a[n].ns,u=r.$prototype;u&&u.$init&&u.$init(s,r),r.$onload&&r.$onload.call(s,o[n]),i?i.notifyClassLoad(r.$classpath):r.$classpath=="aria.core.ClassMgr"&&(i=aria.core.ClassMgr),a[n]=null}},Aria.load=function(e){var t=new aria.core.MultiLoader(e);t.load()},Aria.beanDefinitions=function(e){aria.core.JsonValidator.beanDefinitions(e) -},Aria.setRootDim=function(e){Aria.load({classes:["aria.templates.Layout"],oncomplete:{fn:p,args:e}})},Aria.loadTemplate=function(e,t){aria.core.TplClassLoader.loadTemplate(e,t)},Aria.disposeTemplate=function(e){return aria.core.TplClassLoader.disposeTemplate(e)},Aria.resourcesDefinition=function(e){var t=Aria.getClassRef(e.$classpath);if(t){var n=t.classDefinition.$prototype;aria.utils.Json.inject(e.$resources,n,!0);for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r]);i&&i.notifyClassLoad(e.$classpath)}else Aria -.classDefinition({$classpath:e.$classpath,$singleton:!0,$constructor:function(){},$prototype:e.$resources})},Aria.copyGlobals=function(e){e.Aria=Aria;var t=Aria.$global,n=Aria.$classes,r={};for(var i=0,s=n.length;i-1?u.substring(0,f):u;e[l]=t[l]}}}},Aria.onDomReady=function(e){aria.dom.DomReady.onReady(e)};if(Aria.$frameworkWindow){if(Aria.rootFolderPath==null){ -var b,w,E;w=Aria.$frameworkWindow.document.getElementsByTagName("script"),b=w[w.length-1],w=null,E=b.src;var S=E.replace(/aria\/[^\/]*$/,"");S==E&&(S=S.substring(0,S.lastIndexOf("/"))+"/");if(!S){var x=Aria.$frameworkWindow.location;S=x.protocol+"//"+x.host+"/";var T=x.pathname;T=T.match(/[\/\w\.\-]+\//gi),T?T=T[0]:T="",S+=T}Aria.rootFolderPath=S}if(Aria.rootFolderPath=="/"){var N=Aria.$frameworkWindow.location;Aria.rootFolderPath=N.protocol+"//"+N.host+"/"}}Aria.empty=function(){},Aria.returnTrue=function() -{return!0},Aria.returnFalse=function(){return!1},Aria.returnNull=function(){return null},Aria.__tempIE=y})(),Aria.eval=Aria.__tempIE?function(srcJS,srcURL,evalContext){return eval(srcJS)}:function(srcJS,srcURL,evalContext){return srcURL&&(srcJS=[srcJS,"\n//@ sourceURL=",Aria.rootFolderPath,srcURL,"\n"].join("")),eval(srcJS)},delete Aria.__tempIE,function(){var e=Aria.FRAMEWORK_PREFIX+"isDisposed",t=function(e,t,r,i){for(var s in e[t])e[t].hasOwnProperty(s)&&n(e[t],s,r,i)},n=function(e,t,n,r,i,s){if(e==null)return; -var o=e[t];if(o){var u=o.length,a=!1,f=null,l;for(var c=0;c=t.nbInterceptors)return this[t.method].apply(this,e);var r=t.interceptors[n];if(r.removed)return i.call(this -,o.args,t,n+1);var o={step:"CallBegin",method:t.method,args:e,cancelDefault:!1,returnValue:null},u=t.asyncCbParam;if(u!=null){var a={fn:s,scope:this,args:{info:o,interc:r,origCb:e[u]}};e[u]=a,e.length<=u&&(e.length=u+1),o.callback=a}return this.$callback(r,o),o.cancelDefault||(o.returnValue=i.call(this,o.args,t,n+1),o.step="CallEnd",delete o.cancelDefault,this.$callback(r,o)),o.returnValue},s=function(e,t){var n=t.interc;if(n.removed)return this.$callback(t.origCb,e);var r=t.info;return r.step="Callback",r.callback= -t.origCb,r.callbackResult=e,r.cancelDefault=!1,r.returnValue=null,this.$callback(n,r),r.cancelDefault?r.returnValue:this.$callback(t.origCb,r.callbackResult)},o=function(e,t){var n="on"+aria.utils.String.capitalize(e);return t[n+"CallBegin"]||t[n+"Callback"]||t[n+"CallEnd"]||t["on"+e+"CallBegin"]||t["on"+e+"Callback"]||t["on"+e+"CallEnd"]?!0:!1},u=function(e,t,n){var r=n||{};for(var i in e)e.hasOwnProperty(i)&&(r[i]||(r[i]=[])).push(t);return r},a=function(e,t,n){var i=n||{},s,u,a;for(var f in e)e.hasOwnProperty -(f)&&o(f,t)&&(i[f]||(i[f]=[])).push({fn:r,scope:t});return i};Aria.classDefinition({$classpath:"aria.core.JsObject",$constructor:function(){},$destructor:function(){this[e]=!0},$statics:{UNDECLARED_EVENT:"undeclared event name: %1",MISSING_SCOPE:"scope property is mandatory when adding or removing a listener (event: %1)",INTERFACE_NOT_SUPPORTED:"The '%1' interface is not supported on this object (of type '%2').",ASSERT_FAILURE:"Assert #%1 failed in %2",CALLBACK_ERROR:"An error occured while processing a callback function: \ncalling class: %1\ncalled class: %2" -},$prototype:{$init:function(e,t,n){e.$on=e.$addListeners},$assert:function(e,t){return t?!0:(this.$logError(this.ASSERT_FAILURE,[e,this.$classpath]),!1)},$dispose:function(){this.$destructor(),this._listeners&&(this._listeners=null,delete this._listeners),this.__$interceptors&&(this.__$interceptors=null,delete this.__$interceptors),this.__$interfaces&&aria.core.Interfaces.disposeInterfaces(this)},$logTimestamp:Aria.empty,$startMeasure:Aria.empty,$stopMeasure:Aria.empty,$logDebug:function(e,t,n){return""},$logInfo -:function(e,t,n){return""},$logWarn:function(e,t,n){return""},$logError:function(e,t,n){return Aria.$global.console&&(typeof t=="string"&&(t=[t]),Aria.$global.console.error(e.replace(/%[0-9]+/g,function(e){return t[parseInt(e.substring(1),10)-1]}),n)),""},$callback:function(e,t,n){if(!e)return;if(e.$Callback)return e.call(t);var r=e.scope,i;r=r?r:this,e.fn?i=e.fn:i=e,typeof i=="string"&&(i=r[i]);var s=e.apply===!0&&e.args&&Object.prototype.toString.apply(e.args)==="[object Array]"?e.args:[e.args],o=e.resIndex=== -undefined?0:e.resIndex;o>-1&&s.splice(o,0,t);try{return Function.prototype.apply.call(i,r,s)}catch(u){this.$logError(n||this.CALLBACK_ERROR,[this.$classpath,r.$classpath],u)}},$normCallback:function(e){var t=e.scope,n;return t=t?t:this,e.fn?n=e.fn:n=e,typeof n=="string"&&(n=t[n]),{fn:n,scope:t,args:e.args,resIndex:e.resIndex,apply:e.apply}},$alert:function(){var e=[],t;e.push("## "+this.$classpath+" ## ");for(var n in this)this.hasOwnProperty(n)&&(t=typeof this[n],t=="object"||t=="function"?e.push(n+=":["+t+"]" -):t=="string"?e.push(n+=':"'+this[n]+'"'):e.push(n+=":"+this[n]));Aria.$window.alert(e.join("\n")),e=null},toString:function(){return"["+this.$classpath+"]"},$interface:function(e){return aria.core.Interfaces.getInterface(this,e)},$addInterceptor:function(e,t){var n=this.$interfaces[e];if(!n){this.$logError(this.INTERFACE_NOT_SUPPORTED,[e,this.$classpath]);return}var r=this.__$interceptors;r==null&&(r={},this.__$interceptors=r);var i=aria.utils.Type.isCallback(t)?u:a,s=n.prototype.$interfaces;for(var o in s) -if(s.hasOwnProperty(o)){var f=i(s[o].interfaceDefinition.$interface,t,r[o]);r[o]=f}},$removeInterceptors:function(e,n,r){var i=this.$interfaces[e],s=this.__$interceptors;if(!i||!s)return;var o=i.prototype.$interfaces;for(var u in o)o.hasOwnProperty(u)&&t(s,u,n,r)},$call:function(e,t,n,r){var s;return this.__$interceptors==null||this.__$interceptors[e]==null||(s=this.__$interceptors[e][t])==null?this[t].apply(this,n):i.call(this,n,{interceptors:s,nbInterceptors:s.length,method:t,asyncCbParam:r},0)},$addListeners -:function(e,t){var n=e.scope?e.scope:null,r=t?t:this,i;for(var s in e){if(!e.hasOwnProperty(s))continue;i=e[s];if(s=="scope")continue;if(s!="*"&&r.$events[s]==null){this.$logError(this.UNDECLARED_EVENT,s,r.$classpath);continue}if(i.$Callback)i={fn:function(e,t){t.call(e)},scope:this,args:i};else if(!i.fn){if(!n){this.$logError(this.MISSING_SCOPE,s);continue}i={fn:i,scope:n,once:e[s].listenOnce}}else{i={fn:i.fn,scope:i.scope,args:i.args,once:e[s].listenOnce},i.scope||(i.scope=n);if(!i.scope){this.$logError(this -.MISSING_SCOPE,s);continue}}this._listeners==null?(this._listeners={},this._listeners[s]=[]):this._listeners[s]==null&&(this._listeners[s]=[]),i.src=r,this._listeners[s].push(i)}n=i=s=null},$removeListeners:function(e,t){if(this._listeners==null)return;var r=e.scope?e.scope:null,i;for(var s in e){if(!e.hasOwnProperty(s))continue;if(s=="scope")continue;if(this._listeners[s]){var o=e[s];if(typeof o=="function"){if(r==null){this.$logError(this.MISSING_SCOPE,s);continue}n(this._listeners,s,r,o,t)}else{o.scope==null&& -(o.scope=r);if(o.scope==null){this.$logError(this.MISSING_SCOPE,s);continue}n(this._listeners,s,o.scope,o.fn,t,o.firstOnly)}}}r=i=o=null},$unregisterListeners:function(e,t){if(this._listeners==null)return;if(e==null&&t==null)for(var r in this._listeners){if(!this._listeners.hasOwnProperty(r))continue;this._listeners[r]=null,delete this._listeners[r]}else for(var r in this._listeners){if(!this._listeners.hasOwnProperty(r))continue;n(this._listeners,r,e,null,t)}r=null},$onOnce:function(e,t){for(var n in e)e.hasOwnProperty -(n)&&(e[n].listenOnce=!0);this.$addListeners(e,t)},$raiseEvent:function(e){if(this._listeners==null)return;var t="",n=!1;typeof e=="string"?t=e:(t=e.name,n=!0);if(t==null||this.$events[t]==null)this.$logError(this.UNDECLARED_EVENT,[t,this.$classpath]);else{var r=[t,"*"],i=null,s=this._listeners;for(var o=0;o<2;o++){var u=s[r[o]];if(u){i||(i=n?e:{},i.name=t),u=u.slice(0);var a=u.length,f,l;for(var c=0;a>c;c++){f=u[c],l=f.src;if(!f.removed&&(o===0||l.$events[t]!=null)){i.src=l;if(f.once){delete f.once;var h={} -;h[i.name]=f,this.$removeListeners(h)}this.$callback(f,i)}}i.src=null}}s=u=a=null}}}})}(),Aria.classDefinition({$classpath:"aria.utils.Type",$singleton:!0,$prototype:{isArray:function(e){return Object.prototype.toString.apply(e)==="[object Array]"},isString:function(e){return typeof e=="string"?!0:Object.prototype.toString.apply(e)==="[object String]"},isRegExp:function(e){return Object.prototype.toString.apply(e)==="[object RegExp]"},isNumber:function(e){return typeof e=="number"?!0:Object.prototype.toString -.apply(e)==="[object Number]"},isDate:function(e){return Object.prototype.toString.apply(e)==="[object Date]"},isBoolean:function(e){return e===!0||e===!1},isHTMLElement:function(e){if(e){var t=e.nodeName;return e===Aria.$window||aria.utils.Type.isString(t)||e===Aria.$frameworkWindow}return!1},isObject:function(e){return e?Object.prototype.toString.apply(e)==="[object Object]":!1},isInstanceOf:function(e,t){var n=Aria.getClassRef(t);return n==null?!1:e instanceof n},isFunction:function(e){return Object.prototype -.toString.apply(e)==="[object Function]"},isContainer:function(e){return(this.isObject(e)||this.isArray(e))&&!(e instanceof aria.core.JsObject)},isCallback:function(e){if(e.$Callback)return!0;if(e.$classpath)return!1;var t=this.$normCallback(e);return typeof t.fn=="function"}}}),Aria.classDefinition({$classpath:"aria.utils.String",$singleton:!0,$dependencies:["aria.utils.Type"],$prototype:{substitute:function(e,t){return aria.utils.Type.isArray(t)||(t=[t]),e=e.replace(/%[0-9]+/g,function(e){var n=t[parseInt( -e.substring(1),10)-1];return typeof n!="undefined"?n:e}),e},trim:String.trim?String.trim:function(e){return e.replace(/^\s+|\s+$/g,"")},isEscaped:function(e,t){var n=!1;for(var r=t-1;r>=0;r--){if(e.charAt(r)!="\\")return n;n=!n}return n},indexOfNotEscaped:function(e,t,n){var r=e.indexOf(t,n);while(r!=-1){if(!this.isEscaped(e,r))return r;r=e.indexOf(t,r+1)}return-1},escapeHTML:function(e){return e.replace(/&/g,"&").replace(//g,">")},escapeHTMLAttr:function(e){return e.replace(/'/g -,"'").replace(/"/g,""")},escapeForHTML:function(e,t){var n=!1,r=!1;if(aria.utils.Type.isObject(t))n=t.text===!0,r=t.attr===!0;else if(!aria.utils.Type.isBoolean(t)||t)n=!0,r=!0;return n&&(e=this.escapeHTML(e).replace(/\//g,"/")),r&&(e=this.escapeHTMLAttr(e)),e},stripAccents:function(e){var t=e;return t=t.replace(/[\u00E0\u00E2\u00E4]/gi,"a"),t=t.replace(/[\u00E9\u00E8\u00EA\u00EB]/gi,"e"),t=t.replace(/[\u00EE\u00EF]/gi,"i"),t=t.replace(/[\u00F4\u00F6]/gi,"o"),t=t.replace(/[\u00F9\u00FB\u00FC]/gi -,"u"),t},nextWhiteSpace:function(e,t,n,r){var i=t,s=r||/\s/,o;while(i0;o-=1 -)s.push(n);r===!0?e=s.join("")+e:e+=s.join("")}return e},crop:function(e,t,n,r){var i,s;if(r===!0){for(i=0,s=e.length-t;i=t;i-=1)if(e.charAt(i)!==n)break;return e.substring(0,i+1)},chunk:function(e,t,n){return aria.utils.Type.isString(e)?e?aria.utils.Type.isArray(t)?this._chunkArray(e,t,n):this._chunkNumber(e,t,n):[e]:null},_chunkNumber:function(e,t,n){var r=[],i,s=e.length;if(t<1||t>=s)return[e];if(t===1)return e.split("");if(n===!0){ -i=0;while(i0)r.push(e.substring(Math.max(0,i-t),i)),i-=t;return r.reverse()},_chunkArray:function(e,t,n){var r=[],i,s=e.length,o,u;if(n===!0){i=0;for(o=0,u=t.length;o=s)break}return i0&&r.push(e.substring(0,i)),r.reverse()}}}),function(){var e=Aria.$global.console;Aria.classDefinition -({$classpath:"aria.core.log.DefaultAppender",$prototype:e?{_formatClassName:function(e){return"["+e+"] "},_inspectObject:function(t){t&&typeof t=="object"&&e.dir&&e.dir(t)},debug:function(t,n,r,i){e.debug?e.debug(this._formatClassName(t)+n):e.log&&e.log(this._formatClassName(t)+n),this._inspectObject(i)},info:function(t,n,r,i){e.info?e.info(this._formatClassName(t)+n):e.log&&e.log(this._formatClassName(t)+n),this._inspectObject(i)},warn:function(t,n,r,i){e.warn?e.warn(this._formatClassName(t)+n):e.log&&e.log -(this._formatClassName(t)+n),this._inspectObject(i)},error:function(t,n,r,i){var s=this._formatClassName(t)+n;i?e.error(s+"\n",i):e.error(s)}}:{debug:function(){},info:function(){},warn:function(){},error:function(){}}})}(),Aria.classDefinition({$classpath:"aria.core.Log",$singleton:!0,$dependencies:["aria.core.log.DefaultAppender","aria.utils.String"],$statics:{LEVEL_DEBUG:1,LEVEL_INFO:2,LEVEL_WARN:3,LEVEL_ERROR:4},$constructor:function(){this._loggers=[],this._loggingLevels={},this._appenders=[];var e=this -,t=aria.core.JsObject.prototype;t.$logDebug=function(t,n,r){return e.debug(this.$classpath,t,n,r),""},Aria.$logDebug=t.$logDebug,t.$logInfo=function(t,n,r){return e.info(this.$classpath,t,n,r),""},Aria.$logInfo=t.$logInfo,t.$logWarn=function(t,n,r){return e.warn(this.$classpath,t,n,r),""},Aria.$logWarn=t.$logWarn,t.$logError=function(t,n,r){return e.error(this.$classpath,t,n,r),""},Aria.$logError=t.$logError,this.resetLoggingLevels(),this.setLoggingLevel("*",Aria.debug?this.LEVEL_DEBUG:this.LEVEL_ERROR),this -.addAppender(new aria.core.log.DefaultAppender)},$destructor:function(){this.resetLoggingLevels(),this.clearAppenders();var e=aria.core.JsObject.prototype,t=Aria.$window.alert;e.$logError=function(e,n,r){t(["Error after aria.core.Log is disposed:\nin:",this.$classpath,"\nmsg:",e].join(""))},Aria.$logError=e.$logError;var n=function(){};e.$logDebug=n,Aria.$logDebug=n,e.$logInfo=n,Aria.$logInfo=n,e.$logWarn=n,Aria.$logWarn=n},$prototype:{isValidLevel:function(e){return e==this.LEVEL_DEBUG||e==this.LEVEL_INFO|| -e==this.LEVEL_WARN||e==this.LEVEL_ERROR},setLoggingLevel:function(e,t){this.isValidLevel(t)?this._loggingLevels[e]=t:this.error(this.$classpath,"Invalid level passed to setLoggingLevel")},resetLoggingLevels:function(){this._loggingLevels=[]},getLoggingLevel:function(e){var t=this._loggingLevels[e];if(!t){var n=e;while(n.indexOf(".")!=-1){n=n.substring(0,n.lastIndexOf("."));if(this._loggingLevels[n])return this._loggingLevels[n];if(this._loggingLevels[n+".*"])return this._loggingLevels[n+".*"]}return this._loggingLevels -["*"]||!1}return t},isLogEnabled:function(e,t){var n=this.getLoggingLevel(t);return n?e>=n:!1},addAppender:function(e){this._appenders.push(e)},clearAppenders:function(){var e=this.getAppenders();for(var t=0,n=e.length;t-1?(t.removeAt(e,r),!0):!1},removeAt:function(e,t){return e.splice(t,1).length==1},isEmpty:function(e){return e.length===0},filter:e.filter?function(e,t,n){return e.filter(t,n)}:function(e,n,r){var i=t.clone(e),s=[];r=r||e;var o=i.length;for(var u=0;u=100&&!t.reversible){var n=Date.prototype.toJSON,r=RegExp.prototype -.toJSON,i=Function.prototype.toJSON,s=this;try{return Date.prototype.toJSON=function(){return aria.utils.Date.format(this,t.serializedDatePattern)},RegExp.prototype.toJSON=function(){return this+""},Function.prototype.toJSON=function(){return"[function]"},fastSerializer(e,null,t.indent)}catch(o){return null}finally{Date.prototype.toJSON=n,RegExp.prototype.toJSON=r,Function.prototype.toJSON=i}}return this._serialize(e,t)},_normalizeOptions:function(e){for(var t in defaults)defaults.hasOwnProperty(t)&&!(t in e -)&&(e[t]=defaults[t])},_serialize:function(e,t){return e===null?this._serializeNull(t):typeUtil.isBoolean(e)?this._serializeBoolean(e,t):typeUtil.isNumber(e)?this._serializeNumber(e,t):typeUtil.isString(e)?this._serializeString(e,t):typeUtil.isDate(e)?this._serializeDate(e,t):typeUtil.isRegExp(e)?this._serializeRegExp(e,t):typeUtil.isArray(e)?this._serializeArray(e,t):typeUtil.isObject(e)?this._serializeObject(e,t):typeUtil.isFunction(e)?this._serializeFunction(e,t):'"['+typeof e+']"'},_serializeObject:function( -e,t){var n=t.indent,r,i=t.baseIndent?t.baseIndent:"",s=n?i+n:null;if(t.maxDepth<1)return t.reversible?null:"{...}";var o=["{"];n&&o.push("\n");var u=!0;for(var a in e)if(e.hasOwnProperty(a)&&this.__preserveObjectKey(a,t)){u=!1,n&&o.push(s),t.escapeKeyNames||a.match(/\:/)?o.push('"'+a+'":'):o.push(a+":"),n&&o.push(" ");var f=aria.utils.Json.copy(t,!0);f.baseIndent=s,f.maxDepth=t.maxDepth-1,r=this._serialize(e[a],f);if(r===null)return null;o.push(r),n?o.push(",\n"):o.push(",")}return u||(o[o.length-1]=""),n?o. -push("\n"+i+"}"):o.push("}"),o.join("")},__preserveObjectKey:function(e,t){return t.keepMetadata?!0:!aria.utils.Json.isMetadata(e)},_serializeArray:function(e,t){var n=t.indent,r,i=t.baseIndent?t.baseIndent:"",s=n?i+n:null;if(t.maxDepth<1)return t.reversible?null:"[...]";var o=e.length;if(o===0)return"[]";var u=["["];n&&u.push("\n");for(var a=0;o>a;a++){n&&u.push(s);var f=aria.utils.Json.copy(t,!0);f.baseIndent=s,f.maxDepth=t.maxDepth-1,r=this._serialize(e[a],f);if(r===null)return null;u.push(r),a!=o-1&&(u.push -(","),n&&u.push("\n"))}return n?u.push("\n"+i+"]"):u.push("]"),u.join("")},_serializeString:function(e,t){var n;return e=e.replace(/([\\\"])/g,"\\$1").replace(/(\r)?\n/g,"\\n"),t.encodeParameters===!0?n=encodeURIComponent(e):n=e,'"'+n+'"'},_serializeNumber:function(e,t){return e+""},_serializeBoolean:function(e,t){return e?"true":"false"},_serializeDate:function(e,t){return t.reversible||!aria.utils.Date?"new Date("+e.getTime()+")":'"'+aria.utils.Date.format(e,t.serializedDatePattern)+'"'},_serializeRegExp:function( -e,t){return t.reversible?e+"":this._serializeString(e+"",t)},_serializeFunction:function(e,t){return'"[function]"'},_serializeNull:function(){return"null"},parse:function(string){var text=String(string);if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return eval("("+text+")");throw new Error("aria.utils.json.JsonSerializer.parse")}}}}),function(){var arrayUtils,typeUtils -,jsonUtils,parProp,res=[],__getListenerMetaName=function(e,t){var n=t?jsonUtils.META_FOR_RECLISTENERS:jsonUtils.META_FOR_LISTENERS;return e!=null&&(n+="_"+e),n},__isValidContainer=function(e){return typeUtils.isContainer(e)&&!typeUtils.isHTMLElement(e)&&!e.$JsObject},__removeLinkToParent=function(e,t,n){var r=e?e[parProp]:null;if(r)for(var i=0,s;s=r[i];i++)if(s.parent==t&&s.property==n){r.splice(i,1);break}},__changeLinkToParent=function(e,t,n,r){var i=e?e[parProp]:null;if(i)for(var s=0,o;o=i[s];s++)if(o.parent== -t&&o.property==n){o.property=r;break}},__addLinkToParent=function(e,t,n){__isValidContainer(e)&&(__checkBackRefs(e),e[parProp].push({parent:t,property:n}))},__includePropForBackRef=function(e){return e!=jsonUtils.OBJECT_PARENT_PROPERTY&&e!=jsonUtils.META_FOR_LISTENERS&&e!=jsonUtils.META_FOR_RECLISTENERS},__checkBackRefs=function(e){if(e[parProp])return;e[parProp]=[];for(var t in e)if(e.hasOwnProperty(t)&&__includePropForBackRef(t)){var n=e[t];__isValidContainer(n)&&(__checkBackRefs(n),n[parProp].push({parent -:e,property:t}))}},__cleanUpRecMarkers=function(e){var t=jsonUtils.TEMP_REC_MARKER;if(e[t]){e[t]=!1,delete e[t];var n=e[jsonUtils.OBJECT_PARENT_PROPERTY];if(n)for(var r=0,i=n.length;r=0&&n>=0))return this.$logError(this.INVALID_SPLICE_PARAMETERS,[],arguments),null;var i=e.length;t<0&&(t=i+t,t<0&&(t=0)),t>i&&(t=i),t+n>i&&(n=i-t);if(r===0&&n===0)return[];var s=Array.prototype,o=s.splice.apply(e,s.slice.call(arguments,1)),u=e.length;this.$assert(526,n==o.length),this.$assert(527,i+r-n==u);if(e[parProp]){if(n>0)for(var a=n-1;a>=0;a--)__removeLinkToParent(o[a],e,t+a);if(r>0)for(var a=t+r-1;a>=t;a--)__addLinkToParent -(e[a],e,a);if(r!=n)for(var f=t+r,l=t+n;f=u?p.change=this.KEY_REMOVED:(p.change=this.VALUE_CHANGED,p.newValue=e[a]),a-1)return;o.push(n)}i&&__checkBackRefs(e)},removeListener:function(e,t,n,r){if(typeUtils.isObject(t))return this.removeListener(e,null,t,n);var i=__getListenerMetaName(t,r);if(!e||e[i]==null)return;var s=e[i],o=arrayUtils.indexOf(s,n);o>-1&&(s.length==1?(e[i]=null,delete e[i]):s.splice(o,1))},copy:function(e,t,n,r){t=t!==!1;var i=!1,s,o;typeUtils.isArray(e)?(s=[],i=!0):typeUtils.isObject(e)&&(s={},i=!0);if(i){for(var u in e)if(e.hasOwnProperty -(u)){if(u.indexOf(":")!=-1){if(!r)continue;if(this.isMetadata(u))continue}if(n&&!arrayUtils.contains(n,u))continue;t?s[u]=this.copy(e[u],t,null,r):s[u]=e[u]}}else typeUtils.isDate(e)?s=new Date(e.getTime()):s=e;return s},load:function(str,ctxt,errMsg){var window=null,document=null,frames=null,res=null;try{str=(""+str).replace(/^\s/,""),res=eval("("+str+")")}catch(ex){res=null,errMsg||(errMsg=this.INVALID_JSON_CONTENT);var cp="unspecified";ctxt&&ctxt.$classpath&&(ctxt=ctxt.$classpath),this.$logError(errMsg,[ctxt -,str],ex)}return res},inject:function(e,t,n){n=n===!0;var r=typeUtils.isArray(e)&&typeUtils.isArray(t),i=typeUtils.isObject(e)&&typeUtils.isObject(t),s;if(!r&&!i)return!1;if(r)if(!n)for(var o=0,u=e.length;o-1){this.isIE=!0,this.name="IE";if(/msie[\/\s]((?:\d+\.?)+)/.test(e)){this.version=RegExp.$1;var t=parseInt(this.version,10);if(t==6 -)this.isIE6=!0;else if(t>=7){var n=Aria.$frameworkWindow.document,r=n.documentMode||7;this["isIE"+r]=!0,r!=t&&(this.version=r+".0")}}}else e.indexOf("opera")>-1?(this.isOpera=!0,this.name="Opera"):e.indexOf("chrome")>-1?(this.isChrome=!0,this.name="Chrome"):e.indexOf("webkit")>-1?(this.isSafari=!0,this.name="Safari"):(e.indexOf("gecko")>-1&&(this.isGecko=!0),e.indexOf("firefox")>-1&&(this.name="Firefox",this.isFirefox=!0));this.isWebkit=this.isSafari||this.isChrome,e.indexOf("windows")!=-1||e.indexOf("win32" -)!=-1?(this.isWindows=!0,this.environment="Windows"):e.indexOf("macintosh")!=-1&&(this.isMac=!0,this.environment="MacOS"),this.isIE||(this.isFirefox?/firefox[\/\s]((?:\d+\.?)+)/.test(e)&&(this.version=RegExp.$1):this.isSafari?/version[\/\s]((?:\d+\.?)+)/.test(e)&&(this.version=RegExp.$1):this.isChrome?/chrome[\/\s]((?:\d+\.?)+)/.test(e)&&(this.version=RegExp.$1):this.isOpera&&/version[\/\s]((?:\d+\.?)+)/.test(e)&&(this.version=RegExp.$1)),this.version&&/(\d+)\./.test(this.version)&&(this.majorVersion=parseInt -(RegExp.$1,10));if(this.ua){var i=[{pattern:/(android)[\/\s-]?([\w\.]+)*/i},{pattern:/(ip[honead]+).*os\s*([\w]+)*\slike\smac/i},{pattern:/(blackberry).+version\/([\w\.]+)/i},{pattern:/(rim\stablet+).*os\s*([\w\.]+)*/i},{pattern:/(windows\sphone\sos|windows\s?[mobile]*)[\s\/\;]?([ntwce\d\.\s]+\w)/i},{pattern:/(symbian\s?os|symbos|s60(?=;))[\/\s-]?([\w\.]+)*/i},{pattern:/(webos|palm\sos|bada|rim\sos|meego)[\/\s-]?([\w\.]+)*/i}],s=[{pattern:/(chrome|crios)\/((\d+)?[\w\.]+)/i},{pattern:/(mobile\ssafari)\/((\d+)?[\w\.]+)/i -},{pattern:/(mobile)\/\w+\s(safari)\/([\w\.]+)/i},{pattern:/(iemobile)[\/\s]?((\d+)?[\w\.]*)/i},{pattern:/(safari)\/((\d+)?[\w\.]+)/i},{pattern:/(series60.+(browserng))\/((\d+)?[\w\.]+)/i},{pattern:/(firefox)\/([\w\.]+).+(fennec)\/\d+/i},{pattern:/(opera\smobi)\/((\d+)?[\w\.-]+)/i},{pattern:/(opera\smini)\/((\d+)?[\w\.-]+)/i},{pattern:/(dolfin|Blazer|S40OviBrowser)\/((\d+)?[\w\.]+)/i}],o=[{pattern:/\(((ipad|playbook));/i},{pattern:/\(((ip[honed]+));/i},{pattern:/(blackberry[\s-]?\w+)/i},{pattern:/(hp)\s([\w\s]+\w)/i -},{pattern:/(htc)[;_\s-]+([\w\s]+(?=\))|\w+)*/i},{pattern:/(sam[sung]*)[\s-]*(\w+-?[\w-]*)*/i},{pattern:/((s[cgp]h-\w+|gt-\w+|galaxy\snexus))/i},{pattern:/sec-((sgh\w+))/i},{pattern:/(maemo|nokia).*(\w|n900|lumia\s\d+)/i},{pattern:/(lg)[e;\s\-\/]+(\w+)*/i},{pattern:/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|huawei|meizu|motorola)[\s_-]?([\w-]+)*/i}];this.__testUaMatch(i,"OS"),this.__testUaMatch(s,"BROWSER"),this.__testUaMatch(o,"DEVICE")}},__testUaMatch:function(e,t){var n;for(var r=0,i=e.length -;r-1||e[0].indexOf("ZuneWP7")>-1)?this.DesktopView=!0:this.isMobileView=!0,this.isIEMobile=!0;break;case 4:this.browserType=e[1]||"",this.browserVersion= -e[2]||"",this.isSafari=!0;break;case 5:this.browserType=e[2]||"",this.browserVersion=e[3]||"",this.isS60=!0;break;case 6:this.browserType=e[1]||"",this.browserVersion=e[2]||"",this.isFF=!0;break;case 7:this.browserType=e[1]||"",this.browserVersion=e[2]||"",this.isFF=!0;break;case 8:this.browserType=e[1]||"",this.browserVersion=e[2]||"",this.isFF=!0;break;case 9:this.browserType=n[2],this.browserVersion=e[2]||"",this.isOtherBrowser=!0}},__setOs:function(e,t){var n=["Android","IOS","BlackBerry","BlackBerry Tablet OS" -,"Windows","Symbian","Other"];switch(t){case 0:this.isAndroid=!0,this.osName=n[0],this.osVersion=e[2]||"",e[2]&&e[2].match(/\d/)+""=="3"?this.isTablet=!0:this.isPhone=!0;break;case 1:this.isIOS=!0,this.osName=n[1];var r=e[2]||"";this.osVersion=r.replace(/\_/g,"."),e[1]=="iPad"?this.isTablet=!0:this.isPhone=!0;break;case 2:this.isBlackBerry=!0,this.osName=n[2],this.osVersion=e[2]||"",this.isPhone=!0;break;case 3:this.isBlackBerry=!0,this.osName=n[3],this.osVersion=e[2]||"",this.isTablet=!0;break;case 4:this.isWindowsPhone=!0 -,this.osName=n[4],this.osVersion=e[2]||"",this.isPhone=!0;break;case 5:this.isSymbian=!0,this.osName=n[5],this.osVersion=e[2]||"",this.isPhone=!0;break;case 6:this.isOtherMobile=!0,this.osName=n[6],this.osVersion=e[2]||"",this.isPhone=!0}this.osVersion=this.osVersion.replace(/\s*/g,"")}}}),Aria.classDefinition({$classpath:"aria.dom.DomReady",$singleton:!0,$events:{ready:"Raised when the DOM is in ready state."},$constructor:function(){this.isReady=!1,this._isListening=!1,this._listenersToRemove=[]},$prototype -:{onReady:function(e){this.isReady?this.$callback(e):this.$on({ready:e,scope:this}),this._isListening||(this._isListening=!0,this._listen())},_listen:function(){var e=Aria.$frameworkWindow;if(e==null){this._raiseReadyEvent();return}this._checkReadyState(!1);if(this.isReady)return;var t=e.document,n=aria.core.Browser,r=this,i;if(e.addEventListener){n.isOpera?(i=function(){r._checkCSSLoaded()},t.addEventListener("DOMContentLoaded",i,!1),this._listenersToRemove.push([t,"removeEventListener","DOMContentLoaded",i -])):(i=function(){r._raiseReadyEvent()},t.addEventListener("DOMContentLoaded",i,!1),this._listenersToRemove.push([t,"removeEventListener","DOMContentLoaded",i]));var s=function(){r._raiseReadyEvent()};this._listenersToRemove.push([e,"removeEventListener","load",s]),e.addEventListener("load",s,!1)}else e.attachEvent&&(e===e.top?this._checkScroll():r._checkReadyState(!0),i=function(){r._raiseReadyEvent()},this._listenersToRemove.push([e,"detachEvent","onload",i]),e.attachEvent("onload",i))},_checkReadyState:function( -e){var t=Aria.$frameworkWindow.document,n=this;t.readyState==="complete"?this._raiseReadyEvent():e&&setTimeout(function(){n._checkReadyState()},16)},_checkCSSLoaded:function(){var e=this,t=Aria.$frameworkWindow.document;for(var n=0;no;o++)i=e[o],r=s.getClassLoader(i,t),r&&(r.handleError=this.handleError,this._mdp||(this._mdp= -[]),this._mdp.push({loader:r,classpath:i,isReady:!1}),r.$on({classReady:this._onMdpLoad,classError:this._onMdpLoad,scope:this}));r=s=null},loadDependencies:function(){var e=this._mdp;if(e){var t=e.length;for(var n=0;no;o++){r=this._mdp[o];if(!s&&!r.isReady&&r.classpath==t)s=!0,r.isReady=!0;else if(i)i=r.isReady;else if(s)break}this.$assert(301,s===!0);if(!i)return;this._mdpErrors?this._handleError():this._refClasspath!=null?(this.$assert(286,this.callback!=null),this -.callback.fn.call(this.callback.scope,this.callback.args)):(this._mdp=null,this.notifyLoadComplete())},_handleError:function(){this._refClasspath!=null?aria.core.ClassMgr.notifyClassLoadError(this._refClasspath):this.notifyLoadError()},notifyLoadError:function(){this.$raiseEvent({name:"classError",refClasspath:this._refClasspath}),this.$raiseEvent({name:"complete",refClasspath:this._refClasspath})},notifyLoadComplete:function(){this.$raiseEvent({name:"classReady",refClasspath:this._refClasspath}),this.$raiseEvent -({name:"complete",refClasspath:this._refClasspath})},notifyClassDefinitionCalled:function(){this._classDefinitionCalled=!0},_loadClassAndGenerate:function(e,t,n){var r=/^\s*Aria\.classDefinition\(/;if(r.test(e))this._evalGeneratedFile({classDef:e,scope:this},{logicalPath:t});else{var i="aria.templates."+this._classGeneratorClassName,s=[i];n&&s.push(n),Aria.load({classes:s,oncomplete:{fn:this.__generateClass,scope:this,args:{classDef:e,logicalPath:t,classpath:this._refClasspath}}})}},__generateClass:function( -e){var t=aria.templates[this._classGeneratorClassName];try{t.parseTemplate(e.classDef,!1,{fn:this.__evalGeneratedClass,scope:this,args:{logicalPath:e.logicalPath,classGenerator:t}},{file_classpath:e.logicalPath})}catch(n){this.$logError(this.CLASS_LOAD_ERROR,[this._refClasspath],n)}},__fallbackGenerateClass:function(e,t){this.$logWarn(this.TEMPLATE_DEBUG_EVAL_ERROR,[this._refClasspath]);var n=e.classGenerator;n.parseTemplateFromTree(t,!1,{fn:this.__evalGeneratedClass,scope:this,args:{logicalPath:e.logicalPath -,classGenerator:n}},{file_classpath:e.logicalPath},!0)},__evalGeneratedClass:function(e,t){var n=e.classDef;try{Aria.eval(n,t.logicalPath),this._classDefinitionCalled||(this.$logError(this.MISSING_CLASS_DEFINITION,[this.getRefLogicalPath(),this._refClasspath]),aria.core.ClassMgr.notifyClassLoadError(this._refClasspath))}catch(r){if(!e.debug&&Aria.debug)try{this.__fallbackGenerateClass(t,e.tree)}catch(i){this.$logError(this.TEMPLATE_DEBUG_EVAL_ERROR,[this._refClasspath],i)}else this.$logError(this.TEMPLATE_EVAL_ERROR -,[this._refClasspath],r)}}}}),Aria.classDefinition({$classpath:"aria.core.JsClassLoader",$extends:"aria.core.ClassLoader",$constructor:function(){this.$ClassLoader.constructor.apply(this,arguments),this._refLogicalPath+=".js"},$prototype:{_loadClass:function(e,t){Aria.eval(e,t),this._classDefinitionCalled||(this.$logError(this.MISSING_CLASS_DEFINITION,[this.getRefLogicalPath(),this._refClasspath]),aria.core.ClassMgr.notifyClassLoadError(this._refClasspath))}}}),function(){var e=function(e){var t=e.cfg.tplDiv -;t&&aria.utils.Dom.replaceHTML(t,"#TEMPLATE ERROR#"),this.$callback(e.cb,{success:!1})},t=function(e,t){var n=t.tplCtxt,r=t.cfg;n.viewReady(),this.$callback(t.cb,{success:!0,tplCtxt:r.provideContext?n:null})},n=function(n,r){var i=r.cfg,s=r.cb,o=new aria.templates.TemplateCtxt;n.moduleCtrlPrivate&&i.moduleCtrl.autoDispose&&(i.toDispose?i.toDispose.push(n.moduleCtrlPrivate):i.toDispose=[n.moduleCtrlPrivate]),i.moduleCtrl=n.moduleCtrl,i.isRootTemplate=!0;var u=o.initTemplate(i);u&&o.dataReady();var a=i.tplDiv; -aria.core.Browser.isIE&&(a.style.background=""),a.className=o.getCSSClassNames(),u?(r.tplCtxt=o,o.$onOnce({SectionRefreshed:{fn:t,scope:this,args:r}}),o.$refresh()):(o.$dispose(),e.call(this,r))},r=function(e){var t=e.cfg,r=t.moduleCtrl;r&&!r.getData?aria.templates.ModuleCtrlFactory.createModuleCtrl(r,{fn:n,args:e,scope:this}):(r&&!t.moduleCtrlPrivate&&r.$publicInterface&&(t.moduleCtrl=r.$publicInterface()),n.call(this,{moduleCtrl:t.moduleCtrl},e))},i=function(t){var n=t.cfg,i=t.cb;if(!aria.core.JsonValidator -.normalize({json:n,beanName:"aria.templates.CfgBeans.LoadTemplateCfg"})){this.$callback(i,{success:!1});return}var s=["aria.templates.TemplateCtxt","aria.templates.CSSMgr"],o=n.moduleCtrl;if(o&&!o.getData){if(!aria.core.JsonValidator.normalize({json:o,beanName:"aria.templates.CfgBeans.InitModuleCtrl"})){this.$callback(i,{success:!1});return}s.push("aria.templates.ModuleCtrlFactory",o.classpath)}var u=["aria.templates.GlobalStyle","aria.widgets.GlobalStyle"];n.reload&&(aria.templates.TemplateManager.unloadTemplate -(n.classpath,n.reloadByPassCache),aria.templates.CSSMgr&&(u=u.concat(aria.templates.CSSMgr.getInvalidClasspaths(!0))));var a=aria.templates.Layout;n.rootDim&&a.setRootDim(n.rootDim);var f=n.div;f=aria.utils.Dom.replaceHTML(f,"");if(!f){this.$callback(i,{success:!1});return}Aria.minSizeMode&&(f.style.border="2px solid red"),n.div=f,f.className=this.addPrintOptions(f.className,n.printOptions);if(n.width!=null||n.height!=null)a.setDivSize(f,n.width,n.height),(typeof n.width=="object"||typeof n.height=="object")&& -a.registerAutoresize(f,n.width,n.height);if(aria.core.Browser.isIE6||aria.core.Browser.isIE7){var l=f.style.position;l!="absolute"&&l!="relative"&&(f.style.position="relative")}var c=Aria.$window.document.createElement("div");c.className="xLDI",f.appendChild(c),n.tplDiv=c,Aria.load({classes:s,templates:[n.classpath],css:u,oncomplete:{scope:this,args:t,fn:r},onerror:{scope:this,args:t,fn:e}}),f=null,c=null};Aria.classDefinition({$classpath:"aria.core.TplClassLoader",$extends:"aria.core.ClassLoader",$constructor -:function(){this.$ClassLoader.constructor.apply(this,arguments),this._refLogicalPath+=".tpl",this._classGeneratorClassName="TplClassGenerator"},$onload:function(){var e=aria.core.TplClassLoader;e.$callback=aria.core.JsObject.prototype.$callback,e.$logError=aria.core.JsObject.prototype.$logError,e.$normCallback=aria.core.JsObject.prototype.$normCallback,e.$classpath="aria.core.TplClassLoader"},$statics:{TEMPLATE_EVAL_ERROR:"Error while evaluating the class generated from template '%1'",TEMPLATE_DEBUG_EVAL_ERROR -:"Error while evaluating the class generated from template '%1'",MISSING_TPLSCRIPTDEFINITION:"The template script associated to template %1 must be defined using Aria.tplScriptDefinition.",_importScriptPrototype:function(e,t){var n=e.tplScriptDefinition;if(!n)return this.$logError(this.MISSING_TPLSCRIPTDEFINITION,[t.$classpath]);var r=n.$classpath.split("."),i=r[r.length-1],s="$"+i,o={};if(t[s])return this.$logError(Aria.DUPLICATE_CLASSNAME,[n.$classpath]);Aria.copyObject(n.$prototype,o),Aria.copyObject(n.$statics -,o);var u=e.classDefinition.$resources;if(u){t.$resources||(t.$resources={});var a=e.prototype;for(var f in u)u.hasOwnProperty(f)&&(t[f]&&!t.$resources[f]?this.$logError(Aria.RESOURCES_HANDLE_CONFLICT,[f,n.$classpath]):(o[f]=a[f],t.$resources[f]=u[f]))}var l=e.classDefinition.$texts;if(l){t.$texts||(t.$texts={});for(var f in l)l.hasOwnProperty(f)&&(t[f]&&!t.$texts[f]?this.$logError(Aria.TEXT_TEMPLATE_HANDLE_CONFLICT,[f,n.$classpath]):(o[f]=e.prototype[f],t.$texts[f]=l[f]))}Aria.copyObject(o,t),o.constructor= -n.$constructor||Aria.empty,o.$destructor=n.$destructor||Aria.empty,t[s]=o},addPrintOptions:function(e,t){return e=e.replace(/(\s|^)\s*xPrint\w*/g,""),t=="adaptX"?e+=" xPrintAdaptX":t=="adaptY"?e+=" xPrintAdaptY":t=="adaptXY"?e+=" xPrintAdaptX xPrintAdaptY":t=="hidden"&&(e+=" xPrintHide"),e},loadTemplate:function(e,t){var n=Aria.getClassRef("aria.core.environment.Customizations");n&&n.isCustomized()&&!n.descriptorLoaded()?n.$onOnce({descriptorLoaded:{fn:this._startLoad,scope:this,args:{cfg:e,cb:t}}}):this._startLoad -(null,{cfg:e,cb:t})},_startLoad:function(e,t){var n=t.cfg,r=t.cb,s=Aria.getClassRef("aria.core.environment.Customizations"),o=n.origClasspath||n.classpath;n.classpath=s?s.getTemplateCP(o):o,n.origClasspath=o,Aria.load({classes:["aria.templates.Layout","aria.templates.CfgBeans","aria.utils.Dom","aria.templates.TemplateManager"],oncomplete:{fn:i,args:{cfg:n,cb:r},scope:this}})},disposeTemplate:function(e){var t;typeof e=="string"&&(e=aria.utils.Dom.getElementById(e));if(aria&&aria.utils&&aria.utils.Dom)return aria -.templates.TemplateCtxtManager.disposeFromDom(e)}},$prototype:{_loadClass:function(e,t){this._loadClassAndGenerate(e,t)}}})}(),Aria.classDefinition({$classpath:"aria.core.CSSClassLoader",$extends:"aria.core.ClassLoader",$constructor:function(){this.$ClassLoader.constructor.apply(this,arguments),this._refLogicalPath+=".tpl.css",this._classGeneratorClassName="CSSClassGenerator"},$statics:{TEMPLATE_EVAL_ERROR:"Error while evaluating the class generated from CSS template '%1'",TEMPLATE_DEBUG_EVAL_ERROR:"Error while evaluating the class generated from CSS template '%1'" -},$prototype:{_loadClass:function(e,t){this._loadClassAndGenerate(e,t,"aria.templates.CSSMgr")}}}),Aria.classDefinition({$classpath:"aria.core.ClassMgr",$singleton:!0,$events:{classComplete:{description:"",properties:{refClasspath:"{String} classpath of the reference class if any"}}},$constructor:function(){this._cache=null,this._classTypes={JS:"aria.core.JsClassLoader",TPL:"aria.core.TplClassLoader",RES:"aria.core.ResClassLoader",CSS:"aria.core.CSSClassLoader",TML:"aria.core.TmlClassLoader",CML:"aria.core.CmlClassLoader" -,TXT:"aria.core.TxtClassLoader"}},$statics:{CIRCULAR_DEPENDENCY:"Class %1 and %2 have circular dependency",MISSING_CLASSLOADER:"The class loader of type %1 needed to load class %2 is missing. Make sure it is packaged."},$prototype:{getBaseLogicalPath:function(e,t){var n=e.split(".");return n.join("/")},notifyClassLoad:function(e){this._cache||(this._cache=aria.core.Cache),this.$assert(1,this._cache);var t=this._cache.getItem("classes",e,!0);t.status=this._cache.STATUS_AVAILABLE,t.loader&&t.loader.notifyLoadComplete -();var n=Aria.getClassRef(e);if(n){var r=Aria.getClassRef(e).classDefinition;r&&r.$css&&aria.templates.CSSMgr.registerDependencies(e,r.$css)}},notifyClassLoadError:function(e){this._cache||(this._cache=aria.core.Cache),this.$assert(1,this._cache);var t=this._cache.getItem("classes",e,!0);t.status=this._cache.STATUS_ERROR,t.loader&&t.loader.notifyLoadError()},filterMissingDependencies:function(e,t){if(!e)return null;var n=this._cache,r,i,s=null,o;for(var u=0,a=e.length;uo;o++)r=n.getItem("files",i[o],!1),r&&(this.$assert(120,r.loader==t),r.loader=null)}r=n.getItem("urls",t.getURL(),!1),r&&(this.$assert(128,r.loader==t),r.loader=null,r.status=this._cache.STATUS_AVAILABLE),t.$dispose(),t=n=r=i=null},loadFileContent:function(e,t,n){this._cache||(this._cache=aria.core.Cache);var r=this._cache.getItem("files",e,!0);n?r.status=this._cache.STATUS_ERROR:(r.value=t,r.status=this._cache.STATUS_AVAILABLE),r= -null},getFileContent:function(e){var t=this._cache.getItem("files",e,!1);return t&&t.status==this._cache.STATUS_AVAILABLE?t.value:null},loadTplFileContent:function(e,t){var n=aria.core.ClassMgr.getBaseLogicalPath(e)+".tpl";this.loadFile(n,{fn:this._onTplFileContentReceive,scope:this,args:{origCb:t}},null)},_onTplFileContentReceive:function(e,t){var n={content:null};e.downloadFailed&&(n.downloadFailed=e.downloadFailed),e.logicalPaths.length>0&&(n.content=this.getFileContent(e.logicalPaths[0])),this.$callback( -t.origCb,n)},clearFile:function(e,t){var n=this._cache.content;delete n.files[e];var r=this.resolveURL(e);delete n.urls[r],t&&this.enableURLTimestamp(r,!0)}}}),Aria.classDefinition({$classpath:"aria.core.FileLoader",$events:{fileReady:{description:"",properties:{logicalPaths:"{Array} expected logical paths associated to the file (a multipart file may contain extra files, which were not asked for)",url:"{String} URL used to retrieve the file (may be the URL of a multipart file)",downloadFailed:"{boolean} if true, no path in logicalPaths could be retrieved successfully (maybe other logical paths)" -}},complete:{description:""}},$constructor:function(e){this._url=e,this._urlItm=aria.core.Cache.getItem("urls",e,!0),this._logicalPaths=[],this._isProcessing=!1,this.status=aria.core.Cache.STATUS_NEW},$statics:{INVALID_MULTIPART:"Error in multipart structure of %1, part %2",LPNOTFOUND_MULTIPART:"The expected logical path %1 was not found in multipart %2",EXPECTED_MULTIPART:"The expected multipart structure was not found in %1."},$prototype:{_multiPartHeader:/^(\/\*[\s\S]*?\*\/\s*\r?\n)?\/\/\*\*\*MULTI-PART(\r?\n[^\n]+\n)/ -,_logicalPathHeader:/^\/\/LOGICAL-PATH:([^\s]+)$/,loadFile:function(){if(this._isProcessing)return;this.$assert(33,this._logicalPaths.length>0),this._isProcessing=!0,aria.core.IO.asyncRequest({sender:{classpath:this.$classpath,logicalPaths:this._logicalPaths},url:aria.core.DownloadMgr.getURLWithTimestamp(this._url),callback:{fn:this._onFileReceive,onerror:this._onFileReceive,scope:this},expectedResponseType:"text"})},addLogicalPath:function(e){var t=this._logicalPaths;for(var n=0,r=t.length;n0);if(!n){t=this._multiPartHeader.exec(e.responseText);if(t!=null){var r=e.responseText.split(t[2]),i=r.length,s={},o;for(var u=1;ui&&(this._urlItm.status=aria.core.Cache.STATUS_AVAILABLE),s[o]=1,aria.core.DownloadMgr.loadFileContent(o,a,a==null)}var f=0;for(var u=0;u0){var t;for(var n in e)t=e[n],this.cancelCallback(n+"-"+t.cancelId)}},addCallback:function(e){this.$assert(74,e&&e.scope&&e.fn);var t=e.onerror?e.onerror:null,n=e.onerrorScope?e.onerrorScope:null;this._cbCount++ -,this._numberOfCallbacks++;var r=e.delay>0?e.delay:1,i=e.args?e.args:null;this._callbacks[""+this._cbCount]={fn:e.fn,scope:e.scope,delay:r,args:i,onerror:t,onerrorScope:n};var s=this._cbCount,o=setTimeout(function(){aria.core.Timer._execCallback(s)},r);this._cancelIds[""+o]=this._cbCount,this._callbacks[""+this._cbCount].cancelId=o;var u=this._cbCount+"-"+o;return this._cbCount>this._MAX_COUNT&&(this._cbCount=0),u},_execCallback:function(e){var t=""+e,n=this._callbacks[t];if(n){this._deleteCallback(t,!0);try{ -n.fn.call(n.scope,n.args)}catch(r){if(n.onerror!=null&&typeof (n.onerror=="function"))try{var i=n.onerrorScope!=null?n.onerrorScope:n.scope;n.onerror.call(i,r,n)}catch(s){this.$logError(this.TIMER_CB_ERROR_ERROR,[t],s)}else this.$logError(this.TIMER_CB_ERROR,[t],r)}n.fn=null,n.scope=null,n.onerror=null,n.onerrorScope=null}},cancelCallback:function(e){var t=e.split("-"),n=t[0],r=parseInt(t[1],10);clearTimeout(r),this._deleteCallback(n)},_deleteCallback:function(e,t){var n=this._callbacks[""+e];n&&(delete this -._cancelIds[""+n.cancelId],this._numberOfCallbacks--,delete this._callbacks[""+e],t||(n.fn=null,n.scope=null,n.onerror=null,n.onerrorScope=null))}}}),function(){var e=aria.utils.Type,t=Aria.__mergeEvents,n=aria.core.ClassMgr,r=-1,i=function(){return r++,r},s=function(e){var t=1e7*Math.random(),n=""+(t|t);while(e[n])n+="x";return n},o={Function:1,Object:1,Interface:1},u={$type:"Function"},a={$type:"Object"},f={$type:"Object"},l=function(t,n,r){var i;if(e.isFunction(t))return u;if(e.isString(t))i={$type:t};else{ -if(e.isArray(t))return f;if(!e.isObject(t))return null;t.$type==null?(this.$logWarn("Member '%2' in interface '%1' uses a deprecated way of declaring an object in an interface. Please use {$type:'Object'} instead of {}.",[n,r]),i=a):i=t}var s=i.$type;return o[s]?aria.core.JsonValidator.normalize({json:i,beanName:"aria.core.CfgBeans.ItfMember"+s+"Cfg"})?i:null:null},c=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},h={$interface:function(){},$destructor:function(){},$addListeners -:function(){},$removeListeners:function(){},$unregisterListeners:function(){},$on:function(){},toString:function(){return"["+this.$classpath+"]"}},p=function(){};p.prototype=h;var d={protoProperty:!0},v={};v.__proto__=d;var m=v.protoProperty?function(e,t){e.__proto__=t;for(var n in e)e.hasOwnProperty(n)&&delete e[n]}:function(e,t){var n=e.__$linkItfWrappers;if(n&&e.hasOwnProperty("__$linkItfWrappers"))for(var r=0,i=n.length;r=200&&r<300?i=this._createResponse(t):(i={error:[r,t.statusText].join(" "),responseText:t.responseText,responseXML:t.responseXML},u=!0 -),i.status=r,n.fn.call(n.scope,u,n.args,i),t=null,i=null},_createResponse:function(e){var t=e.getAllResponseHeaders(),n={};if(t){var r=t.split("\n");for(var i=0;i0&&(this._timeOut[e]=setTimeout(function( -){aria.core.IO._timeOut[e]&&aria.core.IO.abort({redId:e,getStatus:n},null,!0)},t))},clearTimeout:function(e){clearInterval(this._poll[e]),delete this._poll[e],clearTimeout(this._timeOut[e]),delete this._timeOut[e]},abort:function(e,t,n){if(!e)return!1;var r=e.redId||e,i=this.pendingRequests[r];this.clearTimeout(r);var s=!1;if(e.getStatus){var o=e.getStatus;s=o.fn.apply(o.scope,o.args)}i&&(s=!0,e===r?e={transaction:r}:e.transaction=r);if(s===!0){this.$raiseEvent({name:"abortEvent",o:e,req:i});var u={transaction -:i.id,req:i,status:n?this.COMM_CODE:this.ABORT_CODE,statusText:n?this.TIMEOUT_ERROR:this.ABORT_ERROR};this._handleResponse(!0,i,u)}return s},jsonp:function(e){return e.jsonp||(e.jsonp="callback"),e.expectedResponseType||(e.expectedResponseType="json"),this.asyncRequest(e)},_jsonTextConverter:function(e,t){if(t=="text")!e.responseText&&e.responseJSON!=null&&(aria.utils.Type.isString(e.responseJSON)?e.responseText=e.responseJSON:e.responseText=aria.utils.Json.convertToJsonString(e.responseJSON));else if(t=="json"&& -e.responseJSON==null&&e.responseText!=null){var n=aria.utils.String.substitute(this.JSON_PARSING_ERROR,[e.url,e.responseText]);e.responseJSON=aria.utils.Json.load(e.responseText,this,n)}},reissue:function(e){var t=this.pendingRequests[e];if(t)return delete this.pendingRequests[e],this.asyncRequest(t)}}}),Aria.classDefinition({$classpath:"aria.core.MultiLoader",$constructor:function(e,t){this._autoDispose=t!==!1,this._loadDesc=e,this._clsLoader=null},$statics:{MULTILOADER_CB1_ERROR:"Error detected while executing synchronous callback on MultiLoader." -,MULTILOADER_CB2_ERROR:"Error detected while executing callback on MultiLoader."},$prototype:{load:function(){var e=aria.core.ClassMgr,t=this._loadDesc,n=!1,r=!0,i={JS:e.filterMissingDependencies(t.classes),TPL:e.filterMissingDependencies(t.templates),RES:e.filterMissingDependencies(t.resources,"RES"),CSS:e.filterMissingDependencies(t.css),TML:e.filterMissingDependencies(t.tml),TXT:e.filterMissingDependencies(t.txt),CML:e.filterMissingDependencies(t.cml)};for(var s in i)if(i.hasOwnProperty(s)){var o=i[s];n=n|| -o===!1,r=r&&o===null}if(n||r)this._execCallback(!0,n);else{var u=new aria.core.ClassLoader;this._loadDesc.onerror&&this._loadDesc.onerror.override&&(u.handleError=!1),this._clsLoader=u,u.$on({classReady:this._onClassesReady,classError:this._onClassesError,complete:this._onClassLoaderComplete,scope:this});for(s in i)i.hasOwnProperty(s)&&(o=i[s],o&&u.addDependencies(o,s));u.loadDependencies()}},_execCallback:function(e,t){var n=this._loadDesc[t?"onerror":"oncomplete"];if(n){typeof n=="function"&&(n={fn:n});var r= -n.scope?n.scope:Aria;try{n.fn.call(r,n.args)}catch(i){var s=e?this.MULTILOADER_CB1_ERROR:this.MULTILOADER_CB2_ERROR;this.$logError(s,null,i)}}e&&this._autoDispose&&this.$dispose()},_onClassesReady:function(e){this._execCallback(!1,!1)},_onClassesError:function(e){this._execCallback(!1,!0)},_onClassLoaderComplete:function(e){var t=e.src;this.$assert(90,this._clsLoader===t),this._clsLoader=null,t.$dispose(),this._autoDispose&&this.$dispose()}}}),function(){var e=aria.utils.Json,t=aria.utils.Type;Aria.classDefinition -({$classpath:"aria.core.JsonValidator",$dependencies:["aria.utils.Json","aria.utils.Type"],$singleton:!0,$constructor:function(){this.__waitingBeans={},this.__loadedBeans={},this.__processedBeans={},this.__baseTypes={},this._options={addDefaults:!0,checkEnabled:Aria.debug,checkDefaults:!0,checkMultiTypes:!1,checkInheritance:!0,checkBeans:!0,throwsErrors:!1},this._errors=[],this._currentBeanName="JSON root",this._typeBeingComputed={typeName:"typeBeingComputed"},this._typeError={typeName:"typeError"},this._typeRefError= -{},this._typeRefError[this._MD_BUILTIN]=!0,this._typeRefError[this._MD_BASETYPE]=this._typeError},$destructor:function(){this.__waitingBeans=null,this.__loadedBeans=null},$statics:{INVALID_TYPE_NAME:"Invalid or missing $type in %1: %2",INVALID_TYPE_REF:"Type %1, found in %2, is not defined in package %3",UNDEFINED_PREFIX:"Prefix %1, found in %2, is not defined",MISSING_BEANSPACKAGE:"Beans package %1, referenced in %2, was not found",RECURSIVE_BEAN:"Recursive bean definition in %1",BOTH_MANDATORY_DEFAULT:"$mandatory=true and $default should not be specified at the same time in %1" -,INHERITANCE_EXPECTED:"Type %1 should inherit from %2",MISSING_CONTENTTYPE:"Missing $contentType in the %1 definition in %2",ENUM_DUPLICATED_VALUE:"Duplicated value '%1' in enum definition %2",ENUM_INVALID_INHERITANCE:"Value '%1', from %2, is not present in parent enum definition %3",INVALID_DEFAULTVALUE:"Default value %1 in %2 is invalid: %3",BEANCHECK_FAILED:"Checking bean definition %1 with beans schema failed: %2",MISSING_ENUMVALUES:"$enumValues must be defined and non-empty in the Enum definition in %1" -,INVALID_NAME:"Invalid name for a bean: %1 in %2",NUMBER_INVALID_INHERITANCE:"Invalid inheritance: %1 in %2 should respect its parent range",NUMBER_INVALID_RANGE:"Invalid range in %1: %2-%3",BEAN_NOT_FOUND:"Bean %1 was not found",INVALID_TYPE_VALUE:"Invalid type: expected type %1 (from %2), found incorrect value '%3' in %4",INVALID_MULTITYPES_VALUE:"The value found in %1 is not valid for all the types defined in %2: %3",ENUM_UNKNOWN_VALUE:"Value '%1' in %2 is not in the enum definition %3",UNDEFINED_PROPERTY -:"Property '%1', used in %2, is not defined in %3",MISSING_MANDATORY:"Missing mandatory attribute in %1 for definition %2",REGEXP_FAILED:"Value '%1' in %2 does not comply with RegExp %3 in %4",NUMBER_RANGE:"Number '%1' in %2 is not in the accepted range (%3=%4)",NOT_OF_SPECIFIED_CLASSPATH:"Invalid class instance: expected instance of class %1 (from %2), found incorrect value '%3' in %4"},$prototype:{_MD_TYPENAME:Aria.FRAMEWORK_PREFIX+"typeName",_MD_BASETYPE:Aria.FRAMEWORK_PREFIX+"baseType",_MD_PARENTDEF:Aria -.FRAMEWORK_PREFIX+"parentType",_MD_BUILTIN:Aria.FRAMEWORK_PREFIX+"builtIn",_MD_ENUMVALUESMAP:Aria.FRAMEWORK_PREFIX+"enumValuesMap",_MD_STRDEFAULT:Aria.FRAMEWORK_PREFIX+"strDefault",_BASE_TYPES_PACKAGE:"aria.core.JsonTypes",_BEANS_SCHEMA_PACKAGE:"aria.core.BaseTypes",_logError:function(e,t){this._errors.push({msgId:e,msgArgs:t})},__logAllErrors:function(e,t){if(e.length===0)return!0;if(!t){for(var n=0;n0)return this._logError(this.INVALID_DEFAULTVALUE,[n.$default,n[this._MD_TYPENAME],c]),this._typeError}var h=n.$default;"$simpleCopyType"in n||(n.$simpleCopyType=!h||t.isString(h)||t.isNumber(h)||h===!0),n.$strDefault||(n.$strDefault=e.convertToJsonString(h,{reversible:!0}),n.$fastNorm&& -(n.$getDefault=new Function("return "+n.$strDefault+";")))}return this.__processedBeans[r]=n,s},__preprocessBP:function(e){this._errors=[];var t=e.$beans;for(var n in t){if(!t.hasOwnProperty(n)||n.indexOf(":")!=-1)continue;Aria.checkJsVarName(n)||this._logError(this.INVALID_NAME,[n,this._currentBeanName]),this._preprocessBean(t[n],e.$package+"."+n,e)}return this._errors},_getBuiltInBaseType:function(e){var t=this.__baseTypes[e.$type];this.$assert(298,t!=null),e[this._MD_BUILTIN]=!0,e[this._MD_BASETYPE]=t,e[this -._MD_TYPENAME]=[this._BASE_TYPES_PACKAGE,t.typeName].join(".")},_addBaseType:function(e){this.__baseTypes[e.typeName]=e,!e.dontSkip&&!this._options.checkEnabled&&(e.process=null,e.preprocess=null)},_checkType:function(t){var n=t.beanDef,r=n[this._MD_BASETYPE];if(t.value==null){n.$mandatory?this._logError(this.MISSING_MANDATORY,[t.path,n[this._MD_TYPENAME]]):"$default"in n&&this._options.addDefaults&&(n.$simpleCopyType?t.value=n.$default:t.value=e.copy(n.$default),t.dataHolder[t.dataName]=t.value);return}r.process&& -r.process(t)},_getBean:function(e){return this.__processedBeans[e]||null},_processJsonValidation:function(e){var t=e.beanDef?e.beanDef:this._getBean(e.beanName);if(t==null)return this._errors=[],this._logError(this.BEAN_NOT_FOUND,e.beanName),this._errors;if(this._options.checkEnabled){this._errors=[],this._checkType({dataHolder:e,dataName:"json",path:"ROOT",value:e.json,beanDef:t});var n=this._errors;return n}return t.$fastNorm&&(e.json=t.$fastNorm(e.json)),[]},__checkBean:function(e){if(this._options.checkBeans&&! -this._options.checkMultiTypes&&this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]){var t=e[this._MD_BASETYPE];if(t==this._typeError)return!1;var n=this._getBean(this._BEANS_SCHEMA_PACKAGE+"."+t.typeName);this.$assert(402,n!=null);var r=this._errors,i=this._processJsonValidation({beanDef:n,json:e});this._errors=r;if(i.length>0)return this._logError(this.BEANCHECK_FAILED,[this._currentBeanName,i]),!1}return!0},__loadBeans:function(e){var t=!0,n=this.__waitingBeans[e];delete this.__waitingBeans[e],this.$assert(58,n -);if(this._options.checkBeans&&this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]){var r=this._getBean(this._BEANS_SCHEMA_PACKAGE+".Package");this.$assert(428,r!=null),t=t&&this.__logAllErrors(this._processJsonValidation({beanDef:r,json:n}))}this._options.addDefaults=!0,t=t&&this.__logAllErrors(this.__preprocessBP(n)),t?(this.__loadedBeans[e]=n,aria.core.ClassMgr.notifyClassLoad(e)):aria.core.ClassMgr.notifyClassLoadError(e)},beanDefinitions:function(e){var t=e.$package;Aria.$classes.push({$classpath:t}),this.__waitingBeans -[t]=e;var n=[];this._options.checkBeans&&!this.__loadedBeans[this._BEANS_SCHEMA_PACKAGE]&&t!=this._BEANS_SCHEMA_PACKAGE&&t!=this._BASE_TYPES_PACKAGE&&n.push(this._BEANS_SCHEMA_PACKAGE);var r=e.$dependencies||[];r.length&&(n=n.concat(r));for(var i in e.$namespaces)e.$namespaces.hasOwnProperty(i)&&n.push(e.$namespaces[i]);var s={JS:n},o=aria.core.ClassMgr.loadClassDependencies(t,s,{fn:this.__loadBeans,scope:this,args:t});o&&this.__loadBeans(t)},normalize:function(e,t){return this._options.addDefaults=!0,e.beanDef= -null,this.__logAllErrors(this._processJsonValidation(e),t)},check:function(e,t,n){return this._options.checkEnabled?(this._options.addDefaults=!1,this.__logAllErrors(this._processJsonValidation({json:e,beanName:t}),n)):!0},getBean:function(e){return this._getBean(e)}}})}(),function(){var e,t,n=function(t,n){e._logError(e.INVALID_TYPE_VALUE,[t.typeName,n.beanDef[e._MD_TYPENAME],n.value,n.path])},r=function(t,n){if(!e._options.checkInheritance)return!0;var r=n;while(!r[e._MD_BUILTIN]){if(t==r)return!0;r=r[e._MD_PARENTDEF -]}return e._logError(e.INHERITANCE_EXPECTED,[n[e._MD_TYPENAME],t[e._MD_TYPENAME]]),!1},i=function(t,n,i){var s=t.$contentType,o=null,u=t[e._MD_PARENTDEF];if(!u[e._MD_BUILTIN]){o=u.$contentType;if(s==null){t.$contentType=o;return}}else if(s==null){e._logError(e.MISSING_CONTENTTYPE,[t[e._MD_BASETYPE].typeName,t[e._MD_TYPENAME]]),t[e._MD_BASETYPE]=e._typeError;return}e._preprocessBean(s,n+".$contentType",i),o!=null&&r(o,s)},s=function(t,n,i){var s=t.$keyType,o=null,u=t[e._MD_PARENTDEF];if(!u[e._MD_BUILTIN]){o=u -.$keyType;if(s==null){t.$keyType=o;return}}else if(s==null)return;e._preprocessBean(s,n+".$keyType",i),o!=null&&r(o,s);if(s[e._MD_BASETYPE].typeName!="String"){e._logError(e.INHERITANCE_EXPECTED,[s[e._MD_TYPENAME],e._BASE_TYPES_PACKAGE+".String"]);return}},o=function(t){if(typeof t.value!="string")return n(this,t);var r=t.beanDef;while(!r[e._MD_BUILTIN]){var i=r.$regExp;if(i!=null&&!i.test(t.value))return e._logError(e.REGEXP_FAILED,[t.value,t.path,i,r[e._MD_TYPENAME]]);r=r[e._MD_PARENTDEF]}},u=function(t){var n= -t[e._MD_PARENTDEF];typeof n.$minValue!="undefined"&&(typeof t.$minValue=="undefined"?t.$minValue=n.$minValue:t.$minValuen.$maxValue&&e._logError(e.NUMBER_INVALID_INHERITANCE,["$maxValue",t[e._MD_TYPENAME]])),typeof t.$minValue!="undefined"&&typeof t.$maxValue!="undefined"&&t.$minValue>t.$maxValue&&e._logError(e.NUMBER_INVALID_RANGE -,[t[e._MD_TYPENAME],t.$minValue,t.$maxValue])},a=function(t){var r=t.value,i=t.beanDef;if(typeof r!="number")return n(this,t);if(typeof i.$minValue!="undefined"&&ri.$maxValue)return e._logError(e.NUMBER_RANGE,[t.value,t.path,"$maxValue",i.$maxValue])},f=[{typeName:"String",process:o},{typeName:"Boolean",process:function(e){if(typeof e.value!="boolean")return n(this,e)}},{typeName:"JsonProperty" -,process:function(e){if(typeof e.value=="string"){if(Aria.isJsReservedWord(e.value)||!/^([a-zA-Z_\$][\w\$]*(:[\w\$]*)?)|(\d+)$/.test(e.value))return n(this,e)}else if(typeof e.value!="number"||parseInt(e.value,10)!=e.value)return n(this,e)}},{typeName:"FunctionRef",process:function(e){if(typeof e.value!="function")return n(this,e)}},{typeName:"Date",process:function(e){if(isNaN(Date.parse(e.value)))return n(this,e)}},{typeName:"RegExp",process:function(e){var t=e.value;if(typeof t!="object"&&typeof t!="function"|| -t==null||t.constructor!=RegExp)return n(this,e)}},{typeName:"ObjectRef",process:function(r){if(typeof r.value!="object"||r.value==null)return n(this,r);var i=r.beanDef.$classpath;if(i&&!t.isInstanceOf(r.value,i)){e._logError(e.NOT_OF_SPECIFIED_CLASSPATH,[i,r.beanDef[e._MD_TYPENAME],r.value,r.path]);return}}},{typeName:"Integer",preprocess:u,process:function(e){if(parseInt(e.value,10)!==e.value)return n(this,e);a.call(this,e)}},{typeName:"Float",preprocess:u,process:a},{typeName:"Enum",preprocess:function(t){ -var n=t.$enumValues,r=t[e._MD_PARENTDEF],i=null;if(!r[e._MD_BUILTIN]){i=r[e._MD_ENUMVALUESMAP];if(n==null){t[e._MD_ENUMVALUESMAP]=i;return}}else if(n==null||n.length===0)n=[],e._logError(e.MISSING_ENUMVALUES,[t[e._MD_TYPENAME]]);var s={};for(var o=0;o32&&u<38&&(this.keyCode=u+16),u>41&&u<48&&(this.keyCode=u+64),u>47&&u<58&&(this.keyCode=u+48),u>96&&u<123&&(this.keyCode=u-32)),this.charCode=u,this.isSpecialKey=this.isSpecialKey(this.keyCode -,t)}this.hasStopPropagation=!1,this.hasPreventDefault=!1,this.preventDefault=t.preventDefault?function(e){this.hasPreventDefault=!0,t.preventDefault(),e===!0&&this.stopPropagation()}:function(e){this.hasPreventDefault=!0,t.returnValue=!1,e===!0&&this.stopPropagation()},this.stopPropagation=t.stopPropagation?function(){this.hasStopPropagation=!0,t.stopPropagation()}:function(){this.hasStopPropagation=!0,t.cancelBubble=!0},this._dispose=function(){t=null,this.preventDefault=null,this.stopPropagation=null}},$destructor -:function(){this._dispose&&(this.target=null,this.delegateTarget=null,this._dispose())},$prototype:{_ariaDomEvent:!0,_wrapperNumber:0,disposeWrapper:function(){this._wrapperNumber===0?this.$dispose():this._wrapperNumber--},setTarget:function(e){this.target=e}},$statics:{getWrapper:function(e){return e&&e._ariaDomEvent?(e._wrapperNumber++,e):new aria.DomEvent(e)},KC_BACKSPACE:8,KC_TAB:9,KC_NUM_CENTER:12,KC_ENTER:13,KC_RETURN:13,KC_SHIFT:16,KC_CTRL:17,KC_CONTROL:17,KC_ALT:18,KC_PAUSE:19,KC_CAPS_LOCK:20,KC_ESCAPE -:27,KC_SPACE:32,KC_PAGEUP:33,KC_PAGE_UP:33,KC_PAGEDOWN:34,KC_PAGE_DOWN:34,KC_END:35,KC_HOME:36,KC_LEFT:37,KC_ARROW_LEFT:37,KC_UP:38,KC_ARROW_UP:38,KC_RIGHT:39,KC_ARROW_RIGHT:39,KC_DOWN:40,KC_ARROW_DOWN:40,KC_PRINT_SCREEN:44,KC_INSERT:45,KC_DELETE:46,KC_ZERO:48,KC_ONE:49,KC_TWO:50,KC_THREE:51,KC_FOUR:52,KC_FIVE:53,KC_SIX:54,KC_SEVEN:55,KC_EIGHT:56,KC_NINE:57,KC_A:65,KC_B:66,KC_C:67,KC_D:68,KC_E:69,KC_F:70,KC_G:71,KC_H:72,KC_I:73,KC_J:74,KC_K:75,KC_L:76,KC_M:77,KC_N:78,KC_O:79,KC_P:80,KC_Q:81,KC_R:82,KC_S:83,KC_T -:84,KC_U:85,KC_V:86,KC_W:87,KC_X:88,KC_Y:89,KC_Z:90,KC_CONTEXT_MENU:93,KC_NUM_ZERO:96,KC_NUM_ONE:97,KC_NUM_TWO:98,KC_NUM_THREE:99,KC_NUM_FOUR:100,KC_NUM_FIVE:101,KC_NUM_SIX:102,KC_NUM_SEVEN:103,KC_NUM_EIGHT:104,KC_NUM_NINE:105,KC_MULTIPLY:106,KC_PLUS:107,KC_MINUS:109,KC_PERIOD:110,KC_DIVISION:111,KC_DIVIDE:111,KC_F1:112,KC_F2:113,KC_F3:114,KC_F4:115,KC_F5:116,KC_F6:117,KC_F7:118,KC_F8:119,KC_F9:120,KC_F10:121,KC_F11:122,KC_F12:123,isSpecialKey:function(e,t){return e>32&&e<41?!0:e==8||e==9||e==13||e==27?!0:e==45|| -e==46?!1:t.ctrlKey&&e!=this.KC_CTRL?!0:t.altKey&&e!=this.KC_ALT?!0:!1},isNavigationKey:function(e){return e>32&&e<41?!0:e==9||e==13||e==27?!0:!1},getFakeEvent:function(e,t){var n=new aria.DomEvent({type:e});return n.type=e,n.target=t,n}}})})(); -//******************* -//LOGICAL-PATH:aria/core/environment/Customizations.js -//******************* -Aria.classDefinition({$classpath:"aria.core.environment.Customizations",$extends:"aria.core.environment.EnvironmentBase",$dependencies:["aria.core.environment.CustomizationsCfgBeans"],$singleton:!0,$statics:{DESCRIPTOR_NOT_LOADED:"A customization descriptor was specified but could not be loaded (url: '%1')",INVALID_DESCRIPTOR:"The Customization descriptor at '%1' is invalid"},$events:{descriptorLoaded:{description:""}},$constructor:function(){this._isCustomized=!1,this._descriptorLoaded=!1,this._customizationDescriptor= -null,this._customizations={templates:{},modules:{}},this.$EnvironmentBase.constructor.call(this)},$prototype:{_cfgPackage:"aria.core.environment.CustomizationsCfgBeans.AppCfg",_applyEnvironment:function(e){var t=this.checkApplicationSettings("customization");t&&(t.descriptor!==this._customizationDescriptor||aria.utils.Type.isObject(t.descriptor))&&(this._customizationDescriptor=t.descriptor,this.reloadCustomizationDescriptor()),this.$callback(e)},_onDescriptorReceive:function(e){var t=e.status!="200";if(t)this -.$logError(this.DESCRIPTOR_NOT_LOADED,this._customizationDescriptor);else{var n=aria.utils.Json.load(e.responseText);if(n==null){this.$logError(this.INVALID_DESCRIPTOR,this._customizationDescriptor),this.$raiseEvent("descriptorLoaded");return}this._setCustomizationDescriptor(n)}this._descriptorLoaded=!0,this.$raiseEvent("descriptorLoaded")},_setCustomizationDescriptor:function(e){var t=aria.core.JsonValidator.normalize({json:e,beanName:"aria.core.environment.CustomizationsCfgBeans.DescriptorCfg"});t?this._customizations= -e:this.$logError(this.INVALID_DESCRIPTOR,this._customizationDescriptor)},reloadCustomizationDescriptor:function(){this._isCustomized=this._customizationDescriptor?!0:!1,this._isCustomized&&(this._descriptorLoaded=!1,aria.utils.Type.isString(this._customizationDescriptor)?aria.core.IO.asyncRequest({url:this._customizationDescriptor,callback:{fn:this._onDescriptorReceive,onerror:this._onDescriptorReceive,scope:this}}):(this._setCustomizationDescriptor(this._customizationDescriptor),this._descriptorLoaded=!0,this -.$raiseEvent("descriptorLoaded")))},isCustomized:function(){return this._isCustomized},descriptorLoaded:function(){return this._descriptorLoaded},getFlowCP:function(e){var t=e;return this._isCustomized&&this._customizations.flows[e]!=null&&(t=this._customizations.flows[e]),t},getCustomModules:function(e){if(this._isCustomized){var t=this._customizations.modules[e];if(t)return t}return[]},getCustomizations:function(){return aria.utils.Json.copy(this._customizations)},getTemplateCP:function(e){var t=e;return this -._isCustomized&&this._customizations.templates[e]!=null&&(t=this._customizations.templates[e]),t},setCustomizations:function(e){var t=this.checkApplicationSettings("customization");t.descriptor=e,this._customizationDescriptor=e,this.reloadCustomizationDescriptor()}}}); -//******************* -//LOGICAL-PATH:aria/core/environment/CustomizationsCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.core.environment.CustomizationsCfgBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{customization:{$type:"CustomizationCfg",$description:"",$default:{}}}},CustomizationCfg:{$type:"json:Object",$description:"",$properties:{descriptor:{$type:"json:MultiTypes",$description:"",$default:"",$contentTypes:[{$type:"json:ObjectRef",$description:""},{$type:"json:String",$description:""}]}} -},DescriptorCfg:{$type:"json:Object",$description:"",$properties:{templates:{$type:"json:Map",$description:"",$default:{},$keyType:{$type:"json:PackageName",$description:""},$contentType:{$type:"json:PackageName",$description:""}},modules:{$type:"json:Map",$default:{},$description:"",$keyType:{$type:"json:PackageName",$description:""},$contentType:{$type:"json:Array",$description:"",$contentType:{$type:"CustomModuleCfg"}}},flows:{$type:"json:Map",$description:"",$default:{},$keyType:{$type:"json:PackageName" -,$description:""},$contentType:{$type:"json:PackageName",$description:""}}}},CustomModuleCfg:{$type:"json:MultiTypes",$description:"",$contentTypes:[{$type:"json:String",$description:""},{$type:"json:Object",$description:"",$properties:{classpath:{$type:"json:PackageName",$description:""},refpath:{$type:"json:String",$regExp:/^custom:/,$description:""},initArgs:{$type:"json:ObjectRef",$description:""}}}]}}}); -//******************* -//LOGICAL-PATH:aria/html/beans/CheckBoxCfg.js -//******************* -Aria.beanDefinitions({$package:"aria.html.beans.CheckBoxCfg",$description:"",$namespaces:{base:"aria.html.beans.ElementCfg",common:"aria.widgetLibs.CommonBeans"},$beans:{Properties:{$type:"base:Properties",$description:"",$properties:{bind:{$type:"base:Properties.$properties.bind",$properties:{checked:{$type:"common:BindingRef",$description:""}}}}}}}); -//******************* -//LOGICAL-PATH:aria/html/beans/ElementCfg.js -//******************* -Aria.beanDefinitions({$package:"aria.html.beans.ElementCfg",$description:"",$namespaces:{json:"aria.core.JsonTypes",html:"aria.templates.CfgBeans"},$beans:{Properties:{$type:"json:Object",$description:"",$properties:{id:{$type:"json:String",$description:"",$mandatory:!1},tagName:{$type:"json:String",$description:"",$sample:"div",$mandatory:!0},attributes:{$type:"html:HtmlAttribute",$default:{}},bind:{$type:"json:Object",$description:"",$default:{},$restricted:!1},on:{$type:"json:Object",$description:"",$default -:{},$restricted:!1}},$restricted:!1}}}); -//******************* -//LOGICAL-PATH:aria/html/CheckBox.js -//******************* -(function(){function e(e){var t=this._bindingListeners.checked,n=this._transform(t.transform,e.target.getProperty("checked"),"fromWidget");aria.utils.Json.setValue(t.inside,t.to,n,t.cb)}Aria.classDefinition({$classpath:"aria.html.CheckBox",$extends:"aria.html.Element",$dependencies:["aria.html.beans.CheckBoxCfg"],$statics:{INVALID_USAGE:"Widget %1 can only be used as a %2."},$constructor:function(t,n,r){this.$cfgBean="aria.html.beans.CheckBoxCfg.Properties",t.tagName="input",t.attributes=t.attributes||{},t.attributes -.type="checkbox",t.on=t.on||{},this._chainListener(t.on,"click",{fn:e,scope:this}),this.$Element.constructor.call(this,t,n,r)},$prototype:{writeMarkupBegin:function(e){this.$logError(this.INVALID_USAGE,[this.$class,"container"])},writeMarkupEnd:Aria.empty,initWidget:function(){this.$Element.initWidget.call(this);var e=this._cfg.bind;if(e.checked){var t=this._transform(e.checked.transform,e.checked.inside[e.checked.to],"toWidget");t!=null&&(this._domElt.checked=t)}},onbind:function(e,t,n){e==="checked"&&(this -._domElt.checked=t)}}})})(); -//******************* -//LOGICAL-PATH:aria/html/Element.js -//******************* -(function(){function e(e){e.writeMarkup=Aria.empty,e.writeMarkupBegin=Aria.empty,e.writeMarkupEnd=Aria.empty,e.initWidget=Aria.empty}Aria.classDefinition({$classpath:"aria.html.Element",$extends:"aria.widgetLibs.BindableWidget",$dependencies:["aria.html.beans.ElementCfg","aria.core.JsonValidator","aria.utils.Html","aria.utils.Json","aria.utils.Delegate","aria.templates.DomEventWrapper","aria.utils.Dom","aria.utils.Type"],$constructor:function(t,n,r){this.$cfgBean=this.$cfgBean||"aria.html.beans.ElementCfg.Properties" -;var i=aria.core.JsonValidator.normalize({json:t,beanName:this.$cfgBean});this.$BindableWidget.constructor.apply(this,arguments);if(!i)return e(this);var s=t.id;this._id=s?this._context.$getId(s):this._createDynamicId(),this._domElt=null,this.__delegateId=null,this._registerBindings(),this._normalizeCallbacks()},$destructor:function(){this.__delegateId&&(aria.utils.Delegate.remove(this.__delegateId),this.__delegateId=null),this.$BindableWidget.$destructor.call(this),this._domElt=null},$prototype:{_normalizeCallbacks -:function(){var e=this._cfg.on,t=!1,n;for(var r in e)if(e.hasOwnProperty(r)){t=!0,n=e[r],aria.utils.Type.isArray(n)||(n=[n]);for(var i=0,s=n.length;i")},writeMarkupBegin:function(e){this._openTag(e),e.write(">")},writeMarkupEnd:function(e){e.write("")},onbind:Aria.empty,initWidget:function(){this._domElt=aria.utils.Dom.getElementById(this._id)},_openTag:function(e){var t=this._cfg,n=aria.utils.Html.buildAttributeList(t.attributes),r=["<",t.tagName," id='",this._id,"' "];n&&r.push(n," "),this.__delegateId&&r.push(aria.utils.Delegate.getMarkup(this.__delegateId)," "),e.write -(r.join(""))},_notifyDataChange:function(e,t){this.onbind(t,this._transform(this._cfg.bind[t].transform,e.newValue,"toWidget"),e.oldValue)},_chainListener:function(e,t,n,r){var i=e[t]||[];aria.utils.Type.isArray(i)||(i=[i]),r?i.push(n):i.splice(0,0,n),e[t]=i}}})})(); -//******************* -//LOGICAL-PATH:aria/html/HtmlLibrary.js -//******************* -Aria.classDefinition({$classpath:"aria.html.HtmlLibrary",$extends:"aria.widgetLibs.WidgetLib",$singleton:!0,$prototype:{widgets:{TextInput:"aria.html.TextInput",Template:"aria.html.Template",CheckBox:"aria.html.CheckBox"}}}); -//******************* -//LOGICAL-PATH:aria/modules/requestHandler/environment/RequestHandler.js -//******************* -Aria.classDefinition({$classpath:"aria.modules.requestHandler.environment.RequestHandler",$dependencies:["aria.modules.requestHandler.environment.RequestHandlerCfgBeans"],$singleton:!0,$extends:"aria.core.environment.EnvironmentBase",$prototype:{_cfgPackage:"aria.modules.requestHandler.environment.RequestHandlerCfgBeans.AppCfg",getRequestHandlerCfg:function(){return aria.utils.Json.copy(this.checkApplicationSettings("requestHandler"))},getRequestJsonSerializerCfg:function(){return this.checkApplicationSettings -("requestJsonSerializer")}}}); -//******************* -//LOGICAL-PATH:aria/modules/requestHandler/environment/RequestHandlerCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.modules.requestHandler.environment.RequestHandlerCfgBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{requestHandler:{$type:"RequestHandlerCfg",$description:"",$default:{implementation:"aria.modules.requestHandler.JSONRequestHandler"}},requestJsonSerializer:{$type:"RequestJsonSerializerCfg",$description:"",$default:{options:{encodeParameters:!0,keepMetadata:!1}}}}},RequestHandlerCfg -:{$type:"json:Object",$description:"",$properties:{implementation:{$type:"json:PackageName",$description:"",$default:null},args:{$type:"json:ObjectRef",$description:""}}},RequestJsonSerializerCfg:{$type:"json:Object",$description:"",$properties:{instance:{$type:"json:ObjectRef",$description:""},options:{$type:"json:Map",$description:"",$contentType:{$type:"json:MultiTypes",$description:""},$default:null}}}}}); -//******************* -//LOGICAL-PATH:aria/modules/queuing/SimpleSessionQueuing.js -//******************* -Aria.classDefinition({$classpath:"aria.modules.queuing.SimpleSessionQueuing",$constructor:function(){this._idSessionMap={},this._sessionQueues={}},$statics:{NO_SESSION_ID_KEY:"1"},$destructor:function(){this._idSessionMap=null;for(var e in this._sessionQueues)this._sessionQueues.hasOwnProperty(e)&&delete this._sessionQueues[e];this._sessionQueues=null},$prototype:{pushRequest:function(e,t,n){var r,i=e.session.id;i||(i=this.NO_SESSION_ID_KEY),this._sessionQueues[i]||(this._sessionQueues[i]=[]),r=this._sessionQueues -[i],e.actionQueuing=this;if(r.length>0)return r.push({requestObject:e,jsonData:t,cb:n}),aria.modules.RequestMgr.QUEUE_STATUS;var s=this._sendRequest(e,t,n);return s===aria.modules.RequestMgr.ERROR_STATUS?s:(this._idSessionMap[s]=i,r.push(s),aria.modules.RequestMgr.EXECUTE_STATUS)},handleNextRequest:function(e){if(!this._idSessionMap)return;var t=this._idSessionMap[e],n,r;if(t){delete this._idSessionMap[e];var i=this._sessionQueues[t];this.$assert(99,i&&i.length>0),this.$assert(100,i[0]===e),i.splice(0,1);while( -i.length>0){n=i[0],r=this._sendRequest(n.requestObject,n.jsonData,n.cb);if(r!==aria.modules.RequestMgr.ERROR_STATUS){this._idSessionMap[r]=t,i[0]=r;return}i.splice(0,1)}}},_sendRequest:function(e,t,n){return aria.modules.RequestMgr.sendJsonRequest(e,t,n)}}}); -//******************* -//LOGICAL-PATH:aria/modules/urlService/environment/UrlService.js -//******************* -Aria.classDefinition({$classpath:"aria.modules.urlService.environment.UrlService",$dependencies:["aria.modules.urlService.environment.UrlServiceCfgBeans"],$extends:"aria.core.environment.EnvironmentBase",$singleton:!0,$prototype:{_cfgPackage:"aria.modules.urlService.environment.UrlServiceCfgBeans.AppCfg",getUrlServiceCfg:function(){return aria.utils.Json.copy(this.checkApplicationSettings("urlService"))}}}); -//******************* -//LOGICAL-PATH:aria/modules/urlService/environment/UrlServiceCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.modules.urlService.environment.UrlServiceCfgBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{urlService:{$type:"UrlServiceCfg",$description:"",$default:{implementation:"aria.modules.urlService.PatternURLCreationImpl",args:["${moduleName}/${actionName}","${moduleName}"]}}}},UrlServiceCfg:{$type:"json:Object",$description:"",$properties:{implementation:{$type:"json:PackageName",$description -:"",$default:null},args:{$type:"json:Array",$description:"",$default:[],$contentType:{$type:"json:String",$description:""}}}}}}); -//******************* -//LOGICAL-PATH:aria/modules/RequestBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.modules.RequestBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes",env:"aria.modules.requestHandler.environment.RequestHandlerCfgBeans"},$beans:{RequestObject:{$type:"json:Object",$description:"",$restricted:!1,$properties:{moduleName:{$type:"json:String",$description:"",$mandatory:!0},actionName:{$type:"json:String",$description:"",$mandatory:!1},serviceSpec:{$type:"json:ObjectRef",$description:"",$mandatory:!1},session:{$type:"json:ObjectRef",$description:""} -,actionQueuing:{$type:"json:ObjectRef",$description:""},requestHandler:{$type:"json:ObjectRef",$description:""},urlService:{$type:"json:ObjectRef",$description:""},requestJsonSerializer:{$type:"env:RequestJsonSerializerCfg",$description:""},postHeader:{$type:"json:String",$description:""}}},RequestDetails:{$type:"json:Object",$description:"",$restricted:!1,$properties:{url:{$type:"json:String",$description:"",$mandatory:!0},method:{$type:"json:String",$description:""}}},SuccessResponse:{$type:"json:Object",$description -:"",$properties:{responseText:{$type:"json:String",$description:""},responseXML:{$type:"json:ObjectRef",$description:""},responseJSON:{$type:"json:ObjectRef",$description:""}}},FailureResponse:{$type:"json:Object",$description:"",$properties:{status:{$type:"json:Integer",$description:"",$mandatory:!0},error:{$type:"json:String",$description:""},responseText:{$type:"json:String",$description:""},responseXML:{$type:"json:ObjectRef",$description:""},responseJSON:{$type:"json:ObjectRef",$description:""}}},Request -:{$type:"json:Object",$description:"",$properties:{url:{$type:"json:String",$description:""},session:{$type:"json:ObjectRef",$description:""},requestObject:{$type:"RequestObject",$description:""}}},ProcessedResponse:{$type:"json:Object",$description:"",$restricted:!1,$properties:{response:{$type:"json:ObjectRef",$description:""},error:{$type:"json:Boolean",$description:""},errorData:{$type:"json:ObjectRef",$description:""}}}}}); -//******************* -//LOGICAL-PATH:aria/modules/RequestMgr.js -//******************* -Aria.classDefinition({$classpath:"aria.modules.RequestMgr",$dependencies:["aria.modules.queuing.SimpleSessionQueuing","aria.modules.RequestBeans","aria.modules.urlService.environment.UrlService","aria.modules.requestHandler.environment.RequestHandler","aria.utils.Type"],$singleton:!0,$events:{error:{description:"",properties:{requestUrl:"URL for the request (the URL may have already been modified by some other request filters).",requestObject:"Request Object given to submitJsonRequest",httpError:"null if it is not an http error (i.e. a server side exception), otherwise contains information about http error, e.g.: { status: 404, error: 'Not found'}" -,errorData:"error structure to be displayed (if it's an HTTP error, it is filled by the framework client-side, or, if the error was server-side, it is the error messageBean returned in the tag)"}}},$constructor:function(){this.session={paramName:"jsessionid",id:""},this._params=null,this.defaultActionQueuing=new aria.modules.queuing.SimpleSessionQueuing,this._idCounter=1,this._urlService=null,this._requestHandler=null,aria.core.AppEnvironment.$on({changingEnvironment:{fn:this.__environmentUpdated,scope -:this},environmentChanged:{fn:this.__environmentUpdated,scope:this}})},$destructor:function(){this._params=null,this._urlService&&(this._urlService.$dispose(),this._urlService=null),this._requestHandler&&(this._requestHandler.$dispose(),this._requestHandler=null),this.defaultActionQueuing&&(this.defaultActionQueuing.$dispose(),this.defaultActionQueuing=null)},$statics:{ERROR_STATUS:-1,EXECUTE_STATUS:0,QUEUE_STATUS:1,DISCARD_STATUS:2,INVALID_REQUEST_OBJECT:"Provided request object does not match aria.modules.RequestBeans.RequestObject." -,FILTER_CREATION_ERROR:"An error occured while creating a Request filter:\nclass: %1",INVALID_BASEURL:"The base URL defined in the RequestMgr object is empty or invalid - please check: \nurl: %1",MISSING_SERVICESPEC:"Provided request object must contain an actionName or a serviceSpec element",CALLBACK_ERROR:"An error occured in the Request manager while processing the callback function.",INVALID_URL:"Url for request is invalid: %1"},$prototype:{addParam:function(e,t){if(t==null)return this.removeParam(e);this -._params==null&&(this._params=[]);for(var n=0,r=this._params.length;n-1?e+=r:e+="?",e+t},__extractActionName:function(e){e=e||"";var t=e.indexOf("?"),n={name:"",params:""};return t<0?n.name=e:n={name:e.substring(0,t),params:e.substring(t+1)},n},__getUrlService:function(){if(!this._urlService){var e=aria.modules.urlService.environment.UrlService.getUrlServiceCfg(),t=e. -args[0],n=e.args[1],r=Aria.getClassRef(e.implementation);this._urlService=new r(t,n)}return this._urlService},__getRequestHandler:function(){if(!this._requestHandler){var e=aria.modules.requestHandler.environment.RequestHandler.getRequestHandlerCfg();this._requestHandler=Aria.getClassInstance(e.implementation,e.args)}return this._requestHandler},__environmentUpdated:function(e){if(e.name=="environmentChanged"){this._urlService&&(this._urlService.$dispose(),this._urlService=null),this._requestHandler&&(this._requestHandler -.$dispose(),this._requestHandler=null);return}}}}); -//******************* -//LOGICAL-PATH:aria/storage/AbstractStorage.js -//******************* -Aria.classDefinition({$classpath:"aria.storage.AbstractStorage",$dependencies:["aria.storage.EventBus","aria.utils.json.JsonSerializer","aria.utils.Type"],$implements:["aria.storage.IStorage"],$statics:{INVALID_SERIALIZER:"Invalid serializer configuration. Make sure it implements aria.utils.json.ISerializer",INVALID_NAMESPACE:"Inavlid namespace configuration. Must be a string.",EVENT_KEYS:["name","key","oldValue","newValue","url"]},$constructor:function(e){this._disposeSerializer=!1,this._eventCallback={fn:this -._onStorageEvent,scope:this},aria.storage.EventBus.$on({change:this._eventCallback});var t=e?e.serializer:null,n=!0;t&&("serialize"in t&&"parse"in t?n=!1:this.$logError(this.INVALID_SERIALIZER)),n&&(t=new aria.utils.json.JsonSerializer(!0),this._disposeSerializer=!0),this.serializer=t;var r="";e&&e.namespace&&(aria.utils.Type.isString(e.namespace)?r=e.namespace+"$":this.$logError(this.INVALID_NAMESPACE)),this.namespace=r},$destructor:function(){aria.storage.EventBus.$removeListeners({change:this._eventCallback -}),this._disposeSerializer&&this.serializer&&this.serializer.$dispose(),this.serializer=null,this._eventCallback=null},$prototype:{getItem:function(e){var t=this._get(this.namespace+e);return this.serializer.parse(t)},setItem:function(e,t){var n=this.getItem(e),r=this.serializer.serialize(t,{reversible:!0,keepMetadata:!1});aria.storage.EventBus.stop=!0,this._set(this.namespace+e,r),aria.storage.EventBus.stop=!1,t=this.serializer.parse(r),aria.storage.EventBus.notifyChange(this.type,e,t,n,this.namespace)},removeItem -:function(e){var t=this.getItem(e);t!==null&&(aria.storage.EventBus.stop=!0,this._remove(this.namespace+e),aria.storage.EventBus.stop=!1,aria.storage.EventBus.notifyChange(this.type,e,null,t,this.namespace))},clear:function(){aria.storage.EventBus.stop=!0,this._clear(),aria.storage.EventBus.stop=!1,aria.storage.EventBus.notifyChange(this.type,null,null,null)},_onStorageEvent:function(e){if(e.key===null||e.namespace===this.namespace){var t=aria.utils.Json.copy(e,!1,this.EVENT_KEYS);this.$raiseEvent(t)}}}}); -//******************* -//LOGICAL-PATH:aria/storage/EventBus.js -//******************* -Aria.classDefinition({$classpath:"aria.storage.EventBus",$singleton:!0,$events:{change:"Raised when a change happens in any of the linked instances"},$prototype:{stop:!1,notifyChange:function(e,t,n,r,i){this.$raiseEvent({name:"change",location:e,namespace:i,key:t,newValue:n,oldValue:r,url:Aria.$window.location})}}}); -//******************* -//LOGICAL-PATH:aria/storage/HTML5Storage.js -//******************* -Aria.classDefinition({$classpath:"aria.storage.HTML5Storage",$dependencies:["aria.utils.Event"],$extends:"aria.storage.AbstractStorage",$statics:{UNAVAILABLE:"%1 not supported by the browser."},$constructor:function(e,t,n){this.$AbstractStorage.constructor.call(this,e),this.type=t,this.storage=Aria.$window[t],this._browserEventCb={fn:this._browserEvent,scope:this};if(this.storage)aria.utils.Event.addListener(Aria.$window,"storage",this._browserEventCb);else if(n!==!1)throw this._disposeSerializer&&this.serializer&& -this.serializer.$dispose(),this.$logError(this.UNAVAILABLE,[this.type]),new Error(this.type)},$destructor:function(){aria.utils.Event.removeListener(Aria.$window,"storage",this._browserEventCb),this._browserEventCb=null,this.__target=null,this.$AbstractStorage.$destructor.call(this)},$prototype:{_get:function(e){return this.storage.getItem(e)},_set:function(e,t){this.storage.setItem(e,t)},_remove:function(e){this.storage.removeItem(e)},_clear:function(){this.storage.clear()},_browserEvent:function(e){if(aria -.storage.EventBus.stop)return;var t=this.namespace?e.key.substring(0,this.namespace.length)===this.namespace:!0;if(t){var n=e.oldValue,r=e.newValue;n&&(n=this.serializer.parse(n)),r&&(r=this.serializer.parse(r)),this._onStorageEvent({name:"change",key:e.key,oldValue:n,newValue:r,url:e.url,namespace:this.namespace})}},$on:function(e){aria.core.Browser.isIE8&&this.$logWarn(this.UNAVAILABLE,"change event"),this.$AbstractStorage.$on.call(this,e)}}}); -//******************* -//LOGICAL-PATH:aria/storage/IStorage.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.storage.IStorage",$events:{change:{description:"",properties:{key:"Name of the key that changed",oldValue:"Old value of the key in question, null if the key is newly added",newValue:"New value being set",url:"Address of the document whose storage object was affected"}}},$interface:{getItem:function(e){},setItem:function(e,t){},removeItem:function(e){},clear:function(){}}}); -//******************* -//LOGICAL-PATH:aria/storage/LocalStorage.js -//******************* -(function(){function e(e,t){e._get=t._get,e._set=t._set,e._remove=t._remove,e._clear=t._clear,e.storage=aria.storage.UserData._STORAGE,e.__keys=aria.storage.UserData._ALL_KEYS}Aria.classDefinition({$classpath:"aria.storage.LocalStorage",$extends:"aria.storage.HTML5Storage",$dependencies:["aria.core.Browser","aria.storage.UserData"],$constructor:function(t){var n=aria.core.Browser.isIE7;this.$HTML5Storage.constructor.call(this,t,"localStorage",!n);if(!this.storage&&n){var r=new aria.storage.UserData(t);e(this -,r),this._fallback=r}},$destructor:function(){this._fallback&&(this._fallback.$dispose(),this._fallback=null),this.$HTML5Storage.$destructor.call(this)}})})(); -//******************* -//LOGICAL-PATH:aria/storage/UserData.js -//******************* -(function(){function i(){t||(t=new aria.utils.json.JsonSerializer(!0));var n=e.getAttribute("kMap");return n?t.parse(n):{}}function s(r,i){r?n[i]=r:delete n[i],e.setAttribute("kMap",t.serialize(n)),e.save("JSONPersist")}function o(e,t){n=i();if(!t||e in n)return n[e];var o="uD"+r++;return s(o,e),o}var e,t,n={},r=4;Aria.classDefinition({$classpath:"aria.storage.UserData",$dependencies:["aria.utils.Object","aria.utils.Dom","aria.utils.json.JsonSerializer","aria.core.Browser"],$implements:["aria.storage.IStorage" -],$extends:"aria.storage.AbstractStorage",$onload:function(){if(aria.core.Browser.isIE)try{var t=Aria.$frameworkWindow.document.createElement("form");t.innerHTML="",Aria.$frameworkWindow.document.body.appendChild(t),e=t.firstChild,e.load("JSONPersist"),i()}catch(n){}},$onunload:function(){aria.core.Browser.isIE&&(e&&e.parentNode.removeChild(e),e=null),t&&t.$dispose(),t=null},$prototype:{_get:function(t){var n=o(t);return n? -e.getAttribute(n):null},_set:function(t,n){var r=o(t,!0);e.setAttribute(r,n),e.save("JSONPersist")},_remove:function(t){e.removeAttribute(o(t)),s(null,t),e.save("JSONPersist")},_clear:function(){var t=i();n={},e.removeAttribute("kMap");for(var r in t)t.hasOwnProperty(r)&&e.removeAttribute(t[r]);e.save("JSONPersist")}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/BaseCtxt.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.BaseCtxt",$singleton:!1,$constructor:function(){this._cfg=null,this._out=null,this._tpl=null,this._macrolibs=[],this._csslibs=[]},$destructor:function(){if(!this._macrolibs&&!this._csslibs)return;this.__disposeLibs(this._macrolibs),this.__disposeLibs(this._csslibs),this._macrolibs=null,this._csslibs=null},$statics:{TEMPLATE_CONSTR_ERROR:"Error while creating a new instance of template '%1' - please check script constructor.",TEMPLATE_DESTR_ERROR:"Error while destroying an instance of template '%1' - please check script destructor." -,MACRO_NOT_FOUND:"Missing macro '%1' in template '%2'.",MACRO_CALL_ERROR:"Error while calling macro '%1' in template '%2'.",LIBRARY_HANDLE_CONFLICT:"Template error: can't load shared macro library '%1'. A macro, text template, variable or another library has already been declared with the same name.",LIBRARY_ALREADY_LOADED:"Template error: library at classpath '%1' has already been loaded."},$prototype:{checkMacro:function(e){return e==null?this._cfg.macro:(typeof e=="string"?e={name:e,args:[],scope:this._tpl -}:(e.args==null&&(e.args=[]),e.scope==null&&(e.scope=this._tpl)),e)},_callMacro:function(e,t){this.$assert(62,this._out!=null),t=this.checkMacro(t);var n=t.scope,r=n["macro_"+t.name];r==null&&this.$logError(this.MACRO_NOT_FOUND,[t.name,n.$classpath]);try{r.apply(n,t.args)}catch(i){this.$logError(this.MACRO_CALL_ERROR,[t.name,n.$classpath],i)}},__loadLibs:function(e,t){this.$assert(134,t=="macrolibs"||t=="csslibs");if(t=="macrolibs")var n=this._macrolibs,r="__$macrolibs",i=aria.templates.TemplateCtxt,s=aria.templates -.ITemplate;else if(t=="csslibs")var n=this._csslibs,r="__$csslibs",i=aria.templates.CSSCtxt,s=aria.templates.ICSS;var o={},u=0;for(var a in e)if(e.hasOwnProperty(a)){if(this._tpl[a]!==undefined){delete e[a],this.$logError(this.LIBRARY_HANDLE_CONFLICT,[a]);continue}if(o[e[a]]){this.$logError(this.LIBRARY_ALREADY_LOADED,[a]);continue}o[e[a]]=!0,u++}if(u===0)return;for(var a in e)if(e.hasOwnProperty(a)){this._tpl[a]=Aria.getClassInstance(e[a]),this._tpl[a].__$write=this._tpl.__$write;var f=new i;f._tpl=this._tpl -[a],n.push(f),s.call(this._tpl[a],f),f._tpl.__$initTemplate(),f.__loadLibs(f._tpl[r],t)}},__disposeLibs:function(e){for(var t=0;t0&&e.writeln("$macrolibs: ",n.convertToJsonString(r),",")}if(t.$csslibs){var i=aria.utils.Array.extractValuesFromMap(t.$csslibs);i.length>0&&e.writeln("$csslibs: ",n.convertToJsonString(i),",")}t.$texts&&e.writeln("$texts: ",n.convertToJsonString(t.$texts),",")},_writeMapInheritance -:function(e,t,n,r){if(e.parentClassType==this._classType){if(n){var i=e.newVarName();e.writeln("var ",i," = {};"),e.writeln("Aria.copyObject(proto.",t,",",i,");"),e.writeln("Aria.copyObject(",aria.utils.Json.convertToJsonString(n),",",i,");"),e.writeln("proto.",t," = ",i,";")}}else{var s=n?aria.utils.Json.convertToJsonString(n):r;e.writeln("proto.",t," = ",s,";")}},_writeValueInheritance:function(e,t,n,r){if(e.parentClassType==this._classType)n!=null&&e.writeln("proto.",t," = ",aria.utils.Json.convertToJsonString -(n),";");else{var i=n!=null?aria.utils.Json.convertToJsonString(n):r;e.writeln("proto.",t," = ",i,";")}},_writeClassInit:function(e){var t=e.scriptClasspath;t&&(e.enterBlock("classInit"),e.writeln("aria.core.TplClassLoader._importScriptPrototype("+t+",proto)"),e.leaveBlock());var n=e.getBlockContent("classInit");n.length>0&&(e.writeln("$init: function(proto) {"),e.increaseIndent(),e.write(n),e.decreaseIndent(),e.writeln("},"))},_writeInitTemplate:function(e){e.writeln("__$initTemplate: function() {"),e.increaseIndent -(),e.parentClassType==this._classType&&e.writeln("if (! this.$",e.parentClassName,".__$initTemplate.call(this)) { return false; }"),e.write(e.getBlockContent("initTemplate"));var t=e.getBlockContent("globalVars");t.length>0&&(e.writeln("try {"),e.increaseIndent(),e.writeln("with (this) {"),e.increaseIndent(),e.write(t),e.decreaseIndent(),e.writeln("}"),e.decreaseIndent(),e.writeln("} catch (_ex) {"),e.increaseIndent(),e.writeln("this.$logError(this.EXCEPTION_IN_VARINIT,[this.$classpath],_ex);"),e.writeln("return false;" -),e.decreaseIndent(),e.writeln("}")),e.writeln("return true;"),e.decreaseIndent(),e.writeln("}")},_writeClassDefEnd:function(e){e.writeln("$prototype: {"),e.increaseIndent(),e.write(e.getBlockContent("prototype")),e.decreaseIndent(),e.writeln("}"),e.decreaseIndent(),e.writeln("})"),e.leaveBlock()},_processTemplateContent:function(e){var t=e.out,n=t.templateParam,r=e.statement;t.addDependencies(n.$dependencies),this._createBlocks(t),this._processInheritance(t),this._processScript(t),t.enterBlock("classDefinition" -),this._writeClassDefHeaders(t),this._writeConstructor(t),this._writeDestructor(t),t.leaveBlock(),t.processContent(r.content);if(t.errors){t.$dispose(),this.$callback(t.callback,{classDef:null}),t.errors=!1;return}t.enterBlock("prototype"),this._writeClassInit(t),this._writeInitTemplate(t),t.leaveBlock(),t.enterBlock("classDefinition"),this._writeDependencies(t),this._writeClassDefEnd(t),t.leaveBlock();var i=null;i=t.getBlockContent("classDefinition"),t.$dispose(),this.$callback(t.callback,{classDef:i,tree:t -.tree,debug:t.debug})}}}); -//******************* -//LOGICAL-PATH:aria/templates/ClassWriter.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.ClassWriter",$dependencies:["aria.utils.String"],$constructor:function(e,t){this._processStatement=e,this._processErrors=t,this._curindent="",this.indentUnit=" ",this._varNameNumber=0,this.errorContext=null,this.allDependencies=null,this.templateParam=null,this.parentClassType="JS",this.parentClassName=null,this.parentClasspath=null,this.scriptClassName=null,this.scriptClasspath=null,this.callback=null,this.wlibs={},this.macros={},this.views={},this._curblock= -null,this._blocks={},this._stack=[],this._dependencies=[],this.errors=!1,this.debug=!1,this.tree=null},$prototype:{addDependencies:function(e){for(var t=e.length-1;t>=0;t--)this.addDependency(e[t])},addDependency:function(e){this._dependencies[e]=1},getDependencies:function(){var e=[];for(var t in this._dependencies)this._dependencies.hasOwnProperty(t)&&e.push(this.stringify(t));return e.length>0?["$dependencies: [",e.join(","),"],"].join(""):""},getMacro:function(e){var t=this.macros[e];return t==null&&(t={ -},this.macros[e]=t),t},getView:function(e){var t=this.views[e];return t==null&&(t={},this.views[e]=t),t},isOutputReady:function(){return this._curblock!=null},newBlock:function(e,t){var n={curindentnbr:t,out:[]};this._blocks[e]=n},enterBlock:function(e){this._stack.push(this._curblock),this._curblock=this._blocks[e],this.indentUnit&&this._curblock&&this._updateIndent()},leaveBlock:function(){this._curblock=this._stack.pop(),this.indentUnit&&this._curblock&&this._updateIndent()},getBlockContent:function(e){return this -._blocks[e].out.join("")},stringify:function(e){return this.stringify=aria.utils.String.stringify,this.stringify(e)},newVarName:function(){return this._varNameNumber++,"__v_"+this._varNameNumber+"_"+parseInt(10*Math.random(),10)},processContent:function(e){for(var t=0;t4e3&&this.$logWarn(this.CSSTEMPLATE_MAX_SELECTORS_REACHED),this.__reloadStyleTags(i)},__sortPaths:function(){var e= -aria.utils.Object.keys(this.__textLoaded),t=this.__prefixes,n=this.__PREFIX.length,r=function(e,r){var i=t[e]?parseInt(t[e].substring(n),10):Number.MAX_VALUE,s=t[r]?parseInt(t[r].substring(n),10):Number.MAX_VALUE;return i===s?0:i>s?1:-1},i=e.sort(r);return t=null,n=null,i},__reloadStyleTags:function(e){for(var t in e){if(!e.hasOwnProperty(t))continue;var n=this.__buildStyleIfMissing(t),r=e[t].join("\n");if(n.styleSheet)n.styleSheet.cssText=r;else{var i=Aria.$window.document.createTextNode(r);n.firstChild?n.replaceChild -(i,n.firstChild):n.appendChild(i)}n=null}},__buildStyleIfMissing:function(e){var t=this.__styleTagPool[e];if(!t){var n=Aria.$window.document,r=n.getElementsByTagName("head")[0];t=n.createElement("style"),t.id=this.__TAG_PREFX+e,t.type="text/css",t.media="all",r.appendChild(t),t=r.lastChild,this.__styleTagPool[e]=t}return t},reset:function(){for(var e in this.__styleTagPool)this.__styleTagPool.hasOwnProperty(e)&&this.__styleTagPool[e].parentNode.removeChild(this.__styleTagPool[e]);this.__attachedToWindow&&(aria -.utils.AriaWindow.detachWindow(),this.__attachedToWindow=!1),this.__styleTagPool={},this.__textLoaded={},this.__pathsLoaded=[],this.__prefixes={},this.__cssUsage={},this.__styleTagAssociation={},this.__invalidClasspaths={},this.__cssDependencies={},this.__PREFIX=this.classDefinition.$statics.__PREFIX,this.__NEXT_PREFIX_INDEX=this.classDefinition.$statics.__NEXT_PREFIX_INDEX,this.__NEXT_TAG_INDEX=this.classDefinition.$statics.__NEXT_TAG_INDEX,this.__TAG_PREFX=this.classDefinition.$statics.__TAG_PREFX},invalidate -:function(e,t){aria.templates.CSSCtxtManager.disposeContext(e),!this.__invalidClasspaths[e]&&t&&(this.__invalidClasspaths[e]=!0,this.__invalidStack.push(e))},stop:function(){this.__isStopped=!0},resume:function(){this.__isStopped=!1;var e=this.__queuedChanges;this.__queuedChanges=[];if(e.length>0)return this.__textToDOM(e)},registerDependencies:function(e,t){for(var n=0,r=t.length;n0))}},getInvalidClasspaths:function(e){var t=this.__invalidStack;return e&&(this.__invalidStack=[]),t}}}); -//******************* -//LOGICAL-PATH:aria/templates/CSSParser.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.CSSParser",$extends:"aria.templates.Parser",$dependencies:["aria.utils.String"],$singleton:!0,$statics:{MISSING_OPENINGBRACES:"line %1: Template parsing error: could not find corresponding '{'."},$prototype:{parseTemplate:function(e,t,n){return this.context=t,this._prepare(e),this.__preprocess(n)?(this._computeLineNumbers(),this._buildTree()):null},__preprocess:function(e){var t=this.template,n=aria.utils.String,r=0,i=-1,s=-1,o=[],u=/^\{[\s\/]*?([\w]+)\b/,a=0, -f=t.length,l=-1,c=0,h=-1;while(a-1&&(s>i||s==-1)){c===0&&(h=i),c++;if(l==-1)if(t.charAt(i-1)=="$")l=c;else{var p=t.substring(i,s),d=u.exec(p);d&&e[d[1]]?l=c:(o.push(t.substring(a,i)),o.push("\\{"),a=i+1)}r=i+1}else if(s>-1){if(c===0)return this._computeLineNumbers(),this.$logError(this.MISSING_OPENINGBRACES,[this.positionToLineNumber(s)],this.context),!1;l==c?l=-1:l==-1&&(o.push(t.substring(a,s)),o.push("\\}"),a=s+1),c--,r=s+1 -}else this.$assert(94,i==-1&&s==-1),r=f,o.push(t.substring(a,f)),a=f}return c>0?(this._computeLineNumbers(),this.$logError(this.MISSING_CLOSINGBRACES,[this.positionToLineNumber(h)],this.context),!1):(this.template=o.join(""),!0)}}}); -//******************* -//LOGICAL-PATH:aria/templates/CSSTemplate.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.CSSTemplate",$extends:"aria.templates.BaseTemplate",$dependencies:["aria.templates.ICSS"],$constructor:function(){this.$BaseTemplate.constructor.call(this);var e=aria.core.Cache.getFilename(this.$classpath),t=aria.core.DownloadMgr.resolveURL(e,!0);this.cssPath="/"+this.$classpath.replace(/\./g,"/"),this.cssFolderPath=t.substring(0,t.lastIndexOf("/"))},$destructor:function(){this.$BaseTemplate.$destructor.call(this)},$prototype:{$init:function(e,t){e.$BaseTemplate -.constructor.classDefinition.$prototype.$init(e,t);var n=aria.templates.ICSS.prototype;for(var r in n)n.hasOwnProperty(r)&&!e.hasOwnProperty(r)&&(e[r]=n[r])}}}); -//******************* -//LOGICAL-PATH:aria/templates/DomElementWrapper.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.DomElementWrapper",$dependencies:["aria.utils.Dom","aria.utils.DomOverlay","aria.utils.ClassList","aria.utils.sandbox.DOMProperties"],$constructor:function(e,t){if(e&&e.nodeType)while(e.nodeType!=1)e=e.parentNode;var n=e.tagName;this.tagName=n,this.getChild=function(t){var n=aria.utils.Dom.getDomElementChild(e,t);return n?new aria.templates.DomElementWrapper(n):null},this.getAttribute=function(t){if(!this.attributesWhiteList.test(t))return this.$logError(this. -INVALID_ATTRIBUTE_NAME,[t]),null;var n=e.attributes[t];return n?n.value:null},this.getData=function(t,n){if(!/^\w+$/.test(t)||t.charAt(0)=="_")return this.$logError(this.INVALID_EXPANDO_NAME,[t]),null;var r="_"+t,i="data-"+t,s=e.attributes[r]||e.attributes[i];e.attributes[r]!=null&&this.$logWarn("The '_' usage is deprecated for the expando %1, please use the dataset html attribute instead.",[r]);if(!s&&n){var o=e.parentNode;while(!s&&o!=null&&o.attributes!=null)s=o.attributes[r]||o.attributes[i],e.attributes -[r]!=null&&this.$logWarn("The '_' usage is deprecated for the expando %1, please use the dataset html attribute instead.",[r]),o=o.parentNode}return s?s.value:null},this.getParentWithData=function(t){if(!/^\w+$/.test(t)||t.charAt(0)=="_")return this.$logError(this.INVALID_EXPANDO_NAME,[t]),null;var n="data-"+t,r=e,i=r.attributes[n];while(!i&&r.parentNode!=null)r=r.parentNode,r.attributes&&(i=r.attributes[n]);return i?new aria.templates.DomElementWrapper(r):null},this.classList=new aria.utils.ClassList(e),this -.focus=function(){try{return e.focus()}catch(t){this.$logDebug(this.FOCUS_FAILURE,e)}},this.setStyle=function(t){e.style.cssText=t},this.getProperty=function(t){if(aria.utils.sandbox.DOMProperties.isReadSafe(n,t))return e[t];this.$logError(this.READ_ACCESS_DENIED,[t,n])},this.setProperty=function(t,r){aria.utils.sandbox.DOMProperties.isWriteSafe(n,t)?e[t]=r:this.$logError(this.WRITE_ACCESS_DENIED,[t,n])},this.getParentWithName=function(t){if(!t||!e)return null;var n=Aria.$window.document.body;t=t.toUpperCase -();var r=e.parentNode;while(r&&r!=n){if(r.nodeName==t)return new aria.templates.DomElementWrapper(r);r=r.parentNode}return null},this.setProcessingIndicator=function(n,r){var i,s=!0;n?i=aria.utils.DomOverlay.create(e,r):(i=aria.utils.DomOverlay.detachFrom(e,r),i||(s=!1)),t&&s&&t.registerProcessingIndicator(n,i)},this.scrollIntoView=function(t){aria.utils.Dom.scrollIntoView(e,t)},this.getScroll=function(){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}},this.setScroll=function(t){t&&(t.hasOwnProperty("scrollLeft" -)&&t.scrollLeft!=null&&(e.scrollLeft=t.scrollLeft),t.hasOwnProperty("scrollTop")&&t.scrollTop!=null&&(e.scrollTop=t.scrollTop))},this._dispose=function(){this.setProcessingIndicator(!1),e=null,t=null,this.getChild=null,this.classList.$dispose(),this.getData=null,this.getAttribute=null,this.getProperty=null,this.setProperty=null,this.focus=null,this.setStyle=null,this.getParentWithName=null,this.getParentWithData=null,this.setProcessingIndicator=null}},$destructor:function(){this._dispose&&(this._dispose(),this -._dispose=null)},$statics:{attributesWhiteList:/^(name|title|style|dir|lang|abbr|height|width|size|cols|rows|rowspan|colspan|nowrap|valign|align|border|cellpadding|cellspacing|disabled|readonly|checked|selected|multiple|value|alt|maxlength|type|accesskey|tabindex|placeholder|autocomplete|autofocus|autocorrect|autocapitalize|spellcheck)$/,INVALID_EXPANDO_NAME:"Invalid expando name: '%1'.",INVALID_ATTRIBUTE_NAME:"Invalid attribute name: '%1'.",FOCUS_FAILURE:"Could not focus element",READ_ACCESS_DENIED:"Access to property %1 of tag %2 is not allowed." -,WRITE_ACCESS_DENIED:"Write access to property %1 of tag %2 is not allowed."},$prototype:{getChild:function(e){},getAttribute:function(e){},getData:function(e,t){},getParentWithData:function(e){},focus:function(){},setStyle:function(e){},getValue:function(){return this.getProperty("value")},setValue:function(e){this.setProperty("value",e)},_dispose:function(){},getParentWithName:function(e){},setProcessingIndicator:function(e,t){},scrollIntoView:function(e){},getScroll:function(){},setScroll:function(e){}}}); -//******************* -//LOGICAL-PATH:aria/templates/DomEventWrapper.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.DomEventWrapper",$extends:"aria.DomEvent",$dependencies:["aria.templates.DomElementWrapper"],$constructor:function(e){var t=aria.templates.DomElementWrapper;this.$DomEvent.constructor.call(this,e),this.target=this.target?new t(this.target):null,this.relatedTarget=this.relatedTarget?new t(this.relatedTarget):null},$destructor:function(){this.target&&(this.target.$dispose(),this.target=null),this.relatedTarget&&(this.relatedTarget.$dispose(),this.relatedTarget=null -),this.$DomEvent.$destructor.call(this)},$prototype:{setTarget:function(e){this.target&&this.target.$dispose(),this.target=e?new aria.templates.DomElementWrapper(e):null}}}); -//******************* -//LOGICAL-PATH:aria/templates/GlobalStyle.tpl.css -//******************* -{CSSTemplate { - $classpath : "aria.templates.GlobalStyle" -}} - -{macro main()} - -.xLDI-text { - position: relative; - top: 50%; - display:block; - text-align:center; - padding-top: 20px; -} - -.xLDI { - /* These default values can be overridden in the skin */ - background-color: #fff; - {call opacity(80)/} - width: 100%; - height: 100%; -} - -.xOverlay { - /* These default values can be overridden in the skin */ - background-color: #ddd; - border: 1px solid black; - {call opacity(40)/} -} - -.xModalMask-default { - width:100%; - height:100%; - background-color: black; - {call opacity(40)/} -} - -.xOverflowAuto { - overflow: auto; -} - -.xOverflowHidden { - overflow: hidden; -} - -.xOverflowXAuto { - overflow-x: auto; -} - -.xOverflowYAuto { - overflow-y: auto; -} - -.xOverflowXHidden { - overflow-x: hidden; -} - -.xOverflowYHidden { - overflow-y: hidden; -} - -/* template div container style */ -.xTplContent { -} - -{/macro} - -{macro opacity(percent)} - filter: alpha(opacity=${percent}); - -moz-opacity: ${percent/100}; - opacity: ${percent/100}; -{/macro} - -{/CSSTemplate} -//******************* -//LOGICAL-PATH:aria/templates/IBaseTemplate.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.IBaseTemplate",$events:{},$interface:{__$write:function(e){}}}); -//******************* -//LOGICAL-PATH:aria/templates/ICSS.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.ICSS",$extends:"aria.templates.IBaseTemplate",$events:{},$interface:{prefix:"Object"}}); -//******************* -//LOGICAL-PATH:aria/templates/IModuleCtrl.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.IModuleCtrl",$events:{methodCallBegin:{description:"",properties:{method:"Name of the method about to be called."}},methodCallEnd:{description:"",properties:{method:"Name of the method which was called."}},methodCallback:{description:"",properties:{method:"Name of the method which was called."}},beforeDispose:{description:"",properties:{reloadingObject:"If the module controller is about to be reloaded, it contains an object which raises an 'objectLoaded' event when the module controller is reloaded." -}}},$interface:{init:{$type:"Function",$callbackParam:1},getData:function(){},setData:function(e,t){},getResourceSet:function(){},getSubModuleCtrl:function(e){},registerListener:function(e){},unregisterListeners:function(e){},setSession:function(e){}}}); -//******************* -//LOGICAL-PATH:aria/templates/IObjectLoading.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.IObjectLoading",$events:{objectLoaded:{description:"",properties:{object:"Reference to the object just loaded."}}},$interface:{}}); -//******************* -//LOGICAL-PATH:aria/templates/ITemplate.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.ITemplate",$extends:"aria.templates.IBaseTemplate",$events:{SectionRefreshed:{description:"",properties:{sectionID:"{String} ID of the section which has been refreshed - if defined, null otherwise."}}},$interface:{data:"Object",moduleCtrl:"Object",flowCtrl:"Object",moduleRes:"Object",$refresh:function(e){},$getChild:function(e,t){},$getElementById:function(e){},$focus:function(e){},$getFocusedWidget:function(){},$setFocusedWidget:function(){},$hdim:function( -e,t,n){},$vdim:function(e,t,n){},$getId:function(e){},getContainerScroll:function(){},setContainerScroll:function(e){},__$writeId:function(e){},__$processWidgetMarkup:function(e,t,n,r){},__$beginContainerWidget:function(e,t,n,r){},__$endContainerWidget:function(){},__$statementOnEvent:function(e,t,n){},__$statementRepeater:function(e,t){},__$createView:function(e,t,n){},__$beginSection:function(e,t,n,r){},__$endSection:function(){},__$bindAutoRefresh:function(){}}}); -//******************* -//LOGICAL-PATH:aria/templates/ITemplateCtxt.js -//******************* -Aria.interfaceDefinition({$classpath:"aria.templates.ITemplateCtxt",$interface:{tplClasspath:"Object",moduleCtrl:"Object",moduleCtrlPrivate:"Object",moduleRes:"Object",flowCtrl:"Object",flowCtrlPrivate:"Object",data:"Object",$reload:"Function"}}); -//******************* -//LOGICAL-PATH:aria/templates/Layout.js -//******************* -(function(){var e,t,n,r,i={width:{},height:{}},s,o=null,u=function(){o==null&&(o=[],aria.utils.AriaWindow.attachWindow(),n.addListener(Aria.$window,"resize",{fn:c}))},a=function(){r&&(t.cancelCallback(r),r=null),o!=null&&(n.removeListener(Aria.$window,"resize",{fn:c}),aria.utils.AriaWindow.detachWindow(),o=null)},f=function(){o==null&&e._listeners&&e._listeners.viewportResized?u():o!=null&&o.length===0&&(e._listeners==null||e._listeners["viewportResized"]==null)&&a()},l=function(t){var n;if(t.min!=null||t.max!= -null)n=Aria.minSizeMode&&t.min!=null?t.min:t.viewport,n!=null?(t.scrollbar&&(n-=e.getScrollbarsWidth()),t.min!=null&&nt.max&&(n=t.max)):t.min==t.max&&(n=t.min);t.value=n},c=function(){r&&(t.cancelCallback(r),r=null),r=t.addCallback({fn:p,scope:e,delay:50})},h=function(){var t=e.viewportSize,n=aria.utils.Dom._getViewportSize();return n.width!=t.width||n.height!=t.height?(e.viewportSize=n,e.setSOViewport(i.width,n.width),e.setSOViewport(i.height,n.height),!0):!1},p=function(){r= -null;if(h()){var t=o.length;for(var n=0;n max (%2).",MINSIZE_UNDEFINED -:"vdim or hdim cannot be used if container has no minimum size."},$prototype:{viewportSize:{width:null,height:null},$on:function(){this.$JsObject.$on.apply(this,arguments),f()},$unregisterListeners:function(){this.$JsObject.$unregisterListeners.apply(this,arguments),f()},$addListeners:function(){this.$JsObject.$addListeners.apply(this,arguments),f()},$removeListeners:function(){this.$JsObject.$removeListeners.apply(this,arguments),f()},registerAutoresize:function(e,t,n){o==null&&u(),o.push({domElt:e,width:t, -height:n})},unregisterAutoresize:function(e){if(o==null)return;var t=o.length,n=[];for(var r=0;re.max&&(this.$logError(this.LAYOUT_INCOHERENT_MIN_MAX,[e.min,e.max]),e.max=undefined),l(e)},setSOViewport:function(e,t){e.viewport=t,l(e)},getSODim:function( -e,t,n,r){var i=e.min;if(i==null)return this.$logError(this.MINSIZE_UNDEFINED),t;var s=e.value;n==null&&(n=1);var o=parseInt(t+(s-i)*n,10);return r!=null&&o>r&&(o=r),o},getScrollbarsWidth:function(){if(s!=null)return s;var e=Aria.$window.document,t=e.createElement("div"),n=e.createElement("div");return t.style.overflow="",t.style.position="absolute",t.style.left="-10000px",t.style.top="-10000px",t.style.width="500px",t.style.height="500px",aria.core.Browser.isIE7||(n.style.width="100%"),n.style.height="100%", -e.body.appendChild(t),t.appendChild(n),s=n.offsetWidth,t.style.overflow="scroll",s-=n.offsetWidth,e.body.removeChild(t),s}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/MarkupWriter.js -//******************* -(function(){Aria.classDefinition({$classpath:"aria.templates.MarkupWriter",$dependencies:["aria.templates.Section","aria.utils.Delegate","aria.templates.DomEventWrapper","aria.utils.Type"],$constructor:function(e,t){var n=t?t.filterSection:null;this._out=[],this._ctrlStack=[],this.tplCtxt=e,this.sectionState=n?this.SECTION_SEARCHING:this.SECTION_KEEP,this.write=n?this.__writeSkip:this.__writeOK,this._filterSection=n,this._topSection=n?null:new aria.templates.Section(this.tplCtxt,null,{isRoot:!0,ownIdMap:t&&t -.ownIdMap}),this._currentSection=this._topSection,this._delegateMap=null},$destructor:function(){this._currentSection=null,this._delegateMap=null,this._topSection&&(this._topSection.$dispose(),this._topSection=null)},$statics:{SECTION_SEARCHING:0,SECTION_KEEP:1,SECTION_SKIP:2,SECTION_FILTER_NOT_FOUND:"Error while refreshing template '%1': filter section '%2' was not found."},$prototype:{skipContent:!1,_beginSectionOrRepeater:function(e,t){if(this.sectionState==this.SECTION_SKIP)return;var n=e.id;if(this.sectionState!= -this.SECTION_KEEP&&n!=this._filterSection)return;var r=new t(this.tplCtxt,e);if(!r.cfgOk){r.$dispose();return}this.sectionState==this.SECTION_KEEP?(this._currentSection&&this._currentSection.addSubSection(r),r.writeBegin(this)):(this.sectionState=this.SECTION_KEEP,this.write=this.__writeOK),this._currentSection=r,r.writeContent(this)},repeater:function(e){this._beginSectionOrRepeater(e,aria.templates.Repeater),this.endSection()},beginSection:function(e){this._beginSectionOrRepeater(e,aria.templates.Section)} -,endSection:function(){if(this.sectionState!=this.SECTION_KEEP)return;var e=this._currentSection;e.id==this._filterSection?(this._topSection=this._currentSection,this.sectionState=this.SECTION_SKIP,this.write=this.__writeSkip):this.sectionState==this.SECTION_KEEP&&(e.writeEnd(this),this._currentSection=e.parent),this.$assert(99,!!this._currentSection)},addToCtrlStack:function(e){this._ctrlStack.push(e)},removeFromCtrlStack:function(){return this._ctrlStack.pop()},__writeOK:function(e){if(this._delegateMap)if( -e||e===0){e=""+e;var t=e.indexOf(">");if(t!=-1){var n=this._delegateMap;this._delegateMap=null;var r=function(e){var t=new aria.templates.DomEventWrapper(e),r=!0,i=n[e.type];return i&&(r=i.call(t)),t.$dispose(),r},i=aria.utils.Delegate.add(r);this._currentSection.delegateIds.push(i),this._out.push(e.substring(0,t)),this._out.push(" "+aria.utils.Delegate.getMarkup(i)),this._out.push(e.substring(t));return}}this._out.push(e)},__writeSkip:function(){},pushDelegate:function(e,t){if(!this._currentSection)return;var n= -aria.utils.Delegate;if(this.sectionState!=this.SECTION_KEEP)return;if(!n.isDelegated(e)){var r=n.add(t);this._currentSection.delegateIds.push(r),this.write(n.getFallbackMarkup(e,r,!0));return}t=new aria.utils.Callback(t),this._currentSection.delegateCallbacks.push(t),this._delegateMap||(this._delegateMap={}),this._delegateMap[e]=t},registerBehavior:function(e){this._currentSection&&this._currentSection.addBehavior(e)},callMacro:function(e){this.tplCtxt._callMacro(this,e)},getSection:function(){var e=this._topSection -;return e?(e.html=this._out.join(""),this._delegate=null):this.$logError(this.SECTION_FILTER_NOT_FOUND,[this.tplCtxt.tplClasspath,this._filterSection]),this._out=null,this._topSection=null,e}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/Modifiers.js -//******************* -(function(){var e,t={eat:{fn:function(){return""}},escape:{init:function(e){e.addDependencies(["aria.utils.String"])},fn:function(e){return aria.utils.String.escapeHTML(String(e))}},escapeforhtml:{init:function(e){e.addDependencies(["aria.utils.String"])},fn:function(e,t){return e==null?e:aria.utils.String.escapeForHTML(e+"",t)}},capitalize:{fn:function(e){return String(e).toUpperCase()}},"default":{fn:function(e,t,n){return e!=null?e:n?aria.templates.Modifiers.callModifier(n,[t]):t}},empty:{fn:function(e,t, -n){return!!e&&!/^\s*$/.test(e)?e:n?aria.templates.Modifiers.callModifier(n,[t]):t}},pad:{fn:function(e,t,n){e=""+e;var r=e.length;if(ra;a++)s.push(u);return i&&s.push(e),s.join("")}return e}},dateformat:{init:function(e){e.addDependencies(["aria.utils.Date","aria.utils.Type"])},fn:function(e,t){if(aria.utils.Type.isDate(e))return aria.utils.Date.format(e,t);this.$logError(aria.templates.Modifiers.DATEFORMAT_MODIFIER_ENTRY,[e])}},timeformat:{init -:function(e){e.addDependencies(["aria.utils.Date","aria.utils.Type"])},fn:function(e,t){if(aria.utils.Type.isDate(e))return aria.utils.Date.format(e,t);this.$logError(aria.templates.Modifiers.DATEFORMAT_MODIFIER_ENTRY,[e])}},highlightfromnewword:{init:function(e){e.addDependencies(["aria.utils.String","aria.utils.Type"])},fn:function(t,n){var r=aria.utils,i=n.length;if(r.Type.isString(t)&&i){n=n.toLowerCase();var s=t.toLowerCase(),o;if(s.indexOf(n)===0)o=0;else{var u=n.replace(e,"\\$1"),a=(new RegExp("\\s"+u -,"i")).exec(s);if(!a)return t;o=a.index+1}var f=o,l=o+i,c=t.substring(f,l),h=r.String.stripAccents(c).toLowerCase();if(h===n)return t.substring(0,f)+""+c+""+t.substring(l)}return t}},starthighlight:{init:function(e){e.addDependencies(["aria.utils.String","aria.utils.Type"])},fn:function(e,t){if(aria.utils.Type.isString(e)&&t.length){var n=aria.utils.String.stripAccents(e.substring(0,t.length)).toLowerCase();t=t.toLowerCase();if(n===t)return""+e.substring(0,t.length)+""+e.substring -(t.length)}return e}},highlight:{init:function(e){e.addDependencies(["aria.utils.String","aria.utils.Type"])},fn:function(t,n){if(aria.utils.Type.isString(t)&&aria.utils.Type.isString(n)){var r=t.split(" "),i=n.split(" ").sort(function(e,t){var n=e.length,r=t.length;return n===r?0:n0){var l=""+f[0]+"";r[n]=t.replace(a,l);if(!!t.match(a))break}}}),r.join(" ")}return t}}};Aria.classDefinition({$classpath:"aria.templates.Modifiers",$singleton:!0,$constructor:function(){e=new RegExp("(\\"+"/.*+?|()[]{}\\".split("").join("|\\")+")","g")},$statics:{UNKNOWN_MODIFIER:"Unknown modifier %1.",DATEFORMAT_MODIFIER_ENTRY:"Entry %1 is not a date."},$prototype:{callModifier:function(e,n){e=""+e;var r=t[e.toLowerCase()];if( -r)return r.fn.apply(this,n);this.$logError(aria.templates.Modifiers.UNKNOWN_MODIFIER,[e])},initModifier:function(e,n){var r=t[e];r&&r.init&&r.init(n)}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/ModuleCtrl.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.ModuleCtrl",$extends:"aria.templates.PublicWrapper",$implements:["aria.templates.IModuleCtrl"],$dependencies:["aria.utils.Json","aria.utils.Type","aria.templates.ModuleCtrlFactory","aria.templates.RefreshManager","aria.modules.RequestMgr"],$constructor:function(){this.$PublicWrapper.constructor.call(this),this._data={},this._dataBeanName=null,this._smList=null,this.__resources=null,this._session=null,this.$requestHandler=null,this.$requestJsonSerializer=null,this -._enableMethodEvents==null&&(this.$logWarn(this.DEPRECATED_METHOD_EVENTS),this._enableMethodEvents=!0),this._enableMethodEvents=this._enableMethodEvents!==!0?!1:this._enableMethodEvents,this._enableMethodEvents&&this.$addInterceptor(this.$publicInterfaceName,{fn:this._interceptPublicInterface,scope:this})},$destructor:function(){this.$raiseEvent({name:"beforeDispose",reloadingObject:this.__$reloadingObject}),this._enableMethodEvents&&this.$removeInterceptors(this.$publicInterfaceName,this,this._interceptPublicInterface -),this._smLoads=null,this._data=null,this._resources=null,this._smList=null,aria.templates.ModuleCtrlFactory.__notifyModuleCtrlDisposed(this),this.$PublicWrapper.$destructor.call(this),this.$requestJsonSerializer=null},$statics:{INIT_CALLBACK_ERROR:"An error occured while processing a Module init callback in class %1",DATA_CONTENT_INVALID:"Content of datamodel does not match databean:\nbean name: %1,\nmodule class: %2",DEPRECATED_METHOD_EVENTS:"Generic method events (methodCallBegin, methodCallEnd, methodCallback) will be turned off by default in a future release. If the application relies on those events please set the enableMethodEvents variable to true. To already benefit from performance improvements by disabling them, you can set this variable to false." -},$prototype:{$hasFlowCtrl:!1,$publicInterfaceName:"aria.templates.IModuleCtrl",$init:function(e,t,n){e.json=aria.utils.Json},init:function(e,t){this.$callback(t,!0,this.INIT_CALLBACK_ERROR)},_interceptPublicInterface:function(e){e.step=="CallBegin"&&!aria.templates.ModuleCtrl.prototype[e.method]&&aria.templates.RefreshManager.stop();var t={name:"method"+e.step,method:e.method};this.$raiseEvent(t),e.step=="CallEnd"&&!aria.templates.ModuleCtrl.prototype[e.method]&&aria.templates.RefreshManager.resume()},submitJsonRequest -:function(e,t,n){var r=aria.utils.Type;if(r.isString(n)||r.isFunction(n)){var i={fn:n,scope:this};n=i}else r.isObject(n)&&n.scope==null&&(n.scope=this);var s={fn:this._submitJsonRequestCB,scope:this,args:{cb:n}},o={moduleName:this.$package,session:this._session,actionQueuing:null,requestHandler:this.$requestHandler,urlService:this.$urlService,requestJsonSerializer:this.$requestJsonSerializer};r.isString(e)?o.actionName=e:o.serviceSpec=e,aria.modules.RequestMgr.submitJsonRequest(o,t,s)},_submitJsonRequestCB:function( -e,t){aria.templates.RefreshManager.stop(),this.$callback(t.cb,e),aria.templates.RefreshManager.resume()},onSubModuleEvent:function(e,t){},_onSubModuleBeforeDisposeEvent:function(e,t){var n=this._smList;if(n)for(var r=0,i=n.length;r0&&(this._smList||(this._smList=[]),this._smList=this._smList.concat(e.subModules)),this.$callback(t,e)},disposeSubModule:function(e){aria.templates.ModuleCtrlFactory.__disposeSubModule(this,e)},getData:function(){return this._data},setData:function(e,t){this.json.inject(e,this._data,t),this._dataBeanName&&(aria.core.JsonValidator.normalize -({json:this._data,beanName:this._dataBeanName})||this.$logError(this.DATA_CONTENT_INVALID,[this._dataBeanName,this.$classpath]))},getResourceSet:function(){if(!this.__resources){if(!this.$resources)return undefined;this.__resources={};for(var e in this.$resources)this.$resources[e].hasOwnProperty("provider")?this.__resources[e]=this[e]:this.__resources[e]=Aria.getClassRef(this.$resources[e])}return this.__resources},getSubModuleCtrl:function(e){if(this._smList){var t=this._smList.length;for(var n=0;n0){var d=s.recursionCheck;d?d=i(d):d={},d[s.desc.classpath]=1,m.call(this,h,p,{fn:a,scope:this,args:s},!0,d)}else a.call(this,null,s)}catch(v){return r.call -(this,s,v)}},a=function(e,t){try{var n=t.registerListeners;n&&t.res.moduleCtrl.$on(n),t.session&&t.res.moduleCtrl.setSession(t.session);if(t.skipInit)this.$callback(t.cb,t.res);else{var i=t.desc.initArgs;i||(i={}),t.res.moduleCtrl.init(i,{fn:f,args:t,scope:this})}}catch(s){return r.call(this,t,s)}},f=function(e,t){this.$callback(t.cb,t.res)},l=function(n){var r=n[e],i=t[r];return i?i:(aria.templates.ModuleCtrlFactory.$logError(aria.templates.ModuleCtrlFactory.MODULECTRL_BYPASSED_FACTORY,[n.$classpath]),null) -},c=l,h=function(e,t){var n=l(e);return n?n.moduleCtrlPrivate!=e?(aria.templates.ModuleCtrlFactory.$logError(aria.templates.ModuleCtrlFactory.EXPECTING_MODULECTRL_PRIVATE,[t,e.$classpath]),null):n:null},p=function(e,t,n,r){var i=n.length,s;for(var o=0;o=n.toBeLoaded&&this.$callback(n.cb,n.res)},m=function(e,t,n,r,i){var o=t.length;if(o===0){this.$callback(n,{subModules:[],errors:0});return}var u=e.moduleCtrlPrivate,a={cb:n,res:{subModules:[],errors:0},parentModule:e,alreadyLoaded:0,toBeLoaded:o,customModules:r},f=null,l=aria.utils.Type;for(var c=0;c=0;a--)try{u[a].$dispose()}catch(f){this.$logError(this.EXCEPTION_SUBMODULE_DISPOSE,[n.$classpath -,u[a].$classpath],f)}i.subModules=null}t[r]=null,delete t[r],i.flowCtrlPrivate&&(i.flowCtrlPrivate.$dispose(),i.flowCtrlPrivate=null,i.flowCtrl=null),i.moduleCtrl=null,i.moduleCtrlPrivate=null,i.subModuleInfos=null}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/NavigationManager.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.NavigationManager",$singleton:!0,$dependencies:["aria.utils.Type","aria.templates.CfgBeans"],$constructor:function(){this._tableNavMarker=Aria.FRAMEWORK_PREFIX+"tableNavDone",this._keyMapMarker=Aria.FRAMEWORK_PREFIX+"keyMapDone",this.globalKeyMap=[],this._hasModalBehaviour=!1},$statics:{INVALID_GLOBAL_KEYMAP_CFG:"Invalid global keymap configuration."},$prototype:{addGlobalKeyMap:function(e){var t={json:e,beanName:"aria.templates.CfgBeans.GlobalKeyMapCfg"};aria -.core.JsonValidator.normalize(t)?(e=t.json,this.globalKeyMap.push(e)):this.$logError(this.INVALID_GLOBAL_KEYMAP_CFG)},removeGlobalKeyMap:function(e){for(var t=0,n=this.globalKeyMap.length,r;t-1&&s40||n<37)return!0;if(!e)return!1;e===!0&&(e={});var i=this._validateModifiers(e,t);if(i){var s=t.target,o=this._getContainingTD(s);if(o){var u=o.parentNode.parentNode,a=this._getTableMap(u,o);r=this._navigateMap(u,a,t)}else n==t.KC_ARROW_DOWN?r=this._focusNext(s):n==t.KC_ARROW_UP&&(r=this._focusNext(s,!0));return r&&t.preventDefault(),!0}},_validateModifiers -:function(e,t){return t.altKey==!!e.alt&&t.shiftKey==!!e.shift&&t.ctrlKey==!!e.ctrl},_navigateMap:function(e,t,n){var r=n.keyCode,i=t.map,s=t.pos,o=0,u=0;r==n.KC_ARROW_UP?o=-1:r==n.KC_ARROW_DOWN?o=1:r==n.KC_ARROW_LEFT?u=-1:u=1;var a=!1,f=s,l,c,h,p,d=s.rowIndex,v=s.mapCellIndex;do{u!==0?v+=u:d+=o;if(d<0||d>=i.length)return this._focusNext(e,d<0);l=i[d],p=!1;if(v<0||v>=l.length){if(o===0)return!1;u==1?(u=-1,v=s.mapCellIndex):(u=1,v=s.mapCellIndex-1,d+=o),p=!0}if(!p){h=i[d][v];if(h!=f){o!==0&&u!==0&&(o==-1&&h.rowIndex+ -h.rowSpan-1!=d?p=!0:o==1&&h.rowIndex!=d&&(p=!0));if(!p){c=e.rows[h.rowIndex].cells[h.cellIndex],f=h;if(!c)return!1;a=this.focusFirst(c),!a&&o!==0&&u===0&&(u=1)}}}}while(!a);return!0},_getContainingTD:function(e){var t=Aria.$window.document.body,n=e;while(n&&n!=t){if(n.nodeName=="TD"&&!n.parentNode.parentNode.attributes.isFrame)return n;n=n.parentNode}return},_getTableMap:function(e,t){var n=[],r,i=e.rows;for(var s=0,o=i.length;s0&&t[r-1]>e)break;return this.__currentLn=r,r}for(r=0;r-1&&i-1&&(r--,n=s+1);while(r>=0&&s>-1);return this.$assert(163,s==-1||r<0&&(s0&&(o={name:"#TEXT#",parent:f[f.length-1],firstCharParamIndex:n,lastCharParamIndex:r,paramBlock:this.__unescapeText(t,n,r),lineNumber:this.positionToLineNumber -(n)},o.paramBlock.length>0&&u.push(o)),n=i+1;var l=this.__findClosingBraces(t,n);r=l.indexClose,i=l.indexOpen;if(r==-1)return this.__logError(n,this.MISSING_CLOSINGBRACES),null;if(s)u.push({name:"#EXPRESSION#",parent:f[f.length-1],firstCharParamIndex:n,lastCharParamIndex:r,paramBlock:this.__unescapeParam(t,n,r),lineNumber:this.positionToLineNumber(n)}),n=r+1;else if(t.charAt(n)=="/"){n++,o=f.pop();var c=t.substring(n,r);if(f.length===0)return this.__logError(n,this.STATEMENT_CLOSED_NOT_OPEN,[c]),null;if(o.name!= -c){for(var h=f.length-1;h>=1;h--)if(f[h].name==c)return this.__logError(n,this.EXPECTING_OTHER_CLOSING_STATEMENT,[o.name,c,o.lineNumber]),null;return this.__logError(n,this.STATEMENT_CLOSED_NOT_OPEN,[c]),null}o.lastCharContentIndex=n-2,u=f[f.length-1].content,n=r+1,c=null}else{var p=r+1,d=t.charAt(r-1)=="/"&&!e.isEscaped(t,r-1),v,m;d&&r--,o={parent:f[f.length-1],lastCharParamIndex:r},u.push(o),m=e.nextWhiteSpace(t,n,r,/[\s\{]/),m==-1?(m=r,v=t.substring(n,r)):(v=t.substring(n,m),t.charAt(m)!="{"&&m++),o.firstCharParamIndex= -m,o.lineNumber=this.positionToLineNumber(m);if(v!="CDATA"){o.name=v,d||(o.content=[],o.firstCharContentIndex=p,f.push(o),u=o.content);if(!/^[_\w@:]+$/.test(o.name))return this.__logError(n,this.INVALID_STATEMENT_NAME,[o.name]),null;o.paramBlock=this.__unescapeParam(t,m,r),n=p}else{o.name="#CDATA#";var g=t.indexOf("{/CDATA}");if(g==-1)return this.__logError(n,this.MISSING_CLOSING_STATEMENT,["CDATA"]),null;o.paramBlock=t.substring(r+1,g);var l=this.__findClosingBraces(t,g+1);n=l.indexClose+1,i=l.indexOpen}}}return r= -t.length,r-n>0&&(o={name:"#TEXT#",parent:f[f.length-1],firstCharParamIndex:n,lastCharParamIndex:r,paramBlock:this.__unescapeText(t,n,r),lineNumber:this.positionToLineNumber(n)},o.paramBlock.length>0&&u.push(o)),f.length>1?(this.__logError(f[f.length-1].firstCharContentIndex,this.MISSING_CLOSING_STATEMENT,[f[f.length-1].name]),null):(this.template=this.__lineNumbers=null,a)}}}); -//******************* -//LOGICAL-PATH:aria/templates/PublicWrapper.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.PublicWrapper",$prototype:{$publicInterfaceName:null,$publicInterface:function(){return this.$interface(this.$publicInterfaceName)}}}); -//******************* -//LOGICAL-PATH:aria/templates/RefreshManager.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.RefreshManager",$singleton:!0,$constructor:function(){this._stops=0,this._queue=[],this._hierarchies=[],this._updatedNodes=[],this._nodesToRefresh=[],this._isResuming=!1},$destructor:function(){this._queue=null,this._hierarchies=null,this._updatedNodes=null,this._nodesToRefresh=null},$statics:{PARENT_PROP:Aria.FRAMEWORK_PREFIX+"containedIn"},$prototype:{queue:function(e,t){this._queue.push({cb:e,elem:t})},stop:function(){this._isResuming||this._stops++},_triggerCB -:function(e){var t=e.scope,n;t=t?t:this,e.fn?n=e.fn:n=e,typeof n=="string"&&(n=t[n]),e.scope.$Widget?n.call(t,null,e.args):n.call(t,e.args)},resume:function(){if(this._isResuming)return;this._stops--;if(this._stops>0)return;this._stops=0,this._isResuming=!0;var e=this._queue.length;if(Aria.rootTemplates==null||Aria.rootTemplates.length===0){for(var t=0;t0)for(var n=0;n0},getHierarchies:function(){return this._hierarchies},updateHierarchies:function(){this._hierarchies.length=0;for(var e=0;e0)for(var n=0;n0){var v=this.getSectionById(r[i-1].sectionId);this.tplCtxt.insertAdjacentSections({refSection:{domElt:v.getDom(),object:v},sections:o,position:"afterEnd"})}else this.tplCtxt.insertAdjacentSections -({refSection:{domElt:this.getDom(),object:this},sections:o,position:"afterBegin"})}else r.splice(i,f);p!=f&&this._updateRemainingItems(i+p,!0)}},_updateRemainingItems:function(e,t){var r=this.items,s=this._childSections.cssClass;i(s)||(s=null);for(var o=r.length-1;o>=e;o--){var u=r[o];t&&n.setValue(u,"index",o),n.setValue(u,"ct",o+1);if(s){var a=this.getSectionById(u.sectionId),f=a.cssClass,l=this.tplCtxt.evalCallback(s,u);if(f!=l){var c=a.getDom();c.className=l,a.cssClass=l}}}},_notifyChange_map:function(e) -{var t=e.change;if(t!=n.VALUE_CHANGED&&t!=n.KEY_REMOVED&&t!=n.KEY_ADDED)return;if(this._checkRefreshManager(e))return;var r=this.itemsMap,i=this.items,s=this.iteratedSet,o=e.dataName;if(n.isMetadata(o))return;if(r.hasOwnProperty(o)){var u=r[o];if(t==n.KEY_REMOVED){var a=this.tplCtxt.$getElementById(u.sectionId);a.remove(),i.splice(u.ct-1,1),delete r[o],this._updateRemainingItems(u.ct-1,!1)}else n.setValue(u,"item",s[o]),this.tplCtxt.$refresh({outputSection:u.sectionId})}else if(t!=n.VALUE_CHANGED){var u={index -:o,ct:i.length+1,item:s[o]};this._initItem(u),i[u.ct-1]=u,this.tplCtxt.insertAdjacentSections({refSection:{domElt:this.getDom(),object:this},sections:[this._createSectionParam(u)],position:"beforeEnd"})}},_updateLoopType:function(){var e=!0,n=this._loopType,r=this.iteratedSet;return n=="array"?e=t.isArray(r):n=="map"?e=t.isObject(r):n!=null?(e=t.isInstanceOf(r,"aria.templates.View"),n=="view"&&(n="pagedView")):(t.isArray(r)?n="array":t.isInstanceOf(r,"aria.templates.View")?n="pagedView":t.isObject(r)?n="map" -:e=!1,this._loopType=n),e?n!="map"&&n!="array"?(this.$logError(this.VIEWS_NOT_SUPPORTED,[this.tplCtxt.tplClasspath,this.id]),!1):(this._loopOver=this["_loopOver_"+n],this._notifyChange=this["_notifyChange_"+n],!0):(this.$logError(this.REPEATER_INVALID_ITERATED_SET,[this.tplCtxt.tplClasspath,this.id,n],r),!1)},writeContent:function(e){this._loopOver(this.iteratedSet,this._writeRepeaterItem)}}})})(); -//******************* -//LOGICAL-PATH:aria/templates/Section.js -//******************* -(function(){var e=null,t=0,n=1,r=/^[\w\-:\.]+\+?$/;Aria.classDefinition({$classpath:"aria.templates.Section",$dependencies:["aria.utils.Array","aria.utils.Json","aria.utils.Delegate","aria.templates.NavigationManager","aria.templates.CfgBeans","aria.utils.Dom","aria.utils.String","aria.utils.Json","aria.templates.DomElementWrapper","aria.utils.Html","aria.templates.DomEventWrapper","aria.utils.IdManager","aria.templates.SectionWrapper"],$onload:function(){e=new aria.utils.IdManager("s")},$onunload:function() -{e.$dispose(),e=null},$constructor:function(e,t,n){var i,s,o,u,a;this._content=[],this.parent=null,this._initWidgetsDone=!1,this.html=null,this._bindings=[],this._processing=null,this.delegateIds=[],this.cfgOk=!0,this.tplCtxt=e,this.delegateCallbacks=[],this.isRoot=n&&n.isRoot===!0,this.idMap=n&&n.ownIdMap?{}:null,this._cfg=t,this._normalizeCallbacks(),this.delegateId=aria.utils.Delegate.add({fn:this._onDomEvent,scope:this});if(this.isRoot)return;try{aria.core.JsonValidator.normalize({json:t,beanName:"aria.templates.CfgBeans."+ -this.$class+"Cfg"},!0)}catch(f){this.cfgOk=!1;var l=aria.core.Log;if(l){for(var c=0,h=f.errors.length,p;c-1&&(Aria.testMode&&(d=this.tplCtxt.$getAutoId(o)),delete t.id,o=null)}this.domType= -u,this._domId=d||(o?this.tplCtxt.$getId(o):this._createDynamicId()),this.id=o||"_gen_"+this._domId,this.cssClass=t.cssClass,this.keyMap=t.keyMap,this.tableNav=t.tableNav,this.processingLabel=t.processingLabel,this.__skipProcessingChange=!1,this.macro=t.macro?e.checkMacro(t.macro):null,this.wrapper=null;for(var v=0;i=s[v];v++)this.registerBinding(i,this._notifyDataChange);this.registerProcessing(t.bindProcessingTo),this._refreshMgrInfo=null,this.attributes=t.attributes;var m=t.bind&&t.bind.attributes?t.bind.attributes -:null;m&&(this.attributes=m.inside[m.to],this.registerBinding(m,this._notifyAttributeChange))},$destructor:function(){this.removeDelegateIdsAndCallbacks(),this._releaseAllDynamicIds(),this.delegateId&&(aria.utils.Delegate.remove(this.delegateId),this.delegateId=null),this._content&&(this.removeContent(),this.id&&this.idMap&&(this.idMap[this.id]=null,delete this.idMap[this.id]),this._content=null,this.idMap=null);var e=this.parent;e&&(this.parent=null,e.removeSubSection(this)),this._listenersStopped!==!0&&this -.stopListeners(),this._processing=null,this.setDom(null),this.html=null,this._refreshMgrInfo=null,this.tplCtxt=null,this._cfg=null},$events:{beforeRemoveContent:"Raised just before the section content is disposed.",afterRemoveContent:"Raised just after the section content is disposed."},$statics:{MISSING_TO_BINDING:"Invalid Binding Configuration: 'to' is mandatory",INVALID_TO_BINDING:"Invalid Binding Configuration: 'to' must be a Boolean value or null",WIDGETCALL_ERROR:"Error in '%2' for widget '%1'.",INVALID_SECTION_ID -:"Error in template '%1': invalid section id '%2'.",SECTION_ALREADY_EXISTS:"Error in template '%1': section uses already used id '%2'.",SECTION_BINDING_ERROR:"Section binding failed. Inside: %1, to: %2. Section id: %3, template: %4.",INVALID_CONFIGURATION:"Error in template '%1': invalid configuration for section id '%2'.",WIDGET_ID_NOT_UNIQUE:"The %1 widget with id %2 does not have a unique id",SECTION_CALLBACK_ERROR:"The callback function raised an exception. Template: '%1'\nSection: '%2'\nEvent: '%3' "},$prototype -:{$init:function(e,t,n){e.__navigationManager=aria.templates.NavigationManager,e.__json=aria.utils.Json},_type:t,initWidgets:function(){var e=[];if(this._initWidgetsDone)return e;this._initWidgetsDone=!0,this.html=null;var t=this._content,r=t.length;for(var i=0;i"];e.write(r.join(""))}},writeEnd:function( -e){this.domType&&e.write("")},_onDomEvent:function(e){this.__navigationManager.handleNavigation(this.keyMap,this.tableNav,e);if(this._cfg&&this._cfg.on){var t=this._cfg.on[e.type];if(t){var n=new aria.templates.DomEventWrapper(e),r;try{r=t.fn.call(t.scope,n,t.args)}catch(i){this.$logError(this.SECTION_CALLBACK_ERROR,[this.tplCtxt.tplClasspath,this._cfg.id,e.type],i)}return n.$dispose(),r}}},_normalizeCallbacks:function(){var e=this._cfg?this._cfg.on:null;if(e)for(var t in e)e.hasOwnProperty -(t)&&(e[t]=this.$normCallback(e[t]))},copyConfigurationTo:function(e){this.$assert(708,e.idMap==null),e.id=this.id,e.domType=this.domType,e.tableNav=this.tableNav,e.keyMap=this.keyMap,e.macro=this.macro},notifyRefreshPlanned:function(e){var t=this._registerInRefreshMgr();t.queue=null,t.refreshArgs=e},_registerInRefreshMgr:function(){var e=this._refreshMgrInfo;return e||(e={refreshArgs:null,queue:[]},this._refreshMgrInfo=e,aria.templates.RefreshManager.queue({fn:this._refreshManagerCallback,scope:this},this)) -,e},_refreshManagerCallback:function(){var e=this._refreshMgrInfo;if(!e)return;this._refreshMgrInfo=null;var t=e.queue;t||this.tplCtxt.$refresh(e.refreshArgs)},beforeRefresh:function(e){var t=this.macro;if(t)if(!e.macro)e.macro=t;else{var n=e.macro;aria.utils.Type.isObject(n)&&!n.name&&(n.name=t.name,n.scope=t.scope,n.args||(n.args=t.args))}this._domElt=null},getDom:function(){return this._domElt||(this._domElt=aria.utils.Dom.getElementById(this._domId)),this._domElt},setDom:function(e){this._domElt=e,this.wrapper&& -(this.wrapper.$dispose(),this.wrapper=null)},_createDynamicId:function(){var t=e.getId();return this._dynamicIds?this._dynamicIds.push(t):this._dynamicIds=[t],t},_releaseAllDynamicIds:function(){var t=this._dynamicIds;if(t){for(var n=t.length-1;n>=0;n--)e.releaseId(t[n]);this._dynamicIds=null}},moveContentTo:function(e){var n=this._content;this.$assert(805,this.idMap==null),this.$assert(806,n);var r=e._content,i=r.length;for(var s=0,o=n.length;s=1;c--){var h=a[c];if(h.indexOf(l)===0){f=!1;break}}var f=!1;f&&a.splice(1,0,l);var p=[],d=[],v,m=/^(\w+)(?::([\s\S]*))?$/;for(var c=a.length-1;c>=1;c--){var g=a[c],y=m.exec(g);if(!y)return n -.logError(i,r.INVALID_MODIFIER_SYNTAX,[g]);var b=y[1];t.initModifier(b,n),p.push("this.$modifier('"+b+"',["),v=y[2],v?(d[c]=", "+v,f&&(d[c]+=", '"+l+"'"),d[c]+="])"):d[c]="])"}v=a[0],p.push(v),v=p.concat(d).join(""),n.debug&&(v=n.wrapExpression(v,i,"this.EXCEPTION_IN_EXPRESSION")),n.writeln("this.__$write(",v,",",i.lineNumber,");")}},separator:{inMacro:!0,container:!0,paramRegexp:/^$/,process:function(e,t){var n=t.parent,i=n.content[0]==t||n.content[1]==t&&n.content[0].name=="#TEXT#";if(n.name!="foreach"||!i -){e.logError(t,r.SEPARATOR_NOT_FIRST_IN_FOREACH);return}var s=n[Aria.FRAMEWORK_PREFIX+"foreachCounter"];e.writeln("if (",s,">1) {"),e.increaseIndent(),e.processContent(t.content),e.decreaseIndent(),e.writeln("}")}},id:{inMacro:!0,container:!1,paramRegexp:/^\s*(\S[\s\S]*)\s*$/,process:function(e,t,n){var r=n[0];e.writeln("this.__$writeId(",r,",",t.lineNumber,");")}},on:{inMacro:!0,container:!1,paramRegexp:/^(\w+)\s+([\s\S]+)$/,process:function(e,t,n){var i=n[1],s=n[2],o=aria.utils.Delegate,u=o.delegatedGestures -[i];u&&e.addDependency(u),o.supportedEvents[i]||e.logWarn(t,r.INVALID_EVENT_TYPE,[i]),e.writeln("this.__$statementOnEvent(",e.stringify(i),",this.$normCallback(",s,"),",t.lineNumber,");")}},bindRefreshTo:{inMacro:!0,container:!1,paramRegexp:/^([\s\S]+)$/,process:function(t,r,i){var s=r.paramBlock,o,u;u=n.parse(e.trim(s)),u.length>1?(i=t.stringify(u.pop()),o=n.pathArrayToString(u)):(i="null",o=u[0]),t.writeln("this.__$bindAutoRefresh(",o,", ",i,", ",r.lineNumber,");")}},"if":{inMacro:!0,container:!0,process:function( -e,t){var n=t.paramBlock;e.writeln("if (",n,") {"),e.increaseIndent(),e.processContent(t.content),delete t[Aria.FRAMEWORK_PREFIX+"elsepresent"],e.decreaseIndent(),e.writeln("}")}},elseif:{inMacro:!0,container:!1,process:function(e,t){var n=t.paramBlock,i=t.parent;if(i.name!="if")return e.logError(t,r.ELSE_WITHOUT_IF);if(i[Aria.FRAMEWORK_PREFIX+"elsepresent"])return e.logError(t,r.ELSEIF_AFTER_ELSE);e.decreaseIndent(),e.writeln("} else if (",n,") {"),e.increaseIndent()}},"else":{inMacro:!0,container:!1,paramRegexp -:/^$/,process:function(e,t){var n=t.parent;if(n.name!="if")return e.logError(t,r.ELSE_WITHOUT_IF);if(n[Aria.FRAMEWORK_PREFIX+"elsepresent"])return e.logError(t,r.ELSE_ALREADY_USED);n[Aria.FRAMEWORK_PREFIX+"elsepresent"]=!0,e.decreaseIndent(),e.writeln("} else {"),e.increaseIndent()}},createView:{inMacro:undefined,container:!1,paramRegexp:/^([_\w]+)(\[([^\[\]]+(\]\[[^\[\]])*)\])?\s+on\s+([\s\S]+)$/,process:function(e,t,n){var i=n[1];if(Aria.isJsReservedWord(i))return e.logError(t,r.INCORRECT_VARIABLE_NAME,[i] -);var s=n[3],o=n[5],u=[],a=0;s?(u=s.split("]["),a=u.length,s=["[(",u.join("),("),")]"].join("")):s="[]";var f=e.getView(i);if(f.firstDefinition){if(f.nbParams!=a){e.logError(t,r.INCOMPATIBLE_CREATEVIEW,[f.firstDefinition.lineNumber]);return}}else f.firstDefinition=t,f.nbParams=a;e.addDependency("aria.templates.View");var l=!e.isOutputReady();l&&e.enterBlock("globalVars"),e.writeln(l?"this.":"var ",i,"=this.__$createView(",e.stringify(i),",",s,",(",o,"));"),l&&e.leaveBlock()}},"for":{inMacro:!0,container:!0,process -:function(e,t){e.writeln("for (",t.paramBlock,") {"),e.increaseIndent(),e.processContent(t.content),e.decreaseIndent(),e.writeln("}")}},foreach:{inMacro:!0,container:!0,paramRegexp:/^([_\w]+)\s+(\w+)\s+([\s\S]+)$/,process:function(e,t,n){var i=e.newVarName(),s=n[1];if(Aria.isJsReservedWord(s))return e.logError(t,r.INCORRECT_VARIABLE_NAME,[s]);var o=n[2];if(o!="in"&&o!="inArray"&&o!="inView"&&o!="inSortedView"&&o!="inFilteredView"&&o!="inPagedView")return e.logError(t,r.INVALID_FOREACH_INKEYWORD,[o]);var u=o!="in"&& -o!="inArray";o=="inView"&&(o="inPagedView");var a=n[3],f=s+"_index";e.debug&&(a=e.wrapExpression(a,t,"this.ITERABLE_UNDEFINED")),e.writeln("var ",i,"=(",a,");"),e.writeln("if(",a,"==undefined){"),e.increaseIndent(),e.writeln("this.$logError(this.ITERABLE_UNDEFINED,[",e.stringify(t.name),", ",t.lineNumber,"]);"),e.decreaseIndent(),e.writeln("}");var l=s+"_ct";t[Aria.FRAMEWORK_PREFIX+"foreachCounter"]=l,e.writeln("var ",l,"=0;");var c;if(u){c=e.newVarName(),e.writeln(i,".refresh();");if(o=="inPagedView"){var h= -e.newVarName();e.writeln("var ",h,"=",i,".currentPageIndex;"),e.writeln("var ",c,"=",i,".pages[",h,"].lastItemIndex;"),e.writeln("for (var ",f,"=",i,".pages[",h,"].firstItemIndex;",f,"<=",c,";",f,"++) {")}else e.writeln("var ",c,"=",i,".items.length;"),e.writeln("for (var ",f,"=0;",f,"<",c,";",f,"++) {");e.increaseIndent(),e.writeln("var ",s,"_info=",i,".items[",f,"];"),o=="inPagedView"?e.writeln("if (",s,"_info.pageIndex==",h,") {"):o=="inFilteredView"&&e.writeln("if (",s,"_info.filteredIn) {"),e.increaseIndent -(),e.writeln("var ",s,"=",s,"_info.value;")}else o=="inArray"?(c=e.newVarName(),e.writeln("var ",c,"=",i,".length;"),e.writeln("for (var ",f,"=0;",f,"<",c,";",f,"++) {"),e.increaseIndent(),e.writeln("var ",s,"=",i,"[",f,"];")):(e.writeln("for (var ",f," in ",i,") {"),e.increaseIndent(),e.writeln("if (",i,".hasOwnProperty(",f,") && !this.$json.isMetadata(",f,")) {"),e.increaseIndent(),e.writeln("var ",s,"=",i,"[",f,"];"));e.writeln(l,"++;"),e.processContent(t.content),o!="inSortedView"&&o!="inArray"&&(e.decreaseIndent -(),e.writeln("}")),e.decreaseIndent(),e.writeln("}")}},repeater:{inMacro:!0,container:!1,process:function(e,t){var n=t.paramBlock;e.debug&&(n=e.wrapExpression(n,t,"this.EXCEPTION_IN_REPEATER_PARAMETER")),e.addDependency("aria.templates.Repeater"),e.writeln("this.__$statementRepeater(",t.lineNumber,",(",n,"));")}},macro:{inMacro:!1,container:!0,paramRegexp:/^([_\w]+)\s*(\(\s*([_\w]+\s*(,\s*[_\w]+\s*)*)?\))\s*$/,process:function(e,t,n){var i=n[1],s=e.getMacro(i);if(s.definition!=null)return e.logError(t,r.MACRO_ALREADY_DEFINED -,[i,s.definition.lineNumber]);s.definition=t,e.enterBlock("prototype"),e.writeln("macro_",i,": function ",n[2],"{"),e.increaseIndent(),e.writeln("try {"),e.increaseIndent(),e.writeln("with (this) {"),e.increaseIndent(),e.processContent(t.content),e.decreaseIndent(),e.writeln("}"),e.decreaseIndent(),e.writeln("} catch (_ex) {"),e.increaseIndent(),e.writeln("this.$logError(this.EXCEPTION_IN_MACRO,[",e.stringify(i),", this['"+Aria.FRAMEWORK_PREFIX+"currentLineNumber']],_ex);"),e.decreaseIndent(),e.writeln("}"), -e.decreaseIndent(),e.writeln("},"),e.leaveBlock()}},memo:{inMacro:!0,container:!0,paramRegexp:/^[\S\s]*$/,process:function(e,t,n){e.processContent(t.content)}},call:{inMacro:!0,container:!1,paramRegexp:/^(\$?[_\w]+\.)?([_\w]+)\s*\(([\s\S]*)\)\s*$/,process:function(e,t,n){var r=n[1],i=n[2],s=n[3],o,u;r?(o="this."+r+"macro_"+i,r.charAt(0)=="$"?u=o+".apply(this,["+s+"]);":u=o+"("+s+");"):(o="this.macro_"+i,u=o+"("+s+");");if(e.debug){var a=r?r+i:i;e.writeln("if (",o," == null) {"),e.increaseIndent(),e.writeln("this.$logError(this.MACRO_NOT_FOUND,[" -,t.lineNumber,",",e.stringify(a),"]);"),e.decreaseIndent(),e.writeln("}")}e.writeln(u)}},section:{inMacro:!0,container:null,process:function(e,t){var n=t.paramBlock,r=t.content?"true":"false";e.writeln("this.__$beginSection(",t.lineNumber,",",r,",",n,");"),t.content&&e.processContent(t.content),e.writeln("this.__$endSection();")}},"var":{inMacro:undefined,container:!1,paramRegexp:/^([_\w]+)\s*=([\s\S]*)$/,process:function(e,t,n){var i=n[1],s=n[2];if(Aria.isJsReservedWord(i))return e.logError(t,r.INCORRECT_VARIABLE_NAME -,[i]);e.isOutputReady()?(e.debug&&(s=e.wrapExpression(s,t,"this.EXCEPTION_IN_VAR_EXPRESSION")),e.writeln("var ",i,"=(",s,");")):(e.enterBlock("globalVars"),e.debug&&(s=e.wrapExpression(s,t,"this.EXCEPTION_IN_VAR_EXPRESSION")),e.writeln("this.",i,"=(",s,");"),e.leaveBlock())}},set:{inMacro:!0,container:!1,paramRegexp:/^([_\w]+(?:\.[_\w]+)*)\s*([\+\-]?\=)([\s\S]*)$/,process:function(e,t,n){var i=n[1],s=n[2],o=n[3],u=i.split(".");for(var a=0,f=u.length;a=0;h--)c[h].$dispose -();a.toDispose=null,c=null}a.data=null,a.macro=null,this._cfg=null}this.data=null,this.moduleRes=null,this.moduleCtrl=null,this.moduleCtrlPrivate=null,this.flowCtrl=null,this.flowCtrlPrivate=null,this.$BaseCtxt.$destructor.call(this)},$statics:{WIDGET_LIBRARY_NOT_FOUND:"Error in template '%2': widget library '%1' was not found.",INVALID_STATE_FOR_REFRESH:"Error in template '%1': calling $refresh while the template is being refreshed is not allowed.",SECTION_OUTPUT_NOT_FOUND:"Error while refreshing template '%1': output section '%2' was not found." -,VAR_NULL_OR_UNDEFINED:"Template %2 \nLine %1: expression is null or undefined.",SECTION_BINDING_ERROR_SINGLE_VAR:"line %1: Cannot bind section to single variable except data. Binding must be something like container.parameter",SECTION_MACRO_MISUSED:"Template %1 \nline %2: section statement must either be a container or have a non-null macro property.",TEMPLATE_EXCEPTION_REMOVING_LISTENERS:"Error in template '%1' while removing module or flow listeners.",TEMPLATE_NOT_READY_FOR_REFRESH:"Error in template '%1': the $refresh method was called, but the template is not yet ready to be refreshed." -,FOCUS_FAILURE:"Focus failure: widget/element with id '%1' in '%2' does not exist or it is not yet ready for focus.",DATA_READY_EXCEPTION:"Error in template %1: an exception happened in $dataReady.",VIEW_READY_EXCEPTION:"Error in template %1: an exception happened in $viewReady.",DISPLAY_READY_EXCEPTION:"Error in template %1: an exception happened in $displayReady.",BEFORE_REFRESH_EXCEPTION:"Error in template %1: an exception happened in $beforeRefresh.",AFTER_REFRESH_EXCEPTION:"Error in template %1: an exception happened in $afterRefresh." -,ALREADY_REFRESHING:"$refresh was called while another refresh is happening on the same template (%1). This is not allowed. Please check bindings.",MISSING_MODULE_CTRL_FACTORY:"Template %1 cannot be initialized without aria.templates.ModuleCtrlFactory, make sure it is loaded"},$prototype:{dataReady:function(){try{this._tpl.$dataReady()}catch(e){this.$logError(this.DATA_READY_EXCEPTION,[this.tplClasspath],e)}},viewReady:function(){try{this._tpl.$viewReady()}catch(e){this.$logError(this.VIEW_READY_EXCEPTION,[this -.tplClasspath],e)}},displayReady:function(){try{this._tpl.$displayReady()}catch(e){this.$logError(this.DISPLAY_READY_EXCEPTION,[this.tplClasspath],e)}},beforeRefresh:function(e){if(this._tpl.$beforeRefresh)try{this._tpl.$beforeRefresh(e)}catch(t){this.$logError(this.BEFORE_REFRESH_EXCEPTION,[this.tplClasspath],t)}},afterRefresh:function(e){if(this._tpl.$afterRefresh)try{this._tpl.$afterRefresh(e)}catch(t){this.$logError(this.AFTER_REFRESH_EXCEPTION,[this.tplClasspath],t)}},$refresh:function(e){if(aria.templates -.RefreshManager.isStopped()){if(e){var n=e.outputSection||e.filterSection;if(n&&this._mainSection){var r=this._mainSection.getSectionById(n);if(r){r.notifyRefreshPlanned(e);return}}}aria.templates.RefreshManager.queue({fn:this.$refresh,args:e,scope:this},this)}else{if(!this._cfg.tplDiv){this.$logError(this.TEMPLATE_NOT_READY_FOR_REFRESH,[this.tplClasspath]);return}this._refreshing&&this.$logError(this.ALREADY_REFRESHING,[this.tplClasspath]),this._refreshing=!0,aria.templates.RefreshManager.stop(),aria.templates -.CSSMgr.stop(),this.$assert(304,!!this._tpl);var i={json:e,beanName:"aria.templates.CfgBeans.RefreshCfg"};t.normalize(i),e=i.json,this.beforeRefresh(e);var r=this.getRefreshedSection({filterSection:e.filterSection,outputSection:e.outputSection,macro:e.macro});this.__disposeProcessingIndicators(r),r&&!r.id&&this.__disposeWrappers(),aria.templates.CSSMgr.resume(),r!=null&&this.insertSection(r),this._refreshing=!1,aria.templates.RefreshManager.resume(),r!=null&&(this.afterRefresh(e),this.$raiseEvent({name:"SectionRefreshed" -,sectionID:r.id}))}},$getFocusedWidget:function(){return this._focusedWidgetPath},$setFocusedWidget:function(){var e=Aria.$window.document.activeElement;this._focusedWidgetPath=this._getWidgetPath(e)},_getWidgetPath:function(e){if(e.tagName==="BODY"||!aria.utils.Dom.isInDom(e))return[];var t=[];while(!e.__widget)e=e.parentElement||e.parentNode;var n=e.__widget.getId();if(!n)return[];t.unshift(n);var r=e.__widget._context;while(this!==r&&r!==null){n=r.getOriginalId();if(!n)return[];t.unshift(n),r=r.parent}return r=== -null?[]:t},getOriginalId:function(){return this._cfg.originalId},getMarkup:function(e,t){this.$assert(299,this._cfg.tplDiv==null),this.$assert(301,this._mainSection==null);var n=this.getRefreshedSection({macro:e,filterSection:t,outputSection:null});return n.html},linkToPreviousMarkup:function(e){var t=this._cfg;this.$assert(320,e!=null),this.$assert(322,t.tplDiv==null),this.$assert(324,this._mainSection!=null),t.tplDiv=e,t.div=e.parentNode?e.parentNode:null,this.__addDebugInfo(e),this.insertSection(this._mainSection -,!0),this.afterRefresh(),this.$raiseEvent({name:"SectionRefreshed",sectionID:null})},__addDebugInfo:function(e){e&&e.setAttribute&&(e.setAttribute("_template",this.tplClasspath),e.__template=this._tpl,e.__moduleCtrl=this.moduleCtrlPrivate?this.moduleCtrlPrivate:this.moduleCtrl,e.__data=this.data)},__removeDebugInfo:function(e){e&&(e.__data=null,e.__moduleCtrl=null,e.__template=null)},getRefreshedSection:function(e){var n={json:e,beanName:"aria.templates.CfgBeans.GetRefreshedSectionCfg"};t.normalize(n),e=n.json -;var r=e.outputSection,i=e.filterSection;r===undefined&&(r=i);var s=null;if(r!=null){s=this._mainSection?this._mainSection.getSectionById(r):null;if(s==null)return this.$logError(this.SECTION_OUTPUT_NOT_FOUND,[this.tplClasspath,r]),null;s.beforeRefresh(e),s.stopListeners()}var o=e.writerCallback;o==null&&(o={fn:this._callMacro,args:e.macro,scope:this});var u=this.createSection(o,{filterSection:i,ownIdMap:s==null});if(u==null)return null;if(s==null)this._mainSection&&this._mainSection.$dispose(),this._mainSection= -u;else if(i){s.copyConfigurationTo(u);var a=s.parent;this.$assert(402,a!=null),s.$dispose(),a.addSubSection(u)}else s.removeContent(),s.removeDelegateIdsAndCallbacks(),u.moveContentTo(s),s.html=u.html,u.$dispose(),u=s,u.resumeListeners();return u},_setOut:function(e){this._out=e;var t=this._macrolibs||[];for(var n=0,r=t.length;n0){for(var t=0,n=e.length;t=0;n--)t[n].$dispose()},add:function(e){e._cfg&&e._cfg.isRootTemplate&&(this._rootTemplateContexts.push(e),aria.utils.AriaWindow.attachWindow()),this.$Store.add.call(this,e)},remove:function(e){return e._cfg&&e._cfg.isRootTemplate&&aria.utils.Array.remove(this._rootTemplateContexts,e)&&aria.utils.AriaWindow.detachWindow(),this.$Store.remove.call(this,e)},getFromDom:function(e){var t=function(t){return e==t.getContainerDiv -()};return this.getMatch(t)},disposeFromDom:function(e){var t=function(t){return e==t.getContainerDiv()},n=this.removeMatch(t);return n?(n.$dispose(),!0):!1},getRootCtxts:function(){return this._rootTemplateContexts}}}); -//******************* -//LOGICAL-PATH:aria/templates/TemplateManager.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.TemplateManager",$singleton:!0,$events:{unloadTemplate:{description:"",properties:{classpath:"classpath of the template that has been unloaded"}}},$prototype:{unloadTemplate:function(e,t,n){var r=aria.core.ClassMgr,i=e+"Script";(Aria.nspace(i,!1)||aria.core.Cache.getItem("classes",i))&&r.unloadClass(i,t);var s=Aria.$classDefinitions[e];if(s){!Aria.nspace(e,!1)&&s.$css&&aria.templates.CSSMgr.unregisterDependencies(e,s.$css,!0,t);if(s.$resources!=null){var o=s.$resources -;for(var u in o)o.hasOwnProperty(u)&&r.unloadClass(o[u],t)}var a=s.$extends;a!=null&&a!="aria.templates.Template"&&n!==undefined&&n!=e&&this.unloadTemplate(a,t,n)}r.unloadClass(e,t),this.$raiseEvent({name:"unloadTemplate",classpath:e})}}}); -//******************* -//LOGICAL-PATH:aria/templates/TplClassGenerator.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.TplClassGenerator",$extends:"aria.templates.ClassGenerator",$singleton:!0,$dependencies:["aria.templates.TplParser","aria.widgetLibs.environment.WidgetLibsSettings"],$constructor:function(){this.$ClassGenerator.constructor.call(this),this._loadStatements(["Template","id","on","createView","section","@","bindRefreshTo","repeater"]),this._parser=aria.templates.TplParser,this._superClass="aria.templates.Template",this._classType="TPL",this._rootStatement="Template" -,this._templateParamBean="aria.templates.CfgBeans.TemplateCfg",this.escapeModifier="escapeForHTML"},$prototype:{_writeClassInit:function(e){var t=e.templateParam;e.enterBlock("classInit"),this._writeMapInheritance(e,"__$macrolibs",e.templateParam.$macrolibs,"{}"),this._writeValueInheritance(e,"__$width",t.$width,"{}"),this._writeValueInheritance(e,"__$height",t.$height,"{}"),e.leaveBlock(),this.$ClassGenerator._writeClassInit.call(this,e)},_processTemplateContent:function(e){var t=e.out,n=t.templateParam,r=n -.$wlibs,i=[],s=aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs();for(var o in s)s.hasOwnProperty(o)&&r[o]==null&&(r[o]=s[o]);for(var o in r)r.hasOwnProperty(o)&&(t.allDependencies&&t.addDependency(r[o]),i.push(r[o]));Aria.load({classes:i,oncomplete:{fn:this.$ClassGenerator._processTemplateContent,scope:this,args:e}})}}}); -//******************* -//LOGICAL-PATH:aria/templates/TplParser.js -//******************* -Aria.classDefinition({$classpath:"aria.templates.TplParser",$extends:"aria.templates.Parser",$singleton:!0,$prototype:{parseTemplate:function(e,t,n){return this.context=t,this._prepare(e),this._computeLineNumbers(),this._buildTree()}}}); -//******************* -//LOGICAL-PATH:aria/templates/TreeBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.templates.TreeBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{Root:{$type:"Statement",$description:"",$mandatory:!0,$properties:{name:{$type:"Statement.name",$regExp:/^#ROOT#$/},content:{$type:"Statement.content",$mandatory:!0},parent:{$type:"Statement.parent",$description:"",$mandatory:!1}}},Statement:{$type:"json:Object",$description:"",$properties:{name:{$type:"json:String",$description:"",$mandatory:!0},lineNumber:{$type:"json:Integer",$description -:"",$mandatory:!0},parent:{$type:"json:ObjectRef",$description:"",$mandatory:!0},content:{$type:"json:Array",$mandatory:!1,$description:"",$contentType:{$type:"Statement",$mandatory:!0}},firstCharContentIndex:{$type:"json:Integer",$description:"",$minValue:0,$mandatory:!1},lastCharContentIndex:{$type:"json:Integer",$description:"",$minValue:0,$mandatory:!1},paramBlock:{$type:"json:String",$description:"",$mandatory:!0},firstCharParamIndex:{$type:"json:Integer",$description:"",$minValue:0,$mandatory:!1},lastCharParamIndex -:{$type:"json:Integer",$description:"",$minValue:0,$mandatory:!1}}}}}); -//******************* -//LOGICAL-PATH:aria/tools/contextual/environment/ContextualMenu.js -//******************* -Aria.classDefinition({$classpath:"aria.tools.contextual.environment.ContextualMenu",$dependencies:["aria.tools.contextual.environment.ContextualMenuCfgBeans"],$extends:"aria.core.environment.EnvironmentBase",$singleton:!0,$prototype:{_cfgPackage:"aria.tools.contextual.environment.ContextualMenuCfgBeans.AppCfg",getContextualMenu:function(){return this.checkApplicationSettings("contextualMenu")}}}); -//******************* -//LOGICAL-PATH:aria/tools/contextual/environment/ContextualMenuCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.tools.contextual.environment.ContextualMenuCfgBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes",environmentBase:"aria.core.environment.EnvironmentBaseCfgBeans"},$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{contextualMenu:{$type:"ContextualMenuCfg",$default:{}}}},ContextualMenuCfg:{$type:"json:Object",$description:"",$properties:{enabled:{$type:"json:Boolean",$description:"",$default:Aria.debug},template:{$type:"json:PackageName" -,$description:"",$default:"aria.tools.contextual.ContextualDisplay"},moduleCtrl:{$type:"json:PackageName",$description:"",$default:"aria.tools.contextual.ContextualModule"}}}}}); -//******************* -//LOGICAL-PATH:aria/utils/dragdrop/DragDropBean.js -//******************* -Aria.beanDefinitions({$package:"aria.utils.dragdrop.DragDropBean",$beans:{}}); -//******************* -//LOGICAL-PATH:aria/utils/environment/VisualFocus.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.environment.VisualFocus",$extends:"aria.core.environment.EnvironmentBase",$dependencies:["aria.utils.environment.VisualFocusCfgBeans"],$singleton:!0,$prototype:{_cfgPackage:"aria.utils.environment.VisualFocusCfgBeans.AppCfg",getAppOutlineStyle:function(){return this.checkApplicationSettings("appOutlineStyle")},_applyEnvironment:function(e){var t=this.checkApplicationSettings("appOutlineStyle");t?Aria.load({classes:["aria.utils.VisualFocus"],oncomplete:e?{fn:function( -){this.$callback(e)},scope:this}:null}):this.$callback(e)}}}); -//******************* -//LOGICAL-PATH:aria/utils/environment/VisualFocusCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.utils.environment.VisualFocusCfgBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{appOutlineStyle:{$type:"json:String",$description:"",$default:null}}}}}); -//******************* -//LOGICAL-PATH:aria/utils/overlay/LoadingOverlay.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.overlay.LoadingOverlay",$extends:"aria.utils.overlay.Overlay",$constructor:function(e,t,n){this.__text=n,this.$Overlay.constructor.call(this,e,{id:t,className:"xLDI"})},$prototype:{_createOverlay:function(e){var t=this.$Overlay._createOverlay.call(this,e);return this.__text&&(t.innerHTML=""+this.__text+""),t},_appendToDOM:function(e){var t=Aria.$window.document;t.body.appendChild(e)},_setInPosition:function(e,t){var n=aria.utils.Dom. -getGeometry(e),r=t.style;n?(r.top=n.y+"px",r.left=n.x+"px",r.width=n.width+"px",r.height=n.height+"px",r.display="block"):r.display="none"}}}); -//******************* -//LOGICAL-PATH:aria/utils/overlay/Overlay.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.overlay.Overlay",$dependencies:["aria.utils.Dom"],$constructor:function(e,t){var n=this._createOverlay(t);this.overlay=n,this.element=e,this._appendToDOM(n),this._setInPosition(e,n),this._computeZIndex(e,n)},$destructor:function(){this.overlay.parentNode.removeChild(this.overlay),this.overlay=null,this.element=null},$prototype:{_createOverlay:function(e){var t=Aria.$window.document,n=t.createElement(e.type||"div");return e.id&&(n.id="xOverlay"+e.id),n.className=e. -className||"xOverlay",n.style.position=e.position||"fixed",n},_appendToDOM:function(e){var t=Aria.$window.document;t.body.appendChild(e)},_setInPosition:function(e,t){var n=aria.utils.Dom,r=t.style,i=["Top","Right","Bottom","Left"],s,o={};for(var u=0,a=i.length;ur&&(r=u+1)}e=e.parentNode}t.style.zIndex=""+r},refreshPosition:function(){this._setInPosition(this.element,this.overlay)},refresh:function(){this._setInPosition(this.element,this.overlay),this._computeZIndex(this.element,this.overlay)}}}); -//******************* -//LOGICAL-PATH:aria/utils/sandbox/DOMProperties.js -//******************* -(function(){var e={abbr:{TD:"rw",TH:"rw"},accept:{INPUT:"rw"},acceptCharset:{FORM:"rw"},accessKey:"rw",action:{FORM:"rw"},align:{IFRAME:"rw",IMG:"rw"},alt:{AREA:"rw",IMG:"rw"},axis:{TD:"rw",TH:"rw"},baseURI:"r-",border:{IMG:"rw"},cellIndex:{TD:"r-",TH:"r-"},cellPadding:{TABLE:"rw"},cellSpacing:{TABLE:"rw"},ch:{TD:"rw",TH:"rw",TR:"rw"},charset:{A:"rw"},checked:{INPUT:"rw"},chOff:{TD:"rw",TH:"rw",TR:"rw"},className:"rw",clientHeight:"r-",clientWidth:"r-",cols:{TEXTAREA:"rw"},colSpan:{TD:"rw",TH:"rw"},complete: -{IMG:"r-"},coords:{AREA:"rw"},defaultChecked:{INPUT:"rw"},defaultSelected:{OPTION:"rw"},defaultValue:{INPUT:"rw",TEXTAREA:"rw"},dir:"rw",disabled:{BUTTON:"rw",INPUT:"rw",OPTION:"rw",SELECT:"rw",TEXTAREA:"rw"},enctype:{FORM:"rw"},frame:{TABLE:"rw"},frameBorder:{IFRAME:"rw"},hash:{AREA:"rw"},headers:{TD:"rw",TH:"rw"},height:{IFRAME:"rw",IMG:"rw"},host:{AREA:"rw"},hostname:{AREA:"rw"},href:{A:"rw",AREA:"rw"},hreflang:{A:"rw"},hspace:{IMG:"rw"},id:"r-",index:{OPTION:"rw"},innerHTML:"r-",lang:"rw",length:{FORM:"r-" -,SELECT:"r-"},localName:"r-",longDesc:{IFRAME:"rw",IMG:"rw"},lowsrc:{IMG:"rw"},marginHeight:{IFRAME:"rw"},marginWidth:{IFRAME:"rw"},maxLength:{INPUT:"rw"},method:{FORM:"rw"},multiple:{SELECT:"rw"},name:{A:"rw",BUTTON:"rw",FORM:"rw",IFRAME:"rw",IMG:"rw",INPUT:"rw",SELECT:"rw",TEXTAREA:"rw"},namespaceURI:"r-",naturalWidth:{IMG:"r-"},naturalHeight:{IMG:"r-"},nodeName:"r-",nodeType:"r-",nodeValue:"r-",noHref:{AREA:"rw"},noResize:{IFRAME:"rw"},offsetHeight:"r-",offsetLeft:"r-",offsetTop:"r-",offsetWidth:"r-",pathname -:{AREA:"rw"},port:{AREA:"rw"},prefix:"r-",protocol:{AREA:"rw"},readOnly:{INPUT:"rw",TEXTAREA:"rw"},rel:{A:"rw"},rev:{A:"rw"},rowIndex:{TR:"r-"},rows:{TEXTAREA:"rw"},rowSpan:{TD:"rw",TH:"rw"},rules:{TABLE:"rw"},schemaTypeInfo:"r-",scrollHeight:"r-",scrolling:{IFRAME:"rw"},scrollLeft:"rw",scrollTop:"rw",scrollWidth:"r-",search:{AREA:"rw"},sectionRowIndex:{TR:"r-"},selected:{OPTION:"rw"},selectedIndex:{SELECT:"rw"},shape:{AREA:"rw"},size:{INPUT:"rw",SELECT:"rw"},src:{IFRAME:"rw",IMG:"rw"},style:"r-",summary:{TABLE -:"rw"},tabIndex:"rw",tagName:"r-",target:{A:"rw",AREA:"rw",FORM:"rw"},text:{OPTION:"rw"},textContent:"r-",title:"rw",type:{A:"rw",BUTTON:"rw",INPUT:"r-",SELECT:"r-",TEXTAREA:"r-"},useMap:{IMG:"rw"},vAlign:{TD:"rw",TH:"rw",TR:"rw"},value:{BUTTON:"rw",INPUT:"rw",OPTION:"rw",SELECT:"rw",TEXTAREA:"rw"},vspace:{IMG:"rw"},width:{IFRAME:"rw",IMG:"rw"}};Aria.classDefinition({$classpath:"aria.utils.sandbox.DOMProperties",$singleton:!0,$prototype:{getPropertyAccess:function(t,n){if(!e.hasOwnProperty(n))return"--";var r= -e[n];if(typeof r=="object"){t=t.toUpperCase();if(!r.hasOwnProperty(t))return"--";r=r[t]}return r},isReadSafe:function(e,t){return this.getPropertyAccess(e,t).charAt(0)=="r"},isWriteSafe:function(e,t){return this.getPropertyAccess(e,t).charAt(1)=="w"}}})})(); -//******************* -//LOGICAL-PATH:aria/utils/AriaWindow.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.AriaWindow",$dependencies:["aria.utils.Event"],$singleton:!0,$constructor:function(){this._windowUsages=0},$destructor:function(){this._unloadWindow()},$events:{attachWindow:"This event is raised when Aria Templates is starting to store references on Aria.$window (when a call of attachWindow makes the counter pass from 0 to 1).",unloadWindow:"This event is raised when setWindow is called with a different window, or if the document is unloaded (for example on page navigation), and only if the window is used by Aria Templates (the counter is non-zero). Listeners should do the necessary to remove references to elements inside the Aria.$window." -,detachWindow:"This event is raised when Aria Templates no longer stores references on Aria.$window (when a call of detachWindow makes the counter pass from 1 to 0)."},$statics:{NEGATIVE_WINDOW_USAGES:"Calls to attachWindow/detachWindow lead to a negative counter: %1. The counter will be reset to 0.",WINDOW_STILL_USED_AFTER_UNLOAD:"Counter is not null after raising unloadWindow: %1. The counter will be reset to 0.",ALREADY_UNLOADING_WINDOW:"Aria.$window is already being unloaded."},$prototype:{attachWindow:function( -){this._windowUsages++,this._windowUsages===1&&(aria.utils.Event.addListener(Aria.$window,"unload",{fn:this._unloadWindow,scope:this}),this.$raiseEvent("attachWindow"))},detachWindow:function(){this._windowUsages<=0?this.$logError(this.NEGATIVE_WINDOW_USAGES,[this._windowUsages-1]):this._windowUsages--,this._windowUsages===0&&!this._isUnloadingWindow&&this._raiseDetachWindow()},_raiseDetachWindow:function(){this.$assert(42,this._windowUsages===0),this.$raiseEvent("detachWindow"),aria.utils.Event.removeListener -(Aria.$window,"unload",{fn:this._unloadWindow,scope:this}),aria.utils.Event.reset()},_unloadWindow:function(){if(this._isUnloadingWindow){this.$logError(this.ALREADY_UNLOADING_WINDOW);return}if(!this.isWindowUsed())return;this._isUnloadingWindow=!0;try{this.$raiseEvent("unloadWindow"),this._windowUsages>0&&(this.$logError(this.WINDOW_STILL_USED_AFTER_UNLOAD,[this._windowUsages]),this._windowUsages=0),this._raiseDetachWindow()}finally{this._isUnloadingWindow=!1}},setWindow:function(e){if(e===Aria.$window)return; -this._unloadWindow(),Aria.$window=e},isWindowUsed:function(){return this._windowUsages>0}}}); -//******************* -//LOGICAL-PATH:aria/utils/Callback.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.Callback",$dependencies:["aria.utils.Type"],$statics:{INVALID_CALLBACK:"The callback function is invalid or missing or it was called after $dispose."},$constructor:function(e){e=this.$normCallback(e);var t=aria.utils.Type.isFunction(e.fn);this._scope=t?e.scope:this,this._function=t?e.fn:this._warnDisposed,this._args=e.args,this._resIndex=e.resIndex,this._apply=e.apply},$destructor:function(){this._scope=this,this._function=this._warnDisposed,this._args=null},$prototype -:{call:function(e){var t=this._apply===!0&&aria.utils.Type.isArray(this._args)?this._args:[this._args],n=this._resIndex===undefined?0:this._resIndex;return n>-1&&t.splice(n,0,e),this._function.apply(this._scope,t)},_warnDisposed:function(){this.$logError(this.INVALID_CALLBACK)},apply:function(e){this.call(e)}}}); -//******************* -//LOGICAL-PATH:aria/utils/ClassList.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.ClassList",$constructor:function(e){this.setClassName=function(t){e.className=t},this.getClassName=function(){return e.className},this._dispose=function(){e=null,this._dispose=null}},$destructor:function(){this._dispose&&this._dispose()},$prototype:{add:function(e){this.contains(e)||this.setClassName(this.getClassName()+" "+e)},remove:function(e){var t=this.getClassName().split(" ");for(var n=0,r=t.length;n0)e=e.nextSibling,e&&e.nodeType==1&&t--;return e},getPreviousSiblingElement:function(e,t){t==null&&(t=1);while(e&&t>0)e=e.previousSibling,e&&e.nodeType==1&&t--;return e},getDomElementChild:function(e,t,n){if(!e)return null;var r=e.childNodes,i=0,s=r.length;for(var o=n? -s-1:0;n?o>=0:o<",e,">",t,""].join(""),i=r.children[0].children[0]):e=="TR"?(r.innerHTML=["<",e,">",t,"
    "].join(""),i=r.children[0].children[0].children[0]):(r.innerHTML=["<",e,">",t,""].join -(""),i=r.children[0]),this.$assert(194,!i||i.tagName.toUpperCase()==e),i},replaceDomElement:function(e,t){var n=e.parentNode;n.insertBefore(t,e),n.removeChild(e)},insertAdjacentHTML:function(e,t,n){Aria.$window.document.body.insertAdjacentHTML?this.insertAdjacentHTML=function(e,t,n){try{e.insertAdjacentHTML(t,n)}catch(r){var i,s;if(t=="afterBegin"||t=="beforeEnd")i=e;else{if(t!="beforeBegin"&&t!="afterEnd"){this.$logError(this.INSERT_ADJACENT_INVALID_POSITION,[t]);return}i=e.parentNode}s=this._createTableElement -(i.tagName,n,e.ownerDocument);if(!s)throw r;var o=s.lastChild;if(o){this.insertAdjacentElement(e,t,o);var u=s.lastChild;while(u)i.insertBefore(u,o),o=u,u=s.lastChild}}}:this.insertAdjacentHTML=function(e,t,n){var r=e.ownerDocument,i=r.createRange();t=="beforeBegin"||t=="afterEnd"?i.selectNode(e):i.selectNodeContents(e);var s=i.createContextualFragment(n);this.insertAdjacentElement(e,t,s),i.detach()},this.insertAdjacentHTML(e,t,n)},insertAdjacentElement:function(e,t,n){Aria.$window.document.body.insertAdjacentElement? -this.insertAdjacentElement=function(e,t,n){e.insertAdjacentElement(t,n)}:this.insertAdjacentElement=function(e,t,n){t=="beforeBegin"?e.parentNode.insertBefore(n,e):t=="afterBegin"?e.insertBefore(n,e.firstChild):t=="beforeEnd"?e.appendChild(n):t=="afterEnd"?e.parentNode.insertBefore(n,e.nextSibling):this.$logError(this.INSERT_ADJACENT_INVALID_POSITION,[t])},this.insertAdjacentElement(e,t,n)},copyAttributes:function(e,t){Aria.$window.document.body.mergeAttributes?this.copyAttributes=function(e,t){t.mergeAttributes -(e,!1)}:this.copyAttributes=function(e,t){var n=e.attributes;for(var r=0,i=n.length;r0&&c=="absolute")break;i+=l.offsetLeft,s+=l.offsetTop,l=l.offsetParent,f++}f=0,l=e;while(l&&l.parentNode&&l.parentNode!=n.body&&l.parentNode.tagName){!r.isOpera&&l.nodeName!="HTML"?l.scrollTop!==0&&l.scrollTop?(o=l.scrollTop,a&&(s-=l -.scrollTop)):l.scrollLeft!==0&&l.scrollLeft&&(u=l.scrollLeft,a&&(i-=l.scrollLeft)):r.isOpera&&(l.scrollTop!==0&&l.scrollTop!=l.offsetTop?(a&&(s-=l.scrollTop),o=l.scrollTop):l.scrollLeft!==0&&l.scrollLeft!=l.offsetLeft&&(u=l.scrollLeft,a&&(i-=l.scrollLeft))),c=aria.utils.Dom.getStyle(l,"position");if(f>0&&c=="absolute")break;f++,l=l.parentNode}var v={top:s,left:i,scrollTop:o,scrollLeft:u};return v},getClientGeometry:function(e){var t=this.calculatePosition(e);return{x:t.left+e.clientLeft,y:t.top+e.clientTop,width -:e.clientWidth,height:e.clientHeight}},getGeometry:function(e){if(!e)return null;var t=e.ownerDocument,n,r,i=aria.core.Browser,s=this.calculatePosition(e);if(e===t.body){var o=this.getFullPageSize();return{x:0,y:0,width:o.width,height:o.height}}if(i.isChrome||i.isSafari){var u=e.getBoundingClientRect();n=u.width,r=u.height}else n=e.offsetWidth,r=e.offsetHeight;var a={x:s.left,y:s.top,width:n,height:r},f=e.parentNode,l=t.documentElement,c=t.body;while(f&&f!=l&&f!=c){var h=this.getClientGeometry(f),p=this.getStyle -(f,"overflowX"),d=this.getStyle(f,"overflowY"),v;if(p=="auto"||p=="scroll"){v=h.x-a.x;if(v>0){a.x+=v,a.width-=v;if(a.width<0)return null}v=a.x+a.width-h.x-h.width;if(v>0){a.width-=v;if(a.width<0)return null}}if(d=="auto"||d=="scroll"){v=h.y-a.y;if(v>0){a.y+=v,a.height-=v;if(a.height<0)return null}v=a.y+a.height-h.y-h.height;if(v>0){a.height-=v;if(a.height<0)return null}}f=f.parentNode}return a},getStyle:function(e,t){var n=aria.core.Browser;if(n.isIE){var r=n.isIE8||n.isIE7||n.isIE6;this.getStyle=function(e, -t){if(r&&t=="opacity"){var n=100;try{n=e.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(i){try{n=e.filters("alpha").opacity}catch(s){}}return(n/100).toString(10)}t=="float"&&(t="styleFloat");var o=e.currentStyle?e.currentStyle[t]:null;return e.style[t]||o}}else this.getStyle=function(e,t){var n=Aria.$window,r=null;t=="float"&&(t="cssFloat");var i=n.getComputedStyle(e,"");return i&&(r=i[t]),e.style!==null?e.style[t]||r:r};return this.getStyle(e,t)},centerInViewport:function(e,t){var n=this._getViewportSize -(),r=this._getDocumentScroll(t);return{left:parseInt(r.scrollLeft+(n.width-e.width)/2,10),top:parseInt(r.scrollTop+(n.height-e.height)/2,10)}},isInViewport:function(e,t,n){var r=this._getViewportSize(),i=this._getDocumentScroll(n);return e.topi.scrollTop+r.height||e.left+t.width>i.scrollLeft+r.width?!1:!0},isInside:function(e,t){return e.width=e.width||0,e.height=e.height||0,t==this.VIEWPORT?this.isInViewport({left:e.x,top:e.y},{width:e.width,height:e.height} -):(t.width=t.width||0,t.height=t.height||0,e.xt.x+t.width||e.y+e.height>t.y+t.height?!1:!0)},fitInViewport:function(e,t,n){var r=this._getViewportSize(),i=this._getDocumentScroll(n),s=i.scrollTop,o=Math.max(0,i.scrollTop+r.height-t.height),u=aria.utils.Math.normalize(e.top,s,o),a=i.scrollLeft,f=Math.max(0,i.scrollLeft+r.width-t.width),l=aria.utils.Math.normalize(e.left,a,f);return{top:u,left:l}},fitInside:function(e,t){e.width=e.width||0,e.height=e.height||0;if(t==this.VIEWPORT)return this -.fitInViewport({left:e.x,top:e.y},{width:e.width,height:e.height});t.width=t.width||0,t.height=t.height||0;var n=e.xt.x+t.width&&(n=t.x+t.width-e.width),e.y+e.height>t.y+t.height&&(r=t.y+t.height-e.height),{top:r,left:n}},isAncestor:function(e,t){if(!e||!e.ownerDocument)return!1;var n=e.ownerDocument,r=n.body,i=e;while(i&&i!=r){if(i==t)return!0;i=i.parentNode}return i==t},isInDom:function(e){return e?this.isAncestor(e,e.ownerDocument.body):!1},removeElement:function( -e){e.parentNode&&e.parentNode.removeChild(e)},scrollIntoView:function(e,t){var n=e.ownerDocument,r=e,i=r.getBoundingClientRect(),s,o=!1,u=!1,a=this.getDocumentScrollElement(n);while(e){e==n.body?e=a:e=e.parentNode;if(e){var f=e.clientHeight?e.scrollHeight>e.clientHeight:!1;if(!f){e==a&&(e=null);continue}var l;e==a?l={left:0,top:0}:l=e.getBoundingClientRect();var c=i.left-(l.left+(parseInt(e.style.borderLeftWidth,10)|0)),h=i.right-(l.left+e.clientWidth+(parseInt(e.style.borderLeftWidth,10)|0)),p=i.top-(l.top+ -(parseInt(e.style.borderTopWidth,10)|0)),d=i.bottom-(l.top+e.clientHeight+(parseInt(e.style.borderTopWidth,10)|0));c<0?e.scrollLeft+=c:h>0&&(e.scrollLeft+=h),t===!0&&!o?e.scrollTop+=p:t===!1&&!o?e.scrollTop+=d:p<0?e.scrollTop+=p:d>0&&(e.scrollTop+=d);if(e==a)e=null;else{var v=r.getBoundingClientRect();v.top!=i.top&&(o=!0),i=v}}}},getDocumentScrollElement:function(e){return e==null&&(e=Aria.$window.document),!aria.core.Browser.isSafari&&!aria.core.Browser.isChrome&&e.compatMode=="CSS1Compat"?e.documentElement -:e.body},setOpacity:function(e,t){var n=aria.core.Browser,r=n.isIE8||n.isIE7||n.isIE6;this.setOpacity=r?this._setOpacityLegacyIE:this._setOpacityW3C,this.setOpacity(e,t)},_setOpacityLegacyIE:function(e,t){e.style.cssText+=";filter:alpha(opacity="+t*100+");"},_setOpacityW3C:function(e,t){e.style.opacity=t}}}); -//******************* -//LOGICAL-PATH:aria/utils/DomOverlay.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.DomOverlay",$dependencies:["aria.utils.overlay.LoadingOverlay","aria.utils.Type","aria.utils.Event","aria.utils.AriaWindow"],$singleton:!0,$statics:{UNIQUE_ID_GENERATOR:12},$constructor:function(){this.overlays=null,this._nbOverlays=0,this.bodyOverlay=null,aria.utils.AriaWindow.$on({unloadWindow:this._reset,scope:this})},$destructor:function(){this._reset(),aria.utils.AriaWindow.$unregisterListeners(this)},$prototype:{_init:function(){this.overlays==null&&(this.overlays= -{},aria.utils.AriaWindow.attachWindow(),aria.utils.Event.addListener(Aria.$window,"scroll",{fn:this.__onScroll,scope:this},!0))},_reset:function(){this.overlays!=null&&(aria.utils.Event.removeListener(Aria.$window,"scroll",{fn:this.__onScroll}),aria.utils.AriaWindow.detachWindow(),this.overlays=null,this._nbOverlays=0)},create:function(e,t){var n=this.__getOverlay(e);if(n)return n.overlay.refresh(),n.id;var r=++this.UNIQUE_ID_GENERATOR;return n=new aria.utils.overlay.LoadingOverlay(e,r,t),this._init(),e!==Aria -.$window.document.body?(this.overlays[r]=n,this._nbOverlays++,e.__overlay=r):this.bodyOverlay=n,r},detachFrom:function(e){var t=this.__getOverlay(e);if(!t)return;t.overlay.$dispose();var n=t.id;return e===Aria.$window.document.body?this.bodyOverlay=null:(delete this.overlays[n],this._nbOverlays--),t=null,this._nbOverlays===0&&this.bodyOverlay==null&&this._reset(),n},__getOverlay:function(e){if(e===Aria.$window.document.body)return this.bodyOverlay?{overlay:this.bodyOverlay}:null;var t=e.__overlay;if(!t||this -.overlays==null)return;var n=this.overlays[t];if(!n){e.__overlay=null;return}return{overlay:n,id:t}},__onScroll:function(){this.$assert(184,this.overlays!=null);var e=this.overlays;for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];n.refreshPosition()}},disposeOverlays:function(e){if(!aria.utils.Type.isArray(e)||this.overlays==null)return;for(var t=0,n=e.length;t=0;e--){var t=n[e];t&&this.removeListener(t[s],t[o],t[r],e)}},_checkUnloadListeners:function(){a==null&&(a=[],this._simpleAdd(Aria.$window,"unload",this._unload))},_unloadEvent:function(e){var t=a;for(var n=0,r=t.length;n-1;o--)d=this.removeListener(e[o],t,s)&&d;return d}if(!s||!s.call&&!s.fn)return this.purgeElement(e,!1,t);if("unload"==t){if(a)for(o=a.length-1;o>-1;o--){p=a[o];var v;p&&aria.utils.Type.isObject(p[r])&&!p[r].$Callback?v="fn"in s&&p[r].fn==s.fn:v=p[r]==s;if(p&&p[0]==e&&p[1]==t&&v)return p[r]!=p[l]&&p[l].$dispose(),p[c](),delete p[c],a.splice(o,1),!0}return!1}var m=null,g=arguments[3];"undefined"==typeof g&&(g=this._getCacheIndex(n,e,t,s)),g>=0&&(m=n[g]);if(!e||!m)return!1;var y=m[f]===!0?!0 -:!1;try{this._simpleRemove(e,t,m[i],y)}catch(b){return u=b,!1}return delete n[g][i],n[g][r]!=n[g][l]&&n[g][l].$dispose(),n[g][c](),delete n[g][c],n.splice(g,1),!0},getElement:function(e){return typeof e=="string"?Aria.$window.document.getElementById(e):e},_getCacheIndex:function(e,t,n,i){var u;for(var a=0,f=e.length;a-1;s--){var u=i[s];this.removeListener(r,u.type,u.fn)}if(t&&r&&r.childNodes)for(s=0,o=r.childNodes.length;s0?t=n.pop():(this._varIndex++,t="v"+this._varIndex,this.addVariable(t)),this._usedTempVariables[t]=!0,e&&this.out.push(t,"=",e,";"),t},releaseTempVariable:function(e){this._usedTempVariables.hasOwnProperty(e)?(delete this._usedTempVariables[e],this._unusedTempVariables -.push(e)):this.$logError(this.INVALID_RELEASE_TEMP_VAR,[e])},isRegularVarName:function(e){return this.REGULARNAME_REGEXP.test(e)&&!Aria.isJsReservedWord(e)},createShortcut:function(e){var t=this.isRegularVarName(e),n=t?e:this.createTempVariable(e);return this._shortcuts[n]==null&&(this._shortcuts[n]=[]),this._shortcuts[n].push(!t),n},releaseShortcut:function(e){var t=this._shortcuts[e];if(t&&t.length>0){var n=t.pop();n&&this.releaseTempVariable(e)}else this.$logError(this.INVALID_RELEASE_SHORTCUT,[e])},getCode -:function(){var e=this.out.join("");return this.out=[e],this.variables.length>0&&(e=["var ",this.variables.join(","),";\n",e].join("")),e},write:function(){this.out.push.apply(this.out,arguments)},createFunction:function(){var e=this.functionArguments.slice();return e.push(this.getCode()),Function.apply(Function,e)},getDotProperty:function(e){return this.isRegularVarName(e)?"."+e:"["+this.stringify(e)+"]"},writeEnsureObjectExists:function(e){this.out.push("if (!",e,"){",e,"={};}")}}}); -//******************* -//LOGICAL-PATH:aria/utils/HashManager.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.HashManager",$singleton:!0,$dependencies:["aria.core.Browser","aria.utils.Type","aria.utils.Event","aria.utils.Object","aria.utils.AriaWindow"],$statics:{INVALID_SETHASH_ARGUMENT:"Invalid argument passed to aria.utils.HashManager.setHash method.",INVALID_SETSEPARATORS_ARGUMENTS:"Invalid argument passed to aria.utils.HashManager.setSeparators method.",INVALID_SEPARATOR:"Expression %1 cannot be used as separator.",INVALID_HASHPOLLING_TRIGGER:"Enabling hash polling is allowed only in IE7." -,INVALID_HASHOBJECT_TYPE:"Invalid hash object: value corresponding to key %1 is not a string.",INVALID_HASHOBJECT_VALUE:"Invalid hash object: value '%1' corresponding to key '%2' of the hashObject contains one the non encodable separators '%3'",INVALID_HASHOBJECT_KEY:"Invalid hash object: key '%1' of the hashObject contains one the non encodable separators '%2'",IFRAME_ID:"at_hash_manager_iframe"},$constructor:function(){this._separators=[",","&"],this._separatorRegExp=this.__buildRegExpFromArray(this._separators -),this._nonEncodableSeparators=this.__getNonEncodedSeparators(this._separators),this._nonEncodableSepRegExp=this.__buildRegExpFromArray(this._nonEncodableSeparators),this._hashChangeCallbacks=null,this._currentHashString=decodeURIComponent(this.getHashString()),this._isIE7OrLess=aria.core.Browser.isIE&&aria.core.Browser.majorVersion<8,this._enableIEpolling=this._isIE7OrLess,this._typeUtil=aria.utils.Type,this.ie7PollDelay=75,this._iframe=null,this._currentIframeHashString=null,this._isIE7OrLess&&this._createIframe -()},$destructor:function(){this._removeHashChangeInternalCallback(),this._isIE7OrLess&&this._destroyIframe()},$prototype:{getHashObject:function(e){return aria.utils.Json.copy(this._extractHashObject(this.getHashString(e)))},getHashString:function(e){e=e||Aria.$window;var t=e.location.href,n=t.indexOf("#");return n!=-1?t.substring(n+1):""},setHash:function(e,t){t=t||Aria.$window;var n="";if(this._typeUtil.isObject(e)){if(!this._validateHashObject(e))return;n=this._stringifyHashObject(e)}else this._typeUtil.isString -(e)?n=e?e:"":this.$logError(this.INVALID_SETHASH_ARGUMENT);this.getHashString(t)!=n&&(t.location.hash=n)},addCallback:function(e){this._hashChangeCallbacks==null&&(this._hashChangeCallbacks=[],this._addHashChangeInternalCallback()),this._hashChangeCallbacks.push(e)},removeCallback:function(e){var t=this._hashChangeCallbacks;if(t!=null){var n=t.length,r=0;while(r","="]);if(this._typeUtil.isString(e))t=[e];else{if(!this._typeUtil.isArray(e))return;t=e}for(var i=0,s=t.length;ir;r++)t=e[r],t=this.$normCallback(t),this.$callback(t,n)},_removeHashChangeInternalCallback:function(){this._isIE7OrLess||aria.utils.Event.removeListener(Aria.$window,"hashchange",{fn:this._internalCallback})},_validateHashObject:function(e){var t,n=this._nonEncodableSepRegExp -;for(var r in e)if(e.hasOwnProperty(r)){if(n&&r.match(n))return this.$logError(this.INVALID_HASHOBJECT_KEY,[r,this._nonEncodableSeparators.join("")]),!1;t=e[r];if(!this._typeUtil.isString(t))return this.$logError(this.INVALID_HASHOBJECT_TYPE,r),!1;if(n&&t.match(n))return this.$logError(this.INVALID_HASHOBJECT_VALUE,[t,r,this._nonEncodableSeparators.join("")]),!1}return!0},__getNonEncodedSeparators:function(e){var t=[];for(var n=0,r=e.length;n0){n.push("if (",r,"==null) {");if(y.length==1)n.push(r,"=",y[0],";");else{for(var h=0,p=y.length-1;h0&&n.push("} else "),n.push("if (",b,"!=null){",r,"=",b,";")}n.push("} else {",r,"=",y[y.length-1],";}")}}n.push("}")}}}}); -//******************* -//LOGICAL-PATH:aria/utils/Path.js -//******************* -Aria.classDefinition({$classpath:"aria.utils.Path",$dependencies:["aria.utils.String","aria.utils.Type"],$singleton:!0,$statics:{WRONG_PATH_SYNTAX:"Syntax for path %1 is not valid. Note that variables cannot be used in paths.",RESOLVE_FAIL:"Resolve for path %1 failed, root element does not contain this path"},$prototype:{setValue:function(e,t,n){var r=aria.utils.Type;if(!e||!t||!r.isObject(e))return;r.isString(t)&&(t=this.parse(t));if(!r.isArray(t)||r.isNumber(t[0]))return;var i=e,s,o,u;for(var a=0,f=t.length -;ai&&(i=s),this._logsPerClasspath -[n.classpath]||(this._logsPerClasspath[n.classpath]={});var o=this._logsPerClasspath[n.classpath];o[n.msg]||(o[n.msg]=[0]),o[n.msg].push(n),o[n.msg][0]+=n.length}this._logsPerClasspath._max=i},showProfilingData:function(e){if(this._displayDiv!=null)return;this.process();var t=Aria.$window.document;this._displayDiv=t.createElement("div"),this._displayDiv.style.cssText="position:absolute;top:0px;left:0px;width:100%;height:100%; z-index:99999999;overflow:auto;background:white",t.body.appendChild(this._displayDiv -),Aria.loadTemplate({classpath:"aria.utils.ProfilingDisplay",div:this._displayDiv,data:aria.utils.Json.copy(this._logsPerClasspath,!0)})},hideProfilingData:function(){this._displayDiv.innerHTML="",this._displayDiv!=null&&aria.utils.Dom.removeElement(this._displayDiv),this._displayDiv=null},logTimestamp:function(e,t){this._logs[this._nbLogs++]={classpath:e,msg:t,timestamp:(new Date).getTime()}},startMeasure:function(e,t){return this._logs[this._nbLogs++]={classpath:e,msg:t,id:this._ids,start:(new Date).getTime -()},this._ids++},stopMeasure:function(e,t){this._logs[this._nbLogs++]={classpath:e,id:t,stop:(new Date).getTime()}},incrementCounter:function(e,t){this._counters.hasOwnProperty(e)?this._counters[e]+=t||1:this._counters[e]=t||1},resetCounter:function(e,t){if(!this._counters[e])return;this._counterSplits[e]||(this._counterSplits[e]=[]),this._counterSplits[e].push({value:this._counters[e],reason:t}),this._counters[e]=0},getCounterValue:function(e){return this._counters[e]||0},getAvgSplitCounterValue:function(e, -t){if(!this._counterSplits[e])return 0;var n=0;for(var r=0,i=this._counterSplits[e].length;r=0;n--)e.releaseId(t[n]);this._dynamicIds=null}}}})})(); -//******************* -//LOGICAL-PATH:aria/widgetLibs/BindableWidget.js -//******************* -Aria.classDefinition({$classpath:"aria.widgetLibs.BindableWidget",$extends:"aria.widgetLibs.BaseWidget",$statics:{INVALID_BEAN:"Invalid propety '%1' in widget's '%2' configuration."},$dependencies:["aria.utils.Json","aria.utils.Type"],$constructor:function(e,t,n){this.$BaseWidget.constructor.call(this,e,t,n),this._bindingListeners={}},$destructor:function(){var e=this._bindingListeners,t=aria.utils.Json;for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];t.removeListener(r.inside,r.to,r.cb)}this._bindingListeners= -null,this.$BaseWidget.$destructor.call(this)},$prototype:{_registerBindings:function(){var e=this._cfg.bind,t=aria.utils.Json;if(e)for(var n in e){if(!e.hasOwnProperty(n))continue;var r=e[n];if(r){var i={fn:this._notifyDataChange,scope:this,args:n};try{t.addListener(r.inside,r.to,i,!0),this._bindingListeners[n]={inside:r.inside,to:r.to,transform:r.transform,cb:i};var s=this._transform(r.transform,r.inside[r.to],"toWidget");this.setWidgetProperty(n,s)}catch(o){this.$logError(this.INVALID_BEAN,[n,"bind"])}}}}, -_notifyDataChange:Aria.empty,setWidgetProperty:Aria.empty,_transform:function(e,t,n){var r=t;if(e){var i=!1,s=aria.utils.Type;s.isString(e)&&e.indexOf(".")!=-1&&(e=Aria.getClassInstance(e),i=!0),e[n]?r=this.evalCallback(e[n],r):s.isFunction(e)&&(r=this.evalCallback(e,r)),i&&e.$dispose()}return r},evalCallback:function(e,t){return this._context.evalCallback(e,t)}}}); -//******************* -//LOGICAL-PATH:aria/widgetLibs/CommonBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.widgetLibs.CommonBeans",$description:"",$namespaces:{json:"aria.core.JsonTypes"},$beans:{Callback:{$type:"json:MultiTypes",$description:"",$contentTypes:[{$type:"json:Object",$description:"",$properties:{fn:{$type:"FunctionName",$description:""},scope:{$type:"json:ObjectRef",$description:""},args:{$type:"json:MultiTypes",$description:""}}},{$type:"FunctionName",$description:""}]},FunctionName:{$type:"json:MultiTypes",$description:"",$contentTypes:[{$type:"json:String",$description -:""},{$type:"json:FunctionRef",$description:""}]},BindingRef:{$type:"json:Object",$description:"",$properties:{to:{$type:"json:JsonProperty",$description:""},inside:{$type:"json:ObjectRef",$description:""},transform:{$type:"TransformRef",$description:""}}},TransformRef:{$type:"json:MultiTypes",$description:"",$contentTypes:[{$type:"json:Object",$description:"",$properties:{toWidget:{$type:"FunctionName",$description:""},fromWidget:{$type:"FunctionName",$description:""}}},{$type:"FunctionName",$description:"" -}]}}}); -//******************* -//LOGICAL-PATH:aria/widgetLibs/WidgetLib.js -//******************* -Aria.classDefinition({$classpath:"aria.widgetLibs.WidgetLib",$statics:{UNKWOWN_WIDGET:"Unknown widget name in the library.",ERROR_WIDGET_INIT:"Template %1, line %2: an error occurred while initializing widget %3. Please check the name and classpath of the widget in the library, the constructor of the widget and its %4 method."},$prototype:{widgets:{},getWidgetDependencies:function(e,t){var n=this.widgets[e];return n==null?null:t||Aria.getClassRef(n)==null?[n]:[]},processWidgetMarkup:function(e,t,n,r){var i=this -.widgets[e];try{if(!i)throw this.UNKWOWN_WIDGET;n||(n={});var s=Aria.getClassRef(i),o=new s(n,t.tplCtxt,r);t.registerBehavior(o),o.writeMarkup(t)}catch(u){t.write("#Error in widget:"+e+"#"),this.$logError(this.ERROR_WIDGET_INIT,[t.tplCtxt.tplClasspath,r,e,"writeMarkup"],u)}},processWidgetMarkupBegin:function(e,t,n,r){var i=this.widgets[e];try{if(i){n||(n={});var s=Aria.getClassRef(i),o=new s(n,t.tplCtxt,r);return t.registerBehavior(o),o.writeMarkupBegin(t),o}throw this.UNKWOWN_WIDGET}catch(u){t.write("#Error in widget:"+ -e+"#"),this.$logError(this.ERROR_WIDGET_INIT,[t.tplCtxt.tplClasspath,r,e,"writeMarkupBegin"],u)}}}}); -//******************* -//LOGICAL-PATH:aria/widgets/environment/WidgetSettings.js -//******************* -Aria.classDefinition({$classpath:"aria.widgets.environment.WidgetSettings",$extends:"aria.core.environment.EnvironmentBase",$dependencies:["aria.widgets.environment.WidgetSettingsCfgBeans","aria.widgetLibs.environment.WidgetLibsSettings"],$singleton:!0,$prototype:{_cfgPackage:"aria.widgets.environment.WidgetSettingsCfgBeans.AppCfg",getWidgetLib:function(){return Aria.getClassRef(this.getWidgetLibClassName())},getWidgetLibClassName:function(){return this.$logWarn("The getWidgetLibClassName and getWidgetLib methods are deprecated. There is no longer a single default library. Instead of these methods, you can consider using the getWidgetLibs method in aria.widgetLibs.environment.WidgetLibsSettings." -),aria.widgetLibs.environment.WidgetLibsSettings.getWidgetLibs().aria},getWidgetSettings:function(){return this.checkApplicationSettings("widgetSettings")}}}); -//******************* -//LOGICAL-PATH:aria/widgets/environment/WidgetSettingsCfgBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.widgets.environment.WidgetSettingsCfgBeans",$namespaces:{json:"aria.core.JsonTypes",dragDrop:"aria.utils.dragdrop.DragDropBean"},$description:"",$beans:{AppCfg:{$type:"json:Object",$description:"",$restricted:!1,$properties:{widgetSettings:{$type:"WidgetSettingsCfg",$description:"",$default:{}},defaultWidgetLib:{$type:"json:String",$description:""}}},WidgetSettingsCfg:{$type:"json:Object",$description:"",$properties:{directOnBlurValidation:{$type:"json:Boolean",$description -:"",$default:!0},autoselect:{$type:"json:Boolean",$description:"",$default:!1},middleAlignment:{$type:"json:Boolean",$description:"",$default:!0},dialog:{$type:"json:Object",$description:"",$properties:{movable:{$type:"json:Boolean",$description:"",$default:!1},movableProxy:{$type:"dragDrop:ProxyCfg",$description:""}},$default:{}}}}}}); -//******************* -//LOGICAL-PATH:aria/widgets/AriaLib.js -//******************* -Aria.classDefinition({$classpath:"aria.widgets.AriaLib",$singleton:!0,$prototype:{}}); -//******************* -//LOGICAL-PATH:aria/widgets/AriaSkinBeans.js -//******************* -Aria.beanDefinitions({$package:"aria.widgets.AriaSkinBeans",$beans:{}}); -//******************* -//LOGICAL-PATH:aria/widgets/AriaSkinInterface.js -//******************* -Aria.classDefinition({$classpath:"aria.widgets.AriaSkinInterface",$singleton:!0,$prototype:{}}); -//******************* -//LOGICAL-PATH:aria/widgets/AriaSkinNormalization.js -//******************* -Aria.classDefinition({$classpath:"aria.widgets.AriaSkinNormalization",$singleton:!0,$prototype:{normalizeSkin:function(e){}}}); -//******************* -//LOGICAL-PATH:aria/widgets/GlobalStyle.tpl.css -//******************* -{CSSTemplate { - $classpath : "aria.widgets.GlobalStyle" -}} - -{macro main()} -{/macro} - -{/CSSTemplate} -//******************* -//LOGICAL-PATH:aria/widgets/WidgetStyle.tpl.css -//******************* -{CSSTemplate { - $classpath : "aria.widgets.WidgetStyle" -}} - {macro main()} - {/macro} -{/CSSTemplate} -//******************* -//LOGICAL-PATH:aria/widgets/WidgetStyleScript.js -//******************* -Aria.tplScriptDefinition({$classpath:"aria.widgets.WidgetStyleScript",$prototype:{}}); \ No newline at end of file diff --git a/examples/ariatemplates/js/view/Todo.tpl b/examples/ariatemplates/js/view/Todo.tpl deleted file mode 100644 index 67844040ca..0000000000 --- a/examples/ariatemplates/js/view/Todo.tpl +++ /dev/null @@ -1,130 +0,0 @@ -{Template { - $classpath: 'js.view.Todo', - $hasScript: true, - $wlibs: { - html: 'aria.html.HtmlLibrary' - } -}} - {macro main()} -
    -

    todos

    - -
    - {section { - macro: "mainDisplay", - type: "div", - bindRefreshTo: [{to: "emptylist", inside: data}] - }/} - {/macro} - - {macro mainDisplay()} - {if !data.emptylist} -
    - {@html:CheckBox { - attributes: { - classList: ["toggle-all"] - }, - bind: { - checked: { - to: "toggleall", - inside: data, - transform: { - fromWidget: toggleAll - } - } - } - }/} - - {repeater { - id: "tasklist", - content: data.todolist, - type: "ul", - attributes: { - classList: (data.route.length > 0 ? ["todo-list", "filter-" + data.route] : ["todo-list"]) - }, - childSections: { - id: "task", - type: "li", - macro: "taskDisplay", - bindRefreshTo: function (e) { return [{to: "title", inside: e.item}] }, - attributes: function (e) { - return { classList: e.item.completed ? ["completed"] : [] } - } - } - }/} -
    -
    - {section { - type: "span", - attributes: { - classList: ["todo-count"] - }, - macro: "itemsleft", - bindRefreshTo: [{to: "itemsleft", inside: data}] - }/} - {section { - attributes: { - classList: ["filters"] - }, - macro: "routing", - type: "ul", - bindRefreshTo: [{to: "route", inside: data}] - }/} - {section { - type: "span", - macro: "itemsclear", - bindRefreshTo: [{to: "itemscompleted", inside: data}] - }/} -
    - {/if} - {/macro} - - {macro routing()} -
  • - All -
  • -
  • - Active -
  • -
  • - Completed -
  • - {/macro} - - {macro itemsleft()} - ${data.itemsleft} ${data.itemsleft == 1 ? "item" : "items"} left - {/macro} - - {macro itemsclear()} - {if data.itemscompleted > 0} - - {/if} - {/macro} - - {macro taskDisplay(iter)} - {if data.editedTask == iter.sectionId} - - {else/} -
    - {@html:CheckBox { - attributes: { - classList: ["toggle"] - }, - bind: { - checked: { - to: "completed", - inside: iter.item, - transform: function (v) { return changeTaskStyle(v, iter.sectionId) } - } - } - }/} - - -
    - {/if} - {/macro} - -{/Template} diff --git a/examples/ariatemplates/js/view/TodoScript.js b/examples/ariatemplates/js/view/TodoScript.js deleted file mode 100644 index ab86777db7..0000000000 --- a/examples/ariatemplates/js/view/TodoScript.js +++ /dev/null @@ -1,133 +0,0 @@ -/* global aria:true, Aria:true */ -'use strict'; - -Aria.tplScriptDefinition({ - $classpath: 'js.view.TodoScript', - $dependencies: ['aria.utils.HashManager'], - - $prototype: { - $dataReady: function () { - this.getRoute(); - this.data.editedTask = null; - this.pauselistener = false; - this.todolistUpdateHandler(); - this.$json.addListener(this.data, 'todolist', {fn: this.todolistUpdateHandler, scope: this}, false, true); - aria.utils.HashManager.addCallback({fn: 'routeManager', scope: this}); - }, - - $viewReady: function () { - document.querySelector('.new-todo').focus(); - }, - - getRoute: function () { - var route = aria.utils.HashManager.getHashString(); - this.$json.setValue(this.data, 'route', route[0] === '/' ? route.substr(1) : route); - }, - - routeManager: function () { - var el = this.$getElementById('tasklist'); - this.getRoute(); - el.classList.setClassName('todo-list' + (this.data.route.length > 0 ? ' filter-' + this.data.route : '')); - }, - - changeTaskStyle: function (val, where) { - var el = this.$getElementById(where); - if (el) { el.classList.setClassName(val ? 'completed' : ''); } - return val; - }, - - newTaskOnEnter: function (evt) { - var val; - if (evt.keyCode === evt.KC_ENTER) { - val = aria.utils.String.trim(evt.target.getValue()); - if (val.length > 0) { - this.moduleCtrl.addTask(val); - evt.target.setValue(''); - } - } - }, - - deleteTask: function (evt, e) { - this.moduleCtrl.deleteTask(e.index); - }, - - toggleAll: function (val) { - var i; - this.pauselistener = true; - for (i = 0; i < this.data.todolist.length; i++) { - this.$json.setValue(this.data.todolist[i], 'completed', val); - } - this.pauselistener = false; - this.todolistUpdateHandler(); - return val; - }, - - clearCompleted: function () { - var i; - aria.templates.RefreshManager.stop(); - this.pauselistener = true; - for (i = this.data.todolist.length - 1; i >= 0; i--) { - if (this.data.todolist[i].completed) { this.deleteTask(null, {index: i}); } - } - this.pauselistener = false; - this.todolistUpdateHandler(); - aria.templates.RefreshManager.resume(); - }, - - editTask: function (evt, e) { - var el = null; - this.data.editedTask = e.sectionId; - el = this.$getElementById(e.sectionId); - if (el) { el.classList.add('editing'); } - this.$refresh({outputSection: e.sectionId}); - this.$focus('editbox'); - }, - - confirmOrRevertEdit: function (evt, e) { - if (evt.keyCode === evt.KC_ENTER) { this.stopEdit(evt, e); } - if (evt.keyCode === evt.KC_ESCAPE) { this.revertEdit(evt, e); } - }, - - stopEdit: function (evt, e) { - var el, val; - this.data.editedTask = null; - el = this.$getElementById(e.sectionId); - if (el) { el.classList.remove('editing'); } - val = aria.utils.String.trim(evt.target.getValue()); - if (val.length > 0) { - if (val === e.item.title) { - this.$refresh({outputSection: e.sectionId}); - } - else { - this.$json.setValue(e.item, 'title', val); - } - } - else { - this.deleteTask(evt, e); - } - }, - - revertEdit: function (evt, e) { - var el; - this.data.editedTask = null; - el = this.$getElementById(e.sectionId); - if (el) { el.classList.remove('editing'); } - this.$refresh({outputSection: e.sectionId}); - this.$json.setValue(e.item, 'title', e.item.title); - }, - - todolistUpdateHandler: function () { - var size; - if (this.pauselistener) { return; } - aria.templates.RefreshManager.stop(); - size = this.data.todolist.length; - this.$json.setValue(this.data, 'emptylist', size === 0); - this.$json.setValue(this.data, 'itemsleft', this.data.todolist.filter(function (e) { return !(e.completed); }).length); - this.$json.setValue(this.data, 'itemscompleted', size - this.data.itemsleft); - this.$json.setValue(this.data, 'toggleall', size === this.data.itemscompleted); - aria.templates.RefreshManager.resume(); - this.moduleCtrl.saveTasks(); - } - - } -}); diff --git a/examples/ariatemplates/js/view/TodoStyle.tpl.css b/examples/ariatemplates/js/view/TodoStyle.tpl.css deleted file mode 100644 index 7ff2e4b8c1..0000000000 --- a/examples/ariatemplates/js/view/TodoStyle.tpl.css +++ /dev/null @@ -1,216 +0,0 @@ -{CSSTemplate { - $classpath: 'js.view.TodoStyle', - $dependencies: ['aria.core.Browser'] -}} - -{macro main ()} - -#label-toggle-all { - display: none; -} - -.toggle-all { - position: absolute; - top: -55px; - left: -12px; - width: 60px; - height: 34px; - text-align: center; - border: none; /* Mobile Safari */ -} - -.toggle-all:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 13px 17px 12px 17px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - -ms-appearance: none; - appearance: none; -} - -.todo-list li .toggle:after { - content: url('data:image/svg+xml;utf8,'); -} - -.todo-list li .toggle:checked:after { - content: url('data:image/svg+xml;utf8,'); -} - -.todo-list li label { - white-space: pre; - word-break: break-word; - padding: 15px 60px 15px 15px; - margin-left: 45px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a.selected, -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.filter-active li.completed { - display: none -} - -.filter-completed li { - display: none -} -.filter-completed li.completed { - display: block -} - -/* - This replaces the original hack to remove background from Mobile Safari. -*/ -{if aria.core.Browser.isWebkit} - -.toggle-all, -.todo-list li .toggle { - background: none; -} - -.todo-list li .toggle { - height: 40px; -} - -.toggle-all { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - -webkit-appearance: none; - appearance: none; -} - -{/if} - -@media (max-width: 430px) { - .filters { - bottom: 10px; - } -} - -{/macro} - -{/CSSTemplate} \ No newline at end of file diff --git a/examples/ariatemplates/node_modules/todomvc-app-css/index.css b/examples/ariatemplates/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/ariatemplates/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/ariatemplates/node_modules/todomvc-common/base.css b/examples/ariatemplates/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/ariatemplates/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/ariatemplates/node_modules/todomvc-common/base.js b/examples/ariatemplates/node_modules/todomvc-common/base.js deleted file mode 100644 index 44fb50c613..0000000000 --- a/examples/ariatemplates/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,244 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/ariatemplates/package.json b/examples/ariatemplates/package.json deleted file mode 100644 index 46dbefe6d2..0000000000 --- a/examples/ariatemplates/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private": true, - "dependencies": { - "todomvc-common": "^1.0.1", - "todomvc-app-css": "^2.1.0" - } -} diff --git a/examples/ariatemplates/readme.md b/examples/ariatemplates/readme.md deleted file mode 100644 index 77883a1e20..0000000000 --- a/examples/ariatemplates/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# Aria Templates TodoMVC Example - -> Aria Templates (aka AT) is an application framework written in JavaScript for building rich and large-scaled enterprise web applications. - -> _[Aria Templates - ariatemplates.com](http://ariatemplates.com)_ - - -## Learning Aria Templates - -The [Aria Templates website](http://ariatemplates.com) is a great resource for getting started. - -Here are some links you may find helpful: - -* [Documentation](http://ariatemplates.com/usermanual) -* [API Reference](http://ariatemplates.com/aria/guide/apps/apidocs) -* [Guides](http://ariatemplates.com/guides) -* [Blog](http://ariatemplates.com/blog) -* [FAQ](http://ariatemplates.com/faq) -* [Aria Templates on GitHub](https://github.com/ariatemplates) - -Get help from other Aria Templates users: - -* [Aria Templates on StackOverflow](http://stackoverflow.com/questions/tagged/ariatemplates) -* [Forums](http://ariatemplates.com/forum) -* [Aria Templates on Twitter](http://twitter.com/ariatemplates) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ diff --git a/examples/atmajs/.gitignore b/examples/atmajs/.gitignore deleted file mode 100644 index 10079b2979..0000000000 --- a/examples/atmajs/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -node_modules/atma-class/* -!node_modules/atma-class/lib/class.js - -node_modules/includejs/* -!node_modules/includejs/lib/include.js - -node_modules/maskjs/* -!node_modules/maskjs/lib/mask.js - -node_modules/ruta/* -!node_modules/ruta/lib/ruta.js - -node_modules/todomvc-app-css/* -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common/* -!node_modules/todomvc-common/base.css -!node_modules/todomvc-common/base.js diff --git a/examples/atmajs/index.html b/examples/atmajs/index.html deleted file mode 100644 index 82abe48597..0000000000 --- a/examples/atmajs/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Atma.js • TodoMVC - - - - - - - - - - - diff --git a/examples/atmajs/js/Controls/Filter.mask b/examples/atmajs/js/Controls/Filter.mask deleted file mode 100644 index cd48222f12..0000000000 --- a/examples/atmajs/js/Controls/Filter.mask +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Filter Presentation: - * - HASH-change listener - * - navigation(filter) buttons - */ -define Filter { - var filters = { - '' : 'All', - active: 'Active', - completed: 'Completed' - }; - - ul .filters { - for ((key, val) in filters) { - // compare with the scoped value `action` - li > - a .~[bind: action == key ? 'selected' ] href = '#~key' > - '~val' - } - } -} diff --git a/examples/atmajs/js/Controls/TodoInput.mask b/examples/atmajs/js/Controls/TodoInput.mask deleted file mode 100644 index 35e77a52eb..0000000000 --- a/examples/atmajs/js/Controls/TodoInput.mask +++ /dev/null @@ -1,45 +0,0 @@ -/** - * Extend INPUT tag to edit a todo's title - * - format string - * - complete edit on ENTER - * - complete edit on BLUR - * - * Used as - * - the main application's input - * - single todo item editor - * - * Public Signals - * - cancel: input interrupted - * - submit: input formatted and completed - */ -define TodoInput as (input type='text') { - - event blur (e) { - this.submit(); - } - - event press:esc (e) { - this.cancel(); - } - - event press:enter (e) { - this.submit(); - // prevent IE from button click - `Clear Completed` - e.preventDefault(); - } - - function submit () { - var str = this.$.val().trim(); - this.emitOut('submit', str); - this.afterEdit(); - } - - function cancel () { - this.emitOut('cancel'); - this.afterEdit(); - } - - function afterEdit () { - this.$.val(this.attr.preserve ? this.model.title : ''); - } -} diff --git a/examples/atmajs/js/Store/Todos.js b/examples/atmajs/js/Store/Todos.js deleted file mode 100644 index 0455fd8563..0000000000 --- a/examples/atmajs/js/Store/Todos.js +++ /dev/null @@ -1,77 +0,0 @@ -/*jshint newcap:false */ -/*global Class, include */ - -(function () { - 'use strict'; - - var Todo = Class({ - Base: Class.Serializable, - - // Properties with default values - title: '', - completed: false - }); - - - include.exports = Class.Collection(Todo, { - Store: Class.LocalStore('todos-atmajs'), - create: function (title) { - // `push` initilizes the `Task` instance. It does the same - // as if we would do this via `new Task({title: title})` - return this - .push({ - title: title - }) - .save(); - }, - toggleAll: function (completed) { - this - .forEach(function (task) { - task.completed = completed; - }) - .save(); - }, - removeCompleted: function () { - this.del(function (x) { - return x.completed === true; - }); - }, - status: { - count: 0, - todoCount: 0, - completedCount: 0 - }, - Override: { - // Override mutators and recalculate status, - // which will be used lately in M-V bindings - save: function () { - return this - .super(arguments) - .calcStatus(); - }, - del: function () { - return this - .super(arguments) - .calcStatus(); - }, - fetch: function () { - return this - .super(arguments) - .calcStatus(); - } - }, - calcStatus: function () { - var todos = 0; - var completed = 0; - this.forEach(function (todo) { - todo.completed && ++completed || ++todos; - }); - - this.status.count = this.length; - this.status.todoCount = todos; - this.status.completedCount = completed; - return this; - } - }); - -}()); diff --git a/examples/atmajs/js/Todos/TodoList.mask b/examples/atmajs/js/Todos/TodoList.mask deleted file mode 100644 index bf1168e7a2..0000000000 --- a/examples/atmajs/js/Todos/TodoList.mask +++ /dev/null @@ -1,30 +0,0 @@ -import TodoTask from 'TodoTask'; - -define TodoList { - - slot toggleAll (event) { - var completed = event.currentTarget.checked; - this.model.toggleAll(completed); - } - - slot taskChanged () { - this.model.save(); - } - - slot taskRemoved (event, task) { - this.model.del(task); - } - - input .toggle-all - type = checkbox - checked = '~[bind: status.todoCount == 0 ? "checked" ]' - x-tap = toggleAll - ; - - label for='toggle-all' > 'Mark all as complete' - - ul .todo-list { - // bind todos collection - +each (.) > TodoTask; - } -} diff --git a/examples/atmajs/js/Todos/TodoTask.js b/examples/atmajs/js/Todos/TodoTask.js deleted file mode 100644 index 8dbd229553..0000000000 --- a/examples/atmajs/js/Todos/TodoTask.js +++ /dev/null @@ -1,75 +0,0 @@ -/*jshint newcap:false */ -/*global include, mask, Compo */ - -/** - * Single Todo Item Component - * - View - * - Edit - * - * Public signals - - * taskChanged: Todo's state or title was changed - * taskRemoved: Todo was removed - * @arguments: Todo Model - * - */ - -(function () { - 'use strict'; - - var STATE_VIEW = ''; - var STATE_EDIT = 'editing'; - include.exports = { - scope: { - state: STATE_VIEW - }, - - slots: { - taskChanged: function () { - if (!this.model.title) { - - // [emitIn/emitOut] signal propagation begins from a sender - this.emitOut('taskRemoved'); - - // stop propagation of the `taskChanged` signal - return false; - } - - this.scope.state = STATE_VIEW; - }, - taskRemoved: function () { - // remove component - this.remove(); - - // add arguments to the signal - return [this.model]; - }, - cancel: function () { - this.scope.state = STATE_VIEW; - }, - submit: function () { - // do not send the signal to the app - return false; - }, - edit: function () { - this.scope.state = STATE_EDIT; - this.compos.input.$.focus(); - } - }, - compos: { - input: 'compo: TaskEdit' - }, - - //= Private Methods - - _isVisible: function (completed, action) { - if (action === 'completed' && !completed) { - return false; - } - if (action === 'active' && completed) { - return false; - } - return true; - } - }; - -})(); diff --git a/examples/atmajs/js/Todos/TodoTask.mask b/examples/atmajs/js/Todos/TodoTask.mask deleted file mode 100644 index 7bc8438d2b..0000000000 --- a/examples/atmajs/js/Todos/TodoTask.mask +++ /dev/null @@ -1,47 +0,0 @@ -import * as TodoTaskController from 'TodoTask.js'; -import TodoInput from '../Controls/TodoInput'; - -define TodoTask extends TodoTaskController { - - let TaskView as (.view) { - - input.toggle type=checkbox { - dualbind - value = completed - // emit signal when INPUTs state changes via user input - x-signal = 'dom: taskChanged' - ; - } - label > '~[bind:title]'; - button.destroy x-tap = 'taskRemoved'; - } - - let TaskEdit as (input.edit preserve) extends TodoInput { - - dualbind - value = 'title' - dom-slot = submit - - // emit `taskChange` signal each time model is changed - // via user input - x-signal = 'dom: taskChanged' - ; - - } - - /* `+visible` is same as `+if` with one difference: - * by falsy condition it still renders the nodes (with display:none) - * and `+if` first renders only when the condition becomes true. - */ - +visible ($._isVisible(completed, action)) { - li - .~[bind:completed ? 'completed'] - .~[bind:state] - // emit `edit` on `dblclick` event - x-signal = 'dblclick: edit' - { - TaskView; - TaskEdit; - } - } -} diff --git a/examples/atmajs/js/app.js b/examples/atmajs/js/app.js deleted file mode 100644 index aa8e6ae858..0000000000 --- a/examples/atmajs/js/app.js +++ /dev/null @@ -1,44 +0,0 @@ -/*jshint newcap:false */ -/*global include, mask, Compo, ruta */ - -'use strict'; - -/** - * Controller for the App Component - * - * - load model dependecies - */ - -include - .js('Store/Todos.js') - .done(function (resp) { - - include.exports = { - model: resp.Todos.fetch(), - scope: { - action: '' - }, - slots: { - submit: function (event, title) { - if (title) { - this.model.create(title); - } - }, - removeAllCompleted: function () { - this.model.removeCompleted(); - } - }, - onRenderStart: function () { - // (RutaJS) Default router is the History API, - // but for this app-spec we enable hashes - ruta - .setRouterType('hash') - .add('/?:action', this.applyFilter.bind(this)) - .notifyCurrent() - ; - }, - applyFilter: function (route, params) { - this.scope.action = params.action || ''; - } - }; - }); diff --git a/examples/atmajs/js/app.mask b/examples/atmajs/js/app.mask deleted file mode 100644 index a4d240c0b1..0000000000 --- a/examples/atmajs/js/app.mask +++ /dev/null @@ -1,42 +0,0 @@ -import * as AppController from 'app.js'; -import TodoInput from 'Controls/TodoInput'; -import TodoList from 'Todos/TodoList'; -import Filter from 'Controls/Filter'; - -define App extends AppController { - section .todoapp { - header { - h1 > 'todos' - - TodoInput .new-todo - autofocus - placeholder = 'What needs to be done?' - ; - } - - +if (status.count) { - section .main > - TodoList; - - footer .footer { - - span .todo-count { - strong > '~[bind: status.todoCount]' - span > ' item~[bind: status.todoCount != 1 ? "s"] left' - } - - Filter; - - +if (status.completedCount > 0) { - button .clear-completed x-tap = 'removeAllCompleted' > - 'Clear completed' - } - } - } - } - footer .info { - p { 'Double-click to edit a todo' } - p { 'Created by ' a href='http://github.com/tenbits' > 'Alex Kit' } - p { 'Part of ' a href='http://todomvc.com' > 'TodoMVC' } - } -} diff --git a/examples/atmajs/node_modules/atma-class/lib/class.js b/examples/atmajs/node_modules/atma-class/lib/class.js deleted file mode 100644 index 9140390af6..0000000000 --- a/examples/atmajs/node_modules/atma-class/lib/class.js +++ /dev/null @@ -1,3550 +0,0 @@ -// source /src/license.txt -/*! - * ClassJS v1.0.68 - * Part of the Atma.js Project - * http://atmajs.com/ - * - * MIT license - * http://opensource.org/licenses/MIT - * - * (c) 2012, 2015 Atma.js and other contributors - */ -// end:source /src/license.txt -// source /src/umd.js -(function(root, factory){ - "use strict"; - - var _global = typeof window === 'undefined' || window.navigator == null - ? global - : window - , - _exports - ; - - _exports = root || _global; - - function construct(){ - return factory(_global, _exports); - } - - - if (typeof define === 'function' && define.amd) { - return define(construct); - } - - // Browser OR Node - construct(); - - if (typeof module !== 'undefined') - module.exports = _exports.Class; - -}(this, function(global, exports){ - "use strict"; -// end:source /src/umd.js - - // source /src/vars.js - var _Array_slice = Array.prototype.slice, - _Array_sort = Array.prototype.sort, - - _cfg = { - ModelHost: null, // @default: Class.Model - }; - - - var str_CLASS_IDENTITY = '__$class__'; - // end:source /src/vars.js - - // source /src/util/is.js - var is_Function, - is_Object, - is_Array, - is_ArrayLike, - is_String, - is_Date, - is_notEmptyString, - is_rawObject, - is_NullOrGlobal; - (function(){ - - is_Function = function(x) { - return typeof x === 'function'; - }; - is_Object = function(x) { - return x != null - && typeof x === 'object'; - }; - is_Date = function(x){ - return x != null - && x.constructor.name === 'Date' - && x instanceof Date; - }; - is_Array = function(x) { - return x != null - && typeof x.length === 'number' - && typeof x.slice === 'function'; - }; - is_ArrayLike = is_Array; - - is_String = function(x) { - return typeof x === 'string'; - }; - - is_notEmptyString = function(x) { - return typeof x === 'string' - && x !== ''; - }; - - is_rawObject = function(obj) { - if (obj == null) - return false; - - if (typeof obj !== 'object') - return false; - - return obj.constructor === Object; - }; - is_NullOrGlobal = function(ctx){ - return ctx === void 0 || ctx === global; - }; - - }()); - - // end:source /src/util/is.js - // source /src/util/array.js - var arr_each, - arr_isArray, - arr_remove - ; - - (function(){ - - arr_each = function(array, callback) { - - if (arr_isArray(array)) { - for (var i = 0, imax = array.length; i < imax; i++){ - callback(array[i], i); - } - return; - } - - callback(array); - }; - - arr_isArray = function(array) { - return array != null - && typeof array === 'object' - && typeof array.length === 'number' - && typeof array.splice === 'function'; - }; - - arr_remove = function(array, fn){ - var imax = array.length, - i = -1; - while ( ++i < imax){ - if (fn(array[i]) === true) { - array.splice(i, 1); - i--; - imax--; - } - } - }; - - /* polyfill */ - if (typeof Array.isArray !== 'function') { - Array.isArray = function(array){ - if (array instanceof Array){ - return true; - } - - if (array == null || typeof array !== 'object') { - return false; - } - - - return array.length !== void 0 && typeof array.slice === 'function'; - }; - } - - }()); - - // end:source /src/util/array.js - // source /src/util/class.js - var class_register, - class_get, - - class_patch, - - class_stringify, - class_parse, - class_properties - - ; - - (function(){ - - class_register = function(namespace, class_){ - - obj_setProperty( - _cfg.ModelHost || Class.Model, - namespace, - class_ - ); - }; - - class_get = function(namespace){ - - return obj_getProperty( - _cfg.ModelHost || Class.Model, - namespace - ); - }; - - class_patch = function(mix, Proto){ - - var class_ = is_String(mix) - ? class_get(mix) - : mix - ; - - // if DEBUG - !is_Function(class_) - && console.error(' Not a Function', mix); - // endif - - Proto.Base = class_; - - class_ = Class(Proto); - - if (is_String(mix)) - class_register(mix, class_); - - return class_; - }; - - class_stringify = function(class_){ - - return JSON.stringify(class_, stringify); - }; - - class_parse = function(str){ - - return JSON.parse(str, parse); - }; - - class_properties = function(Ctor) { - return getProperties(Ctor); - }; - - // private - - function stringify(key, val) { - - if (val == null || typeof val !== 'object') - return val; - - var current = this, - obj = current[key] - ; - - if (obj[str_CLASS_IDENTITY] && obj.toJSON) { - - return stringifyMetaJSON(obj[str_CLASS_IDENTITY], val) - - ////val[str_CLASS_IDENTITY] = obj[str_CLASS_IDENTITY]; - ////return val; - } - - - return val; - } - - function stringifyMetaJSON(className, json){ - var out = {}; - out['json'] = json; - out[str_CLASS_IDENTITY] = className; - - return out; - } - - function parse(key, val) { - - var Ctor; - - if (val != null && typeof val === 'object' && val[str_CLASS_IDENTITY]) { - Ctor = Class(val[str_CLASS_IDENTITY]); - - if (typeof Ctor === 'function') { - - val = new Ctor(val.json); - } else { - - console.error(' Class was not registered', val[str_CLASS_IDENTITY]); - } - } - - return val; - } - - function getProperties(proto, out){ - if (typeof proto === 'function') - proto = proto.prototype; - - if (out == null) - out = {}; - - var type, - key, - val; - for(key in proto){ - val = proto[key]; - type = val == null - ? null - : typeof val - ; - - if (type === 'function') - continue; - - var c = key.charCodeAt(0); - if (c === 95 && key !== '_id') - // _ - continue; - - if (c >= 65 && c <= 90) - // A-Z - continue; - - if (type === 'object') { - var ctor = val.constructor, - ctor_name = ctor && ctor.name - ; - - if (ctor_name !== 'Object' && ctor_name && global[ctor_name] === ctor) { - // built-in objects - out[key] = ctor_name; - continue; - } - - out[key] = getProperties(val); - continue; - } - - out[key] = type; - } - - if (proto.__proto__) - getProperties(proto.__proto__, out); - - return out; - } - - }()); - // end:source /src/util/class.js - // source /src/util/proto.js - var class_inherit, - class_inheritStatics, - class_extendProtoObjects - ; - - (function(){ - - var PROTO = '__proto__'; - - var _toString = Object.prototype.toString, - _isArguments = function(args){ - return _toString.call(args) === '[object Arguments]'; - }; - - - class_inherit = PROTO in Object.prototype - ? inherit - : inherit_protoLess - ; - - class_inheritStatics = function(_class, mix){ - if (mix == null) - return; - - if (is_ArrayLike(mix)) { - var i = mix.length; - while ( --i > -1 ) { - class_inheritStatics(_class, mix[i]); - } - return; - } - - var Static; - if (is_Function(mix)) - Static = mix; - else if (is_Object(mix.Static)) - Static = mix.Static; - - - if (Static == null) - return; - - obj_extendDescriptorsDefaults(_class, Static); - }; - - - class_extendProtoObjects = function(proto, _base, _extends){ - var key, - protoValue; - - for (key in proto) { - protoValue = proto[key]; - - if (!is_rawObject(protoValue)) - continue; - - if (_base != null){ - if (is_rawObject(_base.prototype[key])) - obj_defaults(protoValue, _base.prototype[key]); - } - - if (_extends != null) { - arr_each( - _extends, - proto_extendDefaultsDelegate(protoValue, key) - ); - } - } - } - - - // PRIVATE - - function proto_extendDefaultsDelegate(target, key) { - return function(source){ - var proto = proto_getProto(source), - val = proto[key]; - if (is_rawObject(val)) { - obj_defaults(target, val); - } - } - } - - function proto_extend(proto, source) { - if (source == null) - return; - - if (typeof proto === 'function') - proto = proto.prototype; - - if (typeof source === 'function') - source = source.prototype; - - var key, val; - for (key in source) { - if (key === 'constructor') - continue; - - val = source[key]; - if (val != null) - proto[key] = val; - } - } - - function proto_override(super_, fn) { - var proxy; - - if (super_) { - proxy = function(mix){ - - var args = arguments.length === 1 && _isArguments(mix) - ? mix - : arguments - ; - - return fn_apply(super_, this, args); - } - } else{ - proxy = fn_doNothing; - } - - - return function(){ - this['super'] = proxy; - - return fn_apply(fn, this, arguments); - }; - } - - function inherit(_class, _base, _extends, original, _overrides, defaults) { - var prototype = original, - proto = original; - - prototype.constructor = _class.prototype.constructor; - - if (_extends != null) { - proto[PROTO] = {}; - - arr_each(_extends, function(x) { - proto_extend(proto[PROTO], x); - }); - proto = proto[PROTO]; - } - - if (_base != null) - proto[PROTO] = _base.prototype; - - for (var key in defaults) { - if (prototype[key] == null) - prototype[key] = defaults[key]; - } - for (var key in _overrides) { - prototype[key] = proto_override(prototype[key], _overrides[key]); - } - - - _class.prototype = prototype; - } - function inherit_Object_create(_class, _base, _extends, original, _overrides, defaults) { - - if (_base != null) { - _class.prototype = Object.create(_base.prototype); - obj_extendDescriptors(_class.prototype, original); - } else { - _class.prototype = Object.create(original); - } - - _class.prototype.constructor = _class; - - if (_extends != null) { - arr_each(_extends, function(x) { - obj_defaults(_class.prototype, x); - }); - } - - var proto = _class.prototype; - obj_defaults(proto, defaults); - for (var key in _overrides) { - proto[key] = proto_override(proto[key], _overrides[key]); - } - } - - - // browser that doesnt support __proto__ - function inherit_protoLess(_class, _base, _extends, original, _overrides, defaults) { - - if (_base != null) { - var tmp = function() {}; - - tmp.prototype = _base.prototype; - - _class.prototype = new tmp(); - _class.prototype.constructor = _class; - } - - if (_extends != null) { - arr_each(_extends, function(x) { - - delete x.constructor; - proto_extend(_class, x); - }); - } - - var prototype = _class.prototype; - obj_defaults(prototype, defaults); - - for (var key in _overrides) { - prototype[key] = proto_override(prototype[key], _overrides[key]); - } - proto_extend(_class, original); - } - - - function proto_getProto(mix) { - - return is_Function(mix) - ? mix.prototype - : mix - ; - } - - }()); - // end:source /src/util/proto.js - // source /src/util/json.js - // Create from Complex Class Instance a lightweight json object - - var json_key_SER = '__$serialization', - json_proto_toJSON, - json_proto_arrayToJSON - ; - - (function(){ - - json_proto_toJSON = function(serialization){ - - var object = this, - json = {}, - - key, val, s; - - if (serialization == null) - serialization = object[json_key_SER]; - - - var asKey; - - for(key in object){ - asKey = key; - - if (serialization != null && serialization.hasOwnProperty(key)) { - s = serialization[key]; - if (s != null && typeof s === 'object') { - - if (s.key) - asKey = s.key; - - if (s.hasOwnProperty('serialize')) { - if (s.serialize == null) - continue; - - json[asKey] = s.serialize(object[key]); - continue; - } - - } - } - - // _ (private) - if (key.charCodeAt(0) === 95) - continue; - - if ('Static' === key || 'Validate' === key) - continue; - - val = object[key]; - - if (val == null) - continue; - - if ('_id' === key) { - json[asKey] = val; - continue; - } - - switch (typeof val) { - case 'function': - continue; - case 'object': - - if (is_Date(val)) - break; - - var toJSON = val.toJSON; - if (toJSON == null) - break; - - json[asKey] = val.toJSON(); - continue; - } - - json[asKey] = val; - } - - // make mongodb's _id property not private - if (object._id != null) - json._id = object._id; - - return json; - }; - - json_proto_arrayToJSON = function() { - var array = this, - imax = array.length, - i = 0, - output = new Array(imax), - - x; - - for (; i < imax; i++) { - - x = array[i]; - - if (x != null && typeof x === 'object') { - - var toJSON = x.toJSON; - if (toJSON === json_proto_toJSON || toJSON === json_proto_arrayToJSON) { - - output[i] = x.toJSON(); - continue; - } - - if (toJSON == null) { - - output[i] = json_proto_toJSON.call(x); - continue; - } - } - - output[i] = x; - } - - return output; - }; - - }()); - // end:source /src/util/json.js - // source /src/util/object.js - - var obj_inherit, - obj_getProperty, - obj_setProperty, - obj_defaults, - obj_extend, - obj_extendDescriptors, - obj_extendDescriptorsDefaults, - obj_validate - ; - - (function(){ - - obj_inherit = function(target /* source, ..*/ ) { - if (is_Function(target)) - target = target.prototype; - - var i = 1, - imax = arguments.length, - source, key; - for (; i < imax; i++) { - - source = is_Function(arguments[i]) - ? arguments[i].prototype - : arguments[i] - ; - - for (key in source) { - - if ('Static' === key) { - if (target.Static != null) { - - for (key in source.Static) { - target.Static[key] = source.Static[key]; - } - - continue; - } - } - - - target[key] = source[key]; - - } - } - return target; - }; - - obj_getProperty = function(obj, property) { - var chain = property.split('.'), - imax = chain.length, - i = -1; - while ( ++i < imax ) { - if (obj == null) - return null; - - obj = obj[chain[i]]; - } - return obj; - }; - - obj_setProperty = function(obj, property, value) { - var chain = property.split('.'), - imax = chain.length, - i = -1, - key; - - while ( ++i < imax - 1) { - key = chain[i]; - - if (obj[key] == null) - obj[key] = {}; - - obj = obj[key]; - } - - obj[chain[i]] = value; - }; - - obj_defaults = function(target, defaults) { - for (var key in defaults) { - if (target[key] == null) - target[key] = defaults[key]; - } - return target; - }; - - obj_extend = function(target, source) { - if (target == null) - target = {}; - if (source == null) - return target; - - var val, - key; - for(key in source) { - val = source[key]; - if (val != null) - target[key] = val; - } - return target; - }; - - (function(){ - var getDescr = Object.getOwnPropertyDescriptor, - define = Object.defineProperty; - - if (getDescr == null) { - obj_extendDescriptors = obj_extend; - obj_extendDescriptorsDefaults = obj_defaults; - return; - } - obj_extendDescriptors = function(target, source){ - return _extendDescriptors(target, source, false); - }; - obj_extendDescriptorsDefaults = function(target, source){ - return _extendDescriptors(target, source, true); - }; - function _extendDescriptors (target, source, defaultsOnly) { - if (target == null) - return {}; - if (source == null) - return source; - - var descr, - key; - for(key in source){ - if (defaultsOnly === true && target[key] != null) - continue; - - descr = getDescr(source, key); - if (descr == null) { - obj_extendDescriptors(target, source['__proto__']); - continue; - } - if (descr.value !== void 0) { - target[key] = descr.value; - continue; - } - define(target, key, descr); - } - return target; - } - }()); - - - (function(){ - - obj_validate = function(a /*, b , ?isStrict, ?property, ... */) { - if (a == null) - return Err_Invalid('object'); - - _props = null; - _strict = false; - - var i = arguments.length, - validator, x; - while (--i > 0) { - x = arguments[i]; - switch(typeof x){ - case 'string': - if (_props == null) - _props = {}; - _props[x] = 1; - continue; - case 'boolean': - _strict = x; - continue; - case 'undefined': - continue; - default: - if (i !== 1) { - return Err_Invalid('validation argument at ' + i) - } - validator = x; - continue; - } - } - if (validator == null) - validator = a.Validate; - if (validator == null) - // if no validation object - accept any. - return null; - - return checkObject(a, validator, a); - }; - - // private - - // unexpect in `a` if not in `b` - var _strict = false, - // validate only specified properties - _props = null; - - // a** - payload - // b** - expect - // strict - - function checkObject(a, b, ctx) { - var error, - optional, - key, aVal, aKey; - for(key in b){ - - if (_props != null && a === ctx && _props.hasOwnProperty(key) === false) { - continue; - } - - switch(key.charCodeAt(0)) { - case 63: - // ? (optional) - aKey = key.substring(1); - aVal = a[aKey]; - //! accept falsy value - if (!aVal) - continue; - - error = checkProperty(aVal, b[key], ctx); - if (error != null) { - error.setInvalidProperty(aKey); - return error; - } - - continue; - case 45: - // - (unexpect) - aKey = key.substring(1); - if (typeof a === 'object' && aKey in a) - return Err_Unexpect(aKey); - - continue; - } - - aVal = a[key]; - if (aVal == null) - return Err_Expect(key); - - - error = checkProperty(aVal, b[key], ctx); - if (error != null) { - error.setInvalidProperty(key); - return error; - } - } - - if (_strict) { - for(key in a){ - if (key in b || '?' + key in b) - continue; - - return Err_Unexpect(key); - } - } - } - - function checkProperty(aVal, bVal, ctx) { - if (bVal == null) - return null; - - if (typeof bVal === 'function') { - var error = bVal.call(ctx, aVal); - if (error == null || error === true) - return null; - - if (error === false) - return Err_Invalid(); - - return Err_Custom(error); - } - - if (aVal == null) - return Err_Expect(); - - if (typeof bVal === 'string') { - var str = 'string', - num = 'number', - bool = 'boolean' - ; - - switch(bVal) { - case str: - return typeof aVal !== str || aVal.length === 0 - ? Err_Type(str) - : null; - case num: - return typeof aVal !== num - ? Err_Type(num) - : null; - case bool: - return typeof aVal !== bool - ? Err_Type(bool) - : null; - } - } - - if (bVal instanceof RegExp) { - return bVal.test(aVal) === false - ? Err_Invalid() - : null; - } - - if (Array.isArray(bVal)) { - if (Array.isArray(aVal) === false) - return Err_Type('array'); - - var i = -1, - imax = aVal.length, - error; - while ( ++i < imax ){ - error = checkObject(aVal[i], bVal[0]) - - if (error) { - error.setInvalidProperty(i); - return error; - } - } - - return null; - } - - if (typeof aVal !== typeof bVal) - return Err_Type(typeof aVal); - - - if (typeof aVal === 'object') - return checkObject(aVal, bVal); - - return null; - } - - var Err_Type, - Err_Expect, - Err_Unexpect, - Err_Custom, - Err_Invalid - ; - (function(){ - - Err_Type = create('type', - function TypeErr(expect) { - this.expect = expect; - }, - { - toString: function(){ - return 'Invalid type.' - + (this.expect - ? ' Expect: ' + this.expect - : '') - + (this.property - ? ' Property: ' + this.property - : '') - ; - } - } - ); - Err_Expect = create('expect', - function ExpectErr(property) { - this.property = property; - }, - { - toString: function(){ - return 'Property expected.' - + (this.property - ? '`' + this.property + '`' - : '') - ; - } - } - ); - Err_Unexpect = create('unexpect', - function UnexpectErr(property) { - this.property = property; - }, - { - toString: function(){ - return 'Unexpected property' - + (this.property - ? '`' + this.property + '`' - : '') - ; - } - } - ); - Err_Custom = create('custom', - function CustomErr(error) { - this.error = error - }, - { - toString: function(){ - return 'Custom validation: ' - + this.error - + (this.property - ? ' Property: ' + this.property - : '') - ; - } - } - ); - Err_Invalid = create('invalid', - function InvalidErr(expect) { - this.expect = expect - }, { - toString: function(){ - return 'Invalid.' - + (this.expect - ? ' Expect: ' + this.expect - : '') - + (this.property - ? ' Property: ' + this.property - : '') - ; - } - } - ); - - function create(type, Ctor, proto) { - proto.type = type; - proto.property = null; - proto.setInvalidProperty = setInvalidProperty; - - Ctor.prototype = proto; - return function(mix){ - return new Ctor(mix); - } - } - function setInvalidProperty(prop){ - if (this.property == null) { - this.property = prop; - return; - } - this.property = prop + '.' + this.property; - } - }()); /*< Errors */ - - }()); - }()); - // end:source /src/util/object.js - // source /src/util/patchObject.js - var obj_patch, - obj_patchValidate; - - (function(){ - - obj_patch = function(obj, patch){ - - for(var key in patch){ - - var patcher = patches[key]; - if (patcher) - patcher[fn_WALKER](obj, patch[key], patcher[fn_MODIFIER]); - else - console.error('Unknown or not implemented patcher', key); - } - return obj; - }; - - obj_patchValidate = function(patch){ - if (patch == null) - return 'Undefined'; - - var has = false; - for(var key in patch){ - has = true; - - if (patches[key] == null) - return 'Unsupported patcher: ' + key; - } - if (has === false) - return 'No data'; - - return null; - }; - - // === private - - function walk_mutator(obj, data, fn) { - for (var key in data) - fn(obj_getProperty(obj, key), data[key], key); - - } - - function walk_modifier(obj, data, fn){ - for(var key in data) - obj_setProperty( - obj, - key, - fn(obj_getProperty(obj, key), data[key], key) - ); - } - - function fn_IoC(){ - var fns = arguments; - return function(val, mix, prop){ - for (var i = 0, fn, imax = fns.length; i < imax; i++){ - fn = fns[i]; - if (fn(val, mix, prop) === false) - return; - } - } - } - - function arr_checkArray(val, mix, prop) { - if (arr_isArray(val) === false) { - // if DEBUG - console.warn(' property is not an array', prop); - // endif - return false; - } - } - - function arr_push(val, mix, prop){ - if (mix.hasOwnProperty('$each')) { - for (var i = 0, imax = mix.$each.length; i < imax; i++){ - val.push(mix.$each[i]); - } - return; - } - val.push(mix); - } - - function arr_pop(val, mix, prop){ - val[mix > 0 ? 'pop' : 'shift'](); - } - function arr_pull(val, mix, prop) { - arr_remove(val, function(item){ - return query_match(item, mix); - }); - } - - function val_inc(val, mix, key){ - return val + mix; - } - function val_set(val, mix, key){ - return mix; - } - function val_unset(){ - return void 0; - } - - function val_bit(val, mix){ - if (mix.or) - return val | mix.or; - - if (mix.and) - return val & mix.and; - - return val; - } - - var query_match; - (function(){ - /** @TODO improve object matcher */ - query_match = function(obj, mix){ - for (var key in mix) { - if (obj[key] !== mix[key]) - return false; - } - return true; - }; - }()); - - - var fn_WALKER = 0, - fn_MODIFIER = 1 - ; - - var patches = { - '$push': [walk_mutator, fn_IoC(arr_checkArray, arr_push)], - '$pop': [walk_mutator, fn_IoC(arr_checkArray, arr_pop)], - '$pull': [walk_mutator, fn_IoC(arr_checkArray, arr_pull)], - - '$inc': [walk_modifier, val_inc], - '$set': [walk_modifier, val_set], - '$unset': [walk_modifier, val_unset], - '$bit': [walk_modifier, val_unset], - }; - - - - }()); - // end:source /src/util/patchObject.js - // source /src/util/function.js - var fn_proxy, - fn_apply, - fn_createDelegate, - fn_doNothing, - fn_argsId - ; - - (function(){ - - fn_proxy = function(fn, ctx) { - return function() { - return fn_apply(fn, ctx, arguments); - }; - }; - - fn_apply = function(fn, ctx, _arguments){ - switch (_arguments.length) { - case 0: - return fn.call(ctx); - case 1: - return fn.call(ctx, _arguments[0]); - case 2: - return fn.call(ctx, - _arguments[0], - _arguments[1]); - case 3: - return fn.call(ctx, - _arguments[0], - _arguments[1], - _arguments[2]); - case 4: - return fn.call(ctx, - _arguments[0], - _arguments[1], - _arguments[2], - _arguments[3]); - case 5: - return fn.call(ctx, - _arguments[0], - _arguments[1], - _arguments[2], - _arguments[3], - _arguments[4] - ); - } - return fn.apply(ctx, _arguments); - }; - - fn_createDelegate = function(fn /* args */) { - var args = _Array_slice.call(arguments, 1); - return function(){ - if (arguments.length > 0) - args = args.concat(_Array_slice.call(arguments)); - - return fn_apply(fn, null, args); - }; - }; - - fn_doNothing = function(){}; - - fn_argsId = function(args, cache){ - if (args.length === 0) - return 0; - - var imax = cache.length, - i = -1; - while( ++i < imax ){ - if (args_match(cache[i], args)) - return i + 1; - } - cache.push(args); - return cache.length; - }; - - // === private - - function args_match(a, b){ - if (a.length !== b.length) - return false; - - var imax = a.length, - i = 0; - for (; i < imax; i++){ - if (a[i] !== b[i]) - return false; - } - return true; - } - }()); - - // end:source /src/util/function.js - - - // source /src/xhr/XHR.js - var XHR = {}; - - (function(){ - - // source promise.js - /* - * Copyright 2012-2013 (c) Pierre Duquesne - * Licensed under the New BSD License. - * https://github.com/stackp/promisejs - */ - - (function(exports) { - - var ct_URL_ENCODED = 'application/x-www-form-urlencoded', - ct_JSON = 'application/json'; - - var e_NO_XHR = 1, - e_TIMEOUT = 2, - e_PRAPAIR_DATA = 3; - - function Promise() { - this._callbacks = []; - } - - Promise.prototype.then = function(func, context) { - var p; - if (this._isdone) { - p = func.apply(context, this.result); - } else { - p = new Promise(); - this._callbacks.push(function () { - var res = func.apply(context, arguments); - if (res && typeof res.then === 'function') - res.then(p.done, p); - }); - } - return p; - }; - - Promise.prototype.done = function() { - this.result = arguments; - this._isdone = true; - for (var i = 0; i < this._callbacks.length; i++) { - this._callbacks[i].apply(null, arguments); - } - this._callbacks = []; - }; - - function join(promises) { - var p = new Promise(); - var results = []; - - if (!promises || !promises.length) { - p.done(results); - return p; - } - - var numdone = 0; - var total = promises.length; - - function notifier(i) { - return function() { - numdone += 1; - results[i] = Array.prototype.slice.call(arguments); - if (numdone === total) { - p.done(results); - } - }; - } - - for (var i = 0; i < total; i++) { - promises[i].then(notifier(i)); - } - - return p; - } - - function chain(funcs, args) { - var p = new Promise(); - if (funcs.length === 0) { - p.done.apply(p, args); - } else { - funcs[0].apply(null, args).then(function() { - funcs.splice(0, 1); - chain(funcs, arguments).then(function() { - p.done.apply(p, arguments); - }); - }); - } - return p; - } - - /* - * AJAX requests - */ - - function _encode(data) { - var result = ""; - if (typeof data === "string") { - result = data; - } else { - var e = encodeURIComponent; - for (var k in data) { - if (data.hasOwnProperty(k)) { - result += '&' + e(k) + '=' + e(data[k]); - } - } - } - return result; - } - - function new_xhr() { - var xhr; - if (window.XMLHttpRequest) { - xhr = new XMLHttpRequest(); - } else if (window.ActiveXObject) { - try { - xhr = new ActiveXObject("Msxml2.XMLHTTP"); - } catch (e) { - xhr = new ActiveXObject("Microsoft.XMLHTTP"); - } - } - return xhr; - } - - - function ajax(method, url, data, headers) { - var p = new Promise(), - contentType = headers && headers['Content-Type'] || promise.contentType; - - var xhr, - payload; - - - try { - xhr = new_xhr(); - } catch (e) { - p.done(e_NO_XHR, ""); - return p; - } - if (data) { - - if ('GET' === method) { - - url += '?' + _encode(data); - data = null; - } else { - - - switch (contentType) { - case ct_URL_ENCODED: - data = _encode(data); - break; - case ct_JSON: - try { - data = JSON.stringify(data); - } catch(error){ - - p.done(e_PRAPAIR_DATA, ''); - return p; - } - break; - default: - // @TODO notify not supported content type - // -> fallback to url encode - data = _encode(data); - break; - } - } - - } - - xhr.open(method, url); - - if (data) - xhr.setRequestHeader('Content-Type', contentType); - - for (var h in headers) { - if (headers.hasOwnProperty(h)) { - xhr.setRequestHeader(h, headers[h]); - } - } - - function onTimeout() { - xhr.abort(); - p.done(e_TIMEOUT, "", xhr); - } - - var timeout = promise.ajaxTimeout; - if (timeout) { - var tid = setTimeout(onTimeout, timeout); - } - - xhr.onreadystatechange = function() { - if (timeout) { - clearTimeout(tid); - } - if (xhr.readyState === 4) { - var err = (!xhr.status || - (xhr.status < 200 || xhr.status >= 300) && - xhr.status !== 304); - p.done(err, xhr.responseText, xhr); - } - }; - - xhr.send(data); - return p; - } - - function _ajaxer(method) { - return function(url, data, headers) { - return ajax(method, url, data, headers); - }; - } - - var promise = { - Promise: Promise, - join: join, - chain: chain, - ajax: ajax, - get: _ajaxer('GET'), - post: _ajaxer('POST'), - put: _ajaxer('PUT'), - del: _ajaxer('DELETE'), - patch: _ajaxer('PATCH'), - - /* Error codes */ - ENOXHR: e_NO_XHR, - ETIMEOUT: e_TIMEOUT, - E_PREPAIR_DATA: e_PRAPAIR_DATA, - /** - * Configuration parameter: time in milliseconds after which a - * pending AJAX request is considered unresponsive and is - * aborted. Useful to deal with bad connectivity (e.g. on a - * mobile network). A 0 value disables AJAX timeouts. - * - * Aborted requests resolve the promise with a ETIMEOUT error - * code. - */ - ajaxTimeout: 0, - - - contentType: ct_JSON - }; - - if (typeof define === 'function' && define.amd) { - /* AMD support */ - define(function() { - return promise; - }); - } else { - exports.promise = promise; - } - - })(this); - - // end:source promise.js - - }.call(XHR)); - - arr_each(['get'], function(key){ - XHR[key] = function(path, sender){ - - this - .promise[key](path) - .then(function(errored, response, xhr){ - - if (errored) { - sender.onError(errored, response, xhr); - return; - } - - sender.onSuccess(response); - }); - - }; - }); - - arr_each(['del', 'post', 'put', 'patch'], function(key){ - XHR[key] = function(path, data, cb){ - this - .promise[key](path, data) - .then(function(error, response, xhr){ - cb(error, response, xhr); - }); - }; - }); - - - // end:source /src/xhr/XHR.js - - // source /src/business/Serializable.js - var Serializable; - - (function(){ - - Serializable = function($serialization) { - - if (this === Class || this == null || this === global) { - - var Ctor = function(data){ - this[json_key_SER] = obj_extend(this[json_key_SER], $serialization); - - Serializable.call(this, data); - }; - - return Ctor; - } - - if ($serialization != null) { - - if (this.deserialize) - this.deserialize($serialization); - else - Serializable.deserialize(this, $serialization); - - } - - } - - Serializable.serialize = function(instance) { - - if (is_Function(instance.toJSON)) - return instance.toJSON(); - - - return json_proto_toJSON.call(instance, instance[json_key_SER]); - }; - - Serializable.deserialize = function(instance, json) { - - if (is_String(json)) { - try { - json = JSON.parse(json); - }catch(error){ - console.error('', json); - return instance; - } - } - - if (is_Array(json) && is_Function(instance.push)) { - instance.length = 0; - for (var i = 0, imax = json.length; i < imax; i++){ - instance.push(json[i]); - } - return instance; - } - - var props = instance[json_key_SER], - asKeys, asKey, - key, - val, - Mix; - - - if (props != null) { - var pname = '__desAsKeys'; - - asKeys = props[pname]; - if (asKeys == null) { - asKeys = props[pname] = {}; - for (key in props) { - if (key !== '__desAsKeys' && props[key].hasOwnProperty('key') === true) - asKeys[props[key].key] = key; - } - } - } - - for (key in json) { - - val = json[key]; - asKey = key; - - if (props != null) { - Mix = props.hasOwnProperty(key) - ? props[key] - : null - ; - if (asKeys[key]) { - asKey = asKeys[key]; - } - - if (Mix != null) { - if (is_Object(Mix)) - Mix = Mix.deserialize; - - if (is_String(Mix)) - Mix = class_get(Mix); - - if (is_Function(Mix)) { - instance[asKey] = val instanceof Mix - ? val - : new Mix(val) - ; - continue; - } - } - } - - instance[asKey] = val; - } - - return instance; - } - - }()); - - // end:source /src/business/Serializable.js - // source /src/business/Route.js - /** - * var route = new Route('/user/:id'); - * - * route.create({id:5}) // -> '/user/5' - */ - var Route = (function(){ - - - function Route(route){ - this.route = route_parse(route); - } - - Route.prototype = { - constructor: Route, - create: function(object){ - var path, query; - - path = route_interpolate(this.route.path, object, '/'); - if (path == null) { - return null; - } - - if (this.route.query) { - query = route_interpolate(this.route.query, object, '&'); - if (query == null) { - return null; - } - } - - return path + (query ? '?' + query : ''); - }, - - hasAliases: function(object){ - - var i = 0, - imax = this.route.path.length, - alias - ; - for (; i < imax; i++){ - alias = this.route.path[i].parts[1]; - - if (alias && object[alias] == null) { - return false; - } - } - - return true; - } - }; - - var regexp_pathByColon = /^([^:\?]*)(\??):(\??)([\w]+)$/, - regexp_pathByBraces = /^([^\{\?]*)(\{(\??)([\w]+)\})?([^\s]*)?$/; - - function parse_single(string) { - var match = regexp_pathByColon.exec(string); - - if (match) { - return { - optional: (match[2] || match[3]) === '?', - parts: [match[1], match[4]] - }; - } - - match = regexp_pathByBraces.exec(string); - - if (match) { - return { - optional: match[3] === '?', - parts: [match[1], match[4], match[5]] - }; - } - - console.error('Paths breadcrumbs should be matched by regexps'); - return { parts: [string] }; - } - - function parse_path(path, delimiter) { - var parts = path.split(delimiter); - - for (var i = 0, imax = parts.length; i < imax; i++){ - parts[i] = parse_single(parts[i]); - } - - return parts; - } - - function route_parse(route) { - var question = /[^\:\{]\?[^:]/.exec(route), - query = null; - - if (question){ - question = question.index + 1; - query = route.substring(question + 1); - route = route.substring(0, question); - } - - - return { - path: parse_path(route, '/'), - query: query == null ? null : parse_path(query, '&') - }; - } - - /** - route - [] */ - function route_interpolate(breadcrumbs, object, delimiter) { - var route = [], - key, - parts; - - - for (var i = 0, x, imax = breadcrumbs.length; i < imax; i++){ - x = breadcrumbs[i]; - parts = x.parts.slice(0); - - if (parts[1] == null) { - // is not an interpolated breadcrumb - route.push(parts[0]); - continue; - } - - key = parts[1]; - parts[1] = object[key]; - - if (parts[1] == null){ - - if (!x.optional) { - console.error('Object has no value, for not optional part - ', key); - return null; - } - - continue; - } - - route.push(parts.join('')); - } - - return route.join(delimiter); - } - - - return Route; - }()); - // end:source /src/business/Route.js - // source /src/business/Deferred.js - var Deferred; - - (function(){ - Deferred = function(){}; - Deferred.prototype = { - _isAsync: true, - - _done: null, - _fail: null, - _always: null, - _resolved: null, - _rejected: null, - - defer: function(){ - this._rejected = null; - this._resolved = null; - }, - - isResolved: function(){ - return this._resolved != null; - }, - isRejected: function(){ - return this._rejected != null; - }, - isBusy: function(){ - return this._resolved == null && this._rejected == null; - }, - - resolve: function() { - var done = this._done, - always = this._always - ; - - this._resolved = arguments; - - dfr_clearListeners(this); - arr_callOnce(done, this, arguments); - arr_callOnce(always, this, [ this ]); - - return this; - }, - - reject: function() { - var fail = this._fail, - always = this._always - ; - - this._rejected = arguments; - - dfr_clearListeners(this); - arr_callOnce(fail, this, arguments); - arr_callOnce(always, this, [ this ]); - - return this; - }, - - resolveDelegate: function(){ - return fn_proxy(this.resolve, this); - }, - - rejectDelegate: function(){ - return fn_proxy(this.reject, this); - }, - - then: function(filterSuccess, filterError){ - return this.pipe(filterSuccess, filterError); - }, - - done: function(callback) { - if (this._rejected != null) - return this; - return dfr_bind( - this, - this._resolved, - this._done || (this._done = []), - callback - ); - }, - - fail: function(callback) { - if (this._resolved != null) - return this; - return dfr_bind( - this, - this._rejected, - this._fail || (this._fail = []), - callback - ); - }, - - always: function(callback) { - return dfr_bind( - this, - this._rejected || this._resolved, - this._always || (this._always = []), - callback - ); - }, - - pipe: function(mix /* ..methods */){ - var dfr; - if (typeof mix === 'function') { - dfr = new Deferred; - var done_ = mix, - fail_ = arguments.length > 1 - ? arguments[1] - : null; - - this - .done(delegate(dfr, 'resolve', done_)) - .fail(delegate(dfr, 'reject', fail_)) - ; - return dfr; - } - - dfr = mix; - var imax = arguments.length, - done = imax === 1, - fail = imax === 1, - i = 0, x; - while( ++i < imax ){ - x = arguments[i]; - switch(x){ - case 'done': - done = true; - break; - case 'fail': - fail = true; - break; - default: - console.error('Unsupported pipe channel', arguments[i]) - break; - } - } - done && this.done(dfr.resolveDelegate()); - fail && this.fail(dfr.rejectDelegate()); - - function pipe(dfr, method) { - return function(){ - dfr[method].apply(dfr, arguments); - }; - } - function delegate(dfr, name, fn) { - - return function(){ - if (fn != null) { - var override = fn.apply(this, arguments); - if (override != null) { - if (isDeferred(override) === true) { - override.pipe(dfr); - return; - } - - dfr[name](override) - return; - } - } - dfr[name].apply(dfr, arguments); - }; - } - - return this; - }, - pipeCallback: function(){ - var self = this; - return function(error){ - if (error != null) { - self.reject(error); - return; - } - var args = _Array_slice.call(arguments, 1); - fn_apply(self.resolve, self, args); - }; - } - }; - - Deferred.run = function(fn, ctx){ - var dfr = new Deferred(); - if (ctx == null) - ctx = dfr; - - fn.call(ctx, dfr.resolveDelegate(), dfr.rejectDelegate(), dfr); - return dfr; - }; - /** - * Create function wich gets deferred object with first argument. - * Created function returns always that deferred object - */ - Deferred.create = function(fn){ - return function(){ - var args = _Array_slice.call(arguments), - dfr = new Deferred; - args.unshift(dfr); - - fn_apply(fn, this, args); - return dfr; - }; - }; - /** - * Similar as `create` it will also cache the deferred object, - * sothat the target function is called once pro specific arguments - * - * var fn = Deferred.memoize((dfr, name) => dfr.resolve(name)); - * fn('foo'); - * fn('baz'); - * fn('foo'); - * - is called only once for `foo`, and once for `baz` - */ - Deferred.memoize = function(fn){ - var dfrs = {}, args_store = []; - return function(){ - var args = _Array_slice.call(arguments), - id = fn_argsId(args_store, args); - if (dfrs[id] != null) - return dfrs[id]; - - var dfr = dfrs[id] = new Deferred; - args.unshift(dfr); - - fn_apply(fn, this, args); - return dfr; - }; - }; - - // PRIVATE - - function dfr_bind(dfr, arguments_, listeners, callback){ - if (callback == null) - return dfr; - - if ( arguments_ != null) - fn_apply(callback, dfr, arguments_); - else - listeners.push(callback); - - return dfr; - } - - function dfr_clearListeners(dfr) { - dfr._done = null; - dfr._fail = null; - dfr._always = null; - } - - function arr_callOnce(arr, ctx, args) { - if (arr == null) - return; - - var imax = arr.length, - i = -1, - fn; - while ( ++i < imax ) { - fn = arr[i]; - - if (fn) - fn_apply(fn, ctx, args); - } - arr.length = 0; - } - function isDeferred(x){ - if (x == null || typeof x !== 'object') - return false; - - if (x instanceof Deferred) - return true; - - return typeof x.done === 'function' - && typeof x.fail === 'function' - ; - } - - }()); - // end:source /src/business/Deferred.js - // source /src/business/EventEmitter.js - var EventEmitter; - (function(){ - - EventEmitter = function() { - this._listeners = {}; - }; - EventEmitter.prototype = { - constructor: EventEmitter, - on: function(event, callback) { - if (callback != null){ - (this._listeners[event] || (this._listeners[event] = [])).push(callback); - } - - return this; - }, - once: function(event, callback){ - if (callback != null) { - callback._once = true; - (this._listeners[event] || (this._listeners[event] = [])).push(callback); - } - - return this; - }, - - pipe: function(event){ - var that = this, - args; - return function(){ - args = _Array_slice.call(arguments); - args.unshift(event); - - fn_apply(that.trigger, that, args); - }; - }, - - emit: event_trigger, - trigger: event_trigger, - - off: function(event, callback) { - var listeners = this._listeners[event]; - if (listeners == null) - return this; - - if (arguments.length === 1) { - listeners.length = 0; - return this; - } - - var imax = listeners.length, - i = -1; - while (++i < imax) { - - if (listeners[i] === callback) { - listeners.splice(i, 1); - i--; - imax--; - } - - } - return this; - } - }; - - function event_trigger() { - var args = _Array_slice.call(arguments), - event = args.shift(), - fns = this._listeners[event], - fn, imax, i = 0; - - if (fns == null) - return this; - - for (imax = fns.length; i < imax; i++) { - fn = fns[i]; - fn_apply(fn, this, args); - - if (fn._once === true){ - fns.splice(i, 1); - i--; - imax--; - } - } - - return this; - } - }()); - - // end:source /src/business/EventEmitter.js - - - - - // source /src/Class.js - var Class = function(mix) { - - var namespace, - data; - - if (is_String(mix)) { - namespace = mix; - - if (arguments.length === 1) - return class_get(mix); - - - data = arguments[1]; - data[str_CLASS_IDENTITY] = namespace; - } else { - data = mix; - } - - - var _base = data.Base, - _extends = data.Extends, - _static = data.Static, - _construct = data.Construct, - _class = null, - _store = data.Store, - _self = data.Self, - _overrides = data.Override, - - key; - - if (_base != null) - delete data.Base; - - if (_extends != null) - delete data.Extends; - - if (_static != null) - delete data.Static; - - if (_self != null) - delete data.Self; - - if (_construct != null) - delete data.Construct; - - - if (_store != null) { - - if (_extends == null) { - _extends = _store; - } else if (is_Array(_extends)) { - _extends.unshift(_store) - } else { - _extends = [_store, _extends]; - } - - delete data.Store; - } - - if (_overrides != null) - delete data.Override; - - if (_base == null && _extends == null && _self == null) { - - if (data.toJSON === void 0) - data.toJSON = json_proto_toJSON; - - _class = _construct == null - ? function() {} - : _construct - ; - - data.constructor = _class.prototype.constructor; - - if (_static != null) { - obj_extendDescriptors(_class, _static); - } - - _class.prototype = data; - - if (namespace != null) - class_register(namespace, _class); - - return _class; - } - - _class = function() { - - //// consider to remove - ////if (this instanceof _class === false) - //// return new (_class.bind.apply(_class, [null].concat(_Array_slice.call(arguments)))); - - - if (_extends != null) { - var isarray = _extends instanceof Array, - - imax = isarray ? _extends.length : 1, - i = 0, - x = null; - for (; i < imax; i++) { - x = isarray - ? _extends[i] - : _extends - ; - if (typeof x === 'function') { - fn_apply(x, this, arguments); - } - } - } - - if (_base != null) { - fn_apply(_base, this, arguments); - } - - if (_self != null && is_NullOrGlobal(this) === false) { - - for (var key in _self) { - this[key] = fn_proxy(_self[key], this); - } - } - - if (_construct != null) { - var r = fn_apply(_construct, this, arguments); - if (r != null) { - return r; - } - } - - this['super'] = null; - - return this; - }; - - if (namespace != null) - class_register(namespace, _class); - - if (_static != null) { - obj_extendDescriptors(_class, _static); - } - - if (_base != null) - class_inheritStatics(_class, _base); - - if (_extends != null) - class_inheritStatics(_class, _extends); - - class_extendProtoObjects(data, _base, _extends); - - class_inherit(_class, _base, _extends, data, _overrides, { - toJSON: json_proto_toJSON - }); - - data = null; - _static = null; - return _class; - }; - // end:source /src/Class.js - - // source /src/business/Await.js - var Await; - - (function(){ - - Await = Class({ - Extends: Deferred.prototype, - - _wait: 0, - _timeout: null, - _result: null, - _resolved: [], - - Construct: function(/* promises */){ - var imax = arguments.length, - i = -1, - dfr - ; - while ( ++i < imax ){ - dfr = arguments[i]; - if (dfr != null && typeof dfr.done === 'function') - await_deferredDelegate(this, null, dfr); - } - }, - - delegate: function(name, errorable) { - return await_createDelegate(this, name, errorable); - }, - - deferred: function(name) { - - return await_deferredDelegate( - this, - name, - new Deferred); - }, - - Static: { - - TIMEOUT: 2000 - } - }); - - function await_deferredDelegate(await, name, dfr){ - var delegate = await_createDelegate(await, name, true), - args - ; - return dfr - .done(function(){ - args = _Array_slice.call(arguments); - args.unshift(null); - - delegate.apply(null, args); - }) - .fail(function(error){ - - delegate(error); - }) - ; - } - - function await_createDelegate(await, name, errorable){ - if (errorable == null) - errorable = true; - - if (await._timeout) - clearTimeout(await._timeout); - - await.defer(); - await._wait++; - - if (name){ - if (!await._result) - await._result = {}; - - if (name in await._result) - console.warn('', name, 'already awaiting'); - - await._result[name] = null; - } - - var delegate = fn_createDelegate(await_listener, await, name, errorable) - ; - - await._timeout = setTimeout(delegate, Await.TIMEOUT); - - return delegate; - } - - function await_listener(await, name, errorable /* .. args */ ) { - - if (arguments.length === 0) { - // timeout - await._wait = 0; - await.reject('408: Timeout'); - return; - } - - if (await._wait === 0) - return; - - var result = await._result; - - if (name) { - var args = _Array_slice.call(arguments, 3); - - result[name] = { - error: errorable ? args.shift() : null, - arguments: args - }; - } else if (errorable && arguments[3] != null) { - - if (result == null) - result = await._result = {}; - - result.__error = arguments[3]; - } - - if (--await._wait === 0) { - clearTimeout(await._timeout); - - var error = result && result.__error - ; - var val, - key; - - if (error == null) { - for(key in result){ - - val = result[key]; - error = val && val.error; - - if (error) - break; - } - } - - if (error) { - await.reject(error, result); - return; - } - - await.resolve(result); - } - } - - }()); - // end:source /src/business/Await.js - - // source /src/store/Store.js - var StoreProto = { - - - // Abstract - - fetch: null, - save: null, - del: null, - onSuccess: null, - onError: null, - - Static: { - fetch: function(data){ - return new this().fetch(data); - } - } - }; - // end:source /src/store/Store.js - // source /src/store/events.js - var storageEvents_onBefore, - storageEvents_onAfter, - storageEvents_remove, - storageEvents_overridenDefer - ; - - (function(){ - - - var event_START = 'start', - event_SUCCESS = 'fulfilled', - event_FAIL = 'rejected'; - - var events_ = new EventEmitter, - hasBeforeListeners_, - hasAfterListeners_ - ; - - storageEvents_onBefore = function(callback){ - events_.on(event_START, callback); - hasBeforeListeners_ = true; - }; - - storageEvents_onAfter = function(onSuccess, onFailure){ - events_ - .on(event_SUCCESS, onSuccess) - .on(event_FAIL, onFailure) - ; - hasAfterListeners_ = true; - }; - - storageEvents_remove = function(callback){ - events_ - .off(event_SUCCESS, callback) - .off(event_FAIL, callback) - .off(event_START, callback) - ; - }; - - storageEvents_overridenDefer = function(type){ - - Deferred.prototype.defer.call(this); - - if (hasBeforeListeners_) - emit([event_START, this, type]); - - if (hasAfterListeners_) - this.always(listenerDelegate(this, type)); - - return this; - }; - - // PRIVATE - - function listenerDelegate(sender, type) { - return function(){ - var isSuccess = sender._rejected == null, - arguments_ = isSuccess - ? sender._resolved - : sender._rejected - , - event = isSuccess - ? event_SUCCESS - : event_FAIL - ; - emit([event, sender, type].concat(arguments_)); - }; - } - - - function emit(arguments_/* [ event, sender, .. ]*/){ - events_.trigger.apply(events_, arguments_); - } - - - }()); - // end:source /src/store/events.js - // source /src/store/Remote.js - Class.Remote = (function(){ - - var str_CONTENT_TYPE = 'content-type', - str_JSON = 'json' - ; - - var XHRRemote = function(route){ - this._route = new Route(route); - }; - - obj_inherit(XHRRemote, StoreProto, Serializable, Deferred, { - - defer: storageEvents_overridenDefer, - - serialize: function(){ - - return is_Array(this) - ? json_proto_arrayToJSON.call(this) - : json_proto_toJSON.call(this) - ; - }, - - deserialize: function(json){ - return Serializable.deserialize(this, json); - }, - - fetch: function(data){ - this.defer('fetch'); - - XHR.get(this._route.create(data || this), this); - return this; - }, - - save: function(callback){ - this.defer('save'); - - var json = this.serialize(), - path = this._route.create(this), - method = this._route.hasAliases(this) - ? 'put' - : 'post' - ; - - XHR[method](path, json, resolveDelegate(this, callback, 'save')); - return this; - }, - - patch: function(json){ - this.defer('patch'); - - obj_patch(this, json); - - XHR.patch( - this._route.create(this), - json, - resolveDelegate(this) - ); - return this; - }, - - del: function(callback){ - this.defer('del'); - - var json = this.serialize(), - path = this._route.create(this) - ; - - XHR.del(path, json, resolveDelegate(this, callback)); - return this; - }, - - onSuccess: function(response){ - parseFetched(this, response); - }, - onError: function(errored, response, xhr){ - reject(this, response, xhr); - } - - - }); - - function parseFetched(self, response){ - var json; - - try { - json = JSON.parse(response); - } catch(error) { - - reject(self, error); - return; - } - - - self.deserialize(json); - self.resolve(self); - } - - function reject(self, response, xhr){ - var obj; - if (typeof response === 'string' && is_JsonResponse(xhr)) { - try { - obj = JSON.parse(response); - } catch (error) { - obj = error; - } - } - - self.reject(obj || response); - } - - function is_JsonResponse(xhr){ - var header = xhr.getResponseHeader(str_CONTENT_TYPE); - - return header != null - && header.toLowerCase().indexOf(str_JSON) !== -1; - } - - function resolveDelegate(self, callback, action){ - - return function(error, response, xhr){ - - if (is_JsonResponse(xhr)) { - try { - response = JSON.parse(response); - } catch(error){ - console.error(' invalid json response', response); - - return reject(self, error, xhr); - } - } - - // @obsolete -> use deferred - if (callback) - callback(error, response); - - if (error) - return reject(self, response, xhr); - - if ('save' === action && is_Object(response)) { - - if (is_Array(self)) { - - var imax = self.length, - jmax = response.length, - i = -1 - ; - - while ( ++i < imax && i < jmax){ - - Serializable.deserialize(self[i], response[i]); - } - - } else { - self.deserialize(response); - } - - return self.resolve(self); - } - - self.resolve(response); - }; - } - - function Remote(route){ - return new XHRRemote(route); - } - - Remote.onBefore = storageEvents_onBefore; - Remote.onAfter = storageEvents_onAfter; - - arr_each(['get', 'post', 'put', 'delete'], function(method){ - - Remote[method] = function(url, obj){ - - var json = obj; - if (obj.serialize != null) - json = obj.serialize(); - - if (json == null && obj.toJSON) - json = obj.toJSON(); - - var dfr = new Deferred(); - XHR[method](url, json, resolveDelegate(dfr)); - - return dfr; - }; - }); - - return Remote; - }()); - // end:source /src/store/Remote.js - // source /src/store/LocalStore.js - Class.LocalStore = (function(){ - - var LocalStore = function(route){ - this._route = new Route(route); - }; - - obj_inherit(LocalStore, StoreProto, Serializable, Deferred, { - - serialize: function(){ - - var json = is_Array(this) - ? json_proto_arrayToJSON.call(this) - : json_proto_toJSON.call(this) - ; - - return JSON.stringify(json); - }, - deserialize: function(json){ - return Serializable.deserialize(this, json); - }, - fetch: function(data){ - - var path = this._route.create(data || this), - object = localStorage.getItem(path); - - if (object == null) { - return this.resolve(this); - } - - if (is_String(object)){ - try { - object = JSON.parse(object); - } catch(e) { - return this.reject(e); - } - } - - this.deserialize(object); - return this.resolve(this); - }, - - save: function(callback){ - var path = this._route.create(this), - store = this.serialize(); - - localStorage.setItem(path, store); - callback && callback(); - return this.resolve(this); - }, - - del: function(mix){ - - if (mix == null && arguments.length !== 0) { - return this.reject(' - selector is specified, but is undefined'); - } - - // Single - if (arr_isArray(this) === false) { - store_del(this._route, mix || this); - return this.resolve(); - } - - // Collection - if (mix == null) { - - for (var i = 0, imax = this.length; i < imax; i++){ - this[i] = null; - } - this.length = 0; - - store_del(this._route, this); - return this.resolve(); - } - - var array = this.remove(mix); - if (array.length === 0) { - // was nothing removed - return this.resolve(); - } - - return this.save(); - }, - - onError: function(error){ - this.reject({ - error: error - }); - } - - - }); - - function store_del(route, data){ - var path = route.create(data); - - localStorage.removeItem(path); - } - - var Constructor = function(route){ - - return new LocalStore(route); - }; - - Constructor.prototype = LocalStore.prototype; - - - return Constructor; - - }()); - // end:source /src/store/LocalStore.js - - - // source /src/Class.Static.js - /** - * Can be used in Constructor for binding class's functions to class's context - * for using, for example, as callbacks - * - * @obsolete - use 'Self' property instead - */ - Class.bind = function(cntx) { - var arr = arguments, - i = 1, - length = arguments.length, - key; - - for (; i < length; i++) { - key = arr[i]; - cntx[key] = cntx[key].bind(cntx); - } - return cntx; - }; - - Class.cfg = function(mix, value){ - - if (is_String(mix)) { - - if (arguments.length === 1) - return _cfg[mix]; - - _cfg[mix] = value; - return; - } - - if (is_Object(mix)) { - - for(var key in mix){ - - Class.cfg(key, mix[key]); - } - } - }; - - - - Class.Model = {}; - Class.Serializable = Serializable; - Class.Deferred = Deferred; - Class.EventEmitter = EventEmitter; - Class.Await = Await; - Class.validate = obj_validate; - - Class.stringify = class_stringify; - Class.parse = class_parse; - Class.patch = class_patch; - Class.properties = class_properties; - // end:source /src/Class.Static.js - - // source /src/collection/Collection.js - Class.Collection = (function(){ - - // source ArrayProto.js - - var ArrayProto = (function(){ - - function check(x, mix) { - if (mix == null) - return false; - - if (typeof mix === 'function') - return mix(x); - - if (typeof mix === 'object'){ - - if (x.constructor === mix.constructor && x.constructor !== Object) { - return x === mix; - } - - var value, matcher; - for (var key in mix) { - - value = x[key]; - matcher = mix[key]; - - if (typeof matcher === 'string') { - var c = matcher[0], - index = 1; - - if ('<' === c || '>' === c){ - - if ('=' === matcher[1]){ - c +='='; - index++; - } - - matcher = matcher.substring(index); - - switch (c) { - case '<': - if (value >= matcher) - return false; - continue; - case '<=': - if (value > matcher) - return false; - continue; - case '>': - if (value <= matcher) - return false; - continue; - case '>=': - if (value < matcher) - return false; - continue; - } - } - } - - /*jshint eqeqeq: false*/ - if (value != matcher) { - return false; - } - /*jshint eqeqeq: true*/ - - } - return true; - } - - console.warn('No valid matcher', mix); - return false; - } - - var ArrayProto = { - length: 0, - push: function(/*mix*/) { - var imax = arguments.length, - i = -1; - while ( ++i < imax ) { - - this[this.length++] = create(this._ctor, arguments[i]); - } - - return this; - }, - pop: function() { - var instance = this[--this.length]; - - this[this.length] = null; - return instance; - }, - shift: function(){ - if (this.length === 0) - return null; - - - var first = this[0], - imax = this.length - 1, - i = 0; - - for (; i < imax; i++){ - this[i] = this[i + 1]; - } - - this[imax] = null; - this.length--; - - return first; - }, - unshift: function(mix){ - this.length++; - - var imax = this.length; - - while (--imax) { - this[imax] = this[imax - 1]; - } - - this[0] = create(this._ctor, mix); - return this; - }, - - splice: function(index, count /* args */){ - - var length = this.length; - var i, imax, y; - - // clear range after length until index - if (index >= length) { - count = 0; - for (i = length, imax = index; i < imax; i++){ - this[i] = void 0; - } - } - - var rm_count = count, - rm_start = index, - rm_end = index + rm_count, - add_count = arguments.length - 2, - - new_length = length + add_count - rm_count; - - - // move block - - var block_start = rm_end, - block_end = length, - block_shift = new_length - length; - - if (0 < block_shift) { - // move forward - - i = block_end; - while (--i >= block_start) { - - this[i + block_shift] = this[i]; - - } - - } - - if (0 > block_shift) { - // move backwards - - i = block_start; - while (i < block_end) { - this[i + block_shift] = this[i]; - i++; - } - } - - // insert - - i = rm_start; - y = 2; - for (; y < arguments.length; y) { - this[i++] = create(this._ctor, arguments[y++]); - } - - - this.length = new_length; - return this; - }, - - slice: function(){ - return fn_apply(_Array_slice, this, arguments); - }, - - sort: function(fn){ - _Array_sort.call(this, fn); - return this; - }, - - reverse: function(){ - var array = _Array_slice.call(this), - imax = this.length, - i = -1 - ; - while( ++i < imax) { - this[i] = array[imax - i - 1]; - } - return this; - }, - - toString: function(){ - return _Array_slice.call(this, 0).toString() - }, - - each: forEach, - forEach: forEach, - - - where: function(mix){ - - var collection = new this.constructor(); - - for (var i = 0, x, imax = this.length; i < imax; i++){ - x = this[i]; - - if (check(x, mix)) { - collection[collection.length++] = x; - } - } - - return collection; - }, - remove: function(mix){ - var index = -1, - array = []; - for (var i = 0, imax = this.length; i < imax; i++){ - - if (check(this[i], mix)) { - array.push(this[i]); - continue; - } - - this[++index] = this[i]; - } - for (i = ++index; i < imax; i++) { - this[i] = null; - } - - this.length = index; - return array; - }, - first: function(mix){ - if (mix == null) - return this[0]; - - var i = this.indexOf(mix); - return i !== -1 - ? this[i] - : null; - - }, - last: function(mix){ - if (mix == null) - return this[this.length - 1]; - - var i = this.lastIndexOf(mix); - return i !== -1 - ? this[i] - : null; - }, - indexOf: function(mix, index){ - if (mix == null) - return -1; - - if (index != null) { - if (index < 0) - index = 0; - - if (index >= this.length) - return -1; - - } - else{ - index = 0; - } - - - var imax = this.length; - for(; index < imax; index++) { - if (check(this[index], mix)) - return index; - } - return -1; - }, - lastIndexOf: function(mix, index){ - if (mix == null) - return -1; - - if (index != null) { - if (index >= this.length) - index = this.length - 1; - - if (index < 0) - return -1; - } - else { - index = this.length - 1; - } - - - for (; index > -1; index--) { - if (check(this[index], mix)) - return index; - } - - return -1; - }, - - map: function(fn){ - - var arr = [], - imax = this.length, - i = -1; - while( ++i < imax ){ - arr[i] = fn(this[i]); - } - return arr; - }, - - filter: function(fn, ctx){ - var coll = new this.constructor(), - imax = this.length, - i = -1; - while ( ++i < imax ){ - if (fn.call(ctx || this, this[i])) { - coll.push(this[i]); - } - } - return coll; - } - }; - - // ES6 iterator - if (typeof Symbol !== 'undefined' && Symbol.iterator) { - ArrayProto[Symbol.iterator] = function(){ - var arr = this, - i = -1; - return { - next: function(){ - return { - value: arr[++i], - done: i > arr.length - 1 - }; - }, - hasNext: function(){ - return i < arr.length; - } - } - }; - } - - function forEach(fn, ctx){ - var imax = this.length, - i = -1 - ; - while( ++i < imax ) { - fn.call(ctx || this, this[i], i); - } - return this; - } - - - return ArrayProto; - }()); - - // end:source ArrayProto.js - - function create(Constructor, mix) { - - if (mix instanceof Constructor) - return mix; - - return new Constructor(mix); - } - - var CollectionProto = { - toArray: function(){ - var array = new Array(this.length); - for (var i = 0, imax = this.length; i < imax; i++){ - array[i] = this[i]; - } - - return array; - }, - - toJSON: json_proto_arrayToJSON - }; - - function Collection(/* (ClassName, Child, Proto) (Child, Proto) */) { - var length = arguments.length, - Proto = arguments[length - 1], - Child = arguments[length - 2], - - className - ; - - if (length > 2) - className = arguments[0]; - - - Proto._ctor = Child; - obj_inherit(Proto, CollectionProto, ArrayProto); - - return className == null - ? Class(Proto) - : Class(className, Proto) - ; - } - - - return Collection; - }()); - // end:source /src/collection/Collection.js - - // source /src/fn/fn.js - (function(){ - - // source memoize.js - var fn_memoize, - fn_memoizeAsync; - - (function(){ - fn_memoize = function(fn) { - var _cache = {}, - _args = []; - return function() { - var id = fn_argsId(arguments, _args); - - return _cache[id] == null - ? (_cache[id] = fn_apply(fn, this, arguments)) - : _cache[id]; - }; - }; - - fn_memoizeAsync = function(fn) { - var _cache = {}, - _cacheCbs = {}, - _args = []; - - return function(){ - - var args = _Array_slice.call(arguments), - callback = args.pop(); - - var id = fn_argsId(args, _args); - - if (_cache[id]){ - fn_apply(callback, this, _cache[id]) - return; - } - - if (_cacheCbs[id]) { - _cacheCbs[id].push(callback); - return; - } - - _cacheCbs[id] = [callback]; - - args = _Array_slice.call(args); - args.push(fn_resolveDelegate(_cache, _cacheCbs, id)); - - fn_apply(fn, this, args); - }; - }; - - // === private - function fn_resolveDelegate(cache, cbs, id) { - return function(){ - cache[id] = arguments; - - for (var i = 0, x, imax = cbs[id].length; i < imax; i++){ - x = cbs[id][i]; - fn_apply(x, this, arguments); - } - - cbs[i] = null; - cache = null; - cbs = null; - }; - } - }()); - - - // end:source memoize.js - - Class.Fn = { - memoize: fn_memoize, - memoizeAsync: fn_memoizeAsync - }; - - }()); - // end:source /src/fn/fn.js - - exports.Class = Class; - -})); \ No newline at end of file diff --git a/examples/atmajs/node_modules/includejs/lib/include.js b/examples/atmajs/node_modules/includejs/lib/include.js deleted file mode 100644 index f704e74c14..0000000000 --- a/examples/atmajs/node_modules/includejs/lib/include.js +++ /dev/null @@ -1,2071 +0,0 @@ - -// source ../src/head.js -(function (root, factory) { - 'use strict'; - - var _global, _exports; - - if (typeof exports !== 'undefined' && (root === exports || root == null)){ - // raw nodejs module - _global = _exports = global; - } - - if (_global == null) { - _global = typeof window === 'undefined' ? global : window; - } - if (_exports == null) { - _exports = root || _global; - } - - if (typeof include !== 'undefined' && typeof include.js === 'function') { - // allow only one `include` per application - _exports.include = include; - _exports.includeLib = include.Lib || _global.includeLib; - return; - } - - factory(_global, _exports, _global.document); - -}(this, function (global, exports, document) { - 'use strict'; - -// end:source ../src/head.js - - // source ../src/1.scope-vars.js - - /** - * .cfg - * : path := root path. @default current working path, im browser window.location; - * : eval := in node.js this conf. is forced - * : lockedToFolder := makes current url as root path - * Example "/script/main.js" within this window.location "{domain}/apps/1.html" - * will become "{domain}/apps/script/main.js" instead of "{domain}/script/main.js" - */ - - var bin = { - js: {}, - css: {}, - load: {} - }, - isWeb = !! (global.location && global.location.protocol && /^https?:/.test(global.location.protocol)), - reg_subFolder = /([^\/]+\/)?\.\.\//, - reg_hasProtocol = /^(file|https?):/i, - cfg = { - path: null, - loader: null, - version: null, - lockedToFolder: null, - sync: null, - eval: document == null - }, - handler = {}, - hasOwnProp = {}.hasOwnProperty, - emptyResponse = { - load: {} - }, - __array_slice = Array.prototype.slice, - - XMLHttpRequest = global.XMLHttpRequest; - - - // end:source ../src/1.scope-vars.js - // source ../src/2.Helper.js - var Helper = { /** TODO: improve url handling*/ - - reportError: function(e) { - console.error('IncludeJS Error:', e, e.message, e.url); - typeof handler.onerror === 'function' && handler.onerror(e); - } - - }, - - XHR = function(resource, callback) { - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function() { - xhr.readyState === 4 && callback && callback(resource, xhr.responseText); - }; - - xhr.open('GET', typeof resource === 'object' ? resource.url : resource, true); - xhr.send(); - }; - - // end:source ../src/2.Helper.js - - // source ../src/utils/fn.js - function fn_proxy(fn, ctx) { - - return function(){ - fn.apply(ctx, arguments); - }; - - } - - function fn_doNothing(fn) { - typeof fn === 'function' && fn(); - } - // end:source ../src/utils/fn.js - // source ../src/utils/object.js - var obj_inherit, - obj_getProperty, - obj_setProperty - ; - - (function(){ - - obj_inherit = function(target /* source, ..*/ ) { - if (typeof target === 'function') { - target = target.prototype; - } - var i = 1, - imax = arguments.length, - source, key; - for (; i < imax; i++) { - - source = typeof arguments[i] === 'function' - ? arguments[i].prototype - : arguments[i]; - - for (key in source) { - target[key] = source[key]; - } - } - return target; - }; - - obj_getProperty = function(obj, property) { - var chain = property.split('.'), - length = chain.length, - i = 0; - for (; i < length; i++) { - if (obj == null) - return null; - - obj = obj[chain[i]]; - } - return obj; - }; - - obj_setProperty = function(obj, property, value) { - var chain = property.split('.'), - imax = chain.length - 1, - i = -1, - key; - while ( ++i < imax ) { - key = chain[i]; - if (obj[key] == null) - obj[key] = {}; - - obj = obj[key]; - } - obj[chain[i]] = value; - }; - - }()); - - // end:source ../src/utils/object.js - // source ../src/utils/array.js - function arr_invoke(arr, args, ctx) { - - if (arr == null || arr instanceof Array === false) { - return; - } - - for (var i = 0, length = arr.length; i < length; i++) { - if (typeof arr[i] !== 'function') { - continue; - } - if (args == null) { - arr[i].call(ctx); - }else{ - arr[i].apply(ctx, args); - } - } - - } - - function arr_ensure(obj, xpath) { - if (!xpath) { - return obj; - } - var arr = xpath.split('.'), - imax = arr.length - 1, - i = 0, - key; - - for (; i < imax; i++) { - key = arr[i]; - obj = obj[key] || (obj[key] = {}); - } - - key = arr[imax]; - return obj[key] || (obj[key] = []); - } - // end:source ../src/utils/array.js - // source ../src/utils/path.js - var path_getDir, - path_getFile, - path_getExtension, - path_resolveCurrent, - path_normalize, - path_win32Normalize, - path_resolveUrl, - path_combine, - path_isRelative - ; - - (function(){ - - - path_getDir = function(path) { - return path.substring(0, path.lastIndexOf('/') + 1); - }; - - path_getFile = function(path) { - path = path - .replace('file://', '') - .replace(/\\/g, '/') - .replace(/\?[^\n]+$/, ''); - - if (/^\/\w+:\/[^\/]/i.test(path)){ - // win32 drive - return path.substring(1); - } - return path; - }; - - path_getExtension = function(path) { - var query = path.indexOf('?'); - if (query === -1) { - return path.substring(path.lastIndexOf('.') + 1); - } - - return path.substring(path.lastIndexOf('.', query) + 1, query); - }; - - path_resolveCurrent = function() { - - if (document == null) { - return typeof module === 'undefined' - ? '' - : path_win32Normalize(module.parent.filename); - } - var scripts = document.getElementsByTagName('script'), - last = scripts[scripts.length - 1], - url = last && last.getAttribute('src') || ''; - - if (url[0] === '/') { - return url; - } - - var location = window - .location - .pathname - .replace(/\/[^\/]+\.\w+$/, ''); - - if (location[location.length - 1] !== '/') { - location += '/'; - } - - return location + url; - }; - - path_normalize = function(path) { - return path - .replace(/\\/g, '/') - // remove double slashes, but not near protocol - .replace(/([^:\/])\/{2,}/g, '$1/') - ; - }; - - path_win32Normalize = function(path){ - path = path_normalize(path); - if (path.substring(0, 5) === 'file:') - return path; - - return 'file:///' + path; - }; - - path_resolveUrl = function(url, parent) { - - if (reg_hasProtocol.test(url)) - return path_collapse(url); - - if (url.substring(0, 2) === './') - url = url.substring(2); - - if (url[0] === '/' && parent != null && parent.base != null) { - url = path_combine(parent.base, url); - if (reg_hasProtocol.test(url)) - return path_collapse(url); - } - if (url[0] === '/' && cfg.path) { - url = cfg.path + url.substring(1); - if (reg_hasProtocol.test(url)) - return path_collapse(url); - } - if (url[0] === '/') { - if (isWeb === false || cfg.lockedToFolder === true) { - url = url.substring(1); - } - } else if (parent != null && parent.location != null) { - url = parent.location + url; - } - - return path_collapse(url); - }; - - path_isRelative = function(path) { - var c = path.charCodeAt(0); - - switch (c) { - case 47: - // / - return false; - case 102: - // f - case 104: - // h - return reg_hasProtocol.test(path) === false; - } - - return true; - }; - - path_combine = function() { - var out = '', - imax = arguments.length, - i = -1, - x - ; - while ( ++i < imax ){ - x = arguments[i]; - if (!x) - continue; - - x = path_normalize(x); - - if (out === '') { - out = x; - continue; - } - - if (out[out.length - 1] !== '/') - out += '/' - - if (x[0] === '/') - x = x.substring(1); - - out += x; - } - - return out; - }; - - function path_collapse(url) { - while (url.indexOf('../') !== -1) { - url = url.replace(reg_subFolder, ''); - } - - return url.replace(/\/\.\//g, '/'); - } - - }()); - - - // end:source ../src/utils/path.js - // source ../src/utils/tree.js - var tree_resolveUsage; - - - (function(){ - - tree_resolveUsage = function(resource, usage, next){ - var use = [], - imax = usage.length, - i = -1, - - obj, path, name, index, parent - ; - while( ++i < imax ) { - - name = path = usage[i]; - index = path.indexOf('.'); - if ( index !== -1) { - name = path.substring(0, index); - path = path.substring(index + 1); - } - - parent = use_resolveParent(name, resource.parent, resource); - if (parent == null) - return null; - - if (parent.state !== 4){ - resource.state = 3; - parent.on(4, next, parent, 'push'); - return null; - } - - obj = parent.exports; - - if (name !== path) - obj = obj_getProperty(obj, path); - - // if DEBUG - (typeof obj === 'object' && obj == null) - && console.warn(' Used resource has no exports', name, resource.url); - // endif - - use[i] = obj; - } - return use; - }; - - - function use_resolveParent(name, resource, initiator){ - - if (resource == null) { - // if DEBUG - console.warn(' Usage Not Found:', name); - console.warn('- Ensure to have it included before with the correct alias') - console.warn('- Initiator Stacktrace:'); - - var arr = [], res = initiator; - while(res != null){ - arr.push(res.url); - res = res.parent; - } - console.warn(arr.join('\n')); - // endif - - return null; - } - - - var includes = resource.includes, - i = -1, - imax = includes.length, - - include, exports, alias - ; - - while( ++i < imax ) { - include = includes[i]; - alias = include.route.alias || Routes.parseAlias(include.route); - if (alias === name) - return include.resource; - } - - return use_resolveParent(name, resource.parent, initiator); - } - - - }()); - // end:source ../src/utils/tree.js - - // source ../src/2.Routing.js - var RoutesLib = function() { - - var routes = {}, - regexpAlias = /([^\\\/]+)\.\w+$/; - - - - return { - /** - * @param route {String} = Example: '.reference/libjs/{0}/{1}.js' - */ - register: function(namespace, route, currentInclude) { - - if (typeof route === 'string' && path_isRelative(route)) { - var res = currentInclude || include, - location = res.location || path_getDir(res.url || path_resolveCurrent()); - - if (path_isRelative(location)) { - location = '/' + location; - } - - route = location + route; - } - - routes[namespace] = route instanceof Array ? route : route.split(/[\{\}]/g); - - }, - - /** - * @param {String} template = Example: 'scroller/scroller.min?ui=black' - */ - resolve: function(namespace, template) { - var questionMark = template.indexOf('?'), - aliasIndex = template.indexOf('::'), - alias, - path, - params, - route, - i, - x, - length, - arr; - - - if (aliasIndex !== -1){ - alias = template.substring(aliasIndex + 2); - template = template.substring(0, aliasIndex); - } - - if (questionMark !== -1) { - arr = template.substring(questionMark + 1).split('&'); - params = {}; - - for (i = 0, length = arr.length; i < length; i++) { - x = arr[i].split('='); - params[x[0]] = x[1]; - } - - template = template.substring(0, questionMark); - } - - template = template.split('/'); - route = routes[namespace]; - - if (route == null){ - return { - path: template.join('/'), - params: params, - alias: alias - }; - } - - path = route[0]; - - for (i = 1; i < route.length; i++) { - if (i % 2 === 0) { - path += route[i]; - } else { - /** if template provides less "breadcrumbs" than needed - - * take always the last one for failed peaces */ - - var index = route[i] << 0; - if (index > template.length - 1) { - index = template.length - 1; - } - - - - path += template[index]; - - if (i === route.length - 2){ - for(index++; index < template.length; index++){ - path += '/' + template[index]; - } - } - } - } - - return { - path: path, - params: params, - alias: alias - }; - }, - - /** - * @arg includeData : - * 1. string - URL to resource - * 2. array - URLs to resources - * 3. object - {route: x} - route defines the route template to resource, - * it must be set before in include.cfg. - * example: - * include.cfg('net','scripts/net/{name}.js') - * include.js({net: 'downloader'}) // -> will load scipts/net/downloader.js - * @arg namespace - route in case of resource url template, or namespace in case of LazyModule - * - * @arg fn - callback function, which receives namespace|route, url to resource and ?id in case of not relative url - * @arg xpath - xpath string of a lazy object 'object.sub.and.othersub'; - */ - each: function(type, includeData, fn, namespace, xpath) { - var key; - - if (includeData == null) { - return; - } - - if (type === 'lazy' && xpath == null) { - for (key in includeData) { - this.each(type, includeData[key], fn, null, key); - } - return; - } - if (includeData instanceof Array) { - for (var i = 0; i < includeData.length; i++) { - this.each(type, includeData[i], fn, namespace, xpath); - } - return; - } - if (typeof includeData === 'object') { - for (key in includeData) { - if (hasOwnProp.call(includeData, key)) { - this.each(type, includeData[key], fn, key, xpath); - } - } - return; - } - - if (typeof includeData === 'string') { - var x = this.resolve(namespace, includeData); - if (namespace){ - namespace += '.' + includeData; - } - - fn(namespace, x, xpath); - return; - } - - console.error('Include Package is invalid', arguments); - }, - - getRoutes: function(){ - return routes; - }, - - parseAlias: function(route){ - var path = route.path, - result = regexpAlias.exec(path); - - return result && result[1]; - } - }; - - }; - - var Routes = RoutesLib(); - - - /*{test} - - console.log(JSON.stringify(Routes.resolve(null,'scroller.js::Scroller'))); - - Routes.register('lib', '.reference/libjs/{0}/lib/{1}.js'); - console.log(JSON.stringify(Routes.resolve('lib','scroller::Scroller'))); - console.log(JSON.stringify(Routes.resolve('lib','scroller/scroller.mobile?ui=black'))); - - Routes.register('framework', '.reference/libjs/framework/{0}.js'); - console.log(JSON.stringify(Routes.resolve('framework','dom/jquery'))); - - - */ - // end:source ../src/2.Routing.js - // source ../src/3.Events.js - var Events = (function(document) { - if (document == null) { - return { - ready: fn_doNothing, - load: fn_doNothing - }; - } - var readycollection = []; - - function onReady() { - Events.ready = fn_doNothing; - - if (readycollection == null) { - return; - } - - arr_invoke(readycollection); - readycollection = null; - } - - /** TODO: clean this */ - - if ('onreadystatechange' in document) { - document.onreadystatechange = function() { - if (/complete|interactive/g.test(document.readyState) === false) { - return; - } - onReady(); - }; - } else if (document.addEventListener) { - document.addEventListener('DOMContentLoaded', onReady); - }else { - window.onload = onReady; - } - - - return { - ready: function(callback) { - readycollection.unshift(callback); - } - }; - })(document); - - // end:source ../src/3.Events.js - // source ../src/6.ScriptStack.js - /** @TODO Refactor loadBy* {combine logic} */ - - var ScriptStack = (function() { - - var head, - currentResource, - stack = [], - - _cb_complete = [], - _paused; - - - function loadScript(url, callback) { - //console.log('load script', url); - var tag = document.createElement('script'); - tag.type = 'text/javascript'; - tag.src = url; - - if ('onreadystatechange' in tag) { - tag.onreadystatechange = function() { - (this.readyState === 'complete' || this.readyState === 'loaded') && callback(); - }; - } else { - tag.onload = tag.onerror = callback; - } - - ;(head || (head = document.getElementsByTagName('head')[0])).appendChild(tag); - } - - function loadByEmbedding() { - if (_paused) { - return; - } - - if (stack.length === 0){ - trigger_complete(); - return; - } - - if (currentResource != null) { - return; - } - - var resource = (currentResource = stack[0]); - - if (resource.state === 1) { - return; - } - - resource.state = 1; - - global.include = resource; - global.iparams = resource.route.params; - - - function resourceLoaded(e) { - - - if (e && e.type === 'error') { - console.log('Script Loaded Error', resource.url); - } - - var i = 0, - length = stack.length; - - for (; i < length; i++) { - if (stack[i] === resource) { - stack.splice(i, 1); - break; - } - } - - if (i === length) { - console.error('Loaded Resource not found in stack', resource); - return; - } - - if (resource.state !== 2.5) - resource.readystatechanged(3); - currentResource = null; - loadByEmbedding(); - } - - if (resource.source) { - __eval(resource.source, resource); - - resourceLoaded(); - return; - } - - loadScript(resource.url, resourceLoaded); - } - - function processByEval() { - if (_paused) { - return; - } - - if (stack.length === 0){ - trigger_complete(); - return; - } - - if (currentResource != null) { - return; - } - - var resource = stack[0]; - - if (resource.state < 2) { - return; - } - - currentResource = resource; - - resource.state = 1; - global.include = resource; - - //console.log('evaling', resource.url, stack.length); - __eval(resource.source, resource); - - for (var i = 0, x, length = stack.length; i < length; i++) { - x = stack[i]; - if (x === resource) { - stack.splice(i, 1); - break; - } - } - - if (resource.state !== 2.5) - resource.readystatechanged(3); - currentResource = null; - processByEval(); - - } - - - function trigger_complete() { - var i = -1, - imax = _cb_complete.length; - while (++i < imax) { - _cb_complete[i](); - } - - _cb_complete.length = 0; - } - - - - return { - load: function(resource, parent, forceEmbed) { - - this.add(resource, parent); - - if (!cfg.eval || forceEmbed) { - loadByEmbedding(); - return; - } - - // was already loaded, with custom loader for example - if (resource.source) { - resource.state = 2; - processByEval(); - return; - } - - XHR(resource, function(resource, response) { - if (!response) { - console.error('Not Loaded:', resource.url); - console.error('- Initiator:', resource.parent && resource.parent.url || ''); - } - - resource.source = response; - resource.state = 2; - - processByEval(); - }); - }, - - add: function(resource, parent){ - - if (resource.priority === 1) - return stack.unshift(resource); - - - if (parent == null) - return stack.push(resource); - - - var imax = stack.length, - i = -1 - ; - // move close to parent - while( ++i < imax){ - if (stack[i] === parent) - return stack.splice(i, 0, resource); - } - - // was still not added - stack.push(resource); - }, - - /* Move resource in stack close to parent */ - moveToParent: function(resource, parent) { - var length = stack.length, - parentIndex = -1, - resourceIndex = -1, - i; - - for (i = 0; i < length; i++) { - if (stack[i] === resource) { - resourceIndex = i; - break; - } - } - - if (resourceIndex === -1) { - return; - } - - for (i= 0; i < length; i++) { - if (stack[i] === parent) { - parentIndex = i; - break; - } - } - - if (parentIndex === -1) { - return; - } - - if (resourceIndex < parentIndex) { - return; - } - - stack.splice(resourceIndex, 1); - stack.splice(parentIndex, 0, resource); - - - }, - - pause: function(){ - _paused = true; - }, - - resume: function(){ - _paused = false; - - if (currentResource != null) - return; - - this.touch(); - }, - - touch: function(){ - var fn = cfg.eval - ? processByEval - : loadByEmbedding - ; - fn(); - }, - - complete: function(callback){ - if (_paused !== true && stack.length === 0) { - callback(); - return; - } - - _cb_complete.push(callback); - } - }; - })(); - - // end:source ../src/6.ScriptStack.js - - // source ../src/4.IncludeDeferred.js - - /** - * STATES: - * 0: Resource Created - * 1: Loading - * 2: Loaded - Evaluating - * 2.5: Paused - Evaluating paused - * 3: Evaluated - Childs Loading - * 4: Childs Loaded - Completed - */ - - var IncludeDeferred = function() { - this.callbacks = []; - this.state = -1; - }; - - IncludeDeferred.prototype = { /** state observer */ - - on: function(state, callback, sender, mutator) { - if (this === sender && this.state === -1) { - callback(this); - return this; - } - - // this === sender in case when script loads additional - // resources and there are already parents listeners - - if (mutator == null) { - mutator = (this.state < 3 || this === sender) - ? 'unshift' - : 'push' - ; - } - - state <= this.state ? callback(this) : this.callbacks[mutator]({ - state: state, - callback: callback - }); - return this; - }, - readystatechanged: function(state) { - - var i, length, x, currentInclude; - - if (state > this.state) { - this.state = state; - } - - if (this.state === 3) { - var includes = this.includes; - - if (includes != null && includes.length) { - for (i = 0; i < includes.length; i++) { - if (includes[i].resource.state !== 4) { - return; - } - } - } - - this.state = 4; - } - - i = 0; - length = this.callbacks.length; - - if (length === 0){ - return; - } - - //do not set asset resource to global - if (this.type === 'js' && this.state === 4) { - currentInclude = global.include; - global.include = this; - } - - for (; i < length; i++) { - x = this.callbacks[i]; - if (x == null || x.state > this.state) { - continue; - } - - this.callbacks.splice(i,1); - length--; - i--; - - /* if (!DEBUG) - try { - */ - x.callback(this); - /* if (!DEBUG) - } catch(error){ - console.error(error.toString(), 'file:', this.url); - } - */ - - if (this.state < 4){ - break; - } - } - - if (currentInclude != null && currentInclude.type === 'js'){ - global.include = currentInclude; - } - }, - - /** assets loaded and DomContentLoaded */ - - ready: function(callback) { - var that = this; - return this.on(4, function() { - Events.ready(function(){ - that.resolve(callback); - }); - }, this); - }, - - /** assets loaded */ - done: function(callback) { - var that = this; - return this.on(4, function(){ - that.resolve(callback); - }, this); - }, - resolve: function(callback) { - var includes = this.includes, - length = includes == null - ? 0 - : includes.length - ; - - if (length > 0 && this.response == null){ - this.response = {}; - - var resource, - route; - - for(var i = 0, x; i < length; i++){ - x = includes[i]; - resource = x.resource; - route = x.route; - - if (typeof resource.exports === 'undefined') - continue; - - var type = resource.type; - switch (type) { - case 'js': - case 'load': - case 'ajax': - - var alias = route.alias || Routes.parseAlias(route), - obj = type === 'js' - ? (this.response) - : (this.response[type] || (this.response[type] = {})) - ; - - if (alias != null) { - obj_setProperty(obj, alias, resource.exports); - break; - } - console.warn(' Alias is undefined', resource); - break; - } - } - } - - var response = this.response || emptyResponse; - var that = this; - if (this._use == null && this._usage != null){ - this._use = tree_resolveUsage(this, this._usage, function(){ - that.state = 4; - that.resolve(callback); - that.readystatechanged(4); - }); - if (this.state < 4) - return; - } - if (this._use) { - callback.apply(null, [response].concat(this._use)); - return; - } - - callback(response); - } - }; - - // end:source ../src/4.IncludeDeferred.js - // source ../src/5.Include.js - var Include, - IncludeLib = {}; - (function(IncludeDeferred) { - - Include = function() { - IncludeDeferred.call(this); - }; - - stub_release(Include.prototype); - - obj_inherit(Include, IncludeDeferred, { - // Array: exports - _use: null, - - // Array: names - _usage: null, - - isBrowser: true, - isNode: false, - - setCurrent: function(data) { - var url = data.url, - resource = this.getResourceById(url, 'js'); - - if (resource == null) { - if (url[0] === '/' && this.base) - url = this.base + url.substring(1); - - var resource = new Resource( - 'js' - , { path: url } - , data.namespace - , null - , null - , url); - } - if (resource.state < 3) { - console.error(" Resource should be loaded", data); - } - - /**@TODO - probably state shoulb be changed to 2 at this place */ - resource.state = 3; - global.include = resource; - }, - - cfg: function(arg) { - switch (typeof arg) { - case 'object': - var key, value; - for (key in arg) { - value = arg[key]; - - switch(key){ - case 'loader': - for(var x in value){ - CustomLoader.register(x, value[x]); - } - break; - case 'modules': - if (value === true){ - enableModules(); - } - break; - default: - cfg[key] = value; - break; - } - - } - break; - case 'string': - if (arguments.length === 1) { - return cfg[arg]; - } - if (arguments.length === 2) { - cfg[arg] = arguments[1]; - } - break; - case 'undefined': - return cfg; - } - return this; - }, - routes: function(mix) { - if (mix == null) { - return Routes.getRoutes(); - } - - if (arguments.length === 2) { - Routes.register(mix, arguments[1], this); - return this; - } - - for (var key in mix) { - Routes.register(key, mix[key], this); - } - return this; - }, - promise: function(namespace) { - var arr = namespace.split('.'), - obj = global; - while (arr.length) { - var key = arr.shift(); - obj = obj[key] || (obj[key] = {}); - } - return obj; - }, - /** @TODO - `id` property seems to be unsed and always equal to `url` */ - register: function(_bin) { - - var base = this.base, - key, - info, - infos, - imax, - i; - - function transform(info){ - if (base == null) - return info; - if (info.url[0] === '/') - info.url = base + info.url.substring(1); - - if (info.parent[0] === '/') - info.parent = base + info.parent.substring(1); - - info.id = info.url; - return info; - } - - for (key in _bin) { - infos = _bin[key]; - imax = infos.length; - i = -1; - - while ( ++i < imax ) { - - info = transform(infos[i]); - - var id = info.id, - url = info.url, - namespace = info.namespace, - parent = info.parent && incl_getResource(info.parent, 'js'), - resource = new Resource(), - state = info.state - ; - if (! (id || url)) - continue; - - if (url) { - if (url[0] === '/') { - url = url.substring(1); - } - resource.location = path_getDir(url); - } - - - resource.state = state == null - ? (key === 'js' ? 3 : 4) - : state - ; - resource.namespace = namespace; - resource.type = key; - resource.url = url || id; - resource.parent = parent; - resource.base = parent && parent.base || base; - - switch (key) { - case 'load': - case 'lazy': - var container = document.querySelector('#includejs-' + id.replace(/\W/g, '')); - if (container == null) { - console.error('"%s" Data was not embedded into html', id); - break; - } - resource.exports = container.innerHTML; - if (CustomLoader.exists(resource)){ - - resource.state = 3; - CustomLoader.load(resource, CustomLoader_onComplete); - } - break; - } - - // - (bin[key] || (bin[key] = {}))[id] = resource; - } - } - function CustomLoader_onComplete(resource, response) { - resource.exports = response; - resource.readystatechanged(4); - } - }, - /** - * Create new Resource Instance, - * as sometimes it is necessary to call include. on new empty context - */ - instance: function(url, parent) { - var resource; - if (url == null) { - resource = new Include(); - resource.state = 4; - - return resource; - } - - resource = new Resource('package'); - resource.state = 4; - resource.location = path_getDir(path_normalize(url)); - resource.parent = parent; - return resource; - }, - - getResource: function(url, type){ - if (this.base && url[0] === '/') - url = this.base + url.substring(1); - - return incl_getResource(url, type) - }, - getResourceById: function(url, type){ - var _bin = bin[type], - _res = _bin[url]; - if (_res != null) - return _res; - - if (this.base && url[0] === '/') { - _res = _bin[path_combine(this.base, url)]; - if (_res != null) - return _res; - } - if (this.base && this.location) { - _res = _bin[path_combine(this.base, this.location, url)]; - if (_res != null) - return _res; - } - if (this.location) { - _res = _bin[path_combine(this.location, url)]; - if (_res != null) - return _res; - } - return null; - }, - getResources: function(){ - return bin; - }, - - plugin: function(pckg, callback) { - - var urls = [], - length = 0, - j = 0, - i = 0, - onload = function(url, response) { - j++; - - embedPlugin(response); - - if (j === length - 1 && callback) { - callback(); - callback = null; - } - }; - Routes.each('', pckg, function(namespace, route) { - urls.push(route.path[0] === '/' ? route.path.substring(1) : route.path); - }); - - length = urls.length; - - for (; i < length; i++) { - XHR(urls[i], onload); - } - return this; - }, - - client: function(){ - if (cfg.server === true) - stub_freeze(this); - - return this; - }, - - server: function(){ - if (cfg.server !== true) - stub_freeze(this); - - return this; - }, - - use: function(){ - if (this.parent == null) { - console.error(' Parent resource is undefined'); - return this; - } - - this._usage = arguments; - return this; - }, - - pauseStack: fn_proxy(ScriptStack.pause, ScriptStack), - resumeStack: fn_proxy(ScriptStack.resume, ScriptStack), - - allDone: function(callback){ - ScriptStack.complete(function(){ - - var pending = include.getPending(), - await = pending.length; - if (await === 0) { - callback(); - return; - } - - var i = -1, - imax = await; - while( ++i < imax ){ - pending[i].on(4, check, null, 'push'); - } - - function check() { - if (--await < 1) - callback(); - } - }); - }, - - getPending: function(type){ - var resources = [], - res, key, id; - - for(key in bin){ - if (type != null && type !== key) - continue; - - for (id in bin[key]){ - res = bin[key][id]; - if (res.state < 4) - resources.push(res); - } - } - - return resources; - }, - Lib: IncludeLib - }); - - - // >> FUNCTIONS - - function incl_getResource(url, type) { - var id = url; - - if (path_isRelative(url) === true) - id = '/' + id; - - if (type != null){ - return bin[type][id]; - } - - for (var key in bin) { - if (bin[key].hasOwnProperty(id)) { - return bin[key][id]; - } - } - return null; - } - - - function embedPlugin(source) { - eval(source); - } - - function enableModules() { - if (typeof Object.defineProperty === 'undefined'){ - console.warn('Browser do not support Object.defineProperty'); - return; - } - Object.defineProperty(global, 'module', { - get: function() { - return global.include; - } - }); - - Object.defineProperty(global, 'exports', { - get: function() { - var current = global.include; - return (current.exports || (current.exports = {})); - }, - set: function(exports) { - global.include.exports = exports; - } - }); - } - - function includePackage(resource, type, mix){ - var pckg = mix.length === 1 ? mix[0] : __array_slice.call(mix); - - if (resource instanceof Resource) { - return resource.include(type, pckg); - } - return new Resource('js').include(type, pckg); - } - - function createIncluder(type) { - return function(){ - return includePackage(this, type, arguments); - }; - } - - function doNothing() { - return this; - } - - function stub_freeze(include) { - include.js = - include.css = - include.load = - include.ajax = - include.embed = - include.lazy = - include.inject = - doNothing; - } - - function stub_release(proto) { - var fns = ['js', 'css', 'load', 'ajax', 'embed', 'lazy'], - i = fns.length; - while (--i !== -1){ - proto[fns[i]] = createIncluder(fns[i]); - } - - proto['inject'] = proto.js; - } - - }(IncludeDeferred)); - - // end:source ../src/5.Include.js - // source ../src/7.CustomLoader.js - var CustomLoader = (function() { - - // source loader/json.js - - var JSONParser = { - process: function(source, res){ - try { - return JSON.parse(source); - } catch(error) { - console.error(error, source); - return null; - } - } - }; - - - // end:source loader/json.js - - cfg.loader = { - json : JSONParser - }; - - function loader_isInstance(x) { - if (typeof x === 'string') - return false; - - return typeof x.ready === 'function' || typeof x.process === 'function'; - } - - function createLoader(url) { - var extension = path_getExtension(url), - loader = cfg.loader[extension]; - - if (loader_isInstance(loader)) { - return loader; - } - - var path = loader, - namespace; - - if (typeof path === 'object') { - // is route {namespace: path} - for (var key in path) { - namespace = key; - path = path[key]; - break; - } - } - - return (cfg.loader[extension] = new Resource( - 'js', - Routes.resolve(namespace, path), - namespace, - null, - null, - null, - 1 - )); - } - - function loader_completeDelegate(callback, resource) { - return function(response){ - callback(resource, response); - }; - } - - function loader_process(source, resource, loader, callback) { - if (loader.process == null) { - callback(resource, source); - return; - } - - var delegate = loader_completeDelegate(callback, resource), - syncResponse = loader.process(source, resource, delegate); - - // match also null - if (typeof syncResponse !== 'undefined') { - callback(resource, syncResponse); - } - } - - function tryLoad(resource, loader, callback) { - if (typeof resource.exports === 'string') { - loader_process(resource.exports, resource, loader, callback); - return; - } - - function onLoad(resource, response){ - loader_process(response, resource, loader, callback); - } - - if (loader.load) - return loader.load(resource, onLoad); - - XHR(resource, onLoad); - } - - return { - load: function(resource, callback) { - - var loader = createLoader(resource.url); - - if (loader.process) { - tryLoad(resource, loader, callback); - return; - } - - loader.on(4, function() { - tryLoad(resource, loader.exports, callback); - }, null, 'push'); - }, - exists: function(resource) { - if (!resource.url) { - return false; - } - - var ext = path_getExtension(resource.url); - - return cfg.loader.hasOwnProperty(ext); - }, - - /** - * IHandler: - * { process: function(content) { return _handler(content); }; } - * - * Url: - * path to IHandler - */ - register: function(extension, handler){ - if (typeof handler === 'string'){ - var resource = include; - if (resource.location == null) { - resource = { - location: path_getDir(path_resolveCurrent()) - }; - } - - handler = path_resolveUrl(handler, resource); - } - - cfg.loader[extension] = handler; - } - }; - }()); - - // end:source ../src/7.CustomLoader.js - // source ../src/8.LazyModule.js - var LazyModule = { - create: function(xpath, code) { - var arr = xpath.split('.'), - obj = global, - module = arr[arr.length - 1]; - while (arr.length > 1) { - var prop = arr.shift(); - obj = obj[prop] || (obj[prop] = {}); - } - arr = null; - - Object.defineProperty(obj, module, { - get: function() { - - delete obj[module]; - try { - var r = __eval(code, global.include); - if (!(r == null || r instanceof Resource)){ - obj[module] = r; - } - } catch (error) { - error.xpath = xpath; - Helper.reportError(error); - } finally { - code = null; - xpath = null; - return obj[module]; - } - } - }); - } - }; - // end:source ../src/8.LazyModule.js - // source ../src/9.Resource.js - var Resource; - - (function(Include, Routes, ScriptStack, CustomLoader) { - - Resource = function(type, route, namespace, xpath, parent, id, priority) { - Include.call(this); - - this.childLoaded = fn_proxy(this.childLoaded, this); - - var url = route && route.path; - if (url != null) - this.url = url = path_resolveUrl(url, parent); - - this.type = type; - this.xpath = xpath; - this.route = route; - this.parent = parent; - this.priority = priority; - this.namespace = namespace; - this.base = parent && parent.base; - - if (id == null && url) - id = (path_isRelative(url) ? '/' : '') + url; - - var resource = bin[type] && bin[type][id]; - if (resource) { - - if (resource.state < 4 && type === 'js') - ScriptStack.moveToParent(resource, parent); - - return resource; - } - - if (url == null) { - this.state = 3; - this.location = path_getDir(path_resolveCurrent()); - return this; - } - - this.state = 0; - this.location = path_getDir(url); - - (bin[type] || (bin[type] = {}))[id] = this; - - if (cfg.version) - this.url += (this.url.indexOf('?') === -1 ? '?' : '&') + 'v=' + cfg.version; - - return process(this); - - }; - - Resource.prototype = obj_inherit(Resource, Include, { - - state: null, - location: null, - includes: null, - response: null, - - url: null, - base: null, - type: null, - xpath: null, - route: null, - parent: null, - priority: null, - namespace: null, - - setBase: function(baseUrl){ - this.base = baseUrl; - return this; - }, - - childLoaded: function(child) { - var resource = this, - includes = resource.includes; - if (includes && includes.length) { - if (resource.state < 3) { - // resource still loading/include is in process, but one of sub resources are already done - return; - } - for (var i = 0; i < includes.length; i++) { - if (includes[i].resource.state !== 4) { - return; - } - } - } - resource.readystatechanged(4); - }, - create: function(type, route, namespace, xpath, id) { - var resource; - - this.state = this.state >= 3 - ? 3 - : 2; - this.response = null; - - if (this.includes == null) - this.includes = []; - - - resource = new Resource(type, route, namespace, xpath, this, id); - - this.includes.push({ - resource: resource, - route: route - }); - - return resource; - }, - include: function(type, pckg) { - var that = this, - children = [], - child; - Routes.each(type, pckg, function(namespace, route, xpath) { - - if (that.route != null && that.route.path === route.path) { - // loading itself - return; - } - child = that.create(type, route, namespace, xpath); - children.push(child); - }); - - var i = -1, - imax = children.length; - while ( ++i < imax ){ - children[i].on(4, this.childLoaded); - } - - return this; - }, - - pause: function(){ - this.state = 2.5; - - var that = this; - return function(exports){ - - if (arguments.length === 1) - that.exports = exports; - - that.readystatechanged(3); - }; - }, - - getNestedOfType: function(type){ - return resource_getChildren(this.includes, type); - } - }); - - // private - - function process(resource) { - var type = resource.type, - parent = resource.parent, - url = resource.url; - - if (document == null && type === 'css') { - resource.state = 4; - return resource; - } - - if (CustomLoader.exists(resource) === false) { - switch (type) { - case 'js': - case 'embed': - ScriptStack.load(resource, parent, type === 'embed'); - break; - case 'ajax': - case 'load': - case 'lazy': - XHR(resource, onXHRCompleted); - break; - case 'css': - resource.state = 4; - - var tag = document.createElement('link'); - tag.href = url; - tag.rel = "stylesheet"; - tag.type = "text/css"; - document.getElementsByTagName('head')[0].appendChild(tag); - break; - } - } else { - - if ('js' === type || 'embed' === type) { - ScriptStack.add(resource, resource.parent); - } - - CustomLoader.load(resource, onXHRCompleted); - } - - return resource; - } - - function onXHRCompleted(resource, response) { - if (!response) { - console.warn('Resource cannt be loaded', resource.url); - //- resource.readystatechanged(4); - //- return; - } - - switch (resource.type) { - case 'js': - case 'embed': - resource.source = response; - resource.state = 2; - ScriptStack.touch(); - return; - case 'load': - case 'ajax': - resource.exports = response; - break; - case 'lazy': - LazyModule.create(resource.xpath, response); - break; - case 'css': - var tag = document.createElement('style'); - tag.type = "text/css"; - tag.innerHTML = response; - document.getElementsByTagName('head')[0].appendChild(tag); - break; - } - - resource.readystatechanged(4); - } - - function resource_getChildren(includes, type, out) { - if (includes == null) - return null; - - if (out == null) - out = []; - - var imax = includes.length, - i = -1, - x; - while ( ++i < imax ){ - x = includes[i].resource; - - if (type === x.type) - out.push(x); - - if (x.includes != null) - resource_getChildren(x.includes, type, out); - } - return out; - } - - }(Include, Routes, ScriptStack, CustomLoader)); - // end:source ../src/9.Resource.js - - // source ../src/10.export.js - IncludeLib.Routes = RoutesLib; - IncludeLib.Resource = Resource; - IncludeLib.ScriptStack = ScriptStack; - IncludeLib.registerLoader = CustomLoader.register; - - exports.include = new Include(); - exports.includeLib = IncludeLib; - - - - // end:source ../src/10.export.js -})); - -// source ../src/global-vars.js - -function __eval(source, include) { - "use strict"; - - var iparams = include && include.route.params; - - /* if !DEBUG - try { - */ - return eval.call(window, source); - - /* if !DEBUG - } catch (error) { - error.url = include && include.url; - //Helper.reportError(error); - console.error(error); - } - */ - -} -// end:source ../src/global-vars.js \ No newline at end of file diff --git a/examples/atmajs/node_modules/maskjs/lib/mask.js b/examples/atmajs/node_modules/maskjs/lib/mask.js deleted file mode 100644 index 5ec2aa8e0f..0000000000 --- a/examples/atmajs/node_modules/maskjs/lib/mask.js +++ /dev/null @@ -1,19875 +0,0 @@ - - - -// source umd-head -/*! - * MaskJS v0.51.37 - * Part of the Atma.js Project - * http://atmajs.com/ - * - * MIT license - * http://opensource.org/licenses/MIT - * - * (c) 2012, 2015 Atma.js and other contributors - */ -(function (root, factory) { - 'use strict'; - - var _env = (typeof window === 'undefined' || window.navigator == null) - ? 'node' - : 'dom'; - var _global = (_env === 'dom') - ? window - : global; - var _isCommonJs = typeof exports !== 'undefined' - && (root == null || root === exports || root === _global); - if (_isCommonJs) { - root = exports; - } - var _exports = root || _global; - var _document = _global.document; - - function construct(){ - var mask = factory(_global, _exports, _document); - if (_isCommonJs) { - module.exports = mask; - } - return mask; - } - - if (typeof define === 'function' && define.amd) { - return define(construct); - } - - // Browser OR Node - return construct(); - -}(this, function (global, exports, document) { - 'use strict'; - -// end:source umd-head - - // source /ref-utils/lib/utils.embed.js - // source /src/refs.js - var _Array_slice = Array.prototype.slice, - _Array_splice = Array.prototype.splice, - _Array_indexOf = Array.prototype.indexOf, - - _Object_create = null, // in obj.js - _Object_hasOwnProp = Object.hasOwnProperty, - _Object_getOwnProp = Object.getOwnPropertyDescriptor, - _Object_defineProperty = Object.defineProperty; - - // end:source /src/refs.js - - // source /src/coll.js - var coll_each, - coll_remove, - coll_map, - coll_indexOf, - coll_find; - (function(){ - coll_each = function(coll, fn, ctx){ - if (ctx == null) - ctx = coll; - if (coll == null) - return coll; - - var imax = coll.length, - i = 0; - for(; i< imax; i++){ - fn.call(ctx, coll[i], i); - } - return ctx; - }; - coll_indexOf = function(coll, x){ - if (coll == null) - return -1; - var imax = coll.length, - i = 0; - for(; i < imax; i++){ - if (coll[i] === x) - return i; - } - return -1; - }; - coll_remove = function(coll, x){ - var i = coll_indexOf(coll, x); - if (i === -1) - return false; - coll.splice(i, 1); - return true; - }; - coll_map = function(coll, fn, ctx){ - var arr = new Array(coll.length); - coll_each(coll, function(x, i){ - arr[i] = fn.call(this, x, i); - }, ctx); - return arr; - }; - coll_find = function(coll, fn, ctx){ - var imax = coll.length, - i = 0; - for(; i < imax; i++){ - if (fn.call(ctx || coll, coll[i], i)) - return true; - } - return false; - }; - }()); - - // end:source /src/coll.js - - // source /src/polyfill/arr.js - if (Array.prototype.forEach === void 0) { - Array.prototype.forEach = function(fn, ctx){ - coll_each(this, fn, ctx); - }; - } - if (Array.prototype.indexOf === void 0) { - Array.prototype.indexOf = function(x){ - return coll_indexOf(this, x); - }; - } - - // end:source /src/polyfill/arr.js - // source /src/polyfill/str.js - if (String.prototype.trim == null){ - String.prototype.trim = function(){ - var start = -1, - end = this.length, - code; - if (end === 0) - return this; - while(++start < end){ - code = this.charCodeAt(start); - if (code > 32) - break; - } - while(--end !== 0){ - code = this.charCodeAt(end); - if (code > 32) - break; - } - return start !== 0 && end !== length - 1 - ? this.substring(start, end + 1) - : this; - }; - } - - // end:source /src/polyfill/str.js - // source /src/polyfill/fn.js - - if (Function.prototype.bind == null) { - var _Array_slice; - Function.prototype.bind = function(){ - if (arguments.length < 2 && typeof arguments[0] === "undefined") - return this; - var fn = this, - args = _Array_slice.call(arguments), - ctx = args.shift(); - return function() { - return fn.apply(ctx, args.concat(_Array_slice.call(arguments))); - }; - }; - } - - // end:source /src/polyfill/fn.js - - // source /src/is.js - var is_Function, - is_Array, - is_ArrayLike, - is_String, - is_Object, - is_notEmptyString, - is_rawObject, - is_Date, - is_NODE, - is_DOM; - - (function() { - is_Function = function(x) { - return typeof x === 'function'; - }; - is_Object = function(x) { - return x != null && typeof x === 'object'; - }; - is_Array = is_ArrayLike = function(arr) { - return arr != null - && typeof arr === 'object' - && typeof arr.length === 'number' - && typeof arr.slice === 'function' - ; - }; - is_String = function(x) { - return typeof x === 'string'; - }; - is_notEmptyString = function(x) { - return typeof x === 'string' && x !== ''; - }; - is_rawObject = function(obj) { - if (obj == null || typeof obj !== 'object') - return false; - - return obj.constructor === Object; - }; - is_Date = function(x) { - if (x == null || typeof x !== 'object') { - return false; - } - if (x.getFullYear != null && isNaN(x) === false) { - return true; - } - return false; - }; - is_DOM = typeof window !== 'undefined' && window.navigator != null; - is_NODE = !is_DOM; - - }()); - - // end:source /src/is.js - // source /src/obj.js - var obj_getProperty, - obj_setProperty, - obj_hasProperty, - obj_extend, - obj_extendDefaults, - obj_extendMany, - obj_extendProperties, - obj_extendPropertiesDefaults, - obj_create, - obj_toFastProps, - obj_defineProperty; - (function(){ - obj_getProperty = function(obj_, path){ - if ('.' === path) // obsolete - return obj_; - - var obj = obj_, - chain = path.split('.'), - imax = chain.length, - i = -1; - while ( obj != null && ++i < imax ) { - obj = obj[chain[i]]; - } - return obj; - }; - obj_setProperty = function(obj_, path, val) { - var obj = obj_, - chain = path.split('.'), - imax = chain.length - 1, - i = -1, - key; - while ( ++i < imax ) { - key = chain[i]; - if (obj[key] == null) - obj[key] = {}; - - obj = obj[key]; - } - obj[chain[i]] = val; - }; - obj_hasProperty = function(obj, path) { - var x = obj_getProperty(obj, path); - return x !== void 0; - }; - obj_defineProperty = function(obj, path, dscr) { - var x = obj, - chain = path.split('.'), - imax = chain.length - 1, - i = -1, key; - while (++i < imax) { - key = chain[i]; - if (x[key] == null) - x[key] = {}; - x = x[key]; - } - key = chain[imax]; - if (_Object_defineProperty) { - if (dscr.writable === void 0) dscr.writable = true; - if (dscr.configurable === void 0) dscr.configurable = true; - if (dscr.enumerable === void 0) dscr.enumerable = true; - _Object_defineProperty(x, key, dscr); - return; - } - x[key] = dscr.value === void 0 - ? dscr.value - : (dscr.get && dscr.get()); - }; - obj_extend = function(a, b){ - if (b == null) - return a || {}; - - if (a == null) - return obj_create(b); - - for(var key in b){ - a[key] = b[key]; - } - return a; - }; - obj_extendDefaults = function(a, b){ - if (b == null) - return a || {}; - if (a == null) - return obj_create(b); - - for(var key in b) { - if (a[key] == null) - a[key] = b[key]; - } - return a; - } - var extendPropertiesFactory = function(overwriteProps){ - if (_Object_getOwnProp == null) - return overwriteProps ? obj_extend : obj_extendDefaults; - - return function(a, b){ - if (b == null) - return a || {}; - - if (a == null) - return obj_create(b); - - var key, descr, ownDescr; - for(key in b){ - descr = _Object_getOwnProp(b, key); - if (descr == null) - continue; - if (overwriteProps !== true) { - ownDescr = _Object_getOwnProp(a, key); - if (ownDescr != null) { - continue; - } - } - if (descr.hasOwnProperty('value')) { - a[key] = descr.value; - continue; - } - _Object_defineProperty(a, key, descr); - } - return a; - }; - }; - - obj_extendProperties = extendPropertiesFactory(true); - obj_extendPropertiesDefaults = extendPropertiesFactory(false ); - - obj_extendMany = function(a){ - var imax = arguments.length, - i = 1; - for(; i -1 ) { - x = args[i]; - if (typeof x === 'function') { - BaseCtor = wrapFn(x, BaseCtor); - x = x.prototype; - } - extendDefaultsFn(Proto, x); - } - return createClass(wrapFn(BaseCtor, Ctor), Proto); - }; - } - - function createClass(Ctor, Proto) { - Proto.constructor = Ctor; - Ctor.prototype = Proto; - return Ctor; - } - function wrapFn(fnA, fnB) { - if (fnA == null) { - return fnB; - } - if (fnB == null) { - return fnA; - } - return function(){ - var args = _Array_slice.call(arguments); - var x = fnA.apply(this, args); - if (x !== void 0) - return x; - - return fnB.apply(this, args); - }; - } - }()); - - // end:source /src/class.js - // source /src/error.js - var error_createClass, - error_formatSource, - error_formatCursor, - error_cursor; - - (function(){ - error_createClass = function(name, Proto, stackSliceFrom){ - var Ctor = _createCtor(Proto, stackSliceFrom); - Ctor.prototype = new Error; - - Proto.constructor = Error; - Proto.name = name; - obj_extend(Ctor.prototype, Proto); - return Ctor; - }; - - error_formatSource = function(source, index, filename) { - var cursor = error_cursor(source, index), - lines = cursor[0], - lineNum = cursor[1], - rowNum = cursor[2], - str = ''; - if (filename != null) { - str += str_format(' at {0}({1}:{2})\n', filename, lineNum, rowNum); - } - return str + error_formatCursor(lines, lineNum, rowNum); - }; - - /** - * @returns [ lines, lineNum, rowNum ] - */ - error_cursor = function(str, index){ - var lines = str.substring(0, index).split('\n'), - line = lines.length, - row = index + 1 - lines.slice(0, line - 1).join('\n').length; - if (line > 1) { - // remote trailing newline - row -= 1; - } - return [str.split('\n'), line, row]; - }; - - (function(){ - error_formatCursor = function(lines, lineNum, rowNum) { - - var BEFORE = 3, - AFTER = 2, - i = lineNum - BEFORE, - imax = i + BEFORE + AFTER, - str = ''; - - if (i < 0) i = 0; - if (imax > lines.length) imax = lines.length; - - var lineNumberLength = String(imax).length, - lineNumber; - - for(; i < imax; i++) { - if (str) str += '\n'; - - lineNumber = ensureLength(i + 1, lineNumberLength); - str += lineNumber + '|' + lines[i]; - - if (i + 1 === lineNum) { - str += '\n' + repeat(' ', lineNumberLength + 1); - str += lines[i].substring(0, rowNum - 1).replace(/[^\s]/g, ' '); - str += '^'; - } - } - return str; - }; - - function ensureLength(num, count) { - var str = String(num); - while(str.length < count) { - str += ' '; - } - return str; - } - function repeat(char_, count) { - var str = ''; - while(--count > -1) { - str += char_; - } - return str; - } - }()); - - function _createCtor(Proto, stackFrom){ - var Ctor = Proto.hasOwnProperty('constructor') - ? Proto.constructor - : null; - - return function(){ - obj_defineProperty(this, 'stack', { - value: _prepairStack(stackFrom || 3) - }); - obj_defineProperty(this, 'message', { - value: str_format.apply(this, arguments) - }); - if (Ctor != null) { - Ctor.apply(this, arguments); - } - }; - } - - function _prepairStack(sliceFrom) { - var stack = new Error().stack; - return stack == null ? null : stack - .split('\n') - .slice(sliceFrom) - .join('\n'); - } - - }()); - - // end:source /src/error.js - - // source /src/class/Dfr.js - var class_Dfr; - (function(){ - class_Dfr = function(){}; - class_Dfr.prototype = { - _isAsync: true, - _done: null, - _fail: null, - _always: null, - _resolved: null, - _rejected: null, - - defer: function(){ - this._rejected = null; - this._resolved = null; - return this; - }, - isResolved: function(){ - return this._resolved != null; - }, - isRejected: function(){ - return this._rejected != null; - }, - isBusy: function(){ - return this._resolved == null && this._rejected == null; - }, - resolve: function() { - var done = this._done, - always = this._always - ; - - this._resolved = arguments; - - dfr_clearListeners(this); - arr_callOnce(done, this, arguments); - arr_callOnce(always, this, [ this ]); - - return this; - }, - reject: function() { - var fail = this._fail, - always = this._always - ; - - this._rejected = arguments; - - dfr_clearListeners(this); - arr_callOnce(fail, this, arguments); - arr_callOnce(always, this, [ this ]); - return this; - }, - then: function(filterSuccess, filterError){ - return this.pipe(filterSuccess, filterError); - }, - done: function(callback) { - if (this._rejected != null) - return this; - return dfr_bind( - this, - this._resolved, - this._done || (this._done = []), - callback - ); - }, - fail: function(callback) { - if (this._resolved != null) - return this; - return dfr_bind( - this, - this._rejected, - this._fail || (this._fail = []), - callback - ); - }, - always: function(callback) { - return dfr_bind( - this, - this._rejected || this._resolved, - this._always || (this._always = []), - callback - ); - }, - pipe: function(mix /* ..methods */){ - var dfr; - if (typeof mix === 'function') { - dfr = new class_Dfr; - var done_ = mix, - fail_ = arguments.length > 1 - ? arguments[1] - : null; - - this - .done(delegate(dfr, 'resolve', done_)) - .fail(delegate(dfr, 'reject', fail_)) - ; - return dfr; - } - - dfr = mix; - var imax = arguments.length, - done = imax === 1, - fail = imax === 1, - i = 0, x; - while( ++i < imax ){ - x = arguments[i]; - switch(x){ - case 'done': - done = true; - break; - case 'fail': - fail = true; - break; - default: - console.error('Unsupported pipe channel', arguments[i]) - break; - } - } - done && this.done(delegate(dfr, 'resolve')); - fail && this.fail(delegate(dfr, 'reject' )); - - function pipe(dfr, method) { - return function(){ - dfr[method].apply(dfr, arguments); - }; - } - function delegate(dfr, name, fn) { - return function(){ - if (fn != null) { - var override = fn.apply(this, arguments); - if (override != null) { - if (isDeferred(override) === true) { - override.pipe(dfr); - return; - } - - dfr[name](override) - return; - } - } - dfr[name].apply(dfr, arguments); - }; - } - - return this; - }, - pipeCallback: function(){ - var self = this; - return function(error){ - if (error != null) { - self.reject(error); - return; - } - var args = _Array_slice.call(arguments, 1); - fn_apply(self.resolve, self, args); - }; - }, - resolveDelegate: function(){ - return fn_proxy(this.resolve, this); - }, - - rejectDelegate: function(){ - return fn_proxy(this.reject, this); - }, - - }; - - class_Dfr.run = function(fn, ctx){ - var dfr = new class_Dfr(); - if (ctx == null) - ctx = dfr; - - fn.call( - ctx - , fn_proxy(dfr.resolve, ctx) - , fn_proxy(dfr.reject, dfr) - , dfr - ); - return dfr; - }; - - // PRIVATE - - function dfr_bind(dfr, arguments_, listeners, callback){ - if (callback == null) - return dfr; - - if ( arguments_ != null) - fn_apply(callback, dfr, arguments_); - else - listeners.push(callback); - - return dfr; - } - - function dfr_clearListeners(dfr) { - dfr._done = null; - dfr._fail = null; - dfr._always = null; - } - - function arr_callOnce(arr, ctx, args) { - if (arr == null) - return; - - var imax = arr.length, - i = -1, - fn; - while ( ++i < imax ) { - fn = arr[i]; - - if (fn) - fn_apply(fn, ctx, args); - } - arr.length = 0; - } - function isDeferred(x){ - if (x == null || typeof x !== 'object') - return false; - - if (x instanceof class_Dfr) - return true; - - return typeof x.done === 'function' - && typeof x.fail === 'function' - ; - } - }()); - - // end:source /src/class/Dfr.js - // source /src/class/EventEmitter.js - var class_EventEmitter; - (function(){ - - class_EventEmitter = function() { - this._listeners = {}; - }; - class_EventEmitter.prototype = { - on: function(event, fn) { - if (fn != null){ - (this._listeners[event] || (this._listeners[event] = [])).push(fn); - } - return this; - }, - once: function(event, fn){ - if (fn != null) { - fn._once = true; - (this._listeners[event] || (this._listeners[event] = [])).push(fn); - } - return this; - }, - - pipe: function(event){ - var that = this, - args; - return function(){ - args = _Array_slice.call(arguments); - args.unshift(event); - fn_apply(that.trigger, that, args); - }; - }, - - emit: event_trigger, - trigger: event_trigger, - - off: function(event, fn) { - var listeners = this._listeners[event]; - if (listeners == null) - return this; - - if (arguments.length === 1) { - listeners.length = 0; - return this; - } - - var imax = listeners.length, - i = -1; - while (++i < imax) { - - if (listeners[i] === fn) { - listeners.splice(i, 1); - i--; - imax--; - } - - } - return this; - } - }; - - function event_trigger() { - var args = _Array_slice.call(arguments), - event = args.shift(), - fns = this._listeners[event], - fn, imax, i = 0; - - if (fns == null) - return this; - - for (imax = fns.length; i < imax; i++) { - fn = fns[i]; - fn_apply(fn, this, args); - - if (fn._once === true){ - fns.splice(i, 1); - i--; - imax--; - } - } - return this; - } - }()); - - // end:source /src/class/EventEmitter.js - // source /src/class/Uri.es6 - "use strict"; - -var class_Uri; -(function () { - - class_Uri = class_create({ - protocol: null, - value: null, - path: null, - file: null, - extension: null, - - constructor: function constructor(uri) { - if (uri == null) { - return this; - }if (util_isUri(uri)) { - return uri.combine(""); - }uri = normalize_uri(uri); - - this.value = uri; - - parse_protocol(this); - parse_host(this); - - parse_search(this); - parse_file(this); - - // normilize path - "/some/path" - this.path = normalize_pathsSlashes(this.value); - - if (/^[\w]+:\//.test(this.path)) { - this.path = "/" + this.path; - } - return this; - }, - cdUp: function cdUp() { - var path = this.path; - if (path == null || path === "" || path === "/") { - return this; - } - - // win32 - is base drive - if (/^\/?[a-zA-Z]+:\/?$/.test(path)) { - return this; - } - - this.path = path.replace(/\/?[^\/]+\/?$/i, ""); - return this; - }, - /** - * '/path' - relative to host - * '../path', 'path','./path' - relative to current path - */ - combine: function combine(path) { - - if (util_isUri(path)) { - path = path.toString(); - } - - if (!path) { - return util_clone(this); - } - - if (rgx_win32Drive.test(path)) { - return new class_Uri(path); - } - - var uri = util_clone(this); - - uri.value = path; - - parse_search(uri); - parse_file(uri); - - if (!uri.value) { - return uri; - } - - path = uri.value.replace(/^\.\//i, ""); - - if (path[0] === "/") { - uri.path = path; - return uri; - } - - while (/^(\.\.\/?)/ig.test(path)) { - uri.cdUp(); - path = path.substring(3); - } - - uri.path = normalize_pathsSlashes(util_combinePathes(uri.path, path)); - - return uri; - }, - toString: function toString() { - var protocol = this.protocol ? this.protocol + "://" : ""; - var path = util_combinePathes(this.host, this.path, this.file) + (this.search || ""); - var str = protocol + path; - - if (!(this.file || this.search)) { - str += "/"; - } - return str; - }, - toPathAndQuery: function toPathAndQuery() { - return util_combinePathes(this.path, this.file) + (this.search || ""); - }, - /** - * @return Current Uri Path{String} that is relative to @arg1 Uri - */ - toRelativeString: function toRelativeString(uri) { - if (typeof uri === "string") uri = new class_Uri(uri); - - if (this.path.indexOf(uri.path) === 0) { - // host folder - var p = this.path ? this.path.replace(uri.path, "") : ""; - if (p[0] === "/") p = p.substring(1); - - return util_combinePathes(p, this.file) + (this.search || ""); - } - - // sub folder - var current = this.path.split("/"), - relative = uri.path.split("/"), - commonpath = "", - i = 0, - length = Math.min(current.length, relative.length); - - for (; i < length; i++) { - if (current[i] === relative[i]) continue; - - break; - } - - if (i > 0) commonpath = current.splice(0, i).join("/"); - - if (commonpath) { - var sub = "", - path = uri.path, - forward; - while (path) { - if (this.path.indexOf(path) === 0) { - forward = this.path.replace(path, ""); - break; - } - path = path.replace(/\/?[^\/]+\/?$/i, ""); - sub += "../"; - } - return util_combinePathes(sub, forward, this.file); - } - - return this.toString(); - }, - - toLocalFile: function toLocalFile() { - var path = util_combinePathes(this.host, this.path, this.file); - - return util_win32Path(path); - }, - toLocalDir: function toLocalDir() { - var path = util_combinePathes(this.host, this.path, "/"); - - return util_win32Path(path); - }, - toDir: function toDir() { - var str = this.protocol ? this.protocol + "://" : ""; - - return str + util_combinePathes(this.host, this.path, "/"); - }, - isRelative: function isRelative() { - return !(this.protocol || this.host); - }, - getName: function getName() { - return this.file.replace("." + this.extension, ""); - } - }); - - var rgx_protocol = /^([a-zA-Z]+):\/\//, - rgx_extension = /\.([\w\d]+)$/i, - rgx_win32Drive = /(^\/?\w{1}:)(\/|$)/, - rgx_fileWithExt = /([^\/]+(\.[\w\d]+)?)$/i; - - function util_isUri(object) { - return object && typeof object === "object" && typeof object.combine === "function"; - } - - function util_combinePathes() { - var args = arguments, - str = ""; - for (var i = 0, x, imax = arguments.length; i < imax; i++) { - x = arguments[i]; - if (!x) continue; - - if (!str) { - str = x; - continue; - } - - if (str[str.length - 1] !== "/") str += "/"; - - str += x[0] === "/" ? x.substring(1) : x; - } - return str; - } - - function normalize_pathsSlashes(str) { - - if (str[str.length - 1] === "/") { - return str.substring(0, str.length - 1); - } - return str; - } - - function util_clone(source) { - var uri = new class_Uri(), - key; - for (key in source) { - if (typeof source[key] === "string") { - uri[key] = source[key]; - } - } - return uri; - } - - function normalize_uri(str) { - return str.replace(/\\/g, "/").replace(/^\.\//, "") - - // win32 drive path - .replace(/^(\w+):\/([^\/])/, "/$1:/$2"); - } - - function util_win32Path(path) { - if (rgx_win32Drive.test(path) && path[0] === "/") { - return path.substring(1); - } - return path; - } - - function parse_protocol(obj) { - var match = rgx_protocol.exec(obj.value); - - if (match == null && obj.value[0] === "/") { - obj.protocol = "file"; - } - - if (match == null) { - return; - }obj.protocol = match[1]; - obj.value = obj.value.substring(match[0].length); - } - - function parse_host(obj) { - if (obj.protocol == null) { - return; - }if (obj.protocol === "file") { - var match = rgx_win32Drive.exec(obj.value); - if (match) { - obj.host = match[1]; - obj.value = obj.value.substring(obj.host.length); - } - return; - } - - var pathStart = obj.value.indexOf("/", 2); - - obj.host = ~pathStart ? obj.value.substring(0, pathStart) : obj.value; - - obj.value = obj.value.replace(obj.host, ""); - } - - function parse_search(obj) { - var question = obj.value.indexOf("?"); - if (question === -1) { - return; - }obj.search = obj.value.substring(question); - obj.value = obj.value.substring(0, question); - } - - function parse_file(obj) { - var match = rgx_fileWithExt.exec(obj.value), - file = match == null ? null : match[1]; - - if (file == null) { - return; - } - obj.file = file; - obj.value = obj.value.substring(0, obj.value.length - file.length); - obj.value = normalize_pathsSlashes(obj.value); - - match = rgx_extension.exec(file); - obj.extension = match == null ? null : match[1]; - } - - class_Uri.combinePathes = util_combinePathes; - class_Uri.combine = util_combinePathes; -})(); -/*args*/ -//# sourceMappingURL=Uri.es6.map - // end:source /src/class/Uri.es6 - // end:source /ref-utils/lib/utils.embed.js - - // source scope-vars - var __rgxEscapedChar = { - "'": /\\'/g, - '"': /\\"/g, - '{': /\\\{/g, - '>': /\\>/g, - ';': /\\>/g - }; - - /** - * Configuration Options - * @type {object} - * @typedef Configuration - */ - var __cfg = { - /** - * Relevant for NodeJS only. Disable/Enable compo caching. - * @default true - */ - allowCache: true, - /** - * Style and Script preprocessors - * @type {object} - * @memberOf Configuration - */ - preprocessor: { - /** - * Transform style before using in `style` tag - * @type {function} - * @param {string} style - * @returns {string} - * @memberOf Configuration - */ - style : null, - /** - * Transform script before using in `function,script,event,slot` tags - * @type {function} - * @param {string} source - * @returns {string} - * @memberOf Configuration - */ - script: null - }, - /** - * Base path for modules - * @default null - * @memberOf Configuration - */ - base: null, - modules: 'default', - /** - * Define custom function for getting files content by path - * @param {string} path - * @returns {Promise} - * @memberOf Configuration - */ - getFile: null, - /** - * Define custom function for getting script - * @param {string} path - * @returns {Promise} Fulfill with exports - * @memberOf Configuration - */ - getScript: null, - /** - * Define custom function to build/combine styles - * @param {string} path - * @param {object} options - * @returns {Promise} Fulfill with {string} content - * @memberOf Configuration - */ - buildStyle: null, - /** - * Define custom function to build/combine scripts - * @param {string} path - * @param {object} options - * @returns {Promise} Fulfill with {string} content - * @memberOf Configuration - */ - buildScript: null, - }; - // end:source scope-vars - - // source util/ - // source ./util.js - - - // end:source ./util.js - // source ./attr.js - var attr_extend, - attr_first; - - (function(){ - attr_extend = function (a, b) { - if (a == null) { - return b == null - ? {} - : obj_create(b); - } - - if (b == null) - return a; - - var key; - for(key in b) { - if ('class' === key && typeof a[key] === 'string') { - a[key] += ' ' + b[key]; - continue; - } - a[key] = b[key]; - } - return a; - }; - attr_first = function(attr){ - for (var key in attr) return key; - return null; - }; - }()); - - // end:source ./attr.js - // source ./array.js - var arr_pushMany; - - (function(){ - arr_pushMany = function(arr, arrSource){ - if (arrSource == null || arr == null) - return; - - var il = arr.length, - jl = arrSource.length, - j = -1 - ; - while( ++j < jl ){ - arr[il + j] = arrSource[j]; - } - }; - }()); - // end:source ./array.js - // source ./object.js - var obj_getPropertyEx, - obj_toDictionary; - (function(){ - obj_getPropertyEx = function(path, model, ctx, ctr){ - if (path === '.') - return model; - - var props = path.split('.'), - imax = props.length, - key = props[0] - ; - - if ('$c' === key) { - reporter_deprecated('accessor.compo', 'Use `$` instead of `$c`'); - key = '$'; - } - if ('$u' === key) { - reporter_deprecated('accessor.util', 'Use `_` instead of `$u`'); - key = '_'; - } - if ('$' === key) { - return getProperty_(ctr, props, 1, imax); - } - if ('$a' === key) { - return getProperty_(ctr && ctr.attr, props, 1, imax); - } - if ('_' === key) { - return getProperty_(customUtil_$utils, props, 1, imax); - } - if ('$ctx' === key) { - return getProperty_(ctx, props, 1, imax); - } - if ('$scope' === key) { - return getFromScope_(ctr, props, 1, imax); - } - - var x = getProperty_(model, props, 0, imax); - if (x != null) { - return x; - } - - return getFromScope_(ctr, props, 0, imax); - }; - - obj_toDictionary = function(obj){ - var array = [], - i = 0, - key - ; - for(key in obj){ - array[i++] = { - key: key, - value: obj[key] - }; - } - return array; - }; - - // = private - - function getProperty_(obj, props, startIndex, imax) { - var i = startIndex, - val = obj; - while(i < imax && val != null){ - val = val[props[i]]; - i++; - } - return val; - } - - function getFromScope_(ctr, props, startIndex, imax) { - while (ctr != null){ - var scope = ctr.scope; - if (scope != null) { - var x = getProperty_(scope, props, startIndex, imax); - if (x != null) - return x; - } - ctr = ctr.parent; - } - return null; - } - }()); - - // end:source ./object.js - // source ./listeners.js - var listeners_on, - listeners_off, - listeners_emit; - (function(){ - /** - * Bind listeners to some system events: - * - `error` Any parser or render error - * - `compoCreated` Each time new component is created - * - `config` Each time configuration is changed via `config` fn - * @param {string} eveny - * @param {function} cb - * @memberOf mask - * @method on - */ - listeners_on = function(event, fn) { - (bin[event] || (bin[event] = [])).push(fn); - }; - /** - * Unbind listener - * - `error` Any parser or render error - * - `compoCreated` Each time new component is created - * @param {string} eveny - * @param {function} [cb] - * @memberOf mask - * @method on - */ - listeners_off = function(event, fn){ - if (fn == null) { - bin[event] = []; - return; - } - arr_remove(bin[event], fn); - }; - listeners_emit = function(event){ - var fns = bin[event]; - if (fns == null) { - return false; - } - var imax = fns.length, - i = -1, - args = _Array_slice.call(arguments, 1) - ; - if (imax === 0) { - return false; - } - while ( ++i < imax) { - fns[i].apply(null, args); - } - return true; - }; - - // === private - - var bin = { - compoCreated: null, - error: null - }; - }()); - // end:source ./listeners.js - // source ./reporters.js - var throw_, - parser_error, - parser_warn, - error_, - error_withSource, - error_withNode, - warn_, - warn_withSource, - warn_withNode, - - log, - log_warn, - log_error, - reporter_createErrorNode, - reporter_deprecated; - - (function(){ - (function () { - - if (typeof console === 'undefined') { - log = log_warn = log_error = function(){}; - return; - } - var bind = Function.prototype.bind; - log = bind.call(console.warn , console); - log_warn = bind.call(console.warn , console, 'MaskJS [Warn] :'); - log_error = bind.call(console.error, console, 'MaskJS [Error] :'); - }()); - - var STACK_SLICE = 4; - var MaskError = error_createClass('MaskError', {}, STACK_SLICE); - var MaskWarn = error_createClass('MaskWarn', {}, STACK_SLICE); - - - throw_ = function(error){ - log_error(error); - listeners_emit('error', error); - }; - - error_withSource = delegate_withSource(MaskError, 'error'); - error_withNode = delegate_withNode (MaskError, 'error'); - - warn_withSource = delegate_withSource(MaskWarn, 'warn'); - warn_withNode = delegate_withNode (MaskWarn, 'warn'); - - parser_error = delegate_parserReporter(MaskError, 'error'); - parser_warn = delegate_parserReporter(MaskWarn, 'warn'); - - reporter_createErrorNode = function(message){ - return parser_parse( - 'div style="background:red;color:white;">tt>"""' + message + '"""' - ); - }; - - (function(){ - reporter_deprecated = function(id, message){ - if (_notified[id] !== void 0) { - return; - } - _notified[id] = 1; - log_warn('[deprecated]', message); - }; - var _notified = {}; - }()); - - function delegate_parserReporter(Ctor, type) { - return function(str, source, index, token, state, file) { - var error = new Ctor(str); - var tokenMsg = formatToken(token); - if (tokenMsg) { - error.message += tokenMsg; - } - var stateMsg = formatState(state); - if (stateMsg) { - error.message += stateMsg; - } - var cursorMsg = error_formatSource(source, index, file); - if (cursorMsg) { - error.message += '\n' + cursorMsg; - } - report(error, 'error'); - }; - } - function delegate_withSource(Ctor, type){ - return function(str, source, index, file){ - var error = new Ctor(str); - error.message = '\n' + error_formatSource(source, index, file); - report(error, type); - }; - } - function delegate_withNode(Ctor, type){ - return function(str, node){ - var error = new Ctor(str); - error.message = error.message - + '\n' - + _getNodeStack(node); - - report(error, type); - }; - } - - function _getNodeStack(node){ - var stack = [ node ]; - - var parent = node.parent; - while (parent != null) { - stack.unshift(parent); - parent = parent.parent; - } - var str = ''; - var root = stack[0]; - if (root !== node && is_String(root.source) && node.sourceIndex > -1) { - str += error_formatSource(root.source, node.sourceIndex, root.filename) + '\n'; - } - - str += ' at ' + stack - .map(function(x){ - return x.tagName; - }) - .join(' > '); - - return str; - } - - function report(error, type) { - if (listeners_emit(type, error)) { - return; - } - var fn = type === 'error' ? log_error : log_warn; - fn(error.message); - fn('\n' + error.stack); - } - - function formatToken(token){ - if (token == null) - return ''; - - if (typeof token === 'number') - token = String.fromCharCode(token); - - return ' Invalid token: `'+ token + '`'; - } - - function formatState(state){ - var states = { - '2': 'tag', - '3': 'tag', - '5': 'attribute key', - '6': 'attribute value', - '8': 'literal', - 'var': 'VarStatement', - 'expr': 'Expression' - }; - if (state == null || states[state] == null) - return ''; - - return ' in `' + states[state] + '`'; - } - - }()); - // end:source ./reporters.js - // source ./path.js - var path_getDir, - path_getFile, - path_getExtension, - path_resolveCurrent, - path_normalize, - path_resolveUrl, - path_combine, - path_isRelative, - path_toRelative, - path_appendQuery, - path_toLocalFile - ; - (function(){ - var isWeb = true; - - path_getDir = function(path) { - return path.substring(0, path.lastIndexOf('/') + 1); - }; - path_getFile = function(path) { - path = path - .replace('file://', '') - .replace(/\\/g, '/') - .replace(/\?[^\n]+$/, ''); - - if (/^\/\w+:\/[^\/]/i.test(path)){ - // win32 drive - return path.substring(1); - } - return path; - }; - path_getExtension = function(path) { - var query = path.indexOf('?'); - if (query !== -1) { - path = path.substring(0, query); - } - var match = rgx_EXT.exec(path); - return match == null ? '' : match[1]; - }; - - path_appendQuery = function(path, key, val){ - var conjunctor = path.indexOf('?') === -1 ? '?' : '&'; - return path + conjunctor + key + '=' + val; - }; - - (function(){ - var current_; - - // if (BROWSER) - path_resolveCurrent = function(){ - if (current_ != null) return current_; - - var fn = 'baseURI' in global.document - ? fromBase - : fromLocation; - return (current_ = path_sliceFilename(fn())); - }; - function fromBase() { - var base = global.document.baseURI; - if (base.substring(0, 5) === 'file:') { - return base; - } - return base.replace(global.location.origin, ''); - } - function fromLocation() { - return global.location.pathname; - } - // endif - - - }()); - - - path_normalize = function(path) { - var path_ = path - .replace(/\\/g, '/') - // remove double slashes, but not near protocol - .replace(/([^:\/])\/{2,}/g, '$1/') - // './xx' to relative string - .replace(/^\.\//, '') - // join 'xx/./xx' - .replace(/\/\.\//g, '/') - ; - return path_collapse(path_); - }; - path_resolveUrl = function(path, base) { - var url = path_normalize(path); - if (path_isRelative(url)) { - return path_normalize(path_combine(base || path_resolveCurrent(), url)); - } - if (rgx_PROTOCOL.test(url)) - return url; - - if (url.charCodeAt(0) === 47 /*/*/) { - if (__cfg.base) { - return path_combine(__cfg.base, url); - } - } - return url; - }; - path_isRelative = function(path) { - var c = path.charCodeAt(0); - switch (c) { - case 47: - // / - return false; - case 102: - case 104: - // f || h - return rgx_PROTOCOL.test(path) === false; - } - return true; - }; - path_toRelative = function(path, anchor, base){ - var path_ = path_resolveUrl(path_normalize(path), base), - absolute_ = path_resolveUrl(path_normalize(anchor), base); - - if (path_getExtension(absolute_) !== '') { - absolute_ = path_getDir(absolute_); - } - absolute_ = path_combine(absolute_, '/'); - if (path_.toUpperCase().indexOf(absolute_.toUpperCase()) === 0) { - return path_.substring(absolute_.length); - } - return path; - }; - - path_combine = function() { - var out = '', - imax = arguments.length, - i = -1, x; - while ( ++i < imax ){ - x = arguments[i]; - if (!x) continue; - - x = path_normalize(x); - if (out === '') { - out = x; - continue; - } - if (out[out.length - 1] !== '/') { - out += '/' - } - if (x[0] === '/') { - x = x.substring(1); - } - out += x; - } - return path_collapse(out); - }; - - - - var rgx_PROTOCOL = /^(file|https?):/i, - rgx_SUB_DIR = /[^\/\.]+\/\.\.\//, - rgx_FILENAME = /\/[^\/]+\.\w+(\?.*)?(#.*)?$/, - rgx_EXT = /\.(\w+)$/, - rgx_win32Drive = /(^\/?\w{1}:)(\/|$)/ - ; - - function path_win32Normalize (path){ - path = path_normalize(path); - if (path.substring(0, 5) === 'file:') - return path; - - return 'file:///' + path; - } - - function path_collapse(url_) { - var url = url_; - while (rgx_SUB_DIR.test(url)) { - url = url.replace(rgx_SUB_DIR, ''); - } - return url; - } - function path_ensureTrailingSlash(path) { - if (path.charCodeAt(path.length - 1) === 47 /* / */) - return path; - - return path + '/'; - } - function path_sliceFilename(path) { - return path_ensureTrailingSlash(path.replace(rgx_FILENAME, '')); - } - - }()); - - - // end:source ./path.js - // source ./resource/file.js - var file_get, - file_getScript, - file_getStyle, - file_getJson; - - (function(){ - file_get = function(path, ctr){ - return get(xhr_get, path, ctr); - }; - file_getScript = function(path, ctr){ - return get(script_get, path, ctr); - }; - file_getStyle = function(path, ctr){ - return get(style_get, path, ctr); - }; - file_getJson = function(path, ctr){ - return get(json_get, path, ctr); - }; - - function get(fn, path, ctr) { - path = path_resolveUrl(path, ctr); - - var dfr = Cache[path]; - if (dfr !== void 0) { - return dfr; - } - dfr = new class_Dfr; - fn(path, dfr.pipeCallback()); - return dfr; - } - - var Cache = {}; - - - // source transports/json - var json_get; - (function(){ - json_get = function(path, cb){ - xhr_get(path, function(error, str){ - if (error) { - cb(error); - return; - } - var json; - try { - json = JSON.parse(str); - } catch (error) { - cb('JSON error: ' + String(error)); - return; - } - cb(null, json); - }) - }; - }()); - // end:source transports/json - - // if BROWSER - // source transports/script - var script_get; - (function(){ - script_get = function(path, cb){ - var res = new Resource(path) - .done(function(exports){ - cb(null, exports); - }) - .fail(function(err){ - cb(err); - }); - - ScriptStack.load(res); - }; - - var Resource = class_create(class_Dfr, { - exports: null, - url: null, - state: 0, - constructor: function(url){ - this.url = url; - }, - load: function(){ - if (this.state !== 0) { - return this; - } - this.state = 1; - global.module = {}; - - var self = this; - embedScript(this.url, function(event){ - self.state = 4; - if (event && event.type === 'error') { - self.reject(event); - return; - } - self.resolve(self.exports = global.module.exports); - }); - return this; - } - }); - var ScriptStack; - (function() { - ScriptStack = { - load: function(resource) { - _stack.push(resource); - process(); - } - }; - - var _stack = []; - - function process() { - if (_stack.length === 0) - return; - - var res = _stack[0]; - if (res.state !== 0) - return; - - res.load().always(function(){ - _stack.shift(); - process(); - }); - } - })(); - - var embedScript; - (function(){ - embedScript = function (url, callback) { - var tag = document.createElement('script'); - tag.type = 'text/javascript'; - tag.src = url; - if ('onreadystatechange' in tag) { - tag.onreadystatechange = function() { - (this.readyState === 'complete' || this.readyState === 'loaded') && callback(); - }; - } else { - tag.onload = tag.onerror = callback; - } - if (_head === void 0) { - _head = document.getElementsByTagName('head')[0]; - } - _head.appendChild(tag); - }; - var _head; - }()); - - - }()); - // end:source transports/script - // source transports/style - var style_get; - (function(){ - style_get = function(path, cb){ - embedStyle(path); - // do not wait for the load event - cb(); - }; - - var embedStyle; - (function(){ - embedStyle = function (url, callback) { - var tag = document.createElement('link'); - tag.rel = 'stylesheet'; - tag.href = url; - if ('onreadystatechange' in tag) { - tag.onreadystatechange = function() { - (this.readyState === 'complete' || this.readyState === 'loaded') && callback(); - }; - } else { - tag.onload = tag.onerror = callback; - } - if (_head === void 0) { - _head = document.getElementsByTagName('head')[0]; - } - _head.appendChild(tag); - }; - var _head; - }()); - - - }()); - // end:source transports/style - // source transports/xhr - var xhr_get; - (function(){ - xhr_get = function(path, cb){ - var xhr = new XMLHttpRequest(); - xhr.onreadystatechange = function() { - if (xhr.readyState !== 4) - return; - - var res = xhr.responseText, - status = xhr.status, - err, errMsg; - if (status !== 0 && status !== 200) { - errMsg = res || xhr.statusText; - } - if (status === 0 && res === '') { - errMsg = res || xhr.statusText || 'File is not accessable'; - } - if (errMsg != null) { - err = { - status: status, - content: errMsg - }; - log_warn('File error', path, status); - } - cb(err, res); - }; - xhr.open('GET', path, true); - xhr.send(); - }; - }()); - // end:source transports/xhr - // endif - - - - }()); - // end:source ./resource/file.js - - // end:source util/ - // source api/ - //source config - /** - * Get or Set configuration settings - * - 1 `(name)` - * - 2 `(name, value)` - * - 3 `(object)` - * @see @{link MaskOptions} for all options - * @memberOf mask - * @method config - */ - function mask_config () { - var args = arguments, - length = args.length - if (length === 0) { - return __cfg; - } - if (length === 1) { - var x = args[0] - if (is_Object(x)) { - obj_extend(__cfg, x); - listeners_emit('config', x); - return; - } - if (is_String(x)) { - return obj_getProperty(__cfg, x); - } - } - if (length === 2) { - var prop = args[0]; - if (obj_hasProperty(__cfg, prop) === false) { - log_warn('Unknown configuration property', prop); - } - var x = {}; - obj_setProperty(x , prop, args[1]); - obj_setProperty(__cfg, prop, args[1]); - listeners_emit('config', x); - return; - } - } - //end:source config - // end:source api/ - // source custom/ - var custom_Utils, - custom_Statements, - custom_Attributes, - custom_Tags, - custom_Tags_global, - custom_Tags_defs, - - custom_Parsers, - custom_Parsers_Transform, - custom_Optimizers, - - customUtil_get, - customUtil_$utils, - customUtil_register, - - customTag_get, - customTag_getAll, - customTag_register, - customTag_registerScoped, - customTag_registerFromTemplate, - customTag_registerResolver, - customTag_Resolver, - customTag_Compo_getHandler, - customTag_define, - customTag_Base, - - custom_optimize, - - customStatement_register, - customStatement_get, - - customAttr_register, - customAttr_get - ; - - (function(){ - - // source ./repositories.js - (function(){ - var _HtmlTags = { - /* - * Most common html tags - * http://jsperf.com/not-in-vs-null/3 - */ - a: null, - abbr: null, - article: null, - aside: null, - audio: null, - b: null, - big: null, - blockquote: null, - br: null, - button: null, - canvas: null, - datalist: null, - details: null, - div: null, - em: null, - fieldset: null, - footer: null, - form: null, - h1: null, - h2: null, - h3: null, - h4: null, - h5: null, - h6: null, - header: null, - i: null, - img: null, - input: null, - label: null, - legend: null, - li: null, - menu: null, - nav: null, - ol: null, - option: null, - p: null, - pre: null, - section: null, - select: null, - small: null, - span: null, - strong: null, - svg: null, - table: null, - tbody: null, - td: null, - textarea: null, - tfoot: null, - th: null, - thead: null, - tr: null, - tt: null, - ul: null, - video: null, - }; - var _HtmlAttr = { - 'class' : null, - 'id' : null, - 'style' : null, - 'name' : null, - 'type' : null, - 'value' : null, - 'required': null, - 'disabled': null, - }; - - custom_Utils = { - expression: function(value, model, ctx, element, ctr){ - return expression_eval(value, model, ctx, ctr); - }, - }; - custom_Optimizers = {}; - custom_Statements = {}; - custom_Attributes = obj_extend({}, _HtmlAttr); - custom_Tags = obj_extend({}, _HtmlTags); - custom_Tags_global = obj_extend({}, _HtmlTags); - custom_Parsers = obj_extend({}, _HtmlTags); - custom_Parsers_Transform = obj_extend({}, _HtmlTags); - - // use on server to define reserved tags and its meta info - custom_Tags_defs = {}; - }()); - // end:source ./repositories.js - // source ./tag.js - (function(){ - /** - * Get Components constructor from the global repository or the scope - * @param {string} name - * @param {object} [component] - pass a component to look in its scope - * @returns {IComponent} - * @memberOf mask - * @method getHandler - */ - customTag_get = function(name, ctr) { - if (arguments.length === 0) { - reporter_deprecated('getHandler.all', 'Use `mask.getHandlers` to get all components (also scoped)'); - return customTag_getAll(); - } - var Ctor = custom_Tags[name]; - if (Ctor == null) { - return null; - } - if (Ctor !== Resolver) { - return Ctor; - } - - var ctr_ = is_Function(ctr) ? ctr.prototype : ctr; - while(ctr_ != null) { - if (is_Function(ctr_.getHandler)) { - Ctor = ctr_.getHandler(name); - if (Ctor != null) { - return Ctor; - } - } - ctr_ = ctr_.parent; - } - return custom_Tags_global[name]; - }; - /** - * Get all components constructors from the global repository and/or the scope - * @param {object} [component] - pass a component to look also in its scope - * @returns {object} All components in an object `{name: Ctor}` - * @memberOf mask - * @method getHandlers - */ - customTag_getAll = function(ctr) { - if (ctr == null) { - return custom_Tags; - } - - var obj = {}, - ctr_ = ctr, x; - while (ctr_ != null) { - x = null; - if (is_Function(ctr_.getHandlers)) { - x = ctr_.getHandlers(); - } else { - x = ctr_.__handlers__; - } - if (x != null) { - obj = obj_extendDefaults(obj, x); - } - ctr_ = ctr_.parent; - } - for (var key in custom_Tags) { - x = custom_Tags[key]; - if (x == null || x === Resolver) { - continue; - } - if (obj[key] == null) { - obj[key] = x; - } - } - return obj; - }; - /** - * Register a component - * @param {string} name - * @param {object|IComponent} component - * @param {object} component - Component static definition - * @param {IComponent} component - Components constructor - * @returns {void} - * @memberOf mask - * @method registerHandler - */ - customTag_register = function(mix, Handler){ - if (typeof mix !== 'string' && arguments.length === 3) { - customTag_registerScoped.apply(this, arguments); - return; - } - var Current = custom_Tags[mix], - Ctor = compo_ensureCtor(Handler), - Repo = custom_Tags[mix] === Resolver - ? custom_Tags_global - : custom_Tags - ; - Repo[mix] = Ctor; - - //> make fast properties - obj_toFastProps(custom_Tags); - }; - /** - * Register components from a template - * @param {string} template - Mask template - * @param {object|IComponent} [component] - Register in the components scope - * @param {string} [path] - Optionally define the path for the template - * @returns {Promise} - Fullfills when all submodules are resolved and components are registerd - * @memberOf mask - * @method registerFromTemplate - */ - customTag_registerFromTemplate = function(mix, Ctr, path){ - var dfr = new class_Dfr; - new Module - .ModuleMask(path || '') - .preprocess_(mix, function(error, exports){ - if (error) { - return dfr.reject(error); - } - var store = exports.__handlers__; - for (var key in store) { - if (exports[key] != null) { - // is global - customTag_register(key, store[key]); - continue; - } - customTag_registerScoped(Ctr, key, store[key]); - } - dfr.resolve(exports.__handlers__); - }); - - return dfr; - }; - /** - * Register a component - * @param {object|IComponent} scopedComponent - Use components scope - * @param {string} name - Name of the component - * @param {object|IComponent} component - Components definition - * @returns {void} - * @memberOf mask - * @method registerScoped - */ - customTag_registerScoped = function(Ctx, name, Handler) { - if (Ctx == null) { - // Use global - customTag_register(name, Handler); - return; - } - customTag_registerResolver(name); - var obj = is_Function(Ctx) ? Ctx.prototype : Ctx; - var map = obj.__handlers__; - if (map == null) { - map = obj.__handlers__ = {}; - } - map[name] = compo_ensureCtor(Handler); - - if (obj.getHandler == null) { - obj.getHandler = customTag_Compo_getHandler; - } - }; - - /** Variations: - * - 1. (template) - * - 2. (scopedCompoName, template) - * - 3. (scopedCtr, template) - * - 4. (name, Ctor) - * - 5. (scopedCtr, name, Ctor) - * - 6. (scopedCompoName, name, Ctor) - */ - - function is_Compo(val) { - return is_Object(val) || is_Function(val); - } - - /** - * Universal component definition, which covers all the cases: simple, scoped, template - * - 1. (template) - * - 2. (scopedCompoName, template) - * - 3. (scopedCtr, template) - * - 4. (name, Ctor) - * - 5. (scopedCtr, name, Ctor) - * - 6. (scopedCompoName, name, Ctor) - * @returns {void|Promise} - * @memberOf mask - * @method define - */ - customTag_define = fn_createByPattern([{ - pattern: [is_String], - handler: function(template) { - return customTag_registerFromTemplate(template); - } - }, { - pattern: [is_String, is_String], - handler: function(name, template) { - var Scope = customTag_get(name); - return customTag_registerFromTemplate(template, Scope); - } - }, { - pattern: [is_Compo, is_String], - handler: function(Scope, template) { - return customTag_registerFromTemplate(template, Scope); - } - }, { - pattern: [is_String, is_Compo], - handler: function(name, Ctor) { - return customTag_register(name, Ctor); - } - }, { - pattern: [is_Compo, is_String, is_Compo], - handler: function(Scope, name, Ctor) { - customTag_registerScoped(Scope, name, Ctor); - } - }, { - pattern: [is_String, is_String, is_Compo], - handler: function(scopeName, name, Ctor) { - var Scope = customTag_get(scopeName); - return customTag_registerScoped(Scope, name, Ctor); - } - } - ]); - - - customTag_registerResolver = function(name){ - var Ctor = custom_Tags[name]; - if (Ctor === Resolver) - return; - - if (Ctor != null) - custom_Tags_global[name] = Ctor; - - custom_Tags[name] = Resolver; - - //> make fast properties - obj_toFastProps(custom_Tags); - }; - - customTag_Compo_getHandler = function (name) { - var map = this.__handlers__; - return map == null ? null : map[name]; - }; - - customTag_Base = { - async: false, - attr: null, - await: null, - compoName: null, - components: null, - expression: null, - ID: null, - meta: null, - model: null, - nodes: null, - parent: null, - render: null, - renderEnd: null, - renderStart: null, - tagName: null, - type: null, - }; - - var Resolver; - (function(){ - customTag_Resolver = Resolver = function (node, model, ctx, container, ctr) { - var Mix = customTag_get(node.tagName, ctr); - if (Mix != null) { - if (is_Function(Mix) === false) { - return obj_create(Mix); - } - return new Mix(node, model, ctx, container, ctr); - } - error_withNode('Component not found: ' + node.tagName, node); - return null; - }; - }()); - - function wrapStatic(proto) { - function Ctor(node, parent) { - this.ID = null; - this.tagName = node.tagName; - this.attr = obj_create(node.attr); - this.expression = node.expression; - this.nodes = node.nodes; - this.nextSibling = node.nextSibling; - this.parent = parent; - this.components = null; - } - Ctor.prototype = proto; - return Ctor; - } - - - - function compo_ensureCtor(Handler) { - if (is_Object(Handler)) { - //> static - Handler.__Ctor = wrapStatic(Handler); - } - return Handler; - } - - }()); - // end:source ./tag.js - // source ./attribute.js - /** - * Register an attribute handler. Any changes can be made to: - * - maskNode's template - * - current element value - * - controller - * - model - * Note: Attribute wont be set to an element. - * @param {string} name - Attribute name to handle - * @param {string} [mode] - Render mode `client|server|both` - * @param {AttributeHandler} handler - * @returns {void} - * @memberOf mask - * @method registerAttrHandler - */ - customAttr_register = function(attrName, mix, Handler){ - if (is_Function(mix)) { - Handler = mix; - } - custom_Attributes[attrName] = Handler; - }; - /** - * Get attribute handler - * @param {string} name - * @returns {AttributeHandler} - * @memberOf mask - * @method getAttrHandler - */ - customAttr_get = function(attrName){ - return attrName != null - ? custom_Attributes[attrName] - : custom_Attributes; - }; - /** - * Is called when the builder matches the node by attribute name - * @callback AttributeHandler - * @param {MaskNode} node - * @param {string} attrValue - * @param {object} model - * @param {object} ctx - * @param {DomNode} element - * @param {object} parentComponent - */ - // end:source ./attribute.js - // source ./util.js - (function() { - /** - * Utils Repository - * @param {string} name - * @param {(IUtilHandler|UtilHandler)} handler - * @memberOf mask - * @name _ - * @category Mask Util - */ - customUtil_$utils = {}; - /** - * Register Util Handler. Template Example: `'~[myUtil: value]'` - * @param {string} name - * @param {(mask._.IUtilHandler|mask._.FUtilHandler)} handler - * @memberOf mask - * @method getUtil - * @category Mask Util - */ - customUtil_register = function(name, mix) { - if (is_Function(mix)) { - custom_Utils[name] = mix; - return; - } - custom_Utils[name] = createUtil(mix); - if (mix['arguments'] === 'parsed') - customUtil_$utils[name] = mix.process; - }; - /** - * Get the Util Handler - * @param {string} name - * @memberOf mask - * @method registerUtil - * @category Mask Util - */ - customUtil_get = function(name) { - return name != null ? custom_Utils[name] : custom_Utils; - }; - - function createUtil(obj) { - if (obj['arguments'] === 'parsed') { - return processParsedDelegate(obj.process); - } - var fn = fn_proxy(obj.process || processRawFn, obj); - // save reference to the initial util object. - // Mask.Bootstrap needs the original util - // @workaround - fn.util = obj; - return fn; - } - function processRawFn(expr, model, ctx, el, ctr, attrName, type) { - if ('node' === type) { - this.nodeRenderStart(expr, model, ctx, el, ctr); - return this.node(expr, model, ctx, el, ctr); - } - // asume 'attr' - this.attrRenderStart(expr, model, ctx, el, ctr, attrName); - return this.attr(expr, model, ctx, el, ctr, attrName); - } - function processParsedDelegate(fn) { - return function(expr, model, ctx, el, ctr) { - var args = expression_evalStatements( - expr, model, ctx, ctr - ); - return fn.apply(null, args); - }; - } - /** - * Is called when the builder matches the interpolation. - * Define `process` function OR group of `node*`,`attr*` functions. - * The seperation `*RenderStart/*` is needed for Nodejs rendering - the first part is called on nodejs side, - * the other one is called on the client. - * @typedef IUtilHandler - * @type {object} - * @property {bool} [arguments=false] - should parse interpolation string to arguments, otherwise raw string is passed - * @property {UtilHandler} [process] - * @property {function} [nodeRenderStart] - `expr, model, ctx, element, controller, attrName` - * @property {function} [node] - `expr, model, ctx, element, controller` - * @property {function} [attr] - `expr, model, ctx, element, controller, attrName` - * @property {function} [attrRenderStart] - `expr, model, ctx, element, controller, attrName` - * @abstract - * @category Mask Util - */ - var IUtilHandler = { - 'arguments': null, - 'process': null, - 'nodeRenderStart': null, - 'node': null, - 'attrRenderStart': null, - 'attr': null, - }; - /** - * Is called when the builder matches the interpolation - * @param {string} value - string after the utility name - * @param {object} model - * @param {("attr"|"node")} type - Current location: text node or attribute - * @param {HTMLNode} element - * @param {string} name - If the interpolation is in attribute, then this will contain attributes name - * @typedef UtilHandler - * @type {function} - * @abstract - * @category Mask Util - */ - function UtilHandler() {} - }()); - // end:source ./util.js - // source ./statement.js - /** - * Register a statement handler - * @param {string} name - Tag name to handle - * @param StatementHandler} handler - * @memberOf mask - * @method registerStatement - */ - customStatement_register = function(name, handler){ - //@TODO should it be not allowed to override system statements, if, switch? - custom_Statements[name] = is_Function(handler) - ? { render: handler } - : handler - ; - }; - /** - * Get statement handler - * @param {string} name - * @returns {StatementHandler} - * @memberOf mask - * @method getStatement - */ - customStatement_get = function(name){ - return name != null - ? custom_Statements[name] - : custom_Statements - ; - }; - /** - * Is called when the builder matches the node by tagName - * @callback StatementHandler - * @param {MaskNode} node - * @param {object} model - * @param {object} ctx - * @param {DomNode} container - * @param {object} parentComponent - * @param {Array} children - `out` Fill the array with rendered elements - */ - // end:source ./statement.js - // source ./optimize.js - (function(){ - custom_optimize = function(){ - var i = _arr.length; - while (--i > -1) { - readProps(_arr[i]); - } - i = _arr.length; - while(--i > -1) { - defineProps(_arr[i]); - obj_toFastProps(_arr[i]); - } - obj_toFastProps(custom_Attributes); - }; - var _arr = [ - custom_Statements, - custom_Tags, - custom_Parsers, - custom_Parsers_Transform - ]; - var _props = {}; - function readProps(obj) { - for (var key in obj) { - _props[key] = null; - } - } - function defineProps(obj) { - for (var key in _props) { - if (obj[key] === void 0) { - obj[key] = null; - } - } - } - }()); - // end:source ./optimize.js - - }()); - - // end:source custom/ - // source expression/ - /** - * ExpressionUtil - * - * Helper to work with expressions - **/ - var expression_eval, - expression_evalStatements, - ExpressionUtil; - - (function(){ - - // source 1.scope-vars.js - - var index = 0, - length = 0, - cache = {}, - template, ast; - - var op_Minus = '-', //1, - op_Plus = '+', //2, - op_Divide = '/', //3, - op_Multip = '*', //4, - op_Modulo = '%', //5, - - op_LogicalOr = '||', //6, - op_LogicalAnd = '&&', //7, - op_LogicalNot = '!', //8, - op_LogicalEqual = '==', //9, - op_LogicalEqual_Strict = '===', // 111 - op_LogicalNotEqual = '!=', //11, - op_LogicalNotEqual_Strict = '!==', // 112 - op_LogicalGreater = '>', //12, - op_LogicalGreaterEqual = '>=', //13, - op_LogicalLess = '<', //14, - op_LogicalLessEqual = '<=', //15, - op_Member = '.', // 16 - - punc_ParantheseOpen = 20, - punc_ParantheseClose = 21, - punc_BracketOpen = 22, - punc_BracketClose = 23, - punc_BraceOpen = 24, - punc_BraceClose = 25, - punc_Comma = 26, - punc_Dot = 27, - punc_Question = 28, - punc_Colon = 29, - punc_Semicolon = 30, - - go_ref = 31, - go_acs = 32, - go_string = 33, - go_number = 34, - go_objectKey = 35; - - var type_Body = 1, - type_Statement = 2, - type_SymbolRef = 3, - type_FunctionRef = 4, - type_Accessor = 5, - type_AccessorExpr = 6, - type_Value = 7, - - - type_Number = 8, - type_String = 9, - type_Object = 10, - type_Array = 11, - type_UnaryPrefix = 12, - type_Ternary = 13; - - var state_body = 1, - state_arguments = 2; - - - var precedence = {}; - - precedence[op_Member] = 1; - - precedence[op_Divide] = 2; - precedence[op_Multip] = 2; - - precedence[op_Minus] = 3; - precedence[op_Plus] = 3; - - precedence[op_LogicalGreater] = 4; - precedence[op_LogicalGreaterEqual] = 4; - precedence[op_LogicalLess] = 4; - precedence[op_LogicalLessEqual] = 4; - - precedence[op_LogicalEqual] = 5; - precedence[op_LogicalEqual_Strict] = 5; - precedence[op_LogicalNotEqual] = 5; - precedence[op_LogicalNotEqual_Strict] = 5; - - - precedence[op_LogicalAnd] = 6; - precedence[op_LogicalOr] = 6; - - // end:source 1.scope-vars.js - // source 2.ast.js - var Ast_Body, - Ast_Statement, - Ast_Value, - Ast_Array, - Ast_Object, - Ast_FunctionRef, - Ast_SymbolRef, - Ast_Accessor, - Ast_AccessorExpr, - Ast_UnaryPrefix, - Ast_TernaryStatement - ; - - - (function(){ - - Ast_Body = function(parent) { - this.parent = parent; - this.type = type_Body; - this.body = []; - this.join = null; - }; - - Ast_Statement = function(parent) { - this.parent = parent; - }; - - Ast_Statement.prototype = { - constructor: Ast_Statement, - type: type_Statement, - join: null, - body: null - }; - - Ast_Value = function(value) { - this.type = type_Value; - this.body = value; - this.join = null; - }; - - Ast_Array = function(parent){ - this.type = type_Array; - this.parent = parent; - this.body = new Ast_Body(this); - }; - - Ast_Object = function(parent){ - this.type = type_Object; - this.parent = parent; - this.props = {}; - } - Ast_Object.prototype = { - nextProp: function(prop){ - var body = new Ast_Statement(this); - this.props[prop] = body; - return body; - }, - }; - - Ast_FunctionRef = function(parent, ref) { - this.parent = parent; - this.type = type_FunctionRef; - this.body = ref; - this.arguments = []; - this.next = null; - } - Ast_FunctionRef.prototype = { - constructor: Ast_FunctionRef, - newArgument: function() { - var body = new Ast_Body(this); - this.arguments.push(body); - - return body; - } - }; - - Ast_SymbolRef = function(parent, ref) { - this.type = type_SymbolRef; - this.parent = parent; - this.body = ref; - this.next = null; - }; - Ast_Accessor = function(parent, ref) { - this.type = type_Accessor; - this.parent = parent; - this.body = ref; - this.next = null; - }; - Ast_AccessorExpr = function(parent){ - this.parent = parent; - this.body = new Ast_Statement(this); - this.body.body = new Ast_Body(this.body); - this.next = null; - }; - Ast_AccessorExpr.prototype = { - type: type_AccessorExpr, - getBody: function(){ - return this.body.body; - } - }; - - - Ast_UnaryPrefix = function(parent, prefix) { - this.parent = parent; - this.prefix = prefix; - }; - Ast_UnaryPrefix.prototype = { - constructor: Ast_UnaryPrefix, - type: type_UnaryPrefix, - body: null - }; - - - Ast_TernaryStatement = function(assertions){ - this.body = assertions; - this.case1 = new Ast_Body(this); - this.case2 = new Ast_Body(this); - }; - Ast_TernaryStatement.prototype = { - constructor: Ast_TernaryStatement, - type: type_Ternary, - case1: null, - case2: null - }; - - }()); - // end:source 2.ast.js - // source 2.ast.utils.js - var ast_handlePrecedence, - ast_append; - - (function(){ - - - ast_append = function(current, next) { - switch(current.type) { - case type_Body: - current.body.push(next); - return next; - - case type_Statement: - if (next.type === type_Accessor || next.type === type_AccessorExpr) { - return (current.next = next) - } - /* fall through */ - case type_UnaryPrefix: - return (current.body = next); - - case type_SymbolRef: - case type_FunctionRef: - case type_Accessor: - case type_AccessorExpr: - return (current.next = next); - } - - return util_throw('Invalid expression'); - }; - - - ast_handlePrecedence = function(ast) { - if (ast.type !== type_Body){ - - if (ast.body != null && typeof ast.body === 'object') - ast_handlePrecedence(ast.body); - - return; - } - - var body = ast.body, - i = 0, - length = body.length, - x, prev, array; - - for(; i < length; i++){ - ast_handlePrecedence(body[i]); - } - - - for(i = 1; i < length; i++){ - x = body[i]; - prev = body[i-1]; - - if (precedence[prev.join] > precedence[x.join]) - break; - - } - - if (i === length) - return; - - - array = [body[0]]; - for(i = 1; i < length; i++){ - x = body[i]; - prev = body[i-1]; - - var prec_Prev = precedence[prev.join]; - if (prec_Prev > precedence[x.join] && i < length - 1){ - - var start = i, - nextJoin, - arr; - - // collect all with join smaller or equal to previous - // 5 == 3 * 2 + 1 -> 5 == (3 * 2 + 1); - while (++i < length){ - nextJoin = body[i].join; - if (nextJoin == null) - break; - - if (prec_Prev <= precedence[nextJoin]) - break; - } - - arr = body.slice(start, i + 1); - x = ast_join(arr); - ast_handlePrecedence(x); - } - - array.push(x); - } - - ast.body = array; - - }; - - // = private - - function ast_join(bodyArr){ - if (bodyArr.length === 0) - return null; - - var body = new Ast_Body(bodyArr[0].parent); - - body.join = bodyArr[bodyArr.length - 1].join; - body.body = bodyArr; - - return body; - } - - - }()); - // end:source 2.ast.utils.js - // source 3.util.js - var util_resolveRef, - util_throw; - - (function(){ - - util_throw = function(msg, token){ - return parser_error(msg - , template - , index - , token - , 'expr' - ); - }; - - util_resolveRef = function(astRef, model, ctx, ctr) { - var controller = ctr, - current = astRef, - key = astRef.body, - object, - value, - args, - i, - imax - ; - - if ('$c' === key) { - reporter_deprecated( - 'accessor.compo', "Use `$` instead of `$c`." - ); - key = '$'; - } - if ('$u' === key) { - reporter_deprecated( - 'accessor.util', "Use `_` instead of `$u`" - ); - key = '_'; - } - if ('$a' === key) { - reporter_deprecated( - 'accessor.attr', "Use `$.attr` instead of `$a`" - ); - } - - if ('$' === key) { - value = controller; - - var next = current.next, - nextBody = next != null && next.body; - if (nextBody != null && value[nextBody] == null){ - - if (next.type === type_FunctionRef && is_Function(Compo.prototype[nextBody])) { - // use fn from prototype if possible, like `closest` - object = controller; - value = Compo.prototype[nextBody]; - current = next; - } else { - // find the closest controller, which has the property - while (true) { - value = value.parent; - if (value == null) - break; - - if (value[nextBody] == null) - continue; - - object = value; - value = value[nextBody]; - current = next; - break; - } - } - - if (value == null) { - // prepair for warn message - key = '$.' + nextBody; - current = next; - } - } - - } - - else if ('$a' === key) { - value = controller && controller.attr; - } - - else if ('_' === key) { - value = customUtil_$utils; - } - - - else if ('$ctx' === key) { - value = ctx; - } - - else if ('$scope' === key) { - var next = current.next, - nextBody = next != null && next.body; - - if (nextBody != null) { - while (controller != null) { - object = controller.scope; - if (object != null) { - value = object[nextBody]; - } - if (value != null) { - break; - } - controller = controller.parent; - } - current = next; - } - } - - else { - // scope resolver - - if (model != null) { - object = model; - value = model[key]; - } - - if (value == null) { - - while (controller != null) { - object = controller.scope; - - if (object != null) - value = object[key]; - - if (value != null) - break; - - controller = controller.parent; - } - } - } - - if (value == null) { - if (current == null || current.next != null){ - // notify that value is not in model, ctx, controller; - log_warn(' Accessor error:', key); - } - return null; - } - - do { - if (current.type === type_FunctionRef) { - - args = []; - i = -1; - imax = current.arguments.length; - - while( ++i < imax ) { - args[i] = expression_evaluate( - current.arguments[i] - , model - , ctx - , controller - ); - } - - value = value.apply(object, args); - } - - if (value == null || current.next == null) { - break; - } - - current = current.next; - key = current.type === type_AccessorExpr - ? expression_evaluate(current.body, model, ctx, controller) - : current.body - ; - - object = value; - value = value[key]; - - if (value == null) - break; - - } while (true); - - return value; - }; - - - }()); - - - // end:source 3.util.js - // source 4.parser.helper.js - var parser_skipWhitespace, - parser_getString, - parser_getNumber, - parser_getArray, - parser_getObject, - parser_getRef, - parser_getDirective - ; - - (function(){ - parser_skipWhitespace = function() { - var c; - while (index < length) { - c = template.charCodeAt(index); - if (c > 32) - return c; - index++; - } - return null; - }; - parser_getString = function(c) { - var isEscaped = false, - _char = c === 39 ? "'" : '"', - start = index, - nindex, string; - - while ((nindex = template.indexOf(_char, index)) > -1) { - index = nindex; - if (template.charCodeAt(nindex - 1) !== 92 /*'\\'*/ ) { - break; - } - isEscaped = true; - index++; - } - - string = template.substring(start, index); - if (isEscaped === true) { - string = string.replace(__rgxEscapedChar[_char], _char); - } - return string; - }; - - parser_getNumber = function() { - var start = index, - code, isDouble; - while (true) { - - code = template.charCodeAt(index); - if (code === 46) { - // . - if (isDouble === true) { - util_throw('Invalid number', code); - return null; - } - isDouble = true; - } - if ((code >= 48 && code <= 57 || code === 46) && index < length) { - index++; - continue; - } - break; - } - return +template.substring(start, index); - }; - - - parser_getRef = function() { - var start = index, - c = template.charCodeAt(index), - ref; - - if (c === 34 || c === 39) { - // ' | " - index++; - ref = parser_getString(c); - index++; - return ref; - } - - while (true) { - - if (index === length) - break; - - c = template.charCodeAt(index); - - if (c === 36 || c === 95) { - // $ _ - index++; - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - index++; - continue; - } - // - [removed] (exit on not allowed chars) 5ba755ca - break; - } - return template.substring(start, index); - }; - - parser_getDirective = function(code) { - if (code == null && index === length) - return null; - - switch (code) { - case 40: - // ( - return punc_ParantheseOpen; - case 41: - // ) - return punc_ParantheseClose; - case 123: - // { - return punc_BraceOpen; - case 125: - // } - return punc_BraceClose; - case 91: - // [ - return punc_BracketOpen; - case 93: - // ] - return punc_BracketClose; - case 44: - // , - return punc_Comma; - case 46: - // . - return punc_Dot; - case 59: - // ; - return punc_Semicolon; - case 43: - // + - return op_Plus; - case 45: - // - - return op_Minus; - case 42: - // * - return op_Multip; - case 47: - // / - return op_Divide; - case 37: - // % - return op_Modulo; - - case 61: - // = - if (template.charCodeAt(++index) !== code) { - util_throw( - 'Assignment violation: View can only access model/controllers', '=' - ); - return null; - } - if (template.charCodeAt(index + 1) === code) { - index++; - return op_LogicalEqual_Strict; - } - return op_LogicalEqual; - case 33: - // ! - if (template.charCodeAt(index + 1) === 61) { - // = - index++; - - if (template.charCodeAt(index + 1) === 61) { - // = - index++; - return op_LogicalNotEqual_Strict; - } - - return op_LogicalNotEqual; - } - return op_LogicalNot; - case 62: - // > - if (template.charCodeAt(index + 1) === 61) { - index++; - return op_LogicalGreaterEqual; - } - return op_LogicalGreater; - case 60: - // < - if (template.charCodeAt(index + 1) === 61) { - index++; - return op_LogicalLessEqual; - } - return op_LogicalLess; - case 38: - // & - if (template.charCodeAt(++index) !== code) { - util_throw( - 'Not supported: Bitwise AND', code - ); - return null; - } - return op_LogicalAnd; - case 124: - // | - if (template.charCodeAt(++index) !== code) { - util_throw( - 'Not supported: Bitwise OR', code - ); - return null; - } - return op_LogicalOr; - case 63: - // ? - return punc_Question; - case 58: - // : - return punc_Colon; - } - - if ((code >= 65 && code <= 90) || - (code >= 97 && code <= 122) || - (code === 95) || - (code === 36)) { - // A-Z a-z _ $ - return go_ref; - } - - if (code >= 48 && code <= 57) { - // 0-9 . - return go_number; - } - - if (code === 34 || code === 39) { - // " ' - return go_string; - } - - util_throw( - 'Unexpected or unsupported directive', code - ); - return null; - }; - }()); - // end:source 4.parser.helper.js - // source 5.parser.js - /* - * earlyExit - only first statement/expression is consumed - */ - function expression_parse(expr, earlyExit) { - if (earlyExit == null) - earlyExit = false; - - template = expr; - index = 0; - length = expr.length; - - ast = new Ast_Body(); - - var current = ast, - state = state_body, - c, next, directive; - - outer: while (true) { - - if (index < length && (c = template.charCodeAt(index)) < 33) { - index++; - continue; - } - - if (index >= length) - break; - - directive = parser_getDirective(c); - - if (directive == null && index < length) { - break; - } - if (directive === punc_Semicolon) { - if (earlyExit === true) - return [ast, index]; - - break; - } - - if (earlyExit === true) { - var p = current.parent; - if (p != null && p.type === type_Body && p.parent == null) { - // is in root body - if (directive === go_ref) - return [ast, index]; - } - } - - if (directive === punc_Semicolon) { - break; - } - - switch (directive) { - case punc_ParantheseOpen: - current = ast_append(current, new Ast_Statement(current)); - current = ast_append(current, new Ast_Body(current)); - - index++; - continue; - case punc_ParantheseClose: - var closest = type_Body; - if (state === state_arguments) { - state = state_body; - closest = type_FunctionRef; - } - - do { - current = current.parent; - } while (current != null && current.type !== closest); - - if (closest === type_Body) { - current = current.parent; - } - - if (current == null) { - util_throw('OutOfAst Exception', c); - break outer; - } - index++; - continue; - - case punc_BraceOpen: - current = ast_append(current, new Ast_Object(current)); - directive = go_objectKey; - index++; - break; - case punc_BraceClose: - while (current != null && current.type !== type_Object){ - current = current.parent; - } - index++; - continue; - case punc_Comma: - if (state !== state_arguments) { - - state = state_body; - do { - current = current.parent; - } while (current != null && - current.type !== type_Body && - current.type !== type_Object - ); - index++; - if (current == null) { - util_throw('Unexpected comma', c); - break outer; - } - - if (current.type === type_Object) { - directive = go_objectKey; - break; - } - - continue; - } - do { - current = current.parent; - } while (current != null && current.type !== type_FunctionRef); - - if (current == null) { - util_throw('OutOfAst Exception', c); - break outer; - } - - current = current.newArgument(); - - index++; - continue; - - case punc_Question: - ast = new Ast_TernaryStatement(ast); - current = ast.case1; - index++; - continue; - - case punc_Colon: - current = ast.case2; - index++; - continue; - - - case punc_Dot: - c = template.charCodeAt(index + 1); - if (c >= 48 && c <= 57) { - directive = go_number; - } else { - directive = current.type === type_Body - ? go_ref - : go_acs - ; - index++; - } - break; - case punc_BracketOpen: - if (current.type === type_SymbolRef || - current.type === type_AccessorExpr || - current.type === type_Accessor - ) { - current = ast_append(current, new Ast_AccessorExpr(current)) - current = current.getBody(); - index++; - continue; - } - current = ast_append(current, new Ast_Array(current)); - current = current.body; - index++; - continue; - case punc_BracketClose: - do { - current = current.parent; - } while (current != null && - current.type !== type_AccessorExpr && - current.type !== type_Array - ); - index++; - continue; - } - - - if (current.type === type_Body) { - current = ast_append(current, new Ast_Statement(current)); - } - - if ((op_Minus === directive || op_LogicalNot === directive) && current.body == null) { - current = ast_append(current, new Ast_UnaryPrefix(current, directive)); - index++; - continue; - } - - switch (directive) { - - case op_Minus: - case op_Plus: - case op_Multip: - case op_Divide: - case op_Modulo: - - case op_LogicalAnd: - case op_LogicalOr: - case op_LogicalEqual: - case op_LogicalEqual_Strict: - case op_LogicalNotEqual: - case op_LogicalNotEqual_Strict: - - case op_LogicalGreater: - case op_LogicalGreaterEqual: - case op_LogicalLess: - case op_LogicalLessEqual: - - while (current && current.type !== type_Statement) { - current = current.parent; - } - - if (current.body == null) { - return util_throw( - 'Unexpected operator', c - ); - } - - current.join = directive; - - do { - current = current.parent; - } while (current != null && current.type !== type_Body); - - if (current == null) { - return util_throw( - 'Unexpected operator' , c - ); - } - - - index++; - continue; - case go_string: - case go_number: - if (current.body != null && current.join == null) { - return util_throw( - 'Directive expected', c - ); - } - if (go_string === directive) { - index++; - ast_append(current, new Ast_Value(parser_getString(c))); - index++; - - } - - if (go_number === directive) { - ast_append(current, new Ast_Value(parser_getNumber(c))); - } - - continue; - - case go_ref: - case go_acs: - var ref = parser_getRef(); - - if (directive === go_ref) { - - if (ref === 'null') - ref = null; - - if (ref === 'false') - ref = false; - - if (ref === 'true') - ref = true; - - if (typeof ref !== 'string') { - ast_append(current, new Ast_Value(ref)); - continue; - } - } - while (index < length) { - c = template.charCodeAt(index); - if (c < 33) { - index++; - continue; - } - break; - } - - if (c === 40) { - - // ( - // function ref - state = state_arguments; - index++; - - var fn = ast_append(current, new Ast_FunctionRef(current, ref)); - - current = fn.newArgument(); - continue; - } - - var Ctor = directive === go_ref - ? Ast_SymbolRef - : Ast_Accessor - current = ast_append(current, new Ctor(current, ref)); - break; - case go_objectKey: - if (parser_skipWhitespace() === 125) - continue; - - - var key = parser_getRef(); - - if (parser_skipWhitespace() !== 58) { - //: - return util_throw( - 'Object parser. Semicolon expeted', c - ); - } - index++; - current = current.nextProp(key); - directive = go_ref; - continue; - } - } - - if (current.body == null && - current.type === type_Statement) { - - return util_throw( - 'Unexpected end of expression', c - ); - } - - ast_handlePrecedence(ast); - - return ast; - } - // end:source 5.parser.js - // source 6.eval.js - function expression_evaluate(mix, model, ctx, controller) { - - var result, ast; - - if (null == mix) - return null; - - if ('.' === mix) - return model; - - if (typeof mix === 'string'){ - ast = cache.hasOwnProperty(mix) === true - ? (cache[mix]) - : (cache[mix] = expression_parse(mix)) - ; - }else{ - ast = mix; - } - if (ast == null) - return null; - - var type = ast.type, - i, x, length; - - if (type_Body === type) { - var value, prev; - - outer: for (i = 0, length = ast.body.length; i < length; i++) { - x = ast.body[i]; - - value = expression_evaluate(x, model, ctx, controller); - - if (prev == null || prev.join == null) { - prev = x; - result = value; - continue; - } - - if (prev.join === op_LogicalAnd) { - if (!result) { - for (; i < length; i++) { - if (ast.body[i].join === op_LogicalOr) { - break; - } - } - }else{ - result = value; - } - } - - if (prev.join === op_LogicalOr) { - if (result){ - break outer; - } - if (value) { - result = value; - break outer; - } - } - - switch (prev.join) { - case op_Minus: - result -= value; - break; - case op_Plus: - result += value; - break; - case op_Divide: - result /= value; - break; - case op_Multip: - result *= value; - break; - case op_Modulo: - result %= value; - break; - case op_LogicalNotEqual: - /* jshint eqeqeq: false */ - result = result != value; - /* jshint eqeqeq: true */ - break; - case op_LogicalNotEqual_Strict: - result = result !== value; - break; - case op_LogicalEqual: - /* jshint eqeqeq: false */ - result = result == value; - /* jshint eqeqeq: true */ - break; - case op_LogicalEqual_Strict: - result = result === value; - break; - case op_LogicalGreater: - result = result > value; - break; - case op_LogicalGreaterEqual: - result = result >= value; - break; - case op_LogicalLess: - result = result < value; - break; - case op_LogicalLessEqual: - result = result <= value; - break; - } - - prev = x; - } - } - - if (type_Statement === type) { - result = expression_evaluate(ast.body, model, ctx, controller); - if (ast.next == null) - return result; - - return util_resolveRef(ast.next, result); - } - - if (type_Value === type) { - return ast.body; - } - if (type_Array === type) { - var body = ast.body.body, - imax = body.length, - i = -1; - - result = new Array(imax); - while( ++i < imax ){ - result[i] = expression_evaluate(body[i], model, ctx, controller); - } - return result; - } - if (type_Object === type) { - result = {}; - var props = ast.props; - for(var key in props){ - result[key] = expression_evaluate(props[key], model, ctx, controller); - } - return result; - } - - if (type_SymbolRef === type || - type_FunctionRef === type || - type_AccessorExpr === type || - type_Accessor === type) { - return util_resolveRef(ast, model, ctx, controller); - } - - if (type_UnaryPrefix === type) { - result = expression_evaluate(ast.body, model, ctx, controller); - switch (ast.prefix) { - case op_Minus: - result = -result; - break; - case op_LogicalNot: - result = !result; - break; - } - } - - if (type_Ternary === type){ - result = expression_evaluate(ast.body, model, ctx, controller); - result = expression_evaluate(result ? ast.case1 : ast.case2, model, ctx, controller); - - } - - return result; - } - - // end:source 6.eval.js - // source 7.eval_statements.js - function expression_evaluateStatements(expr, model, ctx, ctr){ - - var body = expression_parse(expr).body, - args = [], - imax = body.length, - i = -1 - ; - var group = new Ast_Body; - while( ++i < imax ){ - group.body.push(body[i]); - if (body[i].join != null) - continue; - - args.push(expression_evaluate(group, model, ctx, ctr)); - group.body.length = 0; - } - return args; - } - // end:source 7.eval_statements.js - // source 8.vars.helper.js - var refs_extractVars; - (function() { - - /** - * extract symbol references - * ~[:user.name + 'px'] -> 'user.name' - * ~[:someFn(varName) + user.name] -> ['varName', 'user.name'] - * - * ~[:someFn().user.name] -> {accessor: (Accessor AST function call) , ref: 'user.name'} - */ - - - refs_extractVars = function(expr, model, ctx, ctr){ - if (typeof expr === 'string') - expr = expression_parse(expr); - - return _extractVars(expr, model, ctx, ctr); - }; - - - - function _extractVars(expr, model, ctx, ctr) { - - if (expr == null) - return null; - - var exprType = expr.type, - refs, x; - if (type_Body === exprType) { - - var body = expr.body, - imax = body.length, - i = -1; - while ( ++i < imax ){ - x = _extractVars(body[i], model, ctx, ctr); - refs = _append(refs, x); - } - } - - if (type_SymbolRef === exprType || - type_Accessor === exprType || - type_AccessorExpr === exprType) { - - var path = expr.body, - next = expr.next, - nextType; - - while (next != null) { - nextType = next.type; - if (type_FunctionRef === nextType) { - return _extractVars(next, model, ctx, ctr); - } - if ((type_SymbolRef !== nextType) && - (type_Accessor !== nextType) && - (type_AccessorExpr !== nextType)) { - - log_error('Ast Exception: next should be a symbol/function ref'); - return null; - } - - var prop = nextType === type_AccessorExpr - ? expression_evaluate(next.body, model, ctx, ctr) - : next.body - ; - if (typeof prop !== 'string') { - log_warn('Can`t extract accessor name', path); - return null; - } - path += '.' + prop; - next = next.next; - } - - return path; - } - - - switch (exprType) { - case type_Statement: - case type_UnaryPrefix: - case type_Ternary: - x = _extractVars(expr.body, model, ctx, ctr); - refs = _append(refs, x); - break; - } - - // get also from case1 and case2 - if (type_Ternary === exprType) { - x = _extractVars(ast.case1, model, ctx, ctr); - refs = _append(refs, x); - - x = _extractVars(ast.case2, model, ctx, ctr); - refs = _append(refs, x); - } - - - if (type_FunctionRef === exprType) { - var args = expr.arguments, - imax = args.length, - i = -1; - while ( ++i < imax ){ - x = _extractVars(args[i], model, ctx, ctr); - refs = _append(refs, x); - } - - x = null; - var parent = expr; - outer: while ((parent = parent.parent)) { - switch (parent.type) { - case type_SymbolRef: - case type_Accessor: - case type_AccessorExpr: - x = parent.body + (x == null ? '' : '.' + x); - break; - case type_Body: - case type_Statement: - break outer; - default: - x = null; - break outer; - } - } - - if (x != null) { - refs = _append(refs, x); - } - - if (expr.next) { - x = _extractVars(expr.next, model, ctx, ctr); - refs = _append(refs, {accessor: _getAccessor(expr), ref: x}); - } - } - - return refs; - } - - function _append(current, x) { - if (current == null) { - return x; - } - - if (x == null) { - return current; - } - - if (!(typeof current === 'object' && current.length != null)) { - current = [current]; - } - - if (!(typeof x === 'object' && x.length != null)) { - - if (current.indexOf(x) === -1) { - current.push(x); - } - - return current; - } - - for (var i = 0, imax = x.length; i < imax; i++) { - if (current.indexOf(x[i]) === -1) { - current.push(x[i]); - } - } - - return current; - - } - - function _getAccessor(current) { - - var parent = current; - - outer: while (parent.parent) { - switch (parent.parent.type) { - case type_Body: - case type_Statement: - break outer; - } - parent = parent.parent; - } - - return _copy(parent, current.next); - } - - function _copy(ast, stop) { - - if (ast === stop || ast == null) { - return null; - } - - if (typeof ast !== 'object') { - return ast; - } - - if (ast.length != null && typeof ast.splice === 'function') { - - var arr = []; - - for (var i = 0, imax = ast.length; i < imax; i++){ - arr[i] = _copy(ast[i], stop); - } - - return arr; - } - - - var clone = {}; - for (var key in ast) { - if (ast[key] == null || key === 'parent') { - continue; - } - clone[key] = _copy(ast[key], stop); - } - - return clone; - } - - }()); - - // end:source 8.vars.helper.js - - expression_eval = expression_evaluate; - expression_evalStatements = expression_evaluateStatements; - ExpressionUtil = { - 'parse': expression_parse, - - /** - * Expression.eval(expression [, model, cntx, controller]) -> result - * - expression (String): Expression, only accessors are supoorted - * - * All symbol and function references will be looked for in - * - * 1. model, or via special accessors: - * - `$c` controller - * - `$ctx` - * - `$a' controllers attributes - * 2. scope: - * controller.scope - * controller.parent.scope - * ... - * - * Sample: - * '(user.age + 20) / 2' - * 'fn(user.age + "!") + x' - **/ - 'eval': expression_evaluate, - 'varRefs': refs_extractVars, - - // Return all values of a comma delimiter expressions - // like argumets: ' foo, bar, "4,50" ' => [ %fooValue, %barValue, "4,50" ] - 'evalStatements': expression_evaluateStatements - }; - - }()); - - // end:source expression/ - // source dom/ - var Dom; - - (function(){ - - var dom_NODE = 1, - dom_TEXTNODE = 2, - dom_FRAGMENT = 3, - dom_COMPONENT = 4, - dom_CONTROLLER = 9, - dom_SET = 10, - dom_STATEMENT = 15 - ; - - // source 1.utils.js - function _appendChild(el){ - var nodes = this.nodes; - if (nodes == null) { - this.nodes = [el]; - return; - } - - var length = nodes.length; - if (length !== 0) { - var prev = nodes[length - 1]; - if (prev != null) { - prev.nextSibling = el; - } - } - - nodes.push(el); - } - // end:source 1.utils.js - // source 2.Node.js - /** - * @name MaskNode - * @type {class} - * @property {type} [type=1] - * @property {object} attr - * @property {string} tagName - * @property {Array.} nodes - * @property {IMaskNode} parent - * @property {string} expression - * @property {function} appendChild - * @memberOf mask.Dom - */ - var Node = class_create({ - constructor: function Node(tagName, parent) { - this.type = Dom.NODE; - this.tagName = tagName; - this.parent = parent; - this.attr = {}; - }, - __single: null, - appendChild: _appendChild, - attr: null, - expression: null, - nodes: null, - parent: null, - sourceIndex: -1, - stringify: null, - tagName: null, - type: dom_NODE, - }); - - // end:source 2.Node.js - // source 3.TextNode.js - /** - * @name TextNode - * @type {class} - * @property {type} [type=2] - * @property {(string|function)} content - * @property {IMaskNode} parent - * @memberOf mask.Dom - */ - var TextNode = class_create({ - constructor: function(text, parent) { - this.content = text; - this.parent = parent; - }, - type: dom_TEXTNODE, - content: null, - parent: null - }); - - // end:source 3.TextNode.js - // source 4.Component.js - function Component(compoName, parent, controller){ - this.tagName = compoName; - this.parent = parent; - this.controller = controller; - this.attr = {}; - } - Component.prototype = { - constructor: Component, - type: dom_COMPONENT, - parent: null, - attr: null, - controller: null, - nodes: null, - components: null, - model: null, - modelRef: null - }; - - // end:source 4.Component.js - // source 5.Fragment.js - var Fragment = class_create({ - type: dom_FRAGMENT, - nodes: null, - appendChild: _appendChild, - source: '' - }); - // end:source 5.Fragment.js - - /** - * Dom - * @type {object} - * @memberOf mask - */ - Dom = { - NODE: dom_NODE, - TEXTNODE: dom_TEXTNODE, - FRAGMENT: dom_FRAGMENT, - COMPONENT: dom_COMPONENT, - CONTROLLER: dom_CONTROLLER, - SET: dom_SET, - STATEMENT: dom_STATEMENT, - - Node: Node, - TextNode: TextNode, - Fragment: Fragment, - Component: Component - }; - /** - * @interface - * @typedef IMaskNode - * @type {class} - * @property {number} type - */ - }()); - - // end:source dom/ - // source statements/ - // source ./01.if.js - (function(){ - - function getNodes(node, model, ctx, ctr){ - function evaluate(expr){ - return expression_eval(expr, model, ctx, ctr); - } - - if (evaluate(node.expression)) - return node.nodes; - - while (true) { - node = node.nextSibling; - - if (node == null || node.tagName !== 'else') - break; - - var expr = node.expression; - if (expr == null || expr === '' || evaluate(expr)) - return node.nodes; - } - - return null; - } - - custom_Statements['if'] = { - getNodes: getNodes, - render: function(node, model, ctx, container, ctr, childs){ - - var nodes = getNodes(node, model, ctx, ctr); - if (nodes == null) - return; - - builder_build(nodes, model, ctx, container, ctr, childs); - } - }; - - }()); - - // end:source ./01.if.js - // source ./02.for.js - - (function(){ - var FOR_OF_ITEM = 'for..of::item', - FOR_IN_ITEM = 'for..in::item'; - - custom_Statements['for'] = { - - render: function(node, model, ctx, container, ctr, children){ - - parse_For(node.expression); - - var value = expression_eval(__ForDirective[3], model, ctx, ctr); - if (value == null) - return; - - build( - value, - __ForDirective, - node.nodes, - model, - ctx, - container, - ctr, - children - ); - }, - - build: build, - parseFor: parse_For, - createForNode: createForItemNode, - getNodes: getNodes, - - getHandler: function(compoName, model){ - return createForItemHandler(compoName, model); - } - }; - - (function(){ - custom_Tags[FOR_OF_ITEM] = createBootstrapCompo(FOR_OF_ITEM); - custom_Tags[FOR_IN_ITEM] = createBootstrapCompo(FOR_IN_ITEM); - - function createBootstrapCompo(name) { - function For_Item(){} - For_Item.prototype = { - meta: { - serializeScope: true - }, - serializeScope: for_proto_serializeScope, - type: Dom.COMPONENT, - compoName: name, - renderEnd: handler_proto_renderEnd, - dispose: handler_proto_dispose - }; - return For_Item; - } - }()); - - - function build(value, For, nodes, model, ctx, container, ctr, childs) { - - builder_build( - getNodes(nodes, value, For[0], For[1], For[2], For[3]), - model, - ctx, - container, - ctr, - childs - ); - } - - function getNodes(nodes, value, prop1, prop2, type, expr) { - - if ('of' === type) { - if (is_Array(value) === false) { - log_error(' Value is not enumerable', value); - return null; - } - return loop_Array(nodes, value, prop1, prop2, expr); - } - - if ('in' === type) { - if (typeof value !== 'object') { - log_warn(' Value is not an object', value); - return null; - } - if (is_Array(value)) - log_warn(' Consider to use `for..of` for Arrays'); - - return loop_Object(nodes, value, prop1, prop2, expr); - } - } - - function loop_Array(template, arr, prop1, prop2, expr){ - - var i = -1, - imax = arr.length, - nodes = new Array(imax), - scope; - - while ( ++i < imax ) { - scope = {}; - scope[prop1] = arr[i]; - - if (prop2) - scope[prop2] = i; - - nodes[i] = createForItemNode( - FOR_OF_ITEM - , template - , scope - , i - , prop1 - , expr - ); - } - - return nodes; - } - - function loop_Object(template, obj, prop1, prop2, expr){ - var nodes = [], - i = 0, - scope, key, value; - - for (key in obj) { - value = obj[key]; - scope = {}; - scope[prop1] = key; - - if (prop2) - scope[prop2] = value; - - nodes[i++] = createForItemNode( - FOR_IN_ITEM - , template - , scope - , key - , prop2 - , expr - ); - } - return nodes; - } - - function createForItemNode(name, nodes, scope, key, propVal, expr) { - return { - type: Dom.COMPONENT, - tagName: name, - nodes: nodes, - controller: createForItemHandler(name, scope, key, propVal, expr) - }; - } - function createForItemHandler(name, scope, key, propVal, expr) { - return { - meta: { - serializeScope: true, - }, - compoName: name, - scope: scope, - elements: null, - - propVal: propVal, - key: key, - expression: expr, - - renderEnd: handler_proto_renderEnd, - dispose: handler_proto_dispose, - serializeScope: for_proto_serializeScope - }; - } - - function handler_proto_renderEnd(elements) { - this.elements = elements; - } - function handler_proto_dispose() { - if (this.elements) - this.elements.length = 0; - } - function for_proto_serializeScope(scope, model) { - var ctr = this, - expr = ctr.expression, - key = ctr.key, - propVal = ctr.propVal; - - - var val = scope[propVal]; - if (val != null && typeof val === 'object') - scope[propVal] = '$ref:(' + expr + ')."' + key + '"'; - - return scope; - } - - - var __ForDirective = [ 'prop1', 'prop2', 'in|of', 'expression' ], - i_PROP_1 = 0, - i_PROP_2 = 1, - i_TYPE = 2, - i_EXPR = 3, - - state_prop = 1, - state_multiprop = 2, - state_loopType = 3 - ; - - var template, - index, - length - ; - - function parse_For(expr) { - // /([\w_$]+)((\s*,\s*([\w_$]+)\s*\))|(\s*\))|(\s+))(of|in)\s+([\w_$\.]+)/ - - template = expr; - length = expr.length; - index = 0; - - var prop1, - prop2, - loopType, - hasBrackets, - c - ; - - c = parser_skipWhitespace(); - if (c === 40) { - // ( - hasBrackets = true; - index++; - parser_skipWhitespace(); - } - - prop1 = parser_getVarDeclaration(); - - c = parser_skipWhitespace(); - if (c === 44) { - //, - - if (hasBrackets !== true) { - return throw_('Parenthese must be used in multiple var declarion'); - } - - index++; - parser_skipWhitespace(); - prop2 = parser_getVarDeclaration(); - } - - if (hasBrackets) { - c = parser_skipWhitespace(); - - if (c !== 41) - return throw_('Closing parenthese expected'); - - index++; - } - - c = parser_skipWhitespace(); - - var loopType; - - if (c === 105 && template.charCodeAt(++index) === 110) { - // i n - loopType = 'in'; - } - - if (c === 111 && template.charCodeAt(++index) === 102) { - // o f - loopType = 'of'; - } - - if (loopType == null) { - return throw_('Invalid FOR statement. (in|of) expected'); - } - - __ForDirective[0] = prop1; - __ForDirective[1] = prop2; - __ForDirective[2] = loopType; - __ForDirective[3] = template.substring(++index); - - - return __ForDirective; - } - - function parser_skipWhitespace(){ - var c; - for(; index < length; index++ ){ - c = template.charCodeAt(index); - if (c < 33) - continue; - - return c; - } - - return -1; - } - - function parser_getVarDeclaration(){ - var start = index, - var_, c; - - for (; index < length; index++) { - - c = template.charCodeAt(index); - - if (c > 48 && c < 57) { - // 0-9 - if (start === index) - return throw_('Variable name begins with a digit'); - - continue; - } - - if ( - (c === 36) || // $ - (c === 95) || // _ - (c >= 97 && c <= 122) || // a-z - (c >= 65 && c <= 90) // A-Z - ) { - - continue; - } - - break; - } - - if (start === index) - return throw_('Variable declaration expected'); - - return template.substring(start, index); - } - - function throw_(message) { - throw new Error( ' ' - + message - + ' `' - + template.substring(index, 20) - + '`' - ); - } - - }()); - - - // end:source ./02.for.js - // source ./03.each.js - (function(){ - - custom_Statements['each'] = { - render: function(node, model, ctx, container, ctr, children){ - - var array = expression_eval(node.expression, model, ctx, ctr); - if (array == null) - return; - - builder_build( - getNodes(node, array) - , array - , ctx - , container - , ctr - , children - ); - } - }; - - function getNodes(node, array){ - var imax = array.length, - nodes = new Array(imax), - template = node.nodes, - expression = node.expression, - exprPrefix = expression === '.' - ? '."' - : '(' + node.expression + ')."', - i = 0; - for(; i < imax; i++){ - nodes[i] = createEachNode(template, array[i], exprPrefix, i); - } - return nodes; - } - function createEachNode(nodes, model, exprPrefix, i){ - return { - type: Dom.COMPONENT, - tagName: 'each::item', - nodes: nodes, - controller: createEachItemHandler(model, i, exprPrefix) - }; - } - function createEachItemHandler(model, i, exprPrefix) { - return { - compoName: 'each::item', - model: model, - scope: { - index: i - }, - modelRef: exprPrefix + i + '"', - attr: null, - meta: null - }; - } - }()); - // end:source ./03.each.js - // source ./04.with.js - custom_Statements['with'] = { - render: function(node, model, ctx, el, ctr, elements){ - var obj = expression_eval( - node.expression - , model - , ctx - , ctr - ); - builder_build( - node.nodes - , obj - , ctx - , el - , ctr - , elements - ); - } - }; - // end:source ./04.with.js - // source ./05.switch.js - (function(){ - custom_Statements['switch'] = { - render: function(node, model, ctx, el, ctr, elements){ - - var value = expression_eval(node.expression, model, ctx, ctr), - nodes = getNodes(value, node.nodes, model, ctx, ctr); - if (nodes == null) - return; - - builder_build(nodes, model, ctx, el, ctr, elements); - }, - - getNodes: getNodes - }; - - - function getNodes(value, nodes, model, ctx, ctr) { - if (nodes == null) - return null; - - var imax = nodes.length, - i = -1, - - child, expr, - case_, default_; - - while ( ++i < imax ){ - child = nodes[i]; - - if (child.tagName === 'default') { - default_ = child; - continue; - } - - if (child.tagName !== 'case') { - log_warn(' Case expected', child.tagName); - continue; - } - expr = child.expression; - if (!expr) { - log_warn(' Expression expected'); - continue; - } - - /* jshint eqeqeq: false */ - if (expression_eval(expr, model, ctx, ctr) == value) { - /* jshint eqeqeq: true */ - case_ = child; - break; - } - } - - if (case_ == null) - case_ = default_; - - return case_ != null - ? case_.nodes - : null - ; - } - - }()); - - - // end:source ./05.switch.js - // source ./09.visible.js - (function(){ - custom_Statements['visible'] = { - toggle: toggle, - render: function(node, model, ctx, container, ctr, children){ - var els = []; - builder_build(node.nodes, model, ctx, container, ctr, els); - arr_pushMany(children, els) - - var visible = expression_eval(node.expression, model, ctx, ctr); - toggle(els, visible); - } - }; - function toggle(els, visible){ - for(var i = 0; i < els.length; i++){ - els[i].style.display = visible ? '' : 'none'; - } - } - }()); - - // end:source ./09.visible.js - // source ./10.repeat.js - (function(){ - custom_Statements['repeat'] = { - render: function(node, model, ctx, container, ctr, children){ - var run = expression_eval, - str = node.expression, - repeat = str.split('..'), - index = + run(repeat[0] || '', model, ctx, ctr), - length = + run(repeat[1] || '', model, ctx, ctr); - - if (index !== index || length !== length) { - log_error('Repeat attribute(from..to) invalid', str); - return; - } - - var nodes = node.nodes; - var arr = []; - var i = -1; - while (++i < length) { - arr[i] = compo_init( - 'repeat::item', - nodes, - model, - i, - container, - ctr - ); - } - - var els = []; - builder_build(arr, model, ctx, container, ctr, els); - arr_pushMany(children, els); - } - }; - - function compo_init(name, nodes, model, index, container, parent) { - return { - type: Dom.COMPONENT, - compoName: name, - attr: {}, - nodes: nodes, - model: model, - container: container, - parent: parent, - index: index, - scope: { - index: index - } - }; - } - }()); - - // end:source ./10.repeat.js - // end:source statements/ - // source formatter/stringify_stream - var mask_stringify, - mask_stringifyAttr; - (function () { - - var defaultOptions = { - minify: true, - indent: 4, - indentChar: ' ' - }; - - /** - * Serialize Mask AST to the Mask string (@analog to `JSON.stringify`) - * @param {MaskNode} node - MaskNode - * @param {(object|number)} [opts] - Indent count option or an object with options - * @param {number} [opts.indent=0] - Indent count, `0` for minimization - * @param {bool} [opts.minify=true] - * @param {bool} [opts.minimizeAttributes=true] - Remove quotes when possible - * @returns {string} - * @memberOf mask - * @method stringify - */ - mask_stringify = function(input, opts) { - if (input == null) - return ''; - - if (typeof input === 'string') - input = parser_parse(input); - - if (opts == null) { - opts = obj_create(defaultOptions); - } else if (typeof opts === 'number'){ - var indent = opts; - opts = obj_create(defaultOptions); - opts.indent = indent; - opts.minify = indent === 0; - } else{ - opts = obj_extendDefaults(opts, defaultOptions); - if (opts.indent > 0) { - opts.minify = false; - } - if (opts.minify === true) { - opts.indent = 0; - } - } - - return new Stream(input, opts).toString(); - }; - - mask_stringifyAttr = function(attr){ - var str = '', - key, x, part; - for (key in attr) { - x = getString(attr[key]); - - if (str.length !== 0) { - str += ' '; - } - str += key; - - if (x !== key) { - str += "=" + wrapString(x); - } - } - return str; - }; - - var Stream = class_create({ - string: '', - indent: 0, - indentStr: '', - minify: false, - opts: null, - ast : null, - constructor: function(ast, opts) { - this.opts = opts; - this.ast = ast; - this.minify = opts.minify; - this.indentStr = doindent(opts.indent, opts.indentChar); - }, - toString: function(){ - this.process(this.ast, this); - return this.string; - }, - process: function(mix){ - if (mix.type === Dom.FRAGMENT) { - mix = mix.nodes; - } - if (is_ArrayLike(mix)) { - var imax = mix.length, - i = -1; - while ( ++i < imax ){ - if (i !== 0) { - this.newline(); - } - this.processNode(mix[i]); - } - return; - } - this.processNode(mix); - }, - processNode: function(node) { - var stream = this; - if (is_Function(node.stringify)) { - var str = node.stringify(stream); - if (str != null) { - stream.write(str); - } - return; - } - if (is_String(node.content)) { - stream.write(wrapString(node.content)); - return; - } - if (is_Function(node.content)){ - stream.write(wrapString(node.content())); - return; - } - - this.processHead(node); - - if (isEmpty(node)) { - stream.print(';'); - return; - } - if (isSingle(node)) { - stream.openBlock('>'); - stream.processNode(getSingle(node)); - stream.closeBlock(null); - return; - } - - stream.openBlock('{'); - stream.process(node.nodes); - stream.closeBlock('}'); - }, - processHead: function(node) { - var stream = this, - str = '', - id, cls, expr - ; - - var attr = node.attr; - if (attr != null) { - id = attr.id; - cls = attr['class']; - if (typeof id === 'function') { - id = id(); - } - if (id != null && id.indexOf(' ') !== -1) { - id = null; - } - if (id != null) { - str += '#' + id; - } - if (typeof cls === 'function') { - cls = cls(); - } - if (cls != null) { - str += '.' + cls.trim().replace(/\s+/g, '.'); - } - - for(var key in attr) { - if (key === 'id' && id != null) { - continue; - } - if (key === 'class' && cls != null) { - continue; - } - var val = attr[key]; - if (val == null) { - continue; - } - - str += ' ' + key; - if (val === key) { - continue; - } - - if (is_Function(val)) { - val = val(); - } - if (is_String(val)) { - if (stream.minify === false || /[^\w_$\-\.]/.test(val)){ - val = wrapString(val); - } - } - - str += '=' + val; - } - } - - if (isTagNameOptional(node, id, cls) === false) { - str = node.tagName + str; - } - - var expr = node.expression; - if (expr != null) { - if (typeof expr === 'function') { - expr = expr(); - } - if (stream.minify === false) { - str += ' '; - } - str += '(' + expr + ')'; - } - - if (this.minify === false) { - str = doindent(this.indent, this.indentStr) + str; - } - stream.print(str); - }, - - newline: function(){ - if (this.minify === false) { - this.string += '\n'; - } - }, - openBlock: function(c){ - this.indent++; - if (this.minify === false) { - this.string += ' ' + c + '\n'; - return; - } - this.string += c; - }, - closeBlock: function(c){ - this.indent--; - if (c != null) { - this.newline(); - this.write(c); - } - }, - write: function(str){ - if (this.minify === true) { - this.string += str; - return; - } - var prfx = doindent(this.indent, this.indentStr); - this.string += str.replace(/^/gm, prfx); - }, - print: function(str){ - this.string += str; - } - }); - - function doindent(count, c) { - var output = ''; - while (count--) { - output += c; - } - return output; - } - - function isEmpty(node) { - return node.nodes == null || (is_ArrayLike(node.nodes) && node.nodes.length === 0); - } - - function isSingle(node) { - var arr = node.nodes; - if (arr == null) { - return true; - } - var isArray = typeof arr.length === 'number'; - if (isArray && arr.length > 1) { - return false; - } - var x = isArray ? arr[0] : arr; - return x.stringify == null; - } - function isTagNameOptional(node, id, cls) { - if (id == null && cls == null) { - return false; - } - var tagName = node.tagName; - if (tagName === 'div') { - return true; - } - return false; - } - function getSingle(node) { - if (is_ArrayLike(node.nodes)) - return node.nodes[0]; - - return node.nodes; - } - - function wrapString(str) { - if (str.indexOf("'") === -1) - return "'" + str + "'"; - - if (str.indexOf('"') === -1) - return '"' + str + '"'; - - return '"' + str.replace(/"/g, '\\"') + '"'; - } - - function getString(mix) { - return is_Function(mix) ? mix() : mix; - } - - }()); - - // end:source formatter/stringify_stream - // source feature/ - // source run - var mask_run; - (function(){ - /** - * Find all `"); - } - - ready = true; - if (await === 0) { - flush(); - } - function resumer(){ - if (--await === 0 && ready) - flush(); - } - function flush() { - if (is_Function(ctr.renderEnd)) { - ctr.renderEnd(container, model); - } - Compo.signal.emitIn(ctr, 'domInsert'); - } - - return ctr; - } - - function _insertDelegate(fragment, script, done) { - return function(){ - script.parentNode.insertBefore(fragment, script); - done(); - }; - } - - if (document != null && document.addEventListener) { - document.addEventListener("DOMContentLoaded", function(event) { - if (_state !== 0) return; - var _app; - _state = _state_Auto; - _app = mask_run(); - _state = _state_Manual; - - if (_app == null) return; - if (global.app == null) { - global.app = _app; - return; - } - var source = _app.components - if (source == null || source.length === 0) { - return; - } - var target = global.app.components - if (target == null || target.length === 0) { - global.app.components = source; - return; - } - target.push.apply(target, source); - }); - } - - var _state_Auto = 2, - _state_Manual = 4, - _state_All = _state_Auto | _state_Manual, - _state = 0; - - function isCurrent(state) { - return (_state & state) === state; - } - }()); - // end:source run - // source merge - var mask_merge; - (function(){ - /** - * Join two Mask templates or DOM trees - * @param {(string|MaskNode)} a - first template - * @param {(string|MaskNode)} b - second template - * @param {(MaskNode|Component)} [owner] - * @param {object} [opts] - * @param {bool} [opts.extending=false] - Clean the merged tree from all unused placeholders - * @returns {MaskNode} New joined Mask DOM tree - * @memberOf mask - * @method merge - */ - mask_merge = function(a, b, owner, opts){ - if (typeof a === 'string') { - a = parser_parse(a); - } - if (typeof b === 'string') { - b = parser_parse(b); - } - if (a == null || (is_ArrayLike(a) && a.length === 0)) { - return b; - } - - var placeholders = _resolvePlaceholders(b, b, new Placeholders(null, b, opts)); - var out = _merge(a, placeholders, owner); - var extra = placeholders.$extra; - if (extra != null && extra.length !== 0) { - if (is_Array(out)) { - return out.concat(extra); - } - return [ out ].concat(extra); - } - return out; - }; - - var tag_ELSE = '@else', - tag_IF = '@if', - tag_EACH = '@each', - tag_PLACEHOLDER = '@placeholder', - - dom_NODE = Dom.NODE, - dom_TEXTNODE = Dom.TEXTNODE, - dom_FRAGMENT = Dom.FRAGMENT, - dom_STATEMENT = Dom.STATEMENT, - dom_COMPONENT = Dom.COMPONENT - ; - - function _merge(node, placeholders, tmplNode, clonedParent){ - if (node == null) - return null; - - var fn; - if (is_Array(node)) { - fn = _mergeArray; - } else { - switch(node.type){ - case dom_TEXTNODE: - fn = _cloneTextNode; - break; - case dom_NODE: - case dom_STATEMENT: - fn = _mergeNode; - break; - case dom_FRAGMENT: - fn = _mergeFragment; - break; - case dom_COMPONENT: - fn = _mergeComponent; - break; - } - } - if (fn !== void 0) { - return fn(node, placeholders, tmplNode, clonedParent); - } - log_warn('Uknown type', node.type); - return null; - } - function _mergeArray(nodes, placeholders, tmplNode, clonedParent){ - if (nodes == null) { - return null; - } - var fragment = [], - imax = nodes.length, - i = -1, - x, node; - while( ++i < imax ) { - node = nodes[i]; - - if (node.tagName === tag_ELSE) { - // check previous - if (x != null) - continue; - - if (node.expression && !eval_(node.expression, placeholders, tmplNode)) - continue; - - x = _merge(nodes[i].nodes, placeholders, tmplNode, clonedParent) - } - else { - x = _merge(node, placeholders, tmplNode, clonedParent); - } - - appendAny(fragment, x); - } - return fragment; - } - function _mergeFragment(frag, placeholders, tmplNode, clonedParent) { - var fragment = new Dom.Fragment; - fragment.parent = clonedParent; - fragment.nodes = _mergeArray(frag.nodes, placeholders, tmplNode, fragment); - return fragment; - } - function _mergeComponent(node, placeholders, tmplNode, clonedParent) { - if (node.nodes == null) - return node; - - var cloned = new Dom.Component; - obj_extend(cloned, node); - cloned.nodes = _merge(cloned.nodes, placeholders, tmplNode, clonedParent); - return cloned; - } - function _mergeNode(node, placeholders, tmplNode, clonedParent){ - var tagName = node.tagName; - if (tagName.charCodeAt(0) !== 64) { - // @ - return _cloneNode(node, placeholders, tmplNode, clonedParent); - } - - var id = node.attr.id; - if (tagName === tag_PLACEHOLDER && id == null) { - if (tmplNode != null) { - var tagName_ = tmplNode.tagName; - if (tagName_ != null && tmplNode.tagName.charCodeAt(0) === 64 /*@*/) { - return tmplNode.nodes - } - } - id = '$root'; - placeholders.$extra = null; - } - - if (tag_EACH === tagName) { - var arr = placeholders.$getNode(node.expression), - x; - if (arr == null) { - if (node.attr.optional == null) { - error_withNode('No template node: @' + node.expression, node); - } - return null; - } - if (is_Array(arr) === false) { - x = arr; - return _merge( - node.nodes - , _resolvePlaceholders(x.nodes, x.nodes, new Placeholders(placeholders)) - , x - , clonedParent - ); - } - var fragment = new Dom.Fragment, - imax = arr.length, - i = -1; - while ( ++i < imax ){ - x = arr[i]; - appendAny(fragment, _merge( - node.nodes - , _resolvePlaceholders(x.nodes, x.nodes, new Placeholders(placeholders)) - , x - , clonedParent - )); - } - return fragment; - } - if (tag_IF === tagName) { - var val = eval_(node.expression, placeholders, tmplNode); - return val - ? _merge(node.nodes, placeholders, tmplNode, clonedParent) - : null - ; - } - - if (id == null) - id = tagName.substring(1); - - var content = placeholders.$getNode(id, node.expression); - if (content == null) { - if (placeholders.opts.extending === true) { - return node; - } - return null; - } - - if (content.parent) - _modifyParents(clonedParent, content.parent); - - - var contentNodes = content.nodes, - wrapperNode; - if (node.attr.as !== void 0) { - var tagName_ = node.attr.as; - wrapperNode = { - type: dom_NODE, - tagName: tagName_, - attr: _mergeAttr(node.attr, content.attr, placeholders, tmplNode), - parent: clonedParent, - nodes: contentNodes - }; - wrapperNode.attr.as = null; - } - - if (node.nodes == null) { - return _merge((wrapperNode || contentNodes), placeholders, tmplNode, clonedParent); - } - - var nodes = _merge( - node.nodes - , _resolvePlaceholders(contentNodes, contentNodes, new Placeholders(placeholders)) - , content - , wrapperNode || clonedParent - ); - if (wrapperNode != null) { - wrapperNode.nodes = nodes; - return wrapperNode; - } - return nodes; - } - function _mergeAttr(a, b, placeholders, tmplNode){ - if (a == null || b == null) - return a || b; - - var out = interpolate_obj_(a, placeholders, tmplNode); - for (var key in b){ - out[key] = interpolate_str_(b[key], placeholders, tmplNode); - } - return out; - } - - function _cloneNode(node, placeholders, tmplNode, clonedParent){ - var tagName = node.tagName || node.compoName; - switch (tagName) { - case ':template': - var id = interpolate_str_(node.attr.id, placeholders, tmplNode); - Mask.templates.register(id, node.nodes); - return null; - case ':import': - var id = interpolate_str_(node.attr.id, placeholders, tmplNode), - nodes = Mask.templates.resolve(node, id); - return _merge(nodes, placeholders, tmplNode, clonedParent); - case 'define': - case 'function': - case 'var': - case 'import': - case 'script': - case 'style': - case 'slot': - case 'event': - return node; - case 'include': - var tagName = node.attr.id; - if (tagName == null) { - tagName = attr_first(node.attr); - } - tagName = interpolate_str_(tagName, placeholders, tmplNode); - - var handler = customTag_get(tagName, tmplNode); - if (handler != null) { - var proto = handler.prototype; - var tmpl = proto.template || proto.nodes; - - placeholders = _resolvePlaceholders( - node.nodes, - node.nodes, - new Placeholders(placeholders, node.nodes) - ); - return _merge(tmpl, placeholders, tmplNode, clonedParent); - } - break; - default: - var handler = customTag_get(tagName, tmplNode); - if (handler != null) { - var proto = handler.prototype; - if (proto && proto.meta != null && proto.meta.template === 'merge') { - return node; - } - } - break; - } - - var outnode = { - type: node.type, - tagName: tagName, - attr: interpolate_obj_(node.attr, placeholders, tmplNode), - expression: interpolate_str_(node.expression, placeholders, tmplNode), - controller: node.controller, - parent: clonedParent, - nodes: null - }; - if (node.nodes) - outnode.nodes = _merge(node.nodes, placeholders, tmplNode, outnode); - - return outnode; - } - function _cloneTextNode(node, placeholders, tmplNode, clonedParent){ - return { - type: node.type, - content: interpolate_str_(node.content, placeholders, tmplNode), - parent: clonedParent - }; - } - function interpolate_obj_(obj, placeholders, node){ - var clone = _Object_create(obj), - x; - for(var key in clone){ - x = clone[key]; - if (x == null) - continue; - - clone[key] = interpolate_str_(x, placeholders, node); - } - return clone; - } - function interpolate_str_(mix, placeholders, node){ - var index = -1, - isFn = false, - str = mix; - - if (typeof mix === 'function') { - isFn = true; - str = mix(); - } - if (typeof str !== 'string' || (index = str.indexOf('@')) === -1) - return mix; - - var result = str.substring(0, index), - length = str.length, - isBlockEntry = str.charCodeAt(index + 1) === 91, // [ - last = -1, - c; - - while (index < length) { - // interpolation - last = index; - if (isBlockEntry === true) { - index = str.indexOf(']', last); - if (index === -1) - index = length; - last += 2; - } - else { - while (index < length) { - c = str.charCodeAt(++index); - if (c === 36 || c === 95 || c === 46) { - // $ _ . - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - continue; - } - break; - } - } - - var expr = str.substring(last, index), - fn = isBlockEntry ? eval_ : interpolate_, - x = fn(expr, placeholders, node); - - if (x != null) { - result += x; - } - else if (placeholders.opts.extending === true) { - result += isBlockEntry ? ('@[' + expr + ']') : expr - } - - // tail - last = isBlockEntry ? (index + 1) : index; - index = str.indexOf('@', index); - if (index === -1) - index = length; - - result += str.substring(last, index); - } - - return isFn - ? parser_ensureTemplateFunction(result) - : result - ; - } - function interpolate_(path, placeholders, node) { - var index = path.indexOf('.'); - if (index === -1) { - log_warn('Merge templates. Accessing node', path); - return null; - } - var tagName = path.substring(0, index), - id = tagName.substring(1), - property = path.substring(index + 1), - obj = null; - - if (node != null) { - if (tagName === '@attr') { - return interpolate_getAttr_(node, placeholders, property); - } - else if (tagName === '@counter') { - return interpolate_getCounter_(property); - } - else if (tagName === node.tagName) - obj = node; - } - - if (obj == null) - obj = placeholders.$getNode(id); - - if (obj == null) { - //- log_error('Merge templates. Node not found', tagName); - return null; - } - return obj_getProperty(obj, property); - } - - function interpolate_getAttr_(node, placeholders, prop) { - var x = node.attr && node.attr[prop]; - var el = placeholders; - while (x == null && el != null) { - x = el.attr && el.attr[prop]; - el = el.parent; - } - return x; - } - - var interpolate_getCounter_; - (function(){ - var _counters = {}; - interpolate_getCounter_ = function(prop) { - var i = _counters[prop] || 0; - return (_counters[prop] = ++i); - }; - }()); - - function appendAny(node, mix){ - if (mix == null) - return; - if (typeof mix.concat === 'function') { - var imax = mix.length; - for (var i = 0; i < imax; i++) { - appendAny(node, mix[i]); - } - return; - } - if (mix.type === dom_FRAGMENT) { - appendAny(node, mix.nodes); - return; - } - - if (typeof node.appendChild === 'function') { - node.appendChild(mix); - return; - } - - var l = node.length; - if (l > 0) { - var prev = node[l - 1]; - prev.nextSibling = mix; - } - node.push(mix); - } - - var RESERVED = ' else placeholder each attr if parent scope' - function _resolvePlaceholders(root, node, placeholders) { - if (node == null) - return placeholders; - - if (is_Array(node)) { - var imax = node.length, - i = -1; - while( ++i < imax ){ - _resolvePlaceholders(node === root ? node[i] : root, node[i], placeholders); - } - return placeholders; - } - - var type = node.type; - if (type === dom_TEXTNODE) - return placeholders; - - if (type === dom_NODE) { - var tagName = node.tagName; - if (tagName != null && tagName.charCodeAt(0) === 64) { - // @ - placeholders.$count++; - var id = tagName.substring(1); - // if DEBUG - if (RESERVED.indexOf(' ' + id + ' ') !== -1) - log_error('MaskMerge. Reserved Name', id); - // endif - var x = { - tagName: node.tagName, - parent: _getParentModifiers(root, node), - nodes: node.nodes, - attr: node.attr, - expression: node.expression - }; - if (placeholders[id] == null) { - placeholders[id] = x; - } else { - var current = placeholders[id]; - if (is_Array(current)) { - current.push(x); - } - else { - placeholders[id] = [current, x]; - } - } - return placeholders; - } - } - - var count = placeholders.$count; - var out = _resolvePlaceholders(root, node.nodes, placeholders); - if (root === node && count === placeholders.$count) { - placeholders.$extra.push(root); - } - return out; - } - function _getParentModifiers(root, node) { - if (node === root) - return null; - - var current, parents, parent = node.parent; - while (true) { - if (parent == null) - break; - if (parent === root && root.type !== dom_NODE) - break; - - var p = { - type: parent.type, - tagName: parent.tagName, - attr: parent.attr, - controller: parent.controller, - expression: parent.expression, - nodes: null, - parent: null - }; - - if (parents == null) { - current = parents = p; - } else { - current.parent = p; - current = p; - } - parent = parent.parent; - } - return parents; - } - function _modifyParents(clonedParent, parents){ - var nodeParent = clonedParent, modParent = parents; - while(nodeParent != null && modParent != null){ - - if (modParent.tagName) - nodeParent.tagName = modParent.tagName; - - if (modParent.expression) - nodeParent.expression = modParent.expression; - - for(var key in modParent.attr){ - nodeParent.attr[key] = modParent.attr[key]; - } - - nodeParent = nodeParent.parent; - modParent = modParent.parent; - } - } - - function eval_(expr, placeholders, tmplNode) { - if (tmplNode != null) { - placeholders.attr = tmplNode.attr; - } - return expression_eval(expr, placeholders, null, placeholders); - } - function Placeholders(parent, nodes, opts){ - var $root = null; - if (nodes != null) { - $root = new Dom.Node(tag_PLACEHOLDER); - $root.nodes = nodes; - } - this.scope = this; - this.parent = parent; - this.$root = $root || (parent && parent.$root); - this.$extra = []; - - if (opts != null) { - this.opts = opts; - } - else if (parent != null) { - this.opts = parent.opts; - } - } - Placeholders.prototype = { - opts: { - extending: false - }, - parent: null, - attr: null, - scope: null, - $root: null, - $extra: null, - $count: 0, - $getNode: function(id, filter){ - var ctx = this, node; - while(ctx != null){ - node = ctx[id]; - if (node != null) - break; - ctx = ctx.parent; - } - if (filter != null && node != null) { - node = { - nodes: jmask(node.nodes).filter(filter) - }; - } - return node; - } - }; - - }()); - // end:source merge - // source optimize - var mask_optimize, - mask_registerOptimizer; - (function(){ - /** - * Run all registerd optimizers recursively on the nodes - * @param {MaskNode} node - * @param {function} onComplete - * @param {mask.optimize~onComplete} done - */ - mask_optimize = function (dom, done) { - mask_TreeWalker.walkAsync( - dom - , function (node, next) { - var fn = getOptimizer(node); - if (fn != null) { - fn(node, next); - return; - } - next(); - } - , done - ); - }; - - /** - * Register custom optimizer for a node name - * @param {string} tagName - Node name - * @param {function} visitor - Used for @see {@link mask.TreeWalker.walkSync} - */ - mask_registerOptimizer = function(tagName, fn){ - custom_Optimizers[tagName] = fn; - }; - - function getOptimizer(node) { - if (node.type !== Dom.NODE) - return null; - - return custom_Optimizers[node.tagName]; - } - - - /** - * Returns optimized mask tree - * @callback mask.optimize~onComplete - * @param {MaskNode} node - */ - }()); - // end:source optimize - // source modules/ - var Module; - (function(){ - Module = {}; - var _cache = {}, - _extensions_script = ' js es6 test coffee ', - _extensions_style = ' css sass scss less ', - _extensions_data = ' json ', - _opts = { - base: null, - version: null - }; - - // source utils - var u_resolveLocation, - u_resolvePath, - u_resolvePathFromImport, - u_handler_getDelegate; - - (function(){ - - u_resolveLocation = function(ctx, ctr, module) { - if (module != null) { - return module.location; - } - while(ctr != null) { - if (ctr.location != null) { - return ctr.location; - } - if (ctr.resource != null && ctr.resource.location) { - return ctr.resource.location; - } - ctr = ctr.parent; - } - var path = null; - if (ctx != null) { - if (ctx.filename != null) { - path = path_getDir(path_normalize(ctx.filename)); - } - if (ctx.dirname != null) { - path = path_normalize(ctx.dirname + '/'); - } - } - - if (_opts.base == null) { - _opts.base = path_resolveCurrent(); - } - - if (path != null) { - if (path_isRelative(path) === false) { - return path; - } - return path_combine(_opts.base, path); - } - return _opts.base; - }; - - u_resolvePath = function(path, ctx, ctr, module){ - if ('' === path_getExtension(path)) { - path += '.mask'; - } - if (path_isRelative(path) === false) { - return path; - } - return path_normalize(path_combine( - u_resolveLocation(ctx, ctr, module), path - )); - }; - - u_resolvePathFromImport = function(node, ctx, ctr, module){ - var path = node.path; - if ('' === path_getExtension(path)) { - var type = node.contentType; - if (type == null || type === 'mask' ) { - path += '.mask'; - } - } - if (path_isRelative(path) === false) { - return path; - } - return path_normalize(path_combine( - u_resolveLocation(ctx, ctr, module), path - )); - }; - - - u_handler_getDelegate = function(compoName, compo, next) { - return function(name) { - if (name === compoName) - return compo; - if (next != null) - return next(name); - - return null; - }; - }; - - - }()); - - // end:source utils - // source loaders - var _file_get, - _file_getScript, - _file_getStyle, - _file_getJson; - - (function(){ - - _file_get = createTransport(function(){ - return __cfg.getFile || file_get; - }); - _file_getScript = createTransport(function(){ - return __cfg.getScript || file_getScript; - }); - _file_getStyle = createTransport(function(){ - return __cfg.getStyle || file_getStyle; - }); - _file_getJson = createTransport(function(){ - return __cfg.getData || file_getJson; - }); - - - listeners_on('config', function (config) { - var modules = config.modules; - if (modules == null) { - return; - } - var fn = Loaders[modules]; - if (is_Function(fn) === false) { - log_warn('Module system is not supported: ' + modules); - return; - } - fn(); - }); - - function createTransport(loaderFactoryFn) { - return function(path_){ - var fn = loaderFactoryFn(), - path = path_, - v = _opts.version; - if (v != null) { - path = path_appendQuery(path, 'v', v); - } - return fn(path); - }; - } - - var Loaders = { - 'default': function () { - __cfg.getScript = __cfg.getFile = null; - }, - 'include': function () { - __cfg.getScript = getter('js'); - __cfg.getFile = getter('load'); - - var lib = include; - function getter(name) { - return function(path){ - return class_Dfr.run(function(resolve, reject){ - lib.instance('/')[name](path + '::Module').done(function(resp){ - var exports = name === 'js' - ? resp.Module - : resp[name].Module; - - resolve(exports); - }); - }); - } - } - } - }; - - if (typeof include !== 'undefined' && is_Function(include && include.js)) { - mask_config('modules', 'include'); - } - }()); - // end:source loaders - - // source class/Endpoint - function Endpoint (path, contentType) { - this.path = path; - this.contentType = contentType; - } - // end:source class/Endpoint - // source Import/Import - var IImport = class_create({ - type: null, - contentType: null, - constructor: function(path, alias, exports, module){ - this.path = path; - this.alias = alias; - this.exports = exports; - - var endpoint = new Endpoint(path, this.contentType); - this.module = Module.createModule(endpoint, module); - this.parent = module; - }, - eachExport: function(fn){ - var alias = this.alias; - if (alias != null) { - fn.call(this, alias, '*', alias); - return; - } - var exports = this.exports - if (exports != null) { - var imax = exports.length, - i = -1; - while(++i < imax) { - var x = exports[i]; - fn.call( - this - , x.alias == null ? x.name : x.alias - , x.name - , x.alias - ); - } - } - }, - - hasExport: function(name) { - if (this.alias === name) { - return true; - } - var exports = this.exports - if (exports != null) { - var imax = exports.length, - i = -1; - while(++i < imax) { - var x = exports[i]; - var expName = x.alias == null ? x.name : x.alias; - if (expName === name) { - return true; - } - } - } - return false; - }, - - getOriginal: function(alias){ - if (this.alias === alias) { - return '*'; - } - var exports = this.exports; - if (exports != null) { - var imax = exports.length, - i = -1, x; - while(++i < imax) { - x = exports[i]; - if ((x.alias || x.name) === alias) { - return x.name; - } - } - } - return null; - }, - - loadImport: function(cb){ - var self = this; - this - .module - .loadModule() - .fail(cb) - .done(function(module){ - cb(null, self); - }); - }, - - registerScope: null, - - logError_: function(msg){ - var str = '\n(Module) ' + (this.parent || {path: 'root'}).path - str += '\n (Import) ' + this.path - str += '\n ' + msg; - log_error(str); - } - }); - - - (function(){ - IImport.create = function(endpoint, alias, exports, parent){ - return new (Factory(endpoint))(endpoint.path, alias, exports, parent); - }; - function Factory(endpoint) { - var type = endpoint.contentType; - var ext = type || path_getExtension(endpoint.path); - if (ext === 'mask') { - return ImportMask; - } - if (ext === 'html') { - return ImportHtml; - } - var search = ' ' + ext + ' '; - if (_extensions_style.indexOf(search) !== -1) { - return ImportStyle; - } - if (_extensions_data.indexOf(search) !== -1) { - return ImportData; - } - // assume script, as anything else is not supported yet - return ImportScript; - } - }()); - // end:source Import/Import - // source Import/ImportMask - var ImportMask = class_create(IImport, { - type: 'mask', - contentType: 'mask', - constructor: function(){ - this.eachExport(function(compoName){ - if (compoName !== '*') - customTag_registerResolver(compoName); - }); - }, - getHandler: function(name){ - var module = this.module; - if (module == null) { - return; - } - if (module.error != null) { - if (this.hasExport(name)) { - this.logError_('Resource for the import `' + name + '` not loaded'); - return this.empty; - } - return null - } - var orig = this.getOriginal(name); - if (orig == null) { - return null; - } - return module.exports[orig] || module.queryHandler(orig); - }, - empty: function EmptyCompo () {} - }); - // end:source Import/ImportMask - // source Import/ImportScript - var ImportScript = class_create(IImport, { - type: 'script', - contentType: 'script', - registerScope: function(owner){ - this.eachExport(function(exportName, name, alias){ - var obj = this.module.register(owner, name, alias); - if (obj == null) { - this.logError_('Exported property is undefined: ' + name); - } - }); - } - }); - // end:source Import/ImportScript - // source Import/ImportStyle - var ImportStyle = class_create(IImport, { - type: 'style', - contentType: 'css' - }); - // end:source Import/ImportStyle - // source Import/ImportData - var ImportData = class_create(ImportScript, { - type: 'data', - contentType: 'json' - }); - // end:source Import/ImportData - // source Import/ImportHtml - var ImportHtml = class_create(ImportMask, { - type: 'mask', - contentType: 'html' - }); - // end:source Import/ImportHtml - - // source Module/Module - var IModule = class_create(class_Dfr, { - type: null, - path: null, - location: null, - exports: null, - state: 0, - constructor: function(path, parent) { - this.path = path; - this.parent = parent; - this.exports = {}; - this.location = path_getDir(path); - this.complete_ = this.complete_.bind(this); - }, - loadModule: function(){ - if (this.state !== 0) - return this; - - this.state = 1; - var self = this; - this - .load_(this.path) - .fail(function(err){ - self.onLoadError_(err); - }) - .done(function(mix){ - self.onLoadSuccess_(mix); - }); - return this; - }, - complete_: function(error, exports){ - this.exports = exports; - this.error = error; - this.state = 4; - if (error) { - this.reject(error); - return; - } - this.resolve(this); - }, - onLoadSuccess_: function(mix){ - if (this.preprocess_ == null) { - this.complete_(null, mix); - return; - } - this.preprocess_(mix, this.complete_); - }, - onLoadError_: function(error){ - if (this.preprocessError_ == null) { - this.complete_(error); - return; - } - this.preprocessError_(error, this.complete_); - }, - load_: null, - preprocess_: null, - preprocessError_: null, - register: fn_doNothing, - }); - - (function(){ - IModule.create = function(endpoint, parent, contentType){ - return new (Factory(endpoint))(endpoint.path, parent); - }; - function Factory(endpoint) { - var type = endpoint.contentType; - var ext = type || path_getExtension(endpoint.path); - if (ext === 'mask') { - return ModuleMask; - } - var search = ' ' + ext + ' '; - if (_extensions_style.indexOf(search) !== -1) { - return ModuleStyle; - } - if (_extensions_data.indexOf(search) !== -1) { - return ModuleData; - } - if (ext === 'html') { - return ModuleHtml; - } - // assume script, as anything else is not supported yet - return ModuleScript; - } - }()); - - // end:source Module/Module - // source Module/ModuleMask - var ModuleMask; - (function(){ - ModuleMask = class_create(IModule, { - type: 'mask', - scope: null, - source: null, - modules: null, - exports: null, - imports: null, - - load_: _file_get, - preprocessError_: function(error, next) { - var msg = 'Load error: ' + this.path; - if (error && error.status) { - msg += '; Status: ' + error.status; - } - - this.source = reporter_createErrorNode(msg); - next.call(this, error); - }, - preprocess_: function(mix, next) { - var ast = typeof mix === 'string' - ? parser_parse(mix) - : mix - ; - - this.scope = {}; - this.source = ast; - this.imports = []; - this.exports = { - '__nodes__': [], - '__handlers__': {} - }; - - var arr = _nodesToArray(ast), - imax = arr.length, - i = -1, - x; - while( ++i < imax ){ - x = arr[i]; - switch (x.tagName) { - case 'import': - this.imports.push(Module.createImport( - x, null, null, this - )); - break; - case 'module': - var path = u_resolvePath(x.attr.path, null, null, this), - type = x.attr.contentType, - endpoint = new Module.Endpoint(path, type) - ; - Module.registerModule(x.nodes, endpoint); - break; - case 'define': - case 'let': - continue; - default: - this.exports.__nodes__.push(x); - break; - } - } - - _loadImports(this.imports, function(){ - next.call(this, null, _createExports(arr, null, this)); - }, this); - }, - - getHandler: function(name){ - return _module_getHandler.call(this, this, name); - }, - queryHandler: function(selector) { - if (this.error) { - return _createHandlerForNodes(this.source, this); - } - - var nodes = this.exports.__nodes__; - if (selector !== '*') { - nodes = _nodesFilter(nodes, selector); - } - return nodes != null && nodes.length !== 0 - ? _createHandlerForNodes(nodes, this) - : null - ; - }, - }); - - // Also flattern all `imports` tags - function _nodesToArray (mix) { - var type = mix.type; - if (type === Dom.NODE && mix.tagName === 'imports') { - return mix.nodes; - } - if (type !== Dom.FRAGMENT && type != null) { - return [ mix ]; - } - var arr = mix; - if (type === Dom.FRAGMENT) { - arr = mix.nodes; - } - var imax = arr.length, - i = -1, x; - while ( ++i < imax ){ - x = arr[i]; - if (x.tagName === 'imports') { - arr.splice.apply(arr, [i, 1].concat(x.nodes)); - i--; - } - } - - return arr; - } - function _nodesFilter(nodes, tagName) { - var arr = [], - imax = nodes.length, - i = -1, x; - while ( ++i < imax ) { - x = nodes[i]; - if (x.tagName === tagName) { - arr.push(x); - } - } - return arr; - } - function _createExports(nodes, model, module) { - var exports = module.exports, - imports = module.imports, - scope = module.scope, - getHandler = _module_getHandlerDelegate(module); - - var i = -1, - imax = imports.length; - while ( ++i < imax ) { - var x = imports[i]; - if (x.registerScope) { - x.registerScope(module); - } - } - - var i = -1, - imax = nodes.length; - while ( ++i < imax ) { - var node = nodes[i]; - var name = node.tagName; - if (name === 'define' || name === 'let') { - var Base = { - getHandler: _fn_wrap(customTag_Compo_getHandler, getHandler), - location: module.location - }; - var Ctor = Define.create(node, model, module, Base); - var Proto = Ctor.prototype; - Proto.scope = obj_extend(Proto.scope, scope); - - - var compoName = node.name; - if (name === 'define') { - exports[compoName] = Ctor; - customTag_register(compoName, Ctor); - } - if (name === 'let') { - customTag_registerResolver(compoName) - } - exports.__handlers__[compoName] = Ctor; - } - } - exports['*'] = class_create(customTag_Base, { - getHandler: getHandler, - location: module.location, - nodes: exports.__nodes__, - scope: scope - }); - - return exports; - } - function _createHandlerForNodes(nodes, module) { - return class_create({ - scope: module.scope, - location: module.location, - nodes: nodes, - getHandler: _module_getHandlerDelegate(module) - }); - } - - function _loadImports(imports, done, module) { - var count = imports.length; - if (count === 0) { - return done.call(module); - } - var imax = count, - i = -1; - while( ++i < imax ) { - imports[i].loadImport(await); - } - - function await(){ - if (--count > 0) - return; - done.call(module); - } - } - function _module_getHandlerDelegate(module) { - return function(name) { - return _module_getHandler.call(this, module, name); - }; - } - function _module_getHandler(module, name) { - var Ctor; - - // check public exports - var exports = module.exports; - if (exports != null && (Ctor = exports[name]) != null) { - return Ctor; - } - - // check private components store - var handlers = exports.__handlers__; - if (handlers != null && (Ctor = handlers[name]) != null) { - return Ctor; - } - - var arr = module.imports, - i = arr.length, - x, type; - while( --i > -1) { - x = arr[i]; - type = x.type; - if (type === 'mask' && (Ctor = x.getHandler(name)) != null) { - return Ctor; - } - } - return null; - } - - function _fn_wrap(baseFn, fn) { - if (baseFn == null) { - return fn; - } - return function(){ - var x = baseFn.apply(this, arguments); - if (x != null) { - return x; - } - return fn.apply(this, arguments); - } - } - }()); - - // end:source Module/ModuleMask - // source Module/ModuleScript - var ModuleScript = class_create(IModule, { - type: 'script', - - load_: _file_getScript, - getExport_: function(property) { - var obj = this.exports; - return property !== '*' - ? obj_getProperty(obj, property) - : obj - ; - }, - - register: function(ctr, name, alias) { - var prop = alias || name; - var obj = this.getExport_(name); - if (obj == null) { - return null; - } - if (ctr.scope == null) { - ctr.scope = {}; - } - obj_setProperty(ctr.scope, prop, obj); - return obj; - }, - preprocessError_: function(error, next) { - log_error('Resource ' + this.path + ' thrown an Exception: ' + error); - next(error); - } - }); - // end:source Module/ModuleScript - // source Module/ModuleStyle - var ModuleStyle = class_create(IModule, { - type: 'style', - - load_: _file_getStyle - }); - // end:source Module/ModuleStyle - // source Module/ModuleData - var ModuleData = class_create(ModuleScript, { - type: 'data', - - load_: _file_getJson - }); - // end:source Module/ModuleData - // source Module/ModuleHtml - var ModuleHtml; - (function(){ - ModuleHtml = class_create(ModuleMask, { - type: 'mask', - preprocess_: function(mix, next) { - var ast = typeof mix === 'string' - ? parser_parseHtml(mix) - : mix - ; - return ModuleMask - .prototype - .preprocess_ - .call(this, ast, next); - } - }); - }()); - // end:source Module/ModuleHtml - - // source components - (function() { - var IMPORT = 'import', - IMPORTS = 'imports'; - - custom_Tags['module'] = class_create({ - constructor: function(node, model, ctx, container, ctr) { - var path = path_resolveUrl(node.attr.path, u_resolveLocation(ctx, ctr)), - type = node.attr.type, - endpoint = new Module.Endpoint(path, type); - Module.registerModule(node.nodes, endpoint, ctx, ctr); - }, - render: fn_doNothing - }); - custom_Tags['import:base'] = function(node, model, ctx, el, ctr){ - var base = path_normalize(expression_eval(node.expression, model, ctx, ctr)); - if (base != null && base[base.length - 1] !== '/') { - base += '/'; - } - Module.cfg('base', base); - }; - custom_Tags[IMPORT] = class_create({ - meta: { - serializeNodes: true - }, - constructor: function(node, model, ctx, el, ctr) { - if (node.alias == null && node.exports == null && Module.isMask(node)) { - // embedding - this.module = Module.createModule(node, ctx, ctr); - } - }, - renderStart: function(model, ctx){ - if (this.module == null) { - return; - } - var resume = Compo.pause(this, ctx); - var self = this; - this - .module - .loadModule() - .always(function(){ - self.scope = self.module.scope; - self.nodes = self.module.source; - self.getHandler = self.module.getHandler.bind(self.module); - resume(); - }); - } - }); - - custom_Tags[IMPORTS] = class_create({ - imports_: null, - load_: function(ctx, cb){ - var arr = this.imports_, - self = this, - imax = arr.length, - await = imax, - i = -1, x; - - function done(error, import_) { - if (error == null) { - if (import_.registerScope) { - import_.registerScope(self); - } - if (ctx._modules != null) { - ctx._modules.add(import_.module); - } - } - if (--await === 0) { - cb(); - } - } - while( ++i < imax ){ - x = arr[i]; - x.loadImport(done); - } - }, - start_: function(model, ctx){ - var resume = Compo.pause(this, ctx), - nodes = this.nodes, - imax = nodes.length, - i = -1, x - ; - var arr = this.imports_ = []; - while( ++i < imax ){ - x = nodes[i]; - if (x.tagName === IMPORT) { - if (x.path.indexOf('~') !== -1) { - var fn = parser_ensureTemplateFunction(x.path); - if (is_Function(fn)) { - x.path = fn('attr', model, ctx, null, this); - } - } - arr.push(Module.createImport(x, ctx, this)); - } - } - this.load_(ctx, resume); - }, - meta: { - serializeNodes: true - }, - renderStart: function(model, ctx){ - this.start_(model, ctx); - }, - renderStartClient: function(model, ctx){ - this.start_(model, ctx); - }, - serializeNodes: function(){ - // NodeJS - var arr = [], - i = this.nodes.length, x; - while( --i > -1 ){ - x = this.nodes[i]; - if (x.tagName === IMPORT) { - arr.push(x); - } - } - return mask_stringify(arr); - }, - - getHandler: function(name){ - var arr = this.imports_, - imax = arr.length, - i = -1, import_, x; - while ( ++i < imax ){ - import_ = arr[i]; - if (import_.type !== 'mask') { - continue; - } - x = import_.getHandler(name); - if (x != null) { - return x; - } - } - return null; - }, - getHandlers: function(){ - var handlers = {}; - var arr = this.imports_, - imax = arr.length, - i = -1, import_, x; - while ( ++i < imax ){ - import_ = arr[i]; - if (import_ !== 'mask') { - continue; - } - x = import_.getHandlers(); - obj_extend(handlers, x); - } - return handlers; - }, - }); - - - }()); - - // end:source components - // source tools/dependencies - var tools_getDependencies; - (function() { - - tools_getDependencies = function(template, path, opts_){ - - var opts = obj_extendDefaults(opts_, defaultOptions); - var dfr = new class_Dfr; - var ast = typeof template === 'string' - ? parser_parse(template) - : template - ; - - return get(ast, path, opts, dfr); - }; - - - var defaultOptions = { - deep: true, - flattern: false - }; - - function get(ast, path, opts, dfr) { - walk(ast, path, opts, function(error, dep){ - if (error) return dfr.reject(error); - if (opts.flattern === true && opts.deep === true) { - dep = flattern(dep); - } - dfr.resolve(dep); - }); - return dfr; - } - - function walk(ast, path, opts, done) { - var location = path_getDir(path); - var dependency = { - mask: [], - data: [], - style: [], - script: [], - }; - - mask_TreeWalker.walkAsync(ast, visit, complete); - - function visit (node, next){ - if (node.tagName !== 'import') { - return next(); - } - var path = resolvePath(node, location); - var type = Module.getType(node); - if (opts.deep === false) { - dependency[type].push(path); - return next(); - } - if ('mask' === type) { - getMask(path, opts, function(error, dep){ - if (error) { - return done(error); - } - dependency.mask.push(dep); - next(); - }); - return; - } - - dependency[type].push(path); - next(); - } - function complete() { - done(null, dependency); - } - } - - function getMask(path, opts, done){ - var dep = { - path: path, - dependencies: null - }; - - _file_get(path) - .done(function(template){ - walk(parser_parse(template), path, opts, function(error, deps){ - if (error) { - done(error); - return; - } - dep.dependencies = deps; - done(null, dep); - }); - }) - .fail(done); - } - function resolvePath(node, location) { - var path = node.path, - type = node.contentType; - if ((type == null || type === 'mask') && path_getExtension(path) === '') { - path += '.mask'; - } - if (path_isRelative(path)) { - path = path_combine(location, path); - } - return path_normalize(path); - } - - var flattern; - (function () { - flattern = function (deps) { - return { - mask: resolve(deps, 'mask'), - data: resolve(deps, 'data'), - style: resolve(deps, 'style'), - script: resolve(deps, 'script'), - }; - }; - - function resolve(deps, type) { - return distinct(get(deps, type, [])); - } - function get (deps, type, stack) { - if (deps == null) { - return stack; - } - var arr = deps[type], - imax = arr.length, - i = -1, x; - while ( ++i < imax ) { - x = arr[i]; - if (typeof x === 'string') { - stack.unshift(x); - continue; - } - // assume is an object { path, dependencies[] } - stack.unshift(x.path); - get(x.dependencies, type, stack); - } - if ('mask' !== type) { - deps.mask.forEach(function(x){ - get(x.dependencies, type, stack); - }); - } - return stack; - } - function distinct (stack) { - for (var i = 0; i < stack.length; i++) { - for (var j = i + 1; j < stack.length; j++) { - if (stack[i] === stack[j]) { - stack.splice(j, 1); - j--; - } - } - } - return stack; - } - }()); - - }()); - // end:source tools/dependencies - // source tools/build - var tools_build; - (function(){ - - tools_build = function(template, path, opts_){ - var opts = obj_extendDefaults(opts_, optionsDefault); - return class_Dfr.run(function(resolve, reject){ - tools_getDependencies(template, path, { flattern: true }) - .fail(reject) - .done(function(deps){ - build(deps, opts, complete, reject); - }); - function complete (out) { - out.mask += '\n' + template; - resolve(out); - } - }); - }; - - var optionsDefault = { - minify: false - }; - - function build(deps, opts, resolve, reject) { - var types = ['mask', 'script', 'style', 'data']; - var out = { - mask: '', - data: '', - style: '', - script: '', - }; - function next(){ - if (types.length === 0) { - if (out.data) { - out.script = out.data + '\n' + out.script; - } - return resolve(out); - } - var type = types.shift(); - build_type(deps, type, opts, function(error, str){ - if (error) return reject(error); - out[type] = str; - next(); - }); - } - next(); - } - - function build_type (deps, type, opts, done) { - var arr = deps[type], - imax = arr.length, - i = -1, - stack = []; - - function next() { - if (++i === imax) { - done(null, stack.join('\n')); - return; - } - Single[type](arr[i], opts) - .fail(done) - .done(function(str){ - stack.push('/* source ' + arr[i] + ' */'); - stack.push(str); - next(); - }); - } - next(); - } - - var Single = { - mask: function(path, opts, done){ - return class_Dfr.run(function(resolve, reject) { - _file_get(path) - .fail(reject) - .done(function(str) { - // remove all remote styles - var ast = mask_TreeWalker.walk(str, function(node){ - if (node.tagName === 'link' && node.attr.href) { - return { remove: true }; - } - }); - ast = jmask('module') - .attr('path', path) - .append(ast); - - var str = mask_stringify(ast[0], { - indent: opts.minify ? 0 : 4 - }); - resolve(str); - }); - }); - }, - script: function(path, opts){ - return (__cfg.buildScript || build_script)(path, opts); - }, - style: function(path, opts) { - return (__cfg.buildStyle || build_style)(path, opts); - }, - data: function(path, opts) { - return (__cfg.buildData || build_data)(path, opts); - } - } - - function build_script(path, opts, done) { - return class_Dfr.run(function(resolve, reject){ - _file_get(path) - .fail(reject) - .done(function(str){ - var script = 'module = { exports: null }\n'; - script += str + ';\n'; - script += 'mask.Module.registerModule(module.exports, new mask.Module.Endpoint("' + path + '", "script"))'; - resolve(script); - }); - }); - } - function build_style(path, opts, done) { - return _file_get(path, done); - } - function build_data(path, opts, done) { - return class_Dfr.run(function(resolve, reject){ - _file_get(path) - .fail(reject) - .done(function(mix){ - var json; - try { - json = typeof mix === 'string' - ? JSON.parse(mix) - : mix; - } catch (error) { - reject(error); - return; - } - var str = JSON.stringify(json, null, opts.minify ? 4 : void 0); - var script = 'module = { exports: ' + str + ' }\n' - + 'mask.Module.registerModule(module.exports, new mask.Module.Endpoint("' + path + '", "json"))'; - - resolve(script); - }); - }); - } - }()); - // end:source tools/build - - obj_extend(Module, { - ModuleMask: ModuleMask, - Endpoint: Endpoint, - createModule: function(node, ctx, ctr, parent) { - var path = u_resolvePathFromImport(node, ctx, ctr, parent), - module = _cache[path]; - if (module == null) { - var endpoint = new Endpoint(path, node.contentType); - module = _cache[path] = IModule.create(endpoint, parent); - } - return module; - }, - registerModule: function(mix, endpoint, ctx, ctr, parent) { - endpoint.path = u_resolvePath(endpoint.path, ctx, ctr, parent); - - var module = Module.createModule(endpoint, ctx, ctr, parent); - module.state = 1; - if (Module.isMask(endpoint)) { - module.preprocess_(mix, function(){ - module.state = 4; - module.resolve(module); - }); - return module; - } - // assume others and is loaded - module.state = 4; - module.exports = mix; - module.resolve(module); - return module; - }, - - createImport: function(node, ctx, ctr, module){ - var path = u_resolvePathFromImport(node, ctx, ctr, module), - alias = node.alias, - exports = node.exports, - endpoint = new Endpoint(path, node.contentType); - return IImport.create(endpoint, alias, exports, module); - }, - isMask: function(endpoint){ - var type = endpoint.contentType, - ext = type || path_getExtension(endpoint.path); - return ext === '' || ext === 'mask' || ext === 'html'; - }, - getType: function(endpoint) { - var type = endpoint.contentType, - path = endpoint.path; - if (type != null) { - return type; - } - var ext = path_getExtension(path); - if (ext === '' || ext === 'mask'){ - return 'mask'; - } - var search = ' ' + ext + ' '; - if (_extensions_style.indexOf(search) !== -1){ - return 'style'; - } - if (_extensions_data.indexOf(search) !== -1){ - return 'data'; - } - // assume is javascript - return 'script'; - }, - cfg: function(name, val){ - if (name in _opts === false) { - log_error('Invalid module option: ', name); - return; - } - _opts[name] = val; - }, - resolveLocation: u_resolveLocation, - getDependencies: tools_getDependencies, - build: tools_build, - }); - }()); - // end:source modules/ - // source Define - var Define; - (function(){ - Define = { - create: function(node, model, ctr, Base){ - return compo_fromNode(node, model, ctr, Base); - }, - registerGlobal: function(node, model, ctr, Base) { - var Ctor = Define.create(node, model, ctr, Base); - customTag_register( - node.name, Ctor - ); - }, - registerScoped: function(node, model, ctr, Base) { - var Ctor = Define.create(node, model, ctr, Base); - customTag_registerScoped( - ctr, node.name, Ctor - ); - } - }; - - function compo_prototype(compoName, tagName, attr, nodes, owner, model, Base) { - var arr = []; - var Proto = obj_extend({ - tagName: tagName, - compoName: compoName, - template: arr, - attr: attr, - location: trav_location(owner), - meta: { - template: 'merge' - }, - renderStart: function(){ - Compo.prototype.renderStart.apply(this, arguments); - if (this.nodes === this.template) { - this.nodes = mask_merge(this.nodes, [], this); - } - }, - getHandler: null - }, Base); - - var imax = nodes == null ? 0 : nodes.length, - i = 0, x, name; - for(; i < imax; i++) { - x = nodes[i]; - if (x == null) - continue; - name = x.tagName; - if ('function' === name) { - Proto[x.name] = x.fn; - continue; - } - if ('slot' === name || 'event' === name) { - if ('event' === name && Proto.tagName != null) { - // bind the event later via the component - arr.push(x); - continue; - } - var type = name + 's'; - var fns = Proto[type]; - if (fns == null) { - fns = Proto[type] = {}; - } - fns[x.name] = x.fn; - continue; - } - if ('define' === name || 'let' === name) { - var fn = name === 'define' - ? Define.registerGlobal - : Define.registerScoped; - fn(x, model, Proto); - continue; - } - if ('var' === name) { - var obj = x.getObject(model, null, owner), - key, val; - for(key in obj) { - val = obj[key]; - if (key === 'meta' || key === 'model' || key === 'attr') { - Proto[key] = obj_extend(Proto[key], val); - continue; - } - if (key === 'scope') { - if (is_Object(val)) { - Proto.scope = obj_extend(Proto.scope, val); - continue; - } - } - var scope = Proto.scope; - if (scope == null) { - Proto.scope = scope = {}; - } - scope[key] = val; - } - continue; - } - arr.push(x); - } - return Proto; - } - function compo_extends(extends_, model, ctr) { - var args = []; - if (extends_ == null) - return args; - - var imax = extends_.length, - i = -1, - await = 0, x; - while( ++i < imax ){ - x = extends_[i]; - if (x.compo) { - var compo = customTag_get(x.compo, ctr); - if (compo != null) { - args.unshift(compo); - continue; - } - - var obj = expression_eval(x.compo, model, null, ctr); - if (obj != null) { - args.unshift(obj); - continue; - } - log_error('Nor component, nor scoped data is resolved:', x.compo); - continue; - } - } - return args; - } - - function compo_fromNode(node, model, ctr, Base) { - var extends_ = node['extends'], - as_ = node['as'], - tagName, - attr; - if (as_ != null) { - var x = parser_parse(as_); - tagName = x.tagName; - attr = obj_extend(node.attr, x.attr); - } - - var name = node.name, - Proto = compo_prototype(name, tagName, attr, node.nodes, ctr, model, Base), - args = compo_extends(extends_, model, ctr) - ; - - args.push(Proto); - return Compo.apply(null, args); - } - - function trav_location(ctr) { - while(ctr != null) { - if (ctr.location) { - return ctr.location; - } - if (ctr.resource && ctr.resource.location) { - return ctr.resource.location; - } - ctr = ctr.parent; - } - return null; - } - }()); - // end:source Define - // source TreeWalker - var mask_TreeWalker; - (function(){ - /** - * TreeWalker - * @memberOf mask - * @name TreeWalker - */ - mask_TreeWalker = { - /** - * Visit each mask node - * @param {MaskNode} root - * @param {TreeWalker~SyncVisitior} visitor - * @memberOf mask.TreeWalker - */ - walk: function(root, fn) { - if (typeof root === 'object' && root.type === Dom.CONTROLLER) { - new SyncWalkerCompos(root, fn); - return root; - } - root = prepairRoot(root); - new SyncWalker(root, fn); - return root; - }, - /** - * Asynchronous visit each mask node - * @param {MaskNode} root - * @param {TreeWalker~AsyncVisitior} visitor - * @param {function} done - * @memberOf mask.TreeWalker - */ - walkAsync: function(root, fn, done){ - root = prepairRoot(root); - new AsyncWalker(root, fn, done); - } - }; - - var SyncWalker, - SyncWalkerCompos; - (function(){ - SyncWalker = function(root, fn){ - walk(root, fn); - }; - SyncWalkerCompos = function(root, fn){ - walkCompos(root, fn, root); - }; - function walk(node, fn, parent, index) { - if (node == null) - return null; - - var deep = true, break_ = false, mod; - if (isFragment(node) !== true) { - mod = fn(node); - } - if (mod !== void 0) { - mod = new Modifier(mod); - mod.process(new Step(node, parent, index)); - deep = mod.deep; - break_ = mod['break']; - } - var nodes = safe_getNodes(node); - if (nodes == null || deep === false || break_ === true) { - return mod; - } - var imax = nodes.length, - i = 0, x; - for(; i < imax; i++) { - x = nodes[i]; - mod = walk(x, fn, node, i); - if (mod != null && mod['break'] === true) { - return mod; - } - } - } - function walkCompos(compo, fn, parent, index) { - if (compo == null) - return; - - var mod = fn(compo, index); - if (mod !== void 0) { - if (mod.deep === false || mod['break'] === true) { - return mod; - } - } - var compos = compo.components; - if (compos == null) { - return null; - } - var imax = compos.length, - i = 0, x; - for(; i < imax; i++) { - x = compos[i]; - mod = walkCompos(x, fn, compo, i); - if (mod != null && mod['break'] === true) { - return mod; - } - } - } - }()); - var AsyncWalker; - (function(){ - AsyncWalker = function(root, fn, done){ - this.stack = []; - this.done = done; - this.root = root; - this.fn = fn; - - this.process = this.process.bind(this); - this.visit(this.push(root)); - }; - AsyncWalker.prototype = { - current: function(){ - return this.stack[this.stack.length - 1]; - }, - push: function(node, parent, index){ - var step = new Step(node, parent, index); - this.stack.push(step); - return step; - }, - pop: function(){ - return this.stack.pop(); - }, - getNext: function(goDeep){ - var current = this.current(), - node = current.node, - nodes = safe_getNodes(node); - if (node == null) { - throw Error('Node is null'); - } - if (nodes != null && goDeep !== false && nodes.length !== 0) { - if (nodes[0] == null) { - throw Error('Node is null'); - } - return this.push( - nodes[0], - node, - 0 - ); - } - var parent, index; - while (this.stack.length !== 0) { - current = this.pop(); - parent = current.parent; - index = current.index; - if (parent == null) { - this.pop(); - continue; - } - if (++index < parent.nodes.length) { - return this.push( - parent.nodes[index], - parent, - index - ); - } - } - return null; - }, - process: function(mod){ - var deep = true, break_ = false; - - if (mod !== void 0) { - mod = new Modifier(mod); - mod.process(this.current()); - deep = mod.deep; - break_ = mod['break']; - } - - var next = break_ === true ? null : this.getNext(deep); - if (next == null) { - this.done(this.root); - return; - } - this.visit(next); - }, - - visit: function(step){ - var node = step.node; - if (isFragment(node) === false) { - this.fn(node, this.process); - return; - } - this.process(); - }, - - fn: null, - done: null, - stack: null - }; - }()); - - var Modifier; - (function(){ - /** - * @name IModifier - * @memberOf TreeWalker - */ - Modifier = function (mod, step) { - for (var key in mod) { - this[key] = mod[key]; - } - }; - Modifier.prototype = { - /** - * On `true` stops the walker - */ - 'break': false, - /** - * On `false` doesn't visit the subnodes - */ - deep: true, - /** - * On `true` removes current node - */ - remove: false, - /** - * On not `null`, replaces the current node with value - */ - replace: null, - process: function(step){ - if (this.replace != null) { - this.deep = false; - step.parent.nodes[step.index] = this.replace; - return; - } - if (this.remove === true) { - this.deep = false; - var arr = step.parent.nodes, - i = step.index; - _Array_splice.call(arr, i, 1); - return; - } - } - }; - }()); - - var Step = function (node, parent, index) { - this.node = node; - this.index = index; - this.parent = parent; - }; - - /* UTILS */ - - function isFragment(node) { - return Dom.FRAGMENT === safe_getType(node); - } - function safe_getNodes(node) { - var nodes = node.nodes; - if (nodes == null) - return null; - - return is_Array(nodes) - ? (nodes) - : (node.nodes = [ nodes ]); - } - function safe_getType(node) { - var type = node.type; - if (type != null) - return type; - - if (is_Array(node)) return Dom.FRAGMENT; - if (node.tagName != null) return Dom.NODE; - if (node.content != null) return Dom.TEXTNODE; - - return Dom.NODE; - } - function prepairRoot(root){ - if (typeof root === 'string') { - root = parser_parse(root); - } - if (isFragment(root) === false) { - var fragment = new Dom.Fragment; - fragment.appendChild(root); - - root = fragment; - } - return root; - } - - /** - * Is called on each node - * @callback TreeWalker~SyncVisitor - * @param {MaskNode} node - * @returns {Modifier|void} - */ - /** - * Is called on each node - * @callback TreeWalker~AsyncVisitor - * @param {MaskNode} node - * @param {function} done - Optional pass @see{@link TreeWalker.IModifier} to the callback - * @returns {void} - */ - }()); - // end:source TreeWalker - // end:source feature/ - // source parser/ - var parser_parse, - parser_parseHtml, - parser_parseAttr, - parser_parseAttrObject, - parser_parseLiteral, - parser_ensureTemplateFunction, - parser_setInterpolationQuotes, - parser_cleanObject, - parser_ObjectLexer - ; - - (function(Node, TextNode, Fragment, Component) { - - // source ./const - var interp_START = '~', - interp_OPEN = '[', - interp_CLOSE = ']', - - // ~ - interp_code_START = 126, - // [ - interp_code_OPEN = 91, - // ] - interp_code_CLOSE = 93, - - - go_tag = 2, - go_up = 9, - go_attrVal = 6, - go_attrHeadVal = 7, - - state_tag = 3, - state_attr = 5, - state_literal = 8 - ; - // end:source ./const - // source ./utils - parser_cleanObject = function(mix) { - if (is_Array(mix)) { - for (var i = 0; i < mix.length; i++) { - parser_cleanObject(mix[i]); - } - return mix; - } - delete mix.parent; - delete mix.__single; - if (mix.nodes != null) { - parser_cleanObject(mix.nodes); - } - return mix; - }; - // end:source ./utils - // source ./cursor - var cursor_groupEnd, - cursor_quoteEnd, - cursor_refEnd, - cursor_tokenEnd, - cursor_skipWhitespace, - cursor_skipWhitespaceBack, - cursor_goToWhitespace - ; - (function(){ - - cursor_groupEnd = function(str, i, imax, startCode, endCode){ - var count = 0, - start = i, - c; - for( ; i < imax; i++){ - c = str.charCodeAt(i); - if (c === 34 || c === 39) { - // "|' - i = cursor_quoteEnd( - str - , i + 1 - , imax - , c === 34 ? '"' : "'" - ); - continue; - } - if (c === startCode) { - count++; - continue; - } - if (c === endCode) { - if (--count === -1) - return i; - } - } - parser_warn('Group was not closed', str, start); - return imax; - }; - - cursor_refEnd = function(str, i, imax){ - var c; - while (i < imax){ - c = str.charCodeAt(i); - if (c === 36 || c === 95) { - // $ _ - i++; - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - i++; - continue; - } - break; - } - return i; - }; - - cursor_tokenEnd = function(str, i, imax){ - var c; - while (i < imax){ - c = str.charCodeAt(i); - if (c === 36 || c === 95 || c === 58) { - // $ _ : - i++; - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - i++; - continue; - } - break; - } - return i; - }; - - cursor_quoteEnd = function(str, i, imax, char_){ - var start = i; - while ((i = str.indexOf(char_, i)) !== -1) { - if (str.charCodeAt(i - 1) !== 92) - // \ - return i; - i++; - } - parser_warn('Quote was not closed', str, start - 1); - return imax; - }; - - cursor_skipWhitespace = function(str, i, imax) { - for(; i < imax; i++) { - if (str.charCodeAt(i) > 32) - return i; - } - return i; - }; - cursor_skipWhitespaceBack = function(str, i) { - for(; i > 0; i--) { - if (str.charCodeAt(i) > 32) - return i; - } - return i; - }; - - cursor_goToWhitespace = function(str, i, imax) { - for(; i < imax; i++) { - if (str.charCodeAt(i) < 33) - return i; - } - return i; - }; - }()); - // end:source ./cursor - // source ./interpolation - (function(){ - - parser_ensureTemplateFunction = function (template) { - var mix = _split(template); - if (mix == null) { - return template; - } - if (typeof mix === 'string') { - return mix; - } - var array = mix; - return function(type, model, ctx, element, ctr, name) { - if (type === void 0) { - return template; - } - return _interpolate( - array - , type - , model - , ctx - , element - , ctr - , name - ); - }; - }; - - - parser_setInterpolationQuotes = function(start, end) { - if (!start || start.length !== 2) { - log_error('Interpolation Start must contain 2 Characters'); - return; - } - if (!end || end.length !== 1) { - log_error('Interpolation End must be of 1 Character'); - return; - } - - interp_code_START = start.charCodeAt(0); - interp_code_OPEN = start.charCodeAt(1); - interp_code_CLOSE = end.charCodeAt(0); - - interp_START = start[0]; - interp_OPEN = start[1]; - interp_CLOSE = end; - }; - - - function _split (template) { - var index = -1, - wasEscaped = false, - nextC, nextI; - /* - * - single char indexOf is much faster then '~[' search - * - function is divided in 2 parts: interpolation start lookup + interpolation parse - * for better performance - */ - while ((index = template.indexOf(interp_START, index)) !== -1) { - nextC = template.charCodeAt(index + 1); - var escaped = _char_isEscaped(template, index); - if (escaped === true) { - wasEscaped = true; - } - if (escaped === false) { - if (nextC === interp_code_OPEN) - break; - if (_char_isSimpleInterp(nextC)) { - break; - } - } - index++; - } - - if (index === -1) { - if (wasEscaped === true) { - return _escape(template); - } - return null; - } - - var length = template.length, - array = [], - lastIndex = 0, - i = 0, - end; - - var propAccessor = false; - while (true) { - - array[i++] = lastIndex === index - ? '' - : _slice(template, lastIndex, index); - - - nextI = index + 1; - nextC = template.charCodeAt(nextI); - if (nextC === interp_code_OPEN) { - propAccessor = false; - end = cursor_groupEnd( - template - , nextI + 1 - , length - , interp_code_OPEN - , interp_code_CLOSE - ); - var str = template.substring(index + 2, end); - array[i++] = new InterpolationModel(null, str); - lastIndex = index = end + 1; - } - - else if (_char_isSimpleInterp(nextC)) { - propAccessor = true; - end = _cursor_propertyAccessorEnd(template, nextI, length); - - var str = template.substring(index + 1, end); - array[i++] = new InterpolationModel(str, null); - lastIndex = index = end; - } - else { - array[i] += template[nextI]; - lastIndex = nextI; - } - - while ((index = template.indexOf(interp_START, index)) !== -1) { - nextC = template.charCodeAt(index + 1); - var escaped = _char_isEscaped(template, index); - if (escaped === true) { - wasEscaped = true; - } - if (escaped === false) { - if (nextC === interp_code_OPEN) - break; - if (_char_isSimpleInterp(nextC)) { - break; - } - } - index++; - } - if (index === -1) { - break; - } - } - if (lastIndex < length) { - array[i] = wasEscaped === true - ? _slice(template, lastIndex, length) - : template.substring(lastIndex) - ; - } - return array; - } - - function _char_isSimpleInterp (c) { - //A-z$_ - return (c >= 65 && c <= 122) || c === 36 || c === 95; - } - function _char_isEscaped (str, i) { - if (i === 0) { - return false; - } - var c = str.charCodeAt(--i); - if (c === 92) { - if (_char_isEscaped(str, c)) - return false; - return true; - } - return false; - } - - function _slice(string, start, end) { - var str = string.substring(start, end); - var i = str.indexOf(interp_START) - if (i === -1) { - return str; - } - return _escape(str); - } - - function _escape(str) { - return str.replace(/\\~/g, '~'); - } - - function InterpolationModel(prop, expr){ - this.prop = prop; - this.expr = expr; - } - InterpolationModel.prototype.process = function(model, ctx, el, ctr, name, type){ - if (this.prop != null) { - return obj_getPropertyEx(this.prop, model, ctx, ctr); - } - var expr = this.expr, - index = expr.indexOf(':'), - util; - if (index !== -1) { - if (index === 0) { - expr = expr.substring(index + 1); - } - else { - var match = rgx_UTIL.exec(expr); - if (match != null) { - util = match[1]; - expr = expr.substring(index + 1); - } - } - } - if (util == null || util === '') { - util = 'expression'; - } - - var fn = custom_Utils[util]; - if (fn == null) { - log_error('Undefined custom util:', util); - return null; - } - return fn(expr, model, ctx, el, ctr, name, type); - }; - - /** - * If we rendere interpolation in a TextNode, then custom util can return not only string values, - * but also any HTMLElement, then TextNode will be splitted and HTMLElements will be inserted within. - * So in that case we return array where we hold strings and that HTMLElements. - * - * If custom utils returns only strings, then String will be returned by this function - * @returns {(array|string)} - */ - function _interpolate(arr, type, model, ctx, el, ctr, name) { - var imax = arr.length, - i = -1, - array = null, - string = '', - even = true; - while ( ++i < imax ) { - if (even === true) { - if (array == null){ - string += arr[i]; - } else{ - array.push(arr[i]); - } - } else { - var interp = arr[i], - mix = interp.process(model, ctx, el, ctr, name, type); - if (mix != null) { - if (typeof mix === 'object' && array == null){ - array = [ string ]; - } - if (array == null){ - string += mix; - } else { - array.push(mix); - } - } - } - even = !even; - } - - return array == null - ? string - : array - ; - } - - function _cursor_propertyAccessorEnd(str, i, imax) { - var c; - while (i < imax){ - c = str.charCodeAt(i); - if (c === 36 || c === 95 || c === 46) { - // $ _ . - i++; - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - i++; - continue; - } - break; - } - return i; - } - - var rgx_UTIL = /\s*(\w+):/; - }()); - - // end:source ./interpolation - // source ./object/ObjectLexer - var ObjectLexer; - (function(){ - - // source ./compile.js - var _compile; - (function(){ - _compile = function(str, i, imax){ - if (i === void 0) { - i = 0; - imax = str.length; - } - - var tokens = [], - c, optional, ref, start; - outer: for(; i < imax; i++) { - start = i; - c = str.charCodeAt(i); - optional = false; - if (63 === c /* ? */) { - optional = true; - start = ++i; - c = str.charCodeAt(i); - } - switch(c) { - case 32 /* */: - tokens.push(new token_Whitespace(optional, i)); - continue; - case 34: - case 39 /*'"*/: - i = cursor_quoteEnd(str, i + 1, imax, c === 34 ? '"' : "'"); - tokens.push( - new token_String( - _compile(str, start + 1, i) - ) - ); - continue; - case 36 /*$*/: - start = ++i; - var isExtended = false; - if (c === str.charCodeAt(i)) { - isExtended = true; - start = ++i; - } - i = cursor_tokenEnd(str, i, imax); - - var name = str.substring(start, i); - if (optional === false && isExtended === false) { - tokens.push(new token_Var(name)); - i--; - continue; - } - - c = str.charCodeAt(i); - if (c === 91 /*[*/) { - i = compileArray(name, tokens, str, i, imax, optional); - continue; - } - if (c === 40 /*(*/) { - i = compileExtendedVar(name, tokens, str, i, imax); - continue; - } - if (c === 60 /*<*/ ) { - i = compileCustomVar(name, tokens, str, i, imax); - continue; - } - throw_('Unexpected extended type'); - continue; - - case 40 /*(*/: - if (optional === true) { - i = compileGroup(optional, tokens, str, i, imax); - continue; - } - /* fall through */ - case 44 /*,*/: - case 41 /*)*/: - case 91 /*[*/: - case 93 /*]*/: - case 123 /*{*/: - case 125 /*}*/: - tokens.push(new token_Punctuation(String.fromCharCode(c))); - continue; - } - - while(i < imax) { - c = str.charCodeAt(++i); - if (c > 32 && c !== 34 && c !== 39 && c !== 36 && c !== 44) { - continue; - } - tokens.push(new token_Const(str.substring(start, i))); - --i; - continue outer; - } - } - - var jmax = tokens.length, - j = -1, - orGroup = jmax > 1, - x; - while(orGroup === true && ++j < jmax) { - x = tokens[j]; - if (x instanceof token_Group === false || x.optional !== true) { - orGroup = false; - } - } - if (0 && orGroup === true) { - tokens = [ new token_OrGroup(tokens) ]; - } - - return tokens; - }; - - function compileArray(name, tokens, str, i, imax, optional){ - var start = ++i; - i = cursor_groupEnd(str, i, imax, 91, 93); - var innerTokens = _compile(str, start, i); - - i++; - if (str.charCodeAt(i) !== 40 /*(*/) - throw_('Punctuation group expected'); - - start = ++i; - i = cursor_groupEnd(str, i, imax, 40, 41) - var delimiter = str.substring(start, i); - tokens.push( - new token_Array( - name - , innerTokens - , new token_Punctuation(delimiter) - , optional - ) - ); - return i; - } - function compileExtendedVar(name, tokens, str, i, imax){ - var start = ++i; - i = cursor_groupEnd(str, i, imax, 40, 41); - tokens.push( - new token_ExtendedVar(name, str.substring(start, i)) - ); - return i; - } - function compileCustomVar(name, tokens, str, i, imax) { - var start = ++i; - i = cursor_tokenEnd(str, i, imax); - tokens.push( - new token_CustomVar(name, str.substring(start, i)) - ); - return i; - } - function compileGroup(optional, tokens, str, i, imax) { - var start = ++i; - i = cursor_groupEnd(str, start, imax, 40, 41); - tokens.push( - new token_Group(_compile(str, start, i), optional) - ); - return i; - } - - function throw_(msg) { - throw Error('Lexer pattern: ' + msg); - } - }()); - // end:source ./compile.js - // source ./consume.js - var _consume; - (function() { - _consume = function(tokens, str, index, length, out, isOptional){ - var index_ = index; - var imax = tokens.length, - i = 0, token, start; - for(; i < imax; i++) { - token = tokens[i]; - start = index; - index = token.consume(str, index, length, out); - if (index === start) { - if (token.optional === true) { - continue; - } - if (isOptional === true) { - return index_; - } - // global require is also not optional: throw error - var msg = 'Token of type `' + token.name + '`'; - if (token.token) { - msg += ' Did you mean: `' + token.token + '`?'; - } - parser_error(msg, str, index); - return index_; - } - } - return index; - }; - }()); - // end:source ./consume.js - // source ./tokens.js - var token_Const, - token_Var, - token_String, - token_Whitespace, - token_Array, - token_Punctuation, - token_ExtendedVar, - token_CustomVar, - token_Group, - token_OrGroup; - (function(){ - - token_Whitespace = create('Whitespace', { - constructor: function(optional){ - this.optional = optional; - }, - consume: cursor_skipWhitespace - }); - - // To match the string and continue, otherwise stops current consumer - // foo - token_Const = create('Const', { - constructor: function(str) { - this.token = str; - }, - consume: function(str, i, imax){ - var end = i + this.token.length; - str = str.substring(i, end); - return str === this.token ? end : i; - } - }); - // consume string (JS syntax) to the variable - // $foo - token_Var = create('Var', { - constructor: function(name){ - this.token = name; - this.setter = generateSetter(name); - }, - consume: function(str, i, imax, out) { - var end = cursor_tokenEnd(str, i, imax); - if (end === i) - return i; - - this.setter(out, str.substring(i, end)); - return end; - } - }); - /* consume string to the variable - * - by Regexp - * $$foo(\w+) - * - rest of the string - * $$foo(*) - * - inside a group of chars `()` `[]` `""` `''`, etc - * $$foo(*()) - */ - token_ExtendedVar = create('ExtendedVar', { - constructor: function(name, rgx){ - this.token = rgx; - this.setter = generateSetter(name); - if (rgx.charCodeAt(0) === 42) { - // * - if (rgx === '*') { - this.consume = this.consumeAll; - return; - } - if (rgx.length === 3) { - this.consume = this.consumeGroup; - return; - } - throw Error('`*` consumer expected group chars to parse'); - } - this.rgx = new RegExp(rgx, 'g'); - }, - consumeAll: function(str, i, imax, out){ - this.setter(out, str.substring(i)); - return imax; - }, - consumeGroup: function(str, i, imax, out){ - var start = this.token.charCodeAt(1), - end = this.token.charCodeAt(2); - if (str.charCodeAt(i) !== start) { - return token_Var - .prototype - .consume - .call(this, str, i, imax, out); - } - - var end = cursor_groupEnd(str, ++i, imax, start, end); - if (end === i) - return i; - - this.setter(out, str.substring(i, end)); - return end + 1; - }, - consume: function(str, i, imax, out) { - this.rgx.lastIndex = i; - var match = this.rgx.exec(str); - if (match == null) - return i; - - var x = match[0]; - this.setter(out, x); - return i + x.length; - } - }); - (function(){ - // Consume string with custom Stop/Continue Function to the variable - token_CustomVar = create('CustomVar', { - constructor: function(name, consumer) { - this.fn = Consumers[consumer]; - this.token = name; - this.setter = generateSetter(name); - }, - consume: function(str, i, imax, out) { - var start = i; - - var c; - for (; i < imax; i++){ - c = str.charCodeAt(i); - if (c === 36 || c === 95 || c === 58) { - // $ _ : - continue; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - continue; - } - if (this.fn(c) === true) { - continue; - } - break; - } - if (i === start) - return i; - - this.setter(out, str.substring(start, i)); - return i; - } - }); - - var Consumers = { - accessor: function(c){ - if (c === 46 /*.*/) { - return true; - } - return false; - } - }; - }()); - - token_String = create('String', { - constructor: function(tokens){ - this.tokens = tokens; - }, - consume: function(str, i, imax, out) { - var c = str.charCodeAt(i); - if (c !== 34 && c !== 39) - return i; - - var end = cursor_quoteEnd(str, i + 1, imax, c === 34 ? '"' : "'"); - if (this.tokens.length === 1) { - var $var = this.tokens[0]; - out[$var.token] = str.substring(i + 1, end); - } else { - throw Error('Not implemented'); - } - return ++end; - } - }); - token_Array = create('Array', { - constructor: function(name, tokens, delim, optional) { - this.token = name; - this.delim = delim; - this.tokens = tokens; - this.optional = optional; - }, - consume: function(str, i, imax, out){ - var obj, end, arr; - while(true) { - obj = {}; - end = _consume(this.tokens, str, i, imax, obj, this.optional); - - if (i === end) { - if (arr == null) - return i; - throw Error('Next item expected'); - } - if (arr == null) - arr = []; - arr.push(obj); - i = end; - - end = this.delim.consume(str, i, imax); - if (i === end) - break; - i = end; - } - out[this.token] = arr; - return i; - } - }); - token_Punctuation = create('Punc', { - constructor: function(str){ - this.before = new token_Whitespace(true); - this.delim = new token_Const(str); - this.after = new token_Whitespace(true); - this.token = str; - }, - consume: function(str, i, imax){ - var start = this.before.consume(str, i, imax); - var end = this.delim.consume(str, start, imax); - if (start === end) { - return i; - } - return this.after.consume(str, end, imax); - } - }); - token_Group = create('Group', { - constructor: function(tokens, optional) { - this.optional = optional; - this.tokens = tokens; - }, - consume: function(str, i, imax, out){ - return _consume(this.tokens, str, i, imax, out, this.optional); - } - }); - token_OrGroup = create('OrGroup', { - constructor: function(groups) { - this.groups = groups, - this.length = groups.length; - }, - consume: function(str, i, imax, out) { - var start = i, - j = 0; - for(; j < this.length; j++) { - i = this.groups[j].consume(str, i, imax, out); - if (i !== start) - return i; - } - return i; - } - }); - - function generateSetter(name) { - return new Function('obj', 'val', 'obj.' + name + '= val;'); - } - function create(name, Proto) { - var Ctor = Proto.constructor; - Proto.name = name; - Proto.optional = false; - Proto.token = null; - Ctor.prototype = Proto; - return Ctor; - } - }()); - // end:source ./tokens.js - - parser_ObjectLexer = ObjectLexer = function(pattern){ - if (arguments.length === 1 && typeof pattern === 'string') { - return ObjectLexer_single(pattern); - } - return ObjectLexer_sequance(Array.prototype.slice.call(arguments)); - }; - - function ObjectLexer_single (pattern){ - var tokens = _compile(pattern); - return function(str, i, imax, out, optional){ - return _consume(tokens, str, i, imax, out, optional); - }; - } - - var ObjectLexer_sequance; - (function(){ - ObjectLexer_sequance = function(args) { - var jmax = args.length, - j = -1; - while( ++j < jmax ) { - args[j] = __createConsumer(args[j]); - } - return function(str, i, imax, out, optional){ - var start; - j = -1; - while( ++j < jmax ) { - start = i; - i = __consume(args[j], str, i, imax, out, optional); - if (i === start) - return start; - } - return i; - } - }; - function __consume(x, str, i, imax, out, optional) { - if (typeof x === 'function') { - return x(str, i, imax, out, optional); - } - return __consumeOptionals(x, str, i, imax, out, optional); - } - function __consumeOptionals(arr, str, i, imax, out, optional) { - var start = i, - jmax = arr.length, - j = -1; - while( ++j < jmax ){ - i = arr[j](str, i, imax, out, true); - if (start !== i) - return i; - } - if (optional !== true) { - // notify - arr[0](str, start, imax, out, optional); - } - return start; - } - function __createConsumer(mix) { - if (typeof mix === 'string') { - return ObjectLexer_single(mix); - } - // else Array - var i = mix.length; - while(--i > -1) mix[i] = ObjectLexer_single(mix[i]); - return mix; - } - }()); - - }()); - // end:source ./object/ObjectLexer - // source ./parsers/var - (function(){ - custom_Parsers['var'] = function(str, index, length, parent){ - var node = new VarNode('var', parent), - start, - c; - - var go_varName = 1, - go_assign = 2, - go_value = 3, - go_next = 4, - state = go_varName, - token, - key; - while(true) { - if (index < length && (c = str.charCodeAt(index)) < 33) { - index++; - continue; - } - - if (state === go_varName) { - start = index; - index = cursor_refEnd(str, index, length); - key = str.substring(start, index); - state = go_assign; - continue; - } - - if (state === go_assign) { - if (c !== 61 ) { - // = - parser_error( - 'Assignment expected' - , str - , index - , c - , 'var' - ); - return [node, index]; - } - state = go_value; - index++; - continue; - } - - if (state === go_value) { - start = index; - index++; - switch(c){ - case 123: - case 91: - // { [ - index = cursor_groupEnd(str, index, length, c, c + 2); - break; - case 39: - case 34: - // ' " - index = cursor_quoteEnd(str, index, length, c === 39 ? "'" : '"') - break; - default: - while (index < length) { - c = str.charCodeAt(index); - if (c === 44 || c === 59) { - //, ; - break; - } - index++; - } - index--; - break; - } - index++; - node.attr[key] = str.substring(start, index); - state = go_next; - continue; - } - if (state === go_next) { - if (c === 44) { - // , - state = go_varName; - index++; - continue; - } - break; - } - } - return [node, index, 0]; - }; - - var VarNode = class_create(Dom.Node, { - stringify: function() { - var attr = this.attr; - var str = 'var '; - for(var key in attr){ - if (str !== 'var ') - str += ','; - - str += key + '=' + attr[key]; - } - return str + ';'; - }, - getObject: function(model, ctx, ctr){ - var obj = {}, - attr = this.attr, - key; - for(key in attr) { - obj[key] = expression_eval(attr[key], model, ctx, ctr); - } - return obj; - } - }); - }()); - // end:source ./parsers/var - // source ./parsers/content - (function(){ - - // source content/style - var Style; - (function () { - Style = { - transform: function(body, attr, parent) { - if (attr.self != null) { - var style = parent.attr.style; - parent.attr.style = parser_ensureTemplateFunction((style || '') + body); - return null; - } - - var str = body; - if (attr.scoped) { - attr.scoped = null; - str = style_scope(str, parent); - } - - str = style_transformHost(str, parent); - return str; - } - } - - var style_scope, - style_transformHost; - (function(){ - var counter = 0; - var rgx_selector = /^([\s]*)([^\{\}]+)\{/gm; - var rgx_host = /^([\s]*):host\s*(\(([^)]+)\))?\s*\{/gm; - - style_scope = function(css, parent){ - var id; - return css.replace(rgx_selector, function(full, pref, selector){ - if (selector.indexOf(':host') !== -1) - return full; - - if (id == null) - id = getId(parent); - - var arr = selector.split(','), - imax = arr.length, - i = 0; - for(; i < imax; i++) { - arr[i] = id + ' ' + arr[i]; - } - selector = arr.join(','); - return pref + selector + '{'; - }); - }; - - style_transformHost = function(css, parent) { - var id; - return css.replace(rgx_host, function(full, pref, ext, expr){ - - return pref - + (id || (id = getId(parent))) - + (expr || '') - + '{'; - }); - }; - - function getId(parent) { - if (parent == null) { - log_warn('"style" should be inside elements node'); - return ''; - } - var id = parent.attr.id; - if (id == null) { - id = parent.attr.id = 'scoped__css__' + (++counter); - } - return '#' + id; - } - }()); - }()); - // end:source content/style - - custom_Parsers['style' ] = createParser('style', Style.transform); - custom_Parsers['script'] = createParser('script'); - - custom_Tags['style' ] = createHandler('style'); - custom_Tags['script'] = createHandler('script'); - - var ContentNode = class_create(Dom.Node, { - content: null, - - stringify: function (stream) { - stream.processHead(this); - - var body = this.content; - if (body == null) { - stream.print(';'); - return; - } - if (is_Function(body)) { - body = body(); - } - - stream.openBlock('{'); - stream.print(body); - stream.closeBlock('}'); - return; - } - }); - - function createParser(name, transform) { - return function (str, i, imax, parent) { - var start = i, - end, - attr, - hasBody, - body, - c; - - while(i < imax) { - c = str.charCodeAt(i); - if (c === 123 || c === 59 || c === 62) { - //{;> - break; - } - i++; - } - - attr = parser_parseAttr(str, start, i); - for (var key in attr) { - attr[key] = parser_ensureTemplateFunction(attr[key]); - } - - if (c === 62) { - var nextI = cursor_skipWhitespace(str, i + 1, imax); - var nextC = str.charCodeAt(nextI); - if (nextC !== 34 && nextC !== 39){ - // "' - var node = new Dom.Node(name, parent); - node.attr = attr; - // `>` handle single without literal as generic mask node - return [ node, i, go_tag ]; - } - } - - end = i; - hasBody = c === 123 || c === 62; - - if (hasBody) { - i++; - if (c === 123) { - end = cursor_groupEnd(str, i, imax, 123, 125); //{} - body = str.substring(i, end); - } - if (c === 62) { - var tuple = parser_parseLiteral(str, i, imax); - if (tuple == null) { - return null; - } - end = tuple[1]; - body = tuple[0]; - // move cursor one back to be consistance with the group - end -= 1; - } - - if (transform != null) { - body = transform(body, attr, parent); - if (body == null) { - return [ null, end + 1 ]; - } - } - - body = preprocess(name, body); - if (name !== 'script') { - body = parser_ensureTemplateFunction(body); - } - } - - var node = new ContentNode(name, parent); - node.content = body; - node.attr = attr; - return [ node, end + 1, 0 ]; - }; - } - - function createHandler(name) { - return class_create(customTag_Base, { - meta: { - mode: 'server' - }, - body : null, - - constructor: function(node, model, ctx, el, ctr){ - var content = node.content; - if (content == null && node.nodes) { - var x = node.nodes[0]; - if (x.type === Dom.TEXTNODE) { - content = x.content; - } else { - content = jmask(x.nodes).text(model, ctr); - } - } - - this.body = is_Function(content) - ? content('node', model, ctx, el, ctr) - : content - ; - }, - render: function(model, ctx, container) { - var el = document.createElement(name), - body = this.body, - attr = this.attr; - el.textContent = body; - for(var key in attr) { - var val = attr[key]; - if (val != null) { - el.setAttribute(key, val); - } - } - container.appendChild(el); - } - }); - } - - function preprocess(name, body) { - var fn = __cfg.preprocessor[name]; - if (fn == null) { - return body; - } - var result = fn(body); - if (result == null) { - log_error('Preprocessor must return a string'); - return body; - } - return result; - } - }()); - // end:source ./parsers/content - // source ./parsers/import - (function(){ - var IMPORT = 'import', - IMPORTS = 'imports'; - - custom_Parsers[IMPORT] = function(str, i, imax, parent){ - var obj = { - exports: null, - alias: null, - path: null - }; - var end = lex_(str, i, imax, obj); - return [ new ImportNode(parent, obj), end, 0 ]; - }; - custom_Parsers_Transform[IMPORT] = function(current) { - if (current.tagName === IMPORTS) { - return null; - } - var imports = new ImportsNode('imports', current); - current.appendChild(imports); - return imports; - }; - - var lex_ = ObjectLexer( - [ 'from "$path"?( is $contentType)' - , '* as $alias from "$path"?( is $contentType)' - , '$$exports[$name?( as $alias)](,) from "$path"?( is $contentType)' - ] - ); - - var ImportsNode = class_create(Dom.Node, { - stringify: function (stream) { - stream.process(this.nodes); - } - }); - - var ImportNode = class_create({ - type: Dom.COMPONENT, - tagName: IMPORT, - - path: null, - exports: null, - alias: null, - - constructor: function(parent, data){ - this.path = data.path; - this.alias = data.alias; - this.exports = data.exports; - this.contentType = data.contentType; - this.parent = parent; - }, - stringify: function(){ - var from = " from '" + this.path + "'"; - - var type = this.contentType; - if (type != null) { - from += ' is ' + type; - } - from += ';'; - - if (this.alias != null) { - return IMPORT + " * as " + this.alias + from; - } - if (this.exports != null) { - var arr = this.exports, - str = '', - imax = arr.length, - i = -1, x; - while( ++i < imax ){ - x = arr[i]; - str += x.name; - if (x.alias) { - str += ' as ' + x.alias; - } - if (i !== imax - 1) { - str +=', '; - } - } - return IMPORT + ' ' + str + from; - } - return IMPORT + from; - } - }); - - }()); - // end:source ./parsers/import - // source ./parsers/define - (function(){ - createParser('define'); - createParser('let'); - - function createParser (tagName) { - custom_Parsers[tagName] = function(str, i, imax, parent){ - var node = new DefineNode(tagName, parent); - var end = lex_(str, i, imax, node); - return [ node, end, go_tag ]; - }; - } - var lex_ = ObjectLexer( - '$name' - , '?( as $$as(*()))?( extends $$extends[$$compo](,))' - , '{' - ); - var DefineNode = class_create(Dom.Node, { - 'name': null, - 'extends': null, - 'as': null, - - stringify: function(stream){ - var extends_ = this['extends'], - as_ = this['as'], - str = ''; - if (as_ != null && as_.length !== 0) { - str += ' as (' + as_ + ')'; - } - if (extends_ != null && extends_.length !== 0) { - str += ' extends '; - var imax = extends_.length, - i = -1, x; - while( ++i < imax ){ - str += extends_[i].compo; - if (i < imax - 1) - str += ', '; - } - } - - var head = this.tagName + ' ' + this.name + str; - stream.write(head) - stream.openBlock('{'); - stream.process(this.nodes); - stream.closeBlock('}'); - }, - }); - - }()); - // end:source ./parsers/define - // source ./parsers/methods - (function(){ - function create(tagName){ - return function(str, i, imax, parent) { - var start = str.indexOf('{', i) + 1, - head = parseHead( - tagName, str.substring(i, start - 1) - ); - if (head == null) { - parser_error('Method head syntax error', str, i); - } - var end = cursor_groupEnd(str, start, imax, 123, 125), - body = str.substring(start, end), - node = head == null - ? null - : new MethodNode(tagName, head.name, head.args, body, parent) - ; - return [ node, end + 1, 0 ]; - }; - } - - function parseHead(name, str) { - var parts = /([^\(\)\n]+)\s*(\(([^\)]*)\))?/.exec(str); - if (parts == null) { - return null; - } - var methodName = parts[1].trim(); - var str = parts[3], - methodArgs = str == null ? [] : str.replace(/\s/g, '').split(','); - return new MethodHead(methodName, methodArgs); - } - function MethodHead(name, args) { - this.name = name; - this.args = args; - } - function compileFn(args, body, sourceUrl) { - var arr = _Array_slice.call(args); - var compile = __cfg.preprocessor.script; - if (compile != null) { - body = compile(body); - } - if (sourceUrl != null) { - body += '\n//# sourceURL=' + sourceUrl - } - arr.push(body); - return new (Function.bind.apply(Function, [null].concat(arr))); - } - - var MethodNode = class_create(Dom.Component.prototype, { - 'name': null, - 'body': null, - 'args': null, - - 'fn': null, - - constructor: function(tagName, name, args, body, parent){ - this.tagName = tagName; - this.name = name; - this.args = args; - this.body = body; - this.parent = parent; - - var sourceUrl = null; - //if DEBUG - var ownerName = parent.tagName; - if (ownerName === 'let' || ownerName === 'define') { - ownerName += '_' + parent.name; - } - sourceUrl = constructSourceUrl(tagName, name, parent); - //endif - this.fn = compileFn(args, body, sourceUrl); - }, - stringify: function(stream){ - var head = this.tagName - + ' ' - + this.name - + '(' - + this.args.join(',') - + ')'; - stream.write(head); - stream.openBlock('{'); - stream.print(this.body); - stream.closeBlock('}'); - } - }); - - var constructSourceUrl; - (function(){ - constructSourceUrl = function (methodType, methodName, owner) { - var ownerName = owner.tagName, - parent = owner, - stack = '', - tag; - while(parent != null) { - tag = parent.tagName; - if ('let' === tag || 'define' === tag) { - if (stack !== '') { - stack = '.' + stack; - } - stack = parent.name + stack; - } - parent = parent.parent; - } - if ('let' !== ownerName && 'define' !== ownerName) { - if (stack !== '') { - stack += '_'; - } - stack += ownerName - } - var url = stack + '_' + methodType + '_' + methodName; - var index = null - if (_sourceUrls[url] !== void 0) { - index = ++_sourceUrls[url]; - } - if (index != null) { - url += '_' + index; - } - _sourceUrls[url] = 1; - return 'dynamic://MaskJS/' + url; - }; - var _sourceUrls = {}; - }()); - - custom_Parsers['slot' ] = create('slot'); - custom_Parsers['event'] = create('event'); - custom_Parsers['function'] = create('function'); - }()); - - // end:source ./parsers/methods - // source ./html/parser - (function () { - var state_closeTag = 21; - - /** - * Parse **Html** template to the AST tree - * @param {string} template - Html Template - * @returns {MaskNode} - * @memberOf mask - * @method parseHtml - */ - parser_parseHtml = function(str) { - var current = new Fragment(), - fragment = current, - state = go_tag, - i = 0, - imax = str.length, - token, - c, // charCode - start; - - outer: while (i <= imax) { - i = cursor_skipWhitespace(str, i, imax); - - if (state === state_attr) { - i = parser_parseAttrObject(str, i, imax, current.attr); - if (i === imax) { - break; - } - handleNodeAttributes(current); - - switch (char_(str, i)) { - case 47: // / - current = current.parent; - i = until_(str, i, imax, 62); - i++; - break; - case 62: // > - if (SINGLE_TAGS[current.tagName.toLowerCase()] === 1) { - current = current.parent; - } - break; - } - i++; - if (current.tagName === 'mask') { - start = i; - i = str.indexOf('', start); - var mix = parser_parse(str.substring(start, i)); - var nodes = current.parent.nodes; - nodes.splice(nodes.length - 1, 1); - current = current.parent; - if (mix.type === Dom.FRAGMENT) { - _appendMany(current, mix.nodes); - } else { - current.appendChild(mix); - } - i += 7; // @TODO proper search - } - - state = state_literal; - continue outer; - } - c = char_(str, i); - if (c === 60) { - //< - c = char_(str, ++i) - if (c === 33 && - char_(str, i + 1) === 45 && - char_(str, i + 2) === 45) { - //!-- - // COMMENT - i = str.indexOf('-->', i + 3) + 3; - if (i === 2) { - // if DEBUG - parser_warn('Comment has no ending', str, i); - // endif - i = imax; - } - continue; - } - if (c < 33) { - i = cursor_skipWhitespace(str, i, imax); - } - c = char_(str, i, imax); - if (c === 47 /*/*/) { - state = state_closeTag; - i++; - i = cursor_skipWhitespace(str, i, imax); - } - - start = i; - i = cursor_tokenEnd(str, i + 1, imax); - token = str.substring(start, i); - - if (state === state_closeTag) { - current = tag_Close(current, token.toLowerCase()); - state = state_literal; - i = until_(str, i, imax, 62 /*>*/); - i ++; - continue; - } - // open tag - current = tag_Open(token, current); - state = state_attr; - continue; - } - - // LITERAL - start = i; - token = ''; - while(i <= imax) { - c = char_(str, ++i); - if (c === 60 /*<*/) { - // MAYBE NODE - c = char_(str, i + 1); - if (c === 36 || c === 95 || c === 58 || 43) { - // $ _ : + - break; - } - if ((65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - break; - } - } - if (c === 38 /*&*/) { - // ENTITY - var Char = null; - var ent = null; - ent = unicode_(str, i + 1); - if (ent != null) { - Char = unicode_toChar(ent); - } else { - ent = entity_(str, i + 1); - if (ent != null) { - Char = entity_toChar(ent); - } - } - if (Char != null) { - token += str.substring(start, i) + Char; - start = i + ent.length + 1 /*;*/; - } - } - } - token += str.substring(start, i); - if (token !== '') { - token = parser_ensureTemplateFunction(token); - current.appendChild(new TextNode(token, current)); - } - } - - - - var nodes = fragment.nodes; - return nodes != null && nodes.length === 1 - ? nodes[0] - : fragment - ; - }; - - - function char_(str, i) { - return str.charCodeAt(i); - } - function until_(str, i, imax, c) { - for(; i < imax; i++) { - if (c === char_(str, i)) { - return i; - } - } - return i; - } - function unicode_(str, i, imax) { - var lim = 7, - c = char_(str, i); - if (c !== 35 /*#*/) { - return null; - } - var start = i + 1; - while (++i < imax) { - if (--lim === 0) { - return null; - } - c = char_(str, i); - if (48 <= c && c <= 57 /*0-9*/) { - continue; - } - if (65 <= c && c <= 70 /*A-F*/) { - continue; - } - if (c === 120 /*x*/) { - continue; - } - if (c === 59 /*;*/) { - return str.substring(start, i); - } - break; - } - return null; - } - function unicode_toChar(unicode) { - var num = Number('0' + unicode); - if (num !== num) { - parser_warn('Invalid Unicode Char', unicode); - return ''; - } - return String.fromCharCode(num); - } - function entity_(str, i, imax) { - var lim = 10, - start = i; - for(; i < imax; i++, lim--) { - if (lim === 0) { - return null; - } - var c = char_(str, i); - if (c === 59 /*;*/) { - break; - } - if ((48 <= c && c <= 57) || // 0-9 - (65 <= c && c <= 90) || // A-Z - (97 <= c && c <= 122)) { // a-z - i++; - continue; - } - return null; - } - return str.substring(start, i); - } - - var entity_toChar; - (function (d) { - - //if BROWSER - if (d == null) { - return; - } - var i = d.createElement('i'); - entity_toChar = function(ent){ - i.innerHTML = '&' + ent + ';'; - return i.textContent; - }; - //endif - - - }(document)); - - var SINGLE_TAGS = { - area : 1, - base : 1, - br : 1, - col : 1, - embed : 1, - hr : 1, - img : 1, - input : 1, - keygen: 1, - link : 1, - menuitem: 1, - meta : 1, - param : 1, - source: 1, - track : 1, - wbr : 1 - }; - var IMPLIES_CLOSE; - (function(){ - var formTags = { - input: 1, - option: 1, - optgroup: 1, - select: 1, - button: 1, - datalist: 1, - textarea: 1 - }; - IMPLIES_CLOSE = { - tr : { tr:1, th:1, td:1 }, - th : { th:1 }, - td : { thead:1, td:1 }, - body : { head:1, link:1, script:1 }, - li : { li:1 }, - p : { p:1 }, - h1 : { p:1 }, - h2 : { p:1 }, - h3 : { p:1 }, - h4 : { p:1 }, - h5 : { p:1 }, - h6 : { p:1 }, - select : formTags, - input : formTags, - output : formTags, - button : formTags, - datalist: formTags, - textarea: formTags, - option : { option:1 }, - optgroup: { optgroup:1 } - }; - }()); - - function tag_Close(current, name) { - if (SINGLE_TAGS[name] === 1) { - // donothing - return current; - } - - var x = current; - while(x != null) { - if (x.tagName != null && x.tagName.toLowerCase() === name) { - break; - } - x = x.parent; - } - if (x == null) { - parser_warn('Unmatched closing tag', name); - return current; - } - return x.parent || x; - } - function tag_Open(name, current) { - var node = current; - var TAGS = IMPLIES_CLOSE[name]; - if (TAGS != null) { - while (node.parent != null && node.parent.tagName && TAGS[node.parent.tagName.toLowerCase()] === 1) { - node = node.parent; - } - } - - var next = new Node(name, node); - node.appendChild(next); - return next; - } - - function handleNodeAttributes(node) { - var obj = node.attr, - key, val; - for(key in obj) { - val = obj[key]; - if (val != null && val !== key) { - obj[key] = parser_ensureTemplateFunction(val); - } - } - if (obj.expression != null) { - node.expression = obj.expression; - node.type = Dom.STATEMENT; - } - } - - function _appendMany(node, nodes) { - arr_each(nodes, function(x){ - node.appendChild(x) - }); - } - }()); - // end:source ./html/parser - // source ./mask/parser - (function(){ - - /** - * Parse **Mask** template to the AST tree - * @param {string} template - Mask Template - * @returns {MaskNode} - * @memberOf mask - * @method parse - */ - parser_parse = function(template) { - var current = new Fragment(), - fragment = current, - state = go_tag, - last = state_tag, - index = 0, - length = template.length, - classNames, - token, - tokenIndex, - key, - value, - next, - c, // charCode - start, - nextC; - - fragment.source = template; - outer: while (true) { - - while (index < length && (c = template.charCodeAt(index)) < 33) { - index++; - } - - // COMMENTS - if (c === 47) { - // / - nextC = template.charCodeAt(index + 1); - if (nextC === 47){ - // inline (/) - index++; - while (c !== 10 && c !== 13 && index < length) { - // goto newline - c = template.charCodeAt(++index); - } - continue; - } - if (nextC === 42) { - // block (*) - index = template.indexOf('*/', index + 2) + 2; - if (index === 1) { - // if DEBUG - parser_warn('Block comment has no ending', template, index); - // endif - index = length; - } - continue; - } - } - - if (last === state_attr) { - if (classNames != null) { - current.attr['class'] = parser_ensureTemplateFunction(classNames); - classNames = null; - } - if (key != null) { - current.attr[key] = key; - key = null; - token = null; - } - } - - if (token != null) { - - if (state === state_attr) { - - if (key == null) { - key = token; - } else { - value = token; - } - - if (key != null && value != null) { - if (key !== 'class') { - current.attr[key] = value; - } else { - classNames = classNames == null ? value : classNames + ' ' + value; - } - - key = null; - value = null; - } - - } else if (last === state_tag) { - - //next = custom_Tags[token] != null - // ? new Component(token, current, custom_Tags[token]) - // : new Node(token, current); - var parser = custom_Parsers[token]; - if (parser != null) { - // Parser should return: [ parsedNode, nextIndex, nextState ] - var tuple = parser( - template - , index - , length - , current - ); - var node = tuple[0], - nextState = tuple[2]; - - index = tuple[1]; - state = nextState === 0 - ? go_tag - : nextState; - if (node != null) { - node.sourceIndex = tokenIndex; - - var transform = custom_Parsers_Transform[token]; - if (transform != null) { - var x = transform(current, node); - if (x != null) { - // make the current node single, to exit this and the transformed node on close - current.__single = true; - current = x; - } - } - - current.appendChild(node); - if (nextState !== 0) { - current = node; - } else { - if (current.__single === true) { - do { - current = current.parent; - } while (current != null && current.__single != null); - } - } - } - token = null; - continue; - } - - - next = new Node(token, current); - next.sourceIndex = tokenIndex; - - current.appendChild(next); - current = next; - state = state_attr; - - } else if (last === state_literal) { - - next = new TextNode(token, current); - current.appendChild(next); - - if (current.__single === true) { - do { - current = current.parent; - } while (current != null && current.__single != null); - } - state = go_tag; - - } - - token = null; - } - - if (index >= length) { - if (state === state_attr) { - if (classNames != null) { - current.attr['class'] = parser_ensureTemplateFunction(classNames); - } - if (key != null) { - current.attr[key] = key; - } - } - c = null; - break; - } - - if (state === go_up) { - current = current.parent; - while (current != null && current.__single != null) { - current = current.parent; - } - if (current == null) { - current = fragment; - parser_warn( - 'Unexpected tag closing' - , template - , cursor_skipWhitespaceBack(template, index - 1) - ); - } - state = go_tag; - } - - switch (c) { - case 123: - // { - last = state; - state = go_tag; - index++; - continue; - case 62: - // > - last = state; - state = go_tag; - index++; - current.__single = true; - continue; - case 59: - // ; - if (current.nodes != null) { - // skip ; , when node is not a single tag (else goto 125) - index++; - continue; - } - /* falls through */ - case 125: - // ;} - if (c === 125 && (state === state_tag || state === state_attr)) { - // single tag was not closed with `;` but closing parent - index--; - } - index++; - last = state; - state = go_up; - continue; - case 39: - case 34: - // '" - // Literal - could be as textnode or attribute value - if (state === go_attrVal) { - state = state_attr; - } else { - last = state = state_literal; - } - index++; - - var isEscaped = false, - isUnescapedBlock = false, - _char = c === 39 ? "'" : '"'; - - start = index; - - while ((index = template.indexOf(_char, index)) > -1) { - if (template.charCodeAt(index - 1) !== 92 /*'\\'*/ ) { - break; - } - isEscaped = true; - index++; - } - if (index === -1) { - parser_warn('Literal has no ending', template, start - 1); - index = length; - } - - if (index === start) { - nextC = template.charCodeAt(index + 1); - if (nextC === 124 || nextC === c) { - // | (obsolete) or triple quote - isUnescapedBlock = true; - start = index + 2; - index = template.indexOf((nextC === 124 ? '|' : _char) + _char + _char, start); - - if (index === -1) - index = length; - } - } - - tokenIndex = start; - token = template.substring(start, index); - - if (isEscaped === true) { - token = token.replace(__rgxEscapedChar[_char], _char); - } - - if (state !== state_attr || key !== 'class') { - token = parser_ensureTemplateFunction(token); - } - index += isUnescapedBlock ? 3 : 1; - continue; - } - - if (state === go_tag) { - last = state_tag; - state = state_tag; - //next_Type = Dom.NODE; - - if (c === 46 /* . */ || c === 35 /* # */ ) { - tokenIndex = index; - token = 'div'; - continue; - } - - //-if (c === 58 || c === 36 || c === 64 || c === 37) { - // // : /*$ @ %*/ - // next_Type = Dom.COMPONENT; - //} - - } - - else if (state === state_attr) { - if (c === 46) { - // . - index++; - key = 'class'; - state = go_attrHeadVal; - } - - else if (c === 35) { - // # - index++; - key = 'id'; - state = go_attrHeadVal; - } - - else if (c === 61) { - // =; - index++; - state = go_attrVal; - - if (last === state_tag && key == null) { - parser_warn('Unexpected tag assignment', template, index, c, state); - } - continue; - } - - else if (c === 40) { - // ( - start = 1 + index; - index = 1 + cursor_groupEnd(template, start, length, c, 41 /* ) */); - current.expression = template.substring(start, index - 1); - current.type = Dom.STATEMENT; - continue; - } - - else { - - if (key != null) { - tokenIndex = index; - token = key; - continue; - } - } - } - - if (state === go_attrVal || state === go_attrHeadVal) { - last = state; - state = state_attr; - } - - - - /* TOKEN */ - - var isInterpolated = false; - - start = index; - while (index < length) { - - c = template.charCodeAt(index); - - if (c === interp_code_START) { - var nextC = template.charCodeAt(index + 1); - if (nextC === interp_code_OPEN) { - isInterpolated = true; - index = 1 + cursor_groupEnd( - template - , index + 2 - , length - , interp_code_START - , interp_code_CLOSE - ); - c = template.charCodeAt(index); - } - else if ((nextC >= 65 && nextC <= 122) || nextC === 36 || nextC === 95) { - //A-z$_ - isInterpolated = true; - } - } - if (c === 64 && template.charCodeAt(index + 1) === 91) { - //@[ - index = cursor_groupEnd(template, index + 2, length, 91, 93) + 1; - c = template.charCodeAt(index); - } - - // if DEBUG - if (c === 0x0027 || c === 0x0022 || c === 0x002F || c === 0x003C || c === 0x002C) { - // '"/<, - parser_error('Unexpected char', template, index, c, state); - break outer; - } - // endif - - - if (last !== go_attrVal && (c === 46 || c === 35)) { - // .# - // break on .# only if parsing attribute head values - break; - } - - if (c < 33 || - c === 61 || - c === 62 || - c === 59 || - c === 40 || - c === 123 || - c === 125) { - // =>;({} - break; - } - index++; - } - - token = template.substring(start, index); - tokenIndex = start; - if (token === '') { - parser_warn('String expected', template, index, c, state); - break; - } - - if (isInterpolated === true) { - if (state === state_tag) { - parser_warn('Invalid interpolation (in tag name)' - , template - , index - , token - , state); - break; - } - if (state === state_attr) { - if (key === 'id' || last === go_attrVal) { - token = parser_ensureTemplateFunction(token); - } - else if (key !== 'class') { - // interpolate class later - parser_warn('Invalid interpolation (in attr name)' - , template - , index - , token - , state); - break; - } - } - } - } - - if (c !== c) { - parser_warn('IndexOverflow' - , template - , index - , c - , state - ); - } - - // if DEBUG - var parent = current.parent; - if (parent != null && - parent !== fragment && - parent.__single !== true && - current.nodes != null && - parent.tagName !== 'imports') { - parser_warn('Tag was not closed: ' + current.tagName, template) - } - // endif - - - var nodes = fragment.nodes; - return nodes != null && nodes.length === 1 - ? nodes[0] - : fragment - ; - }; - - - }()); - - // end:source ./mask/parser - // source ./mask/partials/attributes - (function(){ - - parser_parseAttr = function(str, start, end){ - var attr = {}, - i = start, - key, val, c; - while(i < end) { - i = cursor_skipWhitespace(str, i, end); - if (i === end) - break; - - start = i; - for(; i < end; i++){ - c = str.charCodeAt(i); - if (c === 61 || c < 33) break; - } - - key = str.substring(start, i); - - i = cursor_skipWhitespace(str, i, end); - if (i === end) { - attr[key] = key; - break; - } - if (str.charCodeAt(i) !== 61 /*=*/) { - attr[key] = key; - continue; - } - - i = start = cursor_skipWhitespace(str, i + 1, end); - c = str.charCodeAt(i); - if (c === 34 || c === 39) { - // "|' - i = cursor_quoteEnd(str, i + 1, end, c === 39 ? "'" : '"'); - - attr[key] = str.substring(start + 1, i); - i++; - continue; - } - i = cursor_goToWhitespace(str, i, end); - attr[key] = str.substring(start, i); - } - return attr; - }; - - parser_parseAttrObject = function(str, i, imax, attr){ - var state_KEY = 1, - state_VAL = 2, - state_END = 3, - state = state_KEY, - token, index, key, c; - - outer: while(i < imax) { - i = cursor_skipWhitespace(str, i, imax); - if (i === imax) - break; - - index = i; - c = str.charCodeAt(i); - switch (c) { - case 61 /* = */: - i++; - state = state_VAL; - continue outer; - case 123: - case 59: - case 62: - case 47: - // {;>/ - state = state_END; - break; - case 40: - //() - i = cursor_groupEnd(str, ++index, imax, 40, 41); - if (key != null) { - attr[key] = key; - } - key = 'expression'; - token = str.substring(index, i); - i++; - state = state_VAL; - break; - case 39: - case 34: - //'" - i = cursor_quoteEnd(str, ++index, imax, c === 39 ? "'" : '"'); - token = str.substring(index, i); - i++; - break; - default: - i++; - for(; i < imax; i++){ - c = str.charCodeAt(i); - if (c < 33 || c === 61 || c === 123 || c === 59 || c === 62 || c === 47) { - // ={;>/ - break; - } - } - token = str.substring(index, i); - break; - } - - if (token === '') { - parser_warn('Token not readable', str, i); - i++; - continue; - } - - if (state === state_VAL) { - attr[key] = token; - state = state_KEY; - key = null; - continue; - } - if (key != null) { - attr[key] = key; - key = null; - } - if (state === state_END) { - break; - } - key = token; - } - return i; - }; - - }()); - // end:source ./mask/partials/attributes - // source ./mask/partials/literal - (function(){ - parser_parseLiteral = function(str, start, imax){ - var i = cursor_skipWhitespace(str, start, imax); - - var c = str.charCodeAt(i); - if (c !== 34 && c !== 39) { - // "' - parser_error("A quote is expected", str, i); - return null; - } - - var isEscaped = false, - isUnescapedBlock = false, - _char = c === 39 ? "'" : '"'; - - start = ++i; - - while ((i = str.indexOf(_char, i)) > -1) { - if (str.charCodeAt(i - 1) !== 92 /*'\\'*/ ) { - break; - } - isEscaped = true; - i++; - } - - if (i === -1) { - parser_warn('Literal has no ending', str, start - 1); - i = imax; - } - - if (i === start) { - var nextC = str.charCodeAt(i + 1); - if (nextC === c) { - isUnescapedBlock = true; - start = i + 2; - i = str.indexOf(_char + _char + _char, start); - if (i === -1) - i = imax; - } - } - - var token = str.substring(start, i); - if (isEscaped === true) { - token = token.replace(__rgxEscapedChar[_char], _char); - } - i += isUnescapedBlock ? 3 : 1; - return [ token, i ]; - }; - }()); - // end:source ./mask/partials/literal - - - }(Dom.Node, Dom.TextNode, Dom.Fragment, Dom.Component)); - - // end:source parser/ - - // source builder/ - var builder_componentID = 0, - builder_build, - builder_Ctx; - - (function(){ - - // source ctx - (function(){ - - builder_Ctx = class_create(class_Dfr, { - constructor: function(data){ - obj_extend(this, data); - }, - // Is true, if some of the components in a ctx is async - async: false, - // List of busy components - defers: null /*Array*/, - - // NodeJS - // Track components ID - _id: null, - // ModelsBuilder for HTML serialization - _models: null, - - // ModulesBuilder fot HTML serialization - _modules: null, - - _redirect: null, - _rewrite: null - }); - }()); - // end:source ctx - // source util - var builder_resumeDelegate, - builder_pushCompo; - - (function(){ - - builder_resumeDelegate = function (ctr, model, ctx, container, children, finilizeFn){ - var anchor = document.createComment(''); - container.appendChild(anchor); - return function(){ - return _resume(ctr, model, ctx, anchor, children, finilizeFn); - }; - }; - builder_pushCompo = function (ctr, compo) { - var compos = ctr.components; - if (compos == null) { - ctr.components = [ compo ]; - return; - } - compos.push(compo); - }; - - // == private - - function _resume(ctr, model, ctx, anchorEl, children, finilize) { - - if (ctr.tagName != null && ctr.tagName !== ctr.compoName) { - ctr.nodes = { - tagName: ctr.tagName, - attr: ctr.attr, - nodes: ctr.nodes, - type: 1 - }; - } - if (ctr.model != null) { - model = ctr.model; - } - - var nodes = ctr.nodes, - elements = []; - if (nodes != null) { - - var isarray = nodes instanceof Array, - length = isarray === true ? nodes.length : 1, - i = 0, - childNode = null, - fragment = document.createDocumentFragment(); - - for (; i < length; i++) { - childNode = isarray === true ? nodes[i] : nodes; - - builder_build(childNode, model, ctx, fragment, ctr, elements); - } - - anchorEl.parentNode.insertBefore(fragment, anchorEl); - } - - - // use or override custom attr handlers - // in Compo.handlers.attr object - // but only on a component, not a tag ctr - if (ctr.tagName == null) { - var attrHandlers = ctr.handlers && ctr.handlers.attr, - attrFn, - key; - for (key in ctr.attr) { - - attrFn = null; - - if (attrHandlers && is_Function(attrHandlers[key])) { - attrFn = attrHandlers[key]; - } - - if (attrFn == null && is_Function(custom_Attributes[key])) { - attrFn = custom_Attributes[key]; - } - - if (attrFn != null) { - attrFn(anchorEl, ctr.attr[key], model, ctx, elements[0], ctr); - } - } - } - - if (is_Function(finilize)) { - finilize.call( - ctr - , elements - , model - , ctx - , anchorEl.parentNode - ); - } - - - if (children != null && children !== elements){ - var il = children.length, - jl = elements.length, - j = -1; - - while(++j < jl){ - children[il + j] = elements[j]; - } - } - } - - }()); - // end:source util - // source build_textNode - var build_textNode; - (function(){ - build_textNode = function build_textNode(node, model, ctx, el, ctr) { - - var content = node.content; - if (is_Function(content)) { - var result = content( - 'node', model, ctx, el, ctr - ); - if (typeof result === 'string') { - append_textNode(el, result); - return; - } - // result is array with some htmlelements - var text = '', - jmax = result.length, - j = 0, - x; - - for (; j < jmax; j++) { - x = result[j]; - - if (typeof x === 'object') { - // In this casee result[j] should be any HTMLElement - if (text !== '') { - append_textNode(el, text); - text = ''; - } - if (x.nodeType == null) { - text += x.toString(); - continue; - } - el.appendChild(x); - continue; - } - text += x; - } - if (text !== '') { - append_textNode(el, text); - } - return; - } - append_textNode(el, content); - }; - - var append_textNode; - (function(doc){ - append_textNode = function(el, text){ - el.appendChild(doc.createTextNode(text)); - }; - }(document)); - }()); - // end:source build_textNode - // source build_node - var build_node; - (function(){ - build_node = function build_node(node, model, ctx, container, ctr, children){ - - var tagName = node.tagName, - attr = node.attr; - - var el = el_create(tagName); - if (el == null) - return; - - if (children != null){ - children.push(el); - attr['x-compo-id'] = ctr.ID; - } - - // ++ insert el into container before setting attributes, so that in any - // custom util parentNode is available. This is for mask.node important - // http://jsperf.com/setattribute-before-after-dom-insertion/2 - if (container != null) { - container.appendChild(el); - } - - var key, mix, val, fn; - for(key in attr) { - mix = attr[key]; - if (is_Function(mix)) { - var result = mix('attr', model, ctx, el, ctr, key); - if (result == null) { - continue; - } - if (typeof result === 'string') { - val = result; - } else if (is_ArrayLike(result)){ - if (result.length === 0) { - continue; - } - val = result.join(''); - } else { - val = result; - } - } else { - val = mix; - } - - if (val != null && val !== '') { - fn = custom_Attributes[key]; - if (fn != null) { - fn(node, val, model, ctx, el, ctr, container); - } else { - el.setAttribute(key, val); - } - } - } - return el; - }; - - var el_create; - (function(doc){ - el_create = function(name){ - // if DEBUG - try { - // endif - return doc.createElement(name); - // if DEBUG - } catch(error) { - log_error(name, 'element cannot be created. If this should be a custom handler tag, then controller is not defined'); - return null; - } - // endif - }; - }(document)); - }()); - // end:source build_node - // source build_component - var build_compo; - (function(){ - build_compo = function(node, model, ctx, container, ctr, children){ - - var compoName = node.tagName, - Handler; - - if (node.controller != null) - Handler = node.controller; - - if (Handler == null) - Handler = custom_Tags[compoName]; - - if (Handler == null) - return build_NodeAsCompo(node, model, ctx, container, ctr, children); - - var isStatic = false, - handler, attr, key; - - if (typeof Handler === 'function') { - handler = new Handler(node, model, ctx, container, ctr); - } else{ - handler = Handler; - isStatic = true; - } - var fn = isStatic - ? build_Static - : build_Component - ; - return fn(handler, node, model, ctx, container, ctr, children); - }; - - // PRIVATE - - function build_Component(compo, node, model, ctx, container, ctr, children){ - var attr, key; - - compo.ID = ++builder_componentID; - compo.attr = attr = attr_extend(compo.attr, node.attr); - compo.parent = ctr; - compo.expression = node.expression; - - if (compo.compoName == null) - compo.compoName = node.tagName; - - if (compo.model == null) - compo.model = model; - - if (compo.nodes == null) - compo.nodes = node.nodes; - - for (key in attr) { - if (typeof attr[key] === 'function') - attr[key] = attr[key]('attr', model, ctx, container, ctr, key); - } - - - listeners_emit( - 'compoCreated' - , compo - , model - , ctx - , container - ); - - if (is_Function(compo.renderStart)) - compo.renderStart(model, ctx, container); - - - builder_pushCompo(ctr, compo); - - if (compo.async === true) { - var resume = builder_resumeDelegate( - compo - , model - , ctx - , container - , children - , compo.renderEnd - ); - compo.await(resume); - return null; - } - - if (compo.tagName != null) { - compo.nodes = { - tagName: compo.tagName, - attr: compo.attr, - nodes: compo.nodes, - type: 1 - }; - } - - - if (typeof compo.render === 'function') { - compo.render(compo.model, ctx, container); - // Overriden render behaviour - do not render subnodes - return null; - } - return compo; - } - - - function build_Static(static_, node, model, ctx, container, ctr, children) { - var Ctor = static_.__Ctor, - wasRendered = false, - elements, - compo, - clone; - - if (Ctor != null) { - clone = new Ctor(node, ctr); - } - else { - clone = static_; - - for (var key in node) - clone[key] = node[key]; - - clone.parent = ctr; - } - - var attr = clone.attr; - if (attr != null) { - for (var key in attr) { - if (typeof attr[key] === 'function') - attr[key] = attr[key]('attr', model, ctx, container, ctr, key); - } - } - - if (is_Function(clone.renderStart)) { - clone.renderStart(model, ctx, container, ctr, children); - } - - clone.ID = ++builder_componentID; - builder_pushCompo(ctr, clone); - - var i = ctr.components.length - 1; - if (is_Function(clone.render)){ - wasRendered = true; - elements = clone.render(model, ctx, container, ctr, children); - arr_pushMany(children, elements); - - if (is_Function(clone.renderEnd)) { - compo = clone.renderEnd(elements, model, ctx, container, ctr); - if (compo != null) { - // overriden - ctr.components[i] = compo; - compo.components = clone.components == null - ? ctr.components.splice(i + 1) - : clone.components - ; - } - } - } - - return wasRendered === true ? null : clone; - } - - function build_NodeAsCompo(node, model, ctx, container, ctr, childs){ - node.ID = ++builder_componentID; - - builder_pushCompo(ctr, node); - - if (node.model == null) - node.model = model; - - var els = node.elements = []; - if (node.render) { - node.render(node.model, ctx, container, ctr, els); - } else { - builder_build(node.nodes, node.model, ctx, container, node, els); - } - - if (childs != null && els.length !== 0) { - arr_pushMany(childs, els); - } - return null; - } - - }()); - - // end:source build_component - // source build - /** - * @param {MaskNode} node - * @param {*} model - * @param {object} ctx - * @param {IAppendChild} container - * @param {object} controller - * @param {Array} children - @out - * @returns {IAppendChild} container - * @memberOf mask - * @method build - */ - builder_build = function(node, model, ctx, container, ctr, children) { - - if (node == null) - return container; - - var type = node.type, - elements, - key, - value; - - if (ctr == null) - ctr = new Dom.Component(); - - if (type == null){ - // in case if node was added manually, but type was not set - if (is_ArrayLike(node)) { - // Dom.FRAGMENT - type = 10; - } - else if (node.tagName != null){ - type = 1; - } - else if (node.content != null){ - type = 2; - } - } - - - var tagName = node.tagName; - if (tagName === 'else') - return container; - - if (type === 1 && custom_Tags[tagName] != null) { - // check if custom ctr exists - type = 4; - } - if (type === 1 && custom_Statements[tagName] != null) { - // check if custom statement exists - type = 15; - } - - if (container == null && type !== 1) { - container = document.createDocumentFragment(); - } - - // Dom.TEXTNODE - if (type === 2) { - build_textNode(node, model, ctx, container, ctr); - return container; - } - - // Dom.SET - if (type === 10) { - var j = 0, - jmax = node.length; - for(; j < jmax; j++) { - builder_build(node[j], model, ctx, container, ctr, children); - } - return container; - } - - // Dom.STATEMENT - if (type === 15) { - var Handler = custom_Statements[tagName]; - if (Handler == null) { - if (custom_Tags[tagName] != null) { - // Dom.COMPONENT - type = 4; - } else { - log_error('', tagName); - return container; - } - } - if (type === 15) { - Handler.render(node, model, ctx, container, ctr, children); - return container; - } - } - - // Dom.NODE - if (type === 1) { - container = build_node(node, model, ctx, container, ctr, children); - children = null; - } - - // Dom.COMPONENT - if (type === 4) { - ctr = build_compo(node, model, ctx, container, ctr, children); - if (ctr == null) { - return container; - } - elements = []; - node = ctr; - - if (ctr.model !== model && ctr.model != null) { - model = ctr.model; - } - } - - var nodes = node.nodes; - if (nodes != null) { - if (children != null && elements == null) { - elements = children; - } - if (is_ArrayLike(nodes)) { - var imax = nodes.length, - i = 0; - for(; i < imax; i++) { - builder_build(nodes[i], model, ctx, container, ctr, elements); - } - } else { - - builder_build(nodes, model, ctx, container, ctr, elements); - } - } - - if (type === 4) { - - // use or override custom attr handlers - // in Compo.handlers.attr object - // but only on a component, not a tag ctr - if (node.tagName == null) { - var attrHandlers = node.handlers && node.handlers.attr, - attrFn, - val, - key; - - for (key in node.attr) { - - val = node.attr[key]; - - if (val == null) - continue; - - attrFn = null; - - if (attrHandlers != null && is_Function(attrHandlers[key])) - attrFn = attrHandlers[key]; - - if (attrFn == null && custom_Attributes[key] != null) - attrFn = custom_Attributes[key]; - - if (attrFn != null) - attrFn(node, val, model, ctx, elements[0], ctr); - } - } - - if (is_Function(node.renderEnd)) - node.renderEnd(elements, model, ctx, container); - } - - if (children != null && elements != null && children !== elements) - arr_pushMany(children, elements); - - return container; - }; - // end:source build - - }()); - // end:source builder/ - - // source mask - /** - * @namespace mask - */ - var Mask; - (function(){ - Mask = { - /** - * Render the mask template to document fragment or single html node - * @param {(string|MaskDom)} template - Mask string template or Mask Ast to render from. - * @param {*} [model] - Model Object. - * @param {Object} [ctx] - Context can store any additional information, that custom handler may need - * @param {IAppendChild} [container] - Container Html Node where template is rendered into - * @param {Object} [controller] - Component that should own this template - * @returns {(IAppendChild|Node|DocumentFragment)} container - * @memberOf mask - */ - render: function (mix, model, ctx, container, controller) { - - // if DEBUG - if (container != null && typeof container.appendChild !== 'function'){ - log_error('.render(template[, model, ctx, container, controller]', 'Container should implement .appendChild method'); - } - // endif - - var template = mix; - if (typeof mix === 'string') { - if (_Object_hasOwnProp.call(__templates, mix)){ - /* if Object doesnt contains property that check is faster - then "!=null" http://jsperf.com/not-in-vs-null/2 */ - template = __templates[mix]; - }else{ - template = __templates[mix] = parser_parse(mix); - } - } - if (ctx == null || ctx.constructor !== builder_Ctx) - ctx = new builder_Ctx(ctx); - - return builder_build(template, model, ctx, container, controller); - }, - /** - * Same to `mask.render` but returns the promise, which is resolved when all async components - * are resolved, or is in resolved state, when all components are synchronous. - * For the parameters doc @see {@link mask.render} - * @returns {Promise} Alwats fullfills with `IAppendChild|Node|DocumentFragment` - * @memberOf mask - */ - renderAsync: function(template, model, ctx, container, ctr) { - if (ctx == null || ctx.constructor !== builder_Ctx) - ctx = new builder_Ctx(ctx); - - var dom = this.render(template, model, ctx, container, ctr), - dfr = new class_Dfr; - - if (ctx.async === true) { - ctx.done(function(){ - dfr.resolve(dom); - }); - } else { - dfr.resolve(dom); - } - return dfr; - }, - // parser/mask/parse.js - parse: parser_parse, - // parser/html/parse.js - parseHtml: parser_parseHtml, - // formatter/stringify.js - stringify: mask_stringify, - // builder/build.js - build: builder_build, - // feature/run.js - run: mask_run, - // feature/merge.js - merge: mask_merge, - // feature/optimize.js - optimize: mask_optimize, - registerOptimizer: mask_registerOptimizer, - // feature/TreeWalker.js - TreeWalker: mask_TreeWalker, - // feature/Module.j - Module: Module, - // custom/tag.js - registerHandler: customTag_register, - registerFromTemplate: customTag_registerFromTemplate, - define: customTag_define, - getHandler: customTag_get, - getHandlers: customTag_getAll, - // custom/statement.js - registerStatement: customStatement_register, - getStatement: customStatement_get, - // custom/attribute.js - registerAttrHandler: customAttr_register, - getAttrHandler: customAttr_get, - // custom/util.js - registerUtil: customUtil_register, - getUtil: customUtil_get, - $utils: customUtil_$utils, - _ : customUtil_$utils, - // dom/exports.js - Dom: Dom, - /** - * Is present only in DEBUG (not minified) version - * Evaluates script in masks library scope - * @param {string} script - */ - plugin: function(source){ - //if DEBUG - eval(source); - //endif - }, - clearCache: function(key){ - if (arguments.length === 0) { - __templates = {}; - return; - } - delete __templates[key]; - }, - Utils: { - Expression: ExpressionUtil, - ensureTmplFn: parser_ensureTemplateFunction - }, - obj: { - get: obj_getProperty, - set: obj_setProperty, - extend: obj_extend, - }, - is: { - Function: is_Function, - String: is_String, - ArrayLike: is_ArrayLike, - Array: is_ArrayLike, - Object: is_Object, - NODE: is_NODE, - DOM: is_DOM - }, - 'class': { - create: class_create, - createError: error_createClass, - Deferred: class_Dfr, - EventEmitter: class_EventEmitter, - }, - parser: { - ObjectLexer: parser_ObjectLexer - }, - // util/listeners.js - on: listeners_on, - off: listeners_off, - - - // Stub for the reload.js, which will be used by includejs.autoreload - delegateReload: function(){}, - - /** - * Define interpolation quotes for the parser - * Starting from 0.6.9 mask uses ~[] for string interpolation. - * Old '#{}' was changed to '~[]', while template is already overloaded with #, { and } usage. - * @param {string} start - Must contain 2 Characters - * @param {string} end - Must contain 1 Character - **/ - setInterpolationQuotes: parser_setInterpolationQuotes, - - setCompoIndex: function(index){ - builder_componentID = index; - }, - - cfg: mask_config, - config: mask_config, - - // For the consistence with the NodeJS - toHtml: function(dom) { - return $(dom).outerHtml(); - }, - - factory: function(compoName){ - var params_ = _Array_slice.call(arguments, 1), - factory = params_.pop(), - mode = 'both'; - if (params_.length !== 0) { - var x = params_[0]; - if (x === 'client' || x === 'server') { - mode = x; - } - } - if ((mode === 'client' && is_NODE) || (mode === 'server' && is_DOM) ) { - customTag_register(compoName, { - meta: { mode: mode } - }); - return; - } - factory(global, Compo.config.getDOMLibrary(), function(compo){ - customTag_register(compoName, compo); - }); - } - }; - - - var __templates = {}; - }()); - - // end:source mask - - /*** Libraries ***/ - // source /ref-mask-compo/lib/compo.embed.js - - var Compo = exports.Compo = Mask.Compo = (function(mask){ - // source /src/scope-vars.js - var Dom = mask.Dom, - - _mask_ensureTmplFnOrig = mask.Utils.ensureTmplFn, - _mask_ensureTmplFn, - _resolve_External, - domLib, - Class - ; - - (function(){ - _mask_ensureTmplFn = function(value) { - return typeof value !== 'string' - ? value - : _mask_ensureTmplFnOrig(value) - ; - }; - _resolve_External = function(key){ - return _global[key] || _exports[key] || _atma[key] - }; - - var _global = global, - _atma = global.atma || {}, - _exports = exports || {}; - - function resolve() { - var i = arguments.length, val; - while( --i > -1 ) { - val = _resolve_External(arguments[i]); - if (val != null) - return val; - } - return null; - } - domLib = resolve('jQuery', 'Zepto', '$'); - Class = resolve('Class'); - }()); - - - // if DEBUG - if (global.document != null && domLib == null) { - - log_warn('DomLite is used. You can set jQuery-Zepto-Kimbo via `Compo.config.setDOMLibrary($)`'); - } - // endif - // end:source /src/scope-vars.js - - // source /src/util/exports.js - // source ./selector.js - var selector_parse, - selector_match - ; - - (function(){ - - selector_parse = function(selector, type, direction) { - if (selector == null) - log_error('selector is undefined', type); - - if (typeof selector === 'object') - return selector; - - - var key, prop, nextKey; - - if (key == null) { - switch (selector[0]) { - case '#': - key = 'id'; - selector = selector.substring(1); - prop = 'attr'; - break; - case '.': - key = 'class'; - selector = sel_hasClassDelegate(selector.substring(1)); - prop = 'attr'; - break; - default: - key = type === Dom.SET ? 'tagName' : 'compoName'; - break; - } - } - - if (direction === 'up') { - nextKey = 'parent'; - } else { - nextKey = type === Dom.SET ? 'nodes' : 'components'; - } - - return { - key: key, - prop: prop, - selector: selector, - nextKey: nextKey - }; - }; - - selector_match = function(node, selector, type) { - if (node == null) - return false; - - if (is_String(selector)) { - if (type == null) - type = Dom[node.compoName ? 'CONTROLLER' : 'SET']; - - selector = selector_parse(selector, type); - } - - var obj = selector.prop ? node[selector.prop] : node; - if (obj == null) - return false; - - if (is_Function(selector.selector)) - return selector.selector(obj[selector.key]); - - // regexp - if (selector.selector.test != null) - return selector.selector.test(obj[selector.key]); - - // string | int - /* jshint eqeqeq: false */ - return obj[selector.key] == selector.selector; - /* jshint eqeqeq: true */ - } - - // PRIVATE - - function sel_hasClassDelegate(matchClass) { - return function(className){ - return sel_hasClass(className, matchClass); - }; - } - - // [perf] http://jsperf.com/match-classname-indexof-vs-regexp/2 - function sel_hasClass(className, matchClass, index) { - if (typeof className !== 'string') - return false; - - if (index == null) - index = 0; - - index = className.indexOf(matchClass, index); - - if (index === -1) - return false; - - if (index > 0 && className.charCodeAt(index - 1) > 32) - return sel_hasClass(className, matchClass, index + 1); - - var class_Length = className.length, - match_Length = matchClass.length; - - if (index < class_Length - match_Length && className.charCodeAt(index + match_Length) > 32) - return sel_hasClass(className, matchClass, index + 1); - - return true; - } - - }()); - - // end:source ./selector.js - // source ./traverse.js - var find_findSingle, - find_findAll; - (function(){ - - find_findSingle = function(node, matcher) { - if (node == null) - return null; - - if (is_Array(node)) { - var imax = node.length, - i = 0, x; - - for(; i < imax; i++) { - x = find_findSingle(node[i], matcher); - if (x != null) - return x; - } - return null; - } - - if (selector_match(node, matcher)) - return node; - - node = node[matcher.nextKey]; - return node == null - ? null - : find_findSingle(node, matcher) - ; - }; - - find_findAll = function(node, matcher, out) { - if (out == null) - out = []; - - if (is_Array(node)) { - var imax = node.length, - i = 0, x; - - for(; i < imax; i++) { - find_findAll(node[i], matcher, out); - } - return out; - } - - if (selector_match(node, matcher)) - out.push(node); - - node = node[matcher.nextKey]; - return node == null - ? out - : find_findAll(node, matcher, out) - ; - }; - - }()); - - // end:source ./traverse.js - // source ./dom.js - var dom_addEventListener, - - node_tryDispose, - node_tryDisposeChildren - ; - - (function(){ - - dom_addEventListener = function(el, event, fn, param, ctr) { - - if (TouchHandler.supports(event)) { - TouchHandler.on(el, event, fn); - return; - } - if (KeyboardHandler.supports(event, param)) { - KeyboardHandler.attach(el, event, param, fn, ctr); - return; - } - // allows custom events - in x-signal, for example - if (domLib != null) - return domLib(el).on(event, fn); - - if (el.addEventListener != null) - return el.addEventListener(event, fn, false); - - if (el.attachEvent) - el.attachEvent('on' + event, fn); - }; - - node_tryDispose = function(node){ - if (node.hasAttribute('x-compo-id')) { - - var id = node.getAttribute('x-compo-id'), - compo = Anchor.getByID(id) - ; - - if (compo != null) { - if (compo.$ == null || compo.$.length === 1) { - compo_dispose(compo); - compo_detachChild(compo); - return; - } - var i = _Array_indexOf.call(compo.$, node); - if (i !== -1) - _Array_splice.call(compo.$, i, 1); - } - } - node_tryDisposeChildren(node); - }; - - node_tryDisposeChildren = function(node){ - - var child = node.firstChild; - while(child != null) { - - if (child.nodeType === 1) - node_tryDispose(child); - - - child = child.nextSibling; - } - }; - - }()); - - // end:source ./dom.js - // source ./domLib.js - /** - * Combine .filter + .find - */ - - var domLib_find, - domLib_on - ; - - (function(){ - - domLib_find = function($set, selector) { - return $set.filter(selector).add($set.find(selector)); - }; - - domLib_on = function($set, type, selector, fn) { - - if (selector == null) - return $set.on(type, fn); - - $set - .on(type, selector, fn) - .filter(selector) - .on(type, fn); - - return $set; - }; - - }()); - - - // end:source ./domLib.js - // source ./compo.js - var compo_dispose, - compo_detachChild, - compo_ensureTemplate, - compo_ensureAttributes, - compo_attachDisposer, - compo_removeElements, - compo_prepairAsync, - compo_errored, - - compo_meta_prepairAttributeHandler, - compo_meta_executeAttributeHandler - ; - - (function(){ - - compo_dispose = function(compo) { - if (compo.dispose != null) - compo.dispose(); - - Anchor.removeCompo(compo); - - var compos = compo.components; - if (compos != null) { - var i = compos.length; - while ( --i > -1 ) { - compo_dispose(compos[i]); - } - } - }; - - compo_detachChild = function(childCompo){ - var parent = childCompo.parent; - if (parent == null) - return; - - var arr = childCompo.$, - elements = parent.$ || parent.elements, - i; - - if (elements && arr) { - var jmax = arr.length, - el, j; - - i = elements.length; - while( --i > -1){ - el = elements[i]; - j = jmax; - - while(--j > -1){ - if (el === arr[j]) { - elements.splice(i, 1); - break; - } - } - } - } - - var compos = parent.components; - if (compos != null) { - - i = compos.length; - while(--i > -1){ - if (compos[i] === childCompo) { - compos.splice(i, 1); - break; - } - } - - if (i === -1) - log_warn(' - i`m not in parents collection', childCompo); - } - }; - compo_ensureTemplate = function(compo) { - if (compo.nodes == null) { - compo.nodes = getTemplateProp_(compo); - return; - } - var behaviour = compo.meta.template; - if (behaviour == null || behaviour === 'replace') { - return; - } - var template = getTemplateProp_(compo); - if (template == null) { - return; - } - if (behaviour === 'merge') { - compo.nodes = mask_merge(template, compo.nodes, compo); - return; - } - if (behaviour === 'join') { - compo.nodes = [template, compo.nodes]; - return; - } - log_error('Invalid meta.nodes behaviour', behaviour); - }; - compo_attachDisposer = function(compo, disposer) { - - if (compo.dispose == null) { - compo.dispose = disposer; - return; - } - - var prev = compo.dispose; - compo.dispose = function(){ - disposer.call(this); - prev.call(this); - }; - }; - - compo_removeElements = function(compo) { - if (compo.$) { - compo.$.remove(); - return; - } - - var els = compo.elements; - if (els) { - var i = -1, - imax = els.length; - while ( ++i < imax ) { - if (els[i].parentNode) - els[i].parentNode.removeChild(els[i]); - } - return; - } - - var compos = compo.components; - if (compos) { - var i = -1, - imax = compos.length; - while ( ++i < imax ){ - compo_removeElements(compos[i]); - } - } - }; - - compo_prepairAsync = function(dfr, compo, ctx){ - var resume = Compo.pause(compo, ctx) - dfr.then(resume, function(error){ - compo_errored(compo, error); - resume(); - }); - }; - - compo_errored = function(compo, error){ - var msg = '[%] Failed.'.replace('%', compo.compoName || compo.tagName); - if (error) { - var desc = error.message || error.statusText || String(error); - if (desc) { - msg += ' ' + desc; - } - } - compo.nodes = reporter_createErrorNode(msg); - compo.renderEnd = fn_doNothing; - }; - - // == Meta Attribute Handler - (function(){ - - compo_meta_prepairAttributeHandler = function(Proto){ - if (Proto.meta == null) { - Proto.meta = { - attributes: null, - cache: null, - mode: null - }; - } - - var attr = Proto.meta.attributes, - fn = null; - if (attr) { - var hash = {}; - for(var key in attr) { - _handleProperty_Delegate(Proto, key, attr[key], hash); - } - fn = _handleAll_Delegate(hash); - } - Proto.meta.handleAttributes = fn; - }; - compo_meta_executeAttributeHandler = function(compo, model){ - var fn = compo.meta && compo.meta.handleAttributes; - return fn == null ? true : fn(compo, model); - }; - - function _handleAll_Delegate(hash){ - return function(compo, model){ - var attr = compo.attr, - key, fn, val, error; - for(key in hash){ - fn = hash[key]; - val = attr[key]; - error = fn(compo, val, model); - - if (error == null) - continue; - - _errored(compo, error, key, val) - return false; - } - return true; - }; - } - function _handleProperty_Delegate(Proto, metaKey, metaVal, hash) { - var optional = metaKey.charCodeAt(0) === 63, // ? - default_ = null, - attrName = optional - ? metaKey.substring(1) - : metaKey; - - var property = _getProperty(attrName), - fn = null, - type = typeof metaVal; - if ('string' === type) { - if (metaVal === 'string' || metaVal === 'number' || metaVal === 'boolean') { - fn = _ensureFns[metaVal]; - } else { - optional = true; - default_ = metaVal; - fn = _ensureFns_Delegate.any(); - } - } - else if ('boolean' === type || 'number' === type) { - optional = true; - fn = _ensureFns[type]; - default_ = metaVal; - } - else if ('function' === type) { - fn = metaVal; - } - else if (metaVal == null) { - fn = _ensureFns_Delegate.any(); - } - else if (metaVal instanceof RegExp) { - fn = _ensureFns_Delegate.regexp(metaVal); - } - else if (typeof metaVal === 'object') { - fn = _ensureFns_Delegate.options(metaVal); - default_ = metaVal['default']; - if (default_ !== void 0) { - optional = true; - } - } - - if (fn == null) { - log_error('Function expected for the attr. handler', metaKey); - return; - } - - Proto[property] = null; - Proto = null; - hash [attrName] = function(compo, attrVal, model){ - if (attrVal == null) { - if (optional === false) { - return Error('Expected'); - } - if (default_ != null) { - compo[property] = default_; - } - return null; - } - - var val = fn.call(compo, attrVal, compo, model, attrName); - if (val instanceof Error) - return val; - - compo[property] = val; - return null; - }; - } - - function _toCamelCase_Replacer(full, char_){ - return char_.toUpperCase(); - } - function _getProperty(attrName) { - var prop = attrName; - if (prop.charCodeAt(0) !== 120) { - // x - prop = 'x-' + prop; - } - return prop.replace(/-(\w)/g, _toCamelCase_Replacer) - } - function _errored(compo, error, key, val) { - error.message = compo.compoName + ' - attribute `' + key + '`: ' + error.message; - compo_errored(compo, error); - log_error(error.message, '. Current: ', val); - } - var _ensureFns = { - 'string': function(x) { - return typeof x === 'string' ? x : Error('String'); - }, - 'number': function(x){ - var num = Number(x); - return num === num ? num : Error('Number'); - }, - 'boolean': function(x, compo, model, attrName){ - if (typeof x === 'boolean') - return x; - if (x === attrName) return true; - if (x === 'true' || x === '1') return true; - if (x === 'false' || x === '0') return false; - return Error('Boolean'); - } - }; - var _ensureFns_Delegate = { - regexp: function(rgx){ - return function(x){ - return rgx.test(x) ? x : Error('RegExp'); - }; - }, - any: function(){ - return function(x){ return x; }; - }, - options: function(opts){ - var type = opts.type, - def = opts.default || _defaults[type], - validate = opts.validate, - transform = opts.transform; - return function(x){ - if (!x) return def; - - if (type != null) { - var fn = _ensureFns[type]; - if (fn != null) { - x = fn.apply(this, arguments); - if (x instanceof Error) { - return x; - } - } - } - if (validate) { - var error = validate.call(this, x); - if (error) { - return Error(error); - } - } - if (transform) { - x = transform.call(this, x); - } - return x; - }; - } - }; - var _defaults = { - string: '', - boolean: false, - number: 0 - }; - }()); - function getTemplateProp_(compo){ - var template = compo.template; - if (template == null) { - template = compo.attr.template; - if (template == null) - return null; - - delete compo.attr.template; - } - if (typeof template === 'object') - return template; - - if (is_String(template)) { - if (template.charCodeAt(0) === 35 && /^#[\w\d_-]+$/.test(template)) { - // # - var node = document.getElementById(template.substring(1)); - if (node == null) { - log_warn('Template not found by id:', template); - return null; - } - template = node.innerHTML; - } - return mask.parse(template); - } - log_warn('Invalid template', typeof template); - return null; - } - }()); - - // end:source ./compo.js - // source ./compo_create.js - var compo_create, - compo_createConstructor; - (function(){ - compo_create = function(arguments_){ - - var argLength = arguments_.length, - Proto = arguments_[argLength - 1], - Ctor, - key; - - if (argLength > 1) - compo_inherit(Proto, _Array_slice.call(arguments_, 0, argLength - 1)); - - if (Proto == null) - Proto = {}; - - var include = _resolve_External('include'); - if (include != null) - Proto.__resource = include.url; - - var attr = Proto.attr; - for (key in Proto.attr) { - Proto.attr[key] = _mask_ensureTmplFn(Proto.attr[key]); - } - - var slots = Proto.slots; - for (key in slots) { - if (typeof slots[key] === 'string'){ - //if DEBUG - if (is_Function(Proto[slots[key]]) === false) - log_error('Not a Function @Slot.',slots[key]); - // endif - slots[key] = Proto[slots[key]]; - } - } - - compo_meta_prepairAttributeHandler(Proto); - - Ctor = Proto.hasOwnProperty('constructor') - ? Proto.constructor - : function CompoBase() {} - ; - - Ctor = compo_createConstructor(Ctor, Proto); - - for(key in CompoProto){ - if (Proto[key] == null) - Proto[key] = CompoProto[key]; - } - - Ctor.prototype = Proto; - Proto = null; - return Ctor; - }; - - compo_createConstructor = function(Ctor, proto) { - var compos = proto.compos, - pipes = proto.pipes, - scope = proto.scope, - attr = proto.attr; - - if (compos == null - && pipes == null - && attr == null - && scope == null) { - return Ctor; - } - - /* extend compos / attr to keep - * original prototyped values untouched - */ - return function CompoBase(node, model, ctx, container, ctr){ - - if (Ctor != null) { - var overriden = Ctor.call(this, node, model, ctx, container, ctr); - if (overriden != null) - return overriden; - } - - if (compos != null) { - // use this.compos instead of compos from upper scope - // : in case compos they were extended after - this.compos = obj_create(this.compos); - } - - if (pipes != null) - Pipes.addController(this); - - if (attr != null) - this.attr = obj_create(this.attr); - - if (scope != null) - this.scope = obj_create(this.scope); - }; - }; - }()); - // end:source ./compo_create.js - // source ./compo_inherit.js - var compo_inherit; - (function(){ - - compo_inherit = function(Proto, Extends){ - var imax = Extends.length, - i = imax, - ctors = [], - x; - while( --i > -1){ - x = Extends[i]; - if (typeof x === 'string') { - x = mask.getHandler(x); - if (x != null && x.name === 'Resolver') { - log_error('Inheritance error: private component'); - x = null; - } - } - if (x == null) { - log_error('Base component not defined', Extends[i]); - continue; - } - if (typeof x === 'function') { - ctors.push(x); - x = x.prototype; - } - inherit_(Proto, x, 'node'); - } - - i = -1; - imax = ctors.length; - if (imax > 0) { - if (Proto.hasOwnProperty('constructor')) - ctors.unshift(Proto.constructor); - - Proto.constructor = joinFns_(ctors); - } - var meta = Proto.meta; - if (meta == null) - meta = Proto.meta = {}; - - if (meta.template == null) - meta.template = 'merge'; - }; - - function inherit_(target, source, name){ - if (target == null || source == null) - return; - - if ('node' === name) { - var targetNodes = target.template || target.nodes, - sourceNodes = source.template || source.nodes; - target.template = targetNodes == null || sourceNodes == null - ? (targetNodes || sourceNodes) - : (mask_merge(sourceNodes, targetNodes, target, {extending: true })); - - if (target.nodes != null) { - target.nodes = target.template; - } - } - - var mix, type, fnAutoCall, hasFnOverrides = false; - for(var key in source){ - mix = source[key]; - if (mix == null || key === 'constructor') - continue; - - if ('node' === name && (key === 'template' || key === 'nodes')) - continue; - - type = typeof mix; - - if (target[key] == null) { - target[key] = mix; - continue; - } - if ('node' === name) { - // http://jsperf.com/indexof-vs-bunch-of-ifs - var isSealed = key === 'renderStart' - || key === 'renderEnd' - || key === 'emitIn' - || key === 'emitOut' - || key === 'components' - || key === 'nodes' - || key === 'template' - || key === 'find' - || key === 'closest' - || key === 'on' - || key === 'remove' - || key === 'slotState' - || key === 'signalState' - || key === 'append' - || key === 'appendTo' - ; - if (isSealed === true) - continue; - } - if ('pipes' === name) { - inherit_(target[key], mix, 'pipe'); - continue; - } - if ('function' === type) { - fnAutoCall = false; - if ('slots' === name || 'events' === name || 'pipe' === name) - fnAutoCall = true; - else if ('node' === name && ('onRenderStart' === key || 'onRenderEnd' === key)) - fnAutoCall = true; - - target[key] = createWrapper_(target[key], mix, fnAutoCall); - hasFnOverrides = true; - continue; - } - if ('object' !== type) { - continue; - } - - switch(key){ - case 'slots': - case 'pipes': - case 'events': - case 'attr': - inherit_(target[key], mix, key); - continue; - } - defaults_(target[key], mix); - } - - if (hasFnOverrides === true) { - if (target.super != null) - log_error('`super` property is reserved. Dismissed. Current prototype', target); - target.super = null; - } - } - - /*! Circular references are not handled */ - function clone_(a) { - if (a == null) - return null; - - if (typeof a !== 'object') - return a; - - if (is_Array(a)) { - var imax = a.length, - i = -1, - arr = new Array(imax) - ; - while( ++i < imax ){ - arr[i] = clone_(a[i]); - } - return arr; - } - - var object = obj_create(a), - key, val; - for(key in object){ - val = object[key]; - if (val == null || typeof val !== 'object') - continue; - object[key] = clone_(val); - } - return object; - } - function defaults_(target, source){ - var targetV, sourceV, key; - for(var key in source){ - targetV = target[key]; - sourceV = source[key]; - if (targetV == null) { - target[key] = sourceV; - continue; - } - if (is_rawObject(targetV) && is_rawObject(sourceV)){ - defaults_(targetV, sourceV); - continue; - } - } - } - function createWrapper_(selfFn, baseFn, autoCallFunctions){ - if (selfFn.name === 'compoInheritanceWrapper') { - selfFn._fn_chain.push(baseFn); - return selfFn; - } - - var compileFns = autoCallFunctions === true - ? compileFns_autocall_ - : compileFns_ - ; - function compoInheritanceWrapper(){ - var fn = x._fn || (x._fn = compileFns(x._fn_chain)); - return fn.apply(this, arguments); - } - - var x = compoInheritanceWrapper; - x._fn_chain = [ selfFn, baseFn ]; - x._fn = null; - - return x; - } - function compileFns_(fns){ - var i = fns.length, - fn = fns[ --i ]; - while( --i > -1){ - fn = inheritFn_(fns[i], fn); - } - return fn; - } - function compileFns_autocall_(fns) { - var imax = fns.length; - return function(){ - var result, fn, x, - i = imax; - while( --i > -1 ){ - fn = fns[i]; - if (fn == null) - continue; - - x = fn_apply(fn, this, arguments); - if (x !== void 0) { - result = x; - } - } - return result; - } - } - function inheritFn_(selfFn, baseFn){ - return function(){ - this.super = baseFn; - var x = fn_apply(selfFn, this, arguments); - - this.super = null; - return x; - }; - } - function joinFns_(fns) { - var imax = fns.length; - return function(){ - var i = imax, result; - while( --i > -1 ){ - var x = fns[i].apply(this, arguments); - if (x != null) { - // use last return - result = x; - } - } - return result; - }; - } - }()); - // end:source ./compo_inherit.js - // source ./dfr.js - var dfr_isBusy; - (function(){ - dfr_isBusy = function(dfr){ - if (dfr == null || typeof dfr.then !== 'function') - return false; - - // Class.Deferred - if (is_Function(dfr.isBusy)) - return dfr.isBusy(); - - // jQuery Deferred - if (is_Function(dfr.state)) - return dfr.state() === 'pending'; - - log_warn('Class or jQuery deferred interface expected'); - return false; - }; - }()); - // end:source ./dfr.js - - // end:source /src/util/exports.js - - // source /src/compo/children.js - var Children_ = { - - /** - * Component children. Example: - * - * Class({ - * Base: Compo, - * Construct: function(){ - * this.compos = { - * panel: '$: .container', // querying with DOMLib - * timePicker: 'compo: timePicker', // querying with Compo selector - * button: '#button' // querying with querySelector*** - * } - * } - * }); - * - */ - select: function(component, compos) { - for (var name in compos) { - var data = compos[name], - events = null, - selector = null; - - if (data instanceof Array) { - selector = data[0]; - events = data.splice(1); - } - if (typeof data === 'string') { - selector = data; - } - if (data == null || selector == null) { - log_error('Unknown component child', name, compos[name]); - log_warn('Is this object shared within multiple compo classes? Define it in constructor!'); - return; - } - - var index = selector.indexOf(':'), - engine = selector.substring(0, index); - - engine = Compo.config.selectors[engine]; - - if (engine == null) { - component.compos[name] = component.$[0].querySelector(selector); - } else { - selector = selector.substring(++index).trim(); - component.compos[name] = engine(component, selector); - } - - var element = component.compos[name]; - - if (events != null) { - if (element.$ != null) { - element = element.$; - } - - Events_.on(component, events, element); - } - } - } - }; - - // end:source /src/compo/children.js - // source /src/compo/events.js - var Events_ = { - on: function(component, events, $element) { - if ($element == null) { - $element = component.$; - } - - var isarray = events instanceof Array, - length = isarray ? events.length : 1; - - for (var i = 0, x; isarray ? i < length : i < 1; i++) { - x = isarray ? events[i] : events; - - if (x instanceof Array) { - // generic jQuery .on Arguments - - if (EventDecorator != null) { - x[0] = EventDecorator(x[0]); - } - - $element.on.apply($element, x); - continue; - } - - - for (var key in x) { - var fn = typeof x[key] === 'string' ? component[x[key]] : x[key], - semicolon = key.indexOf(':'), - type, - selector; - - if (semicolon !== -1) { - type = key.substring(0, semicolon); - selector = key.substring(semicolon + 1).trim(); - } else { - type = key; - } - - if (EventDecorator != null) { - type = EventDecorator(type); - } - - domLib_on($element, type, selector, fn_proxy(fn, component)); - } - } - } - }, - EventDecorator = null; - - // end:source /src/compo/events.js - // source /src/compo/events.deco.js - var EventDecos = (function() { - - var hasTouch = (function() { - if (document == null) { - return false; - } - if ('createTouch' in document) { - return true; - } - try { - return !!document.createEvent('TouchEvent').initTouchEvent; - } catch (error) { - return false; - } - }()); - - return { - - 'touch': function(type) { - if (hasTouch === false) { - return type; - } - - if ('click' === type) { - return 'touchend'; - } - - if ('mousedown' === type) { - return 'touchstart'; - } - - if ('mouseup' === type) { - return 'touchend'; - } - - if ('mousemove' === type) { - return 'touchmove'; - } - - return type; - } - }; - - }()); - - // end:source /src/compo/events.deco.js - // source /src/compo/pipes.js - var Pipes = (function() { - - var _collection = {}; - - mask.registerAttrHandler('x-pipe-signal', 'client', function(node, attrValue, model, ctx, element, ctr) { - - var arr = attrValue.split(';'), - imax = arr.length, - i = -1, - x; - while ( ++i < imax ) { - x = arr[i].trim(); - if (x === '') - continue; - - var i_colon = x.indexOf(':'), - event = x.substring(0, i_colon), - handler = x.substring(i_colon + 1).trim(), - dot = handler.indexOf('.'), - - pipe, signal; - - if (dot === -1) { - log_error('Pipe-slot is invalid: {0} Usage e.g. "click: pipeName.pipeSignal"', x); - return; - } - - pipe = handler.substring(0, dot); - signal = handler.substring(++dot); - - // if DEBUG - !event && log_error('Pipe-slot is invalid. Event type is not set', attrValue); - // endif - - dom_addEventListener( - element - , event - , _createListener(pipe, signal) - ); - } - }); - - function _createListener(pipe, signal) { - return function(event){ - new Pipe(pipe).emit(signal, event); - }; - } - - - function pipe_attach(pipeName, ctr) { - if (ctr.pipes[pipeName] == null) { - log_error('Controller has no pipes to be added to collection', pipeName, ctr); - return; - } - - if (_collection[pipeName] == null) { - _collection[pipeName] = []; - } - _collection[pipeName].push(ctr); - } - - function pipe_detach(pipeName, ctr) { - var pipe = _collection[pipeName], - i = pipe.length; - - while (--i > -1) { - if (pipe[i] === ctr) - pipe.splice(i, 1); - } - - } - - function _removeController(ctr) { - var pipes = ctr.pipes; - for (var key in pipes) { - pipe_detach(key, ctr); - } - } - function _removeControllerDelegate(ctr) { - return function(){ - _removeController(ctr); - ctr = null; - }; - } - - function _addController(ctr) { - var pipes = ctr.pipes; - - // if DEBUG - if (pipes == null) { - log_error('Controller has no pipes', ctr); - return; - } - // endif - - for (var key in pipes) { - pipe_attach(key, ctr); - } - Compo.attachDisposer(ctr, _removeControllerDelegate(ctr)); - } - - var Pipe = class_create({ - name: null, - constructor: function Pipe (name) { - if (this instanceof Pipe === false) { - return new Pipe(name); - } - this.name = name; - return this; - }, - emit: function(signal){ - var controllers = _collection[this.name], - name = this.name, - args = _Array_slice.call(arguments, 1); - - if (controllers == null) { - //if DEBUG - log_warn('Pipe.emit: No signals were bound to:', name); - //endif - return; - } - - var i = controllers.length, - called = false; - - while (--i !== -1) { - var ctr = controllers[i]; - var slots = ctr.pipes[name]; - - if (slots == null) - continue; - - var slot = slots[signal]; - if (slot != null) { - slot.apply(ctr, args); - called = true; - } - } - - // if DEBUG - if (called === false) - log_warn('Pipe `%s` has not slots for `%s`', name, signal); - // endif - } - }); - Pipe.addController = _addController; - Pipe.removeController = _removeController; - - return { - addController: _addController, - removeController: _removeController, - pipe: Pipe - }; - - }()); - - // end:source /src/compo/pipes.js - - // source /src/keyboard/Handler.js - var KeyboardHandler; - (function(){ - - // source ./utils.js - var event_bind, - event_unbind, - event_getCode; - (function(){ - - event_bind = function (el, type, mix){ - el.addEventListener(type, mix, false); - }; - event_unbind = function (el, type, mix) { - el.removeEventListener(type, mix, false); - }; - - event_getCode = function(event){ - var code = event.keyCode || event.which; - - if (code >= 96 && code <= 105) { - // numpad digits - return code - 48; - } - - return code; - }; - - }()); - - // end:source ./utils.js - // source ./const.js - var CODES, SHIFT_NUMS, MODS; - - CODES = { - "backspace": 8, - "tab": 9, - "return": 13, - "enter": 13, - "shift": 16, - "ctrl": 17, - "control": 17, - "alt": 18, - "option": 18, - - "fn": 255, - - "pause": 19, - "capslock": 20, - "esc": 27, - "escape": 27, - - "space": 32, - "pageup": 33, - "pagedown": 34, - "end": 35, - "home": 36, - "start": 36, - - "left": 37, - "up": 38, - "right": 39, - "down": 40, - - "insert": 45, - "ins": 45, - "del": 46, - "numlock": 144, - "scroll": 145, - - "f1": 112, - "f2": 113, - "f3": 114, - "f4": 115, - "f5": 116, - "f6": 117, - "f7": 118, - "f8": 119, - "f9": 120, - "f10": 121, - "f11": 122, - "f12": 123, - - ";": 186, - "=": 187, - "*": 106, - "+": 107, - "-": 189, - ".": 190, - "/": 191, - - ",": 188, - "`": 192, - "[": 219, - "\\": 220, - "]": 221, - "'": 222 - }; - - SHIFT_NUMS = { - "`": "~", - "1": "!", - "2": "@", - "3": "#", - "4": "$", - "5": "%", - "6": "^", - "7": "&", - "8": "*", - "9": "(", - "0": ")", - "-": "_", - "=": "+", - ";": ": ", - "'": "\"", - ",": "<", - ".": ">", - "/": "?", - "\\": "|" - }; - - MODS = { - '16': 'shiftKey', - '17': 'ctrlKey', - '18': 'altKey', - }; - // end:source ./const.js - // source ./filters.js - var filter_isKeyboardInput, - filter_skippedInput, - filter_skippedComponent, - filter_skippedElement; - (function(){ - filter_skippedInput = function(event, code){ - if (event.ctrlKey || event.altKey) - return false; - return filter_isKeyboardInput(event.target); - }; - - filter_skippedComponent = function(compo){ - if (compo.$ == null || compo.$.length === 0) { - return false; - } - return filter_skippedElement(compo.$.get(0)); - }; - filter_skippedElement = function(el) { - if (document.contains(el) === false) - return false; - - if (el.style.display === 'none') - return false; - - var disabled = el.disabled; - if (disabled === true) - return false; - - return true; - }; - filter_isKeyboardInput = function (el) { - var tag = el.tagName; - if ('TEXTAREA' === tag) { - return true; - } - if ('INPUT' !== tag) { - return false; - } - return TYPELESS_INPUT.indexOf(' ' + el.type + ' ') === -1; - }; - - var TYPELESS_INPUT = ' button submit checkbox file hidden image radio range reset '; - }()); - // end:source ./filters.js - // source ./Hotkey.js - var Hotkey; - (function(){ - Hotkey = { - on: function(combDef, fn, compo) { - if (handler == null) init(); - - var comb = IComb.create( - combDef - , 'keydown' - , fn - , compo - ); - handler.attach(comb); - }, - off: function(fn){ - handler.off(fn); - }, - handleEvent: function(event){ - handler.handle(event.type, event_getCode(event), event); - }, - reset: function(){ - handler.reset(); - } - }; - var handler; - function init() { - handler = new CombHandler(); - event_bind(window, 'keydown', Hotkey); - event_bind(window, 'keyup', Hotkey); - event_bind(window, 'focus', Hotkey.reset); - } - }()); - // end:source ./Hotkey.js - // source ./IComb.js - var IComb; - (function(){ - IComb = function(set){ - this.set = set; - }; - IComb.parse = function (str) { - var parts = str.split(','), - combs = [], - imax = parts.length, - i = 0; - for(; i < imax; i++){ - combs[i] = parseSingle(parts[i]); - } - return combs; - }; - IComb.create = function (def, type, fn, ctx) { - var codes = IComb.parse(def); - var comb = Key.create(codes); - if (comb == null) { - comb = new KeySequance(codes) - } - comb.init(type, fn, ctx); - return comb; - }; - IComb.prototype = { - type: null, - ctx: null, - set: null, - fn: null, - init: function(type, fn, ctx){ - this.type = type; - this.ctx = ctx; - this.fn = fn; - }, - tryCall: null - }; - - function parseSingle(str) { - var keys = str.split('+'), - imax = keys.length, - i = 0, - out = [], x, code; - for(; i < imax; i++){ - x = keys[i].trim(); - code = CODES[x]; - if (code === void 0) { - if (x.length !== 1) { - throw Error('Unexpected sequence. Neither a predefined key, nor a char: ' + x); - } - code = x.toUpperCase().charCodeAt(0); - } - out[i] = code; - } - return { - last: out[imax - 1], - keys: out.sort() - }; - } - }()); - // end:source ./IComb.js - // source ./Key.js - var Key; - (function(){ - Key = class_create(IComb, { - constructor: function(set, key, mods){ - this.key = key; - this.mods = mods; - }, - tryCall: function(event, codes, lastCode){ - if (event.type !== this.type || lastCode !== this.key) { - return Key_MATCH_FAIL; - } - - for (var key in this.mods){ - if (event[key] !== this.mods[key]) - return Key_MATCH_FAIL; - } - - this.fn.call(this.ctx, event); - return Key_MATCH_OK; - } - }); - - Key.create = function(set){ - if (set.length !== 1) - return null; - var keys = set[0].keys, - i = keys.length, - mods = { - shiftKey: false, - ctrlKey: false, - altKey: false - }; - - var key, mod, hasMod; - while(--i > -1){ - if (MODS.hasOwnProperty(keys[i]) === false) { - if (key != null) - return null; - key = keys[i]; - continue; - } - mods[MODS[keys[i]]] = true; - hasMod = true; - } - return new Key(set, key, mods); - }; - - }()); - // end:source ./Key.js - // source ./KeySequance.js - var KeySequance, - Key_MATCH_OK = 1, - Key_MATCH_FAIL = 2, - Key_MATCH_WAIT = 3, - Key_MATCH_NEXT = 4; - - (function(){ - KeySequance = class_create(IComb, { - index: 0, - tryCall: function(event, codes, lastCode){ - var matched = this.check_(codes, lastCode); - if (matched === Key_MATCH_OK) { - this.index = 0; - this.fn.call(this.ctx, event); - } - return matched; - }, - fail_: function(){ - this.index = 0; - return Key_MATCH_FAIL; - }, - check_: function(codes, lastCode){ - var current = this.set[this.index], - keys = current.keys, - last = current.last; - - var l = codes.length; - if (l < keys.length) - return Key_MATCH_WAIT; - if (l > keys.length) - return this.fail_(); - - if (last !== lastCode) { - return this.fail_(); - } - while (--l > -1) { - if (keys[l] !== codes[l]) - return this.fail_(); - } - if (this.index < this.set.length - 1) { - this.index++; - return Key_MATCH_NEXT; - } - this.index = 0; - return Key_MATCH_OK; - } - }); - - }()); - - - // end:source ./KeySequance.js - // source ./CombHandler.js - var CombHandler; - (function(){ - CombHandler = function(){ - this.keys = []; - this.combs = []; - }; - CombHandler.prototype = { - keys: null, - combs: null, - attach: function(comb) { - this.combs.push(comb); - }, - off: function(fn){ - var imax = this.combs.length, - i = 0; - for(; i < imax; i++){ - if (this.combs[i].fn === fn) { - this.combs.splice(i, 1); - return true; - } - } - return false; - }, - handle: function(type, code, event){ - if (this.combs.length === 0) { - return; - } - if (this.filter_(event, code)) { - return; - } - if (type === 'keydown') { - if (this.add_(code)) { - this.emit_(type, event, code); - } - return; - } - if (type === 'keyup') { - this.emit_(type, event, code); - this.remove_(code); - } - }, - handleEvent: function(event){ - var code = event_getCode(event), - type = event.type; - this.handle(type, code, event); - }, - reset: function(){ - this.keys.length = 0; - }, - add_: function(code){ - var imax = this.keys.length, - i = 0, x; - for(; i < imax; i++){ - x = this.keys[i]; - if (x === code) - return false; - - if (x > code) { - this.keys.splice(i, 0, code); - return true; - } - } - this.keys.push(code); - return true; - }, - remove_: function(code){ - var i = this.keys.length; - while(--i > -1){ - if (this.keys[i] === code) { - this.keys.splice(i, 1); - return; - } - } - }, - emit_: function(type, event, lastCode){ - var next = false, - combs = this.combs, - imax = combs.length, - i = 0, x, stat; - for(; i < imax; i++){ - x = combs[i]; - if (x.type !== type) - continue; - - stat = x.tryCall(event, this.keys, lastCode); - if (Key_MATCH_OK === stat || stat === Key_MATCH_NEXT) { - event.preventDefault(); - } - if (stat === Key_MATCH_WAIT || stat === Key_MATCH_NEXT) { - next = true; - } - } - }, - filter_: function(event, code){ - return filter_skippedInput(event, code); - } - }; - }()); - // end:source ./CombHandler.js - - KeyboardHandler = { - supports: function(event, param){ - if (param == null) - return false; - switch(event){ - case 'press': - case 'keypress': - case 'keydown': - case 'keyup': - case 'hotkey': - case 'shortcut': - return true; - } - return false; - }, - on: function(el, type, def, fn){ - if (type === 'keypress' || type === 'press') { - type = 'keydown'; - } - var comb = IComb.create(def, type, fn); - if (comb instanceof Key) { - event_bind(el, type, function (event) { - var code = event_getCode(event); - var r = comb.tryCall(event, null, code); - if (r === Key_MATCH_OK) { - event.preventDefault(); - } - }); - return; - } - - var handler = new CombHandler; - event_bind(el, 'keydown', handler); - event_bind(el, 'keyup', handler); - handler.attach(comb); - }, - hotkeys: function(compo, hotkeys){ - var fns = [], fn, comb; - for(comb in hotkeys) { - fn = hotkeys[comb]; - Hotkey.on(comb, fn, compo); - } - compo_attachDisposer(compo, function(){ - var comb, fn; - for(comb in hotkeys) { - Hotkey.off(hotkeys[comb]); - } - }); - }, - attach: function(el, type, comb, fn, ctr){ - if (filter_isKeyboardInput(el)) { - this.on(el, type, comb, fn); - return; - } - var x = ctr; - while(x && x.slots == null) { - x = x.parent; - } - if (x == null) { - log_error('Slot-component not found:', comb); - return; - } - var hotkeys = x.hotkeys; - if (hotkeys == null) { - hotkeys = x.hotkeys = {}; - } - hotkeys[comb] = fn; - } - }; - }()); - // end:source /src/keyboard/Handler.js - // source /src/touch/Handler.js - var TouchHandler; - (function(){ - - // source ./utils.js - var event_bind, - event_unbind, - event_trigger, - isTouchable; - - (function(){ - isTouchable = 'ontouchstart' in global; - - event_bind = function(el, type, mix) { - el.addEventListener(type, mix, false); - }; - event_unbind = function (el, type, mix) { - el.removeEventListener(type, mix, false); - }; - event_trigger = function(el, type) { - var event = new CustomEvent(type, { - cancelable: true, - bubbles: true - }); - el.dispatchEvent(event); - }; - }()); - - // end:source ./utils.js - // source ./Touch.js - var Touch; - (function(){ - Touch = function(el, type, fn) { - this.el = el; - this.fn = fn; - this.dismiss = 0; - event_bind(el, type, this); - event_bind(el, MOUSE_MAP[type], this); - }; - - var MOUSE_MAP = { - 'mousemove': 'touchmove', - 'mousedown': 'touchstart', - 'mouseup': 'touchend' - }; - var TOUCH_MAP = { - 'touchmove': 'mousemove', - 'touchstart': 'mousedown', - 'touchup': 'mouseup' - }; - - Touch.prototype = { - handleEvent: function (event) { - switch(event.type){ - case 'touchstart': - case 'touchmove': - case 'touchend': - this.dismiss++; - event = prepairTouchEvent(event); - this.fn(event); - break; - case 'mousedown': - case 'mousemove': - case 'mouseup': - if (--this.dismiss < 0) { - this.dismiss = 0; - this.fn(event); - } - break; - } - } - }; - function prepairTouchEvent(event){ - var touch = null, - touches = event.changedTouches; - if (touches && touches.length) { - touch = touches[0]; - } - if (touch == null && event.touches) { - touch = event.touches[0]; - } - if (touch == null) { - return event; - } - return createMouseEvent(event, touch); - } - function createMouseEvent (event, touch) { - var obj = Object.create(MouseEvent.prototype); - for (var key in event) { - obj[key] = event[key]; - } - for (var key in PROPS) { - obj[key] = touch[key]; - } - return new MouseEvent(TOUCH_MAP[event.type], obj); - } - var PROPS = { - clientX: 1, - clientY: 1, - pageX: 1, - pageY: 1, - screenX: 1, - screenY: 1 - }; - }()); - // end:source ./Touch.js - // source ./FastClick.js - var FastClick; - (function(){ - FastClick = function (el, fn) { - this.state = 0; - this.el = el; - this.fn = fn; - this.startX = 0; - this.startY = 0; - this.tStart = 0; - this.tEnd = 0; - this.dismiss = 0; - - event_bind(el, 'touchstart', this); - event_bind(el, 'touchend', this); - event_bind(el, 'click', this); - }; - - var threshold_TIME = 300, - threshold_DIST = 10, - timestamp_LastTouch = null; - - FastClick.prototype = { - handleEvent: function (event) { - var type = event.type; - switch (type) { - case 'touchmove': - case 'touchstart': - case 'touchend': - timestamp_LastTouch = event.timeStamp; - this[type](event); - break; - case 'touchcancel': - this.reset(); - break; - case 'click': - this.click(event); - break; - } - }, - - touchstart: function(event){ - event_bind(document.body, 'touchmove', this); - - var e = event.touches[0]; - - this.state = 1; - this.tStart = event.timeStamp; - this.startX = e.clientX; - this.startY = e.clientY; - }, - touchend: function (event) { - this.tEnd = event.timeStamp; - if (this.state === 1) { - this.dismiss++; - if (this.tEnd - this.tStart <= threshold_TIME) { - this.call(event); - return; - } - - event_trigger(this.el, 'taphold'); - return; - } - this.reset(); - }, - click: function(event){ - if (timestamp_LastTouch != null) { - var dt = timestamp_LastTouch - event.timeStamp; - if (dt < 500) { - return; - } - } - if (--this.dismiss > -1) - return; - - var dt = event.timeStamp - this.tEnd; - if (dt < 400) - return; - - this.dismiss = 0; - this.call(event); - }, - touchmove: function(event) { - var e = event.touches[0]; - - var dx = e.clientX - this.startX; - if (dx < 0) dx *= -1; - if (dx > threshold_DIST) { - this.reset(); - return; - } - - var dy = e.clientY - this.startY; - if (dy < 0) dy *= -1; - if (dy > threshold_DIST) { - this.reset(); - return; - } - }, - - reset: function(){ - this.state = 0; - event_unbind(document.body, 'touchmove', this); - }, - call: function(event){ - this.reset(); - this.fn(event); - } - }; - - }()); - // end:source ./FastClick.js - - TouchHandler = { - supports: function (type) { - if (isTouchable === false) { - return false; - } - switch(type){ - case 'click': - case 'mousedown': - case 'mouseup': - case 'mousemove': - return true; - } - return false; - }, - on: function(el, type, fn){ - if ('click' === type) { - return new FastClick(el, fn); - } - return new Touch(el, type, fn); - } - }; - }()); - // end:source /src/touch/Handler.js - - // source /src/compo/anchor.js - /** - * Get component that owns an element - **/ - var Anchor; - (function(){ - Anchor = { - create: function(compo){ - var id = compo.ID; - if (id == null){ - log_warn('Component should have an ID'); - return; - } - _cache[id] = compo; - }, - resolveCompo: function(el, silent){ - if (el == null) - return null; - - var ownerId, id, compo; - do { - id = el.getAttribute('x-compo-id'); - if (id != null) { - if (ownerId == null) { - ownerId = id; - } - compo = _cache[id]; - if (compo != null) { - compo = Compo.find(compo, { - key: 'ID', - selector: ownerId, - nextKey: 'components' - }); - if (compo != null) - return compo; - } - } - el = el.parentNode; - }while(el != null && el.nodeType === 1); - - // if DEBUG - ownerId && silent !== true && log_warn('No controller for ID', ownerId); - // endif - return null; - }, - removeCompo: function(compo){ - var id = compo.ID; - if (id != null) - _cache[id] = void 0; - }, - getByID: function(id){ - return _cache[id]; - } - }; - - var _cache = {}; - }()); - - // end:source /src/compo/anchor.js - // source /src/compo/Compo.js - var Compo, CompoProto; - (function() { - - Compo = function () { - if (this instanceof Compo){ - // used in Class({Base: Compo}) - return void 0; - } - - return compo_create(arguments); - }; - - // source ./Compo.static.js - obj_extend(Compo, { - create: function(){ - return compo_create(arguments); - }, - - createClass: function(){ - - var Ctor = compo_create(arguments), - classProto = Ctor.prototype; - classProto.Construct = Ctor; - return Class(classProto); - }, - - initialize: function(mix, model, ctx, container, parent) { - if (mix == null) - throw Error('Undefined is not a component'); - - if (container == null){ - if (ctx && ctx.nodeType != null){ - container = ctx; - ctx = null; - }else if (model && model.nodeType != null){ - container = model; - model = null; - } - } - var node; - function createNode(compo) { - node = { - controller: compo, - type: Dom.COMPONENT - }; - } - if (typeof mix === 'string'){ - if (/^[^\s]+$/.test(mix)) { - var compo = mask.getHandler(mix); - if (compo == null) - throw Error('Component not found: ' + mix); - - createNode(compo); - } else { - createNode(Compo({ - template: mix - })); - } - } - else if (typeof mix === 'function') { - createNode(mix); - } - - if (parent == null && container != null) { - parent = Anchor.resolveCompo(container); - } - if (parent == null){ - parent = new Compo(); - } - - var dom = mask.render(node, model, ctx, null, parent), - instance = parent.components[parent.components.length - 1]; - - if (container != null){ - container.appendChild(dom); - Compo.signal.emitIn(instance, 'domInsert'); - } - - return instance; - }, - - - find: function(compo, selector){ - return find_findSingle(compo, selector_parse(selector, Dom.CONTROLLER, 'down')); - }, - closest: function(compo, selector){ - return find_findSingle(compo, selector_parse(selector, Dom.CONTROLLER, 'up')); - }, - - dispose: compo_dispose, - - ensureTemplate: compo_ensureTemplate, - - attachDisposer: compo_attachDisposer, - - config: { - selectors: { - '$': function(compo, selector) { - var r = domLib_find(compo.$, selector) - // if DEBUG - if (r.length === 0) - log_warn(' - element not found -', selector, compo); - // endif - return r; - }, - 'compo': function(compo, selector) { - var r = Compo.find(compo, selector); - // if DEBUG - if (r == null) - log_warn(' - component not found -', selector, compo); - // endif - return r; - } - }, - /** - * @default, global $ is used - * IDOMLibrary = { - * {fn}(elements) - create dom-elements wrapper, - * on(event, selector, fn) - @see jQuery 'on' - * } - */ - setDOMLibrary: function(lib) { - if (domLib === lib) - return; - - domLib = lib; - domLib_initialize(); - }, - - getDOMLibrary: function(){ - return domLib; - }, - - eventDecorator: function(mix){ - if (typeof mix === 'function') { - EventDecorator = mix; - return; - } - if (typeof mix === 'string') { - console.error('EventDecorators are not used. Touch&Mouse support is already integrated'); - EventDecorator = EventDecos[mix]; - return; - } - if (typeof mix === 'boolean' && mix === false) { - EventDecorator = null; - return; - } - } - - }, - - pipe: Pipes.pipe, - - resource: function(compo){ - var owner = compo; - - while (owner != null) { - - if (owner.resource) - return owner.resource; - - owner = owner.parent; - } - - return include.instance(); - }, - - plugin: function(source){ - // if DEBUG - eval(source); - // endif - }, - - Dom: { - addEventListener: dom_addEventListener - } - }); - - - // end:source ./Compo.static.js - // source ./async.js - (function(){ - Compo.pause = function(compo, ctx){ - if (ctx != null) { - if (ctx.defers == null) { - // async components - ctx.defers = []; - } - if (ctx.resolve == null) { - obj_extend(ctx, class_Dfr.prototype); - } - ctx.async = true; - ctx.defers.push(compo); - } - - obj_extend(compo, CompoProto); - return function(){ - Compo.resume(compo, ctx); - }; - }; - Compo.resume = function(compo, ctx){ - compo.async = false; - - // fn can be null when calling resume synced after pause - if (compo.resume) { - compo.resume(); - } - if (ctx == null) { - return; - } - - var busy = false, - dfrs = ctx.defers, - imax = dfrs.length, - i = -1, - x; - while ( ++i < imax ){ - x = dfrs[i]; - - if (x === compo) { - dfrs[i] = null; - continue; - } - busy = busy || x != null; - } - if (busy === false) - ctx.resolve(); - }; - - var CompoProto = { - async: true, - await: function(resume){ - this.resume = resume; - } - }; - }()); - // end:source ./async.js - - CompoProto = { - type: Dom.CONTROLLER, - __resource: null, - - ID: null, - - tagName: null, - compoName: null, - nodes: null, - components: null, - expression: null, - attr: null, - model: null, - scope: null, - - slots: null, - pipes: null, - - compos: null, - events: null, - hotkeys: null, - async: false, - await: null, - - meta: { - /* render modes, relevant for mask-node */ - mode: null, - modelMode: null, - attributes: null, - serializeNodes: null, - handleAttributes: null, - }, - - onRenderStart: null, - onRenderEnd: null, - render: null, - renderStart: function(model, ctx, container){ - - if (compo_meta_executeAttributeHandler(this, model) === false) { - // errored - return; - } - compo_ensureTemplate(this); - - if (is_Function(this.onRenderStart)){ - var x = this.onRenderStart(model, ctx, container); - if (x !== void 0 && dfr_isBusy(x)) - compo_prepairAsync(x, this, ctx); - } - }, - renderEnd: function(elements, model, ctx, container){ - - Anchor.create(this, elements); - - this.$ = domLib(elements); - - if (this.events != null) { - Events_.on(this, this.events); - } - if (this.compos != null) { - Children_.select(this, this.compos); - } - if (this.hotkeys != null) { - KeyboardHandler.hotkeys(this, this.hotkeys); - } - if (is_Function(this.onRenderEnd)) { - this.onRenderEnd(elements, model, ctx, container); - } - }, - appendTo: function(el) { - this.$.appendTo(el); - this.emitIn('domInsert'); - return this; - }, - append: function(template, model, selector) { - var parent; - - if (this.$ == null) { - var ast = is_String(template) ? mask.parse(template) : template; - var parent = this; - if (selector) { - parent = find_findSingle(this, selector_parse(selector, Dom.CONTROLLER, 'down')); - if (parent == null) { - log_error('Compo::append: Container not found'); - return this; - } - } - parent.nodes = [parent.nodes, ast]; - return this; - } - - var frag = mask.render(template, model, null, null, this); - parent = selector - ? this.$.find(selector) - : this.$; - - parent.append(frag); - // @todo do not emit to created compos before - this.emitIn('domInsert'); - return this; - }, - find: function(selector){ - return find_findSingle( - this, selector_parse(selector, Dom.CONTROLLER, 'down') - ); - }, - findAll: function(selector){ - return find_findAll( - this, selector_parse(selector, Dom.CONTROLLER, 'down') - ); - }, - closest: function(selector){ - return find_findSingle( - this, selector_parse(selector, Dom.CONTROLLER, 'up') - ); - }, - on: function() { - var x = _Array_slice.call(arguments); - if (arguments.length < 3) { - log_error('Invalid Arguments Exception @use .on(type,selector,fn)'); - return this; - } - - if (this.$ != null) - Events_.on(this, [x]); - - if (this.events == null) { - this.events = [x]; - } else if (is_Array(this.events)) { - this.events.push(x); - } else { - this.events = [x, this.events]; - } - return this; - }, - remove: function() { - compo_removeElements(this); - compo_detachChild(this); - compo_dispose(this); - - this.$ = null; - return this; - }, - - slotState: function(slotName, isActive){ - Compo.slot.toggle(this, slotName, isActive); - return this; - }, - - signalState: function(signalName, isActive){ - Compo.signal.toggle(this, signalName, isActive); - return this; - }, - - emitOut: function(signalName /* args */){ - Compo.signal.emitOut( - this, - signalName, - this, - arguments.length > 1 - ? _Array_slice.call(arguments, 1) - : null - ); - return this; - }, - - emitIn: function(signalName /* args */){ - Compo.signal.emitIn( - this, - signalName, - this, - arguments.length > 1 - ? _Array_slice.call(arguments, 1) - : null - ); - return this; - }, - - $scope: function(path){ - var accessor = '$scope.' + path; - return mask.Utils.Expression.eval(accessor, null, null, this); - }, - $eval: function(expr, model_, ctx_){ - return mask.Utils.Expression.eval(expr, model_ || this.model, ctx_, this); - }, - }; - - Compo.prototype = CompoProto; - }()); - - // end:source /src/compo/Compo.js - - // source /src/signal/exports.js - (function(){ - - // source ./utils.js - var _hasSlot, - _fire; - - (function(){ - // @param sender - event if sent from DOM Event or CONTROLLER instance - _fire = function (ctr, slot, sender, args_, direction) { - if (ctr == null) { - return false; - } - var found = false, - args = args_, - fn = ctr.slots != null && ctr.slots[slot]; - - if (typeof fn === 'string') { - fn = ctr[fn]; - } - if (typeof fn === 'function') { - found = true; - - var isDisabled = ctr.slots.__disabled != null && ctr.slots.__disabled[slot]; - if (isDisabled !== true) { - - var result = args == null - ? fn.call(ctr, sender) - : fn.apply(ctr, [ sender ].concat(args)); - - if (result === false) { - return true; - } - if (is_ArrayLike(result)) { - args = result; - } - } - } - - if (direction === -1 && ctr.parent != null) { - return _fire(ctr.parent, slot, sender, args, direction) || found; - } - - if (direction === 1 && ctr.components != null) { - var compos = ctr.components, - imax = compos.length, - i = 0; - for (; i < imax; i++) { - found = _fire(compos[i], slot, sender, args, direction) || found; - } - } - - return found; - } // _fire() - - _hasSlot = function (ctr, slot, direction, isActive) { - if (ctr == null) { - return false; - } - var slots = ctr.slots; - if (slots != null && slots[slot] != null) { - if (typeof slots[slot] === 'string') { - slots[slot] = ctr[slots[slot]]; - } - if (typeof slots[slot] === 'function') { - if (isActive === true) { - if (slots.__disabled == null || slots.__disabled[slot] !== true) { - return true; - } - } else { - return true; - } - } - } - if (direction === -1 && ctr.parent != null) { - return _hasSlot(ctr.parent, slot, direction); - } - if (direction === 1 && ctr.components != null) { - for (var i = 0, length = ctr.components.length; i < length; i++) { - if (_hasSlot(ctr.components[i], slot, direction)) { - return true; - } - } - } - return false; - }; - }()); - - // end:source ./utils.js - // source ./toggle.js - var _toggle_all, - _toggle_single; - (function(){ - _toggle_all = function (ctr, slot, isActive) { - - var parent = ctr, - previous = ctr; - while ((parent = parent.parent) != null) { - __toggle_slotState(parent, slot, isActive); - - if (parent.$ == null || parent.$.length === 0) { - // we track previous for changing elements :disable state - continue; - } - - previous = parent; - } - - __toggle_slotStateWithChilds(ctr, slot, isActive); - __toggle_elementsState(previous, slot, isActive); - }; - - _toggle_single = function(ctr, slot, isActive) { - __toggle_slotState(ctr, slot, isActive); - - if (!isActive && (_hasSlot(ctr, slot, -1, true) || _hasSlot(ctr, slot, 1, true))) { - // there are some active slots; do not disable elements; - return; - } - __toggle_elementsState(ctr, slot, isActive); - }; - - - function __toggle_slotState(ctr, slot, isActive) { - var slots = ctr.slots; - if (slots == null || slots.hasOwnProperty(slot) === false) { - return; - } - var disabled = slots.__disabled; - if (disabled == null) { - disabled = slots.__disabled = {}; - } - disabled[slot] = isActive === false; - } - - function __toggle_slotStateWithChilds(ctr, slot, isActive) { - __toggle_slotState(ctr, slot, isActive); - - var compos = ctr.components; - if (compos != null) { - var imax = compos.length, - i = 0; - for(; i < imax; i++) { - __toggle_slotStateWithChilds(compos[i], slot, isActive); - } - } - } - - function __toggle_elementsState(ctr, slot, isActive) { - if (ctr.$ == null) { - log_warn('Controller has no elements to toggle state'); - return; - } - - domLib() - .add(ctr.$.filter('[data-signals]')) - .add(ctr.$.find('[data-signals]')) - .each(function(index, node) { - var signals = node.getAttribute('data-signals'); - - if (signals != null && signals.indexOf(slot) !== -1) { - node[isActive === true ? 'removeAttribute' : 'setAttribute']('disabled', 'disabled'); - } - }); - } - - - - }()); - // end:source ./toggle.js - // source ./attributes.js - (function(){ - - _create('signal'); - - _createEvent('change'); - _createEvent('click'); - _createEvent('tap', 'click'); - - _createEvent('keypress'); - _createEvent('keydown'); - _createEvent('keyup'); - _createEvent('mousedown'); - _createEvent('mouseup'); - - _createEvent('press', 'keydown'); - _createEvent('shortcut', 'keydown'); - - function _createEvent(name, type) { - _create(name, type || name); - } - function _create(name, asEvent) { - mask.registerAttrHandler('x-' + name, 'client', function(node, attrValue, model, ctx, el, ctr){ - _attachListener(el, ctr, attrValue, asEvent); - }); - } - - function _attachListener(el, ctr, definition, asEvent) { - var arr = definition.split(';'), - signals = '', - imax = arr.length, - i = -1, - x; - - var i_colon, - i_param, - event, - mix, - param, - name, - fn; - - while ( ++i < imax ) { - x = arr[i].trim(); - if (x === '') - continue; - - mix = param = name = null; - - i_colon = x.indexOf(':'); - if (i_colon !== -1) { - mix = x.substring(0, i_colon); - i_param = mix.indexOf('('); - if (i_param !== -1) { - param = mix.substring(i_param + 1, mix.lastIndexOf(')')); - mix = mix.substring(0, i_param); - - // if DEBUG - param === '' && log_error('Not valid signal parameter'); - // endif - } - x = x.substring(i_colon + 1).trim(); - } - - name = x; - fn = _createListener(ctr, name); - - if (asEvent == null) { - event = mix; - } else { - event = asEvent; - param = mix; - } - - if (!event) { - log_error('Signal: Eventname is not set', arr[i]); - } - if (!fn) { - log_warn('Slot not found:', name); - continue; - } - - signals += ',' + name + ','; - dom_addEventListener(el, event, fn, param, ctr); - } - - if (signals !== '') { - var attr = el.getAttribute('data-signals'); - if (attr != null) { - signals = attr + signals; - } - el.setAttribute('data-signals', signals); - } - } - - function _createListener (ctr, slot) { - if (_hasSlot(ctr, slot, -1) === false) { - return null; - } - return function(event) { - var args = arguments.length > 1 - ? _Array_slice.call(arguments, 1) - : null; - _fire(ctr, slot, event, args, -1); - }; - } - }()); - // end:source ./attributes.js - - obj_extend(Compo, { - signal: { - toggle: _toggle_all, - - // to parent - emitOut: function(controller, slot, sender, args) { - var captured = _fire(controller, slot, sender, args, -1); - - // if DEBUG - !captured && log_warn('Signal %c%s','font-weight:bold;', slot, 'was not captured'); - // endif - - }, - // to children - emitIn: function(controller, slot, sender, args) { - _fire(controller, slot, sender, args, 1); - }, - - enable: function(controller, slot) { - _toggle_all(controller, slot, true); - }, - - disable: function(controller, slot) { - _toggle_all(controller, slot, false); - } - }, - slot: { - toggle: _toggle_single, - enable: function(controller, slot) { - _toggle_single(controller, slot, true); - }, - disable: function(controller, slot) { - _toggle_single(controller, slot, false); - }, - invoke: function(controller, slot, event, args) { - var slots = controller.slots; - if (slots == null || typeof slots[slot] !== 'function') { - log_error('Slot not found', slot, controller); - return null; - } - - if (args == null) { - return slots[slot].call(controller, event); - } - - return slots[slot].apply(controller, [event].concat(args)); - }, - - } - - }); - - }()); - // end:source /src/signal/exports.js - - // source /src/DomLite.js - /* - * Extrem simple Dom Library. If (jQuery | Kimbo | Zepto) is not used. - * Only methods, required for the Compo library are implemented. - */ - var DomLite; - (function(document){ - if (document == null) - return; - - Compo.DomLite = DomLite = function(els){ - if (this instanceof DomLite === false) - return new DomLite(els); - - return this.add(els) - }; - - if (domLib == null) - domLib = DomLite; - - var Proto = DomLite.fn = { - constructor: DomLite, - length: 0, - add: function(mix){ - if (mix == null) - return this; - if (is_Array(mix) === true) - return each(mix, this.add, this); - - var type = mix.nodeType; - if (type === 11 /* Node.DOCUMENT_FRAGMENT_NODE */) - return each(mix.childNodes, this.add, this); - - if (type == null) { - if (typeof mix.length === 'number') - return each(mix, this.add, this); - - log_warn('Uknown domlite object'); - return this; - } - - this[this.length++] = mix; - return this; - }, - on: function(){ - return binder.call(this, on, delegate, arguments); - }, - off: function(){ - return binder.call(this, off, undelegate, arguments); - }, - find: function(sel){ - return each(this, function(node){ - this.add(_$$.call(node, sel)); - }, new DomLite); - }, - filter: function(sel){ - return each(this, function(node, index){ - _is(node, sel) === true && this.add(node); - }, new DomLite); - }, - parent: function(){ - var x = this[0]; - return new DomLite(x && x.parentNode); - }, - children: function(sel){ - var set = each(this, function(node){ - this.add(node.childNodes); - }, new DomLite); - return sel == null ? set : set.filter(sel); - }, - closest: function(selector){ - var x = this[0], - dom = new DomLite; - while( x != null && x.parentNode != null){ - x = x.parentNode; - if (_is(x, selector)) - return dom.add(x); - } - return dom; - }, - next: function(selector){ - var x = this[0], - dom = new DomLite; - while (x != null && x.nextElementSibling != null) { - x = x.nextElementSibling; - if (selector == null) { - return dom.add(x); - } - if (_is(x, selector)) { - return dom.add(x); - } - } - return dom; - }, - remove: function(){ - return each(this, function(x){ - x.parentNode.removeChild(x); - }); - }, - text: function(mix){ - if (arguments.length === 0) { - return aggr('', this, function(txt, x){ - return txt + x.textContent; - }); - } - return each(this, function(x){ - x.textContent = mix; - }); - }, - html: function(mix){ - if (arguments.length === 0) { - return aggr('', this, function(txt, x){ - return txt + x.innerHTML; - }); - } - return each(this, function(x){ - x.innerHTML = mix; - }); - }, - val: function(mix){ - if (arguments.length === 0) { - return this.length === 0 ? null : this[0].value; - } - if (this.length !== 0) { - this[0].value = mix; - } - return this; - }, - focus: function(){ - return each(this, function(x){ - x.focus && x.focus(); - }); - } - }; - - (function(){ - each(['show', 'hide'], function(method) { - Proto[method] = function(){ - return each(this, function(x){ - x.style.display = method === 'hide' ? 'none' : ''; - }); - }; - }); - }()); - - (function(){ - var Manip = { - append: function(node, el){ - after_(node, node.lastChild, el); - }, - prepend: function(node, el){ - before_(node, node.firstChild, el); - }, - after: function(node, el){ - after_(node.parentNode, node, el); - }, - before: function(node, el){ - before_(node.parentNode, node, el); - } - }; - each(['append', 'prepend', 'before', 'after'], function(method){ - var fn = Manip[method]; - Proto[method] = function(mix){ - var isArray = is_Array(mix); - return each(this, function(node){ - if (isArray) { - each(mix, function(el){ - fn(node, el); - }); - return; - } - fn(node, mix); - }); - }; - }); - function before_(parent, anchor, el){ - if (parent == null || el == null) - return; - parent.insertBefore(el, anchor); - } - function after_(parent, anchor, el) { - var next = anchor != null ? anchor.nextSibling : null; - before_(parent, next, el); - } - }()); - - - function each(arr, fn, ctx){ - if (arr == null) - return ctx || arr; - var imax = arr.length, - i = -1; - while( ++i < imax ){ - fn.call(ctx || arr, arr[i], i); - } - return ctx || arr; - } - function aggr(seed, arr, fn, ctx) { - each(arr, function(x, i){ - seed = fn.call(ctx || arr, seed, arr[i], i); - }); - return seed; - } - function indexOf(arr, fn, ctx){ - if (arr == null) - return -1; - var imax = arr.length, - i = -1; - while( ++i < imax ){ - if (fn.call(ctx || arr, arr[i], i) === true) - return i; - } - return -1; - } - - var docEl = document.documentElement; - var _$$ = docEl.querySelectorAll; - var _is = (function(){ - var matchesSelector = - docEl.webkitMatchesSelector || - docEl.mozMatchesSelector || - docEl.msMatchesSelector || - docEl.oMatchesSelector || - docEl.matchesSelector - ; - return function (el, selector) { - return el == null || el.nodeType !== 1 - ? false - : matchesSelector.call(el, selector); - }; - }()); - - /* Events */ - var binder, on, off, delegate, undelegate; - (function(){ - binder = function(bind, bindSelector, args){ - var length = args.length, - fn; - if (2 === length) - fn = bind - if (3 === length) - fn = bindSelector; - - if (fn != null) { - return each(this, function(node){ - fn.apply(DomLite(node), args); - }); - } - log_error('`DomLite.on|off` - invalid arguments count'); - return this; - }; - on = function(type, fn){ - return run(this, _addEvent, type, fn); - }; - off = function(type, fn){ - return run(this, _remEvent, type, fn); - }; - delegate = function(type, selector, fn){ - function guard(event){ - var el = event.target, - current = event.currentTarget; - if (current === el) - return; - while(el != null && el !== current){ - if (_is(el, selector)) { - fn(event); - return; - } - el = el.parentNode; - } - } - (fn._guards || (fn._guards = [])).push(guard); - return on.call(this, type, guard); - }; - undelegate = function(type, selector, fn){ - return each(fn._quards, function(guard){ - off.call(this, type, guard); - }, this); - }; - - function run(set, handler, type, fn){ - return each(set, function(node){ - handler.call(node, type, fn, false); - }); - } - var _addEvent = docEl.addEventListener, - _remEvent = docEl.removeEventListener; - }()); - - /* class handler */ - (function(){ - var isClassListSupported = docEl.classList != null; - var hasClass = isClassListSupported === true - ? function (node, klass) { - return node.classList.contains(klass); - } - : function(node, klass) { - return -1 !== (' ' + node.className + ' ').indexOf(' ' + klass + ' '); - }; - Proto.hasClass = function(klass){ - return -1 !== indexOf(this, function(node){ - return hasClass(node, klass) - }); - }; - var Shim; - (function(){ - Shim = { - add: function(node, klass){ - if (hasClass(node, klass) === false) - add(node, klass); - }, - remove: function(node, klass){ - if (hasClass(node, klass) === true) - remove(node, klass); - }, - toggle: function(node, klass){ - var fn = hasClass(node, klass) === true - ? remove - : add; - fn(node, klass); - } - }; - function add(node, klass){ - node.className += ' ' + klass; - } - function remove(node, klass){ - node.className = (' ' + node.className + ' ').replace(' ' + klass + ' ', ' '); - } - }()); - - each(['add', 'remove', 'toggle'], function(method){ - var mutatorFn = isClassListSupported === false - ? Shim[method] - : function(node, klass){ - var classList = node.classList; - classList[method].call(classList, klass); - }; - Proto[method + 'Class'] = function(klass){ - return each(this, function(node){ - mutatorFn(node, klass); - }); - }; - }); - - }()); - - - // Events - (function(){ - var createEvent = function(type){ - var event = document.createEvent('Event'); - event.initEvent(type, true, true); - return event; - }; - var create = function(type, data){ - if (data == null) - return createEvent(type); - var event = document.createEvent('CustomEvent'); - event.initCustomEvent(type, true, true, data); - return event; - }; - var dispatch = function(node, event){ - node.dispatchEvent(event); - }; - Proto['trigger'] = function(type, data){ - var event = create(type, data); - return each(this, function(node){ - dispatch(node, event); - }); - }; - }()); - - // Attributes - (function(){ - Proto['attr'] = function(name, val){ - if (val === void 0) - return this[0] && this[0].getAttribute(name); - return each(this, function(node){ - node.setAttribute(name, val); - }); - }; - Proto['removeAttr'] = function(name){ - return each(this, function(node){ - node.removeAttribute(name); - }); - }; - }()); - - if (Object.setPrototypeOf) - Object.setPrototypeOf(Proto, Array.prototype); - else if (Proto.__proto__) - Proto.__proto__ = Array.prototype; - - DomLite.prototype = Proto; - domLib_initialize(); - - }(global.document)); - // end:source /src/DomLite.js - // source /src/jcompo/jCompo.js - // try to initialize the dom lib, or is then called from `setDOMLibrary` - domLib_initialize(); - - function domLib_initialize(){ - if (domLib == null || domLib.fn == null) - return; - - domLib.fn.compo = function(selector){ - if (this.length === 0) - return null; - - var compo = Anchor.resolveCompo(this[0], true); - - return selector == null - ? compo - : find_findSingle(compo, selector_parse(selector, Dom.CONTROLLER, 'up')); - }; - - domLib.fn.model = function(selector){ - var compo = this.compo(selector); - if (compo == null) - return null; - - var model = compo.model; - while(model == null && compo.parent){ - compo = compo.parent; - model = compo.model; - } - return model; - }; - - // insert - (function(){ - var jQ_Methods = [ - 'append', - 'prepend', - 'before', - 'after' - ]; - - [ - 'appendMask', - 'prependMask', - 'beforeMask', - 'afterMask' - ].forEach(function(method, index){ - - domLib.fn[method] = function(template, model, ctr, ctx){ - if (this.length === 0) { - // if DEBUG - log_warn(' $.', method, '- no element was selected(found)'); - // endif - return this; - } - if (this.length > 1) { - // if DEBUG - log_warn(' $.', method, ' can insert only to one element. Fix is comming ...'); - // endif - } - if (ctr == null) { - ctr = index < 2 - ? this.compo() - : this.parent().compo() - ; - } - - var isUnsafe = false; - if (ctr == null) { - ctr = {}; - isUnsafe = true; - } - - - if (ctr.components == null) { - ctr.components = []; - } - - var compos = ctr.components, - i = compos.length, - fragment = mask.render(template, model, ctx, null, ctr); - - var self = this[jQ_Methods[index]](fragment), - imax = compos.length; - - for (; i < imax; i++) { - Compo.signal.emitIn(compos[i], 'domInsert'); - } - - if (isUnsafe && imax !== 0) { - // if DEBUG - log_warn( - '$.' - , method - , '- parent controller was not found in Elements DOM.' - , 'This can lead to memory leaks.' - ); - log_warn( - 'Specify the controller directly, via $.' - , method - , '(template[, model, controller, ctx])' - ); - // endif - } - - return self; - }; - - }); - }()); - - - // remove - (function(){ - var jq_remove = domLib.fn.remove, - jq_empty = domLib.fn.empty - ; - - domLib.fn.removeAndDispose = function(){ - this.each(each_tryDispose); - - return jq_remove.call(this); - }; - - domLib.fn.emptyAndDispose = function(){ - this.each(each_tryDisposeChildren); - - return jq_empty.call(this); - } - - - function each_tryDispose(index, node){ - node_tryDispose(node); - } - - function each_tryDisposeChildren(index, node){ - node_tryDisposeChildren(node); - } - - }()); - } - - // end:source /src/jcompo/jCompo.js - - - // source /src/handler/slot.js - - function SlotHandler() {} - - mask.registerHandler(':slot', SlotHandler); - - SlotHandler.prototype = { - constructor: SlotHandler, - renderEnd: function(element, model, cntx, container){ - this.slots = {}; - - this.expression = this.attr.on; - - this.slots[this.attr.signal] = this.handle; - }, - handle: function(){ - var expr = this.expression; - - mask.Utils.Expression.eval(expr, this.model, global, this); - } - }; - - // end:source /src/handler/slot.js - - - return Compo; - - }(Mask)); - - // end:source /ref-mask-compo/lib/compo.embed.js - // source /ref-mask-j/lib/jmask.embed.js - - var jmask = exports.jmask = Mask.jmask = (function(mask){ - - // source ../src/scope-vars.js - var Dom = mask.Dom, - _mask_render = mask.render, - _mask_parse = mask.parse, - _mask_ensureTmplFnOrig = mask.Utils.ensureTmplFn, - _signal_emitIn = (mask.Compo || Compo).signal.emitIn; - - - function _mask_ensureTmplFn(value) { - if (typeof value !== 'string') { - return value; - } - return _mask_ensureTmplFnOrig(value); - } - - - // end:source ../src/scope-vars.js - - // source ../src/util/array.js - var arr_eachAny, - arr_unique; - - (function(){ - - arr_eachAny = function(mix, fn) { - if (is_ArrayLike(mix) === false) { - fn(mix); - return; - } - var imax = mix.length, - i = -1; - while ( ++i < imax ){ - fn(mix[i], i); - } - }; - - (function() { - arr_unique = function(array) { - hasDuplicate_ = false; - array.sort(sort); - if (hasDuplicate_ === false) - return array; - - var duplicates = [], - i = 0, - j = 0, - imax = array.length - 1; - - while (i < imax) { - if (array[i++] === array[i]) { - duplicates[j++] = i; - } - } - while (j--) { - array.splice(duplicates[j], 1); - } - - return array; - }; - - var hasDuplicate_ = false; - function sort(a, b) { - if (a === b) { - hasDuplicate_ = true; - return 0; - } - return 1; - } - }()); - - }()); - - // end:source ../src/util/array.js - // source ../src/util/selector.js - var selector_parse, - selector_match; - - (function(){ - - selector_parse = function(selector, type, direction) { - if (selector == null) - log_error('selector is null for the type', type); - - if (typeof selector === 'object') - return selector; - - var key, - prop, - nextKey, - filters, - - _key, - _prop, - _selector; - - var index = 0, - length = selector.length, - c, - end, - matcher, root, current, - eq, - slicer; - - if (direction === 'up') { - nextKey = sel_key_UP; - } else { - nextKey = type === Dom.SET - ? sel_key_MASK - : sel_key_COMPOS; - } - - while (index < length) { - - c = selector.charCodeAt(index); - - if (c < 33) { - index++; - continue; - } - if (c === 62 /* > */) { - if (matcher == null) { - root = matcher = { - selector: '__scope__', - nextKey: nextKey, - filters: null, - next: { - type: 'children', - matcher: null - } - }; - } else { - matcher.next = { - type: 'children', - matcher: null - }; - } - current = matcher; - matcher = null; - index++; - continue; - } - - end = selector_moveToBreak(selector, index + 1, length); - if (c === 46 /*.*/ ) { - _key = 'class'; - _prop = sel_key_ATTR; - _selector = sel_hasClassDelegate(selector.substring(index + 1, end)); - } - - else if (c === 35 /*#*/ ) { - _key = 'id'; - _prop = sel_key_ATTR; - _selector = selector.substring(index + 1, end); - } - - else if (c === 91 /*[*/ ) { - eq = selector.indexOf('=', index); - //if DEBUG - eq === -1 && console.error('Attribute Selector: should contain "="'); - // endif - - _prop = sel_key_ATTR; - _key = selector.substring(index + 1, eq); - - //slice out quotes if any - c = selector.charCodeAt(eq + 1); - slicer = c === 34 || c === 39 ? 2 : 1; - - _selector = selector.substring(eq + slicer, end - slicer + 1); - - // increment, as cursor is on closed ']' - end++; - } - else if (c === 58 /*:*/ && selector.charCodeAt(index + 1) === 58) { - index += 2; - var start = index, name, expr; - do { - c = selector.charCodeAt(index); - } while (c >= 97 /*a*/ && c <= 122 /*z*/ && ++index < length); - - name = selector.substring(start, index); - if (c === 40 /*(*/) { - start = ++index; - do { - c = selector.charCodeAt(index); - } while (c !== 41/*)*/ && ++index < length); - expr = selector.substring(start, index); - index++; - } - var pseudo = PseudoSelectors(name, expr); - if (matcher == null) { - matcher = { - selector: '*', - nextKey: nextKey - }; - } - if (root == null) { - root = matcher; - } - if (matcher.filters == null) { - matcher.filters = []; - } - matcher.filters.push(pseudo); - continue; - } - else { - - if (matcher != null) { - matcher.next = { - type: 'any', - matcher: null - }; - current = matcher; - matcher = null; - } - - _prop = null; - _key = type === Dom.SET ? 'tagName' : 'compoName'; - _selector = selector.substring(index, end); - } - - index = end; - - if (matcher == null) { - matcher = { - key: _key, - prop: _prop, - selector: _selector, - nextKey: nextKey, - filters: null - }; - if (root == null) - root = matcher; - - if (current != null) { - current.next.matcher = matcher; - } - - continue; - } - if (matcher.filters == null) - matcher.filters = []; - - matcher.filters.push({ - key: _key, - selector: _selector, - prop: _prop - }); - } - - if (current && current.next) - current.next.matcher = matcher; - - return root; - }; - - selector_match = function(node, selector, type) { - if (typeof selector === 'string') { - if (type == null) { - type = Dom[node.compoName ? 'CONTROLLER' : 'SET']; - } - selector = selector_parse(selector, type); - } - - var obj = selector.prop ? node[selector.prop] : node, - matched = false; - - if (obj == null) - return false; - if (selector.selector === '*') { - matched = true - } - else if (typeof selector.selector === 'function') { - matched = selector.selector(obj[selector.key]); - } - else if (selector.selector.test != null) { - if (selector.selector.test(obj[selector.key])) { - matched = true; - } - } - else if (obj[selector.key] === selector.selector) { - matched = true; - } - - if (matched === true && selector.filters != null) { - for(var i = 0, x, imax = selector.filters.length; i < imax; i++){ - x = selector.filters[i]; - - if (typeof x === 'function') { - matched = x(node, type); - if (matched === false) - return false; - continue; - } - if (selector_match(node, x, type) === false) { - return false; - } - } - } - - return matched; - }; - - // ==== private - - var sel_key_UP = 'parent', - sel_key_MASK = 'nodes', - sel_key_COMPOS = 'components', - sel_key_ATTR = 'attr'; - - - function sel_hasClassDelegate(matchClass) { - return function(className){ - return sel_hasClass(className, matchClass); - }; - } - - // [perf] http://jsperf.com/match-classname-indexof-vs-regexp/2 - function sel_hasClass(className, matchClass, index) { - if (typeof className !== 'string') - return false; - - if (index == null) - index = 0; - - index = className.indexOf(matchClass, index); - - if (index === -1) - return false; - - if (index > 0 && className.charCodeAt(index - 1) > 32) - return sel_hasClass(className, matchClass, index + 1); - - var class_Length = className.length, - match_Length = matchClass.length; - - if (index < class_Length - match_Length && className.charCodeAt(index + match_Length) > 32) - return sel_hasClass(className, matchClass, index + 1); - - return true; - } - - - function selector_moveToBreak(selector, index, length) { - var c, - isInQuote = false, - isEscaped = false; - - while (index < length) { - c = selector.charCodeAt(index); - - if (c === 34 || c === 39) { - // '" - isInQuote = !isInQuote; - } - - if (c === 92) { - // [\] - isEscaped = !isEscaped; - } - - if (c === 46 || c === 35 || c === 91 || c === 93 || c === 62 || c < 33) { - // .#[]> - if (isInQuote !== true && isEscaped !== true) { - break; - } - } - index++; - } - return index; - } - - var PseudoSelectors; - (function() { - PseudoSelectors = function(name, expr) { - var fn = Fns[name]; - if (fn !== void 0) - return fn; - - var worker = Workers[name]; - if (worker !== void 0) - return worker(expr); - - throw new Error('Uknown pseudo selector:' + name); - }; - var Fns = { - text: function (node) { - return node.type === Dom.TEXTNODE; - }, - node: function(node) { - return node.type === Dom.NODE; - } - }; - var Workers = { - not: function(expr){ - return function(node, type){ - return !selector_match(node, expr, type); - } - } - }; - }()); - }()); - - // end:source ../src/util/selector.js - // source ../src/util/utils.js - var jmask_filter, - jmask_find, - jmask_clone, - jmask_deepest, - jmask_getText - ; - - (function(){ - - jmask_filter = function(mix, matcher) { - if (matcher == null) - return mix; - - var result = []; - arr_eachAny(mix, function(node, i) { - if (selector_match(node, matcher)) - result.push(node); - }); - return result; - }; - - /** - * - mix (Node | Array[Node]) - */ - jmask_find = function(mix, matcher, output, deep) { - if (mix == null) { - return output; - } - if (output == null) { - output = []; - } - if (deep == null) { - // is root and matchling like `> div` (childs only) - if (matcher.selector === '__scope__') { - deep = false; - matcher = matcher.next.matcher; - } else{ - deep = true; - } - } - - arr_eachAny(mix, function(node){ - if (selector_match(node, matcher) === false) { - - if (matcher.next == null && deep !== false) - jmask_find(node[matcher.nextKey], matcher, output, deep); - - return; - } - - if (matcher.next == null) { - output.push(node); - if (deep === true) - jmask_find(node[matcher.nextKey], matcher, output, deep); - - return; - } - - var next = matcher.next; - deep = next.type !== 'children'; - jmask_find(node[matcher.nextKey], next.matcher, output, deep); - }); - return output; - }; - - jmask_clone = function(node, parent){ - var clone = obj_create(node); - - var attr = node.attr; - if (attr != null){ - clone.attr = obj_create(attr); - } - - var nodes = node.nodes; - if (nodes != null){ - if (is_ArrayLike(nodes) === false) { - clone.nodes = [ jmask_clone(nodes, clone) ]; - } - else { - clone.nodes = []; - var imax = nodes.length, - i = 0; - for(; i< imax; i++){ - clone.nodes[i] = jmask_clone(nodes[i], clone); - } - } - } - return clone; - }; - - - jmask_deepest = function(node){ - var current = node, - prev; - while(current != null){ - prev = current; - current = current.nodes && current.nodes[0]; - } - return prev; - }; - - - jmask_getText = function(node, model, ctx, controller) { - if (Dom.TEXTNODE === node.type) { - if (is_Function(node.content)) { - return node.content('node', model, ctx, null, controller); - } - return node.content; - } - - var output = ''; - if (node.nodes != null) { - for(var i = 0, x, imax = node.nodes.length; i < imax; i++){ - x = node.nodes[i]; - output += jmask_getText(x, model, ctx, controller); - } - } - return output; - }; - - }()); - - // end:source ../src/util/utils.js - - // source ../src/jmask/jmask.js - function jMask(mix) { - if (this instanceof jMask === false) - return new jMask(mix); - if (mix == null) - return this; - if (mix.type === Dom.SET) - return mix; - return this.add(mix); - } - - var Proto = jMask.prototype = { - constructor: jMask, - type: Dom.SET, - length: 0, - components: null, - add: function(mix) { - var i, length; - - if (typeof mix === 'string') { - mix = _mask_parse(mix); - } - - if (is_ArrayLike(mix)) { - for (i = 0, length = mix.length; i < length; i++) { - this.add(mix[i]); - } - return this; - } - - if (typeof mix === 'function' && mix.prototype.type != null) { - // assume this is a controller - mix = { - controller: mix, - type: Dom.COMPONENT - }; - } - - - var type = mix.type; - - if (!type) { - // @TODO extend to any type? - console.error('Only Mask Node/Component/NodeText/Fragment can be added to jmask set', mix); - return this; - } - - if (type === Dom.FRAGMENT) { - var nodes = mix.nodes; - - for(i = 0, length = nodes.length; i < length;) { - this[this.length++] = nodes[i++]; - } - return this; - } - - if (type === Dom.CONTROLLER) { - - if (mix.nodes != null && mix.nodes.length) { - for (i = mix.nodes.length; i !== 0;) { - // set controller as parent, as parent is mask dom node - mix.nodes[--i].parent = mix; - } - } - - if (mix.$ != null) { - this.type = Dom.CONTROLLER; - } - } - - - - this[this.length++] = mix; - return this; - }, - toArray: function() { - return _Array_slice.call(this); - }, - /** - * render([model, cntx, container]) -> HTMLNode - * - model (Object) - * - cntx (Object) - * - container (Object) - * - returns (HTMLNode) - * - **/ - render: function(model, ctx, el, ctr) { - this.components = []; - - if (this.length === 1) { - return _mask_render(this[0], model, ctx, el, ctr || this); - } - - if (el == null) { - el = document.createDocumentFragment(); - } - - for (var i = 0, length = this.length; i < length; i++) { - _mask_render(this[i], model, ctx, el, ctr || this); - } - return el; - }, - prevObject: null, - end: function() { - return this.prevObject || this; - }, - pushStack: function(nodes) { - var next; - next = jMask(nodes); - next.prevObject = this; - return next; - }, - controllers: function() { - if (this.components == null) { - console.warn('Set was not rendered'); - } - return this.pushStack(this.components || []); - }, - mask: function(template) { - if (arguments.length !== 0) { - return this.empty().append(template); - } - return mask.stringify(this); - }, - - text: function(mix, ctx, ctr){ - if (typeof mix === 'string' && arguments.length === 1) { - var node = [ new Dom.TextNode(mix) ]; - - for(var i = 0, imax = this.length; i < imax; i++){ - this[i].nodes = node; - } - return this; - } - - var str = ''; - for(var i = 0, imax = this.length; i < imax; i++){ - str += jmask_getText(this[i], mix, ctx, ctr); - } - return str; - } - }; - - arr_each(['append', 'prepend'], function(method) { - - Proto[method] = function(mix) { - var $mix = jMask(mix), - i = 0, - length = this.length, - arr, node; - - for (; i < length; i++) { - node = this[i]; - // we create each iteration a new array to prevent collisions in future manipulations - arr = $mix.toArray(); - - for (var j = 0, jmax = arr.length; j < jmax; j++) { - arr[j].parent = node; - } - - if (node.nodes == null) { - node.nodes = arr; - continue; - } - - node.nodes = method === 'append' ? node.nodes.concat(arr) : arr.concat(node.nodes); - } - - return this; - }; - - }); - - arr_each(['appendTo'], function(method) { - - Proto[method] = function(mix, model, cntx, controller) { - - if (controller == null) { - controller = this; - } - - if (mix.nodeType != null && typeof mix.appendChild === 'function') { - mix.appendChild(this.render(model, cntx, null, controller)); - - _signal_emitIn(controller, 'domInsert'); - return this; - } - - jMask(mix).append(this); - return this; - }; - - }); - - // end:source ../src/jmask/jmask.js - // source ../src/jmask/manip.attr.js - (function() { - Proto.removeAttr = Proto.removeProp = function(key){ - return coll_each(this, function(node){ - node.attr[key] = null; - }); - }; - Proto.attr = Proto.prop = function(mix, val){ - if (arguments.length === 1 && is_String(mix)) { - return this.length !== 0 ? this[0].attr[mix] : null; - } - function asString(node, key, val){ - node.attr[key] = _mask_ensureTmplFn(val); - } - function asObject(node, obj){ - for(var key in obj){ - asString(node, key, obj[key]); - } - } - var fn = is_String(mix) ? asString : asObject; - return coll_each(this, function(node){ - fn(node, mix, val); - }); - }; - Proto.tag = function(name) { - if (arguments.length === 0) - return this[0] && this[0].tagName; - - return coll_each(this, function(node){ - node.tagName = name; - }); - }; - Proto.css = function(mix, val) { - if (arguments.length <= 1 && typeof mix === 'string') { - if (this.length == null) - return null; - - var style = this[0].attr.style; - if (style == null) - return null; - - var obj = css_parseStyle(style); - return mix == null ? obj : obj[mix]; - } - - if (mix == null) - return this; - - var stringify = typeof mix === 'object' - ? css_stringify - : css_stringifyKeyVal ; - var extend = typeof mix === 'object' - ? obj_extend - : css_extendKeyVal ; - - return coll_each(this, function(node){ - var style = node.attr.style; - if (style == null) { - node.attr.style = stringify(mix, val); - return; - } - var css = css_parseStyle(style); - extend(css, mix, val); - node.attr.style = css_stringify(css); - }); - }; - - function css_extendKeyVal(css, key, val){ - css[key] = val; - } - function css_parseStyle(style) { - var obj = {}; - style.split(';').forEach(function(x){ - if (x === '') - return; - var i = x.indexOf(':'), - key = x.substring(0, i).trim(), - val = x.substring(i + 1).trim(); - obj[key] = val; - }); - return obj; - } - function css_stringify(css) { - var str = '', key; - for(key in css) { - str += key + ':' + css[key] + ';'; - } - return str; - } - function css_stringifyKeyVal(key, val){ - return key + ':' + val + ';'; - } - - }()); - - // end:source ../src/jmask/manip.attr.js - // source ../src/jmask/manip.class.js - (function() { - Proto.hasClass = function(klass){ - return coll_find(this, function(node){ - return has(node, klass); - }); - }; - var Mutator_ = { - add: function(node, klass){ - if (has(node, klass) === false) - add(node, klass); - }, - remove: function(node, klass){ - if (has(node, klass) === true) - remove(node, klass); - }, - toggle: function(node, klass){ - var fn = has(node, klass) === true ? remove : add; - fn(node, klass); - } - }; - arr_each(['add', 'remove', 'toggle'], function(method) { - var fn = Mutator_[method]; - Proto[method + 'Class'] = function(klass) { - return coll_each(this, function(node){ - fn(node, klass); - }); - }; - }); - function current(node){ - var className = node.attr['class']; - return typeof className === 'string' ? className : ''; - } - function has(node, klass){ - return -1 !== (' ' + current(node) + ' ').indexOf(' ' + klass + ' '); - } - function add(node, klass){ - node.attr['class'] = (current(node) + ' ' + klass).trim(); - } - function remove(node, klass) { - node.attr['class'] = (' ' + current(node) + ' ').replace(' ' + klass + ' ', '').trim(); - } - }()); - - // end:source ../src/jmask/manip.class.js - // source ../src/jmask/manip.dom.js - obj_extend(Proto, { - clone: function(){ - return jMask(coll_map(this, jmask_clone)); - }, - wrap: function(wrapper){ - var $wrap = jMask(wrapper); - if ($wrap.length === 0){ - log_warn('Not valid wrapper', wrapper); - return this; - } - var result = coll_map(this, function(x){ - var node = $wrap.clone()[0]; - jmask_deepest(node).nodes = [ x ]; - - if (x.parent != null) { - var i = coll_indexOf(x.parent.nodes, x); - if (i !== -1) - x.parent.nodes.splice(i, 1, node); - } - return node - }); - return jMask(result); - }, - wrapAll: function(wrapper){ - var $wrap = jMask(wrapper); - if ($wrap.length === 0){ - log_error('Not valid wrapper', wrapper); - return this; - } - this.parent().mask($wrap); - jmask_deepest($wrap[0]).nodes = this.toArray(); - return this.pushStack($wrap); - } - }); - - arr_each(['empty', 'remove'], function(method) { - Proto[method] = function(){ - return coll_each(this, Methods_[method]); - }; - var Methods_ = { - remove: function(node){ - if (node.parent != null) - coll_remove(node.parent.nodes, node); - }, - empty: function(node){ - node.nodes = null; - } - }; - }); - - // end:source ../src/jmask/manip.dom.js - // source ../src/jmask/traverse.js - obj_extend(Proto, { - each: function(fn, ctx) { - for (var i = 0; i < this.length; i++) { - fn.call(ctx || this, this[i], i) - } - return this; - }, - eq: function(i) { - return i === -1 ? this.slice(i) : this.slice(i, i + 1); - }, - get: function(i) { - return i < 0 ? this[this.length - i] : this[i]; - }, - slice: function() { - return this.pushStack(Array.prototype.slice.apply(this, arguments)); - } - }); - - - arr_each([ - 'filter', - 'children', - 'closest', - 'parent', - 'find', - 'first', - 'last' - ], function(method) { - - Proto[method] = function(selector) { - var result = [], - matcher = selector == null - ? null - : selector_parse(selector, this.type, method === 'closest' ? 'up' : 'down'), - i, x; - - switch (method) { - case 'filter': - return jMask(jmask_filter(this, matcher)); - case 'children': - for (i = 0; i < this.length; i++) { - x = this[i]; - if (x.nodes == null) { - continue; - } - result = result.concat(matcher == null ? x.nodes : jmask_filter(x.nodes, matcher)); - } - break; - case 'parent': - for (i = 0; i < this.length; i++) { - x = this[i].parent; - if (!x || x.type === Dom.FRAGMENT || (matcher && selector_match(x, matcher))) { - continue; - } - result.push(x); - } - arr_unique(result); - break; - case 'closest': - case 'find': - if (matcher == null) { - break; - } - for (i = 0; i < this.length; i++) { - jmask_find(this[i][matcher.nextKey], matcher, result); - } - break; - case 'first': - case 'last': - var index; - for (i = 0; i < this.length; i++) { - - index = method === 'first' ? i : this.length - i - 1; - x = this[index]; - if (matcher == null || selector_match(x, matcher)) { - result[0] = x; - break; - } - } - break; - } - - return this.pushStack(result); - }; - - }); - - // end:source ../src/jmask/traverse.js - - - jMask.prototype.fn = jMask.prototype; - return jMask; - - }(Mask)); - - // end:source /ref-mask-j/lib/jmask.embed.js - // source /ref-mask-binding/lib/binding_embed - - - - (function(mask, Compo){ - - // source vars - var __Compo = typeof Compo !== 'undefined' ? Compo : (mask.Compo || global.Compo), - __dom_addEventListener = __Compo.Dom.addEventListener, - __registerHandler = mask.registerHandler, - __registerAttr = mask.registerAttrHandler, - __registerUtil = mask.registerUtil, - - domLib = __Compo.config.getDOMLibrary(); - - - // end:source vars - // source utils/ - // source object - - // end:source object - // source object_observe - var obj_addObserver, - obj_hasObserver, - obj_removeObserver, - obj_lockObservers, - obj_unlockObservers, - obj_ensureObserversProperty, - obj_addMutatorObserver, - obj_removeMutatorObserver - ; - - (function(){ - obj_addObserver = function(obj, property, cb) { - // closest observer - var parts = property.split('.'), - imax = parts.length, - i = -1, - x = obj; - while ( ++i < imax ) { - x = x[parts[i]]; - - if (x == null) - break; - - if (x[prop_OBS] != null) { - - var prop = parts.slice(i + 1).join('.'); - if (x[prop_OBS][prop] != null) { - - pushListener_(x, prop, cb); - - var cbs = pushListener_(obj, property, cb); - if (cbs.length === 1) { - var arr = parts.splice(0, i); - if (arr.length !== 0) - attachProxy_(obj, property, cbs, arr, true); - } - return; - } - } - } - - var cbs = pushListener_(obj, property, cb); - if (cbs.length === 1) - attachProxy_(obj, property, cbs, parts, true); - - var val = obj_getProperty(obj, property), - mutators = getSelfMutators(val); - if (mutators != null) { - objMutator_addObserver( - val, mutators, cb - ); - } - }; - - obj_hasObserver = function(obj, property, callback){ - // nested observer - var parts = property.split('.'), - imax = parts.length, - i = -1, - x = obj; - while ( ++i < imax ) { - x = x[parts[i]]; - if (x == null) - break; - - if (x[prop_OBS] != null) { - if (obj_hasObserver(x, parts.slice(i).join('.'), callback)) - return true; - - break; - } - } - - var obs = obj[prop_OBS]; - if (obs == null || obs[property] == null) - return false; - - return arr_contains(obs[property], callback); - }; - - obj_removeObserver = function(obj, property, callback) { - // nested observer - var parts = property.split('.'), - imax = parts.length, - i = -1, - x = obj; - while ( ++i < imax ) { - x = x[parts[i]]; - if (x == null) - break; - - if (x[prop_OBS] != null) { - obj_removeObserver(x, parts.slice(i).join('.'), callback); - break; - } - } - - - var obs = obj_ensureObserversProperty(obj, property), - val = obj_getProperty(obj, property); - if (callback === void 0) { - // callback not provided -> remove all observers - obs.length = 0; - } else { - arr_remove(obs, callback); - } - - var mutators = getSelfMutators(val); - if (mutators != null) - objMutator_removeObserver(val, mutators, callback) - - }; - obj_lockObservers = function(obj) { - var obs = obj[prop_OBS]; - if (obs != null) - obs[prop_DIRTY] = {}; - }; - obj_unlockObservers = function(obj) { - var obs = obj[prop_OBS], - dirties = obs == null ? null : obs[prop_DIRTY]; - if (dirties == null) - return; - - obs[prop_DIRTY] = null; - - var prop, cbs, val, imax, i; - for(prop in dirties) { - cbs = obj[prop_OBS][prop]; - imax = cbs == null ? 0 : cbs.length; - if (imax === 0) - continue; - - i = -1; - val = prop === prop_MUTATORS - ? obj - : obj_getProperty(obj, prop) - ; - while ( ++i < imax ) { - cbs[i](val); - } - } - }; - - obj_ensureObserversProperty = function(obj, type){ - var obs = obj[prop_OBS]; - if (obs == null) { - obs = { - __dirty: null, - __dfrTimeout: null, - __mutators: null - }; - defineProp_(obj, '__observers', { - value: obs, - enumerable: false - }); - } - if (type == null) - return obs; - - var arr = obs[type]; - return arr == null - ? (obs[type] = []) - : arr - ; - }; - - obj_addMutatorObserver = function(obj, cb){ - var mutators = getSelfMutators(obj); - if (mutators != null) - objMutator_addObserver(obj, mutators, cb); - }; - obj_removeMutatorObserver = function(obj, cb){ - objMutator_removeObserver(obj, null, cb); - }; - - // PRIVATE - var prop_OBS = '__observers', - prop_MUTATORS = '__mutators', - prop_TIMEOUT = '__dfrTimeout', - prop_DIRTY = '__dirty'; - - var defineProp_ = Object.defineProperty; - - - //Resolve object, or if property do not exists - create - function ensureProperty_(obj, chain) { - var i = -1, - imax = chain.length - 1, - key - ; - while ( ++i < imax ) { - key = chain[i]; - - if (obj[key] == null) - obj[key] = {}; - - obj = obj[key]; - } - return obj; - } - function getSelfMutators(obj) { - if (obj == null || typeof obj !== 'object') - return null; - - if (typeof obj.length === 'number' && typeof obj.slice === 'function') - return MUTATORS_.Array; - if (typeof obj.toUTCString === 'function') - return MUTATORS_.Date; - - return null; - } - var MUTATORS_ = { - Array: { - throttle: false, - methods: [ - // native mutators - 'push', - 'unshift', - 'splice', - 'pop', - 'shift', - 'reverse', - 'sort', - // collection mutators - 'remove' - ] - }, - Date: { - throttle: true, - methods: [ - 'setDate', - 'setFullYear', - 'setHours', - 'setMilliseconds', - 'setMinutes', - 'setMonth', - 'setSeconds', - 'setTime', - 'setUTCDate', - 'setUTCFullYear', - 'setUTCHours', - 'setUTCMilliseconds', - 'setUTCMinutes', - 'setUTCMonth', - 'setUTCSeconds', - ] - } - }; - function attachProxy_(obj, property, cbs, chain) { - var length = chain.length, - parent = length > 1 - ? ensureProperty_(obj, chain) - : obj, - key = chain[length - 1], - currentVal = parent[key]; - - if (length > 1) { - obj_defineCrumbs(obj, chain); - } - - - if ('length' === key) { - var mutators = getSelfMutators(parent); - if (mutators != null) { - objMutator_addObserver( - parent, mutators, function(){ - var imax = cbs.length, - i = -1 - ; - while ( ++i < imax ) { - cbs[i].apply(null, arguments); - } - }); - return currentVal; - } - - } - - defineProp_(parent, key, { - get: function() { - return currentVal; - }, - set: function(x) { - if (x === currentVal) - return; - var oldVal = currentVal; - - currentVal = x; - var i = 0, - imax = cbs.length, - mutators = getSelfMutators(x); - - - if (mutators != null) { - for(; i < imax; i++) { - objMutator_addObserver( - x, mutators, cbs[i] - ); - } - } - - if (obj[prop_OBS][prop_DIRTY] != null) { - obj[prop_OBS][prop_DIRTY][property] = 1; - return; - } - - for (i = 0; i < imax; i++) { - cbs[i](x); - } - - obj_sub_notifyListeners(obj, property, oldVal) - }, - configurable: true, - enumerable : true - }); - - return currentVal; - } - - function obj_defineCrumbs(obj, chain) { - var rebinder = obj_crumbRebindDelegate(obj), - path = '', - key; - - var imax = chain.length - 1, - i = 0; - for(; i < imax; i++) { - key = chain[i]; - path += key + '.'; - - obj_defineCrumb(path, obj, key, rebinder); - obj = obj[key]; - } - } - - function obj_defineCrumb(path, obj, key, rebinder) { - - var value = obj[key], - old; - - defineProp_(obj, key, { - get: function() { - return value; - }, - set: function(x) { - if (x === value) - return; - - old = value; - value = x; - rebinder(path, old); - }, - configurable: true, - enumerable : true - }); - } - function obj_sub_notifyListeners(obj, path, oldVal) { - var obs = obj[prop_OBS]; - if (obs == null) - return; - for(var prop in obs) { - if (prop.indexOf(path + '.') !== 0) - continue; - - var cbs = obs[prop].slice(0), - imax = cbs.length, - i = 0, oldProp, cb; - if (imax === 0) - continue; - - var val = obj_getProperty(obj, prop); - for (i = 0; i < imax; i++) { - cb = cbs[i]; - obj_removeObserver(obj, prop, cb); - - if (oldVal != null && typeof oldVal === 'object') { - oldProp = prop.substring(path.length + 1); - obj_removeObserver(oldVal, oldProp, cb); - } - } - for (i = 0; i < imax; i++){ - cbs[i](val); - } - for (i = 0; i < imax; i++){ - obj_addObserver(obj, prop, cbs[i]); - } - } - } - - function obj_crumbRebindDelegate(obj) { - return function(path, oldValue){ - obj_crumbRebind(obj, path, oldValue); - }; - } - function obj_crumbRebind(obj, path, oldValue) { - var obs = obj[prop_OBS]; - if (obs == null) - return; - - for (var prop in obs) { - if (prop.indexOf(path) !== 0) - continue; - - var cbs = obs[prop].slice(0), - imax = cbs.length, - i = 0; - - if (imax === 0) - continue; - - var val = obj_getProperty(obj, prop), - cb, oldProp; - - for (i = 0; i < imax; i++) { - cb = cbs[i]; - obj_removeObserver(obj, prop, cb); - - if (oldValue != null && typeof oldValue === 'object') { - oldProp = prop.substring(path.length); - obj_removeObserver(oldValue, oldProp, cb); - } - } - for (i = 0; i < imax; i++){ - cbs[i](val); - } - - for (i = 0; i < imax; i++){ - obj_addObserver(obj, prop, cbs[i]); - } - } - } - - // Create Collection - Check If Exists - Add Listener - function pushListener_(obj, property, cb) { - var obs = obj_ensureObserversProperty(obj, property); - if (arr_contains(obs, cb) === false) - obs.push(cb); - return obs; - } - - var objMutator_addObserver, - objMutator_removeObserver; - (function(){ - objMutator_addObserver = function(obj, mutators, cb){ - var methods = mutators.methods, - throttle = mutators.throttle, - obs = obj_ensureObserversProperty(obj, prop_MUTATORS); - if (obs.length === 0) { - var imax = methods.length, - i = -1, - method, fn; - while( ++i < imax ){ - method = methods[i]; - fn = obj[method]; - if (fn == null) - continue; - - obj[method] = objMutator_createWrapper_( - obj - , fn - , method - , throttle - ); - } - } - obs[obs.length++] = cb; - }; - objMutator_removeObserver = function(obj, mutators, cb){ - var obs = obj_ensureObserversProperty(obj, prop_MUTATORS); - if (cb === void 0) { - obs.length = 0; - return; - } - arr_remove(obs, cb); - }; - - function objMutator_createWrapper_(obj, originalFn, method, throttle) { - var fn = throttle === true ? callDelayed : call; - return function() { - return fn( - obj, - originalFn, - method, - _Array_slice.call(arguments) - ); - }; - } - function call(obj, original, method, args) { - var cbs = obj_ensureObserversProperty(obj, prop_MUTATORS), - result = original.apply(obj, args); - - tryNotify(obj, cbs, method, args, result); - return result; - } - function callDelayed(obj, original, method, args) { - var cbs = obj_ensureObserversProperty(obj, prop_MUTATORS), - result = original.apply(obj, args); - - var obs = obj[prop_OBS]; - if (obs[prop_TIMEOUT] != null) - return result; - - obs[prop_TIMEOUT] = setTimeout(function(){ - obs[prop_TIMEOUT] = null; - tryNotify(obj, cbs, method, args, result); - }); - return result; - } - - function tryNotify(obj, cbs, method, args, result){ - if (cbs.length === 0) - return; - - var obs = obj[prop_OBS]; - if (obs[prop_DIRTY] != null) { - obs[prop_DIRTY][prop_MUTATORS] = 1; - return; - } - var imax = cbs.length, - i = -1, - x; - while ( ++i < imax ){ - x = cbs[i]; - if (typeof x === 'function') { - x(obj, method, args, result); - } - } - } - }()); - - }()); - // end:source object_observe - // source date - var date_ensure; - (function(){ - date_ensure = function(val){ - if (val == null || val === '') - return null; - - var date = val; - var type = typeof val; - if (type === 'string') { - date = new Date(val); - - if (rgx_es5Date.test(date) && val.indexOf('Z') === -1) { - // adjust to local time (http://es5.github.io/x15.9.html#x15.9.1.15) - val.setMinutes(val.getTimezoneOffset()); - } - } - if (type === 'number') { - date = new Date(val); - } - - return isNaN(date) === false && typeof date.getFullYear === 'function' - ? date - : null - ; - }; - - var rgx_es5Date = /^\d{4}\-\d{2}/; - }()); - // end:source date - // source dom - - function dom_removeElement(node) { - return node.parentNode.removeChild(node); - } - - function dom_removeAll(array) { - if (array == null) - return; - - var imax = array.length, - i = -1; - while ( ++i < imax ) { - dom_removeElement(array[i]); - } - } - - function dom_insertAfter(element, anchor) { - return anchor.parentNode.insertBefore(element, anchor.nextSibling); - } - - function dom_insertBefore(element, anchor) { - return anchor.parentNode.insertBefore(element, anchor); - } - - - - - // end:source dom - // source compo - var compo_fragmentInsert, - compo_render, - compo_dispose, - compo_inserted, - compo_attachDisposer, - compo_trav_children, - compo_getScopeFor - ; - (function(){ - - compo_fragmentInsert = function(compo, index, fragment, placeholder) { - if (compo.components == null) - return dom_insertAfter(fragment, placeholder || compo.placeholder); - - var compos = compo.components, - anchor = null, - insertBefore = true, - imax = compos.length, - i = index - 1, - elements; - - if (anchor == null) { - while (++i < imax) { - elements = compos[i].elements; - - if (elements && elements.length) { - anchor = elements[0]; - break; - } - } - } - if (anchor == null) { - insertBefore = false; - i = index < imax - ? index - : imax - ; - while (--i > -1) { - elements = compos[i].elements; - if (elements && elements.length) { - anchor = elements[elements.length - 1]; - break; - } - } - } - if (anchor == null) - anchor = placeholder || compo.placeholder; - - if (insertBefore) - return dom_insertBefore(fragment, anchor); - - return dom_insertAfter(fragment, anchor); - }; - - compo_render = function(parentCtr, template, model, ctx, container) { - return mask.render(template, model, ctx, container, parentCtr); - }; - - compo_dispose = function(compo, parent) { - if (compo == null) - return false; - - if (compo.elements != null) { - dom_removeAll(compo.elements); - compo.elements = null; - } - __Compo.dispose(compo); - - var compos = (parent && parent.components) || (compo.parent && compo.parent.components); - if (compos == null) { - log_error('Parent Components Collection is undefined'); - return false; - } - return arr_remove(compos, compo); - }; - - compo_inserted = function(compo) { - __Compo.signal.emitIn(compo, 'domInsert'); - }; - - compo_attachDisposer = function(ctr, disposer) { - if (typeof ctr.dispose === 'function') { - var previous = ctr.dispose; - ctr.dispose = function(){ - disposer.call(this); - previous.call(this); - }; - - return; - } - ctr.dispose = disposer; - }; - - compo_trav_children = function(compo, compoName){ - var out = [], - arr = compo.components || [], - imax = arr.length, - i = -1; - - while ( ++i < imax ){ - if (arr[i].compoName === compoName) { - out.push(arr[i]); - } - } - return out; - }; - - compo_getScopeFor = function(ctr, path){ - var key = path; - var i = path.indexOf('.'); - if (i !== -1) { - key = path.substring(0, i); - } - while (ctr != null) { - if (ctr.scope != null && ctr.scope.hasOwnProperty(key)) { - return ctr.scope; - } - ctr = ctr.parent; - } - return null; - }; - }()); - // end:source compo - // source expression - var expression_eval, - expression_eval_strict, - expression_bind, - expression_unbind, - expression_createBinder, - expression_createListener, - - expression_parse, - expression_varRefs - ; - - (function(){ - var Expression = mask.Utils.Expression; - - expression_eval_strict = Expression.eval; - expression_parse = Expression.parse; - expression_varRefs = Expression.varRefs; - - expression_eval = function(expr, model, ctx, ctr){ - if (expr === '.') - return model; - - var x = expression_eval_strict(expr, model, ctx, ctr); - return x == null ? '' : x; - }; - - expression_bind = function(expr, model, ctx, ctr, callback) { - if (expr === '.') { - if (model != null) { - obj_addMutatorObserver(model, callback); - } - return; - } - - var ast = expression_parse(expr), - vars = expression_varRefs(ast, model, ctx, ctr), - obj, ref; - - if (vars == null) - return; - - if (typeof vars === 'string') { - _toggleObserver(obj_addObserver, model, ctr, vars, callback); - return; - } - - var isArray = vars.length != null && typeof vars.splice === 'function', - imax = isArray === true ? vars.length : 1, - i = 0, - x, prop; - - for (; i < imax; i++) { - x = isArray === true ? vars[i] : vars; - _toggleObserver(obj_addObserver, model, ctr, x, callback); - } - }; - - expression_unbind = function(expr, model, ctr, callback) { - - if (typeof ctr === 'function') - log_warn('[mask.binding] - expression unbind(expr, model, controller, callback)'); - - if (expr === '.') { - if (model != null) { - obj_removeMutatorObserver(model, callback); - } - return; - } - - var vars = expression_varRefs(expr, model, null, ctr), - x, ref; - - if (vars == null) - return; - - if (typeof vars === 'string') { - _toggleObserver(obj_removeObserver, model, ctr, vars, callback); - return; - } - - var isArray = vars.length != null && typeof vars.splice === 'function', - imax = isArray === true ? vars.length : 1, - i = 0, - x; - - for (; i < imax; i++) { - x = isArray === true ? vars[i] : vars; - _toggleObserver(obj_removeObserver, model, ctr, x, callback); - } - - } - - /** - * expression_bind only fires callback, if some of refs were changed, - * but doesnt supply new expression value - **/ - expression_createBinder = function(expr, model, cntx, controller, callback) { - var locks = 0; - return function binder() { - if (++locks > 1) { - locks = 0; - log_warn(' Concurent binder detected', expr); - return; - } - - var value = expression_eval(expr, model, cntx, controller); - if (arguments.length > 1) { - var args = _Array_slice.call(arguments); - - args[0] = value; - callback.apply(this, args); - - } else { - - callback(value); - } - - locks--; - }; - }; - - expression_createListener = function(callback){ - var locks = 0; - return function(){ - if (++locks > 1) { - locks = 0; - log_warn(' concurent binder'); - return; - } - - callback(); - locks--; - } - }; - - function _toggleObserver(mutatorFn, model, ctr, accessor, callback) { - if (accessor == null) - return; - - if (typeof accessor === 'object') { - var obj = expression_eval_strict(accessor.accessor, model, null, ctr); - if (obj == null || typeof obj !== 'object') { - console.error('Binding failed to an object over accessor', accessor.ref); - return; - } - mutatorFn(obj, accessor.ref, callback); - return; - } - - // string; - var property = accessor, - parts = property.split('.'), - imax = parts.length; - - if (imax > 1) { - var first = parts[0]; - if (first === '$c' || first === '$') { - if (parts[1] === 'attr') { - return; - } - // Controller Observer - var owner = _getObservable_Controller(ctr, parts.slice(1), imax - 1); - var cutIdx = first.length + 1; - mutatorFn(owner, property.substring(cutIdx), callback); - return; - } - if (first === '$scope') { - // Controller Observer - var scope = _getObservable_Scope(ctr, parts[1]); - var cutIdx = 6 + 1; - mutatorFn(scope, property.substring(cutIdx), callback); - return; - } - if ('$a' === first || '$ctx' === first || '_' === first || '$u' === first) - return; - } - - var obj = null; - if (_isDefined(model, parts, imax)) { - obj = model; - } - if (obj == null) { - obj = _getObservable_Scope(ctr, parts[0], imax); - } - if (obj == null) { - obj = model; - } - - mutatorFn(obj, property, callback); - } - - function _getObservable_Scope_(ctr, parts, imax){ - var scope; - while(ctr != null){ - scope = ctr.scope; - if (scope != null && _isDefined(scope, parts, imax)) - return scope; - - ctr = ctr.parent; - } - return null; - } - function _getObservable_Controller(ctr_, parts, imax) { - var ctr = ctr_; - while(ctr != null){ - if (_isDefined(ctr, parts, imax)) - return ctr; - ctr = ctr.parent; - } - return ctr; - } - function _getObservable_Scope(ctr_, property, imax) { - var ctr = ctr_, scope; - while(ctr != null){ - scope = ctr.scope; - if (scope != null && scope[property] != null) { - return scope; - } - ctr = ctr.parent; - } - return null; - } - function _isDefined(obj, parts, imax){ - if (obj == null) - return false; - - var i = 0, val; - for(; i < imax; i++) { - obj = obj[parts[i]]; - if (obj == null) - return false; - } - return true; - } - - - }()); - - - - // end:source expression - // source signal - var signal_parse, - signal_create - ; - - (function(){ - - - signal_parse = function(str, isPiped, defaultType) { - var signals = str.split(';'), - set = [], - i = 0, - imax = signals.length, - x, - signalName, type, - signal; - - - for (; i < imax; i++) { - x = signals[i].split(':'); - - if (x.length !== 1 && x.length !== 2) { - log_error('Too much ":" in a signal def.', signals[i]); - continue; - } - - - type = x.length === 2 ? x[0] : defaultType; - signalName = x[x.length === 2 ? 1 : 0]; - - signal = signal_create(signalName.trim(), type, isPiped); - - if (signal != null) { - set.push(signal); - } - } - - return set; - }; - - - signal_create = function(signal, type, isPiped) { - if (isPiped !== true) { - return { - signal: signal, - type: type - }; - } - - var index = signal.indexOf('.'); - if (index === -1) { - log_error('No pipe name in a signal', signal); - return null; - } - - return { - signal: signal.substring(index + 1), - pipe: signal.substring(0, index), - type: type - }; - }; - }()); - - // end:source signal - // end:source utils/ - - // source DomObjectTransport - var DomObjectTransport; - (function(){ - - var objectWay = { - get: function(provider, expression) { - var getter = provider.objGetter; - if (getter == null) { - return expression_eval( - expression - , provider.model - , provider.ctx - , provider.ctr - ); - } - - var obj = getAccessorObject_(provider, getter); - if (obj == null) - return null; - - return obj[getter](expression, provider.model, provider.ctr.parent); - }, - set: function(obj, property, value, provider) { - var setter = provider.objSetter; - if (setter == null) { - obj_setProperty(obj, property, value); - return; - } - var ctx = getAccessorObject_(provider, setter); - if (ctx == null) - return; - - ctx[setter]( - property - , value - , provider.model - , provider.ctr.parent - ); - } - }; - var domWay = { - get: function(provider) { - var getter = provider.domGetter; - if (getter == null) { - return obj_getProperty(provider, provider.property); - } - var ctr = provider.ctr.parent; - if (isValidFn_(ctr, getter, 'Getter') === false) { - return null; - } - return ctr[getter](provider.element); - }, - set: function(provider, value) { - var setter = provider.domSetter; - if (setter == null) { - obj_setProperty(provider, provider.property, value); - return; - } - var ctr = provider.ctr.parent; - if (isValidFn_(ctr, setter, 'Setter') === false) { - return; - } - ctr[setter](value, provider.element); - } - }; - var DateTimeDelegate = { - domSet: function(format){ - return function(prov, val){ - var date = date_ensure(val); - prov.element.value = date == null ? '' : format(date); - } - }, - objSet: function(extend){ - return function(obj, prop, val){ - - var date = date_ensure(val); - if (date == null) - return; - - var target = obj_getProperty(obj, prop); - if (target == null) { - obj_setProperty(obj, prop, date); - return; - } - if (target.getFullYear == null || isNaN(target)) { - target = date_ensure(target) || date; - extend(target, date); - obj_setProperty(obj, prop, target); - return; - } - extend(target, date); - } - } - }; - - DomObjectTransport = { - // generic - objectWay: objectWay, - domWay: domWay, - - SELECT: { - get: function(provider) { - var el = provider.element, - i = el.selectedIndex; - if (i === -1) - return ''; - - var opt = el.options[i], - val = opt.getAttribute('value'); - return val == null - ? opt.getAttribute('name') /* obsolete */ - : val - ; - }, - set: function(provider, val) { - var el = provider.element, - options = el.options, - imax = options.length, - opt, x, i; - for(i = 0; i < imax; i++){ - opt = options[i]; - x = opt.getAttribute('value'); - if (x == null) - x = opt.getAttribute('name'); - - /* jshint eqeqeq: false */ - if (x == val) { - /* jshint eqeqeq: true */ - el.selectedIndex = i; - return; - } - } - log_warn('Value is not an option', val); - } - }, - SELECT_MULT: { - get: function(provider) { - return coll_map(provider.element.selectedOptions, function(x){ - return x.value; - }); - }, - set: function(provider, mix) { - coll_each(provider.element.options, function(el){ - el.selected = false; - }); - if (mix == null) { - return; - } - var arr = is_ArrayLike(mix) ? mix : [ mix ]; - coll_each(arr, function(val){ - var els = provider.element.options, - imax = els.length, - i = -1; - while (++i < imax) { - /* jshint eqeqeq: false */ - if (els[i].value == val) { - els[i].selected = true; - } - } - log_warn('Value is not an option', val); - }); - } - }, - DATE: { - domWay: { - get: domWay.get, - set: function(prov, val){ - var date = date_ensure(val); - prov.element.value = date == null ? '' : formatDate(date); - } - }, - objectWay: { - get: objectWay.get, - set: DateTimeDelegate.objSet(function(a, b){ - a.setFullYear(b.getFullYear()); - a.setMonth(b.getMonth()); - a.setDate(b.getDate()); - }) - } - }, - TIME: { - domWay: { - get: domWay.get, - set: DateTimeDelegate.domSet(formatTime) - }, - objectWay: { - get: objectWay.get, - set: DateTimeDelegate.objSet(function(a, b){ - a.setHours(b.getHours()) - a.setMinutes(b.getMinutes()); - a.setSeconds(b.getSeconds()); - }) - } - }, - RADIO: { - domWay: { - get: function(provider){ - var el = provider.element; - return el.checked ? el.value : null; - }, - set: function(provider, value){ - var el = provider.element; - el.checked = el.value === value; - } - }, - } - - }; - - function isValidFn_(obj, prop, name) { - if (obj== null || typeof obj[prop] !== 'function') { - log_error('BindingProvider. Controllers accessor.', name, 'should be a function. Property:', prop); - return false; - } - return true; - } - function getAccessorObject_(provider, accessor) { - var ctr = provider.ctr.parent; - if (ctr[accessor] != null) - return ctr; - var model = provider.model; - if (model[accessor] != null) - return model; - - log_error('BindingProvider. Accessor `', accessor, '`should be a function'); - return null; - } - function formatDate(date) { - var YYYY = date.getFullYear(), - MM = date.getMonth() + 1, - DD = date.getDate(); - return YYYY - + '-' - + (MM < 10 ? '0' : '') - + (MM) - + '-' - + (DD < 10 ? '0' : '') - + (DD) - ; - } - function formatTime(date) { - var H = date.getHours(), - M = date.getMinutes(); - return H - + ':' - + (M < 10 ? '0' : '') - + (M) - ; - } - }()); - - // end:source DomObjectTransport - // source ValidatorProvider - var ValidatorProvider, - Validators; - (function() { - var class_INVALID = '-validate__invalid'; - - ValidatorProvider = { - getFnFromModel: fn_fromModelWrapp, - getFnByName: fn_byName, - validate: validate, - validateUi: function(fns, val, ctr, el, oncancel) { - var error = validate(fns, val, ctr); - if (error != null) { - ui_notifyInvalid(el, error, oncancel); - return error; - } - ui_clearInvalid(el); - return null; - } - }; - - function validate(fns, val, ctr) { - if (fns == null) { - return null; - } - var imax = fns.length, - i = -1, - error, fn; - while ( ++i < imax ){ - fn = fns[i]; - if (fn == null) { - continue; - } - error = fn(val, ctr); - if (error != null) { - if (is_String(error)) { - return { - message: error, - actual: val - }; - } - if (error.actual == null) { - error.actual = val; - } - return error; - } - } - } - - function fn_fromModel(model, prop) { - if (is_Object(model) === false) { - return null; - } - var Validate = model.Validate; - if (Validate != null) { - var fn = null; - if (is_Function(fn = Validate)) { - return fn; - } - if (is_Function(fn = Validate[prop])) { - return fn; - } - } - - var i = prop.indexOf('.'); - if (i !== -1) { - return fn_fromModel( - model[prop.substring(0, i)], prop.substring(i+1) - ); - } - return null; - } - function fn_fromModelWrapp(model, prop) { - var fn = fn_fromModel(model, prop); - if (fn == null) { - return null; - } - return function(){ - var mix = fn.apply(model, arguments), - message, error; - if (mix == null) { - return null; - } - if (is_String(mix)) { - return { - message: mix, - property: prop, - ctx: model - }; - } - mix.property = prop; - mix.ctx = model; - return mix; - }; - } - - function fn_byName(name, param, message) { - var Delegate = Validators[name]; - if (Delegate == null) { - log_error('Invalid validator', name, 'Supports:', Object.keys(Validators)); - return null; - } - var fn = Delegate(param); - return function(val, ctr){ - var mix = fn(val, ctr); - if (mix == null || mix === true) { - return null; - } - if (mix === false) { - return message || ('Check failed: `' + name + '`'); - } - if (is_String(mix) && mix.length !== 0) { - return mix; - } - return null; - }; - } - - function ui_notifyInvalid(el, error, oncancel) { - - var message = error.message || error; - var next = domLib(el).next('.' + class_INVALID); - if (next.length === 0) { - next = domLib('
    ') - .addClass(class_INVALID) - .html('') - .insertAfter(el); - } - - return next - .children('button') - .off() - .on('click', function() { - next.hide(); - oncancel && oncancel(); - - }) - .end() - .children('span').text(message) - .end() - .show(); - } - - function ui_clearInvalid(el) { - return domLib(el).next('.' + class_INVALID).hide(); - } - - Validators = { - match: function (match) { - return function (str){ - return new RegExp(match).test(str); - }; - }, - unmatch: function (unmatch) { - return function (str){ - return !(new RegExp(unmatch).test(str)); - }; - }, - minLength: function (min) { - return function (str){ - return str.length >= parseInt(min, 10); - }; - }, - maxLength: function (max) { - return function (str){ - return str.length <= parseInt(max, 10); - }; - }, - check: function (condition, node){ - return function (str){ - return expression_eval('x' + condition, node.model, {x: str}, node); - }; - } - }; - }()); - // end:source ValidatorProvider - // source BindingProvider - var CustomProviders, - BindingProvider; - (function() { - CustomProviders = {}; - - BindingProvider = class_create({ - validations: null, - constructor: function BindingProvider(model, element, ctr, bindingType) { - if (bindingType == null) { - bindingType = 'dual'; - - var name = ctr.compoName; - if (name === ':bind' || name === 'bind') { - bindingType = 'single'; - } - } - - var attr = ctr.attr, - type; - - this.node = ctr; // backwards compat. - this.ctr = ctr; - this.ctx = null; - - this.model = model; - this.element = element; - this.value = attr.value; - this.property = attr.property; - this.domSetter = attr.setter || attr['dom-setter']; - this.domGetter = attr.getter || attr['dom-getter']; - this.objSetter = attr['obj-setter']; - this.objGetter = attr['obj-getter']; - - /* Convert to an instance, e.g. Number, on domchange event */ - this['typeof'] = attr['typeof'] || null; - - this.dismiss = 0; - this.bindingType = bindingType; - this.log = false; - this.signal_domChanged = null; - this.signal_objectChanged = null; - this.locked = false; - - - if (this.property == null && this.domGetter == null) { - - switch (element.tagName) { - case 'INPUT': - type = element.getAttribute('type'); - if ('checkbox' === type) { - this.property = 'element.checked'; - break; - } - else if ('date' === type) { - var x = DomObjectTransport.DATE; - this.domWay = x.domWay; - this.objectWay = x.objectWay; - } - else if ('number' === type) { - this['typeof'] = 'Number'; - } - else if ('radio' === type) { - var x = DomObjectTransport.RADIO; - this.domWay = x.domWay; - break; - } - - this.property = 'element.value'; - break; - case 'TEXTAREA': - this.property = 'element.value'; - break; - case 'SELECT': - this.domWay = element.multiple - ? DomObjectTransport.SELECT_MULT - : DomObjectTransport.SELECT; - break; - default: - this.property = 'element.innerHTML'; - break; - } - } - - if (attr['log']) { - this.log = true; - if (attr.log !== 'log') { - this.logExpression = attr.log; - } - } - - // Send signal on OBJECT or DOM change - if (attr['x-signal']) { - var signal = signal_parse(attr['x-signal'], null, 'dom')[0], - signalType = signal && signal.type; - - switch(signalType){ - case 'dom': - case 'object': - this['signal_' + signalType + 'Changed'] = signal.signal; - break; - default: - log_error('Signal typs is not supported', signal); - break; - } - } - - // Send PIPED signal on OBJECT or DOM change - if (attr['x-pipe-signal']) { - var signal = signal_parse(attr['x-pipe-signal'], true, 'dom')[0], - signalType = signal && signal.type; - - switch(signalType){ - case 'dom': - case 'object': - this['pipe_' + signalType + 'Changed'] = signal; - break; - default: - log_error('Pipe type is not supported'); - break; - } - } - - var domSlot = attr['dom-slot']; - if (domSlot != null) { - this.slots = {}; - // @hack - place dualb. provider on the way of a signal - // - var parent = ctr.parent, - newparent = parent.parent; - - parent.parent = this; - this.parent = newparent; - this.slots[domSlot] = function(sender, value){ - this.domChanged(sender, value); - }; - } - - /* - * @obsolete: attr name : 'x-pipe-slot' - */ - var pipeSlot = attr['object-pipe-slot'] || attr['x-pipe-slot']; - if (pipeSlot) { - var str = pipeSlot, - index = str.indexOf('.'), - pipeName = str.substring(0, index), - signal = str.substring(index + 1); - - this.pipes = {}; - this.pipes[pipeName] = {}; - this.pipes[pipeName][signal] = function(){ - this.objectChanged(); - }; - - __Compo.pipe.addController(this); - } - - - if (attr.expression) { - this.expression = attr.expression; - if (this.value == null && bindingType !== 'single') { - var refs = expression_varRefs(this.expression); - if (typeof refs === 'string') { - this.value = refs; - } else { - log_warn('Please set value attribute in DualBind Control.'); - } - } - return; - } - - this.expression = this.value; - }, - dispose: function() { - expression_unbind(this.expression, this.model, this.ctr, this.binder); - }, - objectChanged: function(x) { - if (this.dismiss-- > 0) { - return; - } - if (this.locked === true) { - log_warn('Concurance change detected', this); - return; - } - this.locked = true; - - if (x == null) { - x = this.objectWay.get(this, this.expression); - } - - this.domWay.set(this, x); - - if (this.log) { - console.log('[BindingProvider] objectChanged -', x); - } - if (this.signal_objectChanged) { - signal_emitOut(this.ctr, this.signal_objectChanged, [x]); - } - if (this.pipe_objectChanged) { - var pipe = this.pipe_objectChanged; - __Compo.pipe(pipe.pipe).emit(pipe.signal); - } - - this.locked = false; - }, - domChanged: function(event, value) { - if (this.locked === true) { - log_warn('Concurance change detected', this); - return; - } - this.locked = true; - - if (value == null) - value = this.domWay.get(this); - - var typeof_ = this['typeof']; - if (typeof_ != null) { - var Converter = window[typeof_]; - value = Converter(value); - } - - var error = this.validate(value); - if (error == null) { - this.dismiss = 1; - var obj = this.model; - var prop = this.value; - if (prop.charCodeAt(0) === 36 /*$*/) { - var i = prop.indexOf('.'); - if (i !== -1) { - var key = prop.substring(0, i); - if (key === '$scope') { - prop = prop.substring(i + 1); - obj = compo_getScopeFor(this.ctr.parent, prop); - } - } - } - - this.objectWay.set(obj, prop, value, this); - this.dismiss = 0; - - if (this.log) { - console.log('[BindingProvider] domChanged -', value); - } - if (this.signal_domChanged != null) { - signal_emitOut(this.ctr, this.signal_domChanged, [value]); - } - if (this.pipe_domChanged != null) { - var pipe = this.pipe_domChanged; - __Compo.pipe(pipe.pipe).emit(pipe.signal); - } - } - this.locked = false; - }, - addValidation: function(mix){ - if (this.validations == null) { - this.validations = []; - } - if (is_Array(mix)) { - this.validations = this.validations.concat(mix); - return; - } - this.validations.push(mix); - }, - validate: function (val) { - var fns = this.validations, - ctr = this.ctr, - el = this.element - ; - if (fns == null || fns.length === 0) { - return null; - } - var val_ = arguments.length !== 0 - ? val - : this.domWay.get(this); - - return ValidatorProvider.validateUi( - fns, val_, ctr, el, this.objectChanged.bind(this) - ); - }, - objectWay: DomObjectTransport.objectWay, - domWay: DomObjectTransport.domWay, - }); - - - obj_extend(BindingProvider, { - create: function (model, el, ctr, bindingType) { - - /* Initialize custom provider */ - var type = ctr.attr.bindingProvider, - CustomProvider = type == null ? null : CustomProviders[type], - provider; - - if (typeof CustomProvider === 'function') { - return new CustomProvider(model, el, ctr, bindingType); - } - - provider = new BindingProvider(model, el, ctr, bindingType); - - if (CustomProvider != null) { - obj_extend(provider, CustomProvider); - } - return provider; - }, - - bind: function (provider){ - return apply_bind(provider); - } - }); - - function apply_bind(provider) { - - var expr = provider.expression, - model = provider.model, - onObjChanged = provider.objectChanged = provider.objectChanged.bind(provider); - - provider.binder = expression_createBinder(expr, model, provider.ctx, provider.ctr, onObjChanged); - - expression_bind(expr, model, provider.ctx, provider.ctr, provider.binder); - - if (provider.bindingType === 'dual') { - var attr = provider.ctr.attr; - - if (!attr['change-slot'] && !attr['change-pipe-event']) { - var element = provider.element, - /* - * @obsolete: attr name : 'changeEvent' - */ - eventType = attr['change-event'] || attr.changeEvent || 'change', - onDomChange = provider.domChanged.bind(provider); - - __dom_addEventListener(element, eventType, onDomChange); - } - - - if (!provider.objectWay.get(provider, provider.expression)) { - // object has no value, so check the dom - setTimeout(function(){ - if (provider.domWay.get(provider)) - // and apply when exists - provider.domChanged(); - }); - return provider; - } - } - - // trigger update - provider.objectChanged(); - return provider; - } - - function signal_emitOut(ctr, signal, args) { - if (ctr == null) - return; - - var slots = ctr.slots; - if (slots != null && typeof slots[signal] === 'function') { - if (slots[signal].apply(ctr, args) === false) - return; - } - - signal_emitOut(ctr.parent, signal, args); - } - - - obj_extend(BindingProvider, { - addObserver: obj_addObserver, - removeObserver: obj_removeObserver - }); - }()); - - // end:source BindingProvider - - // source handlers/ - // source visible - /** - * visible handler. Used to bind directly to display:X/none - * - * attr = - * check - expression to evaluate - * bind - listen for a property change - */ - - function VisibleHandler() {} - - __registerHandler(':visible', VisibleHandler); - - - VisibleHandler.prototype = { - constructor: VisibleHandler, - - refresh: function(model, container) { - container.style.display = expression_eval(this.attr.check, model) ? '' : 'none'; - }, - renderStart: function(model, cntx, container) { - this.refresh(model, container); - - if (this.attr.bind) { - obj_addObserver(model, this.attr.bind, this.refresh.bind(this, model, container)); - } - } - }; - - // end:source visible - // source validate - var ValidationCompo; - (function() { - var class_INVALID = '-validate-invalid'; - - ValidationCompo = class_create({ - attr: null, - element: null, - validators: null, - - constructor: function(){ - this.validators = []; - }, - renderStart: function(model, ctx, container) { - this.element = container; - - var prop = this.attr.value; - if (prop) { - var fn = ValidatorProvider.getFnFromModel(model, prop); - if (fn != null) { - this.validators.push(fn); - } - } - }, - /** - * @param input - {control specific} - value to validate - * @param element - {HTMLElement} - (optional, @default this.element) - - * Invalid message is schown(inserted into DOM) after this element - * @param oncancel - {Function} - Callback function for canceling - * invalid notification - */ - validate: function(val, el, oncancel) { - var element = el == null ? this.element : el, - value = val; - if (arguments.length === 0) { - value = obj_getProperty(this.model, this.attr.value); - } - if (this.validators.length === 0) { - this.initValidators(); - } - var fns = this.validators, - type = this.attr.silent ? 'validate' : 'validateUi' - ; - - return ValidatorProvider[type]( - fns, value, this, element, oncancel - ); - }, - initValidators: function() { - var attr = this.attr, - message = this.attr.message, - isDefault = message == null - - if (isDefault) { - message = 'Invalid value of `' + this.attr.value + '`'; - } - for (var key in attr) { - switch (key) { - case 'message': - case 'value': - case 'getter': - case 'silent': - continue; - } - if (key in Validators === false) { - log_error('Unknown Validator:', key, this); - continue; - } - var str = isDefault ? (message + ' Validation: `' + key + '`') : message - var fn = ValidatorProvider.getFnByName(key, attr[key], str); - if (fn != null) { - this.validators.push(fn); - } - } - } - }); - - __registerHandler(':validate', ValidationCompo); - - __registerHandler(':validate:message', Compo({ - template: 'div.' + class_INVALID + ' { span > "~[bind:message]" button > "~[cancel]" }', - - onRenderStart: function(model){ - if (typeof model === 'string') { - model = { - message: model - }; - } - - if (!model.cancel) { - model.cancel = 'cancel'; - } - - this.model = model; - }, - compos: { - button: '$: button', - }, - show: function(message, oncancel){ - var that = this; - - this.model.message = message; - this.compos.button.off().on(function(){ - that.hide(); - oncancel && oncancel(); - - }); - - this.$.show(); - }, - hide: function(){ - this.$.hide(); - } - })); - - }()); - - // end:source validate - // source validate_group - function ValidateGroup() {} - - __registerHandler(':validate:group', ValidateGroup); - - - ValidateGroup.prototype = { - constructor: ValidateGroup, - validate: function() { - var validations = getValidations(this); - - - for (var i = 0, x, length = validations.length; i < length; i++) { - x = validations[i]; - if (!x.validate()) { - return false; - } - } - return true; - } - }; - - function getValidations(component, out){ - if (out == null){ - out = []; - } - - if (component.components == null){ - return out; - } - var compos = component.components; - for(var i = 0, x, length = compos.length; i < length; i++){ - x = compos[i]; - - if (x.compoName === 'validate'){ - out.push(x); - continue; - } - - getValidations(x); - } - return out; - } - - // end:source validate_group - - - - // if BROWSER - // source bind - /** - * Mask Custom Tag Handler - * attr = - * attr: {String} - attribute name to bind - * prop: {Stirng} - property name to bind - * - : {default} - innerHTML - */ - - - - (function() { - - function Bind() {} - - __registerHandler(':bind', Bind); - __registerHandler( 'bind', Bind); - - Bind.prototype = { - constructor: Bind, - renderEnd: function(els, model, cntx, container){ - - this.provider = BindingProvider.create(model, container, this, 'single'); - - BindingProvider.bind(this.provider); - }, - dispose: function(){ - if (this.provider && typeof this.provider.dispose === 'function') { - this.provider.dispose(); - } - } - }; - - - }()); - - // end:source bind - // source dualbind - /** - * Mask Custom Handler - * - * 2 Way Data Model binding - * - * - * attr = - * value: {string} - property path in object - * ?property : {default} 'element.value' - value to get/set from/to HTMLElement - * ?changeEvent: {default} 'change' - listen to this event for HTMLELement changes - * - * ?setter: {string} - setter function of a parent controller - * ?getter: {string} - getter function of a parent controller - * - * - */ - - var DualbindCompo = class_create({ - - renderEnd: function(elements, model, ctx, container) { - this.provider = BindingProvider.create(model, container, this); - - var compos = this.components; - if (compos != null) { - var imax = compos.length, - i = -1, x; - while ( ++i < imax ){ - x = compos[i]; - if (x.compoName === ':validate') { - this.provider.addValidation(x.validations); - } - } - } - - - if (this.attr['no-validation'] == null) { - var fn = ValidatorProvider.getFnFromModel(model, this.provider.value); - if (fn != null) { - this.provider.addValidation(fn); - } - } - BindingProvider.bind(this.provider); - }, - dispose: function() { - var dispose = this.provider && this.provider.dispose; - if (dispose != null) { - dispose.call(this.provider); - } - }, - - validate: function(){ - return this.provider && this.provider.validate(); - }, - - handlers: { - attr: { - 'x-signal': function() {} - } - } - }); - - __registerHandler(':dualbind', DualbindCompo); - __registerHandler( 'dualbind', DualbindCompo); - // end:source dualbind - // endif - // end:source handlers/ - // source utilities/ - // source bind - /** - * Mask Custom Utility - for use in textContent and attribute values - */ - (function(){ - - function attr_strReplace(attrValue, currentValue, newValue) { - if (!attrValue) - return newValue; - - if (currentValue == null || currentValue === '') - return attrValue + ' ' + newValue; - - return attrValue.replace(currentValue, newValue); - } - - function refresherDelegate_NODE(element){ - return function(value) { - element.textContent = value; - }; - } - function refresherDelegate_ATTR(element, attrName, currentValue) { - return function(value){ - var currentAttr = element.getAttribute(attrName), - attr = attr_strReplace(currentAttr, currentValue, value); - - element.setAttribute(attrName, attr); - currentValue = value; - }; - } - function refresherDelegate_PROP(element, attrName, currentValue) { - return function(value){ - switch(typeof element[attrName]) { - case 'boolean': - currentValue = element[attrName] = !!value; - return; - case 'number': - currentValue = element[attrName] = Number(value); - return; - case 'string': - currentValue = element[attrName] = attr_strReplace(element[attrName], currentValue, value); - return; - default: - log_warn('Unsupported elements property type', attrName); - return; - } - }; - } - - function create_refresher(type, expr, element, currentValue, attrName) { - if ('node' === type) { - return refresherDelegate_NODE(element); - } - if ('attr' === type) { - switch(attrName) { - case 'value': - case 'disabled': - case 'checked': - case 'selected': - case 'selectedIndex': - return refresherDelegate_PROP(element, attrName, currentValue); - } - return refresherDelegate_ATTR(element, attrName, currentValue); - } - throw Error('Unexpected binder type: ' + type); - } - - - function bind (current, expr, model, ctx, element, controller, attrName, type){ - var refresher = create_refresher(type, expr, element, current, attrName), - binder = expression_createBinder(expr, model, ctx, controller, refresher); - - expression_bind(expr, model, ctx, controller, binder); - - - compo_attachDisposer(controller, function(){ - expression_unbind(expr, model, controller, binder); - }); - } - - __registerUtil('bind', { - mode: 'partial', - current: null, - element: null, - nodeRenderStart: function(expr, model, ctx, element, controller){ - - var current = expression_eval(expr, model, ctx, controller); - - // though we apply value's to `this` context, but it is only for immediat use - // in .node() function, as `this` context is a static object that share all bind - // utils - this.element = document.createTextNode(current); - - return (this.current = current); - }, - node: function(expr, model, ctx, container, ctr){ - var el = this.element, - val = this.current; - bind( - val - , expr - , model - , ctx - , el - , ctr - , null - , 'node' - ); - this.element = null; - this.current = null; - return el; - }, - - attrRenderStart: function(expr, model, ctx, element, controller){ - return (this.current = expression_eval(expr, model, ctx, controller)); - }, - attr: function(expr, model, ctx, element, controller, attrName){ - bind( - this.current, - expr, - model, - ctx, - element, - controller, - attrName, - 'attr'); - - return this.current; - } - }); - - }()); - - // end:source bind - // end:source utilities/ - // source attributes/ - // source xxVisible - - - __registerAttr('xx-visible', function(node, attrValue, model, cntx, element, controller) { - - var binder = expression_createBinder(attrValue, model, cntx, controller, function(value){ - element.style.display = value ? '' : 'none'; - }); - - expression_bind(attrValue, model, cntx, controller, binder); - - compo_attachDisposer(controller, function(){ - expression_unbind(attrValue, model, controller, binder); - }); - - - - if (!expression_eval(attrValue, model, cntx, controller)) { - - element.style.display = 'none'; - } - }); - // end:source xxVisible - // source xToggle - /** - * Toggle value with ternary operator on an event. - * - * button x-toggle='click: foo === "bar" ? "zet" : "bar" > 'Toggle' - */ - - __registerAttr('x-toggle', 'client', function(node, attrValue, model, ctx, element, controller){ - - - var event = attrValue.substring(0, attrValue.indexOf(':')), - expression = attrValue.substring(event.length + 1), - ref = expression_varRefs(expression); - - if (typeof ref !== 'string') { - // assume is an array - ref = ref[0]; - } - - __dom_addEventListener(element, event, function(){ - var value = expression_eval(expression, model, ctx, controller); - - obj_setProperty(model, ref, value); - }); - }); - - // end:source xToggle - // source xClassToggle - /** - * Toggle Class Name - * - * button x-toggle='click: selected' - */ - - __registerAttr('x-class-toggle', 'client', function(node, attrVal, model, ctx, element){ - - var event = attrVal.substring(0, attrVal.indexOf(':')), - klass = attrVal.substring(event.length + 1).trim(); - - - __dom_addEventListener(element, event, function(){ - domLib(element).toggleClass(klass); - }); - }); - - // end:source xClassToggle - // end:source attributes/ - // source statements/ - (function(){ - var custom_Statements = mask.getStatement(); - - // source 1.utils.js - var _getNodes, - _renderElements, - _renderPlaceholder, - _compo_initAndBind, - - els_toggle - - ; - - (function(){ - - _getNodes = function(name, node, model, ctx, controller){ - return custom_Statements[name].getNodes(node, model, ctx, controller); - }; - - _renderElements = function(nodes, model, ctx, container, ctr){ - if (nodes == null) - return null; - - var elements = []; - builder_build(nodes, model, ctx, container, ctr, elements); - return elements; - }; - - _renderPlaceholder = function(staticCompo, compo, container){ - var placeholder = staticCompo.placeholder; - if (placeholder == null) { - placeholder = document.createComment(''); - container.appendChild(placeholder); - } - compo.placeholder = placeholder; - }; - - _compo_initAndBind = function(compo, node, model, ctx, container, controller) { - - compo.parent = controller; - compo.model = model; - - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createBinder( - compo.expr || compo.expression, - model, - ctx, - controller, - compo.refresh - ); - - - expression_bind(compo.expr || compo.expression, model, ctx, controller, compo.binder); - }; - - - els_toggle = function(els, state){ - if (els == null) - return; - - var isArray = typeof els.splice === 'function', - imax = isArray ? els.length : 1, - i = -1, - x; - while ( ++i < imax ){ - x = isArray ? els[i] : els; - x.style.display = state ? '' : 'none'; - } - } - - }()); - // end:source 1.utils.js - // source 2.if.js - (function(){ - - __registerHandler('+if', { - placeholder: null, - meta: { - serializeNodes: true - }, - render: function(model, ctx, container, ctr, children){ - - var node = this, - nodes = _getNodes('if', node, model, ctx, ctr), - index = 0; - - var next = node; - while(true){ - - if (next.nodes === nodes) - break; - - index++; - next = node.nextSibling; - - if (next == null || next.tagName !== 'else') { - index = null; - break; - } - } - - this.attr['switch-index'] = index; - - return _renderElements(nodes, model, ctx, container, ctr, children); - }, - - renderEnd: function(els, model, ctx, container, ctr){ - - var compo = new IFStatement(), - index = this.attr['switch-index']; - - _renderPlaceholder(this, compo, container); - - return initialize( - compo - , this - , index - , els - , model - , ctx - , container - , ctr - ); - }, - - serializeNodes: function(current){ - - var nodes = [ current ]; - while (true) { - current = current.nextSibling; - if (current == null || current.tagName !== 'else') - break; - - nodes.push(current); - } - - return mask.stringify(nodes); - } - - }); - - - function IFStatement() {} - - IFStatement.prototype = { - compoName: '+if', - ctx : null, - model : null, - controller : null, - - index : null, - Switch : null, - binder : null, - - refresh: function() { - var compo = this, - switch_ = compo.Switch, - - imax = switch_.length, - i = -1, - expr, - item, index = 0; - - var currentIndex = compo.index, - model = compo.model, - ctx = compo.ctx, - ctr = compo.controller - ; - - while ( ++i < imax ){ - expr = switch_[i].node.expression; - if (expr == null) - break; - - if (expression_eval(expr, model, ctx, ctr)) - break; - } - - if (currentIndex === i) - return; - - if (currentIndex != null) - els_toggle(switch_[currentIndex].elements, false); - - if (i === imax) { - compo.index = null; - return; - } - - this.index = i; - - var current = switch_[i]; - if (current.elements != null) { - els_toggle(current.elements, true); - return; - } - - var frag = mask.render(current.node.nodes, model, ctx, null, ctr); - var els = frag.nodeType === Node.DOCUMENT_FRAGMENT_NODE - ? _Array_slice.call(frag.childNodes) - : frag - ; - - - dom_insertBefore(frag, compo.placeholder); - - current.elements = els; - - }, - dispose: function(){ - var switch_ = this.Switch, - imax = switch_.length, - i = -1, - - x, expr; - - while( ++i < imax ){ - x = switch_[i]; - expr = x.node.expression; - - if (expr) { - expression_unbind( - expr, - this.model, - this.controller, - this.binder - ); - } - - x.node = null; - x.elements = null; - } - - this.controller = null; - this.model = null; - this.ctx = null; - } - }; - - function initialize(compo, node, index, elements, model, ctx, container, ctr) { - - compo.model = model; - compo.ctx = ctx; - compo.controller = ctr; - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createListener(compo.refresh); - compo.index = index; - compo.Switch = [{ - node: node, - elements: null - }]; - - expression_bind(node.expression, model, ctx, ctr, compo.binder); - - while (true) { - node = node.nextSibling; - if (node == null || node.tagName !== 'else') - break; - - compo.Switch.push({ - node: node, - elements: null - }); - - if (node.expression) - expression_bind(node.expression, model, ctx, ctr, compo.binder); - } - if (index != null) { - compo.Switch[index].elements = elements; - } - return compo; - } - - - }()); - // end:source 2.if.js - // source 3.switch.js - (function(){ - - var $Switch = custom_Statements['switch'], - attr_SWITCH = 'switch-index' - ; - - var _nodes, - _index; - - __registerHandler('+switch', { - meta: { - serializeNodes: true - }, - serializeNodes: function(current){ - return mask.stringify(current); - }, - render: function(model, ctx, container, ctr, children){ - - var value = expression_eval(this.expression, model, ctx, ctr); - - - resolveNodes(value, this.nodes, model, ctx, ctr); - - if (_nodes == null) - return null; - - this.attr[attr_SWITCH] = _index; - - return _renderElements(_nodes, model, ctx, container, ctr, children); - }, - - renderEnd: function(els, model, ctx, container, ctr){ - - var compo = new SwitchStatement(), - index = this.attr[attr_SWITCH]; - - _renderPlaceholder(this, compo, container); - - return initialize( - compo - , this - , index - , els - , model - , ctx - , container - , ctr - ); - } - }); - - - function SwitchStatement() {} - - SwitchStatement.prototype = { - compoName: '+switch', - ctx: null, - model: null, - controller: null, - - index: null, - nodes: null, - Switch: null, - binder: null, - - - refresh: function(value) { - - var compo = this, - switch_ = compo.Switch, - - imax = switch_.length, - i = -1, - expr, - item, index = 0; - - var currentIndex = compo.index, - model = compo.model, - ctx = compo.ctx, - ctr = compo.controller - ; - - resolveNodes(value, compo.nodes, model, ctx, ctr); - - if (_index === currentIndex) - return; - - if (currentIndex != null) - els_toggle(switch_[currentIndex], false); - - if (_index == null) { - compo.index = null; - return; - } - - this.index = _index; - - var elements = switch_[_index]; - if (elements != null) { - els_toggle(elements, true); - return; - } - - var frag = mask.render(_nodes, model, ctx, null, ctr); - var els = frag.nodeType === Node.DOCUMENT_FRAGMENT_NODE - ? _Array_slice.call(frag.childNodes) - : frag - ; - - - dom_insertBefore(frag, compo.placeholder); - - switch_[_index] = els; - - }, - dispose: function(){ - expression_unbind( - this.expr, - this.model, - this.controller, - this.binder - ); - - this.controller = null; - this.model = null; - this.ctx = null; - - var switch_ = this.Switch, - key, - els, i, imax - ; - - for(key in switch_) { - els = switch_[key]; - - if (els == null) - continue; - - imax = els.length; - i = -1; - while ( ++i < imax ){ - if (els[i].parentNode != null) - els[i].parentNode.removeChild(els[i]); - } - } - } - }; - - function resolveNodes(val, nodes, model, ctx, ctr) { - - _nodes = $Switch.getNodes(val, nodes, model, ctx, ctr); - _index = null; - - if (_nodes == null) - return; - - var imax = nodes.length, - i = -1; - while( ++i < imax ){ - if (nodes[i].nodes === _nodes) - break; - } - - _index = i === imax ? null : i; - } - - function initialize(compo, node, index, elements, model, ctx, container, ctr) { - - compo.ctx = ctx; - compo.expr = node.expression; - compo.model = model; - compo.controller = ctr; - compo.index = index; - compo.nodes = node.nodes; - - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createBinder( - compo.expr, - model, - ctx, - ctr, - compo.refresh - ); - - - compo.Switch = new Array(node.nodes.length); - - if (index != null) { - compo.Switch[index] = elements; - } - expression_bind(node.expression, model, ctx, ctr, compo.binder); - - return compo; - } - - - }()); - // end:source 3.switch.js - // source 4.with.js - (function(){ - - var $With = custom_Statements['with']; - - __registerHandler('+with', { - meta: { - serializeNodes: true - }, - rootModel: null, - render: function(model, ctx, container, ctr){ - var expr = this.expression, - nodes = this.nodes, - val = expression_eval_strict( - expr, model, ctx, ctr - ) - ; - this.rootModel = model; - return build(nodes, val, ctx, container, ctr); - }, - - onRenderStartClient: function(model, ctx){ - this.rootModel = model; - this.model = expression_eval_strict( - this.expression, model, ctx, this - ); - }, - - renderEnd: function(els, model, ctx, container, ctr){ - model = this.rootModel || model; - - var compo = new WithStatement(this); - - compo.elements = els; - compo.model = model; - compo.parent = ctr; - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createBinder( - compo.expr, - model, - ctx, - ctr, - compo.refresh - ); - - expression_bind(compo.expr, model, ctx, ctr, compo.binder); - - _renderPlaceholder(this, compo, container); - return compo; - } - }); - - - function WithStatement(node){ - this.expr = node.expression; - this.nodes = node.nodes; - } - - WithStatement.prototype = { - compoName: '+with', - elements: null, - binder: null, - model: null, - parent: null, - refresh: function(val){ - dom_removeAll(this.elements); - - if (this.components) { - var imax = this.components.length, - i = -1; - while ( ++i < imax ){ - Compo.dispose(this.components[i]); - } - this.components.length = 0; - } - - - var fragment = document.createDocumentFragment(); - this.elements = build(this.nodes, val, null, fragment, this); - - dom_insertBefore(fragment, this.placeholder); - compo_inserted(this); - }, - - - dispose: function(){ - expression_unbind( - this.expr, - this.model, - this.parent, - this.binder - ); - - this.parent = null; - this.model = null; - this.ctx = null; - } - - }; - - function build(nodes, model, ctx, container, controller){ - var els = []; - builder_build(nodes, model, ctx, container, controller, els); - return els; - } - }()); - // end:source 4.with.js - // source 5.visible.js - (function(){ - var $Visible = custom_Statements['visible']; - - __registerHandler('+visible', { - meta: { - serializeNodes: true - }, - render: function(model, ctx, container, ctr, childs){ - return build(this.nodes, model, ctx, container, ctr); - }, - renderEnd: function(els, model, ctx, container, ctr){ - - var compo = new VisibleStatement(this); - compo.elements = els; - compo.model = model; - compo.parent = ctr; - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createBinder( - compo.expr, - model, - ctx, - ctr, - compo.refresh - ); - - expression_bind(compo.expr, model, ctx, ctr, compo.binder); - compo.refresh(); - return compo; - } - }); - - - function VisibleStatement(node){ - this.expr = node.expression; - this.nodes = node.nodes; - } - - VisibleStatement.prototype = { - compoName: '+visible', - elements: null, - binder: null, - model: null, - parent: null, - refresh: function(){ - var isVisible = expression_eval( - this.expr, this.model, this.ctx, this - ); - $Visible.toggle(this.elements, isVisible); - }, - dispose: function(){ - expression_unbind( - this.expr, - this.model, - this.parent, - this.binder - ); - - this.parent = null; - this.model = null; - this.ctx = null; - } - - }; - - function build(nodes, model, ctx, container, ctr){ - var els = []; - builder_build(nodes, model, ctx, container, ctr, els); - return els; - } - }()); - // end:source 5.visible.js - // source loop/exports.js - (function(){ - - // source utils.js - - - function arr_createRefs(array){ - var imax = array.length, - i = -1, - x; - while ( ++i < imax ){ - //create references from values to distinguish the models - x = array[i]; - switch (typeof x) { - case 'string': - case 'number': - case 'boolean': - array[i] = Object(x); - break; - } - } - } - - - function list_sort(self, array) { - - var compos = self.node.components, - i = 0, - imax = compos.length, - j = 0, - jmax = null, - element = null, - compo = null, - fragment = document.createDocumentFragment(), - sorted = []; - - for (; i < imax; i++) { - compo = compos[i]; - if (compo.elements == null || compo.elements.length === 0) - continue; - - for (j = 0, jmax = compo.elements.length; j < jmax; j++) { - element = compo.elements[j]; - element.parentNode.removeChild(element); - } - } - - - outer: for (j = 0, jmax = array.length; j < jmax; j++) { - - for (i = 0; i < imax; i++) { - if (array[j] === self._getModel(compos[i])) { - sorted[j] = compos[i]; - continue outer; - } - } - - console.warn('No Model Found for', array[j]); - } - - - - for (i = 0, imax = sorted.length; i < imax; i++) { - compo = sorted[i]; - - if (compo.elements == null || compo.elements.length === 0) { - continue; - } - - - for (j = 0, jmax = compo.elements.length; j < jmax; j++) { - element = compo.elements[j]; - - fragment.appendChild(element); - } - } - - self.components = self.node.components = sorted; - - dom_insertBefore(fragment, self.placeholder); - - } - - function list_update(self, deleteIndex, deleteCount, insertIndex, rangeModel) { - - var node = self.node, - compos = node.components - ; - if (compos == null) - compos = node.components = [] - - var prop1 = self.prop1, - prop2 = self.prop2, - type = self.type, - - ctx = self.ctx, - ctr = self.node - ; - - if (deleteIndex != null && deleteCount != null) { - var i = deleteIndex, - length = deleteIndex + deleteCount; - - if (length > compos.length) - length = compos.length; - - for (; i < length; i++) { - if (compo_dispose(compos[i], node)){ - i--; - length--; - } - } - } - - if (insertIndex != null && rangeModel && rangeModel.length) { - - var i = compos.length, - imax, - fragment = self._build(node, rangeModel, ctx, ctr), - new_ = compos.splice(i) - ; - compo_fragmentInsert(node, insertIndex, fragment, self.placeholder); - - compos.splice.apply(compos, [insertIndex, 0].concat(new_)); - i = 0; - imax = new_.length; - for(; i < imax; i++){ - __Compo.signal.emitIn(new_[i], 'domInsert'); - } - } - } - - function list_remove(self, removed){ - var compos = self.components, - i = compos.length, - x; - while(--i > -1){ - x = compos[i]; - - if (removed.indexOf(x.model) === -1) - continue; - - compo_dispose(x, self.node); - } - } - - - // end:source utils.js - // source proto.js - var LoopStatementProto = { - model: null, - parent: null, - refresh: function(value, method, args, result){ - var i = 0, - x, imax; - - var node = this.node, - - model = this.model, - ctx = this.ctx, - ctr = this.node - ; - - if (method == null) { - // this was new array/object setter and not an immutable function call - - var compos = node.components; - if (compos != null) { - var imax = compos.length, - i = -1; - while ( ++i < imax ){ - if (compo_dispose(compos[i], node)){ - i--; - imax--; - } - } - compos.length = 0; - } - - var frag = this._build(node, value, ctx, ctr); - - dom_insertBefore(frag, this.placeholder); - arr_each(node.components, compo_inserted); - return; - } - - var array = value; - arr_createRefs(value); - - - switch (method) { - case 'push': - list_update(this, null, null, array.length - 1, array.slice(array.length - 1)); - break; - case 'pop': - list_update(this, array.length, 1); - break; - case 'unshift': - list_update(this, null, null, 0, array.slice(0, 1)); - break; - case 'shift': - list_update(this, 0, 1); - break; - case 'splice': - var sliceStart = args[0], - sliceRemove = args.length === 1 ? this.components.length : args[1], - sliceAdded = args.length > 2 ? array.slice(args[0], args.length - 2 + args[0]) : null; - - list_update(this, sliceStart, sliceRemove, sliceStart, sliceAdded); - break; - case 'sort': - case 'reverse': - list_sort(this, array); - break; - case 'remove': - if (result != null && result.length) - list_remove(this, result); - break; - } - }, - - dispose: function(){ - - expression_unbind( - this.expr || this.expression, this.model, this.parent, this.binder - ); - } - }; - - // end:source proto.js - // source for.js - (function(){ - - var For = custom_Statements['for'], - - attr_PROP_1 = 'for-prop-1', - attr_PROP_2 = 'for-prop-2', - attr_TYPE = 'for-type', - attr_EXPR = 'for-expr' - ; - - - __registerHandler('+for', { - meta: { - serializeNodes: true - }, - serializeNodes: function(node){ - return mask.stringify(node); - }, - render: function(model, ctx, container, ctr, children){ - var directive = For.parseFor(this.expression), - attr = this.attr; - - attr[attr_PROP_1] = directive[0]; - attr[attr_PROP_2] = directive[1]; - attr[attr_TYPE] = directive[2]; - attr[attr_EXPR] = directive[3]; - - var value = expression_eval_strict(directive[3], model, ctx, ctr); - if (value == null) - return; - - if (is_Array(value)) - arr_createRefs(value); - - For.build( - value, - directive, - this.nodes, - model, - ctx, - container, - this, - children - ); - }, - - renderEnd: function(els, model, ctx, container, ctr){ - - var compo = new ForStatement(this, this.attr); - _renderPlaceholder(this, compo, container); - _compo_initAndBind(compo, this, model, ctx, container, ctr); - return compo; - }, - - getHandler: function(name, model){ - - return For.getHandler(name, model); - } - - }); - - function initialize(compo, node, els, model, ctx, container, ctr) { - - compo.parent = ctr; - compo.model = model; - - compo.refresh = fn_proxy(compo.refresh, compo); - compo.binder = expression_createBinder( - compo.expr, - model, - ctx, - ctr, - compo.refresh - ); - - - expression_bind(compo.expr, model, ctx, ctr, compo.binder); - - } - - function ForStatement(node, attr) { - this.prop1 = attr[attr_PROP_1]; - this.prop2 = attr[attr_PROP_2]; - this.type = attr[attr_TYPE]; - this.expr = attr[attr_EXPR]; - - if (node.components == null) - node.components = []; - - this.node = node; - this.components = node.components; - } - - ForStatement.prototype = { - compoName: '+for', - model: null, - parent: null, - - refresh: LoopStatementProto.refresh, - dispose: LoopStatementProto.dispose, - - _getModel: function(compo) { - return compo.scope[this.prop1]; - }, - - _build: function(node, model, ctx, component) { - var nodes = For.getNodes(node.nodes, model, this.prop1, this.prop2, this.type); - - return builder_build(nodes, this.model, ctx, null, component); - } - }; - - }()); - // end:source for.js - // source each.js - (function(){ - - var Each = custom_Statements['each']; - var EachBinded = { - meta: { - serializeNodes: true - }, - serializeNodes: function(node){ - return mask.stringify(node); - }, - //modelRef: null, - render: function(model, ctx, container, ctr, children){ - //this.modelRef = this.expression; - var array = expression_eval(this.expression, model, ctx, ctr); - if (array == null) - return; - - arr_createRefs(array); - - build( - this.nodes, - array, - ctx, - container, - this, - children - ); - }, - - renderEnd: function(els, model, ctx, container, ctr){ - var compo = new EachStatement(this, this.attr); - - _renderPlaceholder(this, compo, container); - _compo_initAndBind(compo, this, model, ctx, container, ctr); - return compo; - } - - }; - - var EachItem = class_create({ - compoName: 'each::item', - scope: null, - model: null, - modelRef: null, - parent: null, - - // if BROWSER - renderStart: null, - // endif - renderEnd: function(els) { - this.elements = els; - }, - dispose: function(){ - if (this.elements != null) { - this.elements.length = 0; - this.elements = null; - } - } - }); - - var EachStatement = class_create({ - constructor: function EachStatement(node, attr) { - this.expression = node.expression; - this.nodes = node.nodes; - - if (node.components == null) - node.components = []; - - this.node = node; - this.components = node.components; - }, - compoName: '+each', - refresh: LoopStatementProto.refresh, - dispose: LoopStatementProto.dispose, - - _getModel: function(compo) { - return compo.model; - }, - - _build: function(node, model, ctx, component) { - var fragment = document.createDocumentFragment(); - - build(node.nodes, model, ctx, fragment, component); - - return fragment; - } - }); - - // METHODS - - function build(nodes, array, ctx, container, ctr, elements) { - var imax = array.length, - nodes_ = new Array(imax), - i = 0, node; - - for(; i < imax; i++) { - node = createEachNode(nodes, i); - builder_build(node, array[i], ctx, container, ctr, elements); - } - } - - function createEachNode(nodes, index){ - var item = new EachItem; - item.scope = { index: index }; - - return { - type: Dom.COMPONENT, - tagName: 'each::item', - nodes: nodes, - controller: function() { - return item; - } - }; - } - - // EXPORTS - - __registerHandler('each::item', EachItem); - __registerHandler('+each', EachBinded); - }()); - // end:source each.js - - }()); - - // end:source loop/exports.js - - }()); - // end:source statements/ - - // source exports - obj_extend(mask, { - Validators: Validators, - registerValidator: function(type, fn) { - Validators[type] = fn; - }, - BindingProviders: CustomProviders, - registerBinding: function(name, Prov) { - CustomProviders[name] = Prov; - } - }); - - // end:source exports - - // source api/utils - obj_extend(mask.obj, { - addObserver : obj_addObserver, - removeObserver: obj_removeObserver, - }); - // end:source api/utils - - }(Mask, Compo)); - - // end:source /ref-mask-binding/lib/binding_embed - - // source handlers/ - // source debug - (function(){ - custom_Statements['log'] = { - render: function(node, model, ctx, container, controller){ - var arr = expression_evalStatements(node.expression, model, ctx, controller); - arr.unshift('Mask::Log'); - console.log.apply(console, arr); - } - }; - customTag_register('debugger', { - render: function(model, ctx, container, compo){ - debugger; - } - }); - customTag_register(':utest', Compo({ - render: function (model, ctx, container) { - if (container.nodeType === Node.DOCUMENT_FRAGMENT_NODE) - container = container.childNodes; - this.$ = $(container); - } - })); - }()); - // end:source debug - // source define - custom_Tags['define'] = class_create({ - meta: { - serializeNodes: true - }, - constructor: function(node, model, ctx, el, ctr) { - Define.registerGlobal(node, model, ctr); - }, - render: fn_doNothing - }); - - custom_Tags['let'] = class_create({ - meta: { - serializeNodes: true - }, - constructor: function(node, model, ctx, el, ctr) { - Define.registerScoped(node, model, ctr); - }, - render: fn_doNothing - }); - // end:source define - // source html - (function() { - var Compo = { - meta: { - mode: 'server:all' - }, - render: function(model, ctx, container) { - this.html = jmask(this.nodes).text(model, ctx, this); - - if (container.insertAdjacentHTML) { - container.insertAdjacentHTML('beforeend', this.html); - return; - } - if (container.ownerDocument) { - var div = document.createElement('div'), - child; - div.innerHTML = this.html; - child = div.firstChild; - while (child != null) { - container.appendChild(child); - child = child.nextSibling; - } - } - }, - toHtml: function(){ - return this.html || ''; - }, - html: null - }; - customTag_register(':html', Compo); - }()); - - // end:source html - // source methods - (function() { - var Method = class_create({ - meta: { - serializeNodes: true - }, - constructor: function(node) { - this.fn = node.fn; // || compileFn(node.args, node.body); - this.name = node.name; - } - }); - - custom_Tags['slot'] = class_create(Method, { - renderEnd: function(){ - var ctr = this.parent; - var slots = ctr.slots; - if (slots == null) { - slots = ctr.slots = {}; - } - slots[this.name] = this.fn; - } - }); - custom_Tags['event'] = class_create(Method, { - renderEnd: function(els, model, ctx, el){ - this.fn = this.fn.bind(this.parent); - var name = this.name, - params = null, - i = name.indexOf(':'); - if (i !== -1) { - params = name.substring(i + 1).trim(); - name = name.substring(0, i).trim(); - } - Compo.Dom.addEventListener(el, name, this.fn, params); - } - }); - custom_Tags['function'] = class_create(Method, { - renderEnd: function(){ - this.parent[this.name] = this.fn; - } - }); - }()); - // end:source methods - // source template - (function(){ - var templates_ = {}, - helper_ = { - get: function(id){ - return templates_[id] - }, - resolve: function(node, id){ - var nodes = templates_[id]; - if (nodes != null) - return nodes; - - var selector = ':template[id=' + id +']', - parent = node.parent, - tmpl = null - ; - while (parent != null) { - tmpl = jmask(parent.nodes) - .filter(selector) - .get(0); - - if (tmpl != null) - return tmpl.nodes; - - parent = parent.parent; - } - log_warn('Template was not found', id); - return null; - }, - register: function(id, nodes){ - if (id == null) { - log_warn('`:template` must define the `id` attr'); - return; - } - templates_[id] = nodes; - } - }; - - Mask.templates = helper_; - customTag_register(':template', { - render: function() { - helper_.register(this.attr.id, this.nodes); - } - }); - - customTag_register(':import', { - renderStart: function() { - var id = this.attr.id; - if (id == null) { - log_error('`:import` shoud reference the template via id attr') - return; - } - this.nodes = helper_.resolve(this, id); - } - }); - - custom_Statements['include'] = { - render: function (node, model, ctx, container, ctr, els) { - var name = attr_first(node.attr); - var Compo = customTag_get(name, ctr); - var template; - - if (Compo != null) { - template = Compo.prototype.template || Compo.prototype.nodes; - if (template != null) { - template = mask_merge(template, node.nodes); - } - } - else { - template = helper_.get(name); - } - if (template != null) { - builder_build(template, model, ctx, container, ctr, els); - } - } - }; - - customTag_register('layout:master', { - render: function () { - var name = this.attr.id || attr_first(this.attr); - helper_.register(name, this.nodes); - } - }); - - customTag_register('layout:view', { - render: function (model, ctx, container, ctr, els) { - var nodes = helper_.get(this.attr.master); - var template = mask_merge(nodes, this.nodes, null, { extending: true }); - builder_build(template, model, ctx, container, ctr, els); - } - }); - - }()); - // end:source template - // source var - (function(){ - // TODO: refactor methods, use MaskNode Serialization instead Model Serialization - custom_Tags['var'] = class_create(customTag_Base, { - renderStart: function(model, ctx){ - set(this, this.attr, true, model, ctx); - }, - onRenderStartClient: function(){ - set(this, this.model, false) - } - }); - - function set(self, source, doEval, attr, model, ctx) { - // set data also to model, so that it will be serialized in NodeJS - self.model = {}; - - var parent = self.parent; - var scope = parent.scope; - if (scope == null) { - scope = parent.scope = {}; - } - for(var key in source){ - self.model[key] = scope[key] = doEval === false - ? source[key] - : expression_eval(source[key], model, ctx, parent); - } - } - }()); - // end:source var - // end:source handlers/ - -// source umd-footer - Mask.Compo = Compo; - Mask.jmask = jmask; - - Mask.version = '0.51.37'; - - //> make fast properties - custom_optimize(); - - return (exports.mask = Mask); -})); -// end:source umd-footer diff --git a/examples/atmajs/node_modules/ruta/lib/ruta.js b/examples/atmajs/node_modules/ruta/lib/ruta.js deleted file mode 100644 index d91ced4d92..0000000000 --- a/examples/atmajs/node_modules/ruta/lib/ruta.js +++ /dev/null @@ -1,1144 +0,0 @@ -(function(root, factory){ - "use strict"; - - if (root == null) { - root = typeof window !== 'undefined' && typeof document !== 'undefined' - ? window - : global; - } - - - root.ruta = factory(root); - -}(this, function(global){ - "use strict"; - - // source ../src/vars.js - - var mask = global.mask || (typeof Mask !== 'undefined' ? Mask : null); - - // settings - - /** define if routes like '/path' are strict by default, - * or set explicit '!/path' - strict, '^/path' - not strict - * - * Strict means - like in regex start-end /^$/ - * */ - var _cfg_isStrict = true, - _Array_slice = Array.prototype.slice; - // end:source ../src/vars.js - - // source ../src/utils/obj.js - var obj_extend, - obj_create; - (function(){ - - obj_extend = function(a, b){ - if (b == null) - return a || {}; - - if (a == null) - return obj_create(b); - - for(var key in b){ - a[key] = b[key]; - } - return a; - }; - - obj_create = Object.create || function(x) { - var Ctor = function(){}; - Ctor.prototype = x; - return new Ctor; - }; - - }()); - // end:source ../src/utils/obj.js - // source ../src/utils/log.js - var log_error; - (function(){ - - log_error = function(){ - var args = _Array_slice.call(arguments); - - console.error.apply(console, ['Ruta'].concat(args)); - }; - - }()); - // end:source ../src/utils/log.js - // source ../src/utils/path.js - var path_normalize, - path_split, - path_join, - path_fromCLI, - path_getQuery, - path_setQuery - ; - - (function(){ - - - path_normalize = function(str) { - - var length = str.length, - i = 0, - j = length - 1; - - for(; i < length; i++) { - if (str[i] === '/') - continue; - - break; - } - for (; j > i; j--) { - if (str[j] === '/') - continue; - - break; - } - - return str.substring(i, j + 1); - }; - - path_split = function(path) { - path = path_normalize(path); - - return path === '' - ? [] - : path.split('/'); - }; - - path_join = function(pathParts) { - return '/' + pathParts.join('/'); - }; - - path_fromCLI = function(commands){ - - if (typeof commands === 'string') - commands = cli_split(commands); - - var parts = cli_parseArguments(commands); - - return parts_serialize(parts); - }; - - path_getQuery = function(path){ - var i = path.indexOf('?'); - if (i === -1) - return null; - - var query = path.substring(i + 1); - return query_deserialize(query, '&'); - }; - - path_setQuery = function(path, mix){ - var query = typeof mix !== 'string' - ? query_serialize(mix, '&') - : mix; - - var i = path.indexOf('?'); - if (i !== -1) { - path = path.substring(0, i); - } - return path + '?' + query; - }; - - // == private - - function cli_split(string){ - var args = string.trim().split(/\s+/); - - var imax = args.length, - i = -1, - c, arg; - - while ( ++i < imax ){ - - arg = args[i]; - if (arg.length === 0) - continue; - - c = arg[0]; - - if (c !== '"' && c !== "'") - continue; - - - var start = i; - for( ; i < imax; i++ ){ - - arg = args[i]; - if (arg[arg.length - 1] === c) { - - var str = args - .splice(start, i - start + 1) - .join(' ') - .slice(1, -1) - ; - - args.splice(start, 0, str); - imax = args.length; - break; - } - } - } - - return args; - } - - function cli_parseArguments(argv){ - var imax = argv.length, - i = 0, - params = {}, - args = [], - key, val, x; - - for (; i < imax; i++){ - x = argv[i]; - - if (x[0] === '-') { - - key = x.replace(/^[\-]+/, ''); - - if (i < imax - 1 && argv[i + 1][0] !== '-') { - val = argv[i + 1]; - i++; - } else { - val = true; - } - - params[key] = val; - continue; - } - - args.push(x); - } - - return { - path: args, - query: params - }; - } - - }()); - - // end:source ../src/utils/path.js - // source ../src/utils/query.js - var query_deserialize, - query_serialize - ; - - (function(){ - - query_deserialize = function(query, delimiter) { - if (delimiter == null) - delimiter = '&'; - - var obj = {}, - parts = query.split(delimiter), - i = 0, - imax = parts.length, - x, val; - - for (; i < imax; i++) { - x = parts[i].split('='); - val = x[1] == null - ? '' - : decode(x[1]) - ; - obj_setProperty(obj, x[0], val); - } - return obj; - }; - query_serialize = function(params, delimiter) { - if (delimiter == null) - delimiter = '&'; - - var query = '', - key, val; - for(key in params) { - val = params[key]; - if (val == null) - continue; - - // serialize as flag - if (typeof val === 'boolean') - val = null; - - query = query + (query ? delimiter : '') + key; - if (val != null) - query += '=' + encode(val); - } - - return query; - }; - - // = private - - function obj_setProperty(obj, property, value) { - var chain = property.split('.'), - imax = chain.length, - i = -1, - key; - - while ( ++i < imax - 1) { - key = chain[i]; - - if (obj[key] == null) - obj[key] = {}; - - obj = obj[key]; - } - - obj[chain[i]] = value; - } - function decode(str) { - try { - return decodeURIComponent(str); - } catch(error) { - log_error('decode:URI malformed'); - return ''; - } - } - function encode(str) { - try { - return encodeURIComponent(str); - } catch(error) { - log_error('encode:URI malformed'); - return ''; - } - } - }()); - - - // end:source ../src/utils/query.js - // source ../src/utils/rgx.js - var rgx_fromString, - - // Url part should be completely matched, so add ^...$ and create RegExp - rgx_aliasMatcher, - - // :debugger(d|debug) => { alias: 'debugger', matcher: RegExp } - rgx_parsePartWithRegExpAlias - ; - - (function(){ - - - rgx_fromString = function(str, flags) { - return new RegExp(str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), flags); - }; - - rgx_aliasMatcher = function(str){ - - if (str[0] === '^') - return new RegExp(str); - - var groups = str.split('|'); - for (var i = 0, imax = groups.length; i < imax; i++){ - groups[i] = '^' + groups[i] + '$'; - } - - return new RegExp(groups.join('|')); - }; - - rgx_parsePartWithRegExpAlias = function(str){ - var pStart = str.indexOf('('), - pEnd = str.lastIndexOf(')') - ; - - if (pStart === -1 || pEnd === -1) { - log_error('Expected alias part with regexp', str); - return null; - } - - var rgx = str.substring(pStart + 1, pEnd); - return { - alias: str.substring(1, pStart), - matcher: rgx_aliasMatcher(rgx) - }; - }; - - }()); - - // end:source ../src/utils/rgx.js - // source ../src/utils/parts.js - - /** - * '/foo/bar?a=b' => - * { path: ['foo', 'bar'], query: { a: 'b' } } - */ - - var parts_serialize, - parts_deserialize - ; - - (function(){ - - - parts_serialize = function(parts){ - var path = path_join(parts.path); - - if (parts.query == null) - return path; - - return path - + '?' - + query_serialize(parts.query, '&') - ; - }; - - parts_deserialize = function(url){ - var query = url.indexOf('?'), - path = query === -1 - ? url - : url.substring(0, query); - - - return { - path: path_split(path), - query: query === -1 - ? null - : query_deserialize(url.substring(query + 1), '&') - }; - }; - - - }()); - - // end:source ../src/utils/parts.js - - // source ../src/route/Collection.js - var Routes = (function(){ - - // source Route.js - - // source parse.js - var route_parseDefinition, // out route, definition - - // path should be already matched by the route - route_parsePath // route, path - ; - - (function(){ - - - route_parseDefinition = function(route, definition) { - - var c = definition.charCodeAt(0); - switch(c){ - case 33: - // ! - route.strict = true; - definition = definition.substring(1); - break; - case 94: - // ^ - route.strict = false; - definition = definition.substring(1); - break; - case 40: - // ( - var start = 1, - end = definition.length - 1 - ; - if (definition.charCodeAt(definition.length - 1) !== 41) { - // ) - log_error('parser - expect group closing'); - end ++; - } - - route.match = new RegExp(definition.substring(start, end)); - return; - } - - - - var parts = definition.split('/'), - search, - searchIndex, - i = 0, - imax = parts.length, - x, - c0, - index, - c1; - - - var last = parts[imax - 1]; - searchIndex = last.indexOf('?'); - if (searchIndex > (imax === 1 ? -1 : 0)) { - // `?` cannt be at `0` position, when has url definition contains `path` - search = last.substring(searchIndex + 1); - parts[imax - 1] = last.substring(0, searchIndex); - } - - var matcher = '', - alias = null, - strictCount = 0; - - var gettingMatcher = true, - isOptional, - isAlias, - rgx; - - var array = route.path = []; - - for (; i < imax; i++) { - x = parts[i]; - - if (x === '') - continue; - - - c0 = x.charCodeAt(0); - c1 = x.charCodeAt(1); - - isOptional = c0 === 63; /* ? */ - isAlias = (isOptional ? c1 : c0) === 58; /* : */ - index = 0; - - if (isOptional) - index++; - - if (isAlias) - index++; - - - if (index !== 0) - x = x.substring(index); - - - // if DEBUG - if (!isOptional && !gettingMatcher) - log_error('Strict part found after optional', definition); - // endif - - - if (isOptional) - gettingMatcher = false; - - var bracketIndex = x.indexOf('('); - if (isAlias && bracketIndex !== -1) { - var end = x.length - 1; - if (x[end] !== ')') - end+= 1; - - rgx = new RegExp(rgx_aliasMatcher(x.substring(bracketIndex + 1, end))); - x = x.substring(0, bracketIndex); - } - - if (!isOptional && !isAlias) { - array.push(x); - continue; - } - - if (isAlias) { - array.push({ - alias: x, - matcher: rgx, - optional: isOptional - }); - } - - } - - if (search) { - var query = route.query = {}; - - parts = search.split('&'); - - i = -1; - imax = parts.length; - - var key, value, str, eqIndex; - while(++i < imax){ - str = parts[i]; - - eqIndex = str.indexOf('='); - if (eqIndex === -1) { - query[str] = ''; // - continue; - } - - key = str.substring(0, eqIndex); - value = str.substring(eqIndex + 1); - - if (value.charCodeAt(0) === 40) { - // ( - value = new RegExp(rgx_aliasMatcher(value)); - } - - query[key] = value; - } - - if (route.path.length === 0) { - route.strict = false; - } - } - }; - - - route_parsePath = function(route, path) { - - var queryIndex = path.indexOf('?'), - - query = queryIndex === -1 - ? null - : path.substring(queryIndex + 1), - - current = { - path: path, - params: query == null - ? {} - : query_deserialize(query, '&') - }; - - if (route.query) { - // ensura aliased queries, like ?:debugger(d|debug) - for (var key in route.query){ - - if (key[0] === '?') - key = key.substring(1); - - if (key[0] === ':') { - var alias = rgx_parsePartWithRegExpAlias(key), - name = alias.alias; - - current.params[name] = getAliasedValue(current.params, alias.matcher); - } - } - } - - if (queryIndex !== -1) { - path = path.substring(0, queryIndex); - } - - if (route.path != null) { - - var pathArr = path_split(path), - routePath = route.path, - routeLength = routePath.length, - - imax = pathArr.length, - i = 0, - part, - x; - - for (; i < imax; i++) { - part = pathArr[i]; - x = i < routeLength ? routePath[i] : null; - - if (x) { - - if (typeof x === 'string') - continue; - - if (x.alias) { - current.params[x.alias] = part; - continue; - } - } - } - } - - return current; - }; - - - // = private - - function getAliasedValue(obj, matcher) { - for (var key in obj){ - if (matcher.test(key)) - return obj[key]; - } - } - }()); - // end:source parse.js - // source match.js - var route_match, - route_isMatch - ; - - (function(){ - - route_match = function(url, routes, currentMethod){ - - var parts = parts_deserialize(url); - - - for (var i = 0, route, imax = routes.length; i < imax; i++){ - route = routes[i]; - - if (route_isMatch(parts, route, currentMethod)) { - - route.current = route_parsePath(route, url); - return route; - } - } - - return null; - }; - - route_isMatch = function(parts, route, currentMethod) { - - if (currentMethod != null && - route.method != null && - route.method !== currentMethod) { - return false; - } - - if (route.match) { - - return route.match.test( - typeof parts === 'string' - ? parts - : parts_serialize(parts) - ); - } - - - if (typeof parts === 'string') - parts = parts_deserialize(parts); - - // route defines some query, match these with the current path{parts} - if (route.query) { - var query = parts.query, - key, value; - if (query == null) - return false; - - for(key in route.query){ - value = route.query[key]; - - - var c = key[0]; - if (c === ':') { - // '?:isGlob(g|glob) will match if any is present - var alias = rgx_parsePartWithRegExpAlias(key); - if (alias == null || hasKey(query, alias.matcher) === false) - return false; - - continue; - } - - if (c === '?') - continue; - - - if (typeof value === 'string') { - - if (query[key] == null) - return false; - - if (value && query[key] !== value) - return false; - - continue; - } - - if (value.test && !value.test(query[key])) - return false; - } - } - - - var routePath = route.path, - routeLength = routePath.length; - - - if (routeLength === 0) { - if (route.strict) - return parts.path.length === 0; - - return true; - } - - - - for (var i = 0, x, imax = parts.path.length; i < imax; i++){ - - x = routePath[i]; - - if (i >= routeLength) - return route.strict !== true; - - if (typeof x === 'string') { - if (parts.path[i] === x) - continue; - - return false; - } - - if (x.matcher && x.matcher.test(parts.path[i]) === false) { - return false; - } - - if (x.optional) - return true; - - if (x.alias) - continue; - - return false; - } - - if (i < routeLength) - return routePath[i].optional === true; - - - return true; - }; - - - function hasKey(obj, rgx){ - - for(var key in obj){ - if (rgx.test(key)) - return true; - } - return false; - } - - }()); - - // end:source match.js - - var regexp_var = '([^\\\\]+)'; - - function Route(definition, value) { - - this.method = definition.charCodeAt(0) === 36 - ? definition.substring(1, definition.indexOf(' ')).toUpperCase() - : null - ; - - if (this.method != null) { - definition = definition.substring( this.method.length + 2 ); - } - - this.strict = _cfg_isStrict; - this.value = value; - this.definition = definition; - - route_parseDefinition(this, definition); - } - - Route.prototype = { - path: null, - query: null, - value: null, - current: null - }; - - // end:source Route.js - - - function RouteCollection() { - this.routes = []; - } - - RouteCollection.prototype = { - add: function(regpath, value){ - this.routes.push(new Route(regpath, value)); - return this; - }, - - get: function(path, currentMethod){ - - return route_match(path, this.routes, currentMethod); - }, - - clear: function(){ - this.routes.length = 0; - return this; - } - }; - - RouteCollection.parse = function(definition, path){ - var route = {}; - - route_parseDefinition(route, definition); - return route_parsePath(route, path); - }; - - return RouteCollection; - }()); - // end:source ../src/route/Collection.js - - // source ../src/emit/Location.js - - var Location = (function(){ - - if (typeof window === 'undefined') { - return function(){}; - } - - // source Hash.js - function HashEmitter(listener) { - if (typeof window === 'undefined' || 'onhashchange' in window === false) - return null; - - this.listener = listener; - - var that = this; - window.onhashchange = function() { - that.changed(location.hash); - }; - return this; - } - - (function() { - - function hash_normalize(hash) { - return hash.replace(/^[!#/]+/, '/'); - } - - HashEmitter.prototype = { - navigate: function(hash) { - if (hash == null) { - this.changed(location.hash); - return; - } - - location.hash = hash; - }, - changed: function(hash) { - this - .listener - .changed(hash_normalize(hash)); - - }, - current: function() { - return hash_normalize(location.hash); - } - }; - - }()); - // end:source Hash.js - // source History.js - function HistoryEmitter(listener){ - if (typeof window === 'undefined') - return null; - - if (!(window.history && window.history.pushState)) - return null; - - var that = this; - that.listener = listener; - that.initial = location.pathname; - - window.onpopstate = function(){ - if (that.initial === location.pathname) { - that.initial = null; - return; - } - that.changed(); - }; - - return that; - } - - HistoryEmitter.prototype = { - navigate: function(url, opts){ - if (url == null) { - this.changed(); - return; - } - - if (opts != null && opts.extend === true) { - var query = path_getQuery(url), - current = path_getQuery(location.search); - - if (current != null && query != null) { - for (var key in current) { - // strict compare - if (query[key] !== void 0 && query[key] === null) { - delete current[key]; - } - } - query = obj_extend(current, query); - url = path_setQuery(url, query); - } - } - - - history.pushState({}, null, url); - this.initial = null; - this.changed(); - }, - changed: function(){ - this.listener.changed(location.pathname + location.search); - }, - current: function(){ - return location.pathname + location.search; - } - }; - - // end:source History.js - - function Location(collection, type) { - - this.collection = collection || new Routes(); - - if (type) { - var Constructor = type === 'hash' - ? HashEmitter - : HistoryEmitter - ; - this.emitter = new Constructor(this); - } - - if (this.emitter == null) - this.emitter = new HistoryEmitter(this); - - if (this.emitter == null) - this.emitter = new HashEmitter(this); - - if (this.emitter == null) - log_error('Router can not be initialized - (nor HistoryAPI / nor hashchange'); - } - - Location.prototype = { - - changed: function(path){ - var item = this.collection.get(path); - - if (item) - this.action(item); - - }, - action: function(route){ - if (typeof route.value === 'function') { - var current = route.current; - route.value(route, current && current.params); - } - }, - navigate: function(url, opts){ - this.emitter.navigate(url, opts); - }, - current: function(){ - return this.collection.get( - this.currentPath() - ); - }, - currentPath: function(){ - return this.emitter.current(); - } - }; - - return Location; - }()); - // end:source ../src/emit/Location.js - - // source ../src/api/utils.js - var ApiUtils = { - /* - * Format URI path from CLI command: - * some action -foo bar === /some/action?foo=bar - */ - pathFromCLI: path_fromCLI, - - query: { - serialize: query_serialize, - deserialize: query_deserialize, - get: function(path_){ - var path = path_ == null - ? location.search - : path_; - return path_getQuery(path); - } - } - }; - // end:source ../src/api/utils.js - // source ../src/ruta.js - var routes = new Routes(), - router; - - function router_ensure() { - if (router == null) - router = new Location(routes); - - return router; - } - - var Ruta = { - - Collection: Routes, - - setRouterType: function(type){ - if (router == null) - router = new Location(routes, type); - return this; - }, - - setStrictBehaviour: function(isStrict){ - _cfg_isStrict = isStrict; - return this; - }, - - add: function(regpath, mix){ - router_ensure(); - routes.add(regpath, mix); - return this; - }, - - get: function(path){ - return routes.get(path); - }, - navigate: function(mix, opts){ - var path = mix; - if (mix != null && typeof mix === 'object') { - path = '?' + query_serialize(mix, '&'); - } - router_ensure().navigate(path, opts); - return this; - }, - current: function(){ - return router_ensure().current(); - }, - currentPath: function(){ - return router_ensure().currentPath(); - }, - - notifyCurrent: function(){ - router_ensure().navigate(); - return this; - }, - - parse: Routes.parse, - - /* - * @deprecated - use `_` instead - */ - $utils: ApiUtils, - _ : ApiUtils, - }; - - - - // end:source ../src/ruta.js - - // source ../src/mask/attr/anchor-dynamic.js - (function() { - if (mask == null) { - return; - } - - mask.registerAttrHandler('x-dynamic', function(node, value, model, ctx, tag){ - tag.onclick = navigate; - }, 'client'); - - function navigate(event) { - event.preventDefault(); - event.stopPropagation(); - - Ruta.navigate(this.href); - } - }()); - - // end:source ../src/mask/attr/anchor-dynamic.js - - return Ruta; -})); \ No newline at end of file diff --git a/examples/atmajs/node_modules/todomvc-app-css/index.css b/examples/atmajs/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/atmajs/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/atmajs/node_modules/todomvc-app-css/package.json b/examples/atmajs/node_modules/todomvc-app-css/package.json deleted file mode 100644 index 203457cfec..0000000000 --- a/examples/atmajs/node_modules/todomvc-app-css/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "todomvc-app-css@^2.0.0", - "_id": "todomvc-app-css@2.1.0", - "_inBundle": false, - "_integrity": "sha1-tvJxbTOa+i5feZNH0qSLBTliQqU=", - "_location": "/todomvc-app-css", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "todomvc-app-css@^2.0.0", - "name": "todomvc-app-css", - "escapedName": "todomvc-app-css", - "rawSpec": "^2.0.0", - "saveSpec": null, - "fetchSpec": "^2.0.0" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/todomvc-app-css/-/todomvc-app-css-2.1.0.tgz", - "_shasum": "b6f2716d339afa2e5f799347d2a48b05396242a5", - "_spec": "todomvc-app-css@^2.0.0", - "_where": "/private/tmp/todomvc/examples/atmajs", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/tastejs/todomvc-app-css/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "CSS for TodoMVC apps", - "files": [ - "index.css" - ], - "homepage": "https://github.com/tastejs/todomvc-app-css#readme", - "keywords": [ - "todomvc", - "tastejs", - "app", - "todo", - "template", - "css", - "style", - "stylesheet" - ], - "license": "CC-BY-4.0", - "name": "todomvc-app-css", - "repository": { - "type": "git", - "url": "git+https://github.com/tastejs/todomvc-app-css.git" - }, - "style": "index.css", - "version": "2.1.0" -} diff --git a/examples/atmajs/node_modules/todomvc-app-css/readme.md b/examples/atmajs/node_modules/todomvc-app-css/readme.md deleted file mode 100644 index 6ddbebf024..0000000000 --- a/examples/atmajs/node_modules/todomvc-app-css/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# todomvc-app-css - -> CSS for TodoMVC apps - -![](screenshot.png) - - -## Install - - -``` -$ npm install --save todomvc-app-css -``` - - -## Getting started - -```html - -``` - -See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template). - - - -## License - -Creative Commons License
    This work by Sindre Sorhus is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/examples/atmajs/node_modules/todomvc-common/base.css b/examples/atmajs/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/atmajs/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/atmajs/node_modules/todomvc-common/base.js b/examples/atmajs/node_modules/todomvc-common/base.js deleted file mode 100644 index 3c6723f390..0000000000 --- a/examples/atmajs/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,249 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-31081062-1', 'auto'); - ga('send', 'pageview'); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length; - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/atmajs/package.json b/examples/atmajs/package.json deleted file mode 100644 index e5239447ec..0000000000 --- a/examples/atmajs/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "private": true, - "dependencies": { - "atma-class": "^1.1.69", - "includejs": "^0.9.14", - "maskjs": "^0.52.0", - "ruta": "^0.1.16", - "todomvc-app-css": "^2.0.1", - "todomvc-common": "^1.0.2" - } -} diff --git a/examples/atmajs/readme.md b/examples/atmajs/readme.md deleted file mode 100644 index bb15864399..0000000000 --- a/examples/atmajs/readme.md +++ /dev/null @@ -1,124 +0,0 @@ -# Atma.js TodoMVC Example - -> Fast, elegant and component oriented framework for desktops, mobiles or servers _(Node.js)_ -> _[Atma - atmajs.com](http://atmajs.com)_ - -The framework consists of several stand-alone libraries. This approach not only reduces barriers to entry, but also -allows developers to exclude or replace any library with other third party one. - -The goal of the framework is to deliver the component-based development and to provide libraries for making their composition easily and with blazing fast performance _(even on mobile CPUs)_. - -## Learning Atma.js - -#### ClassJS -[web-page](http://atmajs.com/class) [GitHub](http://github.com/atmajs/ClassJS) - -— is a class-model implementation. A business logic layer for applications. It accumulates best practices of the OOP and supports model de-/serialization with the persistence to localStorage, RESTful service or MongoDB. Any additional adapter can be created by the developer. - - -#### MaskJS -[web-page](http://atmajs.com/mask) [GitHub](https://github.com/atmajs/MaskJS) - -— is the core library of the Atma.js framework. It brings HMVC engine into play and everything starts with the markup. Along HTML, more compact and component-oriented syntax can be used, which is similar to LESS and Zen Coding. But not the syntax is the advantage of the mask markup, but the DOM creation approach. Mask or HTML templates are prarsed to the tiny MaskDOM AST. And while traversing the MaskDOM, the builder creates DOM Elements and initializes components. As the MaskDom structure is extremely lightweight, each component can easily manipulate the MaskDOM. So the all dynamic behavior, like interpolation, 1-/2way-binding, component's nesting and many other things, are almost for free in sens of the performance. Beyond fast DOM creation there are other distinguishing features: - -- model agnostic -- components hierarchy - - better referencing via `find/closest` search _in a jQuery way)_ - - better communication via signals and slots. _Piped-signals are used to bind components, that are not in ascendant-descendant relation, but anywhere in an app_ -- one-/two-way bindings with complex object observers, so even if deep, nested path to the property is used, any manipulations with the model preserve observers in place -- modules. Can load: Mask, Html, Javascript, Css, Json -- custom attribute handlers -- designed to be used with other libraries. For example, with small wrappers we can encapsulate twitter bootstrap markups and widgets initializations -- high code reuse - -To mention is, that the templates and the components can be rendered on the server side. - - -#### IncludeJS -[web-page](http://atmajs.com/include) [GitHub](https://github.com/atmajs/IncludeJS) - -— is created to load component's resources and to work in browsers and Node.js the same way. - -Some key points of the library are: - -- no requirements for the module definition, but supports several: CommonJS and `include.exports` -- in-place dependency declaration with nice namespaced routing -- custom loaders. _Already implemented `coffee, less, yml, json`_ -- lazy modules -- better debugging: loads javascript in browsers via `script src='x'` -- for production builder can combine and optimize all resources into single `*.js` and single `*.css`. All the templates are embedded into main `*.html`. _Developing a web page using Atma Node.js application module, builder also creates additionally single js/css/html files per page from the components that are specific to a page_ - - -##### µTest -[GitHub](https://github.com/atmajs/utest) - -— Simplifies unit-test creation and runs them in Node.js or in browser-slave(s) environments. All the Atma.js libraries are tested using the µTest. - -##### DomTest -[GitHub](https://github.com/atmajs/domtest) - -The module is embedded into the µTest library and allows the developer to easily write test suites for the UI using MaskJS syntax. - -##### Ruta -[GitHub](https://github.com/atmajs/Ruta) - -— is not only an url routing via History API or `hashchange`, but it implements a Route-Value Collection for adding/retrieving any object by the route. - -#### Atma.Toolkit -[GitHub](https://github.com/atmajs/Atma.Toolkit) - -— command-line tool, which runs unit tests, builds applications, runs Node.js `bash` scripts, creates static file server with live reload feature, etc. - -### Mask.Animation -[GitHub](https://github.com/atmajs/mask-animation) - -— CSS3 and sprite animations for MaskJS. - - -### Atma.js Server Application -[web-page](http://atmajs.com/atma-server) [GitHub](https://github.com/atmajs/atma-server) - -— a connect middle-ware. All the routes are declared in configuration files, and there are 3 types of endpoints: - -- Handlers -- RESTful services -- Pages - -Pages benefits from component based approach. Each component's controller can define caching settings, so that the component renders only once. Developer can restrict any component for the server side rendering only, so that the controller itself and any sensitive data is not sent to the client. When a component is rendered, then only HTML is sent to the client, _where all bindings and event listeners are attached_. So it is extremely SEO friendly. - -Here are some links you may find helpful: - -- [Get Started](http://atmajs.com/get/github) -- [Mask Markup Live Test](http://atmajs.com/mask-try) -- Mask Syntax Plugins - - [Sublime](https://github.com/tenbits/sublime-mask) - - [Atom](https://github.com/tenbits/package-atom) - -- [Atma.js on GitHub](https://github.com/atmajs) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ - -### Implementation - -The Application is split into components hierarchy, and so the application structure consists of a component and a business logic Layer. Components have the resources (_that are component specific, like styles / templates and other nested components_) in the same or a sub-folder. These makes it easer to _reuse_ them in other applications and makes it easer to develop and test them. Atma.js is not a opinionated, but extremely flexible framework, so that the developer can choose the way he wants to structure the applications architecture. This demo application just demonstrates one possible way. - -### Run - -Open `index.html` as a file in browser or run a static server: - -```bash -# install atma.toolkit -$ npm install atma --global -$ atma server -``` - -navigate to `http://localhost:5777/` - -### Build - -To build the application for release, run `$ atma build --file index.html --output release/`. - - -## Contact -- [team@atmajs.com](mailto:team@atmajs.com) -- [Google Group QA](https://groups.google.com/forum/#!forum/atmajs) diff --git a/examples/chaplin-brunch/.editorconfig b/examples/chaplin-brunch/.editorconfig deleted file mode 100644 index f4eb7985f7..0000000000 --- a/examples/chaplin-brunch/.editorconfig +++ /dev/null @@ -1,6 +0,0 @@ -# editorconfig.org -root = true - -[*.coffee] -indent_style = space -indent_size = 2 diff --git a/examples/chaplin-brunch/.gitignore b/examples/chaplin-brunch/.gitignore deleted file mode 100644 index c56daf338c..0000000000 --- a/examples/chaplin-brunch/.gitignore +++ /dev/null @@ -1,25 +0,0 @@ -node_modules/chaplin/* -!node_modules/chaplin/chaplin.js - -node_modules/exoskeleton/* -!node_modules/exoskeleton/exoskeleton.js - -node_modules/backbone.localstorage/* -!node_modules/backbone.localstorage/backbone.localStorage.js - -node_modules/backbone.nativeview/* -!node_modules/backbone.nativeview/backbone.nativeview.js - -node_modules/todomvc-app-css/* -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common/* -!node_modules/todomvc-common/base.css -!node_modules/todomvc-common/base.js - -node_modules/coffee-script-brunch/* -node_modules/javascript-brunch/* -node_modules/handlebars-brunch/* -node_modules/uglify-js-brunch/* - -tmp/* diff --git a/examples/chaplin-brunch/app/application.coffee b/examples/chaplin-brunch/app/application.coffee deleted file mode 100644 index 70c016009a..0000000000 --- a/examples/chaplin-brunch/app/application.coffee +++ /dev/null @@ -1,21 +0,0 @@ -mediator = require 'mediator' -Todos = require 'models/todos' - -# The application object -module.exports = class Application extends Chaplin.Application - # Set your application name here so the document title is set to - # “Controller title – Site title” (see Layout#adjustTitle) - title: 'Chaplin • TodoMVC' - - # Create additional mediator properties - # ------------------------------------- - initMediator: -> - # Add additional application-specific properties and methods - mediator.todos = new Todos() - # Seal the mediator - super - - start: -> - # If todos are fetched from server, we will need to wait for them. - mediator.todos.fetch() - super diff --git a/examples/chaplin-brunch/app/assets/index.html b/examples/chaplin-brunch/app/assets/index.html deleted file mode 100644 index d5609b7dd7..0000000000 --- a/examples/chaplin-brunch/app/assets/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Chaplin & Brunch • TodoMVC - - - - - - - - - - - - -
    - -
    -
    -
    - - - diff --git a/examples/chaplin-brunch/app/controllers/index-controller.coffee b/examples/chaplin-brunch/app/controllers/index-controller.coffee deleted file mode 100644 index 0bf4ffcb18..0000000000 --- a/examples/chaplin-brunch/app/controllers/index-controller.coffee +++ /dev/null @@ -1,25 +0,0 @@ -HeaderView = require '../views/header-view' -FooterView = require '../views/footer-view' -TodosView = require '../views/todos-view' -mediator = require 'mediator' - -module.exports = class IndexController extends Chaplin.Controller - # The method is executed before any controller actions. - # We compose structure in order for it to be rendered only once. - beforeAction: -> - @reuse 'structure', -> - params = collection: mediator.todos - @header = new HeaderView params - @footer = new FooterView params - - # On each new load, old @view will be disposed and - # new @view will be created. This is idiomatic Chaplin memory management: - # one controller per screen. - list: (params) -> - filterer = params.filterer?.trim() ? 'all' - @publishEvent 'todos:filter', filterer - @view = new TodosView collection: mediator.todos, filterer: (model) -> - switch filterer - when 'completed' then model.get('completed') - when 'active' then not model.get('completed') - else true diff --git a/examples/chaplin-brunch/app/initialize.coffee b/examples/chaplin-brunch/app/initialize.coffee deleted file mode 100644 index f08a80c37f..0000000000 --- a/examples/chaplin-brunch/app/initialize.coffee +++ /dev/null @@ -1,8 +0,0 @@ -Application = require 'application' -routes = require 'routes' - -# Initialize the application on DOM ready event. -document.addEventListener 'DOMContentLoaded', -> - new Application - controllerSuffix: '-controller', pushState: false, routes: routes -, false diff --git a/examples/chaplin-brunch/app/lib/utils.coffee b/examples/chaplin-brunch/app/lib/utils.coffee deleted file mode 100644 index a58de10ae6..0000000000 --- a/examples/chaplin-brunch/app/lib/utils.coffee +++ /dev/null @@ -1,14 +0,0 @@ -# Application-specific utilities -# ------------------------------ - -# Delegate to Chaplin’s utils module. -utils = Chaplin.utils.beget Chaplin.utils - -Backbone.utils.extend utils, - toggle: (elem, visible) -> - elem.style.display = (if visible then '' else 'none') - -# Prevent creating new properties and stuff. -Object.seal? utils - -module.exports = utils diff --git a/examples/chaplin-brunch/app/mediator.coffee b/examples/chaplin-brunch/app/mediator.coffee deleted file mode 100644 index e86d741e3d..0000000000 --- a/examples/chaplin-brunch/app/mediator.coffee +++ /dev/null @@ -1 +0,0 @@ -module.exports = Chaplin.mediator diff --git a/examples/chaplin-brunch/app/models/todo.coffee b/examples/chaplin-brunch/app/models/todo.coffee deleted file mode 100644 index 40fa0d38ed..0000000000 --- a/examples/chaplin-brunch/app/models/todo.coffee +++ /dev/null @@ -1,18 +0,0 @@ -# It is a very good idea to have base Model / Collection -# e.g. Model = require 'models/base/model' -# But in this particular app since we only have one -# model type, we will inherit directly from Chaplin Model. -module.exports = class Todo extends Chaplin.Model - defaults: - title: '' - completed: no - - initialize: -> - super - @set 'created', Date.now() if @isNew() - - toggle: -> - @set completed: not @get('completed') - - isVisible: -> - isCompleted = @get('completed') diff --git a/examples/chaplin-brunch/app/models/todos.coffee b/examples/chaplin-brunch/app/models/todos.coffee deleted file mode 100644 index a59f2e6c07..0000000000 --- a/examples/chaplin-brunch/app/models/todos.coffee +++ /dev/null @@ -1,17 +0,0 @@ -Todo = require 'models/todo' - -module.exports = class Todos extends Chaplin.Collection - model: Todo - localStorage: new Store 'todos-chaplin' - - allAreCompleted: -> - @getCompleted().length is @length - - getCompleted: -> - @where completed: yes - - getActive: -> - @where completed: no - - comparator: (todo) -> - todo.get('created') diff --git a/examples/chaplin-brunch/app/routes.coffee b/examples/chaplin-brunch/app/routes.coffee deleted file mode 100644 index 34fbc6b64c..0000000000 --- a/examples/chaplin-brunch/app/routes.coffee +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = (match) -> - match ':filterer', 'index#list' - match '', 'index#list' diff --git a/examples/chaplin-brunch/app/views/base/collection-view.coffee b/examples/chaplin-brunch/app/views/base/collection-view.coffee deleted file mode 100644 index ecd5faf0ef..0000000000 --- a/examples/chaplin-brunch/app/views/base/collection-view.coffee +++ /dev/null @@ -1,7 +0,0 @@ -View = require 'views/base/view' - -module.exports = class CollectionView extends Chaplin.CollectionView - # This class doesn’t inherit from the application-specific View class, - # so we need to borrow the method from the View prototype: - getTemplateFunction: View::getTemplateFunction - useCssAnimation: true diff --git a/examples/chaplin-brunch/app/views/base/view.coffee b/examples/chaplin-brunch/app/views/base/view.coffee deleted file mode 100644 index b38d99e3ab..0000000000 --- a/examples/chaplin-brunch/app/views/base/view.coffee +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = class View extends Chaplin.View - # Precompiled templates function initializer. - getTemplateFunction: -> - @template diff --git a/examples/chaplin-brunch/app/views/footer-view.coffee b/examples/chaplin-brunch/app/views/footer-view.coffee deleted file mode 100644 index 5c0e9d1bdf..0000000000 --- a/examples/chaplin-brunch/app/views/footer-view.coffee +++ /dev/null @@ -1,39 +0,0 @@ -View = require './base/view' -utils = require 'lib/utils' - -module.exports = class FooterView extends View - autoRender: true - el: '#footer' - events: - 'click #clear-completed': 'clearCompleted' - listen: - 'todos:filter mediator': 'updateFilterer' - 'all collection': 'renderCounter' - template: require './templates/footer' - - render: -> - super - @renderCounter() - - updateFilterer: (filterer) -> - filterer = '' if filterer is 'all' - selector = "[href='#/#{filterer}']" - cls = 'selected' - @findAll('#filters a').forEach (link) => - link.classList.remove cls - link.classList.add cls if Backbone.utils.matchesSelector link, selector - - renderCounter: -> - total = @collection.length - active = @collection.getActive().length - completed = @collection.getCompleted().length - - @find('#todo-count > strong').textContent = active - countDescription = (if active is 1 then 'item' else 'items') - @find('.todo-count-title').textContent = countDescription - - utils.toggle @find('#clear-completed'), completed > 0 - utils.toggle @el, total > 0 - - clearCompleted: -> - @publishEvent 'todos:clear' diff --git a/examples/chaplin-brunch/app/views/header-view.coffee b/examples/chaplin-brunch/app/views/header-view.coffee deleted file mode 100644 index 73cbdc4915..0000000000 --- a/examples/chaplin-brunch/app/views/header-view.coffee +++ /dev/null @@ -1,15 +0,0 @@ -View = require './base/view' - -module.exports = class HeaderView extends View - autoRender: true - el: '#header' - events: - 'keypress #new-todo': 'createOnEnter' - template: require './templates/header' - - createOnEnter: (event) -> - ENTER_KEY = 13 - title = event.delegateTarget.value.trim() - return if event.keyCode isnt ENTER_KEY or not title - @collection.create {title} - @find('#new-todo').value = '' diff --git a/examples/chaplin-brunch/app/views/templates/footer.hbs b/examples/chaplin-brunch/app/views/templates/footer.hbs deleted file mode 100644 index 2869ed1cde..0000000000 --- a/examples/chaplin-brunch/app/views/templates/footer.hbs +++ /dev/null @@ -1,17 +0,0 @@ - - - items - left - - - diff --git a/examples/chaplin-brunch/app/views/templates/header.hbs b/examples/chaplin-brunch/app/views/templates/header.hbs deleted file mode 100644 index 8b235ae18d..0000000000 --- a/examples/chaplin-brunch/app/views/templates/header.hbs +++ /dev/null @@ -1,2 +0,0 @@ -

    todos

    - diff --git a/examples/chaplin-brunch/app/views/templates/todo.hbs b/examples/chaplin-brunch/app/views/templates/todo.hbs deleted file mode 100644 index ffe17da100..0000000000 --- a/examples/chaplin-brunch/app/views/templates/todo.hbs +++ /dev/null @@ -1,6 +0,0 @@ -
    - - - -
    - diff --git a/examples/chaplin-brunch/app/views/templates/todos.hbs b/examples/chaplin-brunch/app/views/templates/todos.hbs deleted file mode 100644 index 51920bdf69..0000000000 --- a/examples/chaplin-brunch/app/views/templates/todos.hbs +++ /dev/null @@ -1,3 +0,0 @@ - - -
      diff --git a/examples/chaplin-brunch/app/views/todo-view.coffee b/examples/chaplin-brunch/app/views/todo-view.coffee deleted file mode 100644 index ccd29710f5..0000000000 --- a/examples/chaplin-brunch/app/views/todo-view.coffee +++ /dev/null @@ -1,43 +0,0 @@ -View = require './base/view' - -module.exports = class TodoView extends View - events: - 'click .toggle': 'toggle' - 'dblclick label': 'edit' - 'keyup .edit': 'save' - 'focusout .edit': 'save' - 'click .destroy': 'clear' - - listen: - 'change model': 'render' - - template: require './templates/todo' - tagName: 'li' - - render: -> - super - @toggleClass() - - toggleClass: -> - isCompleted = @model.get('completed') - @el.classList.toggle 'completed', isCompleted - - clear: -> - @model.destroy() - - toggle: -> - @model.toggle().save() - - edit: -> - @el.classList.add 'editing' - input = @find('.edit') - input.focus() - input.value = input.value; - - save: (event) -> - ENTER_KEY = 13 - title = event.delegateTarget.value.trim() - return @model.destroy() unless title - return if event.type is 'keyup' and event.keyCode isnt ENTER_KEY - @model.save {title} - @el.classList.remove 'editing' diff --git a/examples/chaplin-brunch/app/views/todos-view.coffee b/examples/chaplin-brunch/app/views/todos-view.coffee deleted file mode 100644 index 7d9290cdbf..0000000000 --- a/examples/chaplin-brunch/app/views/todos-view.coffee +++ /dev/null @@ -1,30 +0,0 @@ -CollectionView = require './base/collection-view' -TodoView = require './todo-view' -utils = require 'lib/utils' - -module.exports = class TodosView extends CollectionView - container: '#main' - events: - 'click #toggle-all': 'toggleCompleted' - itemView: TodoView - listSelector: '#todo-list' - listen: - 'all collection': 'renderCheckbox' - 'todos:clear mediator': 'clear' - template: require './templates/todos' - - render: -> - super - @renderCheckbox() - - renderCheckbox: -> - @find('#toggle-all').checked = @collection.allAreCompleted() - utils.toggle @el, @collection.length isnt 0 - - toggleCompleted: (event) -> - isChecked = event.delegateTarget.checked - @collection.forEach (todo) -> todo.save completed: isChecked - - clear: -> - @collection.getCompleted().forEach (model) -> - model.destroy() diff --git a/examples/chaplin-brunch/config.coffee b/examples/chaplin-brunch/config.coffee deleted file mode 100644 index ca8abe40c4..0000000000 --- a/examples/chaplin-brunch/config.coffee +++ /dev/null @@ -1,13 +0,0 @@ -exports.config = - # See http://brunch.readthedocs.org/en/latest/config.html for documentation. - files: - javascripts: - joinTo: - 'app.js': /^app/ - 'vendor.js': /^vendor/ - - stylesheets: - joinTo: 'app.css' - - templates: - joinTo: 'app.js' diff --git a/examples/chaplin-brunch/node_modules/backbone.localstorage/backbone.localStorage.js b/examples/chaplin-brunch/node_modules/backbone.localstorage/backbone.localStorage.js deleted file mode 100644 index 6365ecefa5..0000000000 --- a/examples/chaplin-brunch/node_modules/backbone.localstorage/backbone.localStorage.js +++ /dev/null @@ -1,258 +0,0 @@ -/** - * Backbone localStorage Adapter - * Version 1.1.16 - * - * https://github.com/jeromegn/Backbone.localStorage - */ -(function (root, factory) { - if (typeof exports === 'object' && typeof require === 'function') { - module.exports = factory(require("backbone")); - } else if (typeof define === "function" && define.amd) { - // AMD. Register as an anonymous module. - define(["backbone"], function(Backbone) { - // Use global variables if the locals are undefined. - return factory(Backbone || root.Backbone); - }); - } else { - factory(Backbone); - } -}(this, function(Backbone) { -// A simple module to replace `Backbone.sync` with *localStorage*-based -// persistence. Models are given GUIDS, and saved into a JSON object. Simple -// as that. - -// Generate four random hex digits. -function S4() { - return (((1+Math.random())*0x10000)|0).toString(16).substring(1); -}; - -// Generate a pseudo-GUID by concatenating random hexadecimal. -function guid() { - return (S4()+S4()+"-"+S4()+"-"+S4()+"-"+S4()+"-"+S4()+S4()+S4()); -}; - -function isObject(item) { - return item === Object(item); -} - -function contains(array, item) { - var i = array.length; - while (i--) if (array[i] === item) return true; - return false; -} - -function extend(obj, props) { - for (var key in props) obj[key] = props[key] - return obj; -} - -function result(object, property) { - if (object == null) return void 0; - var value = object[property]; - return (typeof value === 'function') ? object[property]() : value; -} - -// Our Store is represented by a single JS object in *localStorage*. Create it -// with a meaningful name, like the name you'd give a table. -// window.Store is deprectated, use Backbone.LocalStorage instead -Backbone.LocalStorage = window.Store = function(name, serializer) { - if( !this.localStorage ) { - throw "Backbone.localStorage: Environment does not support localStorage." - } - this.name = name; - this.serializer = serializer || { - serialize: function(item) { - return isObject(item) ? JSON.stringify(item) : item; - }, - // fix for "illegal access" error on Android when JSON.parse is passed null - deserialize: function (data) { - return data && JSON.parse(data); - } - }; - var store = this.localStorage().getItem(this.name); - this.records = (store && store.split(",")) || []; -}; - -extend(Backbone.LocalStorage.prototype, { - - // Save the current state of the **Store** to *localStorage*. - save: function() { - this.localStorage().setItem(this.name, this.records.join(",")); - }, - - // Add a model, giving it a (hopefully)-unique GUID, if it doesn't already - // have an id of it's own. - create: function(model) { - if (!model.id && model.id !== 0) { - model.id = guid(); - model.set(model.idAttribute, model.id); - } - this.localStorage().setItem(this._itemName(model.id), this.serializer.serialize(model)); - this.records.push(model.id.toString()); - this.save(); - return this.find(model); - }, - - // Update a model by replacing its copy in `this.data`. - update: function(model) { - this.localStorage().setItem(this._itemName(model.id), this.serializer.serialize(model)); - var modelId = model.id.toString(); - if (!contains(this.records, modelId)) { - this.records.push(modelId); - this.save(); - } - return this.find(model); - }, - - // Retrieve a model from `this.data` by id. - find: function(model) { - return this.serializer.deserialize(this.localStorage().getItem(this._itemName(model.id))); - }, - - // Return the array of all models currently in storage. - findAll: function() { - var result = []; - for (var i = 0, id, data; i < this.records.length; i++) { - id = this.records[i]; - data = this.serializer.deserialize(this.localStorage().getItem(this._itemName(id))); - if (data != null) result.push(data); - } - return result; - }, - - // Delete a model from `this.data`, returning it. - destroy: function(model) { - this.localStorage().removeItem(this._itemName(model.id)); - var modelId = model.id.toString(); - for (var i = 0, id; i < this.records.length; i++) { - if (this.records[i] === modelId) { - this.records.splice(i, 1); - } - } - this.save(); - return model; - }, - - localStorage: function() { - return localStorage; - }, - - // Clear localStorage for specific collection. - _clear: function() { - var local = this.localStorage(), - itemRe = new RegExp("^" + this.name + "-"); - - // Remove id-tracking item (e.g., "foo"). - local.removeItem(this.name); - - // Match all data items (e.g., "foo-ID") and remove. - for (var k in local) { - if (itemRe.test(k)) { - local.removeItem(k); - } - } - - this.records.length = 0; - }, - - // Size of localStorage. - _storageSize: function() { - return this.localStorage().length; - }, - - _itemName: function(id) { - return this.name+"-"+id; - } - -}); - -// localSync delegate to the model or collection's -// *localStorage* property, which should be an instance of `Store`. -// window.Store.sync and Backbone.localSync is deprecated, use Backbone.LocalStorage.sync instead -Backbone.LocalStorage.sync = window.Store.sync = Backbone.localSync = function(method, model, options) { - var store = result(model, 'localStorage') || result(model.collection, 'localStorage'); - - var resp, errorMessage; - //If $ is having Deferred - use it. - var syncDfd = Backbone.$ ? - (Backbone.$.Deferred && Backbone.$.Deferred()) : - (Backbone.Deferred && Backbone.Deferred()); - - try { - - switch (method) { - case "read": - resp = model.id != undefined ? store.find(model) : store.findAll(); - break; - case "create": - resp = store.create(model); - break; - case "update": - resp = store.update(model); - break; - case "delete": - resp = store.destroy(model); - break; - } - - } catch(error) { - if (error.code === 22 && store._storageSize() === 0) - errorMessage = "Private browsing is unsupported"; - else - errorMessage = error.message; - } - - if (resp) { - if (options && options.success) { - if (Backbone.VERSION === "0.9.10") { - options.success(model, resp, options); - } else { - options.success(resp); - } - } - if (syncDfd) { - syncDfd.resolve(resp); - } - - } else { - errorMessage = errorMessage ? errorMessage - : "Record Not Found"; - - if (options && options.error) - if (Backbone.VERSION === "0.9.10") { - options.error(model, errorMessage, options); - } else { - options.error(errorMessage); - } - - if (syncDfd) - syncDfd.reject(errorMessage); - } - - // add compatibility with $.ajax - // always execute callback for success and error - if (options && options.complete) options.complete(resp); - - return syncDfd && syncDfd.promise(); -}; - -Backbone.ajaxSync = Backbone.sync; - -Backbone.getSyncMethod = function(model, options) { - var forceAjaxSync = options && options.ajaxSync; - - if(!forceAjaxSync && (result(model, 'localStorage') || result(model.collection, 'localStorage'))) { - return Backbone.localSync; - } - - return Backbone.ajaxSync; -}; - -// Override 'Backbone.sync' to default to localSync, -// the original 'Backbone.sync' is still available in 'Backbone.ajaxSync' -Backbone.sync = function(method, model, options) { - return Backbone.getSyncMethod(model, options).apply(this, [method, model, options]); -}; - -return Backbone.LocalStorage; -})); diff --git a/examples/chaplin-brunch/node_modules/backbone.nativeview/backbone.nativeview.js b/examples/chaplin-brunch/node_modules/backbone.nativeview/backbone.nativeview.js deleted file mode 100644 index 476c438b1c..0000000000 --- a/examples/chaplin-brunch/node_modules/backbone.nativeview/backbone.nativeview.js +++ /dev/null @@ -1,169 +0,0 @@ -// Backbone.NativeView.js 0.3.2 -// --------------- - -// (c) 2014 Adam Krebs, Jimmy Yuen Ho Wong -// Backbone.NativeView may be freely distributed under the MIT license. -// For all details and documentation: -// https://github.com/akre54/Backbone.NativeView - -(function (factory) { - if (typeof define === 'function' && define.amd) { define(['backbone'], factory); - } else if (typeof exports === 'object') { factory(require('backbone')); - } else { factory(Backbone); } -}(function (Backbone) { - // Cached regex to match an opening '<' of an HTML tag, possibly left-padded - // with whitespace. - var paddedLt = /^\s*=9 and modern browsers. - var matchesSelector = ElementProto.matches || - ElementProto.webkitMatchesSelector || - ElementProto.mozMatchesSelector || - ElementProto.msMatchesSelector || - ElementProto.oMatchesSelector || - // Make our own `Element#matches` for IE8 - function(selector) { - // Use querySelectorAll to find all elements matching the selector, - // then check if the given element is included in that list. - // Executing the query on the parentNode reduces the resulting nodeList, - // (document doesn't have a parentNode). - var nodeList = (this.parentNode || document).querySelectorAll(selector) || []; - return !!~indexOf(nodeList, this); - }; - - // Cache Backbone.View for later access in constructor - var BBView = Backbone.View; - - // To extend an existing view to use native methods, extend the View prototype - // with the mixin: _.extend(MyView.prototype, Backbone.NativeViewMixin); - Backbone.NativeViewMixin = { - - _domEvents: null, - - constructor: function() { - this._domEvents = []; - return BBView.apply(this, arguments); - }, - - $: function(selector) { - return this.el.querySelectorAll(selector); - }, - - _removeElement: function() { - this.undelegateEvents(); - if (this.el.parentNode) this.el.parentNode.removeChild(this.el); - }, - - // Apply the `element` to the view. `element` can be a CSS selector, - // a string of HTML, or an Element node. - _setElement: function(element) { - if (typeof element == 'string') { - if (paddedLt.test(element)) { - var el = document.createElement('div'); - el.innerHTML = element; - this.el = el.firstChild; - } else { - this.el = document.querySelector(element); - } - } else { - this.el = element; - } - }, - - // Set a hash of attributes to the view's `el`. We use the "prop" version - // if available, falling back to `setAttribute` for the catch-all. - _setAttributes: function(attrs) { - for (var attr in attrs) { - attr in this.el ? this.el[attr] = attrs[attr] : this.el.setAttribute(attr, attrs[attr]); - } - }, - - // Make a event delegation handler for the given `eventName` and `selector` - // and attach it to `this.el`. - // If selector is empty, the listener will be bound to `this.el`. If not, a - // new handler that will recursively traverse up the event target's DOM - // hierarchy looking for a node that matches the selector. If one is found, - // the event's `delegateTarget` property is set to it and the return the - // result of calling bound `listener` with the parameters given to the - // handler. - delegate: function(eventName, selector, listener) { - if (typeof selector === 'function') { - listener = selector; - selector = null; - } - - var root = this.el; - var handler = selector ? function (e) { - var node = e.target || e.srcElement; - for (; node && node != root; node = node.parentNode) { - if (matchesSelector.call(node, selector)) { - e.delegateTarget = node; - listener(e); - } - } - } : listener; - - elementAddEventListener.call(this.el, eventName, handler, false); - this._domEvents.push({eventName: eventName, handler: handler, listener: listener, selector: selector}); - return handler; - }, - - // Remove a single delegated event. Either `eventName` or `selector` must - // be included, `selector` and `listener` are optional. - undelegate: function(eventName, selector, listener) { - if (typeof selector === 'function') { - listener = selector; - selector = null; - } - - if (this.el) { - var handlers = this._domEvents.slice(); - for (var i = 0, len = handlers.length; i < len; i++) { - var item = handlers[i]; - - var match = item.eventName === eventName && - (listener ? item.listener === listener : true) && - (selector ? item.selector === selector : true); - - if (!match) continue; - - elementRemoveEventListener.call(this.el, item.eventName, item.handler, false); - this._domEvents.splice(indexOf(handlers, item), 1); - } - } - return this; - }, - - // Remove all events created with `delegate` from `el` - undelegateEvents: function() { - if (this.el) { - for (var i = 0, len = this._domEvents.length; i < len; i++) { - var item = this._domEvents[i]; - elementRemoveEventListener.call(this.el, item.eventName, item.handler, false); - }; - this._domEvents.length = 0; - } - return this; - } - }; - - Backbone.NativeView = Backbone.View.extend(Backbone.NativeViewMixin); - - return Backbone.NativeView; -})); diff --git a/examples/chaplin-brunch/node_modules/chaplin/chaplin.js b/examples/chaplin-brunch/node_modules/chaplin/chaplin.js deleted file mode 100644 index efd2e473e6..0000000000 --- a/examples/chaplin-brunch/node_modules/chaplin/chaplin.js +++ /dev/null @@ -1,3110 +0,0 @@ -/*! - * Chaplin 1.0.1 - * - * Chaplin may be freely distributed under the MIT license. - * For all details and documentation: - * http://chaplinjs.org - */ - -(function(){ - -var loader = (function() { - var modules = {}; - var cache = {}; - - var dummy = function() {return function() {};}; - var initModule = function(name, definition) { - var module = {id: name, exports: {}}; - definition(module.exports, dummy(), module); - var exports = cache[name] = module.exports; - return exports; - }; - - var loader = function(path) { - if (cache.hasOwnProperty(path)) return cache[path]; - if (modules.hasOwnProperty(path)) return initModule(path, modules[path]); - throw new Error('Cannot find module "' + path + '"'); - }; - - loader.register = function(bundle, fn) { - modules[bundle] = fn; - }; - return loader; -})(); - -loader.register('chaplin/application', function(e, r, module) { -'use strict'; - -var Application, Backbone, Composer, Dispatcher, EventBroker, Layout, Router, mediator, _; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -Dispatcher = loader('chaplin/dispatcher'); - -Layout = loader('chaplin/views/layout'); - -Composer = loader('chaplin/composer'); - -Router = loader('chaplin/lib/router'); - -EventBroker = loader('chaplin/lib/event_broker'); - -mediator = loader('chaplin/mediator'); - -module.exports = Application = (function() { - - Application.extend = Backbone.Model.extend; - - _.extend(Application.prototype, EventBroker); - - Application.prototype.title = ''; - - Application.prototype.dispatcher = null; - - Application.prototype.layout = null; - - Application.prototype.router = null; - - Application.prototype.composer = null; - - Application.prototype.started = false; - - function Application(options) { - if (options == null) { - options = {}; - } - this.initialize(options); - } - - Application.prototype.initialize = function(options) { - if (options == null) { - options = {}; - } - if (this.started) { - throw new Error('Application#initialize: App was already started'); - } - this.initRouter(options.routes, options); - this.initDispatcher(options); - this.initLayout(options); - this.initComposer(options); - this.initMediator(); - return this.start(); - }; - - Application.prototype.initDispatcher = function(options) { - return this.dispatcher = new Dispatcher(options); - }; - - Application.prototype.initLayout = function(options) { - var _ref; - if (options == null) { - options = {}; - } - if ((_ref = options.title) == null) { - options.title = this.title; - } - return this.layout = new Layout(options); - }; - - Application.prototype.initComposer = function(options) { - if (options == null) { - options = {}; - } - return this.composer = new Composer(options); - }; - - Application.prototype.initMediator = function() { - return mediator.seal(); - }; - - Application.prototype.initRouter = function(routes, options) { - this.router = new Router(options); - return typeof routes === "function" ? routes(this.router.match) : void 0; - }; - - Application.prototype.start = function() { - this.router.startHistory(); - this.started = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - Application.prototype.disposed = false; - - Application.prototype.dispose = function() { - var prop, properties, _i, _len; - if (this.disposed) { - return; - } - properties = ['dispatcher', 'layout', 'router', 'composer']; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - if (this[prop] != null) { - this[prop].dispose(); - } - } - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Application; - -})(); - -});;loader.register('chaplin/mediator', function(e, r, module) { -'use strict'; - -var Backbone, handlers, mediator, support, utils, _, - __slice = [].slice; - -Backbone = loader('backbone'); - -_ = loader('underscore'); - -support = loader('chaplin/lib/support'); - -utils = loader('chaplin/lib/utils'); - -mediator = {}; - -mediator.subscribe = mediator.on = Backbone.Events.on; - -mediator.subscribeOnce = mediator.once = Backbone.Events.once; - -mediator.unsubscribe = mediator.off = Backbone.Events.off; - -mediator.publish = mediator.trigger = Backbone.Events.trigger; - -mediator._callbacks = null; - -handlers = mediator._handlers = {}; - -mediator.setHandler = function(name, method, instance) { - return handlers[name] = { - instance: instance, - method: method - }; -}; - -mediator.execute = function() { - var args, handler, name, nameOrObj, silent; - nameOrObj = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - silent = false; - if (typeof nameOrObj === 'object') { - silent = nameOrObj.silent; - name = nameOrObj.name; - } else { - name = nameOrObj; - } - handler = handlers[name]; - if (handler) { - return handler.method.apply(handler.instance, args); - } else if (!silent) { - throw new Error("mediator.execute: " + name + " handler is not defined"); - } -}; - -mediator.removeHandlers = function(instanceOrNames) { - var handler, name, _i, _len; - if (!instanceOrNames) { - mediator._handlers = {}; - } - if (utils.isArray(instanceOrNames)) { - for (_i = 0, _len = instanceOrNames.length; _i < _len; _i++) { - name = instanceOrNames[_i]; - delete handlers[name]; - } - } else { - for (name in handlers) { - handler = handlers[name]; - if (handler.instance === instanceOrNames) { - delete handlers[name]; - } - } - } -}; - -utils.readonly(mediator, 'subscribe', 'subscribeOnce', 'unsubscribe', 'publish', 'setHandler', 'execute', 'removeHandlers'); - -mediator.seal = function() { - if (support.propertyDescriptors && Object.seal) { - return Object.seal(mediator); - } -}; - -utils.readonly(mediator, 'seal'); - -module.exports = mediator; - -});;loader.register('chaplin/dispatcher', function(e, r, module) { -'use strict'; - -var Backbone, Dispatcher, EventBroker, mediator, utils, _; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -mediator = loader('chaplin/mediator'); - -utils = loader('chaplin/lib/utils'); - -EventBroker = loader('chaplin/lib/event_broker'); - -module.exports = Dispatcher = (function() { - - Dispatcher.extend = Backbone.Model.extend; - - _.extend(Dispatcher.prototype, EventBroker); - - Dispatcher.prototype.previousRoute = null; - - Dispatcher.prototype.currentController = null; - - Dispatcher.prototype.currentRoute = null; - - Dispatcher.prototype.currentParams = null; - - Dispatcher.prototype.currentQuery = null; - - function Dispatcher() { - this.initialize.apply(this, arguments); - } - - Dispatcher.prototype.initialize = function(options) { - if (options == null) { - options = {}; - } - this.settings = _.defaults(options, { - controllerPath: 'controllers/', - controllerSuffix: '_controller' - }); - return this.subscribeEvent('router:match', this.dispatch); - }; - - Dispatcher.prototype.dispatch = function(route, params, options) { - var _ref, _ref1, - _this = this; - params = params ? _.extend({}, params) : {}; - options = options ? _.extend({}, options) : {}; - if (!(options.query != null)) { - options.query = {}; - } - if (options.forceStartup !== true) { - options.forceStartup = false; - } - if (!options.forceStartup && ((_ref = this.currentRoute) != null ? _ref.controller : void 0) === route.controller && ((_ref1 = this.currentRoute) != null ? _ref1.action : void 0) === route.action && _.isEqual(this.currentParams, params) && _.isEqual(this.currentQuery, options.query)) { - return; - } - return this.loadController(route.controller, function(Controller) { - return _this.controllerLoaded(route, params, options, Controller); - }); - }; - - Dispatcher.prototype.loadController = function(name, handler) { - var fileName, moduleName, - _this = this; - fileName = name + this.settings.controllerSuffix; - moduleName = this.settings.controllerPath + fileName; - if (typeof define !== "undefined" && define !== null ? define.amd : void 0) { - return require([moduleName], handler); - } else { - return setTimeout(function() { - return handler(require(moduleName)); - }, 0); - } - }; - - Dispatcher.prototype.controllerLoaded = function(route, params, options, Controller) { - var controller, prev, previous; - if (this.nextPreviousRoute = this.currentRoute) { - previous = _.extend({}, this.nextPreviousRoute); - if (this.currentParams != null) { - previous.params = this.currentParams; - } - if (previous.previous) { - delete previous.previous; - } - prev = { - previous: previous - }; - } - this.nextCurrentRoute = _.extend({}, route, prev); - controller = new Controller(params, this.nextCurrentRoute, options); - return this.executeBeforeAction(controller, this.nextCurrentRoute, params, options); - }; - - Dispatcher.prototype.executeAction = function(controller, route, params, options) { - if (this.currentController) { - this.publishEvent('beforeControllerDispose', this.currentController); - this.currentController.dispose(params, route, options); - } - this.currentController = controller; - this.currentParams = params; - this.currentQuery = options.query; - controller[route.action](params, route, options); - if (controller.redirected) { - return; - } - return this.publishEvent('dispatcher:dispatch', this.currentController, params, route, options); - }; - - Dispatcher.prototype.executeBeforeAction = function(controller, route, params, options) { - var before, executeAction, promise, - _this = this; - before = controller.beforeAction; - executeAction = function() { - if (controller.redirected || _this.currentRoute && route === _this.currentRoute) { - _this.nextPreviousRoute = _this.nextCurrentRoute = null; - controller.dispose(); - return; - } - _this.previousRoute = _this.nextPreviousRoute; - _this.currentRoute = _this.nextCurrentRoute; - _this.nextPreviousRoute = _this.nextCurrentRoute = null; - return _this.executeAction(controller, route, params, options); - }; - if (!before) { - executeAction(); - return; - } - if (typeof before !== 'function') { - throw new TypeError('Controller#beforeAction: function expected. ' + 'Old object-like form is not supported.'); - } - promise = controller.beforeAction(params, route, options); - if (promise && promise.then) { - return promise.then(executeAction); - } else { - return executeAction(); - } - }; - - Dispatcher.prototype.disposed = false; - - Dispatcher.prototype.dispose = function() { - if (this.disposed) { - return; - } - this.unsubscribeAllEvents(); - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Dispatcher; - -})(); - -});;loader.register('chaplin/composer', function(e, r, module) { -'use strict'; - -var Backbone, Composer, Composition, EventBroker, mediator, utils, _; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -mediator = loader('chaplin/mediator'); - -utils = loader('chaplin/lib/utils'); - -Composition = loader('chaplin/lib/composition'); - -EventBroker = loader('chaplin/lib/event_broker'); - -module.exports = Composer = (function() { - - Composer.extend = Backbone.Model.extend; - - _.extend(Composer.prototype, EventBroker); - - Composer.prototype.compositions = null; - - function Composer() { - this.initialize.apply(this, arguments); - } - - Composer.prototype.initialize = function(options) { - if (options == null) { - options = {}; - } - this.compositions = {}; - mediator.setHandler('composer:compose', this.compose, this); - mediator.setHandler('composer:retrieve', this.retrieve, this); - return this.subscribeEvent('dispatcher:dispatch', this.cleanup); - }; - - Composer.prototype.compose = function(name, second, third) { - if (typeof second === 'function') { - if (third || second.prototype.dispose) { - if (second.prototype instanceof Composition) { - return this._compose(name, { - composition: second, - options: third - }); - } else { - return this._compose(name, { - options: third, - compose: function() { - var autoRender, disabledAutoRender; - if (second.prototype instanceof Backbone.Model || second.prototype instanceof Backbone.Collection) { - this.item = new second(null, this.options); - } else { - this.item = new second(this.options); - } - autoRender = this.item.autoRender; - disabledAutoRender = autoRender === void 0 || !autoRender; - if (disabledAutoRender && typeof this.item.render === 'function') { - return this.item.render(); - } - } - }); - } - } - return this._compose(name, { - compose: second - }); - } - if (typeof third === 'function') { - return this._compose(name, { - compose: third, - options: second - }); - } - return this._compose(name, second); - }; - - Composer.prototype._compose = function(name, options) { - var composition, current, isPromise, returned; - if (typeof options.compose !== 'function' && !(options.composition != null)) { - throw new Error('Composer#compose was used incorrectly'); - } - if (options.composition != null) { - composition = new options.composition(options.options); - } else { - composition = new Composition(options.options); - composition.compose = options.compose; - if (options.check) { - composition.check = options.check; - } - } - current = this.compositions[name]; - isPromise = false; - if (current && current.check(composition.options)) { - current.stale(false); - } else { - if (current) { - current.dispose(); - } - returned = composition.compose(composition.options); - isPromise = typeof (returned != null ? returned.then : void 0) === 'function'; - composition.stale(false); - this.compositions[name] = composition; - } - if (isPromise) { - return returned; - } else { - return this.compositions[name].item; - } - }; - - Composer.prototype.retrieve = function(name) { - var active; - active = this.compositions[name]; - if (active && !active.stale()) { - return active.item; - } else { - return void 0; - } - }; - - Composer.prototype.cleanup = function() { - var composition, name, _ref; - _ref = this.compositions; - for (name in _ref) { - composition = _ref[name]; - if (composition.stale()) { - composition.dispose(); - delete this.compositions[name]; - } else { - composition.stale(true); - } - } - }; - - Composer.prototype.dispose = function() { - var composition, name, _ref; - if (this.disposed) { - return; - } - this.unsubscribeAllEvents(); - mediator.removeHandlers(this); - _ref = this.compositions; - for (name in _ref) { - composition = _ref[name]; - composition.dispose(); - } - delete this.compositions; - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Composer; - -})(); - -});;loader.register('chaplin/controllers/controller', function(e, r, module) { -'use strict'; - -var Backbone, Controller, EventBroker, mediator, utils, _, - __slice = [].slice, - __hasProp = {}.hasOwnProperty; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -EventBroker = loader('chaplin/lib/event_broker'); - -utils = loader('chaplin/lib/utils'); - -mediator = loader('chaplin/mediator'); - -module.exports = Controller = (function() { - - Controller.extend = Backbone.Model.extend; - - _.extend(Controller.prototype, Backbone.Events); - - _.extend(Controller.prototype, EventBroker); - - Controller.prototype.view = null; - - Controller.prototype.redirected = false; - - function Controller() { - this.initialize.apply(this, arguments); - } - - Controller.prototype.initialize = function() {}; - - Controller.prototype.beforeAction = function() {}; - - Controller.prototype.adjustTitle = function(subtitle) { - return mediator.execute('adjustTitle', subtitle); - }; - - Controller.prototype.reuse = function(name) { - var method; - method = arguments.length === 1 ? 'retrieve' : 'compose'; - return mediator.execute.apply(mediator, ["composer:" + method].concat(__slice.call(arguments))); - }; - - Controller.prototype.compose = function() { - throw new Error('Controller#compose was moved to Controller#reuse'); - }; - - Controller.prototype.redirectTo = function(pathDesc, params, options) { - this.redirected = true; - return utils.redirectTo(pathDesc, params, options); - }; - - Controller.prototype.disposed = false; - - Controller.prototype.dispose = function() { - var obj, prop; - if (this.disposed) { - return; - } - for (prop in this) { - if (!__hasProp.call(this, prop)) continue; - obj = this[prop]; - if (!(obj && typeof obj.dispose === 'function')) { - continue; - } - obj.dispose(); - delete this[prop]; - } - this.unsubscribeAllEvents(); - this.stopListening(); - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Controller; - -})(); - -});;loader.register('chaplin/models/collection', function(e, r, module) { -'use strict'; - -var Backbone, Collection, EventBroker, Model, utils, _, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -EventBroker = loader('chaplin/lib/event_broker'); - -Model = loader('chaplin/models/model'); - -utils = loader('chaplin/lib/utils'); - -module.exports = Collection = (function(_super) { - - __extends(Collection, _super); - - function Collection() { - return Collection.__super__.constructor.apply(this, arguments); - } - - _.extend(Collection.prototype, EventBroker); - - Collection.prototype.model = Model; - - Collection.prototype.serialize = function() { - return this.map(utils.serialize); - }; - - Collection.prototype.disposed = false; - - Collection.prototype.dispose = function() { - var prop, properties, _i, _len; - if (this.disposed) { - return; - } - this.trigger('dispose', this); - this.reset([], { - silent: true - }); - this.unsubscribeAllEvents(); - this.stopListening(); - this.off(); - properties = ['model', 'models', '_byId', '_byCid', '_callbacks']; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - delete this[prop]; - } - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Collection; - -})(Backbone.Collection); - -});;loader.register('chaplin/models/model', function(e, r, module) { -'use strict'; - -var Backbone, EventBroker, Model, serializeAttributes, serializeModelAttributes, utils, _, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -utils = loader('chaplin/lib/utils'); - -EventBroker = loader('chaplin/lib/event_broker'); - -serializeAttributes = function(model, attributes, modelStack) { - var delegator, key, otherModel, serializedModels, value, _i, _len, _ref; - delegator = utils.beget(attributes); - if (modelStack == null) { - modelStack = {}; - } - modelStack[model.cid] = true; - for (key in attributes) { - value = attributes[key]; - if (value instanceof Backbone.Model) { - delegator[key] = serializeModelAttributes(value, model, modelStack); - } else if (value instanceof Backbone.Collection) { - serializedModels = []; - _ref = value.models; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - otherModel = _ref[_i]; - serializedModels.push(serializeModelAttributes(otherModel, model, modelStack)); - } - delegator[key] = serializedModels; - } - } - delete modelStack[model.cid]; - return delegator; -}; - -serializeModelAttributes = function(model, currentModel, modelStack) { - var attributes; - if (model === currentModel || model.cid in modelStack) { - return null; - } - attributes = typeof model.getAttributes === 'function' ? model.getAttributes() : model.attributes; - return serializeAttributes(model, attributes, modelStack); -}; - -module.exports = Model = (function(_super) { - - __extends(Model, _super); - - function Model() { - return Model.__super__.constructor.apply(this, arguments); - } - - _.extend(Model.prototype, EventBroker); - - Model.prototype.getAttributes = function() { - return this.attributes; - }; - - Model.prototype.serialize = function() { - return serializeAttributes(this, this.getAttributes()); - }; - - Model.prototype.disposed = false; - - Model.prototype.dispose = function() { - var prop, properties, _i, _len; - if (this.disposed) { - return; - } - this.trigger('dispose', this); - this.unsubscribeAllEvents(); - this.stopListening(); - this.off(); - properties = ['collection', 'attributes', 'changed', 'defaults', '_escapedAttributes', '_previousAttributes', '_silent', '_pending', '_callbacks']; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - delete this[prop]; - } - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Model; - -})(Backbone.Model); - -});;loader.register('chaplin/views/layout', function(e, r, module) { -'use strict'; - -var $, Backbone, EventBroker, Layout, View, mediator, utils, _, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -mediator = loader('chaplin/mediator'); - -utils = loader('chaplin/lib/utils'); - -EventBroker = loader('chaplin/lib/event_broker'); - -View = loader('chaplin/views/view'); - -$ = Backbone.$; - -module.exports = Layout = (function(_super) { - - __extends(Layout, _super); - - Layout.prototype.el = 'body'; - - Layout.prototype.keepElement = true; - - Layout.prototype.title = ''; - - Layout.prototype.globalRegions = null; - - Layout.prototype.listen = { - 'beforeControllerDispose mediator': 'scroll' - }; - - function Layout(options) { - if (options == null) { - options = {}; - } - this.openLink = __bind(this.openLink, this); - - this.globalRegions = []; - this.title = options.title; - if (options.regions) { - this.regions = options.regions; - } - this.settings = _.defaults(options, { - titleTemplate: function(data) { - var st; - st = data.subtitle ? "" + data.subtitle + " \u2013 " : ''; - return st + data.title; - }, - openExternalToBlank: false, - routeLinks: 'a, .go-to', - skipRouting: '.noscript', - scrollTo: [0, 0] - }); - mediator.setHandler('region:show', this.showRegion, this); - mediator.setHandler('region:register', this.registerRegionHandler, this); - mediator.setHandler('region:unregister', this.unregisterRegionHandler, this); - mediator.setHandler('region:find', this.regionByName, this); - mediator.setHandler('adjustTitle', this.adjustTitle, this); - Layout.__super__.constructor.apply(this, arguments); - if (this.settings.routeLinks) { - this.startLinkRouting(); - } - } - - Layout.prototype.scroll = function() { - var position; - position = this.settings.scrollTo; - if (position) { - return window.scrollTo(position[0], position[1]); - } - }; - - Layout.prototype.adjustTitle = function(subtitle) { - var title, - _this = this; - if (subtitle == null) { - subtitle = ''; - } - title = this.settings.titleTemplate({ - title: this.title, - subtitle: subtitle - }); - setTimeout(function() { - document.title = title; - return _this.publishEvent('adjustTitle', subtitle, title); - }, 50); - return title; - }; - - Layout.prototype.startLinkRouting = function() { - var route; - route = this.settings.routeLinks; - if (!route) { - return; - } - if ($) { - return this.$el.on('click', route, this.openLink); - } else { - return this.delegate('click', route, this.openLink); - } - }; - - Layout.prototype.stopLinkRouting = function() { - var route; - route = this.settings.routeLinks; - if ($) { - if (route) { - return this.$el.off('click', route); - } - } else { - return this.undelegate('click', route, this.openLink); - } - }; - - Layout.prototype.isExternalLink = function(link) { - var _ref, _ref1; - return link.target === '_blank' || link.rel === 'external' || ((_ref = link.protocol) !== 'http:' && _ref !== 'https:' && _ref !== 'file:') || ((_ref1 = link.hostname) !== location.hostname && _ref1 !== ''); - }; - - Layout.prototype.openLink = function(event) { - var el, external, href, isAnchor, skipRouting, type; - if (utils.modifierKeyPressed(event)) { - return; - } - el = $ ? event.currentTarget : event.delegateTarget; - isAnchor = el.nodeName === 'A'; - href = el.getAttribute('href') || el.getAttribute('data-href') || null; - if (!(href != null) || href === '' || href.charAt(0) === '#') { - return; - } - skipRouting = this.settings.skipRouting; - type = typeof skipRouting; - if (type === 'function' && !skipRouting(href, el) || type === 'string' && ($ ? $(el).is(skipRouting) : Backbone.utils.matchesSelector(el, skipRouting))) { - return; - } - external = isAnchor && this.isExternalLink(el); - if (external) { - if (this.settings.openExternalToBlank) { - event.preventDefault(); - window.open(href); - } - return; - } - utils.redirectTo({ - url: href - }); - event.preventDefault(); - }; - - Layout.prototype.registerRegionHandler = function(instance, name, selector) { - if (name != null) { - return this.registerGlobalRegion(instance, name, selector); - } else { - return this.registerGlobalRegions(instance); - } - }; - - Layout.prototype.registerGlobalRegion = function(instance, name, selector) { - this.unregisterGlobalRegion(instance, name); - return this.globalRegions.unshift({ - instance: instance, - name: name, - selector: selector - }); - }; - - Layout.prototype.registerGlobalRegions = function(instance) { - var name, selector, version, _i, _len, _ref; - _ref = utils.getAllPropertyVersions(instance, 'regions'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - version = _ref[_i]; - for (name in version) { - selector = version[name]; - this.registerGlobalRegion(instance, name, selector); - } - } - }; - - Layout.prototype.unregisterRegionHandler = function(instance, name) { - if (name != null) { - return this.unregisterGlobalRegion(instance, name); - } else { - return this.unregisterGlobalRegions(instance); - } - }; - - Layout.prototype.unregisterGlobalRegion = function(instance, name) { - var cid, region; - cid = instance.cid; - return this.globalRegions = (function() { - var _i, _len, _ref, _results; - _ref = this.globalRegions; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - region = _ref[_i]; - if (region.instance.cid !== cid || region.name !== name) { - _results.push(region); - } - } - return _results; - }).call(this); - }; - - Layout.prototype.unregisterGlobalRegions = function(instance) { - var region; - return this.globalRegions = (function() { - var _i, _len, _ref, _results; - _ref = this.globalRegions; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - region = _ref[_i]; - if (region.instance.cid !== instance.cid) { - _results.push(region); - } - } - return _results; - }).call(this); - }; - - Layout.prototype.regionByName = function(name) { - var reg, _i, _len, _ref; - _ref = this.globalRegions; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - reg = _ref[_i]; - if (reg.name === name && !reg.instance.stale) { - return reg; - } - } - }; - - Layout.prototype.showRegion = function(name, instance) { - var region; - region = this.regionByName(name); - if (!region) { - throw new Error("No region registered under " + name); - } - return instance.container = region.selector === '' ? $ ? region.instance.$el : region.instance.el : region.instance.noWrap ? $ ? $(region.instance.container).find(region.selector) : region.instance.container.querySelector(region.selector) : region.instance[$ ? '$' : 'find'](region.selector); - }; - - Layout.prototype.dispose = function() { - var prop, _i, _len, _ref; - if (this.disposed) { - return; - } - this.stopLinkRouting(); - _ref = ['globalRegions', 'title', 'route']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - prop = _ref[_i]; - delete this[prop]; - } - mediator.removeHandlers(this); - return Layout.__super__.dispose.apply(this, arguments); - }; - - return Layout; - -})(View); - -});;loader.register('chaplin/views/view', function(e, r, module) { -'use strict'; - -var $, Backbone, EventBroker, View, attach, bind, mediator, setHTML, utils, _, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -mediator = loader('chaplin/mediator'); - -EventBroker = loader('chaplin/lib/event_broker'); - -utils = loader('chaplin/lib/utils'); - -$ = Backbone.$; - -bind = (function() { - if (Function.prototype.bind) { - return function(item, ctx) { - return item.bind(ctx); - }; - } else if (_.bind) { - return _.bind; - } -})(); - -setHTML = (function() { - if ($) { - return function(elem, html) { - return elem.html(html); - }; - } else { - return function(elem, html) { - return elem.innerHTML = html; - }; - } -})(); - -attach = (function() { - if ($) { - return function(view) { - var actual; - actual = $(view.container); - if (typeof view.containerMethod === 'function') { - return view.containerMethod(actual, view.el); - } else { - return actual[view.containerMethod](view.el); - } - }; - } else { - return function(view) { - var actual; - actual = typeof view.container === 'string' ? document.querySelector(view.container) : view.container; - if (typeof view.containerMethod === 'function') { - return view.containerMethod(actual, view.el); - } else { - return actual[view.containerMethod](view.el); - } - }; - } -})(); - -module.exports = View = (function(_super) { - - __extends(View, _super); - - _.extend(View.prototype, EventBroker); - - View.prototype.autoRender = false; - - View.prototype.autoAttach = true; - - View.prototype.container = null; - - View.prototype.containerMethod = $ ? 'append' : 'appendChild'; - - View.prototype.regions = null; - - View.prototype.region = null; - - View.prototype.stale = false; - - View.prototype.noWrap = false; - - View.prototype.keepElement = false; - - View.prototype.subviews = null; - - View.prototype.subviewsByName = null; - - View.prototype.optionNames = ['autoAttach', 'autoRender', 'container', 'containerMethod', 'region', 'regions', 'noWrap']; - - function View(options) { - var optName, optValue, region, render, - _this = this; - if (options) { - for (optName in options) { - optValue = options[optName]; - if (__indexOf.call(this.optionNames, optName) >= 0) { - this[optName] = optValue; - } - } - } - render = this.render; - this.render = function() { - if (_this.disposed) { - return false; - } - render.apply(_this, arguments); - if (_this.autoAttach) { - _this.attach.apply(_this, arguments); - } - return _this; - }; - this.subviews = []; - this.subviewsByName = {}; - if (this.noWrap) { - if (this.region) { - region = mediator.execute('region:find', this.region); - if (region != null) { - this.el = region.instance.container != null ? region.instance.region != null ? $(region.instance.container).find(region.selector) : region.instance.container : region.instance.$(region.selector); - } - } - if (this.container) { - this.el = this.container; - } - } - View.__super__.constructor.apply(this, arguments); - this.delegateListeners(); - if (this.model) { - this.listenTo(this.model, 'dispose', this.dispose); - } - if (this.collection) { - this.listenTo(this.collection, 'dispose', function(subject) { - if (!subject || subject === _this.collection) { - return _this.dispose(); - } - }); - } - if (this.regions != null) { - mediator.execute('region:register', this); - } - if (this.autoRender) { - this.render(); - } - } - - View.prototype.delegate = function(eventName, second, third) { - var bound, event, events, handler, list, selector; - if (Backbone.utils) { - return Backbone.utils.delegate(this, eventName, second, third); - } - if (typeof eventName !== 'string') { - throw new TypeError('View#delegate: first argument must be a string'); - } - if (arguments.length === 2) { - handler = second; - } else if (arguments.length === 3) { - selector = second; - if (typeof selector !== 'string') { - throw new TypeError('View#delegate: ' + 'second argument must be a string'); - } - handler = third; - } else { - throw new TypeError('View#delegate: ' + 'only two or three arguments are allowed'); - } - if (typeof handler !== 'function') { - throw new TypeError('View#delegate: ' + 'handler argument must be function'); - } - list = (function() { - var _i, _len, _ref, _results; - _ref = eventName.split(' '); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - event = _ref[_i]; - _results.push("" + event + ".delegate" + this.cid); - } - return _results; - }).call(this); - events = list.join(' '); - bound = bind(handler, this); - this.$el.on(events, selector || null, bound); - return bound; - }; - - View.prototype._delegateEvents = function(events) { - var bound, eventName, handler, key, match, selector, value; - if (Backbone.View.prototype.delegateEvents.length === 2) { - return Backbone.View.prototype.delegateEvents.call(this, events, true); - } - for (key in events) { - value = events[key]; - handler = typeof value === 'function' ? value : this[value]; - if (!handler) { - throw new Error("Method '" + value + "' does not exist"); - } - match = key.match(/^(\S+)\s*(.*)$/); - eventName = "" + match[1] + ".delegateEvents" + this.cid; - selector = match[2]; - bound = bind(handler, this); - this.$el.on(eventName, selector || null, bound); - } - }; - - View.prototype.delegateEvents = function(events, keepOld) { - var classEvents, _i, _len, _ref; - if (!keepOld) { - this.undelegateEvents(); - } - if (events) { - return this._delegateEvents(events); - } - _ref = utils.getAllPropertyVersions(this, 'events'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - classEvents = _ref[_i]; - if (typeof classEvents === 'function') { - classEvents = classEvents.call(this); - } - this._delegateEvents(classEvents); - } - }; - - View.prototype.undelegate = function(eventName, second, third) { - var event, events, handler, list, selector; - if (Backbone.utils) { - return Backbone.utils.undelegate(this, eventName, second, third); - } - if (eventName) { - if (typeof eventName !== 'string') { - throw new TypeError('View#undelegate: first argument must be a string'); - } - if (arguments.length === 2) { - if (typeof second === 'string') { - selector = second; - } else { - handler = second; - } - } else if (arguments.length === 3) { - selector = second; - if (typeof selector !== 'string') { - throw new TypeError('View#undelegate: ' + 'second argument must be a string'); - } - handler = third; - } - list = (function() { - var _i, _len, _ref, _results; - _ref = eventName.split(' '); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - event = _ref[_i]; - _results.push("" + event + ".delegate" + this.cid); - } - return _results; - }).call(this); - events = list.join(' '); - return this.$el.off(events, selector || null); - } else { - return this.$el.off(".delegate" + this.cid); - } - }; - - View.prototype.delegateListeners = function() { - var eventName, key, method, target, version, _i, _len, _ref, _ref1; - if (!this.listen) { - return; - } - _ref = utils.getAllPropertyVersions(this, 'listen'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - version = _ref[_i]; - if (typeof version === 'function') { - version = version.call(this); - } - for (key in version) { - method = version[key]; - if (typeof method !== 'function') { - method = this[method]; - } - if (typeof method !== 'function') { - throw new Error('View#delegateListeners: ' + ("listener for \"" + key + "\" must be function")); - } - _ref1 = key.split(' '), eventName = _ref1[0], target = _ref1[1]; - this.delegateListener(eventName, target, method); - } - } - }; - - View.prototype.delegateListener = function(eventName, target, callback) { - var prop; - if (target === 'model' || target === 'collection') { - prop = this[target]; - if (prop) { - this.listenTo(prop, eventName, callback); - } - } else if (target === 'mediator') { - this.subscribeEvent(eventName, callback); - } else if (!target) { - this.on(eventName, callback, this); - } - }; - - View.prototype.registerRegion = function(name, selector) { - return mediator.execute('region:register', this, name, selector); - }; - - View.prototype.unregisterRegion = function(name) { - return mediator.execute('region:unregister', this, name); - }; - - View.prototype.unregisterAllRegions = function() { - return mediator.execute({ - name: 'region:unregister', - silent: true - }, this); - }; - - View.prototype.subview = function(name, view) { - var byName, subviews; - subviews = this.subviews; - byName = this.subviewsByName; - if (name && view) { - this.removeSubview(name); - subviews.push(view); - byName[name] = view; - return view; - } else if (name) { - return byName[name]; - } - }; - - View.prototype.removeSubview = function(nameOrView) { - var byName, index, name, otherName, otherView, subviews, view; - if (!nameOrView) { - return; - } - subviews = this.subviews; - byName = this.subviewsByName; - if (typeof nameOrView === 'string') { - name = nameOrView; - view = byName[name]; - } else { - view = nameOrView; - for (otherName in byName) { - otherView = byName[otherName]; - if (!(otherView === view)) { - continue; - } - name = otherName; - break; - } - } - if (!(name && view && view.dispose)) { - return; - } - view.dispose(); - index = utils.indexOf(subviews, view); - if (index !== -1) { - subviews.splice(index, 1); - } - return delete byName[name]; - }; - - View.prototype.getTemplateData = function() { - var data, source; - data = this.model ? utils.serialize(this.model) : this.collection ? { - items: utils.serialize(this.collection), - length: this.collection.length - } : {}; - source = this.model || this.collection; - if (source) { - if (typeof source.isSynced === 'function' && !('synced' in data)) { - data.synced = source.isSynced(); - } - } - return data; - }; - - View.prototype.getTemplateFunction = function() { - throw new Error('View#getTemplateFunction must be overridden'); - }; - - View.prototype.render = function() { - var el, html, templateFunc; - if (this.disposed) { - return false; - } - templateFunc = this.getTemplateFunction(); - if (typeof templateFunc === 'function') { - html = templateFunc(this.getTemplateData()); - if (this.noWrap) { - el = document.createElement('div'); - el.innerHTML = html; - if (el.children.length > 1) { - throw new Error('There must be a single top-level element when ' + 'using `noWrap`.'); - } - this.undelegateEvents(); - this.setElement(el.firstChild, true); - } else { - setHTML(($ ? this.$el : this.el), html); - } - } - return this; - }; - - View.prototype.attach = function() { - if (this.region != null) { - mediator.execute('region:show', this.region, this); - } - if (this.container && !document.body.contains(this.el)) { - attach(this); - return this.trigger('addedToDOM'); - } - }; - - View.prototype.disposed = false; - - View.prototype.dispose = function() { - var prop, properties, subview, _i, _j, _len, _len1, _ref; - if (this.disposed) { - return; - } - this.unregisterAllRegions(); - _ref = this.subviews; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - subview = _ref[_i]; - subview.dispose(); - } - this.unsubscribeAllEvents(); - this.off(); - if (this.keepElement) { - this.undelegateEvents(); - this.undelegate(); - this.stopListening(); - } else { - this.remove(); - } - properties = ['el', '$el', 'options', 'model', 'collection', 'subviews', 'subviewsByName', '_callbacks']; - for (_j = 0, _len1 = properties.length; _j < _len1; _j++) { - prop = properties[_j]; - delete this[prop]; - } - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return View; - -})(Backbone.View); - -});;loader.register('chaplin/views/collection_view', function(e, r, module) { -'use strict'; - -var $, Backbone, CollectionView, View, addClass, endAnimation, filterChildren, insertView, startAnimation, toggleElement, utils, _, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -View = loader('chaplin/views/view'); - -utils = loader('chaplin/lib/utils'); - -$ = Backbone.$; - -filterChildren = function(nodeList, selector) { - var node, _i, _len, _results; - if (!selector) { - return nodeList; - } - _results = []; - for (_i = 0, _len = nodeList.length; _i < _len; _i++) { - node = nodeList[_i]; - if (Backbone.utils.matchesSelector(node, selector)) { - _results.push(node); - } - } - return _results; -}; - -toggleElement = (function() { - if ($) { - return function(elem, visible) { - return elem.toggle(visible); - }; - } else { - return function(elem, visible) { - return elem.style.display = (visible ? '' : 'none'); - }; - } -})(); - -addClass = (function() { - if ($) { - return function(elem, cls) { - return elem.addClass(cls); - }; - } else { - return function(elem, cls) { - return elem.classList.add(cls); - }; - } -})(); - -startAnimation = (function() { - if ($) { - return function(elem, useCssAnimation, cls) { - if (useCssAnimation) { - return addClass(elem, cls); - } else { - return elem.css('opacity', 0); - } - }; - } else { - return function(elem, useCssAnimation, cls) { - if (useCssAnimation) { - return addClass(elem, cls); - } else { - return elem.style.opacity = 0; - } - }; - } -})(); - -endAnimation = (function() { - if ($) { - return function(elem, duration) { - return elem.animate({ - opacity: 1 - }, duration); - }; - } else { - return function(elem, duration) { - elem.style.transition = "opacity " + (duration / 1000) + "s"; - return elem.opacity = 1; - }; - } -})(); - -insertView = (function() { - if ($) { - return function(list, viewEl, position, length, itemSelector) { - var children, childrenLength, insertInMiddle, isEnd, method; - insertInMiddle = (0 < position && position < length); - isEnd = function(length) { - return length === 0 || position === length; - }; - if (insertInMiddle || itemSelector) { - children = list.children(itemSelector); - childrenLength = children.length; - if (children[position] !== viewEl) { - if (isEnd(childrenLength)) { - return list.append(viewEl); - } else { - if (position === 0) { - return children.eq(position).before(viewEl); - } else { - return children.eq(position - 1).after(viewEl); - } - } - } - } else { - method = isEnd(length) ? 'append' : 'prepend'; - return list[method](viewEl); - } - }; - } else { - return function(list, viewEl, position, length, itemSelector) { - var children, childrenLength, insertInMiddle, isEnd, last; - insertInMiddle = (0 < position && position < length); - isEnd = function(length) { - return length === 0 || position === length; - }; - if (insertInMiddle || itemSelector) { - children = filterChildren(list.children, itemSelector); - childrenLength = children.length; - if (children[position] !== viewEl) { - if (isEnd(childrenLength)) { - return list.appendChild(viewEl); - } else if (position === 0) { - return list.insertBefore(viewEl, children[position]); - } else { - last = children[position - 1]; - if (list.lastChild === last) { - return list.appendChild(viewEl); - } else { - return list.insertBefore(viewEl, last.nextElementSibling); - } - } - } - } else if (isEnd(length)) { - return list.appendChild(viewEl); - } else { - return list.insertBefore(viewEl, list.firstChild); - } - }; - } -})(); - -module.exports = CollectionView = (function(_super) { - - __extends(CollectionView, _super); - - CollectionView.prototype.itemView = null; - - CollectionView.prototype.autoRender = true; - - CollectionView.prototype.renderItems = true; - - CollectionView.prototype.animationDuration = 500; - - CollectionView.prototype.useCssAnimation = false; - - CollectionView.prototype.animationStartClass = 'animated-item-view'; - - CollectionView.prototype.animationEndClass = 'animated-item-view-end'; - - CollectionView.prototype.listSelector = null; - - CollectionView.prototype.$list = null; - - CollectionView.prototype.fallbackSelector = null; - - CollectionView.prototype.$fallback = null; - - CollectionView.prototype.loadingSelector = null; - - CollectionView.prototype.$loading = null; - - CollectionView.prototype.itemSelector = null; - - CollectionView.prototype.filterer = null; - - CollectionView.prototype.filterCallback = function(view, included) { - if ($) { - view.$el.stop(true, true); - } - return toggleElement(($ ? view.$el : view.el), included); - }; - - CollectionView.prototype.visibleItems = null; - - CollectionView.prototype.optionNames = View.prototype.optionNames.concat(['renderItems', 'itemView']); - - function CollectionView(options) { - this.renderAllItems = __bind(this.renderAllItems, this); - - this.toggleFallback = __bind(this.toggleFallback, this); - - this.itemsReset = __bind(this.itemsReset, this); - - this.itemRemoved = __bind(this.itemRemoved, this); - - this.itemAdded = __bind(this.itemAdded, this); - this.visibleItems = []; - CollectionView.__super__.constructor.apply(this, arguments); - } - - CollectionView.prototype.initialize = function(options) { - if (options == null) { - options = {}; - } - this.addCollectionListeners(); - if (options.filterer != null) { - return this.filter(options.filterer); - } - }; - - CollectionView.prototype.addCollectionListeners = function() { - this.listenTo(this.collection, 'add', this.itemAdded); - this.listenTo(this.collection, 'remove', this.itemRemoved); - return this.listenTo(this.collection, 'reset sort', this.itemsReset); - }; - - CollectionView.prototype.getTemplateData = function() { - var templateData; - templateData = { - length: this.collection.length - }; - if (typeof this.collection.isSynced === 'function') { - templateData.synced = this.collection.isSynced(); - } - return templateData; - }; - - CollectionView.prototype.getTemplateFunction = function() {}; - - CollectionView.prototype.render = function() { - var listSelector; - CollectionView.__super__.render.apply(this, arguments); - listSelector = _.result(this, 'listSelector'); - if ($) { - this.$list = listSelector ? this.$(listSelector) : this.$el; - } else { - this.list = listSelector ? this.find(this.listSelector) : this.el; - } - this.initFallback(); - this.initLoadingIndicator(); - if (this.renderItems) { - return this.renderAllItems(); - } - }; - - CollectionView.prototype.itemAdded = function(item, collection, options) { - return this.insertView(item, this.renderItem(item), options.at); - }; - - CollectionView.prototype.itemRemoved = function(item) { - return this.removeViewForItem(item); - }; - - CollectionView.prototype.itemsReset = function() { - return this.renderAllItems(); - }; - - CollectionView.prototype.initFallback = function() { - if (!this.fallbackSelector) { - return; - } - if ($) { - this.$fallback = this.$(this.fallbackSelector); - } else { - this.fallback = this.find(this.fallbackSelector); - } - this.on('visibilityChange', this.toggleFallback); - this.listenTo(this.collection, 'syncStateChange', this.toggleFallback); - return this.toggleFallback(); - }; - - CollectionView.prototype.toggleFallback = function() { - var visible; - visible = this.visibleItems.length === 0 && (typeof this.collection.isSynced === 'function' ? this.collection.isSynced() : true); - return toggleElement(($ ? this.$fallback : this.fallback), visible); - }; - - CollectionView.prototype.initLoadingIndicator = function() { - if (!(this.loadingSelector && typeof this.collection.isSyncing === 'function')) { - return; - } - if ($) { - this.$loading = this.$(this.loadingSelector); - } else { - this.loading = this.find(this.loadingSelector); - } - this.listenTo(this.collection, 'syncStateChange', this.toggleLoadingIndicator); - return this.toggleLoadingIndicator(); - }; - - CollectionView.prototype.toggleLoadingIndicator = function() { - var visible; - visible = this.collection.length === 0 && this.collection.isSyncing(); - return toggleElement(($ ? this.$loading : this.loading), visible); - }; - - CollectionView.prototype.getItemViews = function() { - var itemViews, name, view, _ref; - itemViews = {}; - if (this.subviews.length > 0) { - _ref = this.subviewsByName; - for (name in _ref) { - view = _ref[name]; - if (name.slice(0, 9) === 'itemView:') { - itemViews[name.slice(9)] = view; - } - } - } - return itemViews; - }; - - CollectionView.prototype.filter = function(filterer, filterCallback) { - var hasItemViews, included, index, item, view, _i, _len, _ref, - _this = this; - if (typeof filterer === 'function' || filterer === null) { - this.filterer = filterer; - } - if (typeof filterCallback === 'function' || filterCallback === null) { - this.filterCallback = filterCallback; - } - hasItemViews = (function() { - var name; - if (_this.subviews.length > 0) { - for (name in _this.subviewsByName) { - if (name.slice(0, 9) === 'itemView:') { - return true; - } - } - } - return false; - })(); - if (hasItemViews) { - _ref = this.collection.models; - for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) { - item = _ref[index]; - included = typeof this.filterer === 'function' ? this.filterer(item, index) : true; - view = this.subview("itemView:" + item.cid); - if (!view) { - throw new Error('CollectionView#filter: ' + ("no view found for " + item.cid)); - } - this.filterCallback(view, included); - this.updateVisibleItems(view.model, included, false); - } - } - return this.trigger('visibilityChange', this.visibleItems); - }; - - CollectionView.prototype.renderAllItems = function() { - var cid, index, item, items, remainingViewsByCid, view, _i, _j, _len, _len1, _ref; - items = this.collection.models; - this.visibleItems = []; - remainingViewsByCid = {}; - for (_i = 0, _len = items.length; _i < _len; _i++) { - item = items[_i]; - view = this.subview("itemView:" + item.cid); - if (view) { - remainingViewsByCid[item.cid] = view; - } - } - _ref = this.getItemViews(); - for (cid in _ref) { - if (!__hasProp.call(_ref, cid)) continue; - view = _ref[cid]; - if (!(cid in remainingViewsByCid)) { - this.removeSubview("itemView:" + cid); - } - } - for (index = _j = 0, _len1 = items.length; _j < _len1; index = ++_j) { - item = items[index]; - view = this.subview("itemView:" + item.cid); - if (view) { - this.insertView(item, view, index, false); - } else { - this.insertView(item, this.renderItem(item), index); - } - } - if (items.length === 0) { - return this.trigger('visibilityChange', this.visibleItems); - } - }; - - CollectionView.prototype.renderItem = function(item) { - var view; - view = this.subview("itemView:" + item.cid); - if (!view) { - view = this.initItemView(item); - this.subview("itemView:" + item.cid, view); - } - view.render(); - return view; - }; - - CollectionView.prototype.initItemView = function(model) { - if (this.itemView) { - return new this.itemView({ - autoRender: false, - model: model - }); - } else { - throw new Error('The CollectionView#itemView property ' + 'must be defined or the initItemView() must be overridden.'); - } - }; - - CollectionView.prototype.insertView = function(item, view, position, enableAnimation) { - var elem, included, length, list, - _this = this; - if (enableAnimation == null) { - enableAnimation = true; - } - if (this.animationDuration === 0) { - enableAnimation = false; - } - if (typeof position !== 'number') { - position = this.collection.indexOf(item); - } - included = typeof this.filterer === 'function' ? this.filterer(item, position) : true; - elem = $ ? view.$el : view.el; - if (included && enableAnimation) { - startAnimation(elem, this.useCssAnimation, this.animationStartClass); - } - if (this.filterer) { - this.filterCallback(view, included); - } - length = this.collection.length; - list = $ ? this.$list : this.list; - insertView(list, elem, position, length, this.itemSelector); - view.trigger('addedToParent'); - this.updateVisibleItems(item, included); - if (included && enableAnimation) { - if (this.useCssAnimation) { - setTimeout((function() { - return addClass(elem, _this.animationEndClass); - }), 0); - } else { - endAnimation(elem, this.animationDuration); - } - } - return view; - }; - - CollectionView.prototype.removeViewForItem = function(item) { - this.updateVisibleItems(item, false); - return this.removeSubview("itemView:" + item.cid); - }; - - CollectionView.prototype.updateVisibleItems = function(item, includedInFilter, triggerEvent) { - var includedInVisibleItems, visibilityChanged, visibleItemsIndex; - if (triggerEvent == null) { - triggerEvent = true; - } - visibilityChanged = false; - visibleItemsIndex = utils.indexOf(this.visibleItems, item); - includedInVisibleItems = visibleItemsIndex !== -1; - if (includedInFilter && !includedInVisibleItems) { - this.visibleItems.push(item); - visibilityChanged = true; - } else if (!includedInFilter && includedInVisibleItems) { - this.visibleItems.splice(visibleItemsIndex, 1); - visibilityChanged = true; - } - if (visibilityChanged && triggerEvent) { - this.trigger('visibilityChange', this.visibleItems); - } - return visibilityChanged; - }; - - CollectionView.prototype.dispose = function() { - var prop, properties, _i, _len; - if (this.disposed) { - return; - } - properties = ['$list', '$fallback', '$loading', 'visibleItems']; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - delete this[prop]; - } - return CollectionView.__super__.dispose.apply(this, arguments); - }; - - return CollectionView; - -})(View); - -});;loader.register('chaplin/lib/route', function(e, r, module) { -'use strict'; - -var Backbone, Controller, EventBroker, Route, utils, _, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -EventBroker = loader('chaplin/lib/event_broker'); - -Controller = loader('chaplin/controllers/controller'); - -utils = loader('chaplin/lib/utils'); - -module.exports = Route = (function() { - var escapeRegExp, optionalRegExp, paramRegExp, processTrailingSlash; - - Route.extend = Backbone.Model.extend; - - _.extend(Route.prototype, EventBroker); - - escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g; - - optionalRegExp = /\((.*?)\)/g; - - paramRegExp = /(?::|\*)(\w+)/g; - - processTrailingSlash = function(path, trailing) { - switch (trailing) { - case true: - if (path.slice(-1) !== '/') { - path += '/'; - } - break; - case false: - if (path.slice(-1) === '/') { - path = path.slice(0, -1); - } - } - return path; - }; - - function Route(pattern, controller, action, options) { - var _ref; - this.pattern = pattern; - this.controller = controller; - this.action = action; - this.handler = __bind(this.handler, this); - - this.replaceParams = __bind(this.replaceParams, this); - - this.parseOptionalPortion = __bind(this.parseOptionalPortion, this); - - if (typeof this.pattern !== 'string') { - throw new Error('Route: RegExps are not supported.\ - Use strings with :names and `constraints` option of route'); - } - this.options = options ? _.extend({}, options) : {}; - if (this.options.paramsInQS !== false) { - this.options.paramsInQS = true; - } - if (this.options.name != null) { - this.name = this.options.name; - } - if (this.name && this.name.indexOf('#') !== -1) { - throw new Error('Route: "#" cannot be used in name'); - } - if ((_ref = this.name) == null) { - this.name = this.controller + '#' + this.action; - } - this.allParams = []; - this.requiredParams = []; - this.optionalParams = []; - if (this.action in Controller.prototype) { - throw new Error('Route: You should not use existing controller ' + 'properties as action names'); - } - this.createRegExp(); - if (typeof Object.freeze === "function") { - Object.freeze(this); - } - } - - Route.prototype.matches = function(criteria) { - var invalidParamsCount, name, propertiesCount, property, _i, _len, _ref; - if (typeof criteria === 'string') { - return criteria === this.name; - } else { - propertiesCount = 0; - _ref = ['name', 'action', 'controller']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - propertiesCount++; - property = criteria[name]; - if (property && property !== this[name]) { - return false; - } - } - invalidParamsCount = propertiesCount === 1 && (name === 'action' || name === 'controller'); - return !invalidParamsCount; - } - }; - - Route.prototype.reverse = function(params, query) { - var name, raw, remainingParams, url, value, _i, _j, _len, _len1, _ref, _ref1; - params = this.normalizeParams(params); - remainingParams = _.extend({}, params); - if (params === false) { - return false; - } - url = this.pattern; - _ref = this.requiredParams; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - name = _ref[_i]; - value = params[name]; - url = url.replace(RegExp("[:*]" + name, "g"), value); - delete remainingParams[name]; - } - _ref1 = this.optionalParams; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - name = _ref1[_j]; - if (value = params[name]) { - url = url.replace(RegExp("[:*]" + name, "g"), value); - delete remainingParams[name]; - } - } - raw = url.replace(optionalRegExp, function(match, portion) { - if (portion.match(/[:*]/g)) { - return ""; - } else { - return portion; - } - }); - url = processTrailingSlash(raw, this.options.trailing); - if (typeof query !== 'object') { - query = utils.queryParams.parse(query); - } - if (this.options.paramsInQS !== false) { - _.extend(query, remainingParams); - } - if (!_.isEmpty(query)) { - url += '?' + utils.queryParams.stringify(query); - } - return url; - }; - - Route.prototype.normalizeParams = function(params) { - var paramIndex, paramName, paramsHash, _i, _len, _ref; - if (utils.isArray(params)) { - if (params.length < this.requiredParams.length) { - return false; - } - paramsHash = {}; - _ref = this.requiredParams; - for (paramIndex = _i = 0, _len = _ref.length; _i < _len; paramIndex = ++_i) { - paramName = _ref[paramIndex]; - paramsHash[paramName] = params[paramIndex]; - } - if (!this.testConstraints(paramsHash)) { - return false; - } - params = paramsHash; - } else { - if (params == null) { - params = {}; - } - if (!this.testParams(params)) { - return false; - } - } - return params; - }; - - Route.prototype.testConstraints = function(params) { - var constraint, constraints, name; - constraints = this.options.constraints; - if (constraints) { - for (name in constraints) { - if (!__hasProp.call(constraints, name)) continue; - constraint = constraints[name]; - if (!constraint.test(params[name])) { - return false; - } - } - } - return true; - }; - - Route.prototype.testParams = function(params) { - var paramName, _i, _len, _ref; - _ref = this.requiredParams; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - paramName = _ref[_i]; - if (params[paramName] === void 0) { - return false; - } - } - return this.testConstraints(params); - }; - - Route.prototype.createRegExp = function() { - var pattern, - _this = this; - pattern = this.pattern; - pattern = pattern.replace(escapeRegExp, '\\$&'); - this.replaceParams(pattern, function(match, param) { - return _this.allParams.push(param); - }); - pattern = pattern.replace(optionalRegExp, this.parseOptionalPortion); - pattern = this.replaceParams(pattern, function(match, param) { - _this.requiredParams.push(param); - return _this.paramCapturePattern(match); - }); - return this.regExp = RegExp("^" + pattern + "(?=\\/*(?=\\?|$))"); - }; - - Route.prototype.parseOptionalPortion = function(match, optionalPortion) { - var portion, - _this = this; - portion = this.replaceParams(optionalPortion, function(match, param) { - _this.optionalParams.push(param); - return _this.paramCapturePattern(match); - }); - return "(?:" + portion + ")?"; - }; - - Route.prototype.replaceParams = function(s, callback) { - return s.replace(paramRegExp, callback); - }; - - Route.prototype.paramCapturePattern = function(param) { - if (param.charAt(0) === ':') { - return '([^\/\?]+)'; - } else { - return '(.*?)'; - } - }; - - Route.prototype.test = function(path) { - var constraints, matched; - matched = this.regExp.test(path); - if (!matched) { - return false; - } - constraints = this.options.constraints; - if (constraints) { - return this.testConstraints(this.extractParams(path)); - } - return true; - }; - - Route.prototype.handler = function(pathParams, options) { - var actionParams, params, path, query, route, _ref; - options = options ? _.extend({}, options) : {}; - if (typeof pathParams === 'object') { - query = utils.queryParams.stringify(options.query); - params = pathParams; - path = this.reverse(params); - } else { - _ref = pathParams.split('?'), path = _ref[0], query = _ref[1]; - if (!(query != null)) { - query = ''; - } else { - options.query = utils.queryParams.parse(query); - } - params = this.extractParams(path); - path = processTrailingSlash(path, this.options.trailing); - } - actionParams = _.extend({}, params, this.options.params); - route = { - path: path, - action: this.action, - controller: this.controller, - name: this.name, - query: query - }; - return this.publishEvent('router:match', route, actionParams, options); - }; - - Route.prototype.extractParams = function(path) { - var index, match, matches, paramName, params, _i, _len, _ref; - params = {}; - matches = this.regExp.exec(path); - _ref = matches.slice(1); - for (index = _i = 0, _len = _ref.length; _i < _len; index = ++_i) { - match = _ref[index]; - paramName = this.allParams.length ? this.allParams[index] : index; - params[paramName] = match; - } - return params; - }; - - return Route; - -})(); - -});;loader.register('chaplin/lib/router', function(e, r, module) { -'use strict'; - -var Backbone, EventBroker, History, Route, Router, mediator, utils, _, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -mediator = loader('chaplin/mediator'); - -EventBroker = loader('chaplin/lib/event_broker'); - -History = loader('chaplin/lib/history'); - -Route = loader('chaplin/lib/route'); - -utils = loader('chaplin/lib/utils'); - -module.exports = Router = (function() { - - Router.extend = Backbone.Model.extend; - - _.extend(Router.prototype, EventBroker); - - function Router(options) { - var isWebFile; - this.options = options != null ? options : {}; - this.match = __bind(this.match, this); - - isWebFile = window.location.protocol !== 'file:'; - _.defaults(this.options, { - pushState: isWebFile, - root: '/', - trailing: false - }); - this.removeRoot = new RegExp('^' + utils.escapeRegExp(this.options.root) + '(#)?'); - this.subscribeEvent('!router:route', this.oldEventError); - this.subscribeEvent('!router:routeByName', this.oldEventError); - this.subscribeEvent('!router:changeURL', this.oldURLEventError); - this.subscribeEvent('dispatcher:dispatch', this.changeURL); - mediator.setHandler('router:route', this.route, this); - mediator.setHandler('router:reverse', this.reverse, this); - this.createHistory(); - } - - Router.prototype.oldEventError = function() { - throw new Error('!router:route and !router:routeByName events were removed.\ - Use `Chaplin.utils.redirectTo`'); - }; - - Router.prototype.oldURLEventError = function() { - throw new Error('!router:changeURL event was removed.'); - }; - - Router.prototype.createHistory = function() { - return Backbone.history = new History(); - }; - - Router.prototype.startHistory = function() { - return Backbone.history.start(this.options); - }; - - Router.prototype.stopHistory = function() { - if (Backbone.History.started) { - return Backbone.history.stop(); - } - }; - - Router.prototype.findHandler = function(predicate) { - var handler, _i, _len, _ref; - _ref = Backbone.history.handlers; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - handler = _ref[_i]; - if (predicate(handler)) { - return handler; - } - } - }; - - Router.prototype.match = function(pattern, target, options) { - var action, controller, route, _ref; - if (options == null) { - options = {}; - } - if (arguments.length === 2 && typeof target === 'object') { - options = target; - controller = options.controller, action = options.action; - if (!(controller && action)) { - throw new Error('Router#match must receive either target or ' + 'options.controller & options.action'); - } - } else { - controller = options.controller, action = options.action; - if (controller || action) { - throw new Error('Router#match cannot use both target and ' + 'options.controller / options.action'); - } - _ref = target.split('#'), controller = _ref[0], action = _ref[1]; - } - _.defaults(options, { - trailing: this.options.trailing - }); - route = new Route(pattern, controller, action, options); - Backbone.history.handlers.push({ - route: route, - callback: route.handler - }); - return route; - }; - - Router.prototype.route = function(pathDesc, params, options) { - var handler, path, pathParams; - if (typeof pathDesc === 'object') { - path = pathDesc.url; - if (!params && pathDesc.params) { - params = pathDesc.params; - } - } - params = params ? utils.isArray(params) ? params.slice() : _.extend({}, params) : {}; - if (path != null) { - path = path.replace(this.removeRoot, ''); - handler = this.findHandler(function(handler) { - return handler.route.test(path); - }); - options = params; - params = null; - } else { - options = options ? _.extend({}, options) : {}; - handler = this.findHandler(function(handler) { - if (handler.route.matches(pathDesc)) { - params = handler.route.normalizeParams(params); - if (params) { - return true; - } - } - return false; - }); - } - if (handler) { - _.defaults(options, { - changeURL: true - }); - pathParams = path != null ? path : params; - handler.callback(pathParams, options); - return true; - } else { - throw new Error('Router#route: request was not routed'); - } - }; - - Router.prototype.reverse = function(criteria, params, query) { - var handler, handlers, reversed, root, url, _i, _len; - root = this.options.root; - if ((params != null) && typeof params !== 'object') { - throw new TypeError('Router#reverse: params must be an array or an ' + 'object'); - } - handlers = Backbone.history.handlers; - for (_i = 0, _len = handlers.length; _i < _len; _i++) { - handler = handlers[_i]; - if (!(handler.route.matches(criteria))) { - continue; - } - reversed = handler.route.reverse(params, query); - if (reversed !== false) { - url = root ? root + reversed : reversed; - return url; - } - } - throw new Error("Router#reverse: invalid route criteria specified: " + (JSON.stringify(criteria))); - }; - - Router.prototype.changeURL = function(controller, params, route, options) { - var navigateOptions, url; - if (!((route.path != null) && options.changeURL)) { - return; - } - url = route.path + (route.query ? "?" + route.query : ""); - navigateOptions = { - trigger: options.trigger === true, - replace: options.replace === true - }; - return Backbone.history.navigate(url, navigateOptions); - }; - - Router.prototype.disposed = false; - - Router.prototype.dispose = function() { - if (this.disposed) { - return; - } - this.stopHistory(); - delete Backbone.history; - this.unsubscribeAllEvents(); - mediator.removeHandlers(this); - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Router; - -})(); - -});;loader.register('chaplin/lib/history', function(e, r, module) { -'use strict'; - -var Backbone, History, isExplorer, rootStripper, routeStripper, trailingSlash, _, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -routeStripper = /^[#\/]|\s+$/g; - -rootStripper = /^\/+|\/+$/g; - -isExplorer = /msie [\w.]+/; - -trailingSlash = /\/$/; - -History = (function(_super) { - - __extends(History, _super); - - function History() { - return History.__super__.constructor.apply(this, arguments); - } - - History.prototype.getFragment = function(fragment, forcePushState) { - var root; - if (!(fragment != null)) { - if (this._hasPushState || !this._wantsHashChange || forcePushState) { - fragment = this.location.pathname + this.location.search; - root = this.root.replace(trailingSlash, ''); - if (!fragment.indexOf(root)) { - fragment = fragment.substr(root.length); - } - } else { - fragment = this.getHash(); - } - } - return fragment.replace(routeStripper, ''); - }; - - History.prototype.start = function(options) { - var atRoot, fragment, loc, _ref, _ref1; - if (Backbone.History.started) { - throw new Error('Backbone.history has already been started'); - } - Backbone.History.started = true; - this.options = _.extend({}, { - root: '/' - }, this.options, options); - this.root = this.options.root; - this._wantsHashChange = this.options.hashChange !== false; - this._wantsPushState = Boolean(this.options.pushState); - this._hasPushState = Boolean(this.options.pushState && this.history && this.history.pushState); - fragment = this.getFragment(); - routeStripper = (_ref = this.options.routeStripper) != null ? _ref : routeStripper; - rootStripper = (_ref1 = this.options.rootStripper) != null ? _ref1 : rootStripper; - this.root = ('/' + this.root + '/').replace(rootStripper, '/'); - if (this._hasPushState) { - Backbone.$(window).on('popstate', this.checkUrl); - } else if (this._wantsHashChange && 'onhashchange' in window) { - Backbone.$(window).on('hashchange', this.checkUrl); - } else if (this._wantsHashChange) { - this._checkUrlInterval = setInterval(this.checkUrl, this.interval); - } - this.fragment = fragment; - loc = this.location; - atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root; - if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) { - this.fragment = this.getFragment(null, true); - this.location.replace(this.root + '#' + this.fragment); - return true; - } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) { - this.fragment = this.getHash().replace(routeStripper, ''); - this.history.replaceState({}, document.title, this.root + this.fragment); - } - if (!this.options.silent) { - return this.loadUrl(); - } - }; - - History.prototype.navigate = function(fragment, options) { - var historyMethod, isSameFragment, url; - if (fragment == null) { - fragment = ''; - } - if (!Backbone.History.started) { - return false; - } - if (!options || options === true) { - options = { - trigger: options - }; - } - fragment = this.getFragment(fragment); - url = this.root + fragment; - if (this.fragment === fragment) { - return false; - } - this.fragment = fragment; - if (fragment.length === 0 && url !== '/' && (url !== this.root || this.options.trailing !== true)) { - url = url.slice(0, -1); - } - if (this._hasPushState) { - historyMethod = options.replace ? 'replaceState' : 'pushState'; - this.history[historyMethod]({}, document.title, url); - } else if (this._wantsHashChange) { - this._updateHash(this.location, fragment, options.replace); - isSameFragment = fragment !== this.getFragment(this.getHash(this.iframe)); - if ((this.iframe != null) && isSameFragment) { - if (!options.replace) { - this.iframe.document.open().close(); - } - this._updateHash(this.iframe.location, fragment, options.replace); - } - } else { - return this.location.assign(url); - } - if (options.trigger) { - return this.loadUrl(fragment); - } - }; - - return History; - -})(Backbone.History); - -module.exports = Backbone.$ ? History : Backbone.History; - -});;loader.register('chaplin/lib/event_broker', function(e, r, module) { -'use strict'; - -var EventBroker, mediator, - __slice = [].slice; - -mediator = loader('chaplin/mediator'); - -EventBroker = { - subscribeEvent: function(type, handler) { - if (typeof type !== 'string') { - throw new TypeError('EventBroker#subscribeEvent: ' + 'type argument must be a string'); - } - if (typeof handler !== 'function') { - throw new TypeError('EventBroker#subscribeEvent: ' + 'handler argument must be a function'); - } - mediator.unsubscribe(type, handler, this); - return mediator.subscribe(type, handler, this); - }, - subscribeEventOnce: function(type, handler) { - if (typeof type !== 'string') { - throw new TypeError('EventBroker#subscribeEventOnce: ' + 'type argument must be a string'); - } - if (typeof handler !== 'function') { - throw new TypeError('EventBroker#subscribeEventOnce: ' + 'handler argument must be a function'); - } - mediator.unsubscribe(type, handler, this); - return mediator.subscribeOnce(type, handler, this); - }, - unsubscribeEvent: function(type, handler) { - if (typeof type !== 'string') { - throw new TypeError('EventBroker#unsubscribeEvent: ' + 'type argument must be a string'); - } - if (typeof handler !== 'function') { - throw new TypeError('EventBroker#unsubscribeEvent: ' + 'handler argument must be a function'); - } - return mediator.unsubscribe(type, handler); - }, - unsubscribeAllEvents: function() { - return mediator.unsubscribe(null, null, this); - }, - publishEvent: function() { - var args, type; - type = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - if (typeof type !== 'string') { - throw new TypeError('EventBroker#publishEvent: ' + 'type argument must be a string'); - } - return mediator.publish.apply(mediator, [type].concat(__slice.call(args))); - } -}; - -if (typeof Object.freeze === "function") { - Object.freeze(EventBroker); -} - -module.exports = EventBroker; - -});;loader.register('chaplin/lib/support', function(e, r, module) { -'use strict'; - -var support; - -support = { - propertyDescriptors: (function() { - var o; - if (!(typeof Object.defineProperty === 'function' && typeof Object.defineProperties === 'function')) { - return false; - } - try { - o = {}; - Object.defineProperty(o, 'foo', { - value: 'bar' - }); - return o.foo === 'bar'; - } catch (error) { - return false; - } - })() -}; - -module.exports = support; - -});;loader.register('chaplin/lib/composition', function(e, r, module) { -'use strict'; - -var Backbone, Composition, EventBroker, has, _, - __hasProp = {}.hasOwnProperty; - -_ = loader('underscore'); - -Backbone = loader('backbone'); - -EventBroker = loader('chaplin/lib/event_broker'); - -has = Object.prototype.hasOwnProperty; - -module.exports = Composition = (function() { - - Composition.extend = Backbone.Model.extend; - - _.extend(Composition.prototype, Backbone.Events); - - _.extend(Composition.prototype, EventBroker); - - Composition.prototype.item = null; - - Composition.prototype.options = null; - - Composition.prototype._stale = false; - - function Composition(options) { - if (options != null) { - this.options = _.extend({}, options); - } - this.item = this; - this.initialize(this.options); - } - - Composition.prototype.initialize = function() {}; - - Composition.prototype.compose = function() {}; - - Composition.prototype.check = function(options) { - return _.isEqual(this.options, options); - }; - - Composition.prototype.stale = function(value) { - var item, name; - if (value == null) { - return this._stale; - } - this._stale = value; - for (name in this) { - item = this[name]; - if (item && item !== this && typeof item === 'object' && has.call(item, 'stale')) { - item.stale = value; - } - } - }; - - Composition.prototype.disposed = false; - - Composition.prototype.dispose = function() { - var obj, prop, properties, _i, _len; - if (this.disposed) { - return; - } - for (prop in this) { - if (!__hasProp.call(this, prop)) continue; - obj = this[prop]; - if (obj && typeof obj.dispose === 'function') { - if (obj !== this) { - obj.dispose(); - delete this[prop]; - } - } - } - this.unsubscribeAllEvents(); - this.stopListening(); - properties = ['redirected']; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - delete this[prop]; - } - this.disposed = true; - return typeof Object.freeze === "function" ? Object.freeze(this) : void 0; - }; - - return Composition; - -})(); - -});;loader.register('chaplin/lib/sync_machine', function(e, r, module) { -'use strict'; - -var STATE_CHANGE, SYNCED, SYNCING, SyncMachine, UNSYNCED, event, _fn, _i, _len, _ref; - -UNSYNCED = 'unsynced'; - -SYNCING = 'syncing'; - -SYNCED = 'synced'; - -STATE_CHANGE = 'syncStateChange'; - -SyncMachine = { - _syncState: UNSYNCED, - _previousSyncState: null, - syncState: function() { - return this._syncState; - }, - isUnsynced: function() { - return this._syncState === UNSYNCED; - }, - isSynced: function() { - return this._syncState === SYNCED; - }, - isSyncing: function() { - return this._syncState === SYNCING; - }, - unsync: function() { - var _ref; - if ((_ref = this._syncState) === SYNCING || _ref === SYNCED) { - this._previousSync = this._syncState; - this._syncState = UNSYNCED; - this.trigger(this._syncState, this, this._syncState); - this.trigger(STATE_CHANGE, this, this._syncState); - } - }, - beginSync: function() { - var _ref; - if ((_ref = this._syncState) === UNSYNCED || _ref === SYNCED) { - this._previousSync = this._syncState; - this._syncState = SYNCING; - this.trigger(this._syncState, this, this._syncState); - this.trigger(STATE_CHANGE, this, this._syncState); - } - }, - finishSync: function() { - if (this._syncState === SYNCING) { - this._previousSync = this._syncState; - this._syncState = SYNCED; - this.trigger(this._syncState, this, this._syncState); - this.trigger(STATE_CHANGE, this, this._syncState); - } - }, - abortSync: function() { - if (this._syncState === SYNCING) { - this._syncState = this._previousSync; - this._previousSync = this._syncState; - this.trigger(this._syncState, this, this._syncState); - this.trigger(STATE_CHANGE, this, this._syncState); - } - } -}; - -_ref = [UNSYNCED, SYNCING, SYNCED, STATE_CHANGE]; -_fn = function(event) { - return SyncMachine[event] = function(callback, context) { - if (context == null) { - context = this; - } - this.on(event, callback, context); - if (this._syncState === event) { - return callback.call(context); - } - }; -}; -for (_i = 0, _len = _ref.length; _i < _len; _i++) { - event = _ref[_i]; - _fn(event); -} - -if (typeof Object.freeze === "function") { - Object.freeze(SyncMachine); -} - -module.exports = SyncMachine; - -});;loader.register('chaplin/lib/utils', function(e, r, module) { -'use strict'; - -var support, utils, _, - __slice = [].slice, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __hasProp = {}.hasOwnProperty; - -_ = loader('underscore'); - -support = loader('chaplin/lib/support'); - -utils = { - beget: (function() { - var ctor; - if (typeof Object.create === 'function') { - return Object.create; - } else { - ctor = function() {}; - return function(obj) { - ctor.prototype = obj; - return new ctor; - }; - } - })(), - indexOf: (function() { - if (Array.prototype.indexOf) { - return function(list, index) { - return list.indexOf(index); - }; - } else if (_.indexOf) { - return _.indexOf; - } - })(), - isArray: Array.isArray || _.isArray, - serialize: function(data) { - if (typeof data.serialize === 'function') { - return data.serialize(); - } else if (typeof data.toJSON === 'function') { - return data.toJSON(); - } else { - throw new TypeError('utils.serialize: Unknown data was passed'); - } - }, - readonly: (function() { - var readonlyDescriptor; - if (support.propertyDescriptors) { - readonlyDescriptor = { - writable: false, - enumerable: true, - configurable: false - }; - return function() { - var obj, prop, properties, _i, _len; - obj = arguments[0], properties = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - for (_i = 0, _len = properties.length; _i < _len; _i++) { - prop = properties[_i]; - readonlyDescriptor.value = obj[prop]; - Object.defineProperty(obj, prop, readonlyDescriptor); - } - return true; - }; - } else { - return function() { - return false; - }; - } - })(), - getPrototypeChain: function(object) { - var chain, _ref, _ref1, _ref2, _ref3; - chain = [object.constructor.prototype]; - while (object = (_ref = (_ref1 = object.constructor) != null ? (_ref2 = _ref1.superclass) != null ? _ref2.prototype : void 0 : void 0) != null ? _ref : (_ref3 = object.constructor) != null ? _ref3.__super__ : void 0) { - chain.push(object); - } - return chain.reverse(); - }, - getAllPropertyVersions: function(object, property) { - var proto, result, value, _i, _len, _ref; - result = []; - _ref = utils.getPrototypeChain(object); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - proto = _ref[_i]; - value = proto[property]; - if (value && __indexOf.call(result, value) < 0) { - result.push(value); - } - } - return result; - }, - upcase: function(str) { - return str.charAt(0).toUpperCase() + str.substring(1); - }, - escapeRegExp: function(str) { - return String(str || '').replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1'); - }, - modifierKeyPressed: function(event) { - return event.shiftKey || event.altKey || event.ctrlKey || event.metaKey; - }, - reverse: function(criteria, params, query) { - return loader('chaplin/mediator').execute('router:reverse', criteria, params, query); - }, - redirectTo: function(pathDesc, params, options) { - return loader('chaplin/mediator').execute('router:route', pathDesc, params, options); - }, - querystring: { - stringify: function(queryParams) { - var arrParam, encodedKey, key, query, stringifyKeyValuePair, value, _i, _len; - query = ''; - stringifyKeyValuePair = function(encodedKey, value) { - if (value != null) { - return '&' + encodedKey + '=' + encodeURIComponent(value); - } else { - return ''; - } - }; - for (key in queryParams) { - if (!__hasProp.call(queryParams, key)) continue; - value = queryParams[key]; - encodedKey = encodeURIComponent(key); - if (utils.isArray(value)) { - for (_i = 0, _len = value.length; _i < _len; _i++) { - arrParam = value[_i]; - query += stringifyKeyValuePair(encodedKey, arrParam); - } - } else { - query += stringifyKeyValuePair(encodedKey, value); - } - } - return query && query.substring(1); - }, - parse: function(queryString) { - var current, field, pair, pairs, params, value, _i, _len, _ref; - params = {}; - if (!queryString) { - return params; - } - queryString = queryString.slice(queryString.indexOf('?') + 1); - pairs = queryString.split('&'); - for (_i = 0, _len = pairs.length; _i < _len; _i++) { - pair = pairs[_i]; - if (!pair.length) { - continue; - } - _ref = pair.split('='), field = _ref[0], value = _ref[1]; - if (!field.length) { - continue; - } - field = decodeURIComponent(field); - value = decodeURIComponent(value); - current = params[field]; - if (current) { - if (current.push) { - current.push(value); - } else { - params[field] = [current, value]; - } - } else { - params[field] = value; - } - } - return params; - } - } -}; - -utils.queryParams = utils.querystring; - -if (typeof Object.seal === "function") { - Object.seal(utils); -} - -module.exports = utils; - -});;loader.register('chaplin', function(e, r, module) { - -module.exports = { - Application: loader('chaplin/application'), - mediator: loader('chaplin/mediator'), - Dispatcher: loader('chaplin/dispatcher'), - Controller: loader('chaplin/controllers/controller'), - Composer: loader('chaplin/composer'), - Composition: loader('chaplin/lib/composition'), - Collection: loader('chaplin/models/collection'), - Model: loader('chaplin/models/model'), - Layout: loader('chaplin/views/layout'), - View: loader('chaplin/views/view'), - CollectionView: loader('chaplin/views/collection_view'), - Route: loader('chaplin/lib/route'), - Router: loader('chaplin/lib/router'), - EventBroker: loader('chaplin/lib/event_broker'), - support: loader('chaplin/lib/support'), - SyncMachine: loader('chaplin/lib/sync_machine'), - utils: loader('chaplin/lib/utils') -}; - -}); -var regDeps = function(Backbone, _) { - loader.register('backbone', function(exports, require, module) { - module.exports = Backbone; - }); - loader.register('underscore', function(exports, require, module) { - module.exports = _; - }); -}; - -if (typeof define === 'function' && define.amd) { - define(['backbone', 'underscore'], function(Backbone, _) { - regDeps(Backbone, _); - return loader('chaplin'); - }); -} else if (typeof module === 'object' && module && module.exports) { - regDeps(require('backbone'), require('underscore')); - module.exports = loader('chaplin'); -} else if (typeof require === 'function') { - regDeps(window.Backbone, window._ || window.Backbone.utils); - window.Chaplin = loader('chaplin'); -} else { - throw new Error('Chaplin requires Common.js or AMD modules'); -} - -})(); \ No newline at end of file diff --git a/examples/chaplin-brunch/node_modules/exoskeleton/exoskeleton.js b/examples/chaplin-brunch/node_modules/exoskeleton/exoskeleton.js deleted file mode 100644 index 8bf783a937..0000000000 --- a/examples/chaplin-brunch/node_modules/exoskeleton/exoskeleton.js +++ /dev/null @@ -1,1960 +0,0 @@ -/*! - * Exoskeleton.js 0.6.3 - * (c) 2013 Paul Miller - * Based on Backbone.js - * (c) 2010-2013 Jeremy Ashkenas, DocumentCloud - * Exoskeleton may be freely distributed under the MIT license. - * For all details and documentation: - */ - -(function(root, factory) { - // Set up Backbone appropriately for the environment. - if (typeof define === 'function' && define.amd) { - define(['underscore', 'jquery', 'exports'], function(_, $, exports) { - root.Backbone = root.Exoskeleton = factory(root, exports, _, $); - }); - } else if (typeof exports !== 'undefined') { - var _, $; - try { _ = require('underscore'); } catch(e) { } - try { $ = require('jquery'); } catch(e) { } - factory(root, exports, _, $); - } else { - root.Backbone = root.Exoskeleton = factory(root, {}, root._, (root.jQuery || root.Zepto || root.ender || root.$)); - } - -})(this, function(root, Backbone, _, $) { - 'use strict'; - - // Initial Setup - // ------------- - - // Save the previous value of the `Backbone` variable, so that it can be - // restored later on, if `noConflict` is used. - var previousBackbone = root.Backbone; - var previousExoskeleton = root.Exoskeleton; - - // Underscore replacement. - var utils = Backbone.utils = _ = (_ || {}); - - // Hold onto a local reference to `$`. Can be changed at any point. - Backbone.$ = $; - - // Create local references to array methods we'll want to use later. - var array = []; - var push = array.push; - var slice = array.slice; - var toString = ({}).toString; - - // Current version of the library. Keep in sync with `package.json`. - // Backbone.VERSION = '1.0.0'; - - // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable - // to its previous owner. Returns a reference to this Backbone object. - Backbone.noConflict = function() { - root.Backbone = previousBackbone; - root.Exoskeleton = previousExoskeleton; - return this; - }; - - // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option - // will fake `"PATCH"`, `"PUT"` and `"DELETE"` requests via the `_method` parameter and - // set a `X-Http-Method-Override` header. - Backbone.emulateHTTP = false; - - // Turn on `emulateJSON` to support legacy servers that can't deal with direct - // `application/json` requests ... will encode the body as - // `application/x-www-form-urlencoded` instead and will send the model in a - // form param named `model`. - Backbone.emulateJSON = false; - - // Helpers - // ------- - - // Helper function to correctly set up the prototype chain, for subclasses. - // Similar to `goog.inherits`, but uses a hash of prototype properties and - // class properties to be extended. - Backbone.extend = function(protoProps, staticProps) { - var parent = this; - var child; - - // The constructor function for the new subclass is either defined by you - // (the "constructor" property in your `extend` definition), or defaulted - // by us to simply call the parent's constructor. - if (protoProps && hasOwnProperty.call(protoProps, 'constructor')) { - child = protoProps.constructor; - } else { - child = function(){ return parent.apply(this, arguments); }; - } - - // Add static properties to the constructor function, if supplied. - _.extend(child, parent, staticProps); - - // Set the prototype chain to inherit from `parent`, without calling - // `parent`'s constructor function. - var Surrogate = function(){ this.constructor = child; }; - Surrogate.prototype = parent.prototype; - child.prototype = new Surrogate; - - // Add prototype properties (instance properties) to the subclass, - // if supplied. - if (protoProps) _.extend(child.prototype, protoProps); - - // Set a convenience property in case the parent's prototype is needed - // later. - child.__super__ = parent.prototype; - - return child; - }; - - // Throw an error when a URL is needed, and none is supplied. - var urlError = function() { - throw new Error('A "url" property or function must be specified'); - }; - - // Wrap an optional error callback with a fallback error event. - var wrapError = function(model, options) { - var error = options.error; - options.error = function(resp) { - if (error) error(model, resp, options); - model.trigger('error', model, resp, options); - }; - }; - - // Checker for utility methods. Useful for custom builds. - var utilExists = function(method) { - return typeof _[method] === 'function'; - }; -utils.result = function result(object, property) { - var value = object ? object[property] : undefined; - return typeof value === 'function' ? object[property]() : value; -}; - -utils.defaults = function defaults(obj) { - slice.call(arguments, 1).forEach(function(item) { - for (var key in item) if (obj[key] === undefined) - obj[key] = item[key]; - }); - return obj; -}; - -utils.extend = function extend(obj) { - slice.call(arguments, 1).forEach(function(item) { - for (var key in item) obj[key] = item[key]; - }); - return obj; -}; - -var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' -}; - -utils.escape = function escape(string) { - return string == null ? '' : String(string).replace(/[&<>"']/g, function(match) { - return htmlEscapes[match]; - }); -}; - -utils.sortBy = function(obj, value, context) { - var iterator = typeof value === 'function' ? value : function(obj){ return obj[value]; }; - return obj - .map(function(value, index, list) { - return { - value: value, - index: index, - criteria: iterator.call(context, value, index, list) - }; - }) - .sort(function(left, right) { - var a = left.criteria; - var b = right.criteria; - if (a !== b) { - if (a > b || a === void 0) return 1; - if (a < b || b === void 0) return -1; - } - return left.index - right.index; - }) - .map(function(item) { - return item.value; - }); -}; - -/** Used to generate unique IDs */ -var idCounter = 0; - -utils.uniqueId = function uniqueId(prefix) { - var id = ++idCounter + ''; - return prefix ? prefix + id : id; -}; - -var eq = function(a, b, aStack, bStack) { - // Identical objects are equal. `0 === -0`, but they aren't identical. - // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal). - if (a === b) return a !== 0 || 1 / a == 1 / b; - // A strict comparison is necessary because `null == undefined`. - if (a == null || b == null) return a === b; - // Unwrap any wrapped objects. - //if (a instanceof _) a = a._wrapped; - //if (b instanceof _) b = b._wrapped; - // Compare `[[Class]]` names. - var className = toString.call(a); - if (className != toString.call(b)) return false; - switch (className) { - // Strings, numbers, dates, and booleans are compared by value. - case '[object String]': - // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is - // equivalent to `new String("5")`. - return a == String(b); - case '[object Number]': - // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for - // other numeric values. - return a !== +a ? b !== +b : (a === 0 ? 1 / a === 1 / b : a === +b); - case '[object Date]': - case '[object Boolean]': - // Coerce dates and booleans to numeric primitive values. Dates are compared by their - // millisecond representations. Note that invalid dates with millisecond representations - // of `NaN` are not equivalent. - return +a == +b; - // RegExps are compared by their source patterns and flags. - case '[object RegExp]': - return a.source == b.source && - a.global == b.global && - a.multiline == b.multiline && - a.ignoreCase == b.ignoreCase; - } - if (typeof a != 'object' || typeof b != 'object') return false; - // Assume equality for cyclic structures. The algorithm for detecting cyclic - // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. - var length = aStack.length; - while (length--) { - // Linear search. Performance is inversely proportional to the number of - // unique nested structures. - if (aStack[length] == a) return bStack[length] == b; - } - // Objects with different constructors are not equivalent, but `Object`s - // from different frames are. - var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(typeof aCtor === 'function' && (aCtor instanceof aCtor) && - typeof bCtor === 'function' && (bCtor instanceof bCtor))) { - return false; - } - // Add the first object to the stack of traversed objects. - aStack.push(a); - bStack.push(b); - var size = 0, result = true; - // Recursively compare objects and arrays. - if (className === '[object Array]') { - // Compare array lengths to determine if a deep comparison is necessary. - size = a.length; - result = size === b.length; - if (result) { - // Deep compare the contents, ignoring non-numeric properties. - while (size--) { - if (!(result = eq(a[size], b[size], aStack, bStack))) break; - } - } - } else { - // Deep compare objects. - for (var key in a) { - if (hasOwnProperty.call(a, key)) { - // Count the expected number of properties. - size++; - // Deep compare each member. - if (!(result = hasOwnProperty.call(b, key) && eq(a[key], b[key], aStack, bStack))) break; - } - } - // Ensure that both objects contain the same number of properties. - if (result) { - for (key in b) { - if (hasOwnProperty.call(b, key) && !(size--)) break; - } - result = !size; - } - } - // Remove the first object from the stack of traversed objects. - aStack.pop(); - bStack.pop(); - return result; -}; - -// Perform a deep comparison to check if two objects are equal. -utils.isEqual = function(a, b) { - return eq(a, b, [], []); -}; -// Usage: -// utils.matchesSelector(div, '.something'); -utils.matchesSelector = (function() { - if (typeof document === 'undefined') return; - // Suffix. - var sfx = 'MatchesSelector'; - var tag = document.createElement('div'); - var name; - // Detect the right suffix. - ['matches', 'webkit' + sfx, 'moz' + sfx, 'ms' + sfx].some(function(item) { - var valid = (item in tag); - name = item; - return valid; - }); - if (!name) throw new Error('Element#matches is not supported'); - return function(element, selector) { - return element[name](selector); - }; -})(); - -utils.delegate = function(view, eventName, selector, callback) { - if (typeof selector === 'function') { - callback = selector; - selector = null; - } - - if (typeof callback !== 'function') { - throw new TypeError('View#delegate expects callback function'); - } - - var root = view.el; - var bound = callback.bind(view); - var handler = selector ? function(event) { - for (var el = event.target; el && el !== root; el = el.parentNode) { - if (utils.matchesSelector(el, selector)) { - // event.currentTarget or event.target are read-only. - event.delegateTarget = el; - return bound(event); - } - } - } : bound; - - root.addEventListener(eventName, handler, false); - view._handlers.push({ - eventName: eventName, selector: selector, - callback: callback, handler: handler - }); - return handler; -}; - -utils.undelegate = function(view, eventName, selector, callback) { - if (typeof selector === 'function') { - callback = selector; - selector = null; - } - - var handlers = view._handlers; - var removeListener = function(item) { - view.el.removeEventListener(item.eventName, item.handler, false); - }; - - // Remove all handlers. - if (!eventName && !selector && !callback) { - handlers.forEach(removeListener); - view._handlers = []; - } else { - // Remove some handlers. - handlers - .filter(function(item) { - return item.eventName === eventName && - (callback ? item.callback === callback : true) && - (selector ? item.selector === selector : true); - }) - .forEach(function(item) { - removeListener(item); - handlers.splice(handlers.indexOf(item), 1); - }); - } -}; - -// Make AJAX request to the server. -// Usage: -// var callback = function(error, data) {console.log('Done.', error, data);}; -// ajax({url: 'url', type: 'PATCH', data: 'data'}, callback); -utils.ajax = (function() { - var xmlRe = /^(?:application|text)\/xml/; - var jsonRe = /^application\/json/; - - var getData = function(accepts, xhr) { - if (accepts == null) accepts = xhr.getResponseHeader('content-type'); - if (xmlRe.test(accepts)) { - return xhr.responseXML; - } else if (jsonRe.test(accepts)) { - return JSON.parse(xhr.responseText); - } else { - return xhr.responseText; - } - }; - - var isValid = function(xhr) { - return (xhr.status >= 200 && xhr.status < 300) || - (xhr.status === 304) || - (xhr.status === 0 && window.location.protocol === 'file:') - }; - - var end = function(xhr, options, deferred) { - return function() { - if (xhr.readyState !== 4) return; - - var status = xhr.status; - var data = getData(options.headers && options.headers.Accept, xhr); - - // Check for validity. - if (isValid(xhr)) { - if (options.success) options.success(data); - if (deferred) deferred.resolve(data); - } else { - var error = new Error('Server responded with a status of ' + status); - if (options.error) options.error(xhr, status, error); - if (deferred) deferred.reject(xhr); - } - } - }; - - return function(options) { - if (options == null) throw new Error('You must provide options'); - if (options.type == null) options.type = 'GET'; - - var xhr = new XMLHttpRequest(); - var deferred = Backbone.Deferred && Backbone.Deferred(); - - if (options.contentType) { - if (options.headers == null) options.headers = {}; - options.headers['Content-Type'] = options.contentType; - } - - // Stringify GET query params. - if (options.type === 'GET' && typeof options.data === 'object') { - var query = ''; - var stringifyKeyValuePair = function(key, value) { - return value == null ? '' : - '&' + encodeURIComponent(key) + - '=' + encodeURIComponent(value); - }; - for (var key in options.data) { - query += stringifyKeyValuePair(key, options.data[key]); - } - - if (query) { - var sep = (options.url.indexOf('?') === -1) ? '?' : '&'; - options.url += sep + query.substring(1); - } - } - - if (options.credentials) options.withCredentials = true; - xhr.addEventListener('readystatechange', end(xhr, options, deferred)); - xhr.open(options.type, options.url, true); - if (options.headers) for (var key in options.headers) { - xhr.setRequestHeader(key, options.headers[key]); - } - if (options.beforeSend) options.beforeSend(xhr); - xhr.send(options.data); - - return deferred ? deferred.promise : undefined; - }; -})(); -// Backbone.Events -// --------------- - -// A module that can be mixed in to *any object* in order to provide it with -// custom events. You may bind with `on` or remove with `off` callback -// functions to an event; `trigger`-ing an event fires all callbacks in -// succession. -// -// var object = {}; -// _.extend(object, Backbone.Events); -// object.on('expand', function(){ alert('expanded'); }); -// object.trigger('expand'); -// -var Events = Backbone.Events = { - - // Bind an event to a `callback` function. Passing `"all"` will bind - // the callback to all events fired. - on: function(name, callback, context) { - if (!eventsApi(this, 'on', name, [callback, context]) || !callback) - return this; - this._events || (this._events = {}); - var events = this._events[name] || (this._events[name] = []); - events.push({callback: callback, context: context, ctx: context || this}); - return this; - }, - - // Bind an event to only be triggered a single time. After the first time - // the callback is invoked, it will be removed. - once: function(name, callback, context) { - if (!eventsApi(this, 'once', name, [callback, context]) || !callback) - return this; - var self = this; - var ran; - - var once = function() { - if (ran) return; - ran = true; - self.off(name, once); - callback.apply(this, arguments); - }; - once._callback = callback; - return this.on(name, once, context); - }, - - // Remove one or many callbacks. If `context` is null, removes all - // callbacks with that function. If `callback` is null, removes all - // callbacks for the event. If `name` is null, removes all bound - // callbacks for all events. - off: function(name, callback, context) { - var retain, ev, events, names, i, l, j, k; - if (!this._events || !eventsApi(this, 'off', name, [callback, context])) - return this; - if (!name && !callback && !context) { - this._events = undefined; - return this; - } - - names = name ? [name] : Object.keys(this._events); - for (i = 0, l = names.length; i < l; i++) { - name = names[i]; - if (events = this._events[name]) { - this._events[name] = retain = []; - if (callback || context) { - for (j = 0, k = events.length; j < k; j++) { - ev = events[j]; - if ((callback && callback !== ev.callback && - callback !== ev.callback._callback) || - (context && context !== ev.context)) { - retain.push(ev); - } - } - } - if (!retain.length) delete this._events[name]; - } - } - - return this; - }, - - // Trigger one or many events, firing all bound callbacks. Callbacks are - // passed the same arguments as `trigger` is, apart from the event name - // (unless you're listening on `"all"`, which will cause your callback to - // receive the true name of the event as the first argument). - trigger: function(name) { - if (!this._events) return this; - var args = slice.call(arguments, 1); - if (!eventsApi(this, 'trigger', name, args)) return this; - var events = this._events[name]; - var allEvents = this._events.all; - if (events) triggerEvents(events, args); - if (allEvents) triggerEvents(allEvents, arguments); - return this; - }, - - // Tell this object to stop listening to either specific events ... or - // to every object it's currently listening to. - stopListening: function(obj, name, callback) { - var listeningTo = this._listeningTo; - if (!listeningTo) return this; - var remove = !name && !callback; - if (!callback && typeof name === 'object') callback = this; - if (obj) (listeningTo = {})[obj._listenId] = obj; - for (var id in listeningTo) { - obj = listeningTo[id]; - obj.off(name, callback, this); - if (remove || !Object.keys(obj._events).length) { - delete this._listeningTo[id]; - } - } - return this; - } - -}; - -// Regular expression used to split event strings. -var eventSplitter = /\s+/; - -// Implement fancy features of the Events API such as multiple event -// names `"change blur"` and jQuery-style event maps `{change: action}` -// in terms of the existing API. -var eventsApi = function(obj, action, name, rest) { - if (!name) return true; - var arr; - - // Handle event maps. - if (typeof name === 'object') { - for (var key in name) { - arr = [key, name[key]]; - push.apply(arr, rest); - obj[action].apply(obj, arr); - } - return false; - } - - // Handle space separated event names. - if (eventSplitter.test(name)) { - var names = name.split(eventSplitter); - for (var i = 0, l = names.length; i < l; i++) { - arr = [names[i]]; - push.apply(arr, rest); - obj[action].apply(obj, arr); - } - return false; - } - - return true; -}; - -// A difficult-to-believe, but optimized internal dispatch function for -// triggering events. Tries to keep the usual cases speedy (most internal -// Backbone events have 3 arguments). -var triggerEvents = function(events, args) { - var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; - switch (args.length) { - case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return; - case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return; - case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return; - case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return; - default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args); - } -}; - -var listenMethods = {listenTo: 'on', listenToOnce: 'once'}; - -// Inversion-of-control versions of `on` and `once`. Tell *this* object to -// listen to an event in another object ... keeping track of what it's -// listening to. -Object.keys(listenMethods).forEach(function(method) { - var implementation = listenMethods[method]; - Events[method] = function(obj, name, callback) { - var listeningTo = this._listeningTo || (this._listeningTo = {}); - var id = obj._listenId || (obj._listenId = _.uniqueId('l')); - listeningTo[id] = obj; - if (!callback && typeof name === 'object') callback = this; - obj[implementation](name, callback, this); - return this; - }; -}); - -// Aliases for backwards compatibility. -Events.bind = Events.on; -Events.unbind = Events.off; -// Backbone.Model -// -------------- - -// Backbone **Models** are the basic data object in the framework -- -// frequently representing a row in a table in a database on your server. -// A discrete chunk of data and a bunch of useful, related methods for -// performing computations and transformations on that data. - -// Create a new model with the specified attributes. A client id (`cid`) -// is automatically generated and assigned for you. -var Model = Backbone.Model = function(attributes, options) { - var attrs = attributes || {}; - options || (options = {}); - this.cid = _.uniqueId('c'); - this.attributes = Object.create(null); - if (options.collection) this.collection = options.collection; - if (options.parse) attrs = this.parse(attrs, options) || {}; - attrs = _.defaults({}, attrs, _.result(this, 'defaults')); - this.set(attrs, options); - this.changed = Object.create(null); - this.initialize.apply(this, arguments); -}; - -// Attach all inheritable methods to the Model prototype. -_.extend(Model.prototype, Events, { - - // A hash of attributes whose current and previous value differ. - changed: null, - - // The value returned during the last failed validation. - validationError: null, - - // The default name for the JSON `id` attribute is `"id"`. MongoDB and - // CouchDB users may want to set this to `"_id"`. - idAttribute: 'id', - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // Return a copy of the model's `attributes` object. - toJSON: function(options) { - return _.extend(Object.create(null), this.attributes); - }, - - // Proxy `Backbone.sync` by default -- but override this if you need - // custom syncing semantics for *this* particular model. - sync: function() { - return Backbone.sync.apply(this, arguments); - }, - - // Get the value of an attribute. - get: function(attr) { - return this.attributes[attr]; - }, - - // Get the HTML-escaped value of an attribute. - escape: function(attr) { - return _.escape(this.get(attr)); - }, - - // Returns `true` if the attribute contains a value that is not null - // or undefined. - has: function(attr) { - return this.get(attr) != null; - }, - - // Set a hash of model attributes on the object, firing `"change"`. This is - // the core primitive operation of a model, updating the data and notifying - // anyone who needs to know about the change in state. The heart of the beast. - set: function(key, val, options) { - var attr, attrs, unset, changes, silent, changing, prev, current; - if (key == null) return this; - - // Handle both `"key", value` and `{key: value}` -style arguments. - if (typeof key === 'object') { - attrs = key; - options = val; - } else { - (attrs = {})[key] = val; - } - - options || (options = {}); - - // Run validation. - if (!this._validate(attrs, options)) return false; - - // Extract attributes and options. - unset = options.unset; - silent = options.silent; - changes = []; - changing = this._changing; - this._changing = true; - - if (!changing) { - this._previousAttributes = _.extend(Object.create(null), this.attributes); - this.changed = {}; - } - current = this.attributes, prev = this._previousAttributes; - - // Check for changes of `id`. - if (this.idAttribute in attrs) this.id = attrs[this.idAttribute]; - - // For each `set` attribute, update or delete the current value. - for (attr in attrs) { - val = attrs[attr]; - if (!_.isEqual(current[attr], val)) changes.push(attr); - if (!_.isEqual(prev[attr], val)) { - this.changed[attr] = val; - } else { - delete this.changed[attr]; - } - unset ? delete current[attr] : current[attr] = val; - } - - // Trigger all relevant attribute changes. - if (!silent) { - if (changes.length) this._pending = true; - for (var i = 0, l = changes.length; i < l; i++) { - this.trigger('change:' + changes[i], this, current[changes[i]], options); - } - } - - // You might be wondering why there's a `while` loop here. Changes can - // be recursively nested within `"change"` events. - if (changing) return this; - if (!silent) { - while (this._pending) { - this._pending = false; - this.trigger('change', this, options); - } - } - this._pending = false; - this._changing = false; - return this; - }, - - // Remove an attribute from the model, firing `"change"`. `unset` is a noop - // if the attribute doesn't exist. - unset: function(attr, options) { - return this.set(attr, void 0, _.extend({}, options, {unset: true})); - }, - - // Clear all attributes on the model, firing `"change"`. - clear: function(options) { - var attrs = {}; - for (var key in this.attributes) attrs[key] = void 0; - return this.set(attrs, _.extend({}, options, {unset: true})); - }, - - // Determine if the model has changed since the last `"change"` event. - // If you specify an attribute name, determine if that attribute has changed. - hasChanged: function(attr) { - if (attr == null) return !!Object.keys(this.changed).length; - return hasOwnProperty.call(this.changed, attr); - }, - - // Return an object containing all the attributes that have changed, or - // false if there are no changed attributes. Useful for determining what - // parts of a view need to be updated and/or what attributes need to be - // persisted to the server. Unset attributes will be set to undefined. - // You can also pass an attributes object to diff against the model, - // determining if there *would be* a change. - changedAttributes: function(diff) { - if (!diff) return this.hasChanged() ? _.extend(Object.create(null), this.changed) : false; - var val, changed = false; - var old = this._changing ? this._previousAttributes : this.attributes; - for (var attr in diff) { - if (_.isEqual(old[attr], (val = diff[attr]))) continue; - (changed || (changed = {}))[attr] = val; - } - return changed; - }, - - // Get the previous value of an attribute, recorded at the time the last - // `"change"` event was fired. - previous: function(attr) { - if (attr == null || !this._previousAttributes) return null; - return this._previousAttributes[attr]; - }, - - // Get all of the attributes of the model at the time of the previous - // `"change"` event. - previousAttributes: function() { - return _.extend(Object.create(null), this._previousAttributes); - }, - - // Fetch the model from the server. If the server's representation of the - // model differs from its current attributes, they will be overridden, - // triggering a `"change"` event. - fetch: function(options) { - options = options ? _.extend({}, options) : {}; - if (options.parse === void 0) options.parse = true; - var model = this; - var success = options.success; - options.success = function(resp) { - if (!model.set(model.parse(resp, options), options)) return false; - if (success) success(model, resp, options); - model.trigger('sync', model, resp, options); - }; - wrapError(this, options); - return this.sync('read', this, options); - }, - - // Set a hash of model attributes, and sync the model to the server. - // If the server returns an attributes hash that differs, the model's - // state will be `set` again. - save: function(key, val, options) { - var attrs, method, xhr, attributes = this.attributes; - - // Handle both `"key", value` and `{key: value}` -style arguments. - if (key == null || typeof key === 'object') { - attrs = key; - options = val; - } else { - (attrs = {})[key] = val; - } - - options = _.extend({validate: true}, options); - - // If we're not waiting and attributes exist, save acts as - // `set(attr).save(null, opts)` with validation. Otherwise, check if - // the model will be valid when the attributes, if any, are set. - if (attrs && !options.wait) { - if (!this.set(attrs, options)) return false; - } else { - if (!this._validate(attrs, options)) return false; - } - - // Set temporary attributes if `{wait: true}`. - if (attrs && options.wait) { - this.attributes = _.extend(Object.create(null), attributes, attrs); - } - - // After a successful server-side save, the client is (optionally) - // updated with the server-side state. - if (options.parse === void 0) options.parse = true; - var model = this; - var success = options.success; - options.success = function(resp) { - // Ensure attributes are restored during synchronous saves. - model.attributes = attributes; - var serverAttrs = model.parse(resp, options); - if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs); - if (serverAttrs && typeof serverAttrs === 'object' && !model.set(serverAttrs, options)) { - return false; - } - if (success) success(model, resp, options); - model.trigger('sync', model, resp, options); - }; - wrapError(this, options); - - method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update'); - if (method === 'patch') options.attrs = attrs; - xhr = this.sync(method, this, options); - - // Restore attributes. - if (attrs && options.wait) this.attributes = attributes; - - return xhr; - }, - - // Destroy this model on the server if it was already persisted. - // Optimistically removes the model from its collection, if it has one. - // If `wait: true` is passed, waits for the server to respond before removal. - destroy: function(options) { - options = options ? _.extend({}, options) : {}; - var model = this; - var success = options.success; - - var destroy = function() { - model.trigger('destroy', model, model.collection, options); - }; - - options.success = function(resp) { - if (options.wait || model.isNew()) destroy(); - if (success) success(model, resp, options); - if (!model.isNew()) model.trigger('sync', model, resp, options); - }; - - if (this.isNew()) { - options.success(); - return false; - } - wrapError(this, options); - - var xhr = this.sync('delete', this, options); - if (!options.wait) destroy(); - return xhr; - }, - - // Default URL for the model's representation on the server -- if you're - // using Backbone's restful methods, override this to change the endpoint - // that will be called. - url: function() { - var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError(); - if (this.isNew()) return base; - return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id); - }, - - // **parse** converts a response into the hash of attributes to be `set` on - // the model. The default implementation is just to pass the response along. - parse: function(resp, options) { - return resp; - }, - - // Create a new model with identical attributes to this one. - clone: function() { - return new this.constructor(this.attributes); - }, - - // A model is new if it has never been saved to the server, and lacks an id. - isNew: function() { - return this.id == null; - }, - - // Check if the model is currently in a valid state. - isValid: function(options) { - return this._validate({}, _.extend(options || {}, { validate: true })); - }, - - // Run validation against the next complete set of model attributes, - // returning `true` if all is well. Otherwise, fire an `"invalid"` event. - _validate: function(attrs, options) { - if (!options.validate || !this.validate) return true; - attrs = _.extend(Object.create(null), this.attributes, attrs); - var error = this.validationError = this.validate(attrs, options) || null; - if (!error) return true; - this.trigger('invalid', this, error, _.extend(options, {validationError: error})); - return false; - } - -}); - -if (_.keys) { - // Underscore methods that we want to implement on the Model. - var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit']; - - // Mix in each Underscore method as a proxy to `Model#attributes`. - modelMethods.filter(utilExists).forEach(function(method) { - Model.prototype[method] = function() { - var args = slice.call(arguments); - args.unshift(this.attributes); - return _[method].apply(_, args); - }; - }); -} -// Backbone.Collection -// ------------------- - -// If models tend to represent a single row of data, a Backbone Collection is -// more analagous to a table full of data ... or a small slice or page of that -// table, or a collection of rows that belong together for a particular reason -// -- all of the messages in this particular folder, all of the documents -// belonging to this particular author, and so on. Collections maintain -// indexes of their models, both in order, and for lookup by `id`. - -// Create a new **Collection**, perhaps to contain a specific type of `model`. -// If a `comparator` is specified, the Collection will maintain -// its models in sort order, as they're added and removed. -var Collection = Backbone.Collection = function(models, options) { - options || (options = {}); - if (options.model) this.model = options.model; - if (options.comparator !== void 0) this.comparator = options.comparator; - this._reset(); - this.initialize.apply(this, arguments); - if (models) this.reset(models, _.extend({silent: true}, options)); -}; - -// Default options for `Collection#set`. -var setOptions = {add: true, remove: true, merge: true}; -var addOptions = {add: true, remove: false}; - -// Define the Collection's inheritable methods. -_.extend(Collection.prototype, Events, { - - // The default model for a collection is just a **Backbone.Model**. - // This should be overridden in most cases. - model: typeof Model === 'undefined' ? null : Model, - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // The JSON representation of a Collection is an array of the - // models' attributes. - toJSON: function(options) { - return this.map(function(model){ return model.toJSON(options); }); - }, - - // Proxy `Backbone.sync` by default. - sync: function() { - return Backbone.sync.apply(this, arguments); - }, - - // Add a model, or list of models to the set. - add: function(models, options) { - return this.set(models, _.extend({merge: false}, options, addOptions)); - }, - - // Remove a model, or a list of models from the set. - remove: function(models, options) { - var singular = !Array.isArray(models); - models = singular ? [models] : models.slice(); - options || (options = {}); - var i, l, index, model; - for (i = 0, l = models.length; i < l; i++) { - model = models[i] = this.get(models[i]); - if (!model) continue; - delete this._byId[model.id]; - delete this._byId[model.cid]; - index = this.indexOf(model); - this.models.splice(index, 1); - this.length--; - if (!options.silent) { - options.index = index; - model.trigger('remove', model, this, options); - } - this._removeReference(model); - } - return singular ? models[0] : models; - }, - - // Update a collection by `set`-ing a new list of models, adding new ones, - // removing models that are no longer present, and merging models that - // already exist in the collection, as necessary. Similar to **Model#set**, - // the core operation for updating the data contained by the collection. - set: function(models, options) { - options = _.defaults({}, options, setOptions); - if (options.parse) models = this.parse(models, options); - var singular = !Array.isArray(models); - models = singular ? (models ? [models] : []) : models.slice(); - var i, l, id, model, attrs, existing, sort; - var at = options.at; - var targetModel = this.model; - var sortable = this.comparator && (at == null) && options.sort !== false; - var sortAttr = typeof this.comparator === 'string' ? this.comparator : null; - var toAdd = [], toRemove = [], modelMap = {}; - var add = options.add, merge = options.merge, remove = options.remove; - var order = !sortable && add && remove ? [] : false; - - // Turn bare objects into model references, and prevent invalid models - // from being added. - for (i = 0, l = models.length; i < l; i++) { - attrs = models[i]; - if (attrs instanceof Model) { - id = model = attrs; - } else { - id = attrs[targetModel.prototype.idAttribute]; - } - - // If a duplicate is found, prevent it from being added and - // optionally merge it into the existing model. - if (existing = this.get(id)) { - if (remove) modelMap[existing.cid] = true; - if (merge) { - attrs = attrs === model ? model.attributes : attrs; - if (options.parse) attrs = existing.parse(attrs, options); - existing.set(attrs, options); - if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true; - } - models[i] = existing; - - // If this is a new, valid model, push it to the `toAdd` list. - } else if (add) { - model = models[i] = this._prepareModel(attrs, options); - if (!model) continue; - toAdd.push(model); - - // Listen to added models' events, and index models for lookup by - // `id` and by `cid`. - model.on('all', this._onModelEvent, this); - this._byId[model.cid] = model; - if (model.id != null) this._byId[model.id] = model; - } - if (order) order.push(existing || model); - } - - // Remove nonexistent models if appropriate. - if (remove) { - for (i = 0, l = this.length; i < l; ++i) { - if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model); - } - if (toRemove.length) this.remove(toRemove, options); - } - - // See if sorting is needed, update `length` and splice in new models. - if (toAdd.length || (order && order.length)) { - if (sortable) sort = true; - this.length += toAdd.length; - if (at != null) { - for (i = 0, l = toAdd.length; i < l; i++) { - this.models.splice(at + i, 0, toAdd[i]); - } - } else { - if (order) this.models.length = 0; - var orderedModels = order || toAdd; - for (i = 0, l = orderedModels.length; i < l; i++) { - this.models.push(orderedModels[i]); - } - } - } - - // Silently sort the collection if appropriate. - if (sort) this.sort({silent: true}); - - // Unless silenced, it's time to fire all appropriate add/sort events. - if (!options.silent) { - for (i = 0, l = toAdd.length; i < l; i++) { - (model = toAdd[i]).trigger('add', model, this, options); - } - if (sort || (order && order.length)) this.trigger('sort', this, options); - } - - // Return the added (or merged) model (or models). - return singular ? models[0] : models; - }, - - // When you have more items than you want to add or remove individually, - // you can reset the entire set with a new list of models, without firing - // any granular `add` or `remove` events. Fires `reset` when finished. - // Useful for bulk operations and optimizations. - reset: function(models, options) { - options || (options = {}); - for (var i = 0, l = this.models.length; i < l; i++) { - this._removeReference(this.models[i]); - } - options.previousModels = this.models; - this._reset(); - models = this.add(models, _.extend({silent: true}, options)); - if (!options.silent) this.trigger('reset', this, options); - return models; - }, - - // Add a model to the end of the collection. - push: function(model, options) { - return this.add(model, _.extend({at: this.length}, options)); - }, - - // Remove a model from the end of the collection. - pop: function(options) { - var model = this.at(this.length - 1); - this.remove(model, options); - return model; - }, - - // Add a model to the beginning of the collection. - unshift: function(model, options) { - return this.add(model, _.extend({at: 0}, options)); - }, - - // Remove a model from the beginning of the collection. - shift: function(options) { - var model = this.at(0); - this.remove(model, options); - return model; - }, - - // Slice out a sub-array of models from the collection. - slice: function() { - return slice.apply(this.models, arguments); - }, - - // Get a model from the set by id. - get: function(obj) { - if (obj == null) return void 0; - return this._byId[obj.id] || this._byId[obj.cid] || this._byId[obj]; - }, - - // Get the model at the given index. - at: function(index) { - return this.models[index]; - }, - - // Return models with matching attributes. Useful for simple cases of - // `filter`. - where: function(attrs, first) { - if (!attrs || !Object.keys(attrs).length) return first ? void 0 : []; - return this[first ? 'find' : 'filter'](function(model) { - for (var key in attrs) { - if (attrs[key] !== model.get(key)) return false; - } - return true; - }); - }, - - // Return the first model with matching attributes. Useful for simple cases - // of `find`. - findWhere: function(attrs) { - return this.where(attrs, true); - }, - - // Force the collection to re-sort itself. You don't need to call this under - // normal circumstances, as the set will maintain sort order as each item - // is added. - sort: function(options) { - if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); - options || (options = {}); - - // Run sort based on type of `comparator`. - if (typeof this.comparator === 'string' || this.comparator.length === 1) { - this.models = this.sortBy(this.comparator, this); - } else { - this.models.sort(this.comparator.bind(this)); - } - - if (!options.silent) this.trigger('sort', this, options); - return this; - }, - - // Pluck an attribute from each model in the collection. - pluck: function(attr) { - return this.models.map(function(model) { - return model.get(attr); - }); - }, - - // Fetch the default set of models for this collection, resetting the - // collection when they arrive. If `reset: true` is passed, the response - // data will be passed through the `reset` method instead of `set`. - fetch: function(options) { - options = options ? _.extend({}, options) : {}; - if (options.parse === void 0) options.parse = true; - var success = options.success; - var collection = this; - options.success = function(resp) { - var method = options.reset ? 'reset' : 'set'; - collection[method](resp, options); - if (success) success(collection, resp, options); - collection.trigger('sync', collection, resp, options); - }; - wrapError(this, options); - return this.sync('read', this, options); - }, - - // Create a new instance of a model in this collection. Add the model to the - // collection immediately, unless `wait: true` is passed, in which case we - // wait for the server to agree. - create: function(model, options) { - options = options ? _.extend({}, options) : {}; - if (!(model = this._prepareModel(model, options))) return false; - if (!options.wait) this.add(model, options); - var collection = this; - var success = options.success; - options.success = function(model, resp, options) { - if (options.wait) collection.add(model, options); - if (success) success(model, resp, options); - }; - model.save(null, options); - return model; - }, - - // **parse** converts a response into a list of models to be added to the - // collection. The default implementation is just to pass it through. - parse: function(resp, options) { - return resp; - }, - - // Create a new collection with an identical list of models as this one. - clone: function() { - return new this.constructor(this.models); - }, - - // Private method to reset all internal state. Called when the collection - // is first initialized or reset. - _reset: function() { - this.length = 0; - this.models = []; - this._byId = Object.create(null); - }, - - // Prepare a hash of attributes (or other model) to be added to this - // collection. - _prepareModel: function(attrs, options) { - if (attrs instanceof Collection.prototype.model) { - if (!attrs.collection) attrs.collection = this; - return attrs; - } - options = options ? _.extend({}, options) : {}; - options.collection = this; - var model = new this.model(attrs, options); - if (!model.validationError) return model; - this.trigger('invalid', this, model.validationError, options); - return false; - }, - - // Internal method to sever a model's ties to a collection. - _removeReference: function(model) { - if (this === model.collection) delete model.collection; - model.off('all', this._onModelEvent, this); - }, - - // Internal method called every time a model in the set fires an event. - // Sets need to update their indexes when models change ids. All other - // events simply proxy through. "add" and "remove" events that originate - // in other collections are ignored. - _onModelEvent: function(event, model, collection, options) { - if ((event === 'add' || event === 'remove') && collection !== this) return; - if (event === 'destroy') this.remove(model, options); - if (model && event === 'change:' + model.idAttribute) { - delete this._byId[model.previous(model.idAttribute)]; - if (model.id != null) this._byId[model.id] = model; - } - this.trigger.apply(this, arguments); - } - -}); - -if (utilExists('each')) { - // Underscore methods that we want to implement on the Collection. - // 90% of the core usefulness of Backbone Collections is actually implemented - // right here: - var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl', - 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select', - 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke', - 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest', - 'tail', 'drop', 'last', 'without', 'difference', 'indexOf', 'shuffle', - 'lastIndexOf', 'isEmpty', 'chain']; - - // Mix in each Underscore method as a proxy to `Collection#models`. - methods.filter(utilExists).forEach(function(method) { - Collection.prototype[method] = function() { - var args = slice.call(arguments); - args.unshift(this.models); - return _[method].apply(_, args); - }; - }); - - // Underscore methods that take a property name as an argument. - var attributeMethods = ['groupBy', 'countBy', 'sortBy']; - - // Use attributes instead of properties. - attributeMethods.filter(utilExists).forEach(function(method) { - Collection.prototype[method] = function(value, context) { - var iterator = typeof value === 'function' ? value : function(model) { - return model.get(value); - }; - return _[method](this.models, iterator, context); - }; - }); -} else { - ['forEach', 'map', 'filter', 'some', 'every', 'reduce', 'reduceRight', - 'indexOf', 'lastIndexOf'].forEach(function(method) { - Collection.prototype[method] = function(arg, context) { - return this.models[method](arg, context); - }; - }); - - // Exoskeleton-specific: - Collection.prototype.find = function(iterator, context) { - var result; - this.some(function(value, index, list) { - if (iterator.call(context, value, index, list)) { - result = value; - return true; - } - }); - return result; - }; - - // Underscore methods that take a property name as an argument. - ['sortBy'].forEach(function(method) { - Collection.prototype[method] = function(value, context) { - var iterator = typeof value === 'function' ? value : function(model) { - return model.get(value); - }; - return _[method](this.models, iterator, context); - }; - }); -} -// Backbone.View -// ------------- - -// Backbone Views are almost more convention than they are actual code. A View -// is simply a JavaScript object that represents a logical chunk of UI in the -// DOM. This might be a single item, an entire list, a sidebar or panel, or -// even the surrounding frame which wraps your whole app. Defining a chunk of -// UI as a **View** allows you to define your DOM events declaratively, without -// having to worry about render order ... and makes it easy for the view to -// react to specific changes in the state of your models. - -// Options with special meaning *(e.g. model, collection, id, className)* are -// attached directly to the view. See `viewOptions` for an exhaustive -// list. - -// Cached regex to split keys for `delegate`. -var delegateEventSplitter = /^(\S+)\s*(.*)$/; - -// List of view options to be merged as properties. -var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; - -// Creating a Backbone.View creates its initial element outside of the DOM, -// if an existing element is not provided... -var View = Backbone.View = function(options) { - this.cid = _.uniqueId('view'); - if (options) Object.keys(options).forEach(function(key) { - if (viewOptions.indexOf(key) !== -1) this[key] = options[key]; - }, this); - this._handlers = []; - this._ensureElement(); - this.initialize.apply(this, arguments); - this.delegateEvents(); -}; - -// Set up all inheritable **Backbone.View** properties and methods. -_.extend(View.prototype, Events, { - // In case you want to include jQuery with your app - // for *some* views and use native methods for other views. - useNative: false, - - // The default `tagName` of a View's element is `"div"`. - tagName: 'div', - - // jQuery delegate for element lookup, scoped to DOM elements within the - // current view. This should be preferred to global lookups where possible. - $: function(selector) { - return Backbone.$ && !this.useNative ? this.$el.find(selector) : this.findAll(selector); - }, - - // Exoskeleton-related DOM methods. - find: function(selector) { - return this.el.querySelector(selector); - }, - - findAll: function(selector) { - return slice.call(this.el.querySelectorAll(selector)); - }, - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // **render** is the core function that your view should override, in order - // to populate its element (`this.el`), with the appropriate HTML. The - // convention is for **render** to always return `this`. - render: function() { - return this; - }, - - // Remove this view by taking the element out of the DOM, and removing any - // applicable Backbone.Events listeners. - remove: function() { - var parent; - if (Backbone.$ && !this.useNative) { - this.$el.remove(); - } else if (parent = this.el.parentNode) { - parent.removeChild(this.el); - } - this.stopListening(); - return this; - }, - - // Change the view's element (`this.el` property), including event - // re-delegation. - setElement: function(element, delegate) { - if (Backbone.$ && !this.useNative) { - if (this.$el) this.undelegateEvents(); - this.$el = element instanceof Backbone.$ ? element : Backbone.$(element); - this.el = this.$el[0]; - } else { - if (this.el) this.undelegateEvents(); - this.el = (typeof element === 'string') ? - document.querySelector(element) : element; - } - if (delegate !== false) this.delegateEvents(); - return this; - }, - - // Set callbacks, where `this.events` is a hash of - // - // *{"event selector": "callback"}* - // - // { - // 'mousedown .title': 'edit', - // 'click .button': 'save', - // 'click .open': function(e) { ... } - // } - // - // pairs. Callbacks will be bound to the view, with `this` set properly. - // Uses event delegation for efficiency. - // Omitting the selector binds the event to `this.el`. - // This only works for delegate-able events: not `focus`, `blur`, and - // not `change`, `submit`, and `reset` in Internet Explorer. - delegateEvents: function(events, keepOld) { - if (!(events || (events = _.result(this, 'events')))) return this; - if (!keepOld) this.undelegateEvents(); - for (var key in events) { - var method = events[key]; - if (typeof method !== 'function') method = this[events[key]]; - // if (!method) continue; - - var match = key.match(delegateEventSplitter); - var eventName = match[1], selector = match[2]; - - if (Backbone.$ && !this.useNative) { - eventName += '.delegateEvents' + this.cid; - method = method.bind(this); - this.$el.on(eventName, (selector ? selector : null), method); - } else { - utils.delegate(this, eventName, selector, method); - } - } - return this; - }, - - // Clears all callbacks previously bound to the view with `delegateEvents`. - // You usually don't need to use this, but may wish to if you have multiple - // Backbone views attached to the same DOM element. - undelegateEvents: function() { - if (Backbone.$ && !this.useNative) { - this.$el.off('.delegateEvents' + this.cid); - } else { - utils.undelegate(this); - } - return this; - }, - - // Ensure that the View has a DOM element to render into. - // If `this.el` is a string, pass it through `$()`, take the first - // matching element, and re-assign it to `el`. Otherwise, create - // an element from the `id`, `className` and `tagName` properties. - _ensureElement: function() { - if (!this.el) { - var attrs = _.extend({}, _.result(this, 'attributes')); - if (this.id) attrs.id = _.result(this, 'id'); - if (this.className) attrs.className = _.result(this, 'className'); - if (attrs['class']) attrs.className = attrs['class']; - var el = _.extend(document.createElement(_.result(this, 'tagName')), attrs); - this.setElement(el, false); - } else { - this.setElement(_.result(this, 'el'), false); - } - } - -}); -// Backbone.sync -// ------------- - -// Override this function to change the manner in which Backbone persists -// models to the server. You will be passed the type of request, and the -// model in question. By default, makes a RESTful Ajax request -// to the model's `url()`. Some possible customizations could be: -// -// * Use `setTimeout` to batch rapid-fire updates into a single request. -// * Send up the models as XML instead of JSON. -// * Persist models via WebSockets instead of Ajax. -// -// Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests -// as `POST`, with a `_method` parameter containing the true HTTP method, -// as well as all requests with the body as `application/x-www-form-urlencoded` -// instead of `application/json` with the model in a param named `model`. -// Useful when interfacing with server-side languages like **PHP** that make -// it difficult to read the body of `PUT` requests. -Backbone.sync = function(method, model, options) { - var type = methodMap[method]; - - // Default options, unless specified. - _.defaults(options || (options = {}), { - emulateHTTP: Backbone.emulateHTTP, - emulateJSON: Backbone.emulateJSON - }); - - // Default JSON-request options. - var params = {type: type, dataType: 'json'}; - - // Ensure that we have a URL. - if (!options.url) { - params.url = _.result(model, 'url') || urlError(); - } - - // Ensure that we have the appropriate request data. - if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) { - params.contentType = 'application/json'; - params.data = JSON.stringify(options.attrs || model.toJSON(options)); - } - - // For older servers, emulate JSON by encoding the request into an HTML-form. - if (options.emulateJSON) { - params.contentType = 'application/x-www-form-urlencoded'; - params.data = params.data ? {model: params.data} : {}; - } - - // For older servers, emulate HTTP by mimicking the HTTP method with `_method` - // And an `X-HTTP-Method-Override` header. - if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) { - params.type = 'POST'; - if (options.emulateJSON) params.data._method = type; - var beforeSend = options.beforeSend; - options.beforeSend = function(xhr) { - xhr.setRequestHeader('X-HTTP-Method-Override', type); - if (beforeSend) return beforeSend.apply(this, arguments); - }; - } - - // Don't process data on a non-GET request. - if (params.type !== 'GET' && !options.emulateJSON) { - params.processData = false; - } - - // Make the request, allowing the user to override any Ajax options. - var xhr = options.xhr = Backbone.ajax(_.extend(params, options)); - model.trigger('request', model, xhr, options); - return xhr; -}; - -// Map from CRUD to HTTP for our default `Backbone.sync` implementation. -var methodMap = { - 'create': 'POST', - 'update': 'PUT', - 'patch': 'PATCH', - 'delete': 'DELETE', - 'read': 'GET' -}; - -// Set the default implementation of `Backbone.ajax` to proxy through to `$`. -// Override this if you'd like to use a different library. -Backbone.ajax = Backbone.$ ? function() { - return Backbone.$.ajax.apply(Backbone.$, arguments); -} : utils.ajax; - -if (Backbone.$) Backbone.Deferred = function() { - return new Backbone.$.Deferred(); -}; -// Backbone.Router -// --------------- - -// Routers map faux-URLs to actions, and fire events when routes are -// matched. Creating a new one sets its `routes` hash, if not set statically. -var Router = Backbone.Router = function(options) { - options || (options = {}); - if (options.routes) this.routes = options.routes; - this._bindRoutes(); - this.initialize.apply(this, arguments); -}; - -// Cached regular expressions for matching named param parts and splatted -// parts of route strings. -var optionalParam = /\((.*?)\)/g; -var namedParam = /(\(\?)?:\w+/g; -var splatParam = /\*\w+/g; -var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g; - -var isRegExp = function(value) { - return value ? (typeof value === 'object' && toString.call(value) === '[object RegExp]') : false; -}; - -// Set up all inheritable **Backbone.Router** properties and methods. -_.extend(Router.prototype, Events, { - - // Initialize is an empty function by default. Override it with your own - // initialization logic. - initialize: function(){}, - - // Manually bind a single named route to a callback. For example: - // - // this.route('search/:query/p:num', 'search', function(query, num) { - // ... - // }); - // - route: function(route, name, callback) { - if (!isRegExp(route)) route = this._routeToRegExp(route); - if (typeof name === 'function') { - callback = name; - name = ''; - } - if (!callback) callback = this[name]; - var router = this; - Backbone.history.route(route, function(fragment) { - var args = router._extractParameters(route, fragment); - callback && callback.apply(router, args); - router.trigger.apply(router, ['route:' + name].concat(args)); - router.trigger('route', name, args); - Backbone.history.trigger('route', router, name, args); - }); - return this; - }, - - // Simple proxy to `Backbone.history` to save a fragment into the history. - navigate: function(fragment, options) { - Backbone.history.navigate(fragment, options); - return this; - }, - - // Bind all defined routes to `Backbone.history`. We have to reverse the - // order of the routes here to support behavior where the most general - // routes can be defined at the bottom of the route map. - _bindRoutes: function() { - if (!this.routes) return; - this.routes = _.result(this, 'routes'); - var route, routes = Object.keys(this.routes); - while ((route = routes.pop()) != null) { - this.route(route, this.routes[route]); - } - }, - - // Convert a route string into a regular expression, suitable for matching - // against the current location hash. - _routeToRegExp: function(route) { - route = route.replace(escapeRegExp, '\\$&') - .replace(optionalParam, '(?:$1)?') - .replace(namedParam, function(match, optional) { - return optional ? match : '([^\/]+)'; - }) - .replace(splatParam, '(.*?)'); - return new RegExp('^' + route + '$'); - }, - - // Given a route, and a URL fragment that it matches, return the array of - // extracted decoded parameters. Empty or unmatched parameters will be - // treated as `null` to normalize cross-browser behavior. - _extractParameters: function(route, fragment) { - var params = route.exec(fragment).slice(1); - return params.map(function(param) { - return param ? decodeURIComponent(param) : null; - }); - } - -}); -// Backbone.History -// ---------------- - -// Handles cross-browser history management, based on either -// [pushState](http://diveintohtml5.info/history.html) and real URLs, or -// [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange) -// and URL fragments. -var History = Backbone.History = function() { - this.handlers = []; - this.checkUrl = this.checkUrl.bind(this); - - // Ensure that `History` can be used outside of the browser. - if (typeof window !== 'undefined') { - this.location = window.location; - this.history = window.history; - } -}; - -// Cached regex for stripping a leading hash/slash and trailing space. -var routeStripper = /^[#\/]|\s+$/g; - -// Cached regex for stripping leading and trailing slashes. -var rootStripper = /^\/+|\/+$/g; - -// Cached regex for removing a trailing slash. -var trailingSlash = /\/$/; - -// Cached regex for stripping urls of hash and query. -var pathStripper = /[#].*$/; - -// Has the history handling already been started? -History.started = false; - -// Set up all inheritable **Backbone.History** properties and methods. -_.extend(History.prototype, Events, { - - // Gets the true hash value. Cannot use location.hash directly due to bug - // in Firefox where location.hash will always be decoded. - getHash: function(window) { - var match = (window || this).location.href.match(/#(.*)$/); - return match ? match[1] : ''; - }, - - // Get the cross-browser normalized URL fragment, either from the URL, - // the hash, or the override. - getFragment: function(fragment) { - if (fragment == null) { - if (this._wantsPushState || !this._wantsHashChange) { - // CHANGED: Make fragment include query string. - fragment = this.location.pathname + this.location.search; - var root = this.root.replace(trailingSlash, ''); - if (!fragment.indexOf(root)) fragment = fragment.slice(root.length); - } else { - fragment = this.getHash(); - } - } - return fragment.replace(routeStripper, ''); - }, - - // Start the hash change handling, returning `true` if the current URL matches - // an existing route, and `false` otherwise. - start: function(options) { - if (History.started) throw new Error("Backbone.history has already been started"); - History.started = true; - - // Figure out the initial configuration. - // Is pushState desired or should we use hashchange only? - this.options = _.extend({root: '/'}, this.options, options); - this.root = this.options.root; - this._wantsHashChange = this.options.hashChange !== false; - this._wantsPushState = !!this.options.pushState; - var fragment = this.getFragment(); - - // Normalize root to always include a leading and trailing slash. - this.root = ('/' + this.root + '/').replace(rootStripper, '/'); - - // Depending on whether we're using pushState or hashes, determine how we - // check the URL state. - if (this._wantsPushState) { - window.addEventListener('popstate', this.checkUrl, false); - } else if (this._wantsHashChange) { - window.addEventListener('hashchange', this.checkUrl, false); - } - - // Determine if we need to change the base url, for a pushState link - // opened by a non-pushState browser. - this.fragment = fragment; - var loc = this.location; - var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root; - - // Transition from hashChange to pushState or vice versa if both are - // requested. - if (this._wantsHashChange && this._wantsPushState) { - // If we've started out with a hash-based route, but we're currently - // in a browser where it could be `pushState`-based instead... - if (atRoot && loc.hash) { - this.fragment = this.getHash().replace(routeStripper, ''); - // CHANGED: It's no longer needed to add loc.search at the end, - // as query params have been already included into @fragment - this.history.replaceState({}, document.title, this.root + this.fragment); - } - - } - - if (!this.options.silent) return this.loadUrl(); - }, - - // Disable Backbone.history, perhaps temporarily. Not useful in a real app, - // but possibly useful for unit testing Routers. - stop: function() { - window.removeEventListener('popstate', this.checkUrl); - window.removeEventListener('hashchange', this.checkUrl); - History.started = false; - }, - - // Add a route to be tested when the fragment changes. Routes added later - // may override previous routes. - route: function(route, callback) { - this.handlers.unshift({route: route, callback: callback}); - }, - - // Checks the current URL to see if it has changed, and if it has, - // calls `loadUrl`. - checkUrl: function() { - var current = this.getFragment(); - if (current === this.fragment) return false; - this.loadUrl(); - }, - - // Attempt to load the current URL fragment. If a route succeeds with a - // match, returns `true`. If no defined routes matches the fragment, - // returns `false`. - loadUrl: function(fragment) { - fragment = this.fragment = this.getFragment(fragment); - return this.handlers.some(function(handler) { - if (handler.route.test(fragment)) { - handler.callback(fragment); - return true; - } - }); - }, - - // Save a fragment into the hash history, or replace the URL state if the - // 'replace' option is passed. You are responsible for properly URL-encoding - // the fragment in advance. - // - // The options object can contain `trigger: true` if you wish to have the - // route callback be fired (not usually desirable), or `replace: true`, if - // you wish to modify the current URL without adding an entry to the history. - navigate: function(fragment, options) { - if (!History.started) return false; - if (!options || options === true) options = {trigger: !!options}; - - var url = this.root + (fragment = this.getFragment(fragment || '')); - - // Strip the fragment of the query and hash for matching. - fragment = fragment.replace(pathStripper, ''); - - if (this.fragment === fragment) return; - this.fragment = fragment; - - // Don't include a trailing slash on the root. - if (fragment === '' && url !== '/') url = url.slice(0, -1); - - // If we're using pushState we use it to set the fragment as a real URL. - if (this._wantsPushState) { - this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url); - - // If hash changes haven't been explicitly disabled, update the hash - // fragment to store history. - } else if (this._wantsHashChange) { - this._updateHash(this.location, fragment, options.replace); - // If you've told us that you explicitly don't want fallback hashchange- - // based history, then `navigate` becomes a page refresh. - } else { - return this.location.assign(url); - } - if (options.trigger) return this.loadUrl(fragment); - }, - - // Update the hash location, either replacing the current entry, or adding - // a new one to the browser history. - _updateHash: function(location, fragment, replace) { - if (replace) { - var href = location.href.replace(/(javascript:|#).*$/, ''); - location.replace(href + '#' + fragment); - } else { - // Some browsers require that `hash` contains a leading #. - location.hash = '#' + fragment; - } - } - -}); - // !!! - // Init. - ['Model', 'Collection', 'Router', 'View', 'History'].forEach(function(name) { - var item = Backbone[name]; - if (item) item.extend = Backbone.extend; - }); - - // Allow the `Backbone` object to serve as a global event bus, for folks who - // want global "pubsub" in a convenient place. - _.extend(Backbone, Events); - - // Create the default Backbone.history. - Backbone.history = new History(); - return Backbone; -}); diff --git a/examples/chaplin-brunch/node_modules/todomvc-app-css/index.css b/examples/chaplin-brunch/node_modules/todomvc-app-css/index.css deleted file mode 100644 index 54d89abda7..0000000000 --- a/examples/chaplin-brunch/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,378 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; - font-weight: 300; -} - -button, -input[type="checkbox"] { - outline: none; -} - -.hidden { - display: none; -} - -#todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -#todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -#new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - outline: none; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; -} - -#new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -#main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -label[for='toggle-all'] { - display: none; -} - -#toggle-all { - position: absolute; - top: -55px; - left: -12px; - width: 60px; - height: 34px; - text-align: center; - border: none; /* Mobile Safari */ -} - -#toggle-all:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -#toggle-all:checked:before { - color: #737373; -} - -#todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -#todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -#todo-list li:last-child { - border-bottom: none; -} - -#todo-list li.editing { - border-bottom: none; - padding: 0; -} - -#todo-list li.editing .edit { - display: block; - width: 506px; - padding: 13px 17px 12px 17px; - margin: 0 0 0 43px; -} - -#todo-list li.editing .view { - display: none; -} - -#todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -#todo-list li .toggle:after { - content: url('data:image/svg+xml;utf8,'); -} - -#todo-list li .toggle:checked:after { - content: url('data:image/svg+xml;utf8,'); -} - -#todo-list li label { - white-space: pre; - word-break: break-word; - padding: 15px 60px 15px 15px; - margin-left: 45px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -#todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -#todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -#todo-list li .destroy:hover { - color: #af5b5e; -} - -#todo-list li .destroy:after { - content: '×'; -} - -#todo-list li:hover .destroy { - display: block; -} - -#todo-list li .edit { - display: none; -} - -#todo-list li.editing:last-child { - margin-bottom: -1px; -} - -#footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -#footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -#todo-count { - float: left; - text-align: left; -} - -#todo-count strong { - font-weight: 300; -} - -#filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -#filters li { - display: inline; -} - -#filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -#filters li a.selected, -#filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -#filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -#clear-completed, -html #clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; - position: relative; -} - -#clear-completed:hover { - text-decoration: underline; -} - -#info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -#info p { - line-height: 1; -} - -#info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -#info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - #toggle-all, - #todo-list li .toggle { - background: none; - } - - #todo-list li .toggle { - height: 40px; - } - - #toggle-all { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - -webkit-appearance: none; - appearance: none; - } -} - -@media (max-width: 430px) { - #footer { - height: 50px; - } - - #filters { - bottom: 10px; - } -} diff --git a/examples/chaplin-brunch/node_modules/todomvc-common/base.css b/examples/chaplin-brunch/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/chaplin-brunch/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/chaplin-brunch/node_modules/todomvc-common/base.js b/examples/chaplin-brunch/node_modules/todomvc-common/base.js deleted file mode 100644 index 61cf1dc931..0000000000 --- a/examples/chaplin-brunch/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,279 +0,0 @@ -/* global _ */ -;(function () { - 'use strict' - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object - } - for ( - var argsIndex = 1, argsLength = arguments.length; - argsIndex < argsLength; - argsIndex++ - ) { - var iterable = arguments[argsIndex] - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key] - } - } - } - } - return object - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - } - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/ - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - } - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function (text, data, settings) { - var render - settings = _.defaults({}, settings, _.templateSettings) - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp( - [ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', - 'g' - ) - - // Compile the template source, escaping string literals appropriately. - var index = 0 - var source = "__p+='" - text.replace(matcher, function ( - match, - escape, - interpolate, - evaluate, - offset - ) { - source += text.slice(index, offset).replace(escaper, function (match) { - return '\\' + escapes[match] - }) - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'" - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'" - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='" - } - index = offset + match.length - return match - }) - source += "';\n" - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n' - - source = - "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + - 'return __p;\n' - - try { - render = new Function(settings.variable || 'obj', '_', source) - } catch (e) { - e.source = source - throw e - } - - if (data) return render(data, _) - var template = function (data) { - return render.call(this, data, _) - } - - // Provide the compiled function source as a convenience for precompilation. - template.source = - 'function(' + (settings.variable || 'obj') + '){\n' + source + '}' - - return template - } - - return _ - })({}) - - if (location.hostname === 'todomvc.com') { - window._gaq = [['_setAccount', 'UA-31081062-1'], ['_trackPageview']] - ;(function (d, t) { - var g = d.createElement(t), s = d.getElementsByTagName(t)[0] - g.src = '//www.google-analytics.com/ga.js' - s.parentNode.insertBefore(g, s) - })(document, 'script') - } - /* jshint ignore:end */ - - function redirect () { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace( - 'tastejs.github.io/todomvc', - 'todomvc.com' - ) - } - } - - function findRoot () { - var base = location.href.indexOf('examples/') - return location.href.substr(0, base) - } - - function getFile (file, callback) { - if (!location.host) { - return console.info( - 'Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.' - ) - } - - var xhr = new XMLHttpRequest() - - xhr.open('GET', findRoot() + file, true) - xhr.send() - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText) - } - } - } - - function Learn (learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config) - } - - var template, framework - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON) - } catch (e) { - return - } - } - - if (config) { - template = config.template - framework = config.framework - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework - } - - this.template = template - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend - this.frameworkJSON.issueLabel = framework - this.append({ - backend: true - }) - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework] - this.frameworkJSON.issueLabel = framework - this.append() - } - - this.fetchIssueCount() - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside') - aside.innerHTML = _.template(this.template, this.frameworkJSON) - aside.className = 'learn' - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links') - var heading = sourceLinks.firstElementChild - var sourceLink = sourceLinks.lastElementChild - // Correct link path - var href = sourceLink.getAttribute('href') - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))) - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link') - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute( - 'href', - findRoot() + demoLink.getAttribute('href') - ) - } - }) - } - - // not sure why document.body is undefined sometimes - if (document && document.body) { - document.body.className = (document.body.className + ' learn-bar').trim() - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML) - } - } - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link') - if (issueLink) { - var url = issueLink.href.replace( - 'https://github.com', - 'https://api.github.com/repos' - ) - var xhr = new XMLHttpRequest() - xhr.open('GET', url, true) - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText) - if (parsedResponse instanceof Array) { - var count = parsedResponse.length - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues' - document.getElementById('issue-count').style.display = 'inline' - } - } - } - xhr.send() - } - } - - redirect() - getFile('learn.json', Learn) -})() diff --git a/examples/chaplin-brunch/package.json b/examples/chaplin-brunch/package.json deleted file mode 100644 index a8020d3c16..0000000000 --- a/examples/chaplin-brunch/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "private": true, - "dependencies": { - "chaplin": "^1.0.0", - "exoskeleton": "^0.6.3", - "backbone.localstorage": "^1.1.16", - "backbone.nativeview": "^0.3.2", - - "todomvc-app-css": "^1.0.0", - "todomvc-common": "^1.0.1", - - "javascript-brunch": ">= 1.0 < 1.8", - "coffee-script-brunch": ">= 1.0 < 1.8", - "handlebars-brunch": ">= 1.0 < 1.8", - "uglify-js-brunch": ">= 1.0 < 1.8" - } -} diff --git a/examples/chaplin-brunch/public/app.js b/examples/chaplin-brunch/public/app.js deleted file mode 100644 index d9e56237cd..0000000000 --- a/examples/chaplin-brunch/public/app.js +++ /dev/null @@ -1,720 +0,0 @@ -(function(/*! Brunch !*/) { - 'use strict'; - - var globals = typeof window !== 'undefined' ? window : global; - if (typeof globals.require === 'function') return; - - var modules = {}; - var cache = {}; - - var has = function(object, name) { - return ({}).hasOwnProperty.call(object, name); - }; - - var expand = function(root, name) { - var results = [], parts, part; - if (/^\.\.?(\/|$)/.test(name)) { - parts = [root, name].join('/').split('/'); - } else { - parts = name.split('/'); - } - for (var i = 0, length = parts.length; i < length; i++) { - part = parts[i]; - if (part === '..') { - results.pop(); - } else if (part !== '.' && part !== '') { - results.push(part); - } - } - return results.join('/'); - }; - - var dirname = function(path) { - return path.split('/').slice(0, -1).join('/'); - }; - - var localRequire = function(path) { - return function(name) { - var dir = dirname(path); - var absolute = expand(dir, name); - return globals.require(absolute, path); - }; - }; - - var initModule = function(name, definition) { - var module = {id: name, exports: {}}; - cache[name] = module; - definition(module.exports, localRequire(name), module); - return module.exports; - }; - - var require = function(name, loaderPath) { - var path = expand(name, '.'); - if (loaderPath == null) loaderPath = '/'; - - if (has(cache, path)) return cache[path].exports; - if (has(modules, path)) return initModule(path, modules[path]); - - var dirIndex = expand(path, './index'); - if (has(cache, dirIndex)) return cache[dirIndex].exports; - if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]); - - throw new Error('Cannot find module "' + name + '" from '+ '"' + loaderPath + '"'); - }; - - var define = function(bundle, fn) { - if (typeof bundle === 'object') { - for (var key in bundle) { - if (has(bundle, key)) { - modules[key] = bundle[key]; - } - } - } else { - modules[bundle] = fn; - } - }; - - var list = function() { - var result = []; - for (var item in modules) { - if (has(modules, item)) { - result.push(item); - } - } - return result; - }; - - globals.require = require; - globals.require.define = define; - globals.require.register = define; - globals.require.list = list; - globals.require.brunch = true; -})(); -require.register("application", function(exports, require, module) { -var Application, Todos, mediator, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -mediator = require('mediator'); - -Todos = require('models/todos'); - -module.exports = Application = (function(_super) { - __extends(Application, _super); - - function Application() { - _ref = Application.__super__.constructor.apply(this, arguments); - return _ref; - } - - Application.prototype.title = 'Chaplin • TodoMVC'; - - Application.prototype.initMediator = function() { - mediator.todos = new Todos(); - return Application.__super__.initMediator.apply(this, arguments); - }; - - Application.prototype.start = function() { - mediator.todos.fetch(); - return Application.__super__.start.apply(this, arguments); - }; - - return Application; - -})(Chaplin.Application); -}); - -;require.register("controllers/index-controller", function(exports, require, module) { -var FooterView, HeaderView, IndexController, TodosView, mediator, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -HeaderView = require('../views/header-view'); - -FooterView = require('../views/footer-view'); - -TodosView = require('../views/todos-view'); - -mediator = require('mediator'); - -module.exports = IndexController = (function(_super) { - __extends(IndexController, _super); - - function IndexController() { - _ref = IndexController.__super__.constructor.apply(this, arguments); - return _ref; - } - - IndexController.prototype.beforeAction = function() { - return this.reuse('structure', function() { - var params; - params = { - collection: mediator.todos - }; - this.header = new HeaderView(params); - return this.footer = new FooterView(params); - }); - }; - - IndexController.prototype.list = function(params) { - var filterer, _ref1, _ref2; - filterer = (_ref1 = (_ref2 = params.filterer) != null ? _ref2.trim() : void 0) != null ? _ref1 : 'all'; - this.publishEvent('todos:filter', filterer); - return this.view = new TodosView({ - collection: mediator.todos, - filterer: function(model) { - switch (filterer) { - case 'completed': - return model.get('completed'); - case 'active': - return !model.get('completed'); - default: - return true; - } - } - }); - }; - - return IndexController; - -})(Chaplin.Controller); -}); - -;require.register("initialize", function(exports, require, module) { -var Application, routes; - -Application = require('application'); - -routes = require('routes'); - -document.addEventListener('DOMContentLoaded', function() { - return new Application({ - controllerSuffix: '-controller', - pushState: false, - routes: routes - }); -}, false); -}); - -;require.register("lib/utils", function(exports, require, module) { -var utils; - -utils = Chaplin.utils.beget(Chaplin.utils); - -Backbone.utils.extend(utils, { - toggle: function(elem, visible) { - return elem.style.display = (visible ? '' : 'none'); - } -}); - -if (typeof Object.seal === "function") { - Object.seal(utils); -} - -module.exports = utils; -}); - -;require.register("mediator", function(exports, require, module) { -module.exports = Chaplin.mediator; -}); - -;require.register("models/todo", function(exports, require, module) { -var Todo, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -module.exports = Todo = (function(_super) { - __extends(Todo, _super); - - function Todo() { - _ref = Todo.__super__.constructor.apply(this, arguments); - return _ref; - } - - Todo.prototype.defaults = { - title: '', - completed: false - }; - - Todo.prototype.initialize = function() { - Todo.__super__.initialize.apply(this, arguments); - if (this.isNew()) { - return this.set('created', Date.now()); - } - }; - - Todo.prototype.toggle = function() { - return this.set({ - completed: !this.get('completed') - }); - }; - - Todo.prototype.isVisible = function() { - var isCompleted; - return isCompleted = this.get('completed'); - }; - - return Todo; - -})(Chaplin.Model); -}); - -;require.register("models/todos", function(exports, require, module) { -var Todo, Todos, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -Todo = require('models/todo'); - -module.exports = Todos = (function(_super) { - __extends(Todos, _super); - - function Todos() { - _ref = Todos.__super__.constructor.apply(this, arguments); - return _ref; - } - - Todos.prototype.model = Todo; - - Todos.prototype.localStorage = new Store('todos-chaplin'); - - Todos.prototype.allAreCompleted = function() { - return this.getCompleted().length === this.length; - }; - - Todos.prototype.getCompleted = function() { - return this.where({ - completed: true - }); - }; - - Todos.prototype.getActive = function() { - return this.where({ - completed: false - }); - }; - - Todos.prototype.comparator = function(todo) { - return todo.get('created'); - }; - - return Todos; - -})(Chaplin.Collection); -}); - -;require.register("routes", function(exports, require, module) { -module.exports = function(match) { - match(':filterer', 'index#list'); - return match('', 'index#list'); -}; -}); - -;require.register("views/base/collection-view", function(exports, require, module) { -var CollectionView, View, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -View = require('views/base/view'); - -module.exports = CollectionView = (function(_super) { - __extends(CollectionView, _super); - - function CollectionView() { - _ref = CollectionView.__super__.constructor.apply(this, arguments); - return _ref; - } - - CollectionView.prototype.getTemplateFunction = View.prototype.getTemplateFunction; - - CollectionView.prototype.useCssAnimation = true; - - return CollectionView; - -})(Chaplin.CollectionView); -}); - -;require.register("views/base/view", function(exports, require, module) { -var View, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -module.exports = View = (function(_super) { - __extends(View, _super); - - function View() { - _ref = View.__super__.constructor.apply(this, arguments); - return _ref; - } - - View.prototype.getTemplateFunction = function() { - return this.template; - }; - - return View; - -})(Chaplin.View); -}); - -;require.register("views/footer-view", function(exports, require, module) { -var FooterView, View, utils, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -View = require('./base/view'); - -utils = require('lib/utils'); - -module.exports = FooterView = (function(_super) { - __extends(FooterView, _super); - - function FooterView() { - _ref = FooterView.__super__.constructor.apply(this, arguments); - return _ref; - } - - FooterView.prototype.autoRender = true; - - FooterView.prototype.el = '#footer'; - - FooterView.prototype.events = { - 'click #clear-completed': 'clearCompleted' - }; - - FooterView.prototype.listen = { - 'todos:filter mediator': 'updateFilterer', - 'all collection': 'renderCounter' - }; - - FooterView.prototype.template = require('./templates/footer'); - - FooterView.prototype.render = function() { - FooterView.__super__.render.apply(this, arguments); - return this.renderCounter(); - }; - - FooterView.prototype.updateFilterer = function(filterer) { - var cls, selector, - _this = this; - if (filterer === 'all') { - filterer = ''; - } - selector = "[href='#/" + filterer + "']"; - cls = 'selected'; - return this.findAll('#filters a').forEach(function(link) { - link.classList.remove(cls); - if (Backbone.utils.matchesSelector(link, selector)) { - return link.classList.add(cls); - } - }); - }; - - FooterView.prototype.renderCounter = function() { - var active, completed, countDescription, total; - total = this.collection.length; - active = this.collection.getActive().length; - completed = this.collection.getCompleted().length; - this.find('#todo-count > strong').textContent = active; - countDescription = (active === 1 ? 'item' : 'items'); - this.find('.todo-count-title').textContent = countDescription; - utils.toggle(this.find('#clear-completed'), completed > 0); - return utils.toggle(this.el, total > 0); - }; - - FooterView.prototype.clearCompleted = function() { - return this.publishEvent('todos:clear'); - }; - - return FooterView; - -})(View); -}); - -;require.register("views/header-view", function(exports, require, module) { -var HeaderView, View, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -View = require('./base/view'); - -module.exports = HeaderView = (function(_super) { - __extends(HeaderView, _super); - - function HeaderView() { - _ref = HeaderView.__super__.constructor.apply(this, arguments); - return _ref; - } - - HeaderView.prototype.autoRender = true; - - HeaderView.prototype.el = '#header'; - - HeaderView.prototype.events = { - 'keypress #new-todo': 'createOnEnter' - }; - - HeaderView.prototype.template = require('./templates/header'); - - HeaderView.prototype.createOnEnter = function(event) { - var ENTER_KEY, title; - ENTER_KEY = 13; - title = event.delegateTarget.value.trim(); - if (event.keyCode !== ENTER_KEY || !title) { - return; - } - this.collection.create({ - title: title - }); - return this.find('#new-todo').value = ''; - }; - - return HeaderView; - -})(View); -}); - -;require.register("views/templates/footer", function(exports, require, module) { -var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { - this.compilerInfo = [4,'>= 1.0.0']; -helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - - - - return "\n \n items\n left\n\n\n\n"; - }); -if (typeof define === 'function' && define.amd) { - define([], function() { - return __templateData; - }); -} else if (typeof module === 'object' && module && module.exports) { - module.exports = __templateData; -} else { - __templateData; -} -}); - -;require.register("views/templates/header", function(exports, require, module) { -var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { - this.compilerInfo = [4,'>= 1.0.0']; -helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - - - - return "

      todos

      \n\n"; - }); -if (typeof define === 'function' && define.amd) { - define([], function() { - return __templateData; - }); -} else if (typeof module === 'object' && module && module.exports) { - module.exports = __templateData; -} else { - __templateData; -} -}); - -;require.register("views/templates/todo", function(exports, require, module) { -var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { - this.compilerInfo = [4,'>= 1.0.0']; -helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - var buffer = "", stack1, helper, self=this, functionType="function", escapeExpression=this.escapeExpression; - -function program1(depth0,data) { - - - return " checked"; - } - - buffer += "
      \n \n \n
      \n\n"; - return buffer; - }); -if (typeof define === 'function' && define.amd) { - define([], function() { - return __templateData; - }); -} else if (typeof module === 'object' && module && module.exports) { - module.exports = __templateData; -} else { - __templateData; -} -}); - -;require.register("views/templates/todos", function(exports, require, module) { -var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { - this.compilerInfo = [4,'>= 1.0.0']; -helpers = this.merge(helpers, Handlebars.helpers); data = data || {}; - - - - return "\n\n
        \n"; - }); -if (typeof define === 'function' && define.amd) { - define([], function() { - return __templateData; - }); -} else if (typeof module === 'object' && module && module.exports) { - module.exports = __templateData; -} else { - __templateData; -} -}); - -;require.register("views/todo-view", function(exports, require, module) { -var TodoView, View, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -View = require('./base/view'); - -module.exports = TodoView = (function(_super) { - __extends(TodoView, _super); - - function TodoView() { - _ref = TodoView.__super__.constructor.apply(this, arguments); - return _ref; - } - - TodoView.prototype.events = { - 'click .toggle': 'toggle', - 'dblclick label': 'edit', - 'keyup .edit': 'save', - 'focusout .edit': 'save', - 'click .destroy': 'clear' - }; - - TodoView.prototype.listen = { - 'change model': 'render' - }; - - TodoView.prototype.template = require('./templates/todo'); - - TodoView.prototype.tagName = 'li'; - - TodoView.prototype.render = function() { - TodoView.__super__.render.apply(this, arguments); - return this.toggleClass(); - }; - - TodoView.prototype.toggleClass = function() { - var isCompleted; - isCompleted = this.model.get('completed'); - return this.el.classList.toggle('completed', isCompleted); - }; - - TodoView.prototype.clear = function() { - return this.model.destroy(); - }; - - TodoView.prototype.toggle = function() { - return this.model.toggle().save(); - }; - - TodoView.prototype.edit = function() { - var input; - this.el.classList.add('editing'); - input = this.find('.edit'); - input.focus(); - return input.value = input.value; - }; - - TodoView.prototype.save = function(event) { - var ENTER_KEY, title; - ENTER_KEY = 13; - title = event.delegateTarget.value.trim(); - if (!title) { - return this.model.destroy(); - } - if (event.type === 'keyup' && event.keyCode !== ENTER_KEY) { - return; - } - this.model.save({ - title: title - }); - return this.el.classList.remove('editing'); - }; - - return TodoView; - -})(View); -}); - -;require.register("views/todos-view", function(exports, require, module) { -var CollectionView, TodoView, TodosView, utils, _ref, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - -CollectionView = require('./base/collection-view'); - -TodoView = require('./todo-view'); - -utils = require('lib/utils'); - -module.exports = TodosView = (function(_super) { - __extends(TodosView, _super); - - function TodosView() { - _ref = TodosView.__super__.constructor.apply(this, arguments); - return _ref; - } - - TodosView.prototype.container = '#main'; - - TodosView.prototype.events = { - 'click #toggle-all': 'toggleCompleted' - }; - - TodosView.prototype.itemView = TodoView; - - TodosView.prototype.listSelector = '#todo-list'; - - TodosView.prototype.listen = { - 'all collection': 'renderCheckbox', - 'todos:clear mediator': 'clear' - }; - - TodosView.prototype.template = require('./templates/todos'); - - TodosView.prototype.render = function() { - TodosView.__super__.render.apply(this, arguments); - return this.renderCheckbox(); - }; - - TodosView.prototype.renderCheckbox = function() { - this.find('#toggle-all').checked = this.collection.allAreCompleted(); - return utils.toggle(this.el, this.collection.length !== 0); - }; - - TodosView.prototype.toggleCompleted = function(event) { - var isChecked; - isChecked = event.delegateTarget.checked; - return this.collection.forEach(function(todo) { - return todo.save({ - completed: isChecked - }); - }); - }; - - TodosView.prototype.clear = function() { - return this.collection.getCompleted().forEach(function(model) { - return model.destroy(); - }); - }; - - return TodosView; - -})(CollectionView); -}); - -; -//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/examples/chaplin-brunch/public/app.js.map b/examples/chaplin-brunch/public/app.js.map deleted file mode 100644 index 4b0dfa22da..0000000000 --- a/examples/chaplin-brunch/public/app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["app/application.coffee","app/controllers/index-controller.coffee","app/initialize.coffee","app/lib/utils.coffee","app/mediator.coffee","app/models/todo.coffee","app/models/todos.coffee","app/routes.coffee","app/views/base/collection-view.coffee","app/views/base/view.coffee","app/views/footer-view.coffee","app/views/header-view.coffee","app/views/templates/footer.hbs","app/views/templates/header.hbs","app/views/templates/todo.hbs","app/views/templates/todos.hbs","app/views/todo-view.coffee","app/views/todos-view.coffee"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;GAAA;kSAAA;;AAAA,GAAW,KAAX,EAAW;;AACX,CADA,EACQ,EAAR,EAAQ;;AAGR,CAJA,EAIuB,GAAjB,CAAN;CAGE;;;;;CAAA;;CAAA,EAAO,EAAP;;CAAA,EAIc,SAAd;CAEE,EAAqB,CAArB,IAAQ;CAFI,QAIZ;CARF,EAIc;;CAJd,EAUO,EAAP,IAAO;CAEL,IAAc,GAAN;CAFH,QAGL;CAbF,EAUO;;CAVP;;CAHyC,MAAO;;;;ACJlD;GAAA;kSAAA;;AAAA,GAAa,OAAb,YAAa;;AACb,CADA,EACa,OAAb,YAAa;;AACb,CAFA,EAEY,MAAZ,YAAY;;AACZ,CAHA,EAGW,KAAX,EAAW;;AAEX,CALA,EAKuB,GAAjB,CAAN;CAGE;;;;;CAAA;;CAAA,EAAc,SAAd;CACG,CAAmB,EAAnB,CAAD,IAAoB,EAApB;CACE;CAAA,EAAS,GAAT;CAAS,CAAY,GAAZ;CAAT;CAAA,EACc,CAAb,EAAD,IAAc;CACb,EAAa,CAAb,EAAD,IAAc,GAAd;CAHF,IAAoB;CADtB,EAAc;;CAAd,EASM,CAAN,EAAM,GAAC;CACL;CAAA,EAAqC,CAArC;CAAA,CAC8B,EAA9B;CACC,EAAW,CAAX,KAAW,EAAZ;CAAsB,CAAY,GAAZ,GAAoB,EAApB;CAAA,CAAsC,IAAV,GAAW;CAC3D,eAAO;CAAP,cACO;CAAuB,EAAN,EAAK,MAAL;CADxB,cAEO;AAAkB,CAAJ,EAAI,EAAK,MAAL,QAAJ;CAFrB;CAAA,kBAGO;CAHP,QAD0D;CAAtC,MAAsC;CAHxD,KAGQ;CAZd,EASM;;CATN;;CAH6C,MAAO;;;;ACLtD;;AAAA,GAAc,QAAd,EAAc;;AACd,CADA,EACS,GAAT,CAAS;;AAGT,CAJA,CAI8C,MAAtC,CAAsC,OAA9C;CAEI,GADE;CACF,CAAkB,EAAlB;CAAA,CAA4C,EAAX,CAAjC,IAAiC;CAAjC,CAA2D,EAAR;CAFT,GACxC;CADwC,CAG5C,GAHF;;;;ACAA;;AAAA,GAAQ,EAAR,EAAe;;AAEf,CAFA,CAGE,GADY,CAAd,EAAQ;CACN,EAAQ,GAAR,CAAQ,EAAC;CACF,CAAiB,CAAD,CAAjB,CAAM,CAAW,CAArB;CADF,EAAQ;CAHV,CAEA;;;CAKO,CAAP,IAAM;CAPN;;AASA,CATA,EASiB,EATjB,CASM,CAAN;;;;ACbA,CAAO,EAAU,GAAX,CAAN;;;;ACIA;GAAA;kSAAA;;AAAA,GAAuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EACE,KADF;CACE,CAAO,EAAP;CAAA,CACW,EAAX,CADA,IACA;CAFF;;CAAA,EAIY,OAAZ;CACE;CACA,IAA8B;CAA7B,CAAe,CAAhB,CAAC,KAAD;KAFU;CAJZ,EAIY;;CAJZ,EAQQ,GAAR,GAAQ;CACL,EAAD,CAAC,OAAD;AAAoB,CAAf,CAAW,CAAI,CAAC,EAAhB,KAAe;CADd,KACN;CATF,EAQQ;;CARR,EAWW,MAAX;CACE;CAAe,EAAD,CAAC,OAAf;CAZF,EAWW;;CAXX;;CADkC,MAAO;;;;ACJ3C;GAAA;kSAAA;;AAAA,GAAO,CAAP,GAAO;;AAEP,CAFA,EAEuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EAAO,CAAP;;CAAA,EACkB,SAAlB,GAAkB;;CADlB,EAGiB,YAAjB;CACG,IAAyB,CAA1B;CAJF,EAGiB;;CAHjB,EAMc,SAAd;CACG,IAAD;CAAO,CAAW,EAAX;CADK,KACZ;CAPF,EAMc;;CANd,EASW,MAAX;CACG,IAAD;CAAO,CAAW,GAAX;CADE,KACT;CAVF,EASW;;CATX,EAYY,MAAC,CAAb;CACO,EAAL,CAAI,KAAJ;CAbF,EAYY;;CAZZ;;CADmC,MAAO;;;;ACF5C,CAAO,EAAU,GAAX,CAAN,EAAkB;CAChB;CACM,CAAN;CAFe;;;;ACAjB;GAAA;kSAAA;;AAAA,GAAO,CAAP,GAAO;;AAEP,CAFA,EAEuB,GAAjB,CAAN;CAGE;;;;;CAAA;;CAAA,EAAqB,CAAI,KAAE,UAA3B;;CAAA,EACiB,CADjB,WACA;;CADA;;CAH4C,MAAO;;;;ACFrD;GAAA;kSAAA;;AAAA,GAAuB,GAAjB,CAAN;CAEE;;;;;CAAA;;CAAA,EAAqB,gBAArB;CACG,UAAD;CADF,EAAqB;;CAArB;;CAFkC,MAAO;;;;ACA3C;GAAA;kSAAA;;AAAA,GAAO,CAAP,GAAO;;AACP,CADA,EACQ,EAAR,EAAQ;;AAER,CAHA,EAGuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EAAY,CAAZ;;CAAA,CACA,CAAI,MADJ;;CAAA,EAGE,GADF;CACE,CAA0B,EAA1B;CAHF;;CAAA,EAKE,GADF;CACE,CAAyB,EAAzB;CAAA,CACkB,EAAlB,WADA,CACA;CANF;;CAAA,EAOU,KAAV,YAAU;;CAPV,EASQ,GAAR,GAAQ;CACN;CACC,UAAD;CAXF,EASQ;;CATR,EAagB,MAAC,KAAjB;CACE;OAAA;CAAA,IAA6B,GAAZ;CAAjB,EAAW,GAAX;KAAA;CAAA,EACY,CAAZ,OAAY;CADZ,EAEA,OAFA;CAGC,EAA8B,CAA9B,GAAD,EAAgC,EAAhC;CACE,GAAI,EAAJ,GAAc;CACd,CAA+D,EAArC,CAAc,CAAxC,EAAkC,OAAR;CAArB,EAAL,CAAI,KAAU,MAAd;OAF6B;CAA/B,IAA+B;CAjBjC,EAagB;;CAbhB,EAqBe,UAAf;CACE;CAAA,EAAQ,CAAR,MAAmB;CAAnB,EACS,CAAT,KAAS,CAAW;CADpB,EAEY,CAAZ,EAFA,GAEA,CAAuB,EAAX;CAFZ,EAI4C,CAA5C,EAJA,KAIA;CAJA,EAKmB,CAAnB,CAAiC,CAAV,CAAJ,SAAnB;CALA,EAMyC,CAAzC,YANA,GAMA;CANA,CAQwC,CAAY,CAApD,CAAK,CAAL,GAAwC,SAA3B;CACP,CAAN,CAA0B,CAAZ,CAAT,CAAL;CA/BF,EAqBe;;CArBf,EAiCgB,WAAhB;CACG,UAAD;CAlCF,EAiCgB;;CAjChB;;CADwC;;;;ACH1C;GAAA;kSAAA;;AAAA,GAAO,CAAP,GAAO;;AAEP,CAFA,EAEuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EAAY,CAAZ;;CAAA,CACA,CAAI,MADJ;;CAAA,EAGE,GADF;CACE,CAAsB,EAAtB;CAHF;;CAAA,EAIU,KAAV,YAAU;;CAJV,EAMe,MAAC,IAAhB;CACE;CAAA,EAAY,CAAZ;CAAA,EACQ,CAAR,UAA4B;AACkB,CAA9C,IAAe,EAAL;CAAV;KAFA;CAAA,GAGA,MAAW;CAAQ,CAAC,GAAD,CAAC;CAHpB,KAGA;CACC,EAA0B,CAA1B,CAAD;CAXF,EAMe;;CANf;;CADwC;;;CCF1C;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAjCA;AAAA;CCAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA;AAAA;;ACAA;GAAA;kSAAA;;AAAA,GAAO,CAAP,GAAO;;AAEP,CAFA,EAEuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EACE,GADF;CACE,CAAiB,EAAjB;CAAA,CACkB,EAAlB,EADA,UACA;CADA,CAEe,EAAf,EAFA,OAEA;CAFA,CAGkB,EAAlB,EAHA,UAGA;CAHA,CAIkB,EAAlB,GAJA,SAIA;CALF;;CAAA,EAQE,GADF;CACE,CAAgB,EAAhB;CARF;;CAAA,EAUU,KAAV,UAAU;;CAVV,EAWS,CAXT,GAWA;;CAXA,EAaQ,GAAR,GAAQ;CACN;CACC,UAAD;CAfF,EAaQ;;CAbR,EAiBa,QAAb;CACE;CAAA,EAAc,CAAd,CAAoB,MAApB;CACC,CAAE,EAAF,EAAD,GAAa,EAAb;CAnBF,EAiBa;;CAjBb,EAqBO,EAAP,IAAO;CACJ,IAAK,EAAN;CAtBF,EAqBO;;CArBP,EAwBQ,GAAR,GAAQ;CACL,IAAK,CAAN;CAzBF,EAwBQ;;CAxBR,EA2BM,CAAN,KAAM;CACJ;CAAA,CAAG,CAAH,MAAa;CAAb,EACQ,CAAR,GAAQ;CADR,GAEA,CAAK;CACC,EAAQ,EAAT,MAAL;CA/BF,EA2BM;;CA3BN,EAiCM,CAAN,CAAM,IAAC;CACL;CAAA,EAAY,CAAZ;CAAA,EACQ,CAAR,UAA4B;AACG,CAA/B;CAAA,GAAQ,CAAK,EAAN;KAFP;CAGA,IAAe,EAAL,EAAV;CAAA;KAHA;CAAA,GAIA,CAAM;CAAM,CAAC,GAAD,CAAC;CAJb,KAIA;CACC,CAAE,EAAF,EAAD,GAAa,EAAb;CAvCF,EAiCM;;CAjCN;;CADsC;;;;ACFxC;GAAA;kSAAA;;AAAA,GAAiB,WAAjB,UAAiB;;AACjB,CADA,EACW,KAAX,KAAW;;AACX,CAFA,EAEQ,EAAR,EAAQ;;AAER,CAJA,EAIuB,GAAjB,CAAN;CACE;;;;;CAAA;;CAAA,EAAW,IAAX;;CAAA,EAEE,GADF;CACE,CAAqB,EAArB;CAFF;;CAAA,EAGU,KAAV;;CAHA,EAIc,SAAd;;CAJA,EAME,GADF;CACE,CAAkB,EAAlB;CAAA,CACwB,EAAxB,GADA,eACA;CAPF;;CAAA,EAQU,KAAV,WAAU;;CARV,EAUQ,GAAR,GAAQ;CACN;CACC,UAAD;CAZF,EAUQ;;CAVR,EAcgB,WAAhB;CACE,EAA+B,CAA/B,MAA0C,GAA1C,EAA+B;CACzB,CAAN,EAAc,CAAT,CAAL,IAA6B,CAA7B;CAhBF,EAcgB;;CAdhB,EAkBiB,MAAC,MAAlB;CACE;CAAA,EAAY,CAAZ,CAAiB,EAAjB,OAAgC;CAC/B,EAAmB,CAAnB,GAAD,EAAqB,CAAV,CAAX;CAAmC,GAAD,SAAJ;CAAU,CAAW,MAAX;CAApB,OAAU;CAA9B,IAAoB;CApBtB,EAkBiB;;CAlBjB,EAsBO,EAAP,IAAO;CACJ,EAAkC,CAAlC,CAAkC,EAAnC,EAAoC,CAAzB,CAAX;CACQ,IAAD,EAAL;CADF,IAAmC;CAvBrC,EAsBO;;CAtBP;;CADuC","file":"public/app.js","sourcesContent":["mediator = require 'mediator'\nTodos = require 'models/todos'\n\n# The application object\nmodule.exports = class Application extends Chaplin.Application\n # Set your application name here so the document title is set to\n # “Controller title – Site title” (see Layout#adjustTitle)\n title: 'Chaplin • TodoMVC'\n\n # Create additional mediator properties\n # -------------------------------------\n initMediator: ->\n # Add additional application-specific properties and methods\n mediator.todos = new Todos()\n # Seal the mediator\n super\n\n start: ->\n # If todos are fetched from server, we will need to wait for them.\n mediator.todos.fetch()\n super\n","HeaderView = require '../views/header-view'\nFooterView = require '../views/footer-view'\nTodosView = require '../views/todos-view'\nmediator = require 'mediator'\n\nmodule.exports = class IndexController extends Chaplin.Controller\n # The method is executed before any controller actions.\n # We compose structure in order for it to be rendered only once.\n beforeAction: ->\n @reuse 'structure', ->\n params = collection: mediator.todos\n @header = new HeaderView params\n @footer = new FooterView params\n\n # On each new load, old @view will be disposed and\n # new @view will be created. This is idiomatic Chaplin memory management:\n # one controller per screen.\n list: (params) ->\n filterer = params.filterer?.trim() ? 'all'\n @publishEvent 'todos:filter', filterer\n @view = new TodosView collection: mediator.todos, filterer: (model) ->\n switch filterer\n when 'completed' then model.get('completed')\n when 'active' then not model.get('completed')\n else true\n","Application = require 'application'\nroutes = require 'routes'\n\n# Initialize the application on DOM ready event.\ndocument.addEventListener 'DOMContentLoaded', ->\n new Application\n controllerSuffix: '-controller', pushState: false, routes: routes\n, false\n","# Application-specific utilities\n# ------------------------------\n\n# Delegate to Chaplin’s utils module.\nutils = Chaplin.utils.beget Chaplin.utils\n\nBackbone.utils.extend utils,\n toggle: (elem, visible) ->\n elem.style.display = (if visible then '' else 'none')\n\n# Prevent creating new properties and stuff.\nObject.seal? utils\n\nmodule.exports = utils\n","module.exports = Chaplin.mediator\n","# It is a very good idea to have base Model / Collection\n# e.g. Model = require 'models/base/model'\n# But in this particular app since we only have one\n# model type, we will inherit directly from Chaplin Model.\nmodule.exports = class Todo extends Chaplin.Model\n defaults:\n title: ''\n completed: no\n\n initialize: ->\n super\n @set 'created', Date.now() if @isNew()\n\n toggle: ->\n @set completed: not @get('completed')\n\n isVisible: ->\n isCompleted = @get('completed')\n","Todo = require 'models/todo'\n\nmodule.exports = class Todos extends Chaplin.Collection\n model: Todo\n localStorage: new Store 'todos-chaplin'\n\n allAreCompleted: ->\n @getCompleted().length is @length\n\n getCompleted: ->\n @where completed: yes\n\n getActive: ->\n @where completed: no\n\n comparator: (todo) ->\n todo.get('created')\n","module.exports = (match) ->\n match ':filterer', 'index#list'\n match '', 'index#list'\n","View = require 'views/base/view'\n\nmodule.exports = class CollectionView extends Chaplin.CollectionView\n # This class doesn’t inherit from the application-specific View class,\n # so we need to borrow the method from the View prototype:\n getTemplateFunction: View::getTemplateFunction\n useCssAnimation: true\n","module.exports = class View extends Chaplin.View\n # Precompiled templates function initializer.\n getTemplateFunction: ->\n @template\n","View = require './base/view'\nutils = require 'lib/utils'\n\nmodule.exports = class FooterView extends View\n autoRender: true\n el: '#footer'\n events:\n 'click #clear-completed': 'clearCompleted'\n listen:\n 'todos:filter mediator': 'updateFilterer'\n 'all collection': 'renderCounter'\n template: require './templates/footer'\n\n render: ->\n super\n @renderCounter()\n\n updateFilterer: (filterer) ->\n filterer = '' if filterer is 'all'\n selector = \"[href='#/#{filterer}']\"\n cls = 'selected'\n @findAll('#filters a').forEach (link) =>\n link.classList.remove cls\n link.classList.add cls if Backbone.utils.matchesSelector link, selector\n\n renderCounter: ->\n total = @collection.length\n active = @collection.getActive().length\n completed = @collection.getCompleted().length\n\n @find('#todo-count > strong').textContent = active\n countDescription = (if active is 1 then 'item' else 'items')\n @find('.todo-count-title').textContent = countDescription\n\n utils.toggle @find('#clear-completed'), completed > 0\n utils.toggle @el, total > 0\n\n clearCompleted: ->\n @publishEvent 'todos:clear'\n","View = require './base/view'\n\nmodule.exports = class HeaderView extends View\n autoRender: true\n el: '#header'\n events:\n 'keypress #new-todo': 'createOnEnter'\n template: require './templates/header'\n\n createOnEnter: (event) ->\n ENTER_KEY = 13\n title = event.delegateTarget.value.trim()\n return if event.keyCode isnt ENTER_KEY or not title\n @collection.create {title}\n @find('#new-todo').value = ''\n","var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"\\n \\n items\\n left\\n\\n\\n\\n\";\n });\nif (typeof define === 'function' && define.amd) {\n define([], function() {\n return __templateData;\n });\n} else if (typeof module === 'object' && module && module.exports) {\n module.exports = __templateData;\n} else {\n __templateData;\n}","var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"

        todos

        \\n\\n\";\n });\nif (typeof define === 'function' && define.amd) {\n define([], function() {\n return __templateData;\n });\n} else if (typeof module === 'object' && module && module.exports) {\n module.exports = __templateData;\n} else {\n __templateData;\n}","var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n var buffer = \"\", stack1, helper, self=this, functionType=\"function\", escapeExpression=this.escapeExpression;\n\nfunction program1(depth0,data) {\n \n \n return \" checked\";\n }\n\n buffer += \"
        \\n \\n \\n \\n
        \\n\\n\";\n return buffer;\n });\nif (typeof define === 'function' && define.amd) {\n define([], function() {\n return __templateData;\n });\n} else if (typeof module === 'object' && module && module.exports) {\n module.exports = __templateData;\n} else {\n __templateData;\n}","var __templateData = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {\n this.compilerInfo = [4,'>= 1.0.0'];\nhelpers = this.merge(helpers, Handlebars.helpers); data = data || {};\n \n\n\n return \"\\n\\n
          \\n\";\n });\nif (typeof define === 'function' && define.amd) {\n define([], function() {\n return __templateData;\n });\n} else if (typeof module === 'object' && module && module.exports) {\n module.exports = __templateData;\n} else {\n __templateData;\n}","View = require './base/view'\n\nmodule.exports = class TodoView extends View\n events:\n 'click .toggle': 'toggle'\n 'dblclick label': 'edit'\n 'keyup .edit': 'save'\n 'focusout .edit': 'save'\n 'click .destroy': 'clear'\n\n listen:\n 'change model': 'render'\n\n template: require './templates/todo'\n tagName: 'li'\n\n render: ->\n super\n @toggleClass()\n\n toggleClass: ->\n isCompleted = @model.get('completed')\n @el.classList.toggle 'completed', isCompleted\n\n clear: ->\n @model.destroy()\n\n toggle: ->\n @model.toggle().save()\n\n edit: ->\n @el.classList.add 'editing'\n input = @find('.edit')\n input.focus()\n input.value = input.value;\n\n save: (event) ->\n ENTER_KEY = 13\n title = event.delegateTarget.value.trim()\n return @model.destroy() unless title\n return if event.type is 'keyup' and event.keyCode isnt ENTER_KEY\n @model.save {title}\n @el.classList.remove 'editing'\n","CollectionView = require './base/collection-view'\nTodoView = require './todo-view'\nutils = require 'lib/utils'\n\nmodule.exports = class TodosView extends CollectionView\n container: '#main'\n events:\n 'click #toggle-all': 'toggleCompleted'\n itemView: TodoView\n listSelector: '#todo-list'\n listen:\n 'all collection': 'renderCheckbox'\n 'todos:clear mediator': 'clear'\n template: require './templates/todos'\n\n render: ->\n super\n @renderCheckbox()\n\n renderCheckbox: ->\n @find('#toggle-all').checked = @collection.allAreCompleted()\n utils.toggle @el, @collection.length isnt 0\n\n toggleCompleted: (event) ->\n isChecked = event.delegateTarget.checked\n @collection.forEach (todo) -> todo.save completed: isChecked\n\n clear: ->\n @collection.getCompleted().forEach (model) ->\n model.destroy()\n"]} \ No newline at end of file diff --git a/examples/chaplin-brunch/public/index.html b/examples/chaplin-brunch/public/index.html deleted file mode 100644 index d5609b7dd7..0000000000 --- a/examples/chaplin-brunch/public/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Chaplin & Brunch • TodoMVC - - - - - - - - - - - - -
          - -
          -
          -
          - - - diff --git a/examples/chaplin-brunch/public/vendor.js b/examples/chaplin-brunch/public/vendor.js deleted file mode 100644 index a2e8754086..0000000000 --- a/examples/chaplin-brunch/public/vendor.js +++ /dev/null @@ -1,627 +0,0 @@ -(function(/*! Brunch !*/) { - 'use strict'; - - var globals = typeof window !== 'undefined' ? window : global; - if (typeof globals.require === 'function') return; - - var modules = {}; - var cache = {}; - - var has = function(object, name) { - return ({}).hasOwnProperty.call(object, name); - }; - - var expand = function(root, name) { - var results = [], parts, part; - if (/^\.\.?(\/|$)/.test(name)) { - parts = [root, name].join('/').split('/'); - } else { - parts = name.split('/'); - } - for (var i = 0, length = parts.length; i < length; i++) { - part = parts[i]; - if (part === '..') { - results.pop(); - } else if (part !== '.' && part !== '') { - results.push(part); - } - } - return results.join('/'); - }; - - var dirname = function(path) { - return path.split('/').slice(0, -1).join('/'); - }; - - var localRequire = function(path) { - return function(name) { - var dir = dirname(path); - var absolute = expand(dir, name); - return globals.require(absolute, path); - }; - }; - - var initModule = function(name, definition) { - var module = {id: name, exports: {}}; - cache[name] = module; - definition(module.exports, localRequire(name), module); - return module.exports; - }; - - var require = function(name, loaderPath) { - var path = expand(name, '.'); - if (loaderPath == null) loaderPath = '/'; - - if (has(cache, path)) return cache[path].exports; - if (has(modules, path)) return initModule(path, modules[path]); - - var dirIndex = expand(path, './index'); - if (has(cache, dirIndex)) return cache[dirIndex].exports; - if (has(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]); - - throw new Error('Cannot find module "' + name + '" from '+ '"' + loaderPath + '"'); - }; - - var define = function(bundle, fn) { - if (typeof bundle === 'object') { - for (var key in bundle) { - if (has(bundle, key)) { - modules[key] = bundle[key]; - } - } - } else { - modules[bundle] = fn; - } - }; - - var list = function() { - var result = []; - for (var item in modules) { - if (has(modules, item)) { - result.push(item); - } - } - return result; - }; - - globals.require = require; - globals.require.define = define; - globals.require.register = define; - globals.require.list = list; - globals.require.brunch = true; -})(); -Backbone.View = Backbone.NativeView; - -/*! - - handlebars v1.3.0 - -Copyright (C) 2011 by Yehuda Katz - -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. - -@license -*/ -/* exported Handlebars */ -var Handlebars = (function() { -// handlebars/safe-string.js -var __module3__ = (function() { - "use strict"; - var __exports__; - // Build out our basic SafeString type - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = function() { - return "" + this.string; - }; - - __exports__ = SafeString; - return __exports__; -})(); - -// handlebars/utils.js -var __module2__ = (function(__dependency1__) { - "use strict"; - var __exports__ = {}; - /*jshint -W004 */ - var SafeString = __dependency1__; - - var escape = { - "&": "&", - "<": "<", - ">": ">", - '"': """, - "'": "'", - "`": "`" - }; - - var badChars = /[&<>"'`]/g; - var possible = /[&<>"'`]/; - - function escapeChar(chr) { - return escape[chr] || "&"; - } - - function extend(obj, value) { - for(var key in value) { - if(Object.prototype.hasOwnProperty.call(value, key)) { - obj[key] = value[key]; - } - } - } - - __exports__.extend = extend;var toString = Object.prototype.toString; - __exports__.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - var isFunction = function(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - if (isFunction(/x/)) { - isFunction = function(value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - var isFunction; - __exports__.isFunction = isFunction; - var isArray = Array.isArray || function(value) { - return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false; - }; - __exports__.isArray = isArray; - - function escapeExpression(string) { - // don't escape SafeStrings, since they're already safe - if (string instanceof SafeString) { - return string.toString(); - } else if (!string && string !== 0) { - return ""; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = "" + string; - - if(!possible.test(string)) { return string; } - return string.replace(badChars, escapeChar); - } - - __exports__.escapeExpression = escapeExpression;function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - __exports__.isEmpty = isEmpty; - return __exports__; -})(__module3__); - -// handlebars/exception.js -var __module4__ = (function() { - "use strict"; - var __exports__; - - var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var line; - if (node && node.firstLine) { - line = node.firstLine; - - message += ' - ' + line + ':' + node.firstColumn; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - if (line) { - this.lineNumber = line; - this.column = node.firstColumn; - } - } - - Exception.prototype = new Error(); - - __exports__ = Exception; - return __exports__; -})(); - -// handlebars/base.js -var __module1__ = (function(__dependency1__, __dependency2__) { - "use strict"; - var __exports__ = {}; - var Utils = __dependency1__; - var Exception = __dependency2__; - - var VERSION = "1.3.0"; - __exports__.VERSION = VERSION;var COMPILER_REVISION = 4; - __exports__.COMPILER_REVISION = COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '>= 1.0.0' - }; - __exports__.REVISION_CHANGES = REVISION_CHANGES; - var isArray = Utils.isArray, - isFunction = Utils.isFunction, - toString = Utils.toString, - objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials) { - this.helpers = helpers || {}; - this.partials = partials || {}; - - registerDefaultHelpers(this); - } - - __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: log, - - registerHelper: function(name, fn, inverse) { - if (toString.call(name) === objectType) { - if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); } - Utils.extend(this.helpers, name); - } else { - if (inverse) { fn.not = inverse; } - this.helpers[name] = fn; - } - }, - - registerPartial: function(name, str) { - if (toString.call(name) === objectType) { - Utils.extend(this.partials, name); - } else { - this.partials[name] = str; - } - } - }; - - function registerDefaultHelpers(instance) { - instance.registerHelper('helperMissing', function(arg) { - if(arguments.length === 2) { - return undefined; - } else { - throw new Exception("Missing helper: '" + arg + "'"); - } - }); - - instance.registerHelper('blockHelperMissing', function(context, options) { - var inverse = options.inverse || function() {}, fn = options.fn; - - if (isFunction(context)) { context = context.call(this); } - - if(context === true) { - return fn(this); - } else if(context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if(context.length > 0) { - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - return fn(context); - } - }); - - instance.registerHelper('each', function(context, options) { - var fn = options.fn, inverse = options.inverse; - var i = 0, ret = "", data; - - if (isFunction(context)) { context = context.call(this); } - - if (options.data) { - data = createFrame(options.data); - } - - if(context && typeof context === 'object') { - if (isArray(context)) { - for(var j = context.length; i\": \">\",\n '\"': \""\",\n \"'\": \"'\",\n \"`\": \"`\"\n };\n\n var badChars = /[&<>\"'`]/g;\n var possible = /[&<>\"'`]/;\n\n function escapeChar(chr) {\n return escape[chr] || \"&\";\n }\n\n function extend(obj, value) {\n for(var key in value) {\n if(Object.prototype.hasOwnProperty.call(value, key)) {\n obj[key] = value[key];\n }\n }\n }\n\n __exports__.extend = extend;var toString = Object.prototype.toString;\n __exports__.toString = toString;\n // Sourced from lodash\n // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt\n var isFunction = function(value) {\n return typeof value === 'function';\n };\n // fallback for older versions of Chrome and Safari\n if (isFunction(/x/)) {\n isFunction = function(value) {\n return typeof value === 'function' && toString.call(value) === '[object Function]';\n };\n }\n var isFunction;\n __exports__.isFunction = isFunction;\n var isArray = Array.isArray || function(value) {\n return (value && typeof value === 'object') ? toString.call(value) === '[object Array]' : false;\n };\n __exports__.isArray = isArray;\n\n function escapeExpression(string) {\n // don't escape SafeStrings, since they're already safe\n if (string instanceof SafeString) {\n return string.toString();\n } else if (!string && string !== 0) {\n return \"\";\n }\n\n // Force a string conversion as this will be done by the append regardless and\n // the regex test will do this transparently behind the scenes, causing issues if\n // an object's to string has escaped characters in it.\n string = \"\" + string;\n\n if(!possible.test(string)) { return string; }\n return string.replace(badChars, escapeChar);\n }\n\n __exports__.escapeExpression = escapeExpression;function isEmpty(value) {\n if (!value && value !== 0) {\n return true;\n } else if (isArray(value) && value.length === 0) {\n return true;\n } else {\n return false;\n }\n }\n\n __exports__.isEmpty = isEmpty;\n return __exports__;\n})(__module3__);\n\n// handlebars/exception.js\nvar __module4__ = (function() {\n \"use strict\";\n var __exports__;\n\n var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack'];\n\n function Exception(message, node) {\n var line;\n if (node && node.firstLine) {\n line = node.firstLine;\n\n message += ' - ' + line + ':' + node.firstColumn;\n }\n\n var tmp = Error.prototype.constructor.call(this, message);\n\n // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work.\n for (var idx = 0; idx < errorProps.length; idx++) {\n this[errorProps[idx]] = tmp[errorProps[idx]];\n }\n\n if (line) {\n this.lineNumber = line;\n this.column = node.firstColumn;\n }\n }\n\n Exception.prototype = new Error();\n\n __exports__ = Exception;\n return __exports__;\n})();\n\n// handlebars/base.js\nvar __module1__ = (function(__dependency1__, __dependency2__) {\n \"use strict\";\n var __exports__ = {};\n var Utils = __dependency1__;\n var Exception = __dependency2__;\n\n var VERSION = \"1.3.0\";\n __exports__.VERSION = VERSION;var COMPILER_REVISION = 4;\n __exports__.COMPILER_REVISION = COMPILER_REVISION;\n var REVISION_CHANGES = {\n 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it\n 2: '== 1.0.0-rc.3',\n 3: '== 1.0.0-rc.4',\n 4: '>= 1.0.0'\n };\n __exports__.REVISION_CHANGES = REVISION_CHANGES;\n var isArray = Utils.isArray,\n isFunction = Utils.isFunction,\n toString = Utils.toString,\n objectType = '[object Object]';\n\n function HandlebarsEnvironment(helpers, partials) {\n this.helpers = helpers || {};\n this.partials = partials || {};\n\n registerDefaultHelpers(this);\n }\n\n __exports__.HandlebarsEnvironment = HandlebarsEnvironment;HandlebarsEnvironment.prototype = {\n constructor: HandlebarsEnvironment,\n\n logger: logger,\n log: log,\n\n registerHelper: function(name, fn, inverse) {\n if (toString.call(name) === objectType) {\n if (inverse || fn) { throw new Exception('Arg not supported with multiple helpers'); }\n Utils.extend(this.helpers, name);\n } else {\n if (inverse) { fn.not = inverse; }\n this.helpers[name] = fn;\n }\n },\n\n registerPartial: function(name, str) {\n if (toString.call(name) === objectType) {\n Utils.extend(this.partials, name);\n } else {\n this.partials[name] = str;\n }\n }\n };\n\n function registerDefaultHelpers(instance) {\n instance.registerHelper('helperMissing', function(arg) {\n if(arguments.length === 2) {\n return undefined;\n } else {\n throw new Exception(\"Missing helper: '\" + arg + \"'\");\n }\n });\n\n instance.registerHelper('blockHelperMissing', function(context, options) {\n var inverse = options.inverse || function() {}, fn = options.fn;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if(context === true) {\n return fn(this);\n } else if(context === false || context == null) {\n return inverse(this);\n } else if (isArray(context)) {\n if(context.length > 0) {\n return instance.helpers.each(context, options);\n } else {\n return inverse(this);\n }\n } else {\n return fn(context);\n }\n });\n\n instance.registerHelper('each', function(context, options) {\n var fn = options.fn, inverse = options.inverse;\n var i = 0, ret = \"\", data;\n\n if (isFunction(context)) { context = context.call(this); }\n\n if (options.data) {\n data = createFrame(options.data);\n }\n\n if(context && typeof context === 'object') {\n if (isArray(context)) {\n for(var j = context.length; i Chaplin is an architecture for JavaScript applications using the Backbone.js library. Chaplin addresses Backbone’s limitations by providing a lightweight and flexible structure that features well-proven design patterns and best practices. - -In this case, Backbone is replaced with [Exoskeleton](http://exosjs.com), -faster and leaner Backbone without dependencies on jQuery and underscore. - -> _[Chaplin - chaplinjs.org](http://chaplinjs.org)_ - - -## Learning Chaplin - -The [Chaplin website](http://chaplinjs.org) is a great resource for getting started. - -Here are some links you may find helpful: - -* [Getting Started](https://github.com/chaplinjs/chaplin/blob/master/docs/getting_started.md) -* [Documentation](https://github.com/chaplinjs/chaplin/tree/master/docs) -* [API Reference](https://github.com/chaplinjs/chaplin/tree/master/docs#api-docs) -* [Annotated Source Code](http://chaplinjs.org/annotated/chaplin.html) -* [Applications built with Chaplin](https://github.com/chaplinjs/chaplin/wiki/Projects-and-companies-using-Chaplin) -* [Cookbook](https://github.com/chaplinjs/chaplin/wiki/Cookbook) -* [Chaplin on GitHub](https://github.com/chaplinjs) - -Articles and guides from the community: - -* [JavaScript MVC frameworks: A Comparison of Marionette and Chaplin](http://9elements.com/io/index.php/comparison-of-marionette-and-chaplin/) - -Get help from other Chaplin users: - -* [Chaplin on StackOverflow](http://stackoverflow.com/questions/tagged/chaplinjs) -* [Chaplin on Twitter](http://twitter.com/chaplinjs) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ - - -## Running - -If you haven't already installed [Brunch](http://brunch.io), run: - - npm install -g brunch - -Once you have Brunch, install this application's dependencies: - - # from examples/chaplin-brunch - npm install & bower install - -To build the app, run: - - # from examples/chaplin-brunch - brunch build - -To watch for changes and re-compile: - - # from examples/chaplin-brunch - brunch watch - -Open `public/index.html` in your browser to see it in action! - - -## Credit - -This TodoMVC application was created by [@paulmillr](http://paulmillr.com). diff --git a/examples/chaplin-brunch/vendor/vendor.js b/examples/chaplin-brunch/vendor/vendor.js deleted file mode 100644 index 04728944b5..0000000000 --- a/examples/chaplin-brunch/vendor/vendor.js +++ /dev/null @@ -1 +0,0 @@ -Backbone.View = Backbone.NativeView; diff --git a/examples/flight/.gitignore b/examples/flight/.gitignore deleted file mode 100644 index 21d0fdfe11..0000000000 --- a/examples/flight/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -node_modules/.bin/ - -node_modules/depot/ -!node_modules/depot/depot.js - -node_modules/es5-shim/ -!node_modules/es5-shim/es5-shim.js -!node_modules/es5-shim/es5-sham.js - -node_modules/jquery/ -!node_modules/jquery/dist -node_modules/jquery/dist/ -!node_modules/jquery/dist/jquery.js - -node_modules/flight/ -!node_modules/flight/lib - -node_modules/requirejs/ -!node_modules/requirejs/require.js - -node_modules/requirejs-text/ -!node_modules/requirejs-text/text.js - -node_modules/todomvc-app-css/ -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common/ -!node_modules/todomvc-common/base.css -!node_modules/todomvc-common/base.js - - -node_modules/karma/ -node_modules/karma-chrome-launcher/ -node_modules/karma-firefox-launcher/ -node_modules/karma-ie-launcher/ -node_modules/karma-jasmine/ -node_modules/karma-phantomjs-launcher/ -node_modules/jasmine-jquery/ -node_modules/jasmine-flight/ -node_modules/karma-safari-launcher/ -node_modules/karma-requirejs/ diff --git a/examples/flight/.jshintrc b/examples/flight/.jshintrc deleted file mode 100644 index db0b04df48..0000000000 --- a/examples/flight/.jshintrc +++ /dev/null @@ -1,23 +0,0 @@ -{ - "node": true, - "browser": true, - "esnext": true, - "bitwise": true, - "camelcase": true, - "curly": true, - "eqeqeq": true, - "immed": true, - "indent": 4, - "latedef": true, - "newcap": true, - "noarg": true, - "quotmark": "single", - "regexp": true, - "undef": true, - "unused": true, - "strict": true, - "trailing": true, - "smarttabs": true, - "white": true, - "validthis": true -} diff --git a/examples/flight/app/js/data/stats.js b/examples/flight/app/js/data/stats.js deleted file mode 100644 index 1a8a0437a5..0000000000 --- a/examples/flight/app/js/data/stats.js +++ /dev/null @@ -1,39 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component', - 'app/store' -], function (defineComponent, dataStore) { - function stats() { - this.attributes({ - dataStore: dataStore - }); - - this.recount = function () { - var todos = this.attr.dataStore.all(); - var all = todos.length; - var remaining = todos.reduce(function (memo, each) { - return memo += each.completed ? 0 : 1; - }, 0); - - this.trigger('dataStatsCounted', { - all: all, - remaining: remaining, - completed: all - remaining, - filter: localStorage.getItem('filter') || '' - }); - }; - - this.after('initialize', function () { - this.on(document, 'dataTodosLoaded', this.recount); - this.on(document, 'dataTodoAdded', this.recount); - this.on(document, 'dataTodoRemoved', this.recount); - this.on(document, 'dataTodoToggled', this.recount); - this.on(document, 'dataClearedCompleted', this.recount); - this.on(document, 'dataTodoToggledAll', this.recount); - }); - } - - return defineComponent(stats); -}); diff --git a/examples/flight/app/js/data/todos.js b/examples/flight/app/js/data/todos.js deleted file mode 100644 index 973a3d1942..0000000000 --- a/examples/flight/app/js/data/todos.js +++ /dev/null @@ -1,102 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component', - 'app/store' -], function (defineComponent, dataStore) { - function todos() { - var filter; - this.attributes({ - dataStore: dataStore - }); - - this.add = function (e, data) { - var todo = this.attr.dataStore.save({ - title: data.title, - completed: false - }); - - this.trigger('dataTodoAdded', { todo: todo, filter: filter }); - }; - - this.remove = function (e, data) { - var todo = this.attr.dataStore.destroy(data.id); - - this.trigger('dataTodoRemoved', todo); - }; - - this.load = function () { - var todos; - - filter = localStorage.getItem('filter'); - todos = this.find(); - this.trigger('dataTodosLoaded', { todos: todos }); - }; - - this.update = function (e, data) { - this.attr.dataStore.save(data); - }; - - this.toggleCompleted = function (e, data) { - var eventType; - var todo = this.attr.dataStore.get(data.id); - - todo.completed = !todo.completed; - this.attr.dataStore.save(todo); - - eventType = filter ? 'dataTodoRemoved' : 'dataTodoToggled'; - - this.trigger(eventType, todo); - }; - - this.toggleAllCompleted = function (e, data) { - this.attr.dataStore.updateAll({ completed: data.completed }); - this.trigger('dataTodoToggledAll', { todos: this.find(filter) }); - }; - - this.filter = function (e, data) { - var todos; - - localStorage.setItem('filter', data.filter); - filter = data.filter; - todos = this.find(); - - this.trigger('dataTodosFiltered', { todos: todos }); - }; - - this.find = function () { - var todos; - - if (filter) { - todos = this.attr.dataStore.find(function (each) { - return (typeof each[filter] !== 'undefined') ? each.completed : !each.completed; - }); - } else { - todos = this.attr.dataStore.all(); - } - - return todos; - }; - - this.clearCompleted = function () { - this.attr.dataStore.destroyAll({ completed: true }); - - this.trigger('uiFilterRequested', { filter: filter }); - this.trigger('dataClearedCompleted'); - }; - - this.after('initialize', function () { - this.on(document, 'uiAddRequested', this.add); - this.on(document, 'uiUpdateRequested', this.update); - this.on(document, 'uiRemoveRequested', this.remove); - this.on(document, 'uiLoadRequested', this.load); - this.on(document, 'uiToggleRequested', this.toggleCompleted); - this.on(document, 'uiToggleAllRequested', this.toggleAllCompleted); - this.on(document, 'uiClearRequested', this.clearCompleted); - this.on(document, 'uiFilterRequested', this.filter); - }); - } - - return defineComponent(todos); -}); diff --git a/examples/flight/app/js/main.js b/examples/flight/app/js/main.js deleted file mode 100644 index 49f8fe6d19..0000000000 --- a/examples/flight/app/js/main.js +++ /dev/null @@ -1,31 +0,0 @@ -/*global DEBUG */ -'use strict'; - -require.config({ - baseUrl: './', - paths: { - jquery: 'node_modules/jquery/dist/jquery', - es5shim: 'node_modules/es5-shim/es5-shim', - es5sham: 'node_modules/es5-shim/es5-sham', - text: 'node_modules/requirejs-text/text', - flight: 'node_modules/flight', - depot: 'node_modules/depot/depot', - app: 'app/js', - templates: 'app/templates', - ui: 'app/js/ui', - data: 'app/js/data', - }, - shim: { - 'app/page/app': { - deps: ['jquery', 'es5shim', 'es5sham'] - } - } -}); - -require(['flight/lib/debug'], function (debug) { - debug.enable(true); - DEBUG.events.logAll(); - require(['app/page/app'],function(App){ - App.initialize(); - }); -}); diff --git a/examples/flight/app/js/page/app.js b/examples/flight/app/js/page/app.js deleted file mode 100644 index 47e43d8583..0000000000 --- a/examples/flight/app/js/page/app.js +++ /dev/null @@ -1,26 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'data/todos', - 'data/stats', - 'ui/new_item', - 'ui/todo_list', - 'ui/stats', - 'ui/main_selector', - 'ui/toggle_all' -], function (TodosData, StatsData, NewItemUI, TodoListUI, StatsUI, MainSelectorUI, ToggleAllUI) { - var initialize = function () { - StatsData.attachTo(document); - TodosData.attachTo(document); - NewItemUI.attachTo('.new-todo'); - MainSelectorUI.attachTo('.main'); - StatsUI.attachTo('.footer'); - ToggleAllUI.attachTo('.toggle-all'); - TodoListUI.attachTo('.todo-list'); - }; - - return { - initialize: initialize - }; -}); diff --git a/examples/flight/app/js/store.js b/examples/flight/app/js/store.js deleted file mode 100644 index e9ab55ddae..0000000000 --- a/examples/flight/app/js/store.js +++ /dev/null @@ -1,9 +0,0 @@ -/*global define */ - -'use strict'; - -define([ - 'depot' -], function (depot) { - return depot('todos', { idAttribute: 'id' }); -}); diff --git a/examples/flight/app/js/ui/main_selector.js b/examples/flight/app/js/ui/main_selector.js deleted file mode 100644 index 12f7e2ae08..0000000000 --- a/examples/flight/app/js/ui/main_selector.js +++ /dev/null @@ -1,20 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component' -], function (defineComponent) { - function mainSelector() { - this.toggle = function (e, data) { - var toggle = data.all > 0; - this.$node.toggle(toggle); - }; - - this.after('initialize', function () { - this.$node.hide(); - this.on(document, 'dataStatsCounted', this.toggle); - }); - } - - return defineComponent(mainSelector); -}); diff --git a/examples/flight/app/js/ui/new_item.js b/examples/flight/app/js/ui/new_item.js deleted file mode 100644 index 0a9554c880..0000000000 --- a/examples/flight/app/js/ui/new_item.js +++ /dev/null @@ -1,29 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component' -], function (defineComponent) { - function newItem() { - var ENTER_KEY = 13; - - this.createOnEnter = function (e) { - if (e.which !== ENTER_KEY || - !this.$node.val().trim()) { - return; - } - - this.trigger('uiAddRequested', { - title: this.$node.val().trim() - }); - - this.$node.val(''); - }; - - this.after('initialize', function () { - this.on('keydown', this.createOnEnter); - }); - } - - return defineComponent(newItem); -}); diff --git a/examples/flight/app/js/ui/stats.js b/examples/flight/app/js/ui/stats.js deleted file mode 100644 index 90ee824690..0000000000 --- a/examples/flight/app/js/ui/stats.js +++ /dev/null @@ -1,37 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component', - './with_filters', - 'text!templates/stats.html', - 'app/utils' -], function (defineComponent, withFilters, statsTmpl, utils) { - function stats() { - var template = utils.tmpl(statsTmpl); - - this.attributes({ - clearCompletedSelector: '.clear-completed' - }); - - this.render = function (e, data) { - var toggle = data.all > 0; - - this.$node.html(template(data)); - this.$node.toggle(toggle); - this.markSelected(data.filter); - }; - - this.clearCompleted = function () { - this.trigger('uiClearRequested'); - }; - - this.after('initialize', function () { - this.$node.hide(); - this.on(document, 'dataStatsCounted', this.render); - this.on('click', { 'clearCompletedSelector': this.clearCompleted }); - }); - } - - return defineComponent(stats, withFilters); -}); diff --git a/examples/flight/app/js/ui/todo_list.js b/examples/flight/app/js/ui/todo_list.js deleted file mode 100644 index 897b141c6c..0000000000 --- a/examples/flight/app/js/ui/todo_list.js +++ /dev/null @@ -1,124 +0,0 @@ -/*global define, $ */ -'use strict'; - -define([ - 'flight/lib/component', - 'text!templates/todo.html', - 'app/utils' -], function (defineComponent, todoTmpl, utils) { - function todoList() { - var ENTER_KEY = 'Enter'; - var ESCAPE_KEY = 'Escape'; - var template = utils.tmpl(todoTmpl); - - this.attributes({ - destroySelector: 'button.destroy', - toggleSelector: 'input.toggle', - labelSelector: 'label', - editSelector: '.edit' - }); - - this.renderAll = function (e, data) { - this.$node.html(''); - data.todos.forEach(function (each) { - this.render(e, { todo: each }); - }, this); - }; - - this.render = function (e, data) { - if (e.type === 'dataTodoAdded' && data.filter === 'completed') { - return; - } - - this.$node.append(template(data.todo)); - }; - - this.edit = function (e, data) { - var $todoEl = $(data.el).parents('li'); - var $inputEl = $todoEl.find('input'); - var value = $todoEl.find('label').text(); - - $todoEl.addClass('editing'); - $inputEl.val(value); - this.select('editSelector').focus(); - }; - - this.requestUpdate = function (e) { - var $inputEl = $(e.currentTarget); - var $todoEl = $inputEl.parents('li'); - var value = $inputEl.val().trim(); - var id = $todoEl.attr('id'); - - if (!$todoEl.hasClass('editing')) { - return; - } - - $todoEl.removeClass('editing'); - - if (value) { - $todoEl.find('label').html(value); - this.trigger('uiUpdateRequested', { id: id, title: value }); - } else { - this.trigger('uiRemoveRequested', { id: id }); - } - }; - - this.requestCancel = function (e) { - var $inputEl = $(e.currentTarget); - var $todoEl = $inputEl.parents('li'); - - $todoEl.removeClass('editing'); - $inputEl.val(''); - - this.trigger('uiUpdateRequested'); - }; - - this.requestUpdateOrCancelEvent = function (e, data) { - if (e.key === ENTER_KEY) { - this.requestUpdate(e, data); - } else if (e.key === ESCAPE_KEY) { - this.requestCancel(e, data); - } - }; - - this.requestRemove = function (e, data) { - var id = $(data.el).attr('id').split('_')[1]; - this.trigger('uiRemoveRequested', { id: id }); - }; - - this.remove = function (e, data) { - var $todoEl = this.$node.find('#' + data.id); - $todoEl.remove(); - }; - - this.toggle = function (e, data) { - var $todoEl = $(data.el).parents('li'); - - $todoEl.toggleClass('completed'); - this.trigger('uiToggleRequested', { id: $todoEl.attr('id') }); - }; - - this.after('initialize', function () { - this.on(document, 'dataTodoAdded', this.render); - this.on(document, 'dataTodosLoaded', this.renderAll); - this.on(document, 'dataTodosFiltered', this.renderAll); - this.on(document, 'dataTodoToggledAll', this.renderAll); - this.on(document, 'dataTodoRemoved', this.remove); - - this.on('click', { 'destroySelector': this.requestRemove }); - this.on('click', { 'toggleSelector': this.toggle }); - this.on('dblclick', { 'labelSelector': this.edit }); - - this.$node.on('blur', '.edit', this.requestUpdate.bind(this)); - this.$node.on('keydown', '.edit', this.requestUpdateOrCancelEvent.bind(this)); - - // these don't work - // this.on(this.attr.editSelector, 'blur', this.requestUpdate); - // this.on('blur', { 'editSelector': this.requestUpdate }); - - this.trigger('uiLoadRequested'); - }); - } - - return defineComponent(todoList); -}); diff --git a/examples/flight/app/js/ui/toggle_all.js b/examples/flight/app/js/ui/toggle_all.js deleted file mode 100644 index d415b1114b..0000000000 --- a/examples/flight/app/js/ui/toggle_all.js +++ /dev/null @@ -1,25 +0,0 @@ -/*global define */ -'use strict'; - -define([ - 'flight/lib/component' -], function (defineComponent) { - function toggleAll() { - this.toggleAllComplete = function () { - this.trigger('uiToggleAllRequested', { - completed: this.$node.is(':checked') - }); - }; - - this.toggleCheckbox = function (e, data) { - this.node.checked = !data.remaining; - }; - - this.after('initialize', function () { - this.on('click', this.toggleAllComplete); - this.on(document, 'dataStatsCounted', this.toggleCheckbox); - }); - } - - return defineComponent(toggleAll); -}); diff --git a/examples/flight/app/js/ui/with_filters.js b/examples/flight/app/js/ui/with_filters.js deleted file mode 100644 index a8823422c0..0000000000 --- a/examples/flight/app/js/ui/with_filters.js +++ /dev/null @@ -1,26 +0,0 @@ -/*global define, $ */ -'use strict'; - -define(function () { - return function withFilters() { - this.attributes({ - filterSelector: '.filters a' - }); - - this.chooseFilter = function (e, data) { - var filter = data.el.hash.slice(2); - - this.select('filterSelector').removeClass('selected'); - $(data.el).addClass('selected'); - this.trigger('uiFilterRequested', { filter: filter }); - }; - - this.markSelected = function (filter) { - this.$node.find('[href="#/' + filter + '"]').addClass('selected'); - }; - - this.after('initialize', function () { - this.on('click', { filterSelector: this.chooseFilter }); - }); - }; -}); diff --git a/examples/flight/app/js/utils.js b/examples/flight/app/js/utils.js deleted file mode 100644 index fc1101bce0..0000000000 --- a/examples/flight/app/js/utils.js +++ /dev/null @@ -1,134 +0,0 @@ -/*global define */ -'use strict'; - -// tmpl function scooped from underscore. -// http://documentcloud.github.com/underscore/#template -define(function () { - var _ = {}; - - // List of HTML entities for escaping. - var entityMap = { - escape: { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - /*jshint quotmark:false */ - "'": ''', - '/': '/' - } - }; - - var escapeKeys = '&<>"\'/'; - var unescapeKeys = '&|<|>|"|'|/'; - - // Regexes containing the keys and values listed immediately above. - var entityRegexes = { - escape: new RegExp('[' + escapeKeys + ']', 'g'), - unescape: new RegExp('(' + unescapeKeys + ')', 'g') - }; - - // Functions for escaping and unescaping strings to/from HTML interpolation. - ['escape', 'unescape'].forEach(function (method) { - _[method] = function (string) { - if (string === null || string === undefined) { - return ''; - } - - return ('' + string).replace(entityRegexes[method], function (match) { - return entityMap[method][match]; - }); - }; - }); - - var settings = { - evaluate: /<%([\s\S]+?)%>/g, - interpolate: /<%=([\s\S]+?)%>/g, - escape: /<%-([\s\S]+?)%>/g - }; - - var noMatch = /(.)^/; - var escapes = { - /*jshint quotmark:false */ - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - var template = function (text, data) { - var render; - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function (match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function (match) { - return '\\' + escapes[match]; - }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) { - source = 'with(obj||{}){\n' + source + '}\n'; - } - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - /*jshint evil:true */ - render = new Function(settings.variable || 'obj', '_', source); - } catch (err) { - err.source = source; - throw err; - } - - if (data) { - return render(data, _); - } - - var template = function (data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return { - tmpl: template - }; -}); diff --git a/examples/flight/app/templates/stats.html b/examples/flight/app/templates/stats.html deleted file mode 100644 index 57689f4622..0000000000 --- a/examples/flight/app/templates/stats.html +++ /dev/null @@ -1,17 +0,0 @@ - - <%= remaining %> <%= remaining == 1 ? 'item' : 'items' %> left - - -<% if (completed) { %> - -<% } %> diff --git a/examples/flight/app/templates/todo.html b/examples/flight/app/templates/todo.html deleted file mode 100644 index 66d0b03ec3..0000000000 --- a/examples/flight/app/templates/todo.html +++ /dev/null @@ -1,8 +0,0 @@ -
        • -
          - > - - -
          - -
        • diff --git a/examples/flight/index.html b/examples/flight/index.html deleted file mode 100644 index 2e151c12bd..0000000000 --- a/examples/flight/index.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - Flight • Todo - - - - -
          -
          -

          todos

          - -
          -
          - - -
            -
            -
            -
            - - - - - diff --git a/examples/flight/karma.conf.js b/examples/flight/karma.conf.js deleted file mode 100644 index 11ba3f040c..0000000000 --- a/examples/flight/karma.conf.js +++ /dev/null @@ -1,86 +0,0 @@ -// Karma configuration file -// -// For all available config options and default values, see: -// https://github.com/karma-runner/karma/blob/stable/lib/config.js#L54 - -module.exports = function (config) { - 'use strict'; - - config.set({ - // base path, that will be used to resolve files and exclude - basePath: '', - - frameworks: ['jasmine'], - - // list of files / patterns to load in the browser - files: [ - // loaded without require - 'node_modules/es5-shim/es5-shim.js', - 'node_modules/es5-shim/es5-sham.js', - - 'node_modules/jquery/dist/jquery.js', - 'node_modules/jasmine-jquery/lib/jasmine-jquery.js', - 'node_modules/jasmine-flight/lib/jasmine-flight.js', - - // hack to load RequireJS after the shim libs - 'node_modules/requirejs/require.js', - 'node_modules/karma-requirejs/lib/adapter.js', - - // loaded with require - { pattern: 'node_modules/flight/lib/*.js', included: false }, - { pattern: 'node_modules/flight/index.js', included: false }, - { pattern: 'node_modules/depot/depot.js', included: false }, - { pattern: 'node_modules/requirejs-text/text.js', included: false }, - { pattern: 'app/**/*.js', included: false }, - { pattern: 'app/**/*.html', included: false }, - { pattern: 'test/spec/**/*_spec.js', included: false }, - { pattern: 'test/fixture/*.html', included: false }, - - // Entry point for karma. - 'test/test-main.js', - - { pattern: 'test/mock/*.js', included: true } - ], - - // list of files to exclude - exclude: [], - - // use dots reporter, as travis terminal does not support escaping sequences - // possible values: 'dots', 'progress' - // CLI --reporters progress - reporters: ['dots'], - - // enable / disable watching file and executing tests whenever any file changes - // CLI --auto-watch --no-auto-watch - autoWatch: true, - - // Start these browsers, currently available: - // - Chrome - // - ChromeCanary - // - Firefox - // - Opera - // - Safari (only Mac) - // - PhantomJS - // - IE (only Windows) - // CLI --browsers Chrome, Firefox, Safari - browsers: ['Chrome', 'Firefox'], - - // If browser does not capture in given timeout [ms], kill it - // CLI --capture-timeout 5000 - captureTimeout: 20000, - - // Auto run tests on start (when browsers are captured) and exit - // CLI --single-run --no-single-run - singleRun: false, - - plugins: [ - 'karma-jasmine', - 'karma-requirejs', - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-ie-launcher', - 'karma-phantomjs-launcher', - 'karma-safari-launcher' - ] - }); -}; diff --git a/examples/flight/node_modules/depot/depot.js b/examples/flight/node_modules/depot/depot.js deleted file mode 100644 index 5f8382bb0f..0000000000 --- a/examples/flight/node_modules/depot/depot.js +++ /dev/null @@ -1,249 +0,0 @@ -// depot.js v0.1.6 - -// (c) 2013 Michal Kuklis -// Licensed under The MIT License -// http://opensource.org/licenses/MIT - -(function (name, root, factory) { - if (typeof exports == 'object') { - module.exports = factory(); - } else if (typeof define == 'function' && define.amd) { - define(factory); - } else { - root[name] = factory(); - } -}("depot", this, function () { - - "use strict"; - - // depot api - - var api = { - - save: function (record) { - var id, ids; - - this.refresh(); - - if (!record[this.idAttribute]) { - record[this.idAttribute] = guid(); - } - - id = record[this.idAttribute] + ''; - - if (this.ids.indexOf(id) < 0) { - this.ids.push(id); - ids = this.ids.join(","); - this.storageAdaptor.setItem(this.name, ids); - this.store = ids; - } - - this.storageAdaptor.setItem(getKey(this.name, id), JSON.stringify(record)); - - return record; - }, - - update: function (id, data) { - if (typeof data == 'undefined') { - data = id; - id = data[this.idAttribute]; - } - - var record = this.get(id); - - if (record) { - record = extend(record, data); - this.save(record); - } - - return record; - }, - - updateAll: function (data) { - var records = this.all(); - - records.forEach(function (record) { - record = extend(record, data); - this.save(record); - }, this); - - return records; - }, - - find: function (criteria) { - var key, match, record; - var name = this.name; - var self = this; - - if (!criteria) return this.all(); - - this.refresh(); - - return this.ids.reduce(function (memo, id) { - record = jsonData(self.storageAdaptor.getItem(getKey(name, id))); - match = findMatch(criteria, record); - - if (match) { - memo.push(record); - } - - return memo; - }, []); - }, - - get: function (id) { - return jsonData(this.storageAdaptor.getItem(getKey(this.name, id))); - }, - - all: function () { - var record, self = this, name = this.name; - - this.refresh(); - - return this.ids.reduce(function (memo, id) { - record = self.storageAdaptor.getItem(getKey(name, id)); - - if (record) { - memo.push(jsonData(record)); - } - - return memo; - }, []); - }, - - destroy: function (record) { - var index; - var id = (record[this.idAttribute]) ? record[this.idAttribute] : record; - var key = getKey(this.name, id); - - record = jsonData(this.storageAdaptor.getItem(key)); - this.storageAdaptor.removeItem(key); - - index = this.ids.indexOf(id); - if (index != -1) this.ids.splice(index, 1); - this.storageAdaptor.setItem(this.name, this.ids.join(",")); - - return record; - }, - - destroyAll: function (criteria) { - var attr, id, match, record, key; - - this.refresh(); - - for (var i = this.ids.length - 1; i >= 0; i--) { - id = this.ids[i]; - key = getKey(this.name, id); - - if (criteria) { - - record = jsonData(this.storageAdaptor.getItem(key)); - match = findMatch(criteria, record); - - if (match) { - this.storageAdaptor.removeItem(key); - this.ids.splice(i, 1); - } - - } - else { - this.storageAdaptor.removeItem(key); - } - } - - if (criteria) { - this.storageAdaptor.setItem(this.name, this.ids.join(",")); - } - else { - this.storageAdaptor.removeItem(this.name); - this.ids = []; - } - }, - - size: function () { - this.refresh(); - - return this.ids.length; - }, - - refresh: function () { - var store = this.storageAdaptor.getItem(this.name); - - if (this.store && this.store === store) { - return; - } - - this.ids = (store && store.split(",")) || []; - this.store = store; - } - }; - - // helpers - - function jsonData(data) { - return data && JSON.parse(data); - } - - function getKey(name, id) { - return name + "-" + id; - } - - function findMatch(criteria, record) { - var match, attr; - - if (typeof criteria == 'function') { - match = criteria(record); - } - else { - match = true; - for (attr in criteria) { - match &= (criteria[attr] === record[attr]); - } - } - - return match; - } - - function s4() { - return Math.floor((1 + Math.random()) * 0x10000) - .toString(16).substring(1); - } - - function guid() { - return s4() + s4() + '-' + s4() + '-' + s4() + - '-' +s4() + '-' + s4() + s4() + s4(); - } - - function extend(dest, source) { - for (var key in source) { - if (source.hasOwnProperty(key)) { - dest[key] = source[key]; - } - } - - return dest; - } - - function depot(name, options) { - var instance; - - options = extend({ - idAttribute: '_id', - storageAdaptor: localStorage - }, options); - - if (!options.storageAdaptor) throw new Error("No storage adaptor was found"); - - instance = Object.create(api, { - name: { value: name }, - idAttribute: { value: options.idAttribute }, - storageAdaptor: { value: options.storageAdaptor } - }); - - instance.refresh(); - - return instance; - } - - return depot; -})); diff --git a/examples/flight/node_modules/es5-shim/es5-sham.js b/examples/flight/node_modules/es5-shim/es5-sham.js deleted file mode 100644 index 20c9845975..0000000000 --- a/examples/flight/node_modules/es5-shim/es5-sham.js +++ /dev/null @@ -1,446 +0,0 @@ -// Copyright 2009-2012 by contributors, MIT License -// vim: ts=4 sts=4 sw=4 expandtab - -//Add semicolon to prevent IIFE from being passed as argument to concated code. -; -// Module systems magic dance -(function (definition) { - // RequireJS - if (typeof define == "function") { - define(definition); - // YUI3 - } else if (typeof YUI == "function") { - YUI.add("es5-sham", definition); - // CommonJS and - - - - - - diff --git a/examples/foam/js/com/todomvc/Controller.js b/examples/foam/js/com/todomvc/Controller.js deleted file mode 100644 index ae4beb50a7..0000000000 --- a/examples/foam/js/com/todomvc/Controller.js +++ /dev/null @@ -1,119 +0,0 @@ -(function () { - 'use strict'; - // Necessary JSHint options. CLASS is not a constructor, just a global function. - /* jshint newcap: false */ - // These are provided by FOAM (up through EasyDAO) or defined in this file. - /* global CLASS, TRUE, SET, GROUP_BY, COUNT */ - - CLASS({ - package: 'com.todomvc', - name: 'Controller', - traits: ['foam.ui.CSSLoaderTrait'], - requires: ['foam.ui.TextFieldView', 'foam.ui.DAOListView', 'foam.dao.EasyDAO', 'foam.memento.WindowHashValue', - 'com.todomvc.Todo', 'com.todomvc.TodoDAO', 'com.todomvc.TodoFilterView'], - properties: [ - { - name: 'input', - setter: function (text) { - // This is a fake property that adds the todo when its value gets saved. - if (text) { - this.dao.put(this.Todo.create({text: text})); - this.propertyChange('input', text, ''); - } - }, - view: { factory_: 'foam.ui.TextFieldView', placeholder: 'What needs to be done?' } - }, - { name: 'dao' }, - { name: 'filteredDAO', model_: 'foam.core.types.DAOProperty', view: 'foam.ui.DAOListView' }, - { name: 'completedCount', model_: 'IntProperty' }, - { name: 'activeCount', model_: 'IntProperty', postSet: function (_, c) { this.toggle = !c; }}, - { name: 'toggle', model_: 'BooleanProperty', postSet: function (_, n) { - if (n === this.activeCount > 0) { - this.dao.update(SET(this.Todo.COMPLETED, n)); - } - }}, - { - name: 'query', - postSet: function (_, q) { this.filteredDAO = this.dao.where(q); }, - defaultValue: TRUE, - view: 'com.todomvc.TodoFilterView' - }, - { - name: 'memento', - factory: function () { return this.WindowHashValue.create(); } - } - ], - actions: [ - { - name: 'clear', - label: 'Clear completed', - isEnabled: function () { return this.completedCount; }, - action: function () { this.dao.where(this.Todo.COMPLETED).removeAll(); } - } - ], - listeners: [ - { - name: 'onDAOUpdate', - isFramed: true, - code: function () { - this.dao.select(GROUP_BY(this.Todo.COMPLETED, COUNT()))(function (q) { - this.completedCount = q.groups[true]; - this.activeCount = q.groups[false]; - }.bind(this)); - } - } - ], - methods: { - init: function () { - this.SUPER(); - this.filteredDAO = this.dao = this.TodoDAO.create({ - delegate: this.EasyDAO.create({model: this.Todo, seqNo: true, daoType: 'LOCAL', name: 'todos-foam'}) }); - this.dao.listen(this.onDAOUpdate); - this.onDAOUpdate(); - } - }, - templates: [ - function CSS() {/* - #filters .selected { font-weight: bold; } - #filters li { margin: 4px; } - .actionButton-clear:disabled { display: none; } - */}, - function toDetailHTML() {/* -
            - -
            - $$toggle{id: 'toggle-all', showLabel: false} - $$filteredDAO{tagName: 'ul', id: 'todo-list'} -
            -
            - - $$activeCount{mode: 'read-only'} item<%# this.data.activeCount == 1 ? '' : 's' %> left - - $$query{id: 'filters'} - $$clear{id: 'clear-completed'} -
            -
            - - <% - var f = function () { return this.completedCount + this.activeCount == 0; }.bind(this.data); - this.setClass('hidden', f, 'main'); - this.setClass('hidden', f, 'footer'); - Events.relate(this.data.memento, this.queryView.text$, - function (memento) { - var s = memento && memento.substring(1); - var t = s ? s.capitalize() : 'All'; - return t; - }, - function (label) { return '/' + label.toLowerCase(); }); - this.addInitializer(function () { - X.$('new-todo').focus(); - }); - %> - */} - ] - }); -})(); diff --git a/examples/foam/js/com/todomvc/Todo.js b/examples/foam/js/com/todomvc/Todo.js deleted file mode 100644 index addd125c38..0000000000 --- a/examples/foam/js/com/todomvc/Todo.js +++ /dev/null @@ -1,33 +0,0 @@ -(function () { - /* global CLASS */ - 'use strict'; - CLASS({ - package: 'com.todomvc', - name: 'Todo', - properties: [ - 'id', - { name: 'completed', model_: 'BooleanProperty' }, - { name: 'text', preSet: function (_, text) { return text.trim(); } } - ], - templates: [ - function toDetailHTML() {/* -
          • -
            - $$completed{className: 'toggle'} - $$text{mode: 'read-only', tagName: 'label'} - -
            - $$text{className: 'edit'} -
          • - <% - var toEdit = function () { DOM.setClass(this.$, 'editing'); this.textView.focus(); }.bind(this); - var toDisplay = function () { DOM.setClass(this.$, 'editing', false); }.bind(this); - this.on('dblclick', toEdit, this.id); - this.on('blur', toDisplay, this.textView.id); - this.textView.subscribe(this.textView.ESCAPE, toDisplay); - this.setClass('completed', function () { return this.data.completed; }.bind(this), this.id); - %> - */} - ] - }); -})(); diff --git a/examples/foam/js/com/todomvc/TodoDAO.js b/examples/foam/js/com/todomvc/TodoDAO.js deleted file mode 100644 index f7dcbd4367..0000000000 --- a/examples/foam/js/com/todomvc/TodoDAO.js +++ /dev/null @@ -1,19 +0,0 @@ -(function () { - /* global CLASS */ - 'use strict'; - CLASS({ - package: 'com.todomvc', - name: 'TodoDAO', - extendsModel: 'foam.dao.ProxyDAO', - methods: [ - function put(issue, s) { - // If the user tried to put an empty text, remove the entry instead. - if (!issue.text) { - this.remove(issue.id, { remove: s && s.put }); - } else { - this.SUPER(issue, s); - } - } - ] - }); -})(); diff --git a/examples/foam/js/com/todomvc/TodoFilterView.js b/examples/foam/js/com/todomvc/TodoFilterView.js deleted file mode 100644 index eb3f647621..0000000000 --- a/examples/foam/js/com/todomvc/TodoFilterView.js +++ /dev/null @@ -1,26 +0,0 @@ -(function () { - /* global CLASS, TRUE, NOT */ - 'use strict'; - // Needed to massage the HTML to fit TodoMVC spec; it works without this. - CLASS({ - package: 'com.todomvc', - name: 'TodoFilterView', - extendsModel: 'foam.ui.ChoiceListView', - requires: ['com.todomvc.Todo'], - properties: [ - { - name: 'choices', - factory: function () { - return [[TRUE, 'All'], [NOT(this.Todo.COMPLETED), 'Active'], [this.Todo.COMPLETED, 'Completed']]; - } - } - ], - methods: [ - function choiceToHTML(id, choice) { - var self = this; - this.setClass('selected', function () { return self.text === choice[1]; }, id); - return '
          • ' + choice[1] + '
          • '; - } - ] - }); -})(); diff --git a/examples/foam/node_modules/todomvc-app-css/index.css b/examples/foam/node_modules/todomvc-app-css/index.css deleted file mode 100644 index 217f545b4e..0000000000 --- a/examples/foam/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,378 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; - font-weight: 300; -} - -button, -input[type="checkbox"] { - outline: none; -} - -.hidden { - display: none; -} - -#todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -#todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -#todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -#new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - outline: none; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-font-smoothing: antialiased; - font-smoothing: antialiased; -} - -#new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -#main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -label[for='toggle-all'] { - display: none; -} - -#toggle-all { - position: absolute; - top: -55px; - left: -12px; - width: 60px; - height: 34px; - text-align: center; - border: none; /* Mobile Safari */ -} - -#toggle-all:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -#toggle-all:checked:before { - color: #737373; -} - -#todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -#todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -#todo-list li:last-child { - border-bottom: none; -} - -#todo-list li.editing { - border-bottom: none; - padding: 0; -} - -#todo-list li.editing .edit { - display: block; - width: 506px; - padding: 13px 17px 12px 17px; - margin: 0 0 0 43px; -} - -#todo-list li.editing .view { - display: none; -} - -#todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -#todo-list li .toggle:after { - content: url('data:image/svg+xml;utf8,'); -} - -#todo-list li .toggle:checked:after { - content: url('data:image/svg+xml;utf8,'); -} - -#todo-list li label { - white-space: pre-line; - word-break: break-all; - padding: 15px 60px 15px 15px; - margin-left: 45px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -#todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -#todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -#todo-list li .destroy:hover { - color: #af5b5e; -} - -#todo-list li .destroy:after { - content: '×'; -} - -#todo-list li:hover .destroy { - display: block; -} - -#todo-list li .edit { - display: none; -} - -#todo-list li.editing:last-child { - margin-bottom: -1px; -} - -#footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -#footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -#todo-count { - float: left; - text-align: left; -} - -#todo-count strong { - font-weight: 300; -} - -#filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -#filters li { - display: inline; -} - -#filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -#filters li a.selected, -#filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -#filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -#clear-completed, -html #clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; - position: relative; -} - -#clear-completed:hover { - text-decoration: underline; -} - -#info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -#info p { - line-height: 1; -} - -#info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -#info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - #toggle-all, - #todo-list li .toggle { - background: none; - } - - #todo-list li .toggle { - height: 40px; - } - - #toggle-all { - -webkit-transform: rotate(90deg); - transform: rotate(90deg); - -webkit-appearance: none; - appearance: none; - } -} - -@media (max-width: 430px) { - #footer { - height: 50px; - } - - #filters { - bottom: 10px; - } -} diff --git a/examples/foam/node_modules/todomvc-common/base.css b/examples/foam/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/foam/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/foam/node_modules/todomvc-common/base.js b/examples/foam/node_modules/todomvc-common/base.js deleted file mode 100644 index 3c6723f390..0000000000 --- a/examples/foam/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,249 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-31081062-1', 'auto'); - ga('send', 'pageview'); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length; - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/foam/package.json b/examples/foam/package.json deleted file mode 100644 index 261f101888..0000000000 --- a/examples/foam/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "private": true, - "dependencies": { - "todomvc-common": "^1.0.0", - "todomvc-app-css": "^1.0.1" - }, - "devDependencies": { - "foam-framework": "0.4.2" - } -} diff --git a/examples/foam/readme.md b/examples/foam/readme.md deleted file mode 100644 index c97908316b..0000000000 --- a/examples/foam/readme.md +++ /dev/null @@ -1,48 +0,0 @@ -# FOAM TodoMVC Example - -FOAM is a collection of Javascript libraries: an Object-oriented core, MVC, -reactive programming, HTML views, data storage, and more. - -See the [main site](https://foam-framework.github.io/foam) for more information. - - -## Learning FOAM - -The [FOAM site](https://foam-framework.github.io/foam) is the place to get started. - -FOAM is beta and under heavy development. The [tutorial](https://foam-framework.github.io/foam/tutorial/0-intro) is the best place to get started, and more documentation can be found in the [documentation browser](https://foam-framework.github.io/foam/foam/apps/docs/docbrowser.html). - - -## Implementation - -The main pieces here are the `Todo` model and the controller. Both have a template - for an individual row, and for the whole page, respectively. - -`Controller` is the central point of coordination for the app. It has several different reactive pieces. -- It has a property, `input`, which is bound to the new todo input box. When the user presses enter, the value from the DOM element is written to `input`, and its `postSet` will fire, adding the new `Todo` to the database. -- `dao` ("Data Access Object") is the unfiltered database of all `Todo`s. -- `filteredDAO` is a filtered view onto that database. The filter is controlled by `query`. -- The `view` property for `query` determines the appearance and behavior of the All-Active-Completed buttons. -- The one `action` is attached to the `Clear Completed` button. -- A listener, `onDAOUpdate`, fires whenever the underlying data updates. It causes the list to re-render. - -Of particular interest is the line which begins - - this.filteredDAO = this.dao = TodoDAO.create({ - -`TodoDAO` is a simple wrapper that ensures an entry which is edited to be empty gets removed. -Its `delegate` is the underlying DAO, which here is an `EasyDAO`. `EasyDAO` is a facade that makes it easy to construct common storage patterns: -- `model` defines the type of data we're storing, here a `Todo. -- `seqNo: true` means that `Todo`'s `id` property will be auto-incremented. -- `daoType: 'StorageDAO'` means our DAO is backed by LocalStorage. -- `EasyDAO` by default caches any DAO that isn't in-memory. This means that the entire LocalStorage contents are loading into the cache at startup, and all updates are written through to memory and LocalStorage. - -## Running - -The only step needed to get the example working is `bower install`. - -To run the app, spin up an HTTP server and visit `http://localhost:8000/`. - - -## Credit - -This TodoMVC implementation was created by the [FOAM team](https://github.com/orgs/foam-framework/people) at Google Waterloo. diff --git a/examples/humble/README.md b/examples/humble/README.md deleted file mode 100644 index 6439aa6a98..0000000000 --- a/examples/humble/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Humble + GopherJS • [TodoMVC](http://todomvc.com) - -> Humble is a collection of loosely-coupled tools designed to build client-side -> and hybrid web applications using GopherJS, which compiles Go code to -> JavaScript. -> -> [Humble - github.com/go-humble/humble](https://github.com/go-humble/humble) - - -## Resources - -- [Website](https://github.com/go-humble/humble) -- [Documentation](https://github.com/go-humble) (Each package is - documented separately) - -### Support - -- [GopherJS on StackOverflow](http://stackoverflow.com/search?q=gopherjs) -- [GopherJS Google Group](https://groups.google.com/forum/#!forum/gopherjs) - -*Let us [know](https://github.com/go-humble/humble/issues) if you discover anything worth sharing.* - - -## Demo - -A [Live Demo](http://d3cqowlbjfdjrm.cloudfront.net/) of the application is -available online. - -## Implementation - -[GopherJS](https://github.com/gopherjs/gopherjs) compiles Go to JavaScript code -which can run in the browser. [Humble](https://github.com/go-humble/humble) is -a collection of tools written in Go designed to be compatible with GopherJS. - -The following Humble packages are used: - -- [router](https://github.com/go-humble/router) for handling the `/active` and - `/completed` routes. -- [locstor](https://github.com/go-humble/locstor) for saving todos to - localStorage. -- [temple](https://github.com/go-humble/temple) for managing Go templates and - packaging them so they can run in the browser. -- [view](https://github.com/go-humble/view) for organizing views, doing basic - DOM manipulation, and delegating events. - -The full TodoMVC spec is implemented, including routes. - -### Getting up and Running - -First, [install Go](https://golang.org/dl/). You will also need to setup your -[Go workspace](https://golang.org/doc/code.html). It is important that you have -an environment variable called `GOPATH` which points to the directory where all -your Go code resides. - -To download and install this repository, run -`go get github.com/go-humble/examples`, which will place the project in -`$GOPATH/src/github.com/go-humble/examples` on your machine. - -You will also need to install GopherJS with -`go get -u github.com/gopherjs/gopherjs`. The `-u` flag gets the latest version, -which is recommended. - -The project uses [temple](https://github.com/go-humble/temple) to precompile -templates. Install temple with `go get -u github.com/go-humble/temple`. - -Then run `go generate ./...` to compile the templates and compile the Go code -to JavaScript. - -Finally, serve the project directory with `go run serve.go` and visit -[localhost:8000](http://localhost:8000) in your browser. - - -## Credit - -Created by [Alex Browne](http://www.alexbrowne.info) diff --git a/examples/humble/go/main.go b/examples/humble/go/main.go deleted file mode 100644 index a7e9e7d99d..0000000000 --- a/examples/humble/go/main.go +++ /dev/null @@ -1,67 +0,0 @@ -package main - -import ( - "log" - - "github.com/go-humble/router" - - "github.com/go-humble/examples/todomvc/go/models" - "github.com/go-humble/examples/todomvc/go/views" -) - -//go:generate temple build templates/templates templates/templates.go --partials templates/partials -//go:generate gopherjs build main.go -o ../js/app.js -m - -func main() { - // This is helps development by letting us know the app is actually running - // and telling us the time that the app was most recently started. - log.Println("Starting") - - // Create a new todo list. - todos := &models.TodoList{} - if err := todos.Load(); err != nil { - panic(err) - } - // Create an app view with our todo list. - appView := views.NewApp(todos) - - // Register a change listener which will be triggered whenever the todo list - // is changed. - todos.OnChange(func() { - // Asynchronously save the todos to localStorage. - go func() { - if err := todos.Save(); err != nil { - panic(err) - } - }() - // Then re-render the entire view. - if err := appView.Render(); err != nil { - panic(err) - } - }) - - // Create and start a new router to handle the different routes. On each - // route, we are simply going to use a filter to change which todos are - // rendered, then re-render the entire view with the filter applied. - r := router.New() - r.ForceHashURL = true - r.HandleFunc("/", func(_ *router.Context) { - appView.UseFilter(models.Predicates.All) - if err := appView.Render(); err != nil { - panic(err) - } - }) - r.HandleFunc("/active", func(_ *router.Context) { - appView.UseFilter(models.Predicates.Remaining) - if err := appView.Render(); err != nil { - panic(err) - } - }) - r.HandleFunc("/completed", func(_ *router.Context) { - appView.UseFilter(models.Predicates.Completed) - if err := appView.Render(); err != nil { - panic(err) - } - }) - r.Start() -} diff --git a/examples/humble/go/models/filter.go b/examples/humble/go/models/filter.go deleted file mode 100644 index 7347667259..0000000000 --- a/examples/humble/go/models/filter.go +++ /dev/null @@ -1,68 +0,0 @@ -package models - -// Predicate is a function which takes a todo and returns a bool. It can be -// used in filters. -type Predicate func(*Todo) bool - -// Predicates is a data structure with commonly used Predicates. -var Predicates = struct { - All Predicate - Completed Predicate - Remaining Predicate -}{ - All: func(_ *Todo) bool { return true }, - Completed: (*Todo).Completed, - Remaining: (*Todo).Remaining, -} - -// All returns all the todos. It applies a filter using the All predicate. -func (list TodoList) All() []*Todo { - return list.Filter(Predicates.All) -} - -// Completed returns only those todos which are completed. It applies a filter -// using the Completed predicate. -func (list TodoList) Completed() []*Todo { - return list.Filter(Predicates.Completed) -} - -// Remaining returns only those todos which are remaining (or active). It -// applies a filter using the Remaining predicate. -func (list TodoList) Remaining() []*Todo { - return list.Filter(Predicates.Remaining) -} - -// Filter returns a slice todos for which the predicate is true. The returned -// slice is a subset of all todos. -func (list TodoList) Filter(f Predicate) []*Todo { - results := []*Todo{} - for _, todo := range list.todos { - if f(todo) { - results = append(results, todo) - } - } - return results -} - -// Invert inverts a predicate, i.e. a function which accepts a todo as an -// argument and returns a bool. It returns the inverted predicate. Where f would -// return true, the inverted predicate would return false and vice versa. -func invert(f Predicate) Predicate { - return func(todo *Todo) bool { - return !f(todo) - } -} - -// todoById returns a predicate which is true iff todo.id equals the given -// id. -func todoById(id string) Predicate { - return func(t *Todo) bool { - return t.id == id - } -} - -// todoNotById returns a predicate which is true iff todo.id does not equal -// the given id. -func todoNotById(id string) Predicate { - return invert(todoById(id)) -} diff --git a/examples/humble/go/models/todo.go b/examples/humble/go/models/todo.go deleted file mode 100644 index 11bef5cf26..0000000000 --- a/examples/humble/go/models/todo.go +++ /dev/null @@ -1,87 +0,0 @@ -package models - -import "encoding/json" - -// Todo is the model for a single todo item. -type Todo struct { - id string - completed bool - title string - list *TodoList -} - -// Toggle changes whether or not the todo is completed. If it was previously -// completed, Toggle makes it not completed, and vice versa. -func (t *Todo) Toggle() { - t.completed = !t.completed - t.list.changed() -} - -// Remove removes the todo from the list. -func (t *Todo) Remove() { - t.list.DeleteById(t.id) -} - -// Completed returns true iff the todo is completed. It operates as a getter for -// the completed property. -func (t *Todo) Completed() bool { - return t.completed -} - -// Remaining returns true iff the todo is not completed. -func (t *Todo) Remaining() bool { - return !t.completed -} - -// SetCompleted is a setter for the completed property. After the property is -// set, it broadcasts that the todo list was changed. -func (t *Todo) SetCompleted(completed bool) { - t.completed = completed - t.list.changed() -} - -// Title is a getter for the title property. -func (t *Todo) Title() string { - return t.title -} - -// SetTitle is a setter for the title property. -func (t *Todo) SetTitle(title string) { - t.title = title - t.list.changed() -} - -// Id is a getter for the id property. -func (t *Todo) Id() string { - return t.id -} - -// jsonTodo is a struct with all the same fields as a todo, except that they -// are exported instead of unexported. The purpose of jsonTodo is to make the -// todo item convertible to json via the json package. -type jsonTodo struct { - Id string - Completed bool - Title string -} - -// MarshalJSON converts the todo to json. -func (t Todo) MarshalJSON() ([]byte, error) { - return json.Marshal(jsonTodo{ - Id: t.id, - Completed: t.completed, - Title: t.title, - }) -} - -// UnmarshalJSON converts json data to a todo object. -func (t *Todo) UnmarshalJSON(data []byte) error { - jt := jsonTodo{} - if err := json.Unmarshal(data, &jt); err != nil { - return err - } - t.id = jt.Id - t.completed = jt.Completed - t.title = jt.Title - return nil -} diff --git a/examples/humble/go/models/todo_list.go b/examples/humble/go/models/todo_list.go deleted file mode 100644 index a69daf5ea8..0000000000 --- a/examples/humble/go/models/todo_list.go +++ /dev/null @@ -1,91 +0,0 @@ -package models - -import ( - "github.com/dchest/uniuri" - "github.com/go-humble/locstor" -) - -// store is a datastore backed by localStorage. -var store = locstor.NewDataStore(locstor.JSONEncoding) - -// TodoList is a model representing a list of todos. -type TodoList struct { - todos []*Todo - changeListeners []func() -} - -// OnChange can be used to register change listeners. Any functions passed to -// OnChange will be called when the todo list changes. -func (list *TodoList) OnChange(f func()) { - list.changeListeners = append(list.changeListeners, f) -} - -// changed is used to notify the todo list and its change listeners of a change. -// Whenever the list is changed, it must be explicitly called. -func (list *TodoList) changed() { - for _, f := range list.changeListeners { - f() - } -} - -// Load loads the list of todos from the datastore. -func (list *TodoList) Load() error { - if err := store.Find("todos", &list.todos); err != nil { - if _, ok := err.(locstor.ItemNotFoundError); ok { - return list.Save() - } - return err - } - for i := range list.todos { - list.todos[i].list = list - } - return nil -} - -// Save saves the list of todos to the datastore. -func (list TodoList) Save() error { - if err := store.Save("todos", list.todos); err != nil { - return err - } - return nil -} - -// AddTodo appends a new todo to the list. -func (list *TodoList) AddTodo(title string) { - list.todos = append(list.todos, &Todo{ - id: uniuri.New(), - title: title, - list: list, - }) - list.changed() -} - -// ClearCompleted removes all the todos from the list that have been completed. -func (list *TodoList) ClearCompleted() { - list.todos = list.Remaining() - list.changed() -} - -// CheckAll checks all the todos in the list, causing them to be in the -// completed state. -func (list *TodoList) CheckAll() { - for _, todo := range list.todos { - todo.completed = true - } - list.changed() -} - -// UncheckAll unchecks all the todos in the list, causing them to be in the -// active/remaining state. -func (list *TodoList) UncheckAll() { - for _, todo := range list.todos { - todo.completed = false - } - list.changed() -} - -// DeleteById removes the todo with the given id from the list. -func (list *TodoList) DeleteById(id string) { - list.todos = list.Filter(todoNotById(id)) - list.changed() -} diff --git a/examples/humble/go/templates/partials/footer.tmpl b/examples/humble/go/templates/partials/footer.tmpl deleted file mode 100644 index d607065fc8..0000000000 --- a/examples/humble/go/templates/partials/footer.tmpl +++ /dev/null @@ -1,19 +0,0 @@ - - {{ len .Todos.Remaining }} - item{{ if ne (len .Todos.Remaining) 1}}s{{end}} left - - - - diff --git a/examples/humble/go/templates/partials/todo.tmpl b/examples/humble/go/templates/partials/todo.tmpl deleted file mode 100644 index 956a694e4f..0000000000 --- a/examples/humble/go/templates/partials/todo.tmpl +++ /dev/null @@ -1,14 +0,0 @@ -{{/* - NOTE: the todomvc tests require that the top-level element for the - todo view is an li element. I would prefer to have the top-level element for - each todo be a div wrapper, and to include the li element inside this - template. See views/app.go for the current workaround. -*/}} - -
            - - - -
            - - diff --git a/examples/humble/go/templates/templates.go b/examples/humble/go/templates/templates.go deleted file mode 100755 index 3af6c1d4f2..0000000000 --- a/examples/humble/go/templates/templates.go +++ /dev/null @@ -1,85 +0,0 @@ -package templates - -// This package has been automatically generated with temple. -// Do not edit manually! - -import ( - "github.com/go-humble/temple/temple" -) - -var ( - GetTemplate func(name string) (*temple.Template, error) - GetPartial func(name string) (*temple.Partial, error) - GetLayout func(name string) (*temple.Layout, error) - MustGetTemplate func(name string) *temple.Template - MustGetPartial func(name string) *temple.Partial - MustGetLayout func(name string) *temple.Layout -) - -func init() { - var err error - g := temple.NewGroup() - - if err = g.AddPartial("footer", ` - {{ len .Todos.Remaining }} - item{{ if ne (len .Todos.Remaining) 1}}s{{end}} left - - - - -`); err != nil { - panic(err) - } - - if err = g.AddPartial("todo", ` -
            - - - -
            - - -`); err != nil { - panic(err) - } - - if err = g.AddTemplate("app", `
            -

            todos

            - -
            -{{ if gt (len .Todos.All) 0 }} -
            - - -
              -
            -
            -{{ end }} -{{ if gt (len .Todos.All) 0 }} -
            - {{ template "partials/footer" . }} -
            -{{ end }} -`); err != nil { - panic(err) - } - - GetTemplate = g.GetTemplate - GetPartial = g.GetPartial - GetLayout = g.GetLayout - MustGetTemplate = g.MustGetTemplate - MustGetPartial = g.MustGetPartial - MustGetLayout = g.MustGetLayout -} diff --git a/examples/humble/go/templates/templates/app.tmpl b/examples/humble/go/templates/templates/app.tmpl deleted file mode 100644 index 381f2dff51..0000000000 --- a/examples/humble/go/templates/templates/app.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -
            -

            todos

            - -
            -{{ if gt (len .Todos.All) 0 }} -
            - - -
              -
            -
            -{{ end }} -{{ if gt (len .Todos.All) 0 }} -
            - {{ template "partials/footer" . }} -
            -{{ end }} diff --git a/examples/humble/go/views/app.go b/examples/humble/go/views/app.go deleted file mode 100644 index adbfbd42c8..0000000000 --- a/examples/humble/go/views/app.go +++ /dev/null @@ -1,171 +0,0 @@ -package views - -import ( - "strings" - - "github.com/go-humble/examples/todomvc/go/models" - "github.com/go-humble/examples/todomvc/go/templates" - "github.com/go-humble/temple/temple" - "github.com/go-humble/view" - "honnef.co/go/js/dom" -) - -const ( - // Constants for certain keycodes. - enterKey = 13 - escapeKey = 27 -) - -var ( - appTmpl = templates.MustGetTemplate("app") - document = dom.GetWindow().Document() -) - -// App is the main view for the application. -type App struct { - Todos *models.TodoList - tmpl *temple.Template - // predicate will be used to filter the todos when rendering. Only - // todos for which the predicate is true will be rendered. - predicate models.Predicate - view.DefaultView - events []*view.EventListener -} - -// UseFilter causes the app to use the given predicate to filter the todos when -// rendering. Only todos for which the predicate returns true will be rendered. -func (v *App) UseFilter(predicate models.Predicate) { - v.predicate = predicate -} - -// NewApp creates and returns a new App view, using the given todo list. -func NewApp(todos *models.TodoList) *App { - v := &App{ - Todos: todos, - tmpl: appTmpl, - } - v.SetElement(document.QuerySelector(".todoapp")) - return v -} - -// tmplData returns the data that is passed through to the template for the -// view. -func (v *App) tmplData() map[string]interface{} { - return map[string]interface{}{ - "Todos": v.Todos, - "Path": dom.GetWindow().Location().Hash, - } -} - -// Render renders the App view and satisfies the view.View interface. -func (v *App) Render() error { - for _, event := range v.events { - event.Remove() - } - v.events = []*view.EventListener{} - if err := v.tmpl.ExecuteEl(v.Element(), v.tmplData()); err != nil { - return err - } - listEl := v.Element().QuerySelector(".todo-list") - for _, todo := range v.Todos.Filter(v.predicate) { - todoView := NewTodo(todo) - // NOTE: the todomvc tests require that the top-level element for the - // todo view is an li element. Unfortunately there is no way to express - // this while also having template logic determine whether or not the - // li element should have the class "completed". I would prefer to have - // the top-level element for each todo be a div wrapper, and to include - // the li element inside the template. The workaround for now is to create - // the li element and set it's class manually. - todoView.SetElement(document.CreateElement("li")) - if todo.Completed() { - addClass(todoView.Element(), "completed") - } - view.AppendToEl(listEl, todoView) - if err := todoView.Render(); err != nil { - return err - } - } - v.delegateEvents() - return nil -} - -// delegateEvents adds all the needed event listeners to the view. -func (v *App) delegateEvents() { - v.events = append(v.events, - view.AddEventListener(v, "keypress", ".new-todo", - triggerOnKeyCode(enterKey, v.CreateTodo))) - v.events = append(v.events, - view.AddEventListener(v, "click", ".clear-completed", v.ClearCompleted)) - v.events = append(v.events, - view.AddEventListener(v, "click", ".toggle-all", v.ToggleAll)) -} - -// CreateTodo is an event listener which creates a new todo and adds it to the -// todo list. -func (v *App) CreateTodo(ev dom.Event) { - input, ok := ev.Target().(*dom.HTMLInputElement) - if !ok { - panic("Could not convert event target to dom.HTMLInputElement") - } - title := strings.TrimSpace(input.Value) - if title != "" { - v.Todos.AddTodo(title) - document.QuerySelector(".new-todo").(dom.HTMLElement).Focus() - } -} - -// ClearCompleted is an event listener which removes all the completed todos -// from the list. -func (v *App) ClearCompleted(ev dom.Event) { - v.Todos.ClearCompleted() -} - -// ToggleAll toggles all the todos in the list. -func (v *App) ToggleAll(ev dom.Event) { - input := ev.Target().(*dom.HTMLInputElement) - if !input.Checked { - v.Todos.UncheckAll() - } else { - v.Todos.CheckAll() - } -} - -// triggerOnKeyCode triggers the given event listener iff the keCode for the -// event matches the given keyCode. It can be used to gain finer control over -// which keys trigger a certain event. -func triggerOnKeyCode(keyCode int, listener func(dom.Event)) func(dom.Event) { - return func(ev dom.Event) { - keyEvent, ok := ev.(*dom.KeyboardEvent) - if ok && keyEvent.KeyCode == keyCode { - listener(ev) - } - } -} - -// addClass adds class to the given element. It retains any other classes that -// the element may have. -func addClass(el dom.Element, class string) { - newClasses := class - if oldClasses := el.GetAttribute("class"); oldClasses != "" { - newClasses = oldClasses + " " + class - } - el.SetAttribute("class", newClasses) -} - -// removeClass removes the given class from the element it retains any other -// classes that the element may have. -func removeClass(el dom.Element, class string) { - oldClasses := el.GetAttribute("class") - if oldClasses == class { - // The only class present was the one we want to remove. Remove the class - // attribute entirely. - el.RemoveAttribute("class") - } - classList := strings.Split(oldClasses, " ") - for i, currentClass := range classList { - if currentClass == class { - newClassList := append(classList[:i], classList[i+1:]...) - el.SetAttribute("class", strings.Join(newClassList, " ")) - } - } -} diff --git a/examples/humble/go/views/todo.go b/examples/humble/go/views/todo.go deleted file mode 100644 index c65c6ebcc8..0000000000 --- a/examples/humble/go/views/todo.go +++ /dev/null @@ -1,107 +0,0 @@ -package views - -import ( - "strings" - - "github.com/go-humble/examples/todomvc/go/models" - "github.com/go-humble/examples/todomvc/go/templates" - "github.com/go-humble/temple/temple" - "github.com/go-humble/view" - "honnef.co/go/js/dom" -) - -var ( - todoTmpl = templates.MustGetPartial("todo") -) - -// Todo is a view for a single todo item. -type Todo struct { - Model *models.Todo - tmpl *temple.Partial - view.DefaultView - events []*view.EventListener -} - -// NewTodo creates and returns a new Todo view, using the given todo as the -// model. -func NewTodo(todo *models.Todo) *Todo { - return &Todo{ - Model: todo, - tmpl: todoTmpl, - } -} - -// Render renders the Todo view and satisfies the view.View interface. -func (v *Todo) Render() error { - for _, event := range v.events { - event.Remove() - } - v.events = []*view.EventListener{} - if err := v.tmpl.ExecuteEl(v.Element(), v.Model); err != nil { - return err - } - v.delegateEvents() - return nil -} - -// delegateEvents adds all the needed event listeners to the Todo view. -func (v *Todo) delegateEvents() { - v.events = append(v.events, - view.AddEventListener(v, "click", ".toggle", v.Toggle)) - v.events = append(v.events, - view.AddEventListener(v, "click", ".destroy", v.Remove)) - v.events = append(v.events, - view.AddEventListener(v, "dblclick", "label", v.Edit)) - v.events = append(v.events, - view.AddEventListener(v, "blur", ".edit", v.CommitEdit)) - v.events = append(v.events, - view.AddEventListener(v, "keypress", ".edit", - triggerOnKeyCode(enterKey, v.CommitEdit))) - v.events = append(v.events, - view.AddEventListener(v, "keydown", ".edit", - triggerOnKeyCode(escapeKey, v.CancelEdit))) -} - -// Toggle toggles the completeness of the todo. -func (v *Todo) Toggle(ev dom.Event) { - v.Model.Toggle() -} - -// Remove removes the todo form the list. -func (v *Todo) Remove(ev dom.Event) { - v.Model.Remove() -} - -// Edit puts the Todo view into an editing state, changing it's appearance and -// allowing it to be edited. -func (v *Todo) Edit(ev dom.Event) { - addClass(v.Element(), "editing") - input := v.Element().QuerySelector(".edit").(*dom.HTMLInputElement) - input.Focus() - // Move the cursor to the end of the input. - input.SelectionStart = input.SelectionEnd + len(input.Value) -} - -// CommitEdit sets the title of the todo to the new title. After the edit has -// been committed, the todo is no longer in the editing state. -func (v *Todo) CommitEdit(ev dom.Event) { - input := v.Element().QuerySelector(".edit").(*dom.HTMLInputElement) - newTitle := strings.TrimSpace(input.Value) - // If the newTitle is an empty string, delete the todo. Otherwise set the - // new title. - if newTitle != "" { - v.Model.SetTitle(newTitle) - } else { - v.Model.Remove() - } -} - -// CancelEdit resets the title of the todo to its old value. It does not commit -// the edit. After the edit has been canceled, the todo is no longer in the -// editing state. -func (v *Todo) CancelEdit(ev dom.Event) { - removeClass(v.Element(), "editing") - input := v.Element().QuerySelector(".edit").(*dom.HTMLInputElement) - input.Value = v.Model.Title() - input.Blur() -} diff --git a/examples/humble/index.html b/examples/humble/index.html deleted file mode 100644 index 0c2abc4640..0000000000 --- a/examples/humble/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Humble + GopherJS • TodoMVC - - - - - - -
            -
            - - - - - diff --git a/examples/humble/js/app.js b/examples/humble/js/app.js deleted file mode 100644 index 8b105980ed..0000000000 --- a/examples/humble/js/app.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -(function() { - -Error.stackTraceLimit=Infinity;var $global,$module;if(typeof window!=="undefined"){$global=window;}else if(typeof self!=="undefined"){$global=self;}else if(typeof global!=="undefined"){$global=global;$global.require=require;}else{$global=this;}if($global===undefined||$global.Array===undefined){throw new Error("no global object found");}if(typeof module!=="undefined"){$module=module;}var $packages={},$idCounter=0;var $keys=function(m){return m?Object.keys(m):[];};var $min=Math.min;var $mod=function(x,y){return x%y;};var $parseInt=parseInt;var $parseFloat=function(f){if(f!==undefined&&f!==null&&f.constructor===Number){return f;}return parseFloat(f);};var $flushConsole=function(){};var $throwRuntimeError;var $throwNilPointerError=function(){$throwRuntimeError("invalid memory address or nil pointer dereference");};var $call=function(fn,rcvr,args){return fn.apply(rcvr,args);};var $makeFunc=function(fn){return function(){return fn(new($sliceType($jsObjectPtr))($global.Array.prototype.slice.call(arguments,[])));}};var $froundBuf=new Float32Array(1);var $fround=Math.fround||function(f){$froundBuf[0]=f;return $froundBuf[0];};var $mapArray=function(array,f){var newArray=new array.constructor(array.length);for(var i=0;islice.$capacity||max>slice.$capacity){$throwRuntimeError("slice bounds out of range");}var s=new slice.constructor(slice.$array);s.$offset=slice.$offset+low;s.$length=slice.$length-low;s.$capacity=slice.$capacity-low;if(high!==undefined){s.$length=high-low;}if(max!==undefined){s.$capacity=max-low;}return s;};var $sliceToArray=function(slice){if(slice.$length===0){return[];}if(slice.$array.constructor!==Array){return slice.$array.subarray(slice.$offset,slice.$offset+slice.$length);}return slice.$array.slice(slice.$offset,slice.$offset+slice.$length);};var $decodeRune=function(str,pos){var c0=str.charCodeAt(pos);if(c0<0x80){return[c0,1];}if(c0!==c0||c0<0xC0){return[0xFFFD,1];}var c1=str.charCodeAt(pos+1);if(c1!==c1||c1<0x80||0xC0<=c1){return[0xFFFD,1];}if(c0<0xE0){var r=(c0&0x1F)<<6|(c1&0x3F);if(r<=0x7F){return[0xFFFD,1];}return[r,2];}var c2=str.charCodeAt(pos+2);if(c2!==c2||c2<0x80||0xC0<=c2){return[0xFFFD,1];}if(c0<0xF0){var r=(c0&0x0F)<<12|(c1&0x3F)<<6|(c2&0x3F);if(r<=0x7FF){return[0xFFFD,1];}if(0xD800<=r&&r<=0xDFFF){return[0xFFFD,1];}return[r,3];}var c3=str.charCodeAt(pos+3);if(c3!==c3||c3<0x80||0xC0<=c3){return[0xFFFD,1];}if(c0<0xF8){var r=(c0&0x07)<<18|(c1&0x3F)<<12|(c2&0x3F)<<6|(c3&0x3F);if(r<=0xFFFF||0x10FFFF0x10FFFF||(0xD800<=r&&r<=0xDFFF)){r=0xFFFD;}if(r<=0x7F){return String.fromCharCode(r);}if(r<=0x7FF){return String.fromCharCode(0xC0|r>>6,0x80|(r&0x3F));}if(r<=0xFFFF){return String.fromCharCode(0xE0|r>>12,0x80|(r>>6&0x3F),0x80|(r&0x3F));}return String.fromCharCode(0xF0|r>>18,0x80|(r>>12&0x3F),0x80|(r>>6&0x3F),0x80|(r&0x3F));};var $stringToBytes=function(str){var array=new Uint8Array(str.length);for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){elem.copy(dst[dstOffset+i],src[srcOffset+i]);}return;}for(var i=0;isrcOffset){for(var i=n-1;i>=0;i--){dst[dstOffset+i]=src[srcOffset+i];}return;}for(var i=0;inewCapacity){newOffset=0;newCapacity=Math.max(newLength,slice.$capacity<1024?slice.$capacity*2:Math.floor(slice.$capacity*5/4));if(slice.$array.constructor===Array){newArray=slice.$array.slice(slice.$offset,slice.$offset+slice.$length);newArray.length=newCapacity;var zero=slice.constructor.elem.zero;for(var i=slice.$length;i>0;this.$low=low>>>0;this.$val=this;};typ.keyFor=function(x){return x.$high+"$"+x.$low;};break;case $kindUint64:typ=function(high,low){this.$high=(high+Math.floor(Math.ceil(low)/4294967296))>>>0;this.$low=low>>>0;this.$val=this;};typ.keyFor=function(x){return x.$high+"$"+x.$low;};break;case $kindComplex64:typ=function(real,imag){this.$real=$fround(real);this.$imag=$fround(imag);this.$val=this;};typ.keyFor=function(x){return x.$real+"$"+x.$imag;};break;case $kindComplex128:typ=function(real,imag){this.$real=real;this.$imag=imag;this.$val=this;};typ.keyFor=function(x){return x.$real+"$"+x.$imag;};break;case $kindArray:typ=function(v){this.$val=v;};typ.wrapped=true;typ.ptr=$newType(4,$kindPtr,"*"+string,"","",function(array){this.$get=function(){return array;};this.$set=function(v){typ.copy(this,v);};this.$val=array;});typ.init=function(elem,len){typ.elem=elem;typ.len=len;typ.comparable=elem.comparable;typ.keyFor=function(x){return Array.prototype.join.call($mapArray(x,function(e){return String(elem.keyFor(e)).replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}),"$");};typ.copy=function(dst,src){$copyArray(dst,src,0,0,src.length,elem);};typ.ptr.init(typ);Object.defineProperty(typ.ptr.nil,"nilCheck",{get:$throwNilPointerError});};break;case $kindChan:typ=function(v){this.$val=v;};typ.wrapped=true;typ.keyFor=$idKey;typ.init=function(elem,sendOnly,recvOnly){typ.elem=elem;typ.sendOnly=sendOnly;typ.recvOnly=recvOnly;};break;case $kindFunc:typ=function(v){this.$val=v;};typ.wrapped=true;typ.init=function(params,results,variadic){typ.params=params;typ.results=results;typ.variadic=variadic;typ.comparable=false;};break;case $kindInterface:typ={implementedBy:{},missingMethodFor:{}};typ.keyFor=$ifaceKeyFor;typ.init=function(methods){typ.methods=methods;methods.forEach(function(m){$ifaceNil[m.prop]=$throwNilPointerError;});};break;case $kindMap:typ=function(v){this.$val=v;};typ.wrapped=true;typ.init=function(key,elem){typ.key=key;typ.elem=elem;typ.comparable=false;};break;case $kindPtr:typ=constructor||function(getter,setter,target){this.$get=getter;this.$set=setter;this.$target=target;this.$val=this;};typ.keyFor=$idKey;typ.init=function(elem){typ.elem=elem;typ.wrapped=(elem.kind===$kindArray);typ.nil=new typ($throwNilPointerError,$throwNilPointerError);};break;case $kindSlice:typ=function(array){if(array.constructor!==typ.nativeArray){array=new typ.nativeArray(array);}this.$array=array;this.$offset=0;this.$length=array.length;this.$capacity=array.length;this.$val=this;};typ.init=function(elem){typ.elem=elem;typ.comparable=false;typ.nativeArray=$nativeArray(elem.kind);typ.nil=new typ([]);};break;case $kindStruct:typ=function(v){this.$val=v;};typ.wrapped=true;typ.ptr=$newType(4,$kindPtr,"*"+string,"","",constructor);typ.ptr.elem=typ;typ.ptr.prototype.$get=function(){return this;};typ.ptr.prototype.$set=function(v){typ.copy(this,v);};typ.init=function(fields){typ.fields=fields;fields.forEach(function(f){if(!f.typ.comparable){typ.comparable=false;}});typ.keyFor=function(x){var val=x.$val;return $mapArray(fields,function(f){return String(f.typ.keyFor(val[f.prop])).replace(/\\/g,"\\\\").replace(/\$/g,"\\$");}).join("$");};typ.copy=function(dst,src){for(var i=0;i0){var next=[];var mset=[];current.forEach(function(e){if(seen[e.typ.string]){return;}seen[e.typ.string]=true;if(e.typ.typeName!==""){mset=mset.concat(e.typ.methods);if(e.indirect){mset=mset.concat($ptrType(e.typ).methods);}}switch(e.typ.kind){case $kindStruct:e.typ.fields.forEach(function(f){if(f.name===""){var fTyp=f.typ;var fIsPtr=(fTyp.kind===$kindPtr);next.push({typ:fIsPtr?fTyp.elem:fTyp,indirect:e.indirect||fIsPtr});}});break;case $kindInterface:mset=mset.concat(e.typ.methods);break;}});mset.forEach(function(m){if(base[m.name]===undefined){base[m.name]=m;}});current=next;}typ.methodSetCache=[];Object.keys(base).sort().forEach(function(name){typ.methodSetCache.push(base[name]);});return typ.methodSetCache;};var $Bool=$newType(1,$kindBool,"bool","bool","",null);var $Int=$newType(4,$kindInt,"int","int","",null);var $Int8=$newType(1,$kindInt8,"int8","int8","",null);var $Int16=$newType(2,$kindInt16,"int16","int16","",null);var $Int32=$newType(4,$kindInt32,"int32","int32","",null);var $Int64=$newType(8,$kindInt64,"int64","int64","",null);var $Uint=$newType(4,$kindUint,"uint","uint","",null);var $Uint8=$newType(1,$kindUint8,"uint8","uint8","",null);var $Uint16=$newType(2,$kindUint16,"uint16","uint16","",null);var $Uint32=$newType(4,$kindUint32,"uint32","uint32","",null);var $Uint64=$newType(8,$kindUint64,"uint64","uint64","",null);var $Uintptr=$newType(4,$kindUintptr,"uintptr","uintptr","",null);var $Float32=$newType(4,$kindFloat32,"float32","float32","",null);var $Float64=$newType(8,$kindFloat64,"float64","float64","",null);var $Complex64=$newType(8,$kindComplex64,"complex64","complex64","",null);var $Complex128=$newType(16,$kindComplex128,"complex128","complex128","",null);var $String=$newType(8,$kindString,"string","string","",null);var $UnsafePointer=$newType(4,$kindUnsafePointer,"unsafe.Pointer","Pointer","",null);var $nativeArray=function(elemKind){switch(elemKind){case $kindInt:return Int32Array;case $kindInt8:return Int8Array;case $kindInt16:return Int16Array;case $kindInt32:return Int32Array;case $kindUint:return Uint32Array;case $kindUint8:return Uint8Array;case $kindUint16:return Uint16Array;case $kindUint32:return Uint32Array;case $kindUintptr:return Uint32Array;case $kindFloat32:return Float32Array;case $kindFloat64:return Float64Array;default:return Array;}};var $toNativeArray=function(elemKind,array){var nativeArray=$nativeArray(elemKind);if(nativeArray===Array){return array;}return new nativeArray(array);};var $arrayTypes={};var $arrayType=function(elem,len){var typeKey=elem.id+"$"+len;var typ=$arrayTypes[typeKey];if(typ===undefined){typ=$newType(12,$kindArray,"["+len+"]"+elem.string,"","",null);$arrayTypes[typeKey]=typ;typ.init(elem,len);}return typ;};var $chanType=function(elem,sendOnly,recvOnly){var string=(recvOnly?"<-":"")+"chan"+(sendOnly?"<- ":" ")+elem.string;var field=sendOnly?"SendChan":(recvOnly?"RecvChan":"Chan");var typ=elem[field];if(typ===undefined){typ=$newType(4,$kindChan,string,"","",null);elem[field]=typ;typ.init(elem,sendOnly,recvOnly);}return typ;};var $Chan=function(elem,capacity){if(capacity<0||capacity>2147483647){$throwRuntimeError("makechan: size out of range");}this.$elem=elem;this.$capacity=capacity;this.$buffer=[];this.$sendQueue=[];this.$recvQueue=[];this.$closed=false;};var $chanNil=new $Chan(null,0);$chanNil.$sendQueue=$chanNil.$recvQueue={length:0,push:function(){},shift:function(){return undefined;},indexOf:function(){return-1;}};var $funcTypes={};var $funcType=function(params,results,variadic){var typeKey=$mapArray(params,function(p){return p.id;}).join(",")+"$"+$mapArray(results,function(r){return r.id;}).join(",")+"$"+variadic;var typ=$funcTypes[typeKey];if(typ===undefined){var paramTypes=$mapArray(params,function(p){return p.string;});if(variadic){paramTypes[paramTypes.length-1]="..."+paramTypes[paramTypes.length-1].substr(2);}var string="func("+paramTypes.join(", ")+")";if(results.length===1){string+=" "+results[0].string;}else if(results.length>1){string+=" ("+$mapArray(results,function(r){return r.string;}).join(", ")+")";}typ=$newType(4,$kindFunc,string,"","",null);$funcTypes[typeKey]=typ;typ.init(params,results,variadic);}return typ;};var $interfaceTypes={};var $interfaceType=function(methods){var typeKey=$mapArray(methods,function(m){return m.pkg+","+m.name+","+m.typ.id;}).join("$");var typ=$interfaceTypes[typeKey];if(typ===undefined){var string="interface {}";if(methods.length!==0){string="interface { "+$mapArray(methods,function(m){return(m.pkg!==""?m.pkg+".":"")+m.name+m.typ.string.substr(4);}).join("; ")+" }";}typ=$newType(8,$kindInterface,string,"","",null);$interfaceTypes[typeKey]=typ;typ.init(methods);}return typ;};var $emptyInterface=$interfaceType([]);var $ifaceNil={};var $error=$newType(8,$kindInterface,"error","error","",null);$error.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}]);var $mapTypes={};var $mapType=function(key,elem){var typeKey=key.id+"$"+elem.id;var typ=$mapTypes[typeKey];if(typ===undefined){typ=$newType(4,$kindMap,"map["+key.string+"]"+elem.string,"","",null);$mapTypes[typeKey]=typ;typ.init(key,elem);}return typ;};var $makeMap=function(keyForFunc,entries){var m={};for(var i=0;i2147483647){$throwRuntimeError("makeslice: len out of range");}if(capacity<0||capacity2147483647){$throwRuntimeError("makeslice: cap out of range");}var array=new typ.nativeArray(capacity);if(typ.nativeArray===Array){for(var i=0;i>>(32-y),(x.$low<>>0);}if(y<64){return new x.constructor(x.$low<<(y-32),0);}return new x.constructor(0,0);};var $shiftRightInt64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(x.$high>>31,(x.$high>>(y-32))>>>0);}if(x.$high<0){return new x.constructor(-1,4294967295);}return new x.constructor(0,0);};var $shiftRightUint64=function(x,y){if(y===0){return x;}if(y<32){return new x.constructor(x.$high>>>y,(x.$low>>>y|x.$high<<(32-y))>>>0);}if(y<64){return new x.constructor(0,x.$high>>>(y-32));}return new x.constructor(0,0);};var $mul64=function(x,y){var high=0,low=0;if((y.$low&1)!==0){high=x.$high;low=x.$low;}for(var i=1;i<32;i++){if((y.$low&1<>>(32-i);low+=(x.$low<>>0;}}for(var i=0;i<32;i++){if((y.$high&1<yHigh)||(xHigh===yHigh&&xLow>yLow))){yHigh=(yHigh<<1|yLow>>>31)>>>0;yLow=(yLow<<1)>>>0;n++;}for(var i=0;i<=n;i++){high=high<<1|low>>>31;low=(low<<1)>>>0;if((xHigh>yHigh)||(xHigh===yHigh&&xLow>=yLow)){xHigh=xHigh-yHigh;xLow=xLow-yLow;if(xLow<0){xHigh--;xLow+=4294967296;}low++;if(low===4294967296){high++;low=0;}}yLow=(yLow>>>1|yHigh<<(32-1))>>>0;yHigh=yHigh>>>1;}if(returnRemainder){return new x.constructor(xHigh*rs,xLow*rs);}return new x.constructor(high*s,low*s);};var $divComplex=function(n,d){var ninf=n.$real===Infinity||n.$real===-Infinity||n.$imag===Infinity||n.$imag===-Infinity;var dinf=d.$real===Infinity||d.$real===-Infinity||d.$imag===Infinity||d.$imag===-Infinity;var nnan=!ninf&&(n.$real!==n.$real||n.$imag!==n.$imag);var dnan=!dinf&&(d.$real!==d.$real||d.$imag!==d.$imag);if(nnan||dnan){return new n.constructor(NaN,NaN);}if(ninf&&!dinf){return new n.constructor(Infinity,Infinity);}if(!ninf&&dinf){return new n.constructor(0,0);}if(d.$real===0&&d.$imag===0){if(n.$real===0&&n.$imag===0){return new n.constructor(NaN,NaN);}return new n.constructor(Infinity,Infinity);}var a=Math.abs(d.$real);var b=Math.abs(d.$imag);if(a<=b){var ratio=d.$real/d.$imag;var denom=d.$real*ratio+d.$imag;return new n.constructor((n.$real*ratio+n.$imag)/denom,(n.$imag*ratio-n.$real)/denom);}var ratio=d.$imag/d.$real;var denom=d.$imag*ratio+d.$real;return new n.constructor((n.$imag*ratio+n.$real)/denom,(n.$imag-n.$real*ratio)/denom);};var $stackDepthOffset=0;var $getStackDepth=function(){var err=new Error();if(err.stack===undefined){return undefined;}return $stackDepthOffset+err.stack.split("\n").length;};var $panicStackDepth=null,$panicValue;var $callDeferred=function(deferred,jsErr,fromPanic){if(!fromPanic&&deferred!==null&&deferred.index>=$curGoroutine.deferStack.length){throw jsErr;}if(jsErr!==null){var newErr=null;try{$curGoroutine.deferStack.push(deferred);$panic(new $jsErrorPtr(jsErr));}catch(err){newErr=err;}$curGoroutine.deferStack.pop();$callDeferred(deferred,newErr);return;}if($curGoroutine.asleep){return;}$stackDepthOffset--;var outerPanicStackDepth=$panicStackDepth;var outerPanicValue=$panicValue;var localPanicValue=$curGoroutine.panicStack.pop();if(localPanicValue!==undefined){$panicStackDepth=$getStackDepth();$panicValue=localPanicValue;}try{while(true){if(deferred===null){deferred=$curGoroutine.deferStack[$curGoroutine.deferStack.length-1];if(deferred===undefined){$panicStackDepth=null;if(localPanicValue.Object instanceof Error){throw localPanicValue.Object;}var msg;if(localPanicValue.constructor===$String){msg=localPanicValue.$val;}else if(localPanicValue.Error!==undefined){msg=localPanicValue.Error();}else if(localPanicValue.String!==undefined){msg=localPanicValue.String();}else{msg=localPanicValue;}throw new Error(msg);}}var call=deferred.pop();if(call===undefined){$curGoroutine.deferStack.pop();if(localPanicValue!==undefined){deferred=null;continue;}return;}var r=call[0].apply(call[2],call[1]);if(r&&r.$blk!==undefined){deferred.push([r.$blk,[],r]);if(fromPanic){throw null;}return;}if(localPanicValue!==undefined&&$panicStackDepth===null){throw null;}}}finally{if(localPanicValue!==undefined){if($panicStackDepth!==null){$curGoroutine.panicStack.push(localPanicValue);}$panicStackDepth=outerPanicStackDepth;$panicValue=outerPanicValue;}$stackDepthOffset++;}};var $panic=function(value){$curGoroutine.panicStack.push(value);$callDeferred(null,null,true);};var $recover=function(){if($panicStackDepth===null||($panicStackDepth!==undefined&&$panicStackDepth!==$getStackDepth()-2)){return $ifaceNil;}$panicStackDepth=null;return $panicValue;};var $throw=function(err){throw err;};var $dummyGoroutine={asleep:false,exit:false,deferStack:[],panicStack:[],canBlock:false};var $curGoroutine=$dummyGoroutine,$totalGoroutines=0,$awakeGoroutines=0,$checkForDeadlock=true;var $go=function(fun,args,direct){$totalGoroutines++;$awakeGoroutines++;var $goroutine=function(){var rescheduled=false;try{$curGoroutine=$goroutine;var r=fun.apply(undefined,args);if(r&&r.$blk!==undefined){fun=function(){return r.$blk();};args=[];rescheduled=true;return;}$goroutine.exit=true;}catch(err){$goroutine.exit=true;throw err;}finally{$curGoroutine=$dummyGoroutine;if($goroutine.exit&&!rescheduled){$totalGoroutines--;$goroutine.asleep=true;}if($goroutine.asleep&&!rescheduled){$awakeGoroutines--;if($awakeGoroutines===0&&$totalGoroutines!==0&&$checkForDeadlock){console.error("fatal error: all goroutines are asleep - deadlock!");}}}};$goroutine.asleep=false;$goroutine.exit=false;$goroutine.deferStack=[];$goroutine.panicStack=[];$goroutine.canBlock=true;$schedule($goroutine,direct);};var $scheduled=[],$schedulerActive=false;var $runScheduled=function(){try{var r;while((r=$scheduled.shift())!==undefined){r();}$schedulerActive=false;}finally{if($schedulerActive){setTimeout($runScheduled,0);}}};var $schedule=function(goroutine,direct){if(goroutine.asleep){goroutine.asleep=false;$awakeGoroutines++;}if(direct){goroutine();return;}$scheduled.push(goroutine);if(!$schedulerActive){$schedulerActive=true;setTimeout($runScheduled,0);}};var $block=function(){if(!$curGoroutine.canBlock){$throwRuntimeError("cannot block in JavaScript callback, fix by wrapping code in goroutine");}$curGoroutine.asleep=true;};var $send=function(chan,value){if(chan.$closed){$throwRuntimeError("send on closed channel");}var queuedRecv=chan.$recvQueue.shift();if(queuedRecv!==undefined){queuedRecv([value,true]);return;}if(chan.$buffer.length0xFFFF){var h=Math.floor((c-0x10000)/0x400)+0xD800;var l=(c-0x10000)%0x400+0xDC00;s+=String.fromCharCode(h,l);continue;}s+=String.fromCharCode(c);}return s;case $kindStruct:var timePkg=$packages["time"];if(timePkg!==undefined&&v.constructor===timePkg.Time.ptr){var milli=$div64(v.UnixNano(),new $Int64(0,1000000));return new Date($flatten64(milli));}var noJsObject={};var searchJsObject=function(v,t){if(t===$jsObjectPtr){return v;}switch(t.kind){case $kindPtr:if(v===t.nil){return noJsObject;}return searchJsObject(v.$get(),t.elem);case $kindStruct:var f=t.fields[0];return searchJsObject(v[f.prop],f.typ);case $kindInterface:return searchJsObject(v.$val,v.constructor);default:return noJsObject;}};var o=searchJsObject(v,t);if(o!==noJsObject){return o;}o={};for(var i=0;i>24;case $kindInt16:return parseInt(v)<<16>>16;case $kindInt32:return parseInt(v)>>0;case $kindUint:return parseInt(v);case $kindUint8:return parseInt(v)<<24>>>24;case $kindUint16:return parseInt(v)<<16>>>16;case $kindUint32:case $kindUintptr:return parseInt(v)>>>0;case $kindInt64:case $kindUint64:return new t(0,v);case $kindFloat32:case $kindFloat64:return parseFloat(v);case $kindArray:if(v.length!==t.len){$throwRuntimeError("got array with wrong size from JavaScript native");}return $mapArray(v,function(e){return $internalize(e,t.elem);});case $kindFunc:return function(){var args=[];for(var i=0;i>0;};A.prototype.Int=function(){return this.$val.Int();};A.ptr.prototype.Int64=function(){var $ptr,a;a=this;return $internalize(a.object,$Int64);};A.prototype.Int64=function(){return this.$val.Int64();};A.ptr.prototype.Uint64=function(){var $ptr,a;a=this;return $internalize(a.object,$Uint64);};A.prototype.Uint64=function(){return this.$val.Uint64();};A.ptr.prototype.Float=function(){var $ptr,a;a=this;return $parseFloat(a.object);};A.prototype.Float=function(){return this.$val.Float();};A.ptr.prototype.Interface=function(){var $ptr,a;a=this;return $internalize(a.object,$emptyInterface);};A.prototype.Interface=function(){return this.$val.Interface();};A.ptr.prototype.Unsafe=function(){var $ptr,a;a=this;return a.object;};A.prototype.Unsafe=function(){return this.$val.Unsafe();};B.ptr.prototype.Error=function(){var $ptr,a;a=this;return"JavaScript error: "+$internalize(a.Object.message,$String);};B.prototype.Error=function(){return this.$val.Error();};B.ptr.prototype.Stack=function(){var $ptr,a;a=this;return $internalize(a.Object.stack,$String);};B.prototype.Stack=function(){return this.$val.Stack();};F=function(a){var $ptr,a,b,c,d;if(a===null||a===undefined){return M.nil;}b=$global.Object.keys(a);c=$makeSlice(M,$parseInt(b.length));d=0;while(true){if(!(d<$parseInt(b.length))){break;}((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=$internalize(b[d],$String));d=d+(1)>>0;}return c;};$pkg.Keys=F;K=function(){var $ptr,a;a=new B.ptr(null);};N.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[N],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$emptyInterface],[],false)},{prop:"Delete",name:"Delete",pkg:"",typ:$funcType([$String],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[N],false)},{prop:"SetIndex",name:"SetIndex",pkg:"",typ:$funcType([$Int,$emptyInterface],[],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([$String,L],[N],true)},{prop:"Invoke",name:"Invoke",pkg:"",typ:$funcType([L],[N],true)},{prop:"New",name:"New",pkg:"",typ:$funcType([L],[N],true)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Unsafe",name:"Unsafe",pkg:"",typ:$funcType([],[$Uintptr],false)}];Q.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Stack",name:"Stack",pkg:"",typ:$funcType([],[$String],false)}];A.init([{prop:"object",name:"object",pkg:"github.com/gopherjs/gopherjs/js",typ:N,tag:""}]);B.init([{prop:"Object",name:"",pkg:"",typ:N,tag:""}]);I.init($String,$emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:K();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["runtime"]=(function(){var $pkg={},$init,A,AA,AB,AC,AT,C,F,J,P;A=$packages["github.com/gopherjs/gopherjs/js"];AA=$pkg.Error=$newType(8,$kindInterface,"runtime.Error","Error","runtime",null);AB=$pkg.TypeAssertionError=$newType(0,$kindStruct,"runtime.TypeAssertionError","TypeAssertionError","runtime",function(interfaceString_,concreteString_,assertedString_,missingMethod_){this.$val=this;if(arguments.length===0){this.interfaceString="";this.concreteString="";this.assertedString="";this.missingMethod="";return;}this.interfaceString=interfaceString_;this.concreteString=concreteString_;this.assertedString=assertedString_;this.missingMethod=missingMethod_;});AC=$pkg.errorString=$newType(8,$kindString,"runtime.errorString","errorString","runtime",null);AT=$ptrType(AB);C=function(){var $ptr,a,b;a=$packages[$externalize("github.com/gopherjs/gopherjs/js",$String)];$jsObjectPtr=a.Object.ptr;$jsErrorPtr=a.Error.ptr;$throwRuntimeError=(function(b){var $ptr,b;$panic(new AC(b));});b=$ifaceNil;b=new AB.ptr("","","","");};F=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=0;c="";d=0;e=false;f=new($global.Error)().stack.split($externalize("\n",$String))[(a+2>>0)];if(f===undefined){g=0;h="";i=0;j=false;b=g;c=h;d=i;e=j;return[b,c,d,e];}k=f.substring(($parseInt(f.indexOf($externalize("(",$String)))>>0)+1>>0,$parseInt(f.indexOf($externalize(")",$String)))>>0).split($externalize(":",$String));l=0;m=$internalize(k[0],$String);n=$parseInt(k[1])>>0;o=true;b=l;c=m;d=n;e=o;return[b,c,d,e];};$pkg.Caller=F;J=function(a){var $ptr,a;return 1;};$pkg.GOMAXPROCS=J;P=function(a,b){var $ptr,a,b;};$pkg.SetFinalizer=P;AB.ptr.prototype.RuntimeError=function(){var $ptr;};AB.prototype.RuntimeError=function(){return this.$val.RuntimeError();};AB.ptr.prototype.Error=function(){var $ptr,a,b;a=this;b=a.interfaceString;if(b===""){b="interface";}if(a.concreteString===""){return"interface conversion: "+b+" is nil, not "+a.assertedString;}if(a.missingMethod===""){return"interface conversion: "+b+" is "+a.concreteString+", not "+a.assertedString;}return"interface conversion: "+a.concreteString+" is not "+a.assertedString+": missing method "+a.missingMethod;};AB.prototype.Error=function(){return this.$val.Error();};AC.prototype.RuntimeError=function(){var $ptr,a;a=this.$val;};$ptrType(AC).prototype.RuntimeError=function(){return new AC(this.$get()).RuntimeError();};AC.prototype.Error=function(){var $ptr,a;a=this.$val;return"runtime error: "+a;};$ptrType(AC).prototype.Error=function(){return new AC(this.$get()).Error();};AT.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AC.methods=[{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)},{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AA.init([{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"RuntimeError",name:"RuntimeError",pkg:"",typ:$funcType([],[],false)}]);AB.init([{prop:"interfaceString",name:"interfaceString",pkg:"runtime",typ:$String,tag:""},{prop:"concreteString",name:"concreteString",pkg:"runtime",typ:$String,tag:""},{prop:"assertedString",name:"assertedString",pkg:"runtime",typ:$String,tag:""},{prop:"missingMethod",name:"missingMethod",pkg:"runtime",typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}C();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["errors"]=(function(){var $pkg={},$init,B,C,A;B=$pkg.errorString=$newType(0,$kindStruct,"errors.errorString","errorString","errors",function(s_){this.$val=this;if(arguments.length===0){this.s="";return;}this.s=s_;});C=$ptrType(B);A=function(a){var $ptr,a;return new B.ptr(a);};$pkg.New=A;B.ptr.prototype.Error=function(){var $ptr,a;a=this;return a.s;};B.prototype.Error=function(){return this.$val.Error();};C.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];B.init([{prop:"s",name:"s",pkg:"errors",typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["sync/atomic"]=(function(){var $pkg={},$init,A,AF,AJ,H,N,U,Y,AA;A=$packages["github.com/gopherjs/gopherjs/js"];AF=$pkg.Value=$newType(0,$kindStruct,"atomic.Value","Value","sync/atomic",function(v_){this.$val=this;if(arguments.length===0){this.v=$ifaceNil;return;}this.v=v_;});AJ=$ptrType(AF);H=function(ad,ae,af){var $ptr,ad,ae,af;if(ad.$get()===ae){ad.$set(af);return true;}return false;};$pkg.CompareAndSwapInt32=H;N=function(ad,ae){var $ptr,ad,ae,af;af=ad.$get()+ae>>0;ad.$set(af);return af;};$pkg.AddInt32=N;U=function(ad){var $ptr,ad;return ad.$get();};$pkg.LoadUint32=U;Y=function(ad,ae){var $ptr,ad,ae;ad.$set(ae);};$pkg.StoreInt32=Y;AA=function(ad,ae){var $ptr,ad,ae;ad.$set(ae);};$pkg.StoreUint32=AA;AF.ptr.prototype.Load=function(){var $ptr,ad,ae;ad=$ifaceNil;ae=this;ad=ae.v;return ad;};AF.prototype.Load=function(){return this.$val.Load();};AF.ptr.prototype.Store=function(ad){var $ptr,ad,ae;ae=this;if($interfaceIsEqual(ad,$ifaceNil)){$panic(new $String("sync/atomic: store of nil value into Value"));}if(!($interfaceIsEqual(ae.v,$ifaceNil))&&!(ad.constructor===ae.v.constructor)){$panic(new $String("sync/atomic: store of inconsistently typed value into Value"));}ae.v=ad;};AF.prototype.Store=function(ad){return this.$val.Store(ad);};AJ.methods=[{prop:"Load",name:"Load",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Store",name:"Store",pkg:"",typ:$funcType([$emptyInterface],[],false)}];AF.init([{prop:"v",name:"v",pkg:"sync/atomic",typ:$emptyInterface,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["sync"]=(function(){var $pkg={},$init,B,A,E,N,O,P,Q,AF,AK,AL,AM,AN,AO,AP,AQ,AU,AX,AY,AZ,BA,BD,BI,BJ,BK,BL,G,T,D,F,H,I,J,R,U,V,AC,AI,AJ;B=$packages["runtime"];A=$packages["sync/atomic"];E=$pkg.Pool=$newType(0,$kindStruct,"sync.Pool","Pool","sync",function(local_,localSize_,store_,New_){this.$val=this;if(arguments.length===0){this.local=0;this.localSize=0;this.store=AY.nil;this.New=$throwNilPointerError;return;}this.local=local_;this.localSize=localSize_;this.store=store_;this.New=New_;});N=$pkg.Mutex=$newType(0,$kindStruct,"sync.Mutex","Mutex","sync",function(state_,sema_){this.$val=this;if(arguments.length===0){this.state=0;this.sema=0;return;}this.state=state_;this.sema=sema_;});O=$pkg.Locker=$newType(8,$kindInterface,"sync.Locker","Locker","sync",null);P=$pkg.Once=$newType(0,$kindStruct,"sync.Once","Once","sync",function(m_,done_){this.$val=this;if(arguments.length===0){this.m=new N.ptr(0,0);this.done=0;return;}this.m=m_;this.done=done_;});Q=$pkg.poolLocal=$newType(0,$kindStruct,"sync.poolLocal","poolLocal","sync",function(private$0_,shared_,Mutex_,pad_){this.$val=this;if(arguments.length===0){this.private$0=$ifaceNil;this.shared=AY.nil;this.Mutex=new N.ptr(0,0);this.pad=BL.zero();return;}this.private$0=private$0_;this.shared=shared_;this.Mutex=Mutex_;this.pad=pad_;});AF=$pkg.syncSema=$newType(0,$kindStruct,"sync.syncSema","syncSema","sync",function(lock_,head_,tail_){this.$val=this;if(arguments.length===0){this.lock=0;this.head=0;this.tail=0;return;}this.lock=lock_;this.head=head_;this.tail=tail_;});AK=$pkg.RWMutex=$newType(0,$kindStruct,"sync.RWMutex","RWMutex","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;if(arguments.length===0){this.w=new N.ptr(0,0);this.writerSem=0;this.readerSem=0;this.readerCount=0;this.readerWait=0;return;}this.w=w_;this.writerSem=writerSem_;this.readerSem=readerSem_;this.readerCount=readerCount_;this.readerWait=readerWait_;});AL=$pkg.rlocker=$newType(0,$kindStruct,"sync.rlocker","rlocker","sync",function(w_,writerSem_,readerSem_,readerCount_,readerWait_){this.$val=this;if(arguments.length===0){this.w=new N.ptr(0,0);this.writerSem=0;this.readerSem=0;this.readerCount=0;this.readerWait=0;return;}this.w=w_;this.writerSem=writerSem_;this.readerSem=readerSem_;this.readerCount=readerCount_;this.readerWait=readerWait_;});AM=$ptrType(E);AN=$sliceType(AM);AO=$ptrType($Uint32);AP=$chanType($Bool,false,false);AQ=$sliceType(AP);AU=$ptrType($Int32);AX=$ptrType(Q);AY=$sliceType($emptyInterface);AZ=$ptrType(AL);BA=$ptrType(AK);BD=$funcType([],[$emptyInterface],false);BI=$ptrType(N);BJ=$funcType([],[],false);BK=$ptrType(P);BL=$arrayType($Uint8,128);D=function(i){var $ptr,i;};E.ptr.prototype.Get=function(){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;if(i.store.$length===0){$s=1;continue;}$s=2;continue;case 1:if(!(i.New===$throwNilPointerError)){$s=3;continue;}$s=4;continue;case 3:j=i.New();$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 4:return $ifaceNil;case 2:m=(k=i.store,l=i.store.$length-1>>0,((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]));i.store=$subslice(i.store,0,(i.store.$length-1>>0));return m;}return;}if($f===undefined){$f={$blk:E.ptr.prototype.Get};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};E.prototype.Get=function(){return this.$val.Get();};E.ptr.prototype.Put=function(i){var $ptr,i,j;j=this;if($interfaceIsEqual(i,$ifaceNil)){return;}j.store=$append(j.store,i);};E.prototype.Put=function(i){return this.$val.Put(i);};F=function(i){var $ptr,i;};H=function(i){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(i.$get()===0){$s=1;continue;}$s=2;continue;case 1:j=new $Chan($Bool,0);k=i;(G||$throwRuntimeError("assignment to entry in nil map"))[AO.keyFor(k)]={k:k,v:$append((l=G[AO.keyFor(i)],l!==undefined?l.v:AQ.nil),j)};m=$recv(j);$s=3;case 3:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m[0];case 2:i.$set(i.$get()-(1)>>>0);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};I=function(i){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i.$set(i.$get()+(1)>>>0);k=(j=G[AO.keyFor(i)],j!==undefined?j.v:AQ.nil);if(k.$length===0){return;}l=(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0]);k=$subslice(k,1);m=i;(G||$throwRuntimeError("assignment to entry in nil map"))[AO.keyFor(m)]={k:m,v:k};if(k.$length===0){delete G[AO.keyFor(i)];}$r=$send(l,true);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};J=function(i){var $ptr,i;return false;};N.ptr.prototype.Lock=function(){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;if(A.CompareAndSwapInt32((i.$ptr_state||(i.$ptr_state=new AU(function(){return this.$target.state;},function($v){this.$target.state=$v;},i))),0,1)){return;}j=false;k=0;case 1:l=i.state;m=l|1;if(!(((l&1)===0))){$s=3;continue;}$s=4;continue;case 3:if(J(k)){if(!j&&((l&2)===0)&&!(((l>>2>>0)===0))&&A.CompareAndSwapInt32((i.$ptr_state||(i.$ptr_state=new AU(function(){return this.$target.state;},function($v){this.$target.state=$v;},i))),l,l|2)){j=true;}AJ();k=k+(1)>>0;$s=1;continue;}m=l+4>>0;case 4:if(j){if((m&2)===0){$panic(new $String("sync: inconsistent mutex state"));}m=(m&~(2))>>0;}if(A.CompareAndSwapInt32((i.$ptr_state||(i.$ptr_state=new AU(function(){return this.$target.state;},function($v){this.$target.state=$v;},i))),l,m)){$s=5;continue;}$s=6;continue;case 5:if((l&1)===0){$s=2;continue;}$r=H((i.$ptr_sema||(i.$ptr_sema=new AO(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},i))));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=true;k=0;case 6:$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:N.ptr.prototype.Lock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};N.prototype.Lock=function(){return this.$val.Lock();};N.ptr.prototype.Unlock=function(){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;j=A.AddInt32((i.$ptr_state||(i.$ptr_state=new AU(function(){return this.$target.state;},function($v){this.$target.state=$v;},i))),-1);if((((j+1>>0))&1)===0){$panic(new $String("sync: unlock of unlocked mutex"));}k=j;case 1:if(((k>>2>>0)===0)||!(((k&3)===0))){return;}j=((k-4>>0))|2;if(A.CompareAndSwapInt32((i.$ptr_state||(i.$ptr_state=new AU(function(){return this.$target.state;},function($v){this.$target.state=$v;},i))),k,j)){$s=3;continue;}$s=4;continue;case 3:$r=I((i.$ptr_sema||(i.$ptr_sema=new AO(function(){return this.$target.sema;},function($v){this.$target.sema=$v;},i))));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 4:k=i.state;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:N.ptr.prototype.Unlock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};N.prototype.Unlock=function(){return this.$val.Unlock();};P.ptr.prototype.Do=function(i){var $ptr,i,j,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);j=this;if(A.LoadUint32((j.$ptr_done||(j.$ptr_done=new AO(function(){return this.$target.done;},function($v){this.$target.done=$v;},j))))===1){return;}$r=j.m.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(j.m,"Unlock"),[]]);if(j.done===0){$s=2;continue;}$s=3;continue;case 2:$deferred.push([A.StoreUint32,[(j.$ptr_done||(j.$ptr_done=new AO(function(){return this.$target.done;},function($v){this.$target.done=$v;},j))),1]]);$r=i();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:P.ptr.prototype.Do};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};P.prototype.Do=function(i){return this.$val.Do(i);};R=function(){var $ptr,i,j,k,l,m,n,o,p,q,r;i=T;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);((k<0||k>=T.$length)?$throwRuntimeError("index out of range"):T.$array[T.$offset+k]=AM.nil);m=0;while(true){if(!(m<(l.localSize>>0))){break;}n=V(l.local,m);n.private$0=$ifaceNil;o=n.shared;p=0;while(true){if(!(p=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+q]=$ifaceNil));p++;}n.shared=AY.nil;m=m+(1)>>0;}l.local=0;l.localSize=0;j++;}T=new AN([]);};U=function(){var $ptr;F(R);};V=function(i,j){var $ptr,i,j,k;return(k=i,(k.nilCheck,((j<0||j>=k.length)?$throwRuntimeError("index out of range"):k[j])));};AC=function(){var $ptr;};AI=function(){var $ptr,i;i=new AF.ptr(0,0,0);D(12);};AJ=function(){$panic("Native function not implemented: sync.runtime_doSpin");};AK.ptr.prototype.RLock=function(){var $ptr,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;if(A.AddInt32((i.$ptr_readerCount||(i.$ptr_readerCount=new AU(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},i))),1)<0){$s=1;continue;}$s=2;continue;case 1:$r=H((i.$ptr_readerSem||(i.$ptr_readerSem=new AO(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},i))));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.RLock};}$f.$ptr=$ptr;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.RLock=function(){return this.$val.RLock();};AK.ptr.prototype.RUnlock=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;j=A.AddInt32((i.$ptr_readerCount||(i.$ptr_readerCount=new AU(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},i))),-1);if(j<0){$s=1;continue;}$s=2;continue;case 1:if(((j+1>>0)===0)||((j+1>>0)===-1073741824)){AC();$panic(new $String("sync: RUnlock of unlocked RWMutex"));}if(A.AddInt32((i.$ptr_readerWait||(i.$ptr_readerWait=new AU(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},i))),-1)===0){$s=3;continue;}$s=4;continue;case 3:$r=I((i.$ptr_writerSem||(i.$ptr_writerSem=new AO(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},i))));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.RUnlock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.RUnlock=function(){return this.$val.RUnlock();};AK.ptr.prototype.Lock=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;$r=i.w.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=A.AddInt32((i.$ptr_readerCount||(i.$ptr_readerCount=new AU(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},i))),-1073741824)+1073741824>>0;if(!((j===0))&&!((A.AddInt32((i.$ptr_readerWait||(i.$ptr_readerWait=new AU(function(){return this.$target.readerWait;},function($v){this.$target.readerWait=$v;},i))),j)===0))){$s=2;continue;}$s=3;continue;case 2:$r=H((i.$ptr_writerSem||(i.$ptr_writerSem=new AO(function(){return this.$target.writerSem;},function($v){this.$target.writerSem=$v;},i))));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.Lock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.Lock=function(){return this.$val.Lock();};AK.ptr.prototype.Unlock=function(){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;j=A.AddInt32((i.$ptr_readerCount||(i.$ptr_readerCount=new AU(function(){return this.$target.readerCount;},function($v){this.$target.readerCount=$v;},i))),1073741824);if(j>=1073741824){AC();$panic(new $String("sync: Unlock of unlocked RWMutex"));}k=0;case 1:if(!(k<(j>>0))){$s=2;continue;}$r=I((i.$ptr_readerSem||(i.$ptr_readerSem=new AO(function(){return this.$target.readerSem;},function($v){this.$target.readerSem=$v;},i))));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=k+(1)>>0;$s=1;continue;case 2:$r=i.w.Unlock();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.Unlock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.Unlock=function(){return this.$val.Unlock();};AK.ptr.prototype.RLocker=function(){var $ptr,i;i=this;return $pointerOfStructConversion(i,AZ);};AK.prototype.RLocker=function(){return this.$val.RLocker();};AL.ptr.prototype.Lock=function(){var $ptr,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;$r=$pointerOfStructConversion(i,BA).RLock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.Lock};}$f.$ptr=$ptr;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.Lock=function(){return this.$val.Lock();};AL.ptr.prototype.Unlock=function(){var $ptr,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;$r=$pointerOfStructConversion(i,BA).RUnlock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.Unlock};}$f.$ptr=$ptr;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.Unlock=function(){return this.$val.Unlock();};AM.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"Put",name:"Put",pkg:"",typ:$funcType([$emptyInterface],[],false)},{prop:"getSlow",name:"getSlow",pkg:"sync",typ:$funcType([],[$emptyInterface],false)},{prop:"pin",name:"pin",pkg:"sync",typ:$funcType([],[AX],false)},{prop:"pinSlow",name:"pinSlow",pkg:"sync",typ:$funcType([],[AX],false)}];BI.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];BK.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([BJ],[],false)}];BA.methods=[{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)},{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLocker",name:"RLocker",pkg:"",typ:$funcType([],[O],false)}];AZ.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];E.init([{prop:"local",name:"local",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"localSize",name:"localSize",pkg:"sync",typ:$Uintptr,tag:""},{prop:"store",name:"store",pkg:"sync",typ:AY,tag:""},{prop:"New",name:"New",pkg:"",typ:BD,tag:""}]);N.init([{prop:"state",name:"state",pkg:"sync",typ:$Int32,tag:""},{prop:"sema",name:"sema",pkg:"sync",typ:$Uint32,tag:""}]);O.init([{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}]);P.init([{prop:"m",name:"m",pkg:"sync",typ:N,tag:""},{prop:"done",name:"done",pkg:"sync",typ:$Uint32,tag:""}]);Q.init([{prop:"private$0",name:"private",pkg:"sync",typ:$emptyInterface,tag:""},{prop:"shared",name:"shared",pkg:"sync",typ:AY,tag:""},{prop:"Mutex",name:"",pkg:"",typ:N,tag:""},{prop:"pad",name:"pad",pkg:"sync",typ:BL,tag:""}]);AF.init([{prop:"lock",name:"lock",pkg:"sync",typ:$Uintptr,tag:""},{prop:"head",name:"head",pkg:"sync",typ:$UnsafePointer,tag:""},{prop:"tail",name:"tail",pkg:"sync",typ:$UnsafePointer,tag:""}]);AK.init([{prop:"w",name:"w",pkg:"sync",typ:N,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);AL.init([{prop:"w",name:"w",pkg:"sync",typ:N,tag:""},{prop:"writerSem",name:"writerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerSem",name:"readerSem",pkg:"sync",typ:$Uint32,tag:""},{prop:"readerCount",name:"readerCount",pkg:"sync",typ:$Int32,tag:""},{prop:"readerWait",name:"readerWait",pkg:"sync",typ:$Int32,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}T=AN.nil;G={};U();AI();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["io"]=(function(){var $pkg={},$init,A,B,C,D,S,U,W,AX,AI,AJ,X,Y,Z;A=$packages["errors"];B=$packages["sync"];C=$pkg.Reader=$newType(8,$kindInterface,"io.Reader","Reader","io",null);D=$pkg.Writer=$newType(8,$kindInterface,"io.Writer","Writer","io",null);S=$pkg.ByteScanner=$newType(8,$kindInterface,"io.ByteScanner","ByteScanner","io",null);U=$pkg.RuneReader=$newType(8,$kindInterface,"io.RuneReader","RuneReader","io",null);W=$pkg.stringWriter=$newType(8,$kindInterface,"io.stringWriter","stringWriter","io",null);AX=$sliceType($Uint8);X=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=$ifaceNil;e=$assertType(a,W,true);f=e[0];g=e[1];if(g){$s=1;continue;}$s=2;continue;case 1:i=f.WriteString(b);$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;c=h[0];d=h[1];return[c,d];case 2:k=a.Write(new AX($stringToBytes(b)));$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;c=j[0];d=j[1];return[c,d];}return;}if($f===undefined){$f={$blk:X};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};$pkg.WriteString=X;Y=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=0;e=$ifaceNil;if(b.$length>0;$s=1;continue;case 2:if(d>=c){e=$ifaceNil;}else if(d>0&&$interfaceIsEqual(e,$pkg.EOF)){e=$pkg.ErrUnexpectedEOF;}return[d,e];}return;}if($f===undefined){$f={$blk:Y};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ReadAtLeast=Y;Z=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=$ifaceNil;f=Y(a,b,b.$length);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;c=e[0];d=e[1];return[c,d];}return;}if($f===undefined){$f={$blk:Z};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ReadFull=Z;C.init([{prop:"Read",name:"Read",pkg:"",typ:$funcType([AX],[$Int,$error],false)}]);D.init([{prop:"Write",name:"Write",pkg:"",typ:$funcType([AX],[$Int,$error],false)}]);S.init([{prop:"ReadByte",name:"ReadByte",pkg:"",typ:$funcType([],[$Uint8,$error],false)},{prop:"UnreadByte",name:"UnreadByte",pkg:"",typ:$funcType([],[$error],false)}]);U.init([{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)}]);W.init([{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrShortWrite=A.New("short write");$pkg.ErrShortBuffer=A.New("short buffer");$pkg.EOF=A.New("EOF");$pkg.ErrUnexpectedEOF=A.New("unexpected EOF");$pkg.ErrNoProgress=A.New("multiple Read calls return no data or error");AI=A.New("Seek: invalid whence");AJ=A.New("Seek: invalid offset");$pkg.ErrClosedPipe=A.New("io: read/write on closed pipe");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["unicode"]=(function(){var $pkg={},$init,O,P,Q,R,T,AF,IK,IL,IM,IN,IO,IP,IQ,AH,AI,AJ,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,EG,EH,EI,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FJ,FK,FL,FM,FN,FO,FP,FQ,FR,FS,FT,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GL,GM,GN,GO,GP,GQ,GR,HX,HY,HZ,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ,A,C,E,G,I,M,U,V,W,X,Y,AB,AC,AD,AG;O=$pkg.RangeTable=$newType(0,$kindStruct,"unicode.RangeTable","RangeTable","unicode",function(R16_,R32_,LatinOffset_){this.$val=this;if(arguments.length===0){this.R16=IL.nil;this.R32=IM.nil;this.LatinOffset=0;return;}this.R16=R16_;this.R32=R32_;this.LatinOffset=LatinOffset_;});P=$pkg.Range16=$newType(0,$kindStruct,"unicode.Range16","Range16","unicode",function(Lo_,Hi_,Stride_){this.$val=this;if(arguments.length===0){this.Lo=0;this.Hi=0;this.Stride=0;return;}this.Lo=Lo_;this.Hi=Hi_;this.Stride=Stride_;});Q=$pkg.Range32=$newType(0,$kindStruct,"unicode.Range32","Range32","unicode",function(Lo_,Hi_,Stride_){this.$val=this;if(arguments.length===0){this.Lo=0;this.Hi=0;this.Stride=0;return;}this.Lo=Lo_;this.Hi=Hi_;this.Stride=Stride_;});R=$pkg.CaseRange=$newType(0,$kindStruct,"unicode.CaseRange","CaseRange","unicode",function(Lo_,Hi_,Delta_){this.$val=this;if(arguments.length===0){this.Lo=0;this.Hi=0;this.Delta=IK.zero();return;}this.Lo=Lo_;this.Hi=Hi_;this.Delta=Delta_;});T=$pkg.d=$newType(12,$kindArray,"unicode.d","d","unicode",null);AF=$pkg.foldPair=$newType(0,$kindStruct,"unicode.foldPair","foldPair","unicode",function(From_,To_){this.$val=this;if(arguments.length===0){this.From=0;this.To=0;return;}this.From=From_;this.To=To_;});IK=$arrayType($Int32,3);IL=$sliceType(P);IM=$sliceType(Q);IN=$ptrType(O);IO=$sliceType(IN);IP=$sliceType(R);IQ=$sliceType(AF);A=function(b,c,d){var $ptr,b,c,d,e,f,g,h,i,j,k;if(b<0||3<=b){return 65533;}e=0;f=d.$length;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;i=((h<0||h>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h]);if((i.Lo>>0)<=c&&c<=(i.Hi>>0)){k=(j=i.Delta,((b<0||b>=j.length)?$throwRuntimeError("index out of range"):j[b]));if(k>1114111){return(i.Lo>>0)+((((((c-(i.Lo>>0)>>0))&~1)>>0)|((b&1)>>0)))>>0;}return c+k>>0;}if(c<(i.Lo>>0)){f=h;}else{e=h+1>>0;}}return c;};C=function(b){var $ptr,b;if(b<=255){return 48<=b&&b<=57;}return X($pkg.Digit,b);};$pkg.IsDigit=C;E=function(b){var $ptr,b,c;if((b>>>0)<=255){return!(((((c=(b<<24>>>24),((c<0||c>=HZ.length)?$throwRuntimeError("index out of range"):HZ[c]))&128)>>>0)===0));}return G(b,$pkg.PrintRanges);};$pkg.IsPrint=E;G=function(b,c){var $ptr,b,c,d,e,f;d=c;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(W(f,b)){return true;}e++;}return false;};$pkg.In=G;I=function(b){var $ptr,b,c;if((b>>>0)<=255){return!(((((c=(b<<24>>>24),((c<0||c>=HZ.length)?$throwRuntimeError("index out of range"):HZ[c]))&96)>>>0)===0));}return X($pkg.Letter,b);};$pkg.IsLetter=I;M=function(b){var $ptr,b,c;if((b>>>0)<=255){c=b;if(c===9||c===10||c===11||c===12||c===13||c===32||c===133||c===160){return true;}return false;}return X($pkg.White_Space,b);};$pkg.IsSpace=M;U=function(b,c){var $ptr,b,c,d,e,f,g,h,i,j,k,l,m,n;if(b.$length<=18||c<=255){d=b;e=0;while(true){if(!(e=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+f]);if(c>>16))%g.Stride,h===h?h:$throwRuntimeError("integer divide by zero"))===0;}e++;}return false;}i=0;j=b.$length;while(true){if(!(i>0))/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"))>>0;m=((l<0||l>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+l]);if(m.Lo<=c&&c<=m.Hi){return(n=((c-m.Lo<<16>>>16))%m.Stride,n===n?n:$throwRuntimeError("integer divide by zero"))===0;}if(c>0;}}return false;};V=function(b,c){var $ptr,b,c,d,e,f,g,h,i,j,k,l,m,n;if(b.$length<=18){d=b;e=0;while(true){if(!(e=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+f]);if(c>>0))%g.Stride,h===h?h:$throwRuntimeError("integer divide by zero"))===0;}e++;}return false;}i=0;j=b.$length;while(true){if(!(i>0))/2,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"))>>0;m=$clone(((l<0||l>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+l]),Q);if(m.Lo<=c&&c<=m.Hi){return(n=((c-m.Lo>>>0))%m.Stride,n===n?n:$throwRuntimeError("integer divide by zero"))===0;}if(c>0;}}return false;};W=function(b,c){var $ptr,b,c,d,e,f;d=b.R16;if(d.$length>0&&c<=((e=d.$length-1>>0,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])).Hi>>0)){return U(d,(c<<16>>>16));}f=b.R32;if(f.$length>0&&c>=((0>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]).Lo>>0)){return V(f,(c>>>0));}return false;};$pkg.Is=W;X=function(b,c){var $ptr,b,c,d,e,f,g;d=b.R16;e=b.LatinOffset;if(d.$length>e&&c<=((f=d.$length-1>>0,((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f])).Hi>>0)){return U($subslice(d,e),(c<<16>>>16));}g=b.R32;if(g.$length>0&&c>=((0>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]).Lo>>0)){return V(g,(c>>>0));}return false;};Y=function(b){var $ptr,b,c;if((b>>>0)<=255){return(((c=(b<<24>>>24),((c<0||c>=HZ.length)?$throwRuntimeError("index out of range"):HZ[c]))&96)>>>0)===32;}return X($pkg.Upper,b);};$pkg.IsUpper=Y;AB=function(b,c){var $ptr,b,c;return A(b,c,$pkg.CaseRanges);};$pkg.To=AB;AC=function(b){var $ptr,b;if(b<=127){if(97<=b&&b<=122){b=b-(32)>>0;}return b;}return AB(0,b);};$pkg.ToUpper=AC;AD=function(b){var $ptr,b;if(b<=127){if(65<=b&&b<=90){b=b+(32)>>0;}return b;}return AB(1,b);};$pkg.ToLower=AD;AG=function(b){var $ptr,b,c,d,e,f,g;c=0;d=IA.$length;while(true){if(!(c>0))/2,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero"))>>0;if((((f<0||f>=IA.$length)?$throwRuntimeError("index out of range"):IA.$array[IA.$offset+f]).From>>0)>0;}else{d=f;}}if(c=IA.$length)?$throwRuntimeError("index out of range"):IA.$array[IA.$offset+c]).From>>0)===b)){return(((c<0||c>=IA.$length)?$throwRuntimeError("index out of range"):IA.$array[IA.$offset+c]).To>>0);}g=AD(b);if(!((g===b))){return g;}return AC(b);};$pkg.SimpleFold=AG;O.init([{prop:"R16",name:"R16",pkg:"",typ:IL,tag:""},{prop:"R32",name:"R32",pkg:"",typ:IM,tag:""},{prop:"LatinOffset",name:"LatinOffset",pkg:"",typ:$Int,tag:""}]);P.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint16,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint16,tag:""},{prop:"Stride",name:"Stride",pkg:"",typ:$Uint16,tag:""}]);Q.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint32,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint32,tag:""},{prop:"Stride",name:"Stride",pkg:"",typ:$Uint32,tag:""}]);R.init([{prop:"Lo",name:"Lo",pkg:"",typ:$Uint32,tag:""},{prop:"Hi",name:"Hi",pkg:"",typ:$Uint32,tag:""},{prop:"Delta",name:"Delta",pkg:"",typ:T,tag:""}]);T.init($Int32,3);AF.init([{prop:"From",name:"From",pkg:"",typ:$Uint16,tag:""},{prop:"To",name:"To",pkg:"",typ:$Uint16,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:AH=new O.ptr(new IL([new P.ptr(1,31,1),new P.ptr(127,159,1),new P.ptr(173,1536,1363),new P.ptr(1537,1541,1),new P.ptr(1564,1757,193),new P.ptr(1807,6158,4351),new P.ptr(8203,8207,1),new P.ptr(8234,8238,1),new P.ptr(8288,8292,1),new P.ptr(8294,8303,1),new P.ptr(55296,63743,1),new P.ptr(65279,65529,250),new P.ptr(65530,65531,1)]),new IM([new Q.ptr(69821,113824,44003),new Q.ptr(113825,113827,1),new Q.ptr(119155,119162,1),new Q.ptr(917505,917536,31),new Q.ptr(917537,917631,1),new Q.ptr(983040,1048573,1),new Q.ptr(1048576,1114109,1)]),2);AI=new O.ptr(new IL([new P.ptr(1,31,1),new P.ptr(127,159,1)]),IM.nil,2);AJ=new O.ptr(new IL([new P.ptr(173,1536,1363),new P.ptr(1537,1541,1),new P.ptr(1564,1757,193),new P.ptr(1807,6158,4351),new P.ptr(8203,8207,1),new P.ptr(8234,8238,1),new P.ptr(8288,8292,1),new P.ptr(8294,8303,1),new P.ptr(65279,65529,250),new P.ptr(65530,65531,1)]),new IM([new Q.ptr(69821,113824,44003),new Q.ptr(113825,113827,1),new Q.ptr(119155,119162,1),new Q.ptr(917505,917536,31),new Q.ptr(917537,917631,1)]),0);AK=new O.ptr(new IL([new P.ptr(57344,63743,1)]),new IM([new Q.ptr(983040,1048573,1),new Q.ptr(1048576,1114109,1)]),0);AL=new O.ptr(new IL([new P.ptr(55296,57343,1)]),IM.nil,0);AM=new O.ptr(new IL([new P.ptr(65,90,1),new P.ptr(97,122,1),new P.ptr(170,181,11),new P.ptr(186,192,6),new P.ptr(193,214,1),new P.ptr(216,246,1),new P.ptr(248,705,1),new P.ptr(710,721,1),new P.ptr(736,740,1),new P.ptr(748,750,2),new P.ptr(880,884,1),new P.ptr(886,887,1),new P.ptr(890,893,1),new P.ptr(895,902,7),new P.ptr(904,906,1),new P.ptr(908,910,2),new P.ptr(911,929,1),new P.ptr(931,1013,1),new P.ptr(1015,1153,1),new P.ptr(1162,1327,1),new P.ptr(1329,1366,1),new P.ptr(1369,1377,8),new P.ptr(1378,1415,1),new P.ptr(1488,1514,1),new P.ptr(1520,1522,1),new P.ptr(1568,1610,1),new P.ptr(1646,1647,1),new P.ptr(1649,1747,1),new P.ptr(1749,1765,16),new P.ptr(1766,1774,8),new P.ptr(1775,1786,11),new P.ptr(1787,1788,1),new P.ptr(1791,1808,17),new P.ptr(1810,1839,1),new P.ptr(1869,1957,1),new P.ptr(1969,1994,25),new P.ptr(1995,2026,1),new P.ptr(2036,2037,1),new P.ptr(2042,2048,6),new P.ptr(2049,2069,1),new P.ptr(2074,2084,10),new P.ptr(2088,2112,24),new P.ptr(2113,2136,1),new P.ptr(2208,2228,1),new P.ptr(2308,2361,1),new P.ptr(2365,2384,19),new P.ptr(2392,2401,1),new P.ptr(2417,2432,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2486,4),new P.ptr(2487,2489,1),new P.ptr(2493,2510,17),new P.ptr(2524,2525,1),new P.ptr(2527,2529,1),new P.ptr(2544,2545,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2649,2652,1),new P.ptr(2654,2674,20),new P.ptr(2675,2676,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2749,2768,19),new P.ptr(2784,2785,1),new P.ptr(2809,2821,12),new P.ptr(2822,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2877,2908,31),new P.ptr(2909,2911,2),new P.ptr(2912,2913,1),new P.ptr(2929,2947,18),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2974,2),new P.ptr(2975,2979,4),new P.ptr(2980,2984,4),new P.ptr(2985,2986,1),new P.ptr(2990,3001,1),new P.ptr(3024,3077,53),new P.ptr(3078,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3160,27),new P.ptr(3161,3162,1),new P.ptr(3168,3169,1),new P.ptr(3205,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3261,3294,33),new P.ptr(3296,3297,1),new P.ptr(3313,3314,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3423,17),new P.ptr(3424,3425,1),new P.ptr(3450,3455,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3520,3),new P.ptr(3521,3526,1),new P.ptr(3585,3632,1),new P.ptr(3634,3635,1),new P.ptr(3648,3654,1),new P.ptr(3713,3714,1),new P.ptr(3716,3719,3),new P.ptr(3720,3722,2),new P.ptr(3725,3732,7),new P.ptr(3733,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3751,2),new P.ptr(3754,3755,1),new P.ptr(3757,3760,1),new P.ptr(3762,3763,1),new P.ptr(3773,3776,3),new P.ptr(3777,3780,1),new P.ptr(3782,3804,22),new P.ptr(3805,3807,1),new P.ptr(3840,3904,64),new P.ptr(3905,3911,1),new P.ptr(3913,3948,1),new P.ptr(3976,3980,1),new P.ptr(4096,4138,1),new P.ptr(4159,4176,17),new P.ptr(4177,4181,1),new P.ptr(4186,4189,1),new P.ptr(4193,4197,4),new P.ptr(4198,4206,8),new P.ptr(4207,4208,1),new P.ptr(4213,4225,1),new P.ptr(4238,4256,18),new P.ptr(4257,4293,1),new P.ptr(4295,4301,6),new P.ptr(4304,4346,1),new P.ptr(4348,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4698,2),new P.ptr(4699,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4802,2),new P.ptr(4803,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4992,5007,1),new P.ptr(5024,5109,1),new P.ptr(5112,5117,1),new P.ptr(5121,5740,1),new P.ptr(5743,5759,1),new P.ptr(5761,5786,1),new P.ptr(5792,5866,1),new P.ptr(5873,5880,1),new P.ptr(5888,5900,1),new P.ptr(5902,5905,1),new P.ptr(5920,5937,1),new P.ptr(5952,5969,1),new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6016,6067,1),new P.ptr(6103,6108,5),new P.ptr(6176,6263,1),new P.ptr(6272,6312,1),new P.ptr(6314,6320,6),new P.ptr(6321,6389,1),new P.ptr(6400,6430,1),new P.ptr(6480,6509,1),new P.ptr(6512,6516,1),new P.ptr(6528,6571,1),new P.ptr(6576,6601,1),new P.ptr(6656,6678,1),new P.ptr(6688,6740,1),new P.ptr(6823,6917,94),new P.ptr(6918,6963,1),new P.ptr(6981,6987,1),new P.ptr(7043,7072,1),new P.ptr(7086,7087,1),new P.ptr(7098,7141,1),new P.ptr(7168,7203,1),new P.ptr(7245,7247,1),new P.ptr(7258,7293,1),new P.ptr(7401,7404,1),new P.ptr(7406,7409,1),new P.ptr(7413,7414,1),new P.ptr(7424,7615,1),new P.ptr(7680,7957,1),new P.ptr(7960,7965,1),new P.ptr(7968,8005,1),new P.ptr(8008,8013,1),new P.ptr(8016,8023,1),new P.ptr(8025,8031,2),new P.ptr(8032,8061,1),new P.ptr(8064,8116,1),new P.ptr(8118,8124,1),new P.ptr(8126,8130,4),new P.ptr(8131,8132,1),new P.ptr(8134,8140,1),new P.ptr(8144,8147,1),new P.ptr(8150,8155,1),new P.ptr(8160,8172,1),new P.ptr(8178,8180,1),new P.ptr(8182,8188,1),new P.ptr(8305,8319,14),new P.ptr(8336,8348,1),new P.ptr(8450,8455,5),new P.ptr(8458,8467,1),new P.ptr(8469,8473,4),new P.ptr(8474,8477,1),new P.ptr(8484,8490,2),new P.ptr(8491,8493,1),new P.ptr(8495,8505,1),new P.ptr(8508,8511,1),new P.ptr(8517,8521,1),new P.ptr(8526,8579,53),new P.ptr(8580,11264,2684),new P.ptr(11265,11310,1),new P.ptr(11312,11358,1),new P.ptr(11360,11492,1),new P.ptr(11499,11502,1),new P.ptr(11506,11507,1),new P.ptr(11520,11557,1),new P.ptr(11559,11565,6),new P.ptr(11568,11623,1),new P.ptr(11631,11648,17),new P.ptr(11649,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(11823,12293,470),new P.ptr(12294,12337,43),new P.ptr(12338,12341,1),new P.ptr(12347,12348,1),new P.ptr(12353,12438,1),new P.ptr(12445,12447,1),new P.ptr(12449,12538,1),new P.ptr(12540,12543,1),new P.ptr(12549,12589,1),new P.ptr(12593,12686,1),new P.ptr(12704,12730,1),new P.ptr(12784,12799,1),new P.ptr(13312,19893,1),new P.ptr(19968,40917,1),new P.ptr(40960,42124,1),new P.ptr(42192,42237,1),new P.ptr(42240,42508,1),new P.ptr(42512,42527,1),new P.ptr(42538,42539,1),new P.ptr(42560,42606,1),new P.ptr(42623,42653,1),new P.ptr(42656,42725,1),new P.ptr(42775,42783,1),new P.ptr(42786,42888,1),new P.ptr(42891,42925,1),new P.ptr(42928,42935,1),new P.ptr(42999,43009,1),new P.ptr(43011,43013,1),new P.ptr(43015,43018,1),new P.ptr(43020,43042,1),new P.ptr(43072,43123,1),new P.ptr(43138,43187,1),new P.ptr(43250,43255,1),new P.ptr(43259,43261,2),new P.ptr(43274,43301,1),new P.ptr(43312,43334,1),new P.ptr(43360,43388,1),new P.ptr(43396,43442,1),new P.ptr(43471,43488,17),new P.ptr(43489,43492,1),new P.ptr(43494,43503,1),new P.ptr(43514,43518,1),new P.ptr(43520,43560,1),new P.ptr(43584,43586,1),new P.ptr(43588,43595,1),new P.ptr(43616,43638,1),new P.ptr(43642,43646,4),new P.ptr(43647,43695,1),new P.ptr(43697,43701,4),new P.ptr(43702,43705,3),new P.ptr(43706,43709,1),new P.ptr(43712,43714,2),new P.ptr(43739,43741,1),new P.ptr(43744,43754,1),new P.ptr(43762,43764,1),new P.ptr(43777,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1),new P.ptr(43824,43866,1),new P.ptr(43868,43877,1),new P.ptr(43888,44002,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1),new P.ptr(64256,64262,1),new P.ptr(64275,64279,1),new P.ptr(64285,64287,2),new P.ptr(64288,64296,1),new P.ptr(64298,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64320,2),new P.ptr(64321,64323,2),new P.ptr(64324,64326,2),new P.ptr(64327,64433,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65019,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1),new P.ptr(65313,65338,1),new P.ptr(65345,65370,1),new P.ptr(65382,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),new IM([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1),new Q.ptr(66176,66204,1),new Q.ptr(66208,66256,1),new Q.ptr(66304,66335,1),new Q.ptr(66352,66368,1),new Q.ptr(66370,66377,1),new Q.ptr(66384,66421,1),new Q.ptr(66432,66461,1),new Q.ptr(66464,66499,1),new Q.ptr(66504,66511,1),new Q.ptr(66560,66717,1),new Q.ptr(66816,66855,1),new Q.ptr(66864,66915,1),new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1),new Q.ptr(67584,67589,1),new Q.ptr(67592,67594,2),new Q.ptr(67595,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67647,3),new Q.ptr(67648,67669,1),new Q.ptr(67680,67702,1),new Q.ptr(67712,67742,1),new Q.ptr(67808,67826,1),new Q.ptr(67828,67829,1),new Q.ptr(67840,67861,1),new Q.ptr(67872,67897,1),new Q.ptr(67968,68023,1),new Q.ptr(68030,68031,1),new Q.ptr(68096,68112,16),new Q.ptr(68113,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68192,68220,1),new Q.ptr(68224,68252,1),new Q.ptr(68288,68295,1),new Q.ptr(68297,68324,1),new Q.ptr(68352,68405,1),new Q.ptr(68416,68437,1),new Q.ptr(68448,68466,1),new Q.ptr(68480,68497,1),new Q.ptr(68608,68680,1),new Q.ptr(68736,68786,1),new Q.ptr(68800,68850,1),new Q.ptr(69635,69687,1),new Q.ptr(69763,69807,1),new Q.ptr(69840,69864,1),new Q.ptr(69891,69926,1),new Q.ptr(69968,70002,1),new Q.ptr(70006,70019,13),new Q.ptr(70020,70066,1),new Q.ptr(70081,70084,1),new Q.ptr(70106,70108,2),new Q.ptr(70144,70161,1),new Q.ptr(70163,70187,1),new Q.ptr(70272,70278,1),new Q.ptr(70280,70282,2),new Q.ptr(70283,70285,1),new Q.ptr(70287,70301,1),new Q.ptr(70303,70312,1),new Q.ptr(70320,70366,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70461,70480,19),new Q.ptr(70493,70497,1),new Q.ptr(70784,70831,1),new Q.ptr(70852,70853,1),new Q.ptr(70855,71040,185),new Q.ptr(71041,71086,1),new Q.ptr(71128,71131,1),new Q.ptr(71168,71215,1),new Q.ptr(71236,71296,60),new Q.ptr(71297,71338,1),new Q.ptr(71424,71449,1),new Q.ptr(71840,71903,1),new Q.ptr(71935,72384,449),new Q.ptr(72385,72440,1),new Q.ptr(73728,74649,1),new Q.ptr(74880,75075,1),new Q.ptr(77824,78894,1),new Q.ptr(82944,83526,1),new Q.ptr(92160,92728,1),new Q.ptr(92736,92766,1),new Q.ptr(92880,92909,1),new Q.ptr(92928,92975,1),new Q.ptr(92992,92995,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1),new Q.ptr(93952,94020,1),new Q.ptr(94032,94099,67),new Q.ptr(94100,94111,1),new Q.ptr(110592,110593,1),new Q.ptr(113664,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(119808,119892,1),new Q.ptr(119894,119964,1),new Q.ptr(119966,119967,1),new Q.ptr(119970,119973,3),new Q.ptr(119974,119977,3),new Q.ptr(119978,119980,1),new Q.ptr(119982,119993,1),new Q.ptr(119995,119997,2),new Q.ptr(119998,120003,1),new Q.ptr(120005,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120094,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120138,4),new Q.ptr(120139,120144,1),new Q.ptr(120146,120485,1),new Q.ptr(120488,120512,1),new Q.ptr(120514,120538,1),new Q.ptr(120540,120570,1),new Q.ptr(120572,120596,1),new Q.ptr(120598,120628,1),new Q.ptr(120630,120654,1),new Q.ptr(120656,120686,1),new Q.ptr(120688,120712,1),new Q.ptr(120714,120744,1),new Q.ptr(120746,120770,1),new Q.ptr(120772,120779,1),new Q.ptr(124928,125124,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126503,3),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126523,2),new Q.ptr(126530,126535,5),new Q.ptr(126537,126541,2),new Q.ptr(126542,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126551,3),new Q.ptr(126553,126561,2),new Q.ptr(126562,126564,2),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126592,2),new Q.ptr(126593,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(178208,183969,1),new Q.ptr(194560,195101,1)]),6);AN=new O.ptr(new IL([new P.ptr(97,122,1),new P.ptr(181,223,42),new P.ptr(224,246,1),new P.ptr(248,255,1),new P.ptr(257,311,2),new P.ptr(312,328,2),new P.ptr(329,375,2),new P.ptr(378,382,2),new P.ptr(383,384,1),new P.ptr(387,389,2),new P.ptr(392,396,4),new P.ptr(397,402,5),new P.ptr(405,409,4),new P.ptr(410,411,1),new P.ptr(414,417,3),new P.ptr(419,421,2),new P.ptr(424,426,2),new P.ptr(427,429,2),new P.ptr(432,436,4),new P.ptr(438,441,3),new P.ptr(442,445,3),new P.ptr(446,447,1),new P.ptr(454,460,3),new P.ptr(462,476,2),new P.ptr(477,495,2),new P.ptr(496,499,3),new P.ptr(501,505,4),new P.ptr(507,563,2),new P.ptr(564,569,1),new P.ptr(572,575,3),new P.ptr(576,578,2),new P.ptr(583,591,2),new P.ptr(592,659,1),new P.ptr(661,687,1),new P.ptr(881,883,2),new P.ptr(887,891,4),new P.ptr(892,893,1),new P.ptr(912,940,28),new P.ptr(941,974,1),new P.ptr(976,977,1),new P.ptr(981,983,1),new P.ptr(985,1007,2),new P.ptr(1008,1011,1),new P.ptr(1013,1019,3),new P.ptr(1020,1072,52),new P.ptr(1073,1119,1),new P.ptr(1121,1153,2),new P.ptr(1163,1215,2),new P.ptr(1218,1230,2),new P.ptr(1231,1327,2),new P.ptr(1377,1415,1),new P.ptr(5112,5117,1),new P.ptr(7424,7467,1),new P.ptr(7531,7543,1),new P.ptr(7545,7578,1),new P.ptr(7681,7829,2),new P.ptr(7830,7837,1),new P.ptr(7839,7935,2),new P.ptr(7936,7943,1),new P.ptr(7952,7957,1),new P.ptr(7968,7975,1),new P.ptr(7984,7991,1),new P.ptr(8000,8005,1),new P.ptr(8016,8023,1),new P.ptr(8032,8039,1),new P.ptr(8048,8061,1),new P.ptr(8064,8071,1),new P.ptr(8080,8087,1),new P.ptr(8096,8103,1),new P.ptr(8112,8116,1),new P.ptr(8118,8119,1),new P.ptr(8126,8130,4),new P.ptr(8131,8132,1),new P.ptr(8134,8135,1),new P.ptr(8144,8147,1),new P.ptr(8150,8151,1),new P.ptr(8160,8167,1),new P.ptr(8178,8180,1),new P.ptr(8182,8183,1),new P.ptr(8458,8462,4),new P.ptr(8463,8467,4),new P.ptr(8495,8505,5),new P.ptr(8508,8509,1),new P.ptr(8518,8521,1),new P.ptr(8526,8580,54),new P.ptr(11312,11358,1),new P.ptr(11361,11365,4),new P.ptr(11366,11372,2),new P.ptr(11377,11379,2),new P.ptr(11380,11382,2),new P.ptr(11383,11387,1),new P.ptr(11393,11491,2),new P.ptr(11492,11500,8),new P.ptr(11502,11507,5),new P.ptr(11520,11557,1),new P.ptr(11559,11565,6),new P.ptr(42561,42605,2),new P.ptr(42625,42651,2),new P.ptr(42787,42799,2),new P.ptr(42800,42801,1),new P.ptr(42803,42865,2),new P.ptr(42866,42872,1),new P.ptr(42874,42876,2),new P.ptr(42879,42887,2),new P.ptr(42892,42894,2),new P.ptr(42897,42899,2),new P.ptr(42900,42901,1),new P.ptr(42903,42921,2),new P.ptr(42933,42935,2),new P.ptr(43002,43824,822),new P.ptr(43825,43866,1),new P.ptr(43872,43877,1),new P.ptr(43888,43967,1),new P.ptr(64256,64262,1),new P.ptr(64275,64279,1),new P.ptr(65345,65370,1)]),new IM([new Q.ptr(66600,66639,1),new Q.ptr(68800,68850,1),new Q.ptr(71872,71903,1),new Q.ptr(119834,119859,1),new Q.ptr(119886,119892,1),new Q.ptr(119894,119911,1),new Q.ptr(119938,119963,1),new Q.ptr(119990,119993,1),new Q.ptr(119995,119997,2),new Q.ptr(119998,120003,1),new Q.ptr(120005,120015,1),new Q.ptr(120042,120067,1),new Q.ptr(120094,120119,1),new Q.ptr(120146,120171,1),new Q.ptr(120198,120223,1),new Q.ptr(120250,120275,1),new Q.ptr(120302,120327,1),new Q.ptr(120354,120379,1),new Q.ptr(120406,120431,1),new Q.ptr(120458,120485,1),new Q.ptr(120514,120538,1),new Q.ptr(120540,120545,1),new Q.ptr(120572,120596,1),new Q.ptr(120598,120603,1),new Q.ptr(120630,120654,1),new Q.ptr(120656,120661,1),new Q.ptr(120688,120712,1),new Q.ptr(120714,120719,1),new Q.ptr(120746,120770,1),new Q.ptr(120772,120777,1),new Q.ptr(120779,120779,1)]),4);AO=new O.ptr(new IL([new P.ptr(688,705,1),new P.ptr(710,721,1),new P.ptr(736,740,1),new P.ptr(748,750,2),new P.ptr(884,890,6),new P.ptr(1369,1600,231),new P.ptr(1765,1766,1),new P.ptr(2036,2037,1),new P.ptr(2042,2074,32),new P.ptr(2084,2088,4),new P.ptr(2417,3654,1237),new P.ptr(3782,4348,566),new P.ptr(6103,6211,108),new P.ptr(6823,7288,465),new P.ptr(7289,7293,1),new P.ptr(7468,7530,1),new P.ptr(7544,7579,35),new P.ptr(7580,7615,1),new P.ptr(8305,8319,14),new P.ptr(8336,8348,1),new P.ptr(11388,11389,1),new P.ptr(11631,11823,192),new P.ptr(12293,12337,44),new P.ptr(12338,12341,1),new P.ptr(12347,12445,98),new P.ptr(12446,12540,94),new P.ptr(12541,12542,1),new P.ptr(40981,42232,1251),new P.ptr(42233,42237,1),new P.ptr(42508,42623,115),new P.ptr(42652,42653,1),new P.ptr(42775,42783,1),new P.ptr(42864,42888,24),new P.ptr(43000,43001,1),new P.ptr(43471,43494,23),new P.ptr(43632,43741,109),new P.ptr(43763,43764,1),new P.ptr(43868,43871,1),new P.ptr(65392,65438,46),new P.ptr(65439,65439,1)]),new IM([new Q.ptr(92992,92992,1),new Q.ptr(92993,92995,1),new Q.ptr(94099,94111,1)]),0);AP=new O.ptr(new IL([new P.ptr(170,186,16),new P.ptr(443,448,5),new P.ptr(449,451,1),new P.ptr(660,1488,828),new P.ptr(1489,1514,1),new P.ptr(1520,1522,1),new P.ptr(1568,1599,1),new P.ptr(1601,1610,1),new P.ptr(1646,1647,1),new P.ptr(1649,1747,1),new P.ptr(1749,1774,25),new P.ptr(1775,1786,11),new P.ptr(1787,1788,1),new P.ptr(1791,1808,17),new P.ptr(1810,1839,1),new P.ptr(1869,1957,1),new P.ptr(1969,1994,25),new P.ptr(1995,2026,1),new P.ptr(2048,2069,1),new P.ptr(2112,2136,1),new P.ptr(2208,2228,1),new P.ptr(2308,2361,1),new P.ptr(2365,2384,19),new P.ptr(2392,2401,1),new P.ptr(2418,2432,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2486,4),new P.ptr(2487,2489,1),new P.ptr(2493,2510,17),new P.ptr(2524,2525,1),new P.ptr(2527,2529,1),new P.ptr(2544,2545,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2649,2652,1),new P.ptr(2654,2674,20),new P.ptr(2675,2676,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2749,2768,19),new P.ptr(2784,2785,1),new P.ptr(2809,2821,12),new P.ptr(2822,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2877,2908,31),new P.ptr(2909,2911,2),new P.ptr(2912,2913,1),new P.ptr(2929,2947,18),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2974,2),new P.ptr(2975,2979,4),new P.ptr(2980,2984,4),new P.ptr(2985,2986,1),new P.ptr(2990,3001,1),new P.ptr(3024,3077,53),new P.ptr(3078,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3160,27),new P.ptr(3161,3162,1),new P.ptr(3168,3169,1),new P.ptr(3205,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3261,3294,33),new P.ptr(3296,3297,1),new P.ptr(3313,3314,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3423,17),new P.ptr(3424,3425,1),new P.ptr(3450,3455,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3520,3),new P.ptr(3521,3526,1),new P.ptr(3585,3632,1),new P.ptr(3634,3635,1),new P.ptr(3648,3653,1),new P.ptr(3713,3714,1),new P.ptr(3716,3719,3),new P.ptr(3720,3722,2),new P.ptr(3725,3732,7),new P.ptr(3733,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3751,2),new P.ptr(3754,3755,1),new P.ptr(3757,3760,1),new P.ptr(3762,3763,1),new P.ptr(3773,3776,3),new P.ptr(3777,3780,1),new P.ptr(3804,3807,1),new P.ptr(3840,3904,64),new P.ptr(3905,3911,1),new P.ptr(3913,3948,1),new P.ptr(3976,3980,1),new P.ptr(4096,4138,1),new P.ptr(4159,4176,17),new P.ptr(4177,4181,1),new P.ptr(4186,4189,1),new P.ptr(4193,4197,4),new P.ptr(4198,4206,8),new P.ptr(4207,4208,1),new P.ptr(4213,4225,1),new P.ptr(4238,4304,66),new P.ptr(4305,4346,1),new P.ptr(4349,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4698,2),new P.ptr(4699,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4802,2),new P.ptr(4803,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4992,5007,1),new P.ptr(5121,5740,1),new P.ptr(5743,5759,1),new P.ptr(5761,5786,1),new P.ptr(5792,5866,1),new P.ptr(5873,5880,1),new P.ptr(5888,5900,1),new P.ptr(5902,5905,1),new P.ptr(5920,5937,1),new P.ptr(5952,5969,1),new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6016,6067,1),new P.ptr(6108,6176,68),new P.ptr(6177,6210,1),new P.ptr(6212,6263,1),new P.ptr(6272,6312,1),new P.ptr(6314,6320,6),new P.ptr(6321,6389,1),new P.ptr(6400,6430,1),new P.ptr(6480,6509,1),new P.ptr(6512,6516,1),new P.ptr(6528,6571,1),new P.ptr(6576,6601,1),new P.ptr(6656,6678,1),new P.ptr(6688,6740,1),new P.ptr(6917,6963,1),new P.ptr(6981,6987,1),new P.ptr(7043,7072,1),new P.ptr(7086,7087,1),new P.ptr(7098,7141,1),new P.ptr(7168,7203,1),new P.ptr(7245,7247,1),new P.ptr(7258,7287,1),new P.ptr(7401,7404,1),new P.ptr(7406,7409,1),new P.ptr(7413,7414,1),new P.ptr(8501,8504,1),new P.ptr(11568,11623,1),new P.ptr(11648,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(12294,12348,54),new P.ptr(12353,12438,1),new P.ptr(12447,12449,2),new P.ptr(12450,12538,1),new P.ptr(12543,12549,6),new P.ptr(12550,12589,1),new P.ptr(12593,12686,1),new P.ptr(12704,12730,1),new P.ptr(12784,12799,1),new P.ptr(13312,19893,1),new P.ptr(19968,40917,1),new P.ptr(40960,40980,1),new P.ptr(40982,42124,1),new P.ptr(42192,42231,1),new P.ptr(42240,42507,1),new P.ptr(42512,42527,1),new P.ptr(42538,42539,1),new P.ptr(42606,42656,50),new P.ptr(42657,42725,1),new P.ptr(42895,42999,104),new P.ptr(43003,43009,1),new P.ptr(43011,43013,1),new P.ptr(43015,43018,1),new P.ptr(43020,43042,1),new P.ptr(43072,43123,1),new P.ptr(43138,43187,1),new P.ptr(43250,43255,1),new P.ptr(43259,43261,2),new P.ptr(43274,43301,1),new P.ptr(43312,43334,1),new P.ptr(43360,43388,1),new P.ptr(43396,43442,1),new P.ptr(43488,43492,1),new P.ptr(43495,43503,1),new P.ptr(43514,43518,1),new P.ptr(43520,43560,1),new P.ptr(43584,43586,1),new P.ptr(43588,43595,1),new P.ptr(43616,43631,1),new P.ptr(43633,43638,1),new P.ptr(43642,43646,4),new P.ptr(43647,43695,1),new P.ptr(43697,43701,4),new P.ptr(43702,43705,3),new P.ptr(43706,43709,1),new P.ptr(43712,43714,2),new P.ptr(43739,43740,1),new P.ptr(43744,43754,1),new P.ptr(43762,43777,15),new P.ptr(43778,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1),new P.ptr(43968,44002,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1),new P.ptr(64285,64287,2),new P.ptr(64288,64296,1),new P.ptr(64298,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64320,2),new P.ptr(64321,64323,2),new P.ptr(64324,64326,2),new P.ptr(64327,64433,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65019,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1),new P.ptr(65382,65391,1),new P.ptr(65393,65437,1),new P.ptr(65440,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),new IM([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1),new Q.ptr(66176,66204,1),new Q.ptr(66208,66256,1),new Q.ptr(66304,66335,1),new Q.ptr(66352,66368,1),new Q.ptr(66370,66377,1),new Q.ptr(66384,66421,1),new Q.ptr(66432,66461,1),new Q.ptr(66464,66499,1),new Q.ptr(66504,66511,1),new Q.ptr(66640,66717,1),new Q.ptr(66816,66855,1),new Q.ptr(66864,66915,1),new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1),new Q.ptr(67584,67589,1),new Q.ptr(67592,67594,2),new Q.ptr(67595,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67647,3),new Q.ptr(67648,67669,1),new Q.ptr(67680,67702,1),new Q.ptr(67712,67742,1),new Q.ptr(67808,67826,1),new Q.ptr(67828,67829,1),new Q.ptr(67840,67861,1),new Q.ptr(67872,67897,1),new Q.ptr(67968,68023,1),new Q.ptr(68030,68031,1),new Q.ptr(68096,68112,16),new Q.ptr(68113,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68192,68220,1),new Q.ptr(68224,68252,1),new Q.ptr(68288,68295,1),new Q.ptr(68297,68324,1),new Q.ptr(68352,68405,1),new Q.ptr(68416,68437,1),new Q.ptr(68448,68466,1),new Q.ptr(68480,68497,1),new Q.ptr(68608,68680,1),new Q.ptr(69635,69687,1),new Q.ptr(69763,69807,1),new Q.ptr(69840,69864,1),new Q.ptr(69891,69926,1),new Q.ptr(69968,70002,1),new Q.ptr(70006,70019,13),new Q.ptr(70020,70066,1),new Q.ptr(70081,70084,1),new Q.ptr(70106,70108,2),new Q.ptr(70144,70161,1),new Q.ptr(70163,70187,1),new Q.ptr(70272,70278,1),new Q.ptr(70280,70282,2),new Q.ptr(70283,70285,1),new Q.ptr(70287,70301,1),new Q.ptr(70303,70312,1),new Q.ptr(70320,70366,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70461,70480,19),new Q.ptr(70493,70497,1),new Q.ptr(70784,70831,1),new Q.ptr(70852,70853,1),new Q.ptr(70855,71040,185),new Q.ptr(71041,71086,1),new Q.ptr(71128,71131,1),new Q.ptr(71168,71215,1),new Q.ptr(71236,71296,60),new Q.ptr(71297,71338,1),new Q.ptr(71424,71449,1),new Q.ptr(71935,72384,449),new Q.ptr(72385,72440,1),new Q.ptr(73728,74649,1),new Q.ptr(74880,75075,1),new Q.ptr(77824,78894,1),new Q.ptr(82944,83526,1),new Q.ptr(92160,92728,1),new Q.ptr(92736,92766,1),new Q.ptr(92880,92909,1),new Q.ptr(92928,92975,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1),new Q.ptr(93952,94020,1),new Q.ptr(94032,110592,16560),new Q.ptr(110593,113664,3071),new Q.ptr(113665,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(124928,125124,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126503,3),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126523,2),new Q.ptr(126530,126535,5),new Q.ptr(126537,126541,2),new Q.ptr(126542,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126551,3),new Q.ptr(126553,126561,2),new Q.ptr(126562,126564,2),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126592,2),new Q.ptr(126593,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(178208,183969,1),new Q.ptr(194560,195101,1)]),1);AQ=new O.ptr(new IL([new P.ptr(453,459,3),new P.ptr(498,8072,7574),new P.ptr(8073,8079,1),new P.ptr(8088,8095,1),new P.ptr(8104,8111,1),new P.ptr(8124,8140,16),new P.ptr(8188,8188,1)]),IM.nil,0);AR=new O.ptr(new IL([new P.ptr(65,90,1),new P.ptr(192,214,1),new P.ptr(216,222,1),new P.ptr(256,310,2),new P.ptr(313,327,2),new P.ptr(330,376,2),new P.ptr(377,381,2),new P.ptr(385,386,1),new P.ptr(388,390,2),new P.ptr(391,393,2),new P.ptr(394,395,1),new P.ptr(398,401,1),new P.ptr(403,404,1),new P.ptr(406,408,1),new P.ptr(412,413,1),new P.ptr(415,416,1),new P.ptr(418,422,2),new P.ptr(423,425,2),new P.ptr(428,430,2),new P.ptr(431,433,2),new P.ptr(434,435,1),new P.ptr(437,439,2),new P.ptr(440,444,4),new P.ptr(452,461,3),new P.ptr(463,475,2),new P.ptr(478,494,2),new P.ptr(497,500,3),new P.ptr(502,504,1),new P.ptr(506,562,2),new P.ptr(570,571,1),new P.ptr(573,574,1),new P.ptr(577,579,2),new P.ptr(580,582,1),new P.ptr(584,590,2),new P.ptr(880,882,2),new P.ptr(886,895,9),new P.ptr(902,904,2),new P.ptr(905,906,1),new P.ptr(908,910,2),new P.ptr(911,913,2),new P.ptr(914,929,1),new P.ptr(931,939,1),new P.ptr(975,978,3),new P.ptr(979,980,1),new P.ptr(984,1006,2),new P.ptr(1012,1015,3),new P.ptr(1017,1018,1),new P.ptr(1021,1071,1),new P.ptr(1120,1152,2),new P.ptr(1162,1216,2),new P.ptr(1217,1229,2),new P.ptr(1232,1326,2),new P.ptr(1329,1366,1),new P.ptr(4256,4293,1),new P.ptr(4295,4301,6),new P.ptr(5024,5109,1),new P.ptr(7680,7828,2),new P.ptr(7838,7934,2),new P.ptr(7944,7951,1),new P.ptr(7960,7965,1),new P.ptr(7976,7983,1),new P.ptr(7992,7999,1),new P.ptr(8008,8013,1),new P.ptr(8025,8031,2),new P.ptr(8040,8047,1),new P.ptr(8120,8123,1),new P.ptr(8136,8139,1),new P.ptr(8152,8155,1),new P.ptr(8168,8172,1),new P.ptr(8184,8187,1),new P.ptr(8450,8455,5),new P.ptr(8459,8461,1),new P.ptr(8464,8466,1),new P.ptr(8469,8473,4),new P.ptr(8474,8477,1),new P.ptr(8484,8490,2),new P.ptr(8491,8493,1),new P.ptr(8496,8499,1),new P.ptr(8510,8511,1),new P.ptr(8517,8579,62),new P.ptr(11264,11310,1),new P.ptr(11360,11362,2),new P.ptr(11363,11364,1),new P.ptr(11367,11373,2),new P.ptr(11374,11376,1),new P.ptr(11378,11381,3),new P.ptr(11390,11392,1),new P.ptr(11394,11490,2),new P.ptr(11499,11501,2),new P.ptr(11506,42560,31054),new P.ptr(42562,42604,2),new P.ptr(42624,42650,2),new P.ptr(42786,42798,2),new P.ptr(42802,42862,2),new P.ptr(42873,42877,2),new P.ptr(42878,42886,2),new P.ptr(42891,42893,2),new P.ptr(42896,42898,2),new P.ptr(42902,42922,2),new P.ptr(42923,42925,1),new P.ptr(42928,42932,1),new P.ptr(42934,65313,22379),new P.ptr(65314,65338,1)]),new IM([new Q.ptr(66560,66599,1),new Q.ptr(68736,68786,1),new Q.ptr(71840,71871,1),new Q.ptr(119808,119833,1),new Q.ptr(119860,119885,1),new Q.ptr(119912,119937,1),new Q.ptr(119964,119966,2),new Q.ptr(119967,119973,3),new Q.ptr(119974,119977,3),new Q.ptr(119978,119980,1),new Q.ptr(119982,119989,1),new Q.ptr(120016,120041,1),new Q.ptr(120068,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120120,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120138,4),new Q.ptr(120139,120144,1),new Q.ptr(120172,120197,1),new Q.ptr(120224,120249,1),new Q.ptr(120276,120301,1),new Q.ptr(120328,120353,1),new Q.ptr(120380,120405,1),new Q.ptr(120432,120457,1),new Q.ptr(120488,120512,1),new Q.ptr(120546,120570,1),new Q.ptr(120604,120628,1),new Q.ptr(120662,120686,1),new Q.ptr(120720,120744,1),new Q.ptr(120778,120778,1)]),3);AS=new O.ptr(new IL([new P.ptr(768,879,1),new P.ptr(1155,1161,1),new P.ptr(1425,1469,1),new P.ptr(1471,1473,2),new P.ptr(1474,1476,2),new P.ptr(1477,1479,2),new P.ptr(1552,1562,1),new P.ptr(1611,1631,1),new P.ptr(1648,1750,102),new P.ptr(1751,1756,1),new P.ptr(1759,1764,1),new P.ptr(1767,1768,1),new P.ptr(1770,1773,1),new P.ptr(1809,1840,31),new P.ptr(1841,1866,1),new P.ptr(1958,1968,1),new P.ptr(2027,2035,1),new P.ptr(2070,2073,1),new P.ptr(2075,2083,1),new P.ptr(2085,2087,1),new P.ptr(2089,2093,1),new P.ptr(2137,2139,1),new P.ptr(2275,2307,1),new P.ptr(2362,2364,1),new P.ptr(2366,2383,1),new P.ptr(2385,2391,1),new P.ptr(2402,2403,1),new P.ptr(2433,2435,1),new P.ptr(2492,2494,2),new P.ptr(2495,2500,1),new P.ptr(2503,2504,1),new P.ptr(2507,2509,1),new P.ptr(2519,2530,11),new P.ptr(2531,2561,30),new P.ptr(2562,2563,1),new P.ptr(2620,2622,2),new P.ptr(2623,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2672,31),new P.ptr(2673,2677,4),new P.ptr(2689,2691,1),new P.ptr(2748,2750,2),new P.ptr(2751,2757,1),new P.ptr(2759,2761,1),new P.ptr(2763,2765,1),new P.ptr(2786,2787,1),new P.ptr(2817,2819,1),new P.ptr(2876,2878,2),new P.ptr(2879,2884,1),new P.ptr(2887,2888,1),new P.ptr(2891,2893,1),new P.ptr(2902,2903,1),new P.ptr(2914,2915,1),new P.ptr(2946,3006,60),new P.ptr(3007,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3021,1),new P.ptr(3031,3072,41),new P.ptr(3073,3075,1),new P.ptr(3134,3140,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3170,3171,1),new P.ptr(3201,3203,1),new P.ptr(3260,3262,2),new P.ptr(3263,3268,1),new P.ptr(3270,3272,1),new P.ptr(3274,3277,1),new P.ptr(3285,3286,1),new P.ptr(3298,3299,1),new P.ptr(3329,3331,1),new P.ptr(3390,3396,1),new P.ptr(3398,3400,1),new P.ptr(3402,3405,1),new P.ptr(3415,3426,11),new P.ptr(3427,3458,31),new P.ptr(3459,3530,71),new P.ptr(3535,3540,1),new P.ptr(3542,3544,2),new P.ptr(3545,3551,1),new P.ptr(3570,3571,1),new P.ptr(3633,3636,3),new P.ptr(3637,3642,1),new P.ptr(3655,3662,1),new P.ptr(3761,3764,3),new P.ptr(3765,3769,1),new P.ptr(3771,3772,1),new P.ptr(3784,3789,1),new P.ptr(3864,3865,1),new P.ptr(3893,3897,2),new P.ptr(3902,3903,1),new P.ptr(3953,3972,1),new P.ptr(3974,3975,1),new P.ptr(3981,3991,1),new P.ptr(3993,4028,1),new P.ptr(4038,4139,101),new P.ptr(4140,4158,1),new P.ptr(4182,4185,1),new P.ptr(4190,4192,1),new P.ptr(4194,4196,1),new P.ptr(4199,4205,1),new P.ptr(4209,4212,1),new P.ptr(4226,4237,1),new P.ptr(4239,4250,11),new P.ptr(4251,4253,1),new P.ptr(4957,4959,1),new P.ptr(5906,5908,1),new P.ptr(5938,5940,1),new P.ptr(5970,5971,1),new P.ptr(6002,6003,1),new P.ptr(6068,6099,1),new P.ptr(6109,6155,46),new P.ptr(6156,6157,1),new P.ptr(6313,6432,119),new P.ptr(6433,6443,1),new P.ptr(6448,6459,1),new P.ptr(6679,6683,1),new P.ptr(6741,6750,1),new P.ptr(6752,6780,1),new P.ptr(6783,6832,49),new P.ptr(6833,6846,1),new P.ptr(6912,6916,1),new P.ptr(6964,6980,1),new P.ptr(7019,7027,1),new P.ptr(7040,7042,1),new P.ptr(7073,7085,1),new P.ptr(7142,7155,1),new P.ptr(7204,7223,1),new P.ptr(7376,7378,1),new P.ptr(7380,7400,1),new P.ptr(7405,7410,5),new P.ptr(7411,7412,1),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8400,8432,1),new P.ptr(11503,11505,1),new P.ptr(11647,11744,97),new P.ptr(11745,11775,1),new P.ptr(12330,12335,1),new P.ptr(12441,12442,1),new P.ptr(42607,42610,1),new P.ptr(42612,42621,1),new P.ptr(42654,42655,1),new P.ptr(42736,42737,1),new P.ptr(43010,43014,4),new P.ptr(43019,43043,24),new P.ptr(43044,43047,1),new P.ptr(43136,43137,1),new P.ptr(43188,43204,1),new P.ptr(43232,43249,1),new P.ptr(43302,43309,1),new P.ptr(43335,43347,1),new P.ptr(43392,43395,1),new P.ptr(43443,43456,1),new P.ptr(43493,43561,68),new P.ptr(43562,43574,1),new P.ptr(43587,43596,9),new P.ptr(43597,43643,46),new P.ptr(43644,43645,1),new P.ptr(43696,43698,2),new P.ptr(43699,43700,1),new P.ptr(43703,43704,1),new P.ptr(43710,43711,1),new P.ptr(43713,43755,42),new P.ptr(43756,43759,1),new P.ptr(43765,43766,1),new P.ptr(44003,44010,1),new P.ptr(44012,44013,1),new P.ptr(64286,65024,738),new P.ptr(65025,65039,1),new P.ptr(65056,65071,1)]),new IM([new Q.ptr(66045,66272,227),new Q.ptr(66422,66426,1),new Q.ptr(68097,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68111,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68325,166),new Q.ptr(68326,69632,1306),new Q.ptr(69633,69634,1),new Q.ptr(69688,69702,1),new Q.ptr(69759,69762,1),new Q.ptr(69808,69818,1),new Q.ptr(69888,69890,1),new Q.ptr(69927,69940,1),new Q.ptr(70003,70016,13),new Q.ptr(70017,70018,1),new Q.ptr(70067,70080,1),new Q.ptr(70090,70092,1),new Q.ptr(70188,70199,1),new Q.ptr(70367,70378,1),new Q.ptr(70400,70403,1),new Q.ptr(70460,70462,2),new Q.ptr(70463,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70487,70498,11),new Q.ptr(70499,70502,3),new Q.ptr(70503,70508,1),new Q.ptr(70512,70516,1),new Q.ptr(70832,70851,1),new Q.ptr(71087,71093,1),new Q.ptr(71096,71104,1),new Q.ptr(71132,71133,1),new Q.ptr(71216,71232,1),new Q.ptr(71339,71351,1),new Q.ptr(71453,71467,1),new Q.ptr(92912,92916,1),new Q.ptr(92976,92982,1),new Q.ptr(94033,94078,1),new Q.ptr(94095,94098,1),new Q.ptr(113821,113822,1),new Q.ptr(119141,119145,1),new Q.ptr(119149,119154,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(119362,119364,1),new Q.ptr(121344,121398,1),new Q.ptr(121403,121452,1),new Q.ptr(121461,121476,15),new Q.ptr(121499,121503,1),new Q.ptr(121505,121519,1),new Q.ptr(125136,125142,1),new Q.ptr(917760,917999,1)]),0);AT=new O.ptr(new IL([new P.ptr(2307,2363,56),new P.ptr(2366,2368,1),new P.ptr(2377,2380,1),new P.ptr(2382,2383,1),new P.ptr(2434,2435,1),new P.ptr(2494,2496,1),new P.ptr(2503,2504,1),new P.ptr(2507,2508,1),new P.ptr(2519,2563,44),new P.ptr(2622,2624,1),new P.ptr(2691,2750,59),new P.ptr(2751,2752,1),new P.ptr(2761,2763,2),new P.ptr(2764,2818,54),new P.ptr(2819,2878,59),new P.ptr(2880,2887,7),new P.ptr(2888,2891,3),new P.ptr(2892,2903,11),new P.ptr(3006,3007,1),new P.ptr(3009,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3020,1),new P.ptr(3031,3073,42),new P.ptr(3074,3075,1),new P.ptr(3137,3140,1),new P.ptr(3202,3203,1),new P.ptr(3262,3264,2),new P.ptr(3265,3268,1),new P.ptr(3271,3272,1),new P.ptr(3274,3275,1),new P.ptr(3285,3286,1),new P.ptr(3330,3331,1),new P.ptr(3390,3392,1),new P.ptr(3398,3400,1),new P.ptr(3402,3404,1),new P.ptr(3415,3458,43),new P.ptr(3459,3535,76),new P.ptr(3536,3537,1),new P.ptr(3544,3551,1),new P.ptr(3570,3571,1),new P.ptr(3902,3903,1),new P.ptr(3967,4139,172),new P.ptr(4140,4145,5),new P.ptr(4152,4155,3),new P.ptr(4156,4182,26),new P.ptr(4183,4194,11),new P.ptr(4195,4196,1),new P.ptr(4199,4205,1),new P.ptr(4227,4228,1),new P.ptr(4231,4236,1),new P.ptr(4239,4250,11),new P.ptr(4251,4252,1),new P.ptr(6070,6078,8),new P.ptr(6079,6085,1),new P.ptr(6087,6088,1),new P.ptr(6435,6438,1),new P.ptr(6441,6443,1),new P.ptr(6448,6449,1),new P.ptr(6451,6456,1),new P.ptr(6681,6682,1),new P.ptr(6741,6743,2),new P.ptr(6753,6755,2),new P.ptr(6756,6765,9),new P.ptr(6766,6770,1),new P.ptr(6916,6965,49),new P.ptr(6971,6973,2),new P.ptr(6974,6977,1),new P.ptr(6979,6980,1),new P.ptr(7042,7073,31),new P.ptr(7078,7079,1),new P.ptr(7082,7143,61),new P.ptr(7146,7148,1),new P.ptr(7150,7154,4),new P.ptr(7155,7204,49),new P.ptr(7205,7211,1),new P.ptr(7220,7221,1),new P.ptr(7393,7410,17),new P.ptr(7411,12334,4923),new P.ptr(12335,43043,30708),new P.ptr(43044,43047,3),new P.ptr(43136,43137,1),new P.ptr(43188,43203,1),new P.ptr(43346,43347,1),new P.ptr(43395,43444,49),new P.ptr(43445,43450,5),new P.ptr(43451,43453,2),new P.ptr(43454,43456,1),new P.ptr(43567,43568,1),new P.ptr(43571,43572,1),new P.ptr(43597,43643,46),new P.ptr(43645,43755,110),new P.ptr(43758,43759,1),new P.ptr(43765,44003,238),new P.ptr(44004,44006,2),new P.ptr(44007,44009,2),new P.ptr(44010,44012,2)]),new IM([new Q.ptr(69632,69634,2),new Q.ptr(69762,69808,46),new Q.ptr(69809,69810,1),new Q.ptr(69815,69816,1),new Q.ptr(69932,70018,86),new Q.ptr(70067,70069,1),new Q.ptr(70079,70080,1),new Q.ptr(70188,70190,1),new Q.ptr(70194,70195,1),new Q.ptr(70197,70368,171),new Q.ptr(70369,70370,1),new Q.ptr(70402,70403,1),new Q.ptr(70462,70463,1),new Q.ptr(70465,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70487,70498,11),new Q.ptr(70499,70832,333),new Q.ptr(70833,70834,1),new Q.ptr(70841,70843,2),new Q.ptr(70844,70846,1),new Q.ptr(70849,71087,238),new Q.ptr(71088,71089,1),new Q.ptr(71096,71099,1),new Q.ptr(71102,71216,114),new Q.ptr(71217,71218,1),new Q.ptr(71227,71228,1),new Q.ptr(71230,71340,110),new Q.ptr(71342,71343,1),new Q.ptr(71350,71456,106),new Q.ptr(71457,71462,5),new Q.ptr(94033,94078,1),new Q.ptr(119141,119142,1),new Q.ptr(119149,119154,1)]),0);AU=new O.ptr(new IL([new P.ptr(1160,1161,1),new P.ptr(6846,8413,1567),new P.ptr(8414,8416,1),new P.ptr(8418,8420,1),new P.ptr(42608,42610,1)]),IM.nil,0);AV=new O.ptr(new IL([new P.ptr(768,879,1),new P.ptr(1155,1159,1),new P.ptr(1425,1469,1),new P.ptr(1471,1473,2),new P.ptr(1474,1476,2),new P.ptr(1477,1479,2),new P.ptr(1552,1562,1),new P.ptr(1611,1631,1),new P.ptr(1648,1750,102),new P.ptr(1751,1756,1),new P.ptr(1759,1764,1),new P.ptr(1767,1768,1),new P.ptr(1770,1773,1),new P.ptr(1809,1840,31),new P.ptr(1841,1866,1),new P.ptr(1958,1968,1),new P.ptr(2027,2035,1),new P.ptr(2070,2073,1),new P.ptr(2075,2083,1),new P.ptr(2085,2087,1),new P.ptr(2089,2093,1),new P.ptr(2137,2139,1),new P.ptr(2275,2306,1),new P.ptr(2362,2364,2),new P.ptr(2369,2376,1),new P.ptr(2381,2385,4),new P.ptr(2386,2391,1),new P.ptr(2402,2403,1),new P.ptr(2433,2492,59),new P.ptr(2497,2500,1),new P.ptr(2509,2530,21),new P.ptr(2531,2561,30),new P.ptr(2562,2620,58),new P.ptr(2625,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2672,31),new P.ptr(2673,2677,4),new P.ptr(2689,2690,1),new P.ptr(2748,2753,5),new P.ptr(2754,2757,1),new P.ptr(2759,2760,1),new P.ptr(2765,2786,21),new P.ptr(2787,2817,30),new P.ptr(2876,2879,3),new P.ptr(2881,2884,1),new P.ptr(2893,2902,9),new P.ptr(2914,2915,1),new P.ptr(2946,3008,62),new P.ptr(3021,3072,51),new P.ptr(3134,3136,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3170,3171,1),new P.ptr(3201,3260,59),new P.ptr(3263,3270,7),new P.ptr(3276,3277,1),new P.ptr(3298,3299,1),new P.ptr(3329,3393,64),new P.ptr(3394,3396,1),new P.ptr(3405,3426,21),new P.ptr(3427,3530,103),new P.ptr(3538,3540,1),new P.ptr(3542,3633,91),new P.ptr(3636,3642,1),new P.ptr(3655,3662,1),new P.ptr(3761,3764,3),new P.ptr(3765,3769,1),new P.ptr(3771,3772,1),new P.ptr(3784,3789,1),new P.ptr(3864,3865,1),new P.ptr(3893,3897,2),new P.ptr(3953,3966,1),new P.ptr(3968,3972,1),new P.ptr(3974,3975,1),new P.ptr(3981,3991,1),new P.ptr(3993,4028,1),new P.ptr(4038,4141,103),new P.ptr(4142,4144,1),new P.ptr(4146,4151,1),new P.ptr(4153,4154,1),new P.ptr(4157,4158,1),new P.ptr(4184,4185,1),new P.ptr(4190,4192,1),new P.ptr(4209,4212,1),new P.ptr(4226,4229,3),new P.ptr(4230,4237,7),new P.ptr(4253,4957,704),new P.ptr(4958,4959,1),new P.ptr(5906,5908,1),new P.ptr(5938,5940,1),new P.ptr(5970,5971,1),new P.ptr(6002,6003,1),new P.ptr(6068,6069,1),new P.ptr(6071,6077,1),new P.ptr(6086,6089,3),new P.ptr(6090,6099,1),new P.ptr(6109,6155,46),new P.ptr(6156,6157,1),new P.ptr(6313,6432,119),new P.ptr(6433,6434,1),new P.ptr(6439,6440,1),new P.ptr(6450,6457,7),new P.ptr(6458,6459,1),new P.ptr(6679,6680,1),new P.ptr(6683,6742,59),new P.ptr(6744,6750,1),new P.ptr(6752,6754,2),new P.ptr(6757,6764,1),new P.ptr(6771,6780,1),new P.ptr(6783,6832,49),new P.ptr(6833,6845,1),new P.ptr(6912,6915,1),new P.ptr(6964,6966,2),new P.ptr(6967,6970,1),new P.ptr(6972,6978,6),new P.ptr(7019,7027,1),new P.ptr(7040,7041,1),new P.ptr(7074,7077,1),new P.ptr(7080,7081,1),new P.ptr(7083,7085,1),new P.ptr(7142,7144,2),new P.ptr(7145,7149,4),new P.ptr(7151,7153,1),new P.ptr(7212,7219,1),new P.ptr(7222,7223,1),new P.ptr(7376,7378,1),new P.ptr(7380,7392,1),new P.ptr(7394,7400,1),new P.ptr(7405,7412,7),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8400,8412,1),new P.ptr(8417,8421,4),new P.ptr(8422,8432,1),new P.ptr(11503,11505,1),new P.ptr(11647,11744,97),new P.ptr(11745,11775,1),new P.ptr(12330,12333,1),new P.ptr(12441,12442,1),new P.ptr(42607,42612,5),new P.ptr(42613,42621,1),new P.ptr(42654,42655,1),new P.ptr(42736,42737,1),new P.ptr(43010,43014,4),new P.ptr(43019,43045,26),new P.ptr(43046,43204,158),new P.ptr(43232,43249,1),new P.ptr(43302,43309,1),new P.ptr(43335,43345,1),new P.ptr(43392,43394,1),new P.ptr(43443,43446,3),new P.ptr(43447,43449,1),new P.ptr(43452,43493,41),new P.ptr(43561,43566,1),new P.ptr(43569,43570,1),new P.ptr(43573,43574,1),new P.ptr(43587,43596,9),new P.ptr(43644,43696,52),new P.ptr(43698,43700,1),new P.ptr(43703,43704,1),new P.ptr(43710,43711,1),new P.ptr(43713,43756,43),new P.ptr(43757,43766,9),new P.ptr(44005,44008,3),new P.ptr(44013,64286,20273),new P.ptr(65024,65039,1),new P.ptr(65056,65071,1)]),new IM([new Q.ptr(66045,66272,227),new Q.ptr(66422,66426,1),new Q.ptr(68097,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68111,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68325,166),new Q.ptr(68326,69633,1307),new Q.ptr(69688,69702,1),new Q.ptr(69759,69761,1),new Q.ptr(69811,69814,1),new Q.ptr(69817,69818,1),new Q.ptr(69888,69890,1),new Q.ptr(69927,69931,1),new Q.ptr(69933,69940,1),new Q.ptr(70003,70016,13),new Q.ptr(70017,70070,53),new Q.ptr(70071,70078,1),new Q.ptr(70090,70092,1),new Q.ptr(70191,70193,1),new Q.ptr(70196,70198,2),new Q.ptr(70199,70367,168),new Q.ptr(70371,70378,1),new Q.ptr(70400,70401,1),new Q.ptr(70460,70464,4),new Q.ptr(70502,70508,1),new Q.ptr(70512,70516,1),new Q.ptr(70835,70840,1),new Q.ptr(70842,70847,5),new Q.ptr(70848,70850,2),new Q.ptr(70851,71090,239),new Q.ptr(71091,71093,1),new Q.ptr(71100,71101,1),new Q.ptr(71103,71104,1),new Q.ptr(71132,71133,1),new Q.ptr(71219,71226,1),new Q.ptr(71229,71231,2),new Q.ptr(71232,71339,107),new Q.ptr(71341,71344,3),new Q.ptr(71345,71349,1),new Q.ptr(71351,71453,102),new Q.ptr(71454,71455,1),new Q.ptr(71458,71461,1),new Q.ptr(71463,71467,1),new Q.ptr(92912,92916,1),new Q.ptr(92976,92982,1),new Q.ptr(94095,94098,1),new Q.ptr(113821,113822,1),new Q.ptr(119143,119145,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(119362,119364,1),new Q.ptr(121344,121398,1),new Q.ptr(121403,121452,1),new Q.ptr(121461,121476,15),new Q.ptr(121499,121503,1),new Q.ptr(121505,121519,1),new Q.ptr(125136,125142,1),new Q.ptr(917760,917999,1)]),0);AW=new O.ptr(new IL([new P.ptr(48,57,1),new P.ptr(178,179,1),new P.ptr(185,188,3),new P.ptr(189,190,1),new P.ptr(1632,1641,1),new P.ptr(1776,1785,1),new P.ptr(1984,1993,1),new P.ptr(2406,2415,1),new P.ptr(2534,2543,1),new P.ptr(2548,2553,1),new P.ptr(2662,2671,1),new P.ptr(2790,2799,1),new P.ptr(2918,2927,1),new P.ptr(2930,2935,1),new P.ptr(3046,3058,1),new P.ptr(3174,3183,1),new P.ptr(3192,3198,1),new P.ptr(3302,3311,1),new P.ptr(3430,3445,1),new P.ptr(3558,3567,1),new P.ptr(3664,3673,1),new P.ptr(3792,3801,1),new P.ptr(3872,3891,1),new P.ptr(4160,4169,1),new P.ptr(4240,4249,1),new P.ptr(4969,4988,1),new P.ptr(5870,5872,1),new P.ptr(6112,6121,1),new P.ptr(6128,6137,1),new P.ptr(6160,6169,1),new P.ptr(6470,6479,1),new P.ptr(6608,6618,1),new P.ptr(6784,6793,1),new P.ptr(6800,6809,1),new P.ptr(6992,7001,1),new P.ptr(7088,7097,1),new P.ptr(7232,7241,1),new P.ptr(7248,7257,1),new P.ptr(8304,8308,4),new P.ptr(8309,8313,1),new P.ptr(8320,8329,1),new P.ptr(8528,8578,1),new P.ptr(8581,8585,1),new P.ptr(9312,9371,1),new P.ptr(9450,9471,1),new P.ptr(10102,10131,1),new P.ptr(11517,12295,778),new P.ptr(12321,12329,1),new P.ptr(12344,12346,1),new P.ptr(12690,12693,1),new P.ptr(12832,12841,1),new P.ptr(12872,12879,1),new P.ptr(12881,12895,1),new P.ptr(12928,12937,1),new P.ptr(12977,12991,1),new P.ptr(42528,42537,1),new P.ptr(42726,42735,1),new P.ptr(43056,43061,1),new P.ptr(43216,43225,1),new P.ptr(43264,43273,1),new P.ptr(43472,43481,1),new P.ptr(43504,43513,1),new P.ptr(43600,43609,1),new P.ptr(44016,44025,1),new P.ptr(65296,65305,1)]),new IM([new Q.ptr(65799,65843,1),new Q.ptr(65856,65912,1),new Q.ptr(65930,65931,1),new Q.ptr(66273,66299,1),new Q.ptr(66336,66339,1),new Q.ptr(66369,66378,9),new Q.ptr(66513,66517,1),new Q.ptr(66720,66729,1),new Q.ptr(67672,67679,1),new Q.ptr(67705,67711,1),new Q.ptr(67751,67759,1),new Q.ptr(67835,67839,1),new Q.ptr(67862,67867,1),new Q.ptr(68028,68029,1),new Q.ptr(68032,68047,1),new Q.ptr(68050,68095,1),new Q.ptr(68160,68167,1),new Q.ptr(68221,68222,1),new Q.ptr(68253,68255,1),new Q.ptr(68331,68335,1),new Q.ptr(68440,68447,1),new Q.ptr(68472,68479,1),new Q.ptr(68521,68527,1),new Q.ptr(68858,68863,1),new Q.ptr(69216,69246,1),new Q.ptr(69714,69743,1),new Q.ptr(69872,69881,1),new Q.ptr(69942,69951,1),new Q.ptr(70096,70105,1),new Q.ptr(70113,70132,1),new Q.ptr(70384,70393,1),new Q.ptr(70864,70873,1),new Q.ptr(71248,71257,1),new Q.ptr(71360,71369,1),new Q.ptr(71472,71483,1),new Q.ptr(71904,71922,1),new Q.ptr(74752,74862,1),new Q.ptr(92768,92777,1),new Q.ptr(93008,93017,1),new Q.ptr(93019,93025,1),new Q.ptr(119648,119665,1),new Q.ptr(120782,120831,1),new Q.ptr(125127,125135,1),new Q.ptr(127232,127244,1)]),4);AX=new O.ptr(new IL([new P.ptr(48,57,1),new P.ptr(1632,1641,1),new P.ptr(1776,1785,1),new P.ptr(1984,1993,1),new P.ptr(2406,2415,1),new P.ptr(2534,2543,1),new P.ptr(2662,2671,1),new P.ptr(2790,2799,1),new P.ptr(2918,2927,1),new P.ptr(3046,3055,1),new P.ptr(3174,3183,1),new P.ptr(3302,3311,1),new P.ptr(3430,3439,1),new P.ptr(3558,3567,1),new P.ptr(3664,3673,1),new P.ptr(3792,3801,1),new P.ptr(3872,3881,1),new P.ptr(4160,4169,1),new P.ptr(4240,4249,1),new P.ptr(6112,6121,1),new P.ptr(6160,6169,1),new P.ptr(6470,6479,1),new P.ptr(6608,6617,1),new P.ptr(6784,6793,1),new P.ptr(6800,6809,1),new P.ptr(6992,7001,1),new P.ptr(7088,7097,1),new P.ptr(7232,7241,1),new P.ptr(7248,7257,1),new P.ptr(42528,42537,1),new P.ptr(43216,43225,1),new P.ptr(43264,43273,1),new P.ptr(43472,43481,1),new P.ptr(43504,43513,1),new P.ptr(43600,43609,1),new P.ptr(44016,44025,1),new P.ptr(65296,65305,1)]),new IM([new Q.ptr(66720,66729,1),new Q.ptr(69734,69743,1),new Q.ptr(69872,69881,1),new Q.ptr(69942,69951,1),new Q.ptr(70096,70105,1),new Q.ptr(70384,70393,1),new Q.ptr(70864,70873,1),new Q.ptr(71248,71257,1),new Q.ptr(71360,71369,1),new Q.ptr(71472,71481,1),new Q.ptr(71904,71913,1),new Q.ptr(92768,92777,1),new Q.ptr(93008,93017,1),new Q.ptr(120782,120831,1)]),1);AY=new O.ptr(new IL([new P.ptr(5870,5872,1),new P.ptr(8544,8578,1),new P.ptr(8581,8584,1),new P.ptr(12295,12321,26),new P.ptr(12322,12329,1),new P.ptr(12344,12346,1),new P.ptr(42726,42735,1)]),new IM([new Q.ptr(65856,65908,1),new Q.ptr(66369,66378,9),new Q.ptr(66513,66517,1),new Q.ptr(74752,74862,1)]),0);AZ=new O.ptr(new IL([new P.ptr(178,179,1),new P.ptr(185,188,3),new P.ptr(189,190,1),new P.ptr(2548,2553,1),new P.ptr(2930,2935,1),new P.ptr(3056,3058,1),new P.ptr(3192,3198,1),new P.ptr(3440,3445,1),new P.ptr(3882,3891,1),new P.ptr(4969,4988,1),new P.ptr(6128,6137,1),new P.ptr(6618,8304,1686),new P.ptr(8308,8313,1),new P.ptr(8320,8329,1),new P.ptr(8528,8543,1),new P.ptr(8585,9312,727),new P.ptr(9313,9371,1),new P.ptr(9450,9471,1),new P.ptr(10102,10131,1),new P.ptr(11517,12690,1173),new P.ptr(12691,12693,1),new P.ptr(12832,12841,1),new P.ptr(12872,12879,1),new P.ptr(12881,12895,1),new P.ptr(12928,12937,1),new P.ptr(12977,12991,1),new P.ptr(43056,43061,1)]),new IM([new Q.ptr(65799,65843,1),new Q.ptr(65909,65912,1),new Q.ptr(65930,65931,1),new Q.ptr(66273,66299,1),new Q.ptr(66336,66339,1),new Q.ptr(67672,67679,1),new Q.ptr(67705,67711,1),new Q.ptr(67751,67759,1),new Q.ptr(67835,67839,1),new Q.ptr(67862,67867,1),new Q.ptr(68028,68029,1),new Q.ptr(68032,68047,1),new Q.ptr(68050,68095,1),new Q.ptr(68160,68167,1),new Q.ptr(68221,68222,1),new Q.ptr(68253,68255,1),new Q.ptr(68331,68335,1),new Q.ptr(68440,68447,1),new Q.ptr(68472,68479,1),new Q.ptr(68521,68527,1),new Q.ptr(68858,68863,1),new Q.ptr(69216,69246,1),new Q.ptr(69714,69733,1),new Q.ptr(70113,70132,1),new Q.ptr(71482,71483,1),new Q.ptr(71914,71922,1),new Q.ptr(93019,93025,1),new Q.ptr(119648,119665,1),new Q.ptr(125127,125135,1),new Q.ptr(127232,127244,1)]),3);BA=new O.ptr(new IL([new P.ptr(33,35,1),new P.ptr(37,42,1),new P.ptr(44,47,1),new P.ptr(58,59,1),new P.ptr(63,64,1),new P.ptr(91,93,1),new P.ptr(95,123,28),new P.ptr(125,161,36),new P.ptr(167,171,4),new P.ptr(182,183,1),new P.ptr(187,191,4),new P.ptr(894,903,9),new P.ptr(1370,1375,1),new P.ptr(1417,1418,1),new P.ptr(1470,1472,2),new P.ptr(1475,1478,3),new P.ptr(1523,1524,1),new P.ptr(1545,1546,1),new P.ptr(1548,1549,1),new P.ptr(1563,1566,3),new P.ptr(1567,1642,75),new P.ptr(1643,1645,1),new P.ptr(1748,1792,44),new P.ptr(1793,1805,1),new P.ptr(2039,2041,1),new P.ptr(2096,2110,1),new P.ptr(2142,2404,262),new P.ptr(2405,2416,11),new P.ptr(2800,3572,772),new P.ptr(3663,3674,11),new P.ptr(3675,3844,169),new P.ptr(3845,3858,1),new P.ptr(3860,3898,38),new P.ptr(3899,3901,1),new P.ptr(3973,4048,75),new P.ptr(4049,4052,1),new P.ptr(4057,4058,1),new P.ptr(4170,4175,1),new P.ptr(4347,4960,613),new P.ptr(4961,4968,1),new P.ptr(5120,5741,621),new P.ptr(5742,5787,45),new P.ptr(5788,5867,79),new P.ptr(5868,5869,1),new P.ptr(5941,5942,1),new P.ptr(6100,6102,1),new P.ptr(6104,6106,1),new P.ptr(6144,6154,1),new P.ptr(6468,6469,1),new P.ptr(6686,6687,1),new P.ptr(6816,6822,1),new P.ptr(6824,6829,1),new P.ptr(7002,7008,1),new P.ptr(7164,7167,1),new P.ptr(7227,7231,1),new P.ptr(7294,7295,1),new P.ptr(7360,7367,1),new P.ptr(7379,8208,829),new P.ptr(8209,8231,1),new P.ptr(8240,8259,1),new P.ptr(8261,8273,1),new P.ptr(8275,8286,1),new P.ptr(8317,8318,1),new P.ptr(8333,8334,1),new P.ptr(8968,8971,1),new P.ptr(9001,9002,1),new P.ptr(10088,10101,1),new P.ptr(10181,10182,1),new P.ptr(10214,10223,1),new P.ptr(10627,10648,1),new P.ptr(10712,10715,1),new P.ptr(10748,10749,1),new P.ptr(11513,11516,1),new P.ptr(11518,11519,1),new P.ptr(11632,11776,144),new P.ptr(11777,11822,1),new P.ptr(11824,11842,1),new P.ptr(12289,12291,1),new P.ptr(12296,12305,1),new P.ptr(12308,12319,1),new P.ptr(12336,12349,13),new P.ptr(12448,12539,91),new P.ptr(42238,42239,1),new P.ptr(42509,42511,1),new P.ptr(42611,42622,11),new P.ptr(42738,42743,1),new P.ptr(43124,43127,1),new P.ptr(43214,43215,1),new P.ptr(43256,43258,1),new P.ptr(43260,43310,50),new P.ptr(43311,43359,48),new P.ptr(43457,43469,1),new P.ptr(43486,43487,1),new P.ptr(43612,43615,1),new P.ptr(43742,43743,1),new P.ptr(43760,43761,1),new P.ptr(44011,64830,20819),new P.ptr(64831,65040,209),new P.ptr(65041,65049,1),new P.ptr(65072,65106,1),new P.ptr(65108,65121,1),new P.ptr(65123,65128,5),new P.ptr(65130,65131,1),new P.ptr(65281,65283,1),new P.ptr(65285,65290,1),new P.ptr(65292,65295,1),new P.ptr(65306,65307,1),new P.ptr(65311,65312,1),new P.ptr(65339,65341,1),new P.ptr(65343,65371,28),new P.ptr(65373,65375,2),new P.ptr(65376,65381,1)]),new IM([new Q.ptr(65792,65794,1),new Q.ptr(66463,66512,49),new Q.ptr(66927,67671,744),new Q.ptr(67871,67903,32),new Q.ptr(68176,68184,1),new Q.ptr(68223,68336,113),new Q.ptr(68337,68342,1),new Q.ptr(68409,68415,1),new Q.ptr(68505,68508,1),new Q.ptr(69703,69709,1),new Q.ptr(69819,69820,1),new Q.ptr(69822,69825,1),new Q.ptr(69952,69955,1),new Q.ptr(70004,70005,1),new Q.ptr(70085,70089,1),new Q.ptr(70093,70107,14),new Q.ptr(70109,70111,1),new Q.ptr(70200,70205,1),new Q.ptr(70313,70854,541),new Q.ptr(71105,71127,1),new Q.ptr(71233,71235,1),new Q.ptr(71484,71486,1),new Q.ptr(74864,74868,1),new Q.ptr(92782,92783,1),new Q.ptr(92917,92983,66),new Q.ptr(92984,92987,1),new Q.ptr(92996,113823,20827),new Q.ptr(121479,121483,1)]),11);BB=new O.ptr(new IL([new P.ptr(95,8255,8160),new P.ptr(8256,8276,20),new P.ptr(65075,65076,1),new P.ptr(65101,65103,1),new P.ptr(65343,65343,1)]),IM.nil,0);BC=new O.ptr(new IL([new P.ptr(45,1418,1373),new P.ptr(1470,5120,3650),new P.ptr(6150,8208,2058),new P.ptr(8209,8213,1),new P.ptr(11799,11802,3),new P.ptr(11834,11835,1),new P.ptr(11840,12316,476),new P.ptr(12336,12448,112),new P.ptr(65073,65074,1),new P.ptr(65112,65123,11),new P.ptr(65293,65293,1)]),IM.nil,0);BD=new O.ptr(new IL([new P.ptr(41,93,52),new P.ptr(125,3899,3774),new P.ptr(3901,5788,1887),new P.ptr(8262,8318,56),new P.ptr(8334,8969,635),new P.ptr(8971,9002,31),new P.ptr(10089,10101,2),new P.ptr(10182,10215,33),new P.ptr(10217,10223,2),new P.ptr(10628,10648,2),new P.ptr(10713,10715,2),new P.ptr(10749,11811,1062),new P.ptr(11813,11817,2),new P.ptr(12297,12305,2),new P.ptr(12309,12315,2),new P.ptr(12318,12319,1),new P.ptr(64830,65048,218),new P.ptr(65078,65092,2),new P.ptr(65096,65114,18),new P.ptr(65116,65118,2),new P.ptr(65289,65341,52),new P.ptr(65373,65379,3)]),IM.nil,1);BE=new O.ptr(new IL([new P.ptr(187,8217,8030),new P.ptr(8221,8250,29),new P.ptr(11779,11781,2),new P.ptr(11786,11789,3),new P.ptr(11805,11809,4)]),IM.nil,0);BF=new O.ptr(new IL([new P.ptr(171,8216,8045),new P.ptr(8219,8220,1),new P.ptr(8223,8249,26),new P.ptr(11778,11780,2),new P.ptr(11785,11788,3),new P.ptr(11804,11808,4)]),IM.nil,0);BG=new O.ptr(new IL([new P.ptr(33,35,1),new P.ptr(37,39,1),new P.ptr(42,46,2),new P.ptr(47,58,11),new P.ptr(59,63,4),new P.ptr(64,92,28),new P.ptr(161,167,6),new P.ptr(182,183,1),new P.ptr(191,894,703),new P.ptr(903,1370,467),new P.ptr(1371,1375,1),new P.ptr(1417,1472,55),new P.ptr(1475,1478,3),new P.ptr(1523,1524,1),new P.ptr(1545,1546,1),new P.ptr(1548,1549,1),new P.ptr(1563,1566,3),new P.ptr(1567,1642,75),new P.ptr(1643,1645,1),new P.ptr(1748,1792,44),new P.ptr(1793,1805,1),new P.ptr(2039,2041,1),new P.ptr(2096,2110,1),new P.ptr(2142,2404,262),new P.ptr(2405,2416,11),new P.ptr(2800,3572,772),new P.ptr(3663,3674,11),new P.ptr(3675,3844,169),new P.ptr(3845,3858,1),new P.ptr(3860,3973,113),new P.ptr(4048,4052,1),new P.ptr(4057,4058,1),new P.ptr(4170,4175,1),new P.ptr(4347,4960,613),new P.ptr(4961,4968,1),new P.ptr(5741,5742,1),new P.ptr(5867,5869,1),new P.ptr(5941,5942,1),new P.ptr(6100,6102,1),new P.ptr(6104,6106,1),new P.ptr(6144,6149,1),new P.ptr(6151,6154,1),new P.ptr(6468,6469,1),new P.ptr(6686,6687,1),new P.ptr(6816,6822,1),new P.ptr(6824,6829,1),new P.ptr(7002,7008,1),new P.ptr(7164,7167,1),new P.ptr(7227,7231,1),new P.ptr(7294,7295,1),new P.ptr(7360,7367,1),new P.ptr(7379,8214,835),new P.ptr(8215,8224,9),new P.ptr(8225,8231,1),new P.ptr(8240,8248,1),new P.ptr(8251,8254,1),new P.ptr(8257,8259,1),new P.ptr(8263,8273,1),new P.ptr(8275,8277,2),new P.ptr(8278,8286,1),new P.ptr(11513,11516,1),new P.ptr(11518,11519,1),new P.ptr(11632,11776,144),new P.ptr(11777,11782,5),new P.ptr(11783,11784,1),new P.ptr(11787,11790,3),new P.ptr(11791,11798,1),new P.ptr(11800,11801,1),new P.ptr(11803,11806,3),new P.ptr(11807,11818,11),new P.ptr(11819,11822,1),new P.ptr(11824,11833,1),new P.ptr(11836,11839,1),new P.ptr(11841,12289,448),new P.ptr(12290,12291,1),new P.ptr(12349,12539,190),new P.ptr(42238,42239,1),new P.ptr(42509,42511,1),new P.ptr(42611,42622,11),new P.ptr(42738,42743,1),new P.ptr(43124,43127,1),new P.ptr(43214,43215,1),new P.ptr(43256,43258,1),new P.ptr(43260,43310,50),new P.ptr(43311,43359,48),new P.ptr(43457,43469,1),new P.ptr(43486,43487,1),new P.ptr(43612,43615,1),new P.ptr(43742,43743,1),new P.ptr(43760,43761,1),new P.ptr(44011,65040,21029),new P.ptr(65041,65046,1),new P.ptr(65049,65072,23),new P.ptr(65093,65094,1),new P.ptr(65097,65100,1),new P.ptr(65104,65106,1),new P.ptr(65108,65111,1),new P.ptr(65119,65121,1),new P.ptr(65128,65130,2),new P.ptr(65131,65281,150),new P.ptr(65282,65283,1),new P.ptr(65285,65287,1),new P.ptr(65290,65294,2),new P.ptr(65295,65306,11),new P.ptr(65307,65311,4),new P.ptr(65312,65340,28),new P.ptr(65377,65380,3),new P.ptr(65381,65381,1)]),new IM([new Q.ptr(65792,65792,1),new Q.ptr(65793,65794,1),new Q.ptr(66463,66512,49),new Q.ptr(66927,67671,744),new Q.ptr(67871,67903,32),new Q.ptr(68176,68184,1),new Q.ptr(68223,68336,113),new Q.ptr(68337,68342,1),new Q.ptr(68409,68415,1),new Q.ptr(68505,68508,1),new Q.ptr(69703,69709,1),new Q.ptr(69819,69820,1),new Q.ptr(69822,69825,1),new Q.ptr(69952,69955,1),new Q.ptr(70004,70005,1),new Q.ptr(70085,70089,1),new Q.ptr(70093,70107,14),new Q.ptr(70109,70111,1),new Q.ptr(70200,70205,1),new Q.ptr(70313,70854,541),new Q.ptr(71105,71127,1),new Q.ptr(71233,71235,1),new Q.ptr(71484,71486,1),new Q.ptr(74864,74868,1),new Q.ptr(92782,92783,1),new Q.ptr(92917,92983,66),new Q.ptr(92984,92987,1),new Q.ptr(92996,113823,20827),new Q.ptr(121479,121483,1)]),8);BH=new O.ptr(new IL([new P.ptr(40,91,51),new P.ptr(123,3898,3775),new P.ptr(3900,5787,1887),new P.ptr(8218,8222,4),new P.ptr(8261,8317,56),new P.ptr(8333,8968,635),new P.ptr(8970,9001,31),new P.ptr(10088,10100,2),new P.ptr(10181,10214,33),new P.ptr(10216,10222,2),new P.ptr(10627,10647,2),new P.ptr(10712,10714,2),new P.ptr(10748,11810,1062),new P.ptr(11812,11816,2),new P.ptr(11842,12296,454),new P.ptr(12298,12304,2),new P.ptr(12308,12314,2),new P.ptr(12317,64831,52514),new P.ptr(65047,65077,30),new P.ptr(65079,65091,2),new P.ptr(65095,65113,18),new P.ptr(65115,65117,2),new P.ptr(65288,65339,51),new P.ptr(65371,65375,4),new P.ptr(65378,65378,1)]),IM.nil,1);BI=new O.ptr(new IL([new P.ptr(36,43,7),new P.ptr(60,62,1),new P.ptr(94,96,2),new P.ptr(124,126,2),new P.ptr(162,166,1),new P.ptr(168,169,1),new P.ptr(172,174,2),new P.ptr(175,177,1),new P.ptr(180,184,4),new P.ptr(215,247,32),new P.ptr(706,709,1),new P.ptr(722,735,1),new P.ptr(741,747,1),new P.ptr(749,751,2),new P.ptr(752,767,1),new P.ptr(885,900,15),new P.ptr(901,1014,113),new P.ptr(1154,1421,267),new P.ptr(1422,1423,1),new P.ptr(1542,1544,1),new P.ptr(1547,1550,3),new P.ptr(1551,1758,207),new P.ptr(1769,1789,20),new P.ptr(1790,2038,248),new P.ptr(2546,2547,1),new P.ptr(2554,2555,1),new P.ptr(2801,2928,127),new P.ptr(3059,3066,1),new P.ptr(3199,3449,250),new P.ptr(3647,3841,194),new P.ptr(3842,3843,1),new P.ptr(3859,3861,2),new P.ptr(3862,3863,1),new P.ptr(3866,3871,1),new P.ptr(3892,3896,2),new P.ptr(4030,4037,1),new P.ptr(4039,4044,1),new P.ptr(4046,4047,1),new P.ptr(4053,4056,1),new P.ptr(4254,4255,1),new P.ptr(5008,5017,1),new P.ptr(6107,6464,357),new P.ptr(6622,6655,1),new P.ptr(7009,7018,1),new P.ptr(7028,7036,1),new P.ptr(8125,8127,2),new P.ptr(8128,8129,1),new P.ptr(8141,8143,1),new P.ptr(8157,8159,1),new P.ptr(8173,8175,1),new P.ptr(8189,8190,1),new P.ptr(8260,8274,14),new P.ptr(8314,8316,1),new P.ptr(8330,8332,1),new P.ptr(8352,8382,1),new P.ptr(8448,8449,1),new P.ptr(8451,8454,1),new P.ptr(8456,8457,1),new P.ptr(8468,8470,2),new P.ptr(8471,8472,1),new P.ptr(8478,8483,1),new P.ptr(8485,8489,2),new P.ptr(8494,8506,12),new P.ptr(8507,8512,5),new P.ptr(8513,8516,1),new P.ptr(8522,8525,1),new P.ptr(8527,8586,59),new P.ptr(8587,8592,5),new P.ptr(8593,8967,1),new P.ptr(8972,9000,1),new P.ptr(9003,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9372,9449,1),new P.ptr(9472,10087,1),new P.ptr(10132,10180,1),new P.ptr(10183,10213,1),new P.ptr(10224,10626,1),new P.ptr(10649,10711,1),new P.ptr(10716,10747,1),new P.ptr(10750,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11244,11247,1),new P.ptr(11493,11498,1),new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12272,12283,1),new P.ptr(12292,12306,14),new P.ptr(12307,12320,13),new P.ptr(12342,12343,1),new P.ptr(12350,12351,1),new P.ptr(12443,12444,1),new P.ptr(12688,12689,1),new P.ptr(12694,12703,1),new P.ptr(12736,12771,1),new P.ptr(12800,12830,1),new P.ptr(12842,12871,1),new P.ptr(12880,12896,16),new P.ptr(12897,12927,1),new P.ptr(12938,12976,1),new P.ptr(12992,13054,1),new P.ptr(13056,13311,1),new P.ptr(19904,19967,1),new P.ptr(42128,42182,1),new P.ptr(42752,42774,1),new P.ptr(42784,42785,1),new P.ptr(42889,42890,1),new P.ptr(43048,43051,1),new P.ptr(43062,43065,1),new P.ptr(43639,43641,1),new P.ptr(43867,64297,20430),new P.ptr(64434,64449,1),new P.ptr(65020,65021,1),new P.ptr(65122,65124,2),new P.ptr(65125,65126,1),new P.ptr(65129,65284,155),new P.ptr(65291,65308,17),new P.ptr(65309,65310,1),new P.ptr(65342,65344,2),new P.ptr(65372,65374,2),new P.ptr(65504,65510,1),new P.ptr(65512,65518,1),new P.ptr(65532,65533,1)]),new IM([new Q.ptr(65847,65855,1),new Q.ptr(65913,65929,1),new Q.ptr(65932,65936,4),new Q.ptr(65937,65947,1),new Q.ptr(65952,66000,48),new Q.ptr(66001,66044,1),new Q.ptr(67703,67704,1),new Q.ptr(68296,71487,3191),new Q.ptr(92988,92991,1),new Q.ptr(92997,113820,20823),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119140,1),new Q.ptr(119146,119148,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119272,1),new Q.ptr(119296,119361,1),new Q.ptr(119365,119552,187),new Q.ptr(119553,119638,1),new Q.ptr(120513,120539,26),new Q.ptr(120571,120597,26),new Q.ptr(120629,120655,26),new Q.ptr(120687,120713,26),new Q.ptr(120745,120771,26),new Q.ptr(120832,121343,1),new Q.ptr(121399,121402,1),new Q.ptr(121453,121460,1),new Q.ptr(121462,121475,1),new Q.ptr(121477,121478,1),new Q.ptr(126704,126705,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128720,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1),new Q.ptr(129296,129304,1),new Q.ptr(129408,129412,1),new Q.ptr(129472,129472,1)]),10);BJ=new O.ptr(new IL([new P.ptr(36,162,126),new P.ptr(163,165,1),new P.ptr(1423,1547,124),new P.ptr(2546,2547,1),new P.ptr(2555,2801,246),new P.ptr(3065,3647,582),new P.ptr(6107,8352,2245),new P.ptr(8353,8382,1),new P.ptr(43064,65020,21956),new P.ptr(65129,65284,155),new P.ptr(65504,65505,1),new P.ptr(65509,65510,1)]),IM.nil,2);BK=new O.ptr(new IL([new P.ptr(94,96,2),new P.ptr(168,175,7),new P.ptr(180,184,4),new P.ptr(706,709,1),new P.ptr(722,735,1),new P.ptr(741,747,1),new P.ptr(749,751,2),new P.ptr(752,767,1),new P.ptr(885,900,15),new P.ptr(901,8125,7224),new P.ptr(8127,8129,1),new P.ptr(8141,8143,1),new P.ptr(8157,8159,1),new P.ptr(8173,8175,1),new P.ptr(8189,8190,1),new P.ptr(12443,12444,1),new P.ptr(42752,42774,1),new P.ptr(42784,42785,1),new P.ptr(42889,42890,1),new P.ptr(43867,64434,20567),new P.ptr(64435,64449,1),new P.ptr(65342,65344,2),new P.ptr(65507,65507,1)]),new IM([new Q.ptr(127995,127995,1),new Q.ptr(127996,127999,1)]),3);BL=new O.ptr(new IL([new P.ptr(43,60,17),new P.ptr(61,62,1),new P.ptr(124,126,2),new P.ptr(172,177,5),new P.ptr(215,247,32),new P.ptr(1014,1542,528),new P.ptr(1543,1544,1),new P.ptr(8260,8274,14),new P.ptr(8314,8316,1),new P.ptr(8330,8332,1),new P.ptr(8472,8512,40),new P.ptr(8513,8516,1),new P.ptr(8523,8592,69),new P.ptr(8593,8596,1),new P.ptr(8602,8603,1),new P.ptr(8608,8614,3),new P.ptr(8622,8654,32),new P.ptr(8655,8658,3),new P.ptr(8660,8692,32),new P.ptr(8693,8959,1),new P.ptr(8992,8993,1),new P.ptr(9084,9115,31),new P.ptr(9116,9139,1),new P.ptr(9180,9185,1),new P.ptr(9655,9665,10),new P.ptr(9720,9727,1),new P.ptr(9839,10176,337),new P.ptr(10177,10180,1),new P.ptr(10183,10213,1),new P.ptr(10224,10239,1),new P.ptr(10496,10626,1),new P.ptr(10649,10711,1),new P.ptr(10716,10747,1),new P.ptr(10750,11007,1),new P.ptr(11056,11076,1),new P.ptr(11079,11084,1),new P.ptr(64297,65122,825),new P.ptr(65124,65126,1),new P.ptr(65291,65308,17),new P.ptr(65309,65310,1),new P.ptr(65372,65374,2),new P.ptr(65506,65513,7),new P.ptr(65514,65516,1)]),new IM([new Q.ptr(120513,120539,26),new Q.ptr(120571,120597,26),new Q.ptr(120629,120655,26),new Q.ptr(120687,120713,26),new Q.ptr(120745,120771,26),new Q.ptr(126704,126705,1)]),5);BM=new O.ptr(new IL([new P.ptr(166,169,3),new P.ptr(174,176,2),new P.ptr(1154,1421,267),new P.ptr(1422,1550,128),new P.ptr(1551,1758,207),new P.ptr(1769,1789,20),new P.ptr(1790,2038,248),new P.ptr(2554,2928,374),new P.ptr(3059,3064,1),new P.ptr(3066,3199,133),new P.ptr(3449,3841,392),new P.ptr(3842,3843,1),new P.ptr(3859,3861,2),new P.ptr(3862,3863,1),new P.ptr(3866,3871,1),new P.ptr(3892,3896,2),new P.ptr(4030,4037,1),new P.ptr(4039,4044,1),new P.ptr(4046,4047,1),new P.ptr(4053,4056,1),new P.ptr(4254,4255,1),new P.ptr(5008,5017,1),new P.ptr(6464,6622,158),new P.ptr(6623,6655,1),new P.ptr(7009,7018,1),new P.ptr(7028,7036,1),new P.ptr(8448,8449,1),new P.ptr(8451,8454,1),new P.ptr(8456,8457,1),new P.ptr(8468,8470,2),new P.ptr(8471,8478,7),new P.ptr(8479,8483,1),new P.ptr(8485,8489,2),new P.ptr(8494,8506,12),new P.ptr(8507,8522,15),new P.ptr(8524,8525,1),new P.ptr(8527,8586,59),new P.ptr(8587,8597,10),new P.ptr(8598,8601,1),new P.ptr(8604,8607,1),new P.ptr(8609,8610,1),new P.ptr(8612,8613,1),new P.ptr(8615,8621,1),new P.ptr(8623,8653,1),new P.ptr(8656,8657,1),new P.ptr(8659,8661,2),new P.ptr(8662,8691,1),new P.ptr(8960,8967,1),new P.ptr(8972,8991,1),new P.ptr(8994,9000,1),new P.ptr(9003,9083,1),new P.ptr(9085,9114,1),new P.ptr(9140,9179,1),new P.ptr(9186,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9372,9449,1),new P.ptr(9472,9654,1),new P.ptr(9656,9664,1),new P.ptr(9666,9719,1),new P.ptr(9728,9838,1),new P.ptr(9840,10087,1),new P.ptr(10132,10175,1),new P.ptr(10240,10495,1),new P.ptr(11008,11055,1),new P.ptr(11077,11078,1),new P.ptr(11085,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11244,11247,1),new P.ptr(11493,11498,1),new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12272,12283,1),new P.ptr(12292,12306,14),new P.ptr(12307,12320,13),new P.ptr(12342,12343,1),new P.ptr(12350,12351,1),new P.ptr(12688,12689,1),new P.ptr(12694,12703,1),new P.ptr(12736,12771,1),new P.ptr(12800,12830,1),new P.ptr(12842,12871,1),new P.ptr(12880,12896,16),new P.ptr(12897,12927,1),new P.ptr(12938,12976,1),new P.ptr(12992,13054,1),new P.ptr(13056,13311,1),new P.ptr(19904,19967,1),new P.ptr(42128,42182,1),new P.ptr(43048,43051,1),new P.ptr(43062,43063,1),new P.ptr(43065,43639,574),new P.ptr(43640,43641,1),new P.ptr(65021,65508,487),new P.ptr(65512,65517,5),new P.ptr(65518,65532,14),new P.ptr(65533,65533,1)]),new IM([new Q.ptr(65847,65847,1),new Q.ptr(65848,65855,1),new Q.ptr(65913,65929,1),new Q.ptr(65932,65936,4),new Q.ptr(65937,65947,1),new Q.ptr(65952,66000,48),new Q.ptr(66001,66044,1),new Q.ptr(67703,67704,1),new Q.ptr(68296,71487,3191),new Q.ptr(92988,92991,1),new Q.ptr(92997,113820,20823),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119140,1),new Q.ptr(119146,119148,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119272,1),new Q.ptr(119296,119361,1),new Q.ptr(119365,119552,187),new Q.ptr(119553,119638,1),new Q.ptr(120832,121343,1),new Q.ptr(121399,121402,1),new Q.ptr(121453,121460,1),new Q.ptr(121462,121475,1),new Q.ptr(121477,121478,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,127994,1),new Q.ptr(128000,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128720,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1),new Q.ptr(129296,129304,1),new Q.ptr(129408,129412,1),new Q.ptr(129472,129472,1)]),2);BN=new O.ptr(new IL([new P.ptr(32,160,128),new P.ptr(5760,8192,2432),new P.ptr(8193,8202,1),new P.ptr(8232,8233,1),new P.ptr(8239,8287,48),new P.ptr(12288,12288,1)]),IM.nil,1);BO=new O.ptr(new IL([new P.ptr(8232,8232,1)]),IM.nil,0);BP=new O.ptr(new IL([new P.ptr(8233,8233,1)]),IM.nil,0);BQ=new O.ptr(new IL([new P.ptr(32,160,128),new P.ptr(5760,8192,2432),new P.ptr(8193,8202,1),new P.ptr(8239,8287,48),new P.ptr(12288,12288,1)]),IM.nil,1);$pkg.Cc=AI;$pkg.Cf=AJ;$pkg.Co=AK;$pkg.Cs=AL;$pkg.Digit=AX;$pkg.Nd=AX;$pkg.Letter=AM;$pkg.L=AM;$pkg.Lm=AO;$pkg.Lo=AP;$pkg.Ll=AN;$pkg.M=AS;$pkg.Mc=AT;$pkg.Me=AU;$pkg.Mn=AV;$pkg.Nl=AY;$pkg.No=AZ;$pkg.N=AW;$pkg.C=AH;$pkg.Pc=BB;$pkg.Pd=BC;$pkg.Pe=BD;$pkg.Pf=BE;$pkg.Pi=BF;$pkg.Po=BG;$pkg.Ps=BH;$pkg.P=BA;$pkg.Sc=BJ;$pkg.Sk=BK;$pkg.Sm=BL;$pkg.So=BM;$pkg.Z=BN;$pkg.S=BI;$pkg.PrintRanges=new IO([$pkg.L,$pkg.M,$pkg.N,$pkg.P,$pkg.S]);$pkg.Lt=AQ;$pkg.Upper=AR;$pkg.Lu=AR;$pkg.Zl=BO;$pkg.Zp=BP;$pkg.Zs=BQ;$pkg.Categories=$makeMap($String.keyFor,[{k:"C",v:$pkg.C},{k:"Cc",v:$pkg.Cc},{k:"Cf",v:$pkg.Cf},{k:"Co",v:$pkg.Co},{k:"Cs",v:$pkg.Cs},{k:"L",v:$pkg.L},{k:"Ll",v:$pkg.Ll},{k:"Lm",v:$pkg.Lm},{k:"Lo",v:$pkg.Lo},{k:"Lt",v:$pkg.Lt},{k:"Lu",v:$pkg.Lu},{k:"M",v:$pkg.M},{k:"Mc",v:$pkg.Mc},{k:"Me",v:$pkg.Me},{k:"Mn",v:$pkg.Mn},{k:"N",v:$pkg.N},{k:"Nd",v:$pkg.Nd},{k:"Nl",v:$pkg.Nl},{k:"No",v:$pkg.No},{k:"P",v:$pkg.P},{k:"Pc",v:$pkg.Pc},{k:"Pd",v:$pkg.Pd},{k:"Pe",v:$pkg.Pe},{k:"Pf",v:$pkg.Pf},{k:"Pi",v:$pkg.Pi},{k:"Po",v:$pkg.Po},{k:"Ps",v:$pkg.Ps},{k:"S",v:$pkg.S},{k:"Sc",v:$pkg.Sc},{k:"Sk",v:$pkg.Sk},{k:"Sm",v:$pkg.Sm},{k:"So",v:$pkg.So},{k:"Z",v:$pkg.Z},{k:"Zl",v:$pkg.Zl},{k:"Zp",v:$pkg.Zp},{k:"Zs",v:$pkg.Zs}]);BR=new O.ptr(new IL([]),new IM([new Q.ptr(71424,71449,1),new Q.ptr(71453,71467,1),new Q.ptr(71472,71487,1)]),0);BS=new O.ptr(new IL([]),new IM([new Q.ptr(82944,83526,1)]),0);BT=new O.ptr(new IL([new P.ptr(1536,1540,1),new P.ptr(1542,1547,1),new P.ptr(1549,1562,1),new P.ptr(1566,1566,1),new P.ptr(1568,1599,1),new P.ptr(1601,1610,1),new P.ptr(1622,1647,1),new P.ptr(1649,1756,1),new P.ptr(1758,1791,1),new P.ptr(1872,1919,1),new P.ptr(2208,2228,1),new P.ptr(2275,2303,1),new P.ptr(64336,64449,1),new P.ptr(64467,64829,1),new P.ptr(64848,64911,1),new P.ptr(64914,64967,1),new P.ptr(65008,65021,1),new P.ptr(65136,65140,1),new P.ptr(65142,65276,1)]),new IM([new Q.ptr(69216,69246,1),new Q.ptr(126464,126467,1),new Q.ptr(126469,126495,1),new Q.ptr(126497,126498,1),new Q.ptr(126500,126500,1),new Q.ptr(126503,126503,1),new Q.ptr(126505,126514,1),new Q.ptr(126516,126519,1),new Q.ptr(126521,126521,1),new Q.ptr(126523,126523,1),new Q.ptr(126530,126530,1),new Q.ptr(126535,126535,1),new Q.ptr(126537,126537,1),new Q.ptr(126539,126539,1),new Q.ptr(126541,126543,1),new Q.ptr(126545,126546,1),new Q.ptr(126548,126548,1),new Q.ptr(126551,126551,1),new Q.ptr(126553,126553,1),new Q.ptr(126555,126555,1),new Q.ptr(126557,126557,1),new Q.ptr(126559,126559,1),new Q.ptr(126561,126562,1),new Q.ptr(126564,126564,1),new Q.ptr(126567,126570,1),new Q.ptr(126572,126578,1),new Q.ptr(126580,126583,1),new Q.ptr(126585,126588,1),new Q.ptr(126590,126590,1),new Q.ptr(126592,126601,1),new Q.ptr(126603,126619,1),new Q.ptr(126625,126627,1),new Q.ptr(126629,126633,1),new Q.ptr(126635,126651,1),new Q.ptr(126704,126705,1)]),0);BU=new O.ptr(new IL([new P.ptr(1329,1366,1),new P.ptr(1369,1375,1),new P.ptr(1377,1415,1),new P.ptr(1418,1418,1),new P.ptr(1421,1423,1),new P.ptr(64275,64279,1)]),IM.nil,0);BV=new O.ptr(new IL([]),new IM([new Q.ptr(68352,68405,1),new Q.ptr(68409,68415,1)]),0);BW=new O.ptr(new IL([new P.ptr(6912,6987,1),new P.ptr(6992,7036,1)]),IM.nil,0);BX=new O.ptr(new IL([new P.ptr(42656,42743,1)]),new IM([new Q.ptr(92160,92728,1)]),0);BY=new O.ptr(new IL([]),new IM([new Q.ptr(92880,92909,1),new Q.ptr(92912,92917,1)]),0);BZ=new O.ptr(new IL([new P.ptr(7104,7155,1),new P.ptr(7164,7167,1)]),IM.nil,0);CA=new O.ptr(new IL([new P.ptr(2432,2435,1),new P.ptr(2437,2444,1),new P.ptr(2447,2448,1),new P.ptr(2451,2472,1),new P.ptr(2474,2480,1),new P.ptr(2482,2482,1),new P.ptr(2486,2489,1),new P.ptr(2492,2500,1),new P.ptr(2503,2504,1),new P.ptr(2507,2510,1),new P.ptr(2519,2519,1),new P.ptr(2524,2525,1),new P.ptr(2527,2531,1),new P.ptr(2534,2555,1)]),IM.nil,0);CB=new O.ptr(new IL([new P.ptr(746,747,1),new P.ptr(12549,12589,1),new P.ptr(12704,12730,1)]),IM.nil,0);CC=new O.ptr(new IL([]),new IM([new Q.ptr(69632,69709,1),new Q.ptr(69714,69743,1),new Q.ptr(69759,69759,1)]),0);CD=new O.ptr(new IL([new P.ptr(10240,10495,1)]),IM.nil,0);CE=new O.ptr(new IL([new P.ptr(6656,6683,1),new P.ptr(6686,6687,1)]),IM.nil,0);CF=new O.ptr(new IL([new P.ptr(5952,5971,1)]),IM.nil,0);CG=new O.ptr(new IL([new P.ptr(5120,5759,1),new P.ptr(6320,6389,1)]),IM.nil,0);CH=new O.ptr(new IL([]),new IM([new Q.ptr(66208,66256,1)]),0);CI=new O.ptr(new IL([]),new IM([new Q.ptr(66864,66915,1),new Q.ptr(66927,66927,1)]),0);CJ=new O.ptr(new IL([]),new IM([new Q.ptr(69888,69940,1),new Q.ptr(69942,69955,1)]),0);CK=new O.ptr(new IL([new P.ptr(43520,43574,1),new P.ptr(43584,43597,1),new P.ptr(43600,43609,1),new P.ptr(43612,43615,1)]),IM.nil,0);CL=new O.ptr(new IL([new P.ptr(5024,5109,1),new P.ptr(5112,5117,1),new P.ptr(43888,43967,1)]),IM.nil,0);CM=new O.ptr(new IL([new P.ptr(0,64,1),new P.ptr(91,96,1),new P.ptr(123,169,1),new P.ptr(171,185,1),new P.ptr(187,191,1),new P.ptr(215,215,1),new P.ptr(247,247,1),new P.ptr(697,735,1),new P.ptr(741,745,1),new P.ptr(748,767,1),new P.ptr(884,884,1),new P.ptr(894,894,1),new P.ptr(901,901,1),new P.ptr(903,903,1),new P.ptr(1417,1417,1),new P.ptr(1541,1541,1),new P.ptr(1548,1548,1),new P.ptr(1563,1564,1),new P.ptr(1567,1567,1),new P.ptr(1600,1600,1),new P.ptr(1757,1757,1),new P.ptr(2404,2405,1),new P.ptr(3647,3647,1),new P.ptr(4053,4056,1),new P.ptr(4347,4347,1),new P.ptr(5867,5869,1),new P.ptr(5941,5942,1),new P.ptr(6146,6147,1),new P.ptr(6149,6149,1),new P.ptr(7379,7379,1),new P.ptr(7393,7393,1),new P.ptr(7401,7404,1),new P.ptr(7406,7411,1),new P.ptr(7413,7414,1),new P.ptr(8192,8203,1),new P.ptr(8206,8292,1),new P.ptr(8294,8304,1),new P.ptr(8308,8318,1),new P.ptr(8320,8334,1),new P.ptr(8352,8382,1),new P.ptr(8448,8485,1),new P.ptr(8487,8489,1),new P.ptr(8492,8497,1),new P.ptr(8499,8525,1),new P.ptr(8527,8543,1),new P.ptr(8585,8587,1),new P.ptr(8592,9210,1),new P.ptr(9216,9254,1),new P.ptr(9280,9290,1),new P.ptr(9312,10239,1),new P.ptr(10496,11123,1),new P.ptr(11126,11157,1),new P.ptr(11160,11193,1),new P.ptr(11197,11208,1),new P.ptr(11210,11217,1),new P.ptr(11244,11247,1),new P.ptr(11776,11842,1),new P.ptr(12272,12283,1),new P.ptr(12288,12292,1),new P.ptr(12294,12294,1),new P.ptr(12296,12320,1),new P.ptr(12336,12343,1),new P.ptr(12348,12351,1),new P.ptr(12443,12444,1),new P.ptr(12448,12448,1),new P.ptr(12539,12540,1),new P.ptr(12688,12703,1),new P.ptr(12736,12771,1),new P.ptr(12832,12895,1),new P.ptr(12927,13007,1),new P.ptr(13144,13311,1),new P.ptr(19904,19967,1),new P.ptr(42752,42785,1),new P.ptr(42888,42890,1),new P.ptr(43056,43065,1),new P.ptr(43310,43310,1),new P.ptr(43471,43471,1),new P.ptr(43867,43867,1),new P.ptr(64830,64831,1),new P.ptr(65040,65049,1),new P.ptr(65072,65106,1),new P.ptr(65108,65126,1),new P.ptr(65128,65131,1),new P.ptr(65279,65279,1),new P.ptr(65281,65312,1),new P.ptr(65339,65344,1),new P.ptr(65371,65381,1),new P.ptr(65392,65392,1),new P.ptr(65438,65439,1),new P.ptr(65504,65510,1),new P.ptr(65512,65518,1),new P.ptr(65529,65533,1)]),new IM([new Q.ptr(65792,65794,1),new Q.ptr(65799,65843,1),new Q.ptr(65847,65855,1),new Q.ptr(65936,65947,1),new Q.ptr(66000,66044,1),new Q.ptr(66273,66299,1),new Q.ptr(113824,113827,1),new Q.ptr(118784,119029,1),new Q.ptr(119040,119078,1),new Q.ptr(119081,119142,1),new Q.ptr(119146,119162,1),new Q.ptr(119171,119172,1),new Q.ptr(119180,119209,1),new Q.ptr(119214,119272,1),new Q.ptr(119552,119638,1),new Q.ptr(119648,119665,1),new Q.ptr(119808,119892,1),new Q.ptr(119894,119964,1),new Q.ptr(119966,119967,1),new Q.ptr(119970,119970,1),new Q.ptr(119973,119974,1),new Q.ptr(119977,119980,1),new Q.ptr(119982,119993,1),new Q.ptr(119995,119995,1),new Q.ptr(119997,120003,1),new Q.ptr(120005,120069,1),new Q.ptr(120071,120074,1),new Q.ptr(120077,120084,1),new Q.ptr(120086,120092,1),new Q.ptr(120094,120121,1),new Q.ptr(120123,120126,1),new Q.ptr(120128,120132,1),new Q.ptr(120134,120134,1),new Q.ptr(120138,120144,1),new Q.ptr(120146,120485,1),new Q.ptr(120488,120779,1),new Q.ptr(120782,120831,1),new Q.ptr(126976,127019,1),new Q.ptr(127024,127123,1),new Q.ptr(127136,127150,1),new Q.ptr(127153,127167,1),new Q.ptr(127169,127183,1),new Q.ptr(127185,127221,1),new Q.ptr(127232,127244,1),new Q.ptr(127248,127278,1),new Q.ptr(127280,127339,1),new Q.ptr(127344,127386,1),new Q.ptr(127462,127487,1),new Q.ptr(127489,127490,1),new Q.ptr(127504,127546,1),new Q.ptr(127552,127560,1),new Q.ptr(127568,127569,1),new Q.ptr(127744,128377,1),new Q.ptr(128379,128419,1),new Q.ptr(128421,128720,1),new Q.ptr(128736,128748,1),new Q.ptr(128752,128755,1),new Q.ptr(128768,128883,1),new Q.ptr(128896,128980,1),new Q.ptr(129024,129035,1),new Q.ptr(129040,129095,1),new Q.ptr(129104,129113,1),new Q.ptr(129120,129159,1),new Q.ptr(129168,129197,1),new Q.ptr(129296,129304,1),new Q.ptr(129408,129412,1),new Q.ptr(129472,129472,1),new Q.ptr(917505,917505,1),new Q.ptr(917536,917631,1)]),7);CN=new O.ptr(new IL([new P.ptr(994,1007,1),new P.ptr(11392,11507,1),new P.ptr(11513,11519,1)]),IM.nil,0);CO=new O.ptr(new IL([]),new IM([new Q.ptr(73728,74649,1),new Q.ptr(74752,74862,1),new Q.ptr(74864,74868,1),new Q.ptr(74880,75075,1)]),0);CP=new O.ptr(new IL([]),new IM([new Q.ptr(67584,67589,1),new Q.ptr(67592,67592,1),new Q.ptr(67594,67637,1),new Q.ptr(67639,67640,1),new Q.ptr(67644,67644,1),new Q.ptr(67647,67647,1)]),0);CQ=new O.ptr(new IL([new P.ptr(1024,1156,1),new P.ptr(1159,1327,1),new P.ptr(7467,7467,1),new P.ptr(7544,7544,1),new P.ptr(11744,11775,1),new P.ptr(42560,42655,1),new P.ptr(65070,65071,1)]),IM.nil,0);CR=new O.ptr(new IL([]),new IM([new Q.ptr(66560,66639,1)]),0);CS=new O.ptr(new IL([new P.ptr(2304,2384,1),new P.ptr(2387,2403,1),new P.ptr(2406,2431,1),new P.ptr(43232,43261,1)]),IM.nil,0);CT=new O.ptr(new IL([]),new IM([new Q.ptr(113664,113770,1),new Q.ptr(113776,113788,1),new Q.ptr(113792,113800,1),new Q.ptr(113808,113817,1),new Q.ptr(113820,113823,1)]),0);CU=new O.ptr(new IL([]),new IM([new Q.ptr(77824,78894,1)]),0);CV=new O.ptr(new IL([]),new IM([new Q.ptr(66816,66855,1)]),0);CW=new O.ptr(new IL([new P.ptr(4608,4680,1),new P.ptr(4682,4685,1),new P.ptr(4688,4694,1),new P.ptr(4696,4696,1),new P.ptr(4698,4701,1),new P.ptr(4704,4744,1),new P.ptr(4746,4749,1),new P.ptr(4752,4784,1),new P.ptr(4786,4789,1),new P.ptr(4792,4798,1),new P.ptr(4800,4800,1),new P.ptr(4802,4805,1),new P.ptr(4808,4822,1),new P.ptr(4824,4880,1),new P.ptr(4882,4885,1),new P.ptr(4888,4954,1),new P.ptr(4957,4988,1),new P.ptr(4992,5017,1),new P.ptr(11648,11670,1),new P.ptr(11680,11686,1),new P.ptr(11688,11694,1),new P.ptr(11696,11702,1),new P.ptr(11704,11710,1),new P.ptr(11712,11718,1),new P.ptr(11720,11726,1),new P.ptr(11728,11734,1),new P.ptr(11736,11742,1),new P.ptr(43777,43782,1),new P.ptr(43785,43790,1),new P.ptr(43793,43798,1),new P.ptr(43808,43814,1),new P.ptr(43816,43822,1)]),IM.nil,0);CX=new O.ptr(new IL([new P.ptr(4256,4293,1),new P.ptr(4295,4295,1),new P.ptr(4301,4301,1),new P.ptr(4304,4346,1),new P.ptr(4348,4351,1),new P.ptr(11520,11557,1),new P.ptr(11559,11559,1),new P.ptr(11565,11565,1)]),IM.nil,0);CY=new O.ptr(new IL([new P.ptr(11264,11310,1),new P.ptr(11312,11358,1)]),IM.nil,0);CZ=new O.ptr(new IL([]),new IM([new Q.ptr(66352,66378,1)]),0);DA=new O.ptr(new IL([]),new IM([new Q.ptr(70400,70403,1),new Q.ptr(70405,70412,1),new Q.ptr(70415,70416,1),new Q.ptr(70419,70440,1),new Q.ptr(70442,70448,1),new Q.ptr(70450,70451,1),new Q.ptr(70453,70457,1),new Q.ptr(70460,70468,1),new Q.ptr(70471,70472,1),new Q.ptr(70475,70477,1),new Q.ptr(70480,70480,1),new Q.ptr(70487,70487,1),new Q.ptr(70493,70499,1),new Q.ptr(70502,70508,1),new Q.ptr(70512,70516,1)]),0);DB=new O.ptr(new IL([new P.ptr(880,883,1),new P.ptr(885,887,1),new P.ptr(890,893,1),new P.ptr(895,895,1),new P.ptr(900,900,1),new P.ptr(902,902,1),new P.ptr(904,906,1),new P.ptr(908,908,1),new P.ptr(910,929,1),new P.ptr(931,993,1),new P.ptr(1008,1023,1),new P.ptr(7462,7466,1),new P.ptr(7517,7521,1),new P.ptr(7526,7530,1),new P.ptr(7615,7615,1),new P.ptr(7936,7957,1),new P.ptr(7960,7965,1),new P.ptr(7968,8005,1),new P.ptr(8008,8013,1),new P.ptr(8016,8023,1),new P.ptr(8025,8025,1),new P.ptr(8027,8027,1),new P.ptr(8029,8029,1),new P.ptr(8031,8061,1),new P.ptr(8064,8116,1),new P.ptr(8118,8132,1),new P.ptr(8134,8147,1),new P.ptr(8150,8155,1),new P.ptr(8157,8175,1),new P.ptr(8178,8180,1),new P.ptr(8182,8190,1),new P.ptr(8486,8486,1),new P.ptr(43877,43877,1)]),new IM([new Q.ptr(65856,65932,1),new Q.ptr(65952,65952,1),new Q.ptr(119296,119365,1)]),0);DC=new O.ptr(new IL([new P.ptr(2689,2691,1),new P.ptr(2693,2701,1),new P.ptr(2703,2705,1),new P.ptr(2707,2728,1),new P.ptr(2730,2736,1),new P.ptr(2738,2739,1),new P.ptr(2741,2745,1),new P.ptr(2748,2757,1),new P.ptr(2759,2761,1),new P.ptr(2763,2765,1),new P.ptr(2768,2768,1),new P.ptr(2784,2787,1),new P.ptr(2790,2801,1),new P.ptr(2809,2809,1)]),IM.nil,0);DD=new O.ptr(new IL([new P.ptr(2561,2563,1),new P.ptr(2565,2570,1),new P.ptr(2575,2576,1),new P.ptr(2579,2600,1),new P.ptr(2602,2608,1),new P.ptr(2610,2611,1),new P.ptr(2613,2614,1),new P.ptr(2616,2617,1),new P.ptr(2620,2620,1),new P.ptr(2622,2626,1),new P.ptr(2631,2632,1),new P.ptr(2635,2637,1),new P.ptr(2641,2641,1),new P.ptr(2649,2652,1),new P.ptr(2654,2654,1),new P.ptr(2662,2677,1)]),IM.nil,0);DE=new O.ptr(new IL([new P.ptr(11904,11929,1),new P.ptr(11931,12019,1),new P.ptr(12032,12245,1),new P.ptr(12293,12293,1),new P.ptr(12295,12295,1),new P.ptr(12321,12329,1),new P.ptr(12344,12347,1),new P.ptr(13312,19893,1),new P.ptr(19968,40917,1),new P.ptr(63744,64109,1),new P.ptr(64112,64217,1)]),new IM([new Q.ptr(131072,173782,1),new Q.ptr(173824,177972,1),new Q.ptr(177984,178205,1),new Q.ptr(178208,183969,1),new Q.ptr(194560,195101,1)]),0);DF=new O.ptr(new IL([new P.ptr(4352,4607,1),new P.ptr(12334,12335,1),new P.ptr(12593,12686,1),new P.ptr(12800,12830,1),new P.ptr(12896,12926,1),new P.ptr(43360,43388,1),new P.ptr(44032,55203,1),new P.ptr(55216,55238,1),new P.ptr(55243,55291,1),new P.ptr(65440,65470,1),new P.ptr(65474,65479,1),new P.ptr(65482,65487,1),new P.ptr(65490,65495,1),new P.ptr(65498,65500,1)]),IM.nil,0);DG=new O.ptr(new IL([new P.ptr(5920,5940,1)]),IM.nil,0);DH=new O.ptr(new IL([]),new IM([new Q.ptr(67808,67826,1),new Q.ptr(67828,67829,1),new Q.ptr(67835,67839,1)]),0);DI=new O.ptr(new IL([new P.ptr(1425,1479,1),new P.ptr(1488,1514,1),new P.ptr(1520,1524,1),new P.ptr(64285,64310,1),new P.ptr(64312,64316,1),new P.ptr(64318,64318,1),new P.ptr(64320,64321,1),new P.ptr(64323,64324,1),new P.ptr(64326,64335,1)]),IM.nil,0);DJ=new O.ptr(new IL([new P.ptr(12353,12438,1),new P.ptr(12445,12447,1)]),new IM([new Q.ptr(110593,110593,1),new Q.ptr(127488,127488,1)]),0);DK=new O.ptr(new IL([]),new IM([new Q.ptr(67648,67669,1),new Q.ptr(67671,67679,1)]),0);DL=new O.ptr(new IL([new P.ptr(768,879,1),new P.ptr(1157,1158,1),new P.ptr(1611,1621,1),new P.ptr(1648,1648,1),new P.ptr(2385,2386,1),new P.ptr(6832,6846,1),new P.ptr(7376,7378,1),new P.ptr(7380,7392,1),new P.ptr(7394,7400,1),new P.ptr(7405,7405,1),new P.ptr(7412,7412,1),new P.ptr(7416,7417,1),new P.ptr(7616,7669,1),new P.ptr(7676,7679,1),new P.ptr(8204,8205,1),new P.ptr(8400,8432,1),new P.ptr(12330,12333,1),new P.ptr(12441,12442,1),new P.ptr(65024,65039,1),new P.ptr(65056,65069,1)]),new IM([new Q.ptr(66045,66045,1),new Q.ptr(66272,66272,1),new Q.ptr(119143,119145,1),new Q.ptr(119163,119170,1),new Q.ptr(119173,119179,1),new Q.ptr(119210,119213,1),new Q.ptr(917760,917999,1)]),0);DM=new O.ptr(new IL([]),new IM([new Q.ptr(68448,68466,1),new Q.ptr(68472,68479,1)]),0);DN=new O.ptr(new IL([]),new IM([new Q.ptr(68416,68437,1),new Q.ptr(68440,68447,1)]),0);DO=new O.ptr(new IL([new P.ptr(43392,43469,1),new P.ptr(43472,43481,1),new P.ptr(43486,43487,1)]),IM.nil,0);DP=new O.ptr(new IL([]),new IM([new Q.ptr(69760,69825,1)]),0);DQ=new O.ptr(new IL([new P.ptr(3201,3203,1),new P.ptr(3205,3212,1),new P.ptr(3214,3216,1),new P.ptr(3218,3240,1),new P.ptr(3242,3251,1),new P.ptr(3253,3257,1),new P.ptr(3260,3268,1),new P.ptr(3270,3272,1),new P.ptr(3274,3277,1),new P.ptr(3285,3286,1),new P.ptr(3294,3294,1),new P.ptr(3296,3299,1),new P.ptr(3302,3311,1),new P.ptr(3313,3314,1)]),IM.nil,0);DR=new O.ptr(new IL([new P.ptr(12449,12538,1),new P.ptr(12541,12543,1),new P.ptr(12784,12799,1),new P.ptr(13008,13054,1),new P.ptr(13056,13143,1),new P.ptr(65382,65391,1),new P.ptr(65393,65437,1)]),new IM([new Q.ptr(110592,110592,1)]),0);DS=new O.ptr(new IL([new P.ptr(43264,43309,1),new P.ptr(43311,43311,1)]),IM.nil,0);DT=new O.ptr(new IL([]),new IM([new Q.ptr(68096,68099,1),new Q.ptr(68101,68102,1),new Q.ptr(68108,68115,1),new Q.ptr(68117,68119,1),new Q.ptr(68121,68147,1),new Q.ptr(68152,68154,1),new Q.ptr(68159,68167,1),new Q.ptr(68176,68184,1)]),0);DU=new O.ptr(new IL([new P.ptr(6016,6109,1),new P.ptr(6112,6121,1),new P.ptr(6128,6137,1),new P.ptr(6624,6655,1)]),IM.nil,0);DV=new O.ptr(new IL([]),new IM([new Q.ptr(70144,70161,1),new Q.ptr(70163,70205,1)]),0);DW=new O.ptr(new IL([]),new IM([new Q.ptr(70320,70378,1),new Q.ptr(70384,70393,1)]),0);DX=new O.ptr(new IL([new P.ptr(3713,3714,1),new P.ptr(3716,3716,1),new P.ptr(3719,3720,1),new P.ptr(3722,3722,1),new P.ptr(3725,3725,1),new P.ptr(3732,3735,1),new P.ptr(3737,3743,1),new P.ptr(3745,3747,1),new P.ptr(3749,3749,1),new P.ptr(3751,3751,1),new P.ptr(3754,3755,1),new P.ptr(3757,3769,1),new P.ptr(3771,3773,1),new P.ptr(3776,3780,1),new P.ptr(3782,3782,1),new P.ptr(3784,3789,1),new P.ptr(3792,3801,1),new P.ptr(3804,3807,1)]),IM.nil,0);DY=new O.ptr(new IL([new P.ptr(65,90,1),new P.ptr(97,122,1),new P.ptr(170,170,1),new P.ptr(186,186,1),new P.ptr(192,214,1),new P.ptr(216,246,1),new P.ptr(248,696,1),new P.ptr(736,740,1),new P.ptr(7424,7461,1),new P.ptr(7468,7516,1),new P.ptr(7522,7525,1),new P.ptr(7531,7543,1),new P.ptr(7545,7614,1),new P.ptr(7680,7935,1),new P.ptr(8305,8305,1),new P.ptr(8319,8319,1),new P.ptr(8336,8348,1),new P.ptr(8490,8491,1),new P.ptr(8498,8498,1),new P.ptr(8526,8526,1),new P.ptr(8544,8584,1),new P.ptr(11360,11391,1),new P.ptr(42786,42887,1),new P.ptr(42891,42925,1),new P.ptr(42928,42935,1),new P.ptr(42999,43007,1),new P.ptr(43824,43866,1),new P.ptr(43868,43876,1),new P.ptr(64256,64262,1),new P.ptr(65313,65338,1),new P.ptr(65345,65370,1)]),IM.nil,6);DZ=new O.ptr(new IL([new P.ptr(7168,7223,1),new P.ptr(7227,7241,1),new P.ptr(7245,7247,1)]),IM.nil,0);EA=new O.ptr(new IL([new P.ptr(6400,6430,1),new P.ptr(6432,6443,1),new P.ptr(6448,6459,1),new P.ptr(6464,6464,1),new P.ptr(6468,6479,1)]),IM.nil,0);EB=new O.ptr(new IL([]),new IM([new Q.ptr(67072,67382,1),new Q.ptr(67392,67413,1),new Q.ptr(67424,67431,1)]),0);EC=new O.ptr(new IL([]),new IM([new Q.ptr(65536,65547,1),new Q.ptr(65549,65574,1),new Q.ptr(65576,65594,1),new Q.ptr(65596,65597,1),new Q.ptr(65599,65613,1),new Q.ptr(65616,65629,1),new Q.ptr(65664,65786,1)]),0);ED=new O.ptr(new IL([new P.ptr(42192,42239,1)]),IM.nil,0);EE=new O.ptr(new IL([]),new IM([new Q.ptr(66176,66204,1)]),0);EF=new O.ptr(new IL([]),new IM([new Q.ptr(67872,67897,1),new Q.ptr(67903,67903,1)]),0);EG=new O.ptr(new IL([]),new IM([new Q.ptr(69968,70006,1)]),0);EH=new O.ptr(new IL([new P.ptr(3329,3331,1),new P.ptr(3333,3340,1),new P.ptr(3342,3344,1),new P.ptr(3346,3386,1),new P.ptr(3389,3396,1),new P.ptr(3398,3400,1),new P.ptr(3402,3406,1),new P.ptr(3415,3415,1),new P.ptr(3423,3427,1),new P.ptr(3430,3445,1),new P.ptr(3449,3455,1)]),IM.nil,0);EI=new O.ptr(new IL([new P.ptr(2112,2139,1),new P.ptr(2142,2142,1)]),IM.nil,0);EJ=new O.ptr(new IL([]),new IM([new Q.ptr(68288,68326,1),new Q.ptr(68331,68342,1)]),0);EK=new O.ptr(new IL([new P.ptr(43744,43766,1),new P.ptr(43968,44013,1),new P.ptr(44016,44025,1)]),IM.nil,0);EL=new O.ptr(new IL([]),new IM([new Q.ptr(124928,125124,1),new Q.ptr(125127,125142,1)]),0);EM=new O.ptr(new IL([]),new IM([new Q.ptr(68000,68023,1),new Q.ptr(68028,68047,1),new Q.ptr(68050,68095,1)]),0);EN=new O.ptr(new IL([]),new IM([new Q.ptr(67968,67999,1)]),0);EO=new O.ptr(new IL([]),new IM([new Q.ptr(93952,94020,1),new Q.ptr(94032,94078,1),new Q.ptr(94095,94111,1)]),0);EP=new O.ptr(new IL([]),new IM([new Q.ptr(71168,71236,1),new Q.ptr(71248,71257,1)]),0);EQ=new O.ptr(new IL([new P.ptr(6144,6145,1),new P.ptr(6148,6148,1),new P.ptr(6150,6158,1),new P.ptr(6160,6169,1),new P.ptr(6176,6263,1),new P.ptr(6272,6314,1)]),IM.nil,0);ER=new O.ptr(new IL([]),new IM([new Q.ptr(92736,92766,1),new Q.ptr(92768,92777,1),new Q.ptr(92782,92783,1)]),0);ES=new O.ptr(new IL([]),new IM([new Q.ptr(70272,70278,1),new Q.ptr(70280,70280,1),new Q.ptr(70282,70285,1),new Q.ptr(70287,70301,1),new Q.ptr(70303,70313,1)]),0);ET=new O.ptr(new IL([new P.ptr(4096,4255,1),new P.ptr(43488,43518,1),new P.ptr(43616,43647,1)]),IM.nil,0);EU=new O.ptr(new IL([]),new IM([new Q.ptr(67712,67742,1),new Q.ptr(67751,67759,1)]),0);EV=new O.ptr(new IL([new P.ptr(6528,6571,1),new P.ptr(6576,6601,1),new P.ptr(6608,6618,1),new P.ptr(6622,6623,1)]),IM.nil,0);EW=new O.ptr(new IL([new P.ptr(1984,2042,1)]),IM.nil,0);EX=new O.ptr(new IL([new P.ptr(5760,5788,1)]),IM.nil,0);EY=new O.ptr(new IL([new P.ptr(7248,7295,1)]),IM.nil,0);EZ=new O.ptr(new IL([]),new IM([new Q.ptr(68736,68786,1),new Q.ptr(68800,68850,1),new Q.ptr(68858,68863,1)]),0);FA=new O.ptr(new IL([]),new IM([new Q.ptr(66304,66339,1)]),0);FB=new O.ptr(new IL([]),new IM([new Q.ptr(68224,68255,1)]),0);FC=new O.ptr(new IL([]),new IM([new Q.ptr(66384,66426,1)]),0);FD=new O.ptr(new IL([]),new IM([new Q.ptr(66464,66499,1),new Q.ptr(66504,66517,1)]),0);FE=new O.ptr(new IL([]),new IM([new Q.ptr(68192,68223,1)]),0);FF=new O.ptr(new IL([]),new IM([new Q.ptr(68608,68680,1)]),0);FG=new O.ptr(new IL([new P.ptr(2817,2819,1),new P.ptr(2821,2828,1),new P.ptr(2831,2832,1),new P.ptr(2835,2856,1),new P.ptr(2858,2864,1),new P.ptr(2866,2867,1),new P.ptr(2869,2873,1),new P.ptr(2876,2884,1),new P.ptr(2887,2888,1),new P.ptr(2891,2893,1),new P.ptr(2902,2903,1),new P.ptr(2908,2909,1),new P.ptr(2911,2915,1),new P.ptr(2918,2935,1)]),IM.nil,0);FH=new O.ptr(new IL([]),new IM([new Q.ptr(66688,66717,1),new Q.ptr(66720,66729,1)]),0);FI=new O.ptr(new IL([]),new IM([new Q.ptr(92928,92997,1),new Q.ptr(93008,93017,1),new Q.ptr(93019,93025,1),new Q.ptr(93027,93047,1),new Q.ptr(93053,93071,1)]),0);FJ=new O.ptr(new IL([]),new IM([new Q.ptr(67680,67711,1)]),0);FK=new O.ptr(new IL([]),new IM([new Q.ptr(72384,72440,1)]),0);FL=new O.ptr(new IL([new P.ptr(43072,43127,1)]),IM.nil,0);FM=new O.ptr(new IL([]),new IM([new Q.ptr(67840,67867,1),new Q.ptr(67871,67871,1)]),0);FN=new O.ptr(new IL([]),new IM([new Q.ptr(68480,68497,1),new Q.ptr(68505,68508,1),new Q.ptr(68521,68527,1)]),0);FO=new O.ptr(new IL([new P.ptr(43312,43347,1),new P.ptr(43359,43359,1)]),IM.nil,0);FP=new O.ptr(new IL([new P.ptr(5792,5866,1),new P.ptr(5870,5880,1)]),IM.nil,0);FQ=new O.ptr(new IL([new P.ptr(2048,2093,1),new P.ptr(2096,2110,1)]),IM.nil,0);FR=new O.ptr(new IL([new P.ptr(43136,43204,1),new P.ptr(43214,43225,1)]),IM.nil,0);FS=new O.ptr(new IL([]),new IM([new Q.ptr(70016,70093,1),new Q.ptr(70096,70111,1)]),0);FT=new O.ptr(new IL([]),new IM([new Q.ptr(66640,66687,1)]),0);FU=new O.ptr(new IL([]),new IM([new Q.ptr(71040,71093,1),new Q.ptr(71096,71133,1)]),0);FV=new O.ptr(new IL([]),new IM([new Q.ptr(120832,121483,1),new Q.ptr(121499,121503,1),new Q.ptr(121505,121519,1)]),0);FW=new O.ptr(new IL([new P.ptr(3458,3459,1),new P.ptr(3461,3478,1),new P.ptr(3482,3505,1),new P.ptr(3507,3515,1),new P.ptr(3517,3517,1),new P.ptr(3520,3526,1),new P.ptr(3530,3530,1),new P.ptr(3535,3540,1),new P.ptr(3542,3542,1),new P.ptr(3544,3551,1),new P.ptr(3558,3567,1),new P.ptr(3570,3572,1)]),new IM([new Q.ptr(70113,70132,1)]),0);FX=new O.ptr(new IL([]),new IM([new Q.ptr(69840,69864,1),new Q.ptr(69872,69881,1)]),0);FY=new O.ptr(new IL([new P.ptr(7040,7103,1),new P.ptr(7360,7367,1)]),IM.nil,0);FZ=new O.ptr(new IL([new P.ptr(43008,43051,1)]),IM.nil,0);GA=new O.ptr(new IL([new P.ptr(1792,1805,1),new P.ptr(1807,1866,1),new P.ptr(1869,1871,1)]),IM.nil,0);GB=new O.ptr(new IL([new P.ptr(5888,5900,1),new P.ptr(5902,5908,1)]),IM.nil,0);GC=new O.ptr(new IL([new P.ptr(5984,5996,1),new P.ptr(5998,6000,1),new P.ptr(6002,6003,1)]),IM.nil,0);GD=new O.ptr(new IL([new P.ptr(6480,6509,1),new P.ptr(6512,6516,1)]),IM.nil,0);GE=new O.ptr(new IL([new P.ptr(6688,6750,1),new P.ptr(6752,6780,1),new P.ptr(6783,6793,1),new P.ptr(6800,6809,1),new P.ptr(6816,6829,1)]),IM.nil,0);GF=new O.ptr(new IL([new P.ptr(43648,43714,1),new P.ptr(43739,43743,1)]),IM.nil,0);GG=new O.ptr(new IL([]),new IM([new Q.ptr(71296,71351,1),new Q.ptr(71360,71369,1)]),0);GH=new O.ptr(new IL([new P.ptr(2946,2947,1),new P.ptr(2949,2954,1),new P.ptr(2958,2960,1),new P.ptr(2962,2965,1),new P.ptr(2969,2970,1),new P.ptr(2972,2972,1),new P.ptr(2974,2975,1),new P.ptr(2979,2980,1),new P.ptr(2984,2986,1),new P.ptr(2990,3001,1),new P.ptr(3006,3010,1),new P.ptr(3014,3016,1),new P.ptr(3018,3021,1),new P.ptr(3024,3024,1),new P.ptr(3031,3031,1),new P.ptr(3046,3066,1)]),IM.nil,0);GI=new O.ptr(new IL([new P.ptr(3072,3075,1),new P.ptr(3077,3084,1),new P.ptr(3086,3088,1),new P.ptr(3090,3112,1),new P.ptr(3114,3129,1),new P.ptr(3133,3140,1),new P.ptr(3142,3144,1),new P.ptr(3146,3149,1),new P.ptr(3157,3158,1),new P.ptr(3160,3162,1),new P.ptr(3168,3171,1),new P.ptr(3174,3183,1),new P.ptr(3192,3199,1)]),IM.nil,0);GJ=new O.ptr(new IL([new P.ptr(1920,1969,1)]),IM.nil,0);GK=new O.ptr(new IL([new P.ptr(3585,3642,1),new P.ptr(3648,3675,1)]),IM.nil,0);GL=new O.ptr(new IL([new P.ptr(3840,3911,1),new P.ptr(3913,3948,1),new P.ptr(3953,3991,1),new P.ptr(3993,4028,1),new P.ptr(4030,4044,1),new P.ptr(4046,4052,1),new P.ptr(4057,4058,1)]),IM.nil,0);GM=new O.ptr(new IL([new P.ptr(11568,11623,1),new P.ptr(11631,11632,1),new P.ptr(11647,11647,1)]),IM.nil,0);GN=new O.ptr(new IL([]),new IM([new Q.ptr(70784,70855,1),new Q.ptr(70864,70873,1)]),0);GO=new O.ptr(new IL([]),new IM([new Q.ptr(66432,66461,1),new Q.ptr(66463,66463,1)]),0);GP=new O.ptr(new IL([new P.ptr(42240,42539,1)]),IM.nil,0);GQ=new O.ptr(new IL([]),new IM([new Q.ptr(71840,71922,1),new Q.ptr(71935,71935,1)]),0);GR=new O.ptr(new IL([new P.ptr(40960,42124,1),new P.ptr(42128,42182,1)]),IM.nil,0);$pkg.Ahom=BR;$pkg.Anatolian_Hieroglyphs=BS;$pkg.Arabic=BT;$pkg.Armenian=BU;$pkg.Avestan=BV;$pkg.Balinese=BW;$pkg.Bamum=BX;$pkg.Bassa_Vah=BY;$pkg.Batak=BZ;$pkg.Bengali=CA;$pkg.Bopomofo=CB;$pkg.Brahmi=CC;$pkg.Braille=CD;$pkg.Buginese=CE;$pkg.Buhid=CF;$pkg.Canadian_Aboriginal=CG;$pkg.Carian=CH;$pkg.Caucasian_Albanian=CI;$pkg.Chakma=CJ;$pkg.Cham=CK;$pkg.Cherokee=CL;$pkg.Common=CM;$pkg.Coptic=CN;$pkg.Cuneiform=CO;$pkg.Cypriot=CP;$pkg.Cyrillic=CQ;$pkg.Deseret=CR;$pkg.Devanagari=CS;$pkg.Duployan=CT;$pkg.Egyptian_Hieroglyphs=CU;$pkg.Elbasan=CV;$pkg.Ethiopic=CW;$pkg.Georgian=CX;$pkg.Glagolitic=CY;$pkg.Gothic=CZ;$pkg.Grantha=DA;$pkg.Greek=DB;$pkg.Gujarati=DC;$pkg.Gurmukhi=DD;$pkg.Han=DE;$pkg.Hangul=DF;$pkg.Hanunoo=DG;$pkg.Hatran=DH;$pkg.Hebrew=DI;$pkg.Hiragana=DJ;$pkg.Imperial_Aramaic=DK;$pkg.Inherited=DL;$pkg.Inscriptional_Pahlavi=DM;$pkg.Inscriptional_Parthian=DN;$pkg.Javanese=DO;$pkg.Kaithi=DP;$pkg.Kannada=DQ;$pkg.Katakana=DR;$pkg.Kayah_Li=DS;$pkg.Kharoshthi=DT;$pkg.Khmer=DU;$pkg.Khojki=DV;$pkg.Khudawadi=DW;$pkg.Lao=DX;$pkg.Latin=DY;$pkg.Lepcha=DZ;$pkg.Limbu=EA;$pkg.Linear_A=EB;$pkg.Linear_B=EC;$pkg.Lisu=ED;$pkg.Lycian=EE;$pkg.Lydian=EF;$pkg.Mahajani=EG;$pkg.Malayalam=EH;$pkg.Mandaic=EI;$pkg.Manichaean=EJ;$pkg.Meetei_Mayek=EK;$pkg.Mende_Kikakui=EL;$pkg.Meroitic_Cursive=EM;$pkg.Meroitic_Hieroglyphs=EN;$pkg.Miao=EO;$pkg.Modi=EP;$pkg.Mongolian=EQ;$pkg.Mro=ER;$pkg.Multani=ES;$pkg.Myanmar=ET;$pkg.Nabataean=EU;$pkg.New_Tai_Lue=EV;$pkg.Nko=EW;$pkg.Ogham=EX;$pkg.Ol_Chiki=EY;$pkg.Old_Hungarian=EZ;$pkg.Old_Italic=FA;$pkg.Old_North_Arabian=FB;$pkg.Old_Permic=FC;$pkg.Old_Persian=FD;$pkg.Old_South_Arabian=FE;$pkg.Old_Turkic=FF;$pkg.Oriya=FG;$pkg.Osmanya=FH;$pkg.Pahawh_Hmong=FI;$pkg.Palmyrene=FJ;$pkg.Pau_Cin_Hau=FK;$pkg.Phags_Pa=FL;$pkg.Phoenician=FM;$pkg.Psalter_Pahlavi=FN;$pkg.Rejang=FO;$pkg.Runic=FP;$pkg.Samaritan=FQ;$pkg.Saurashtra=FR;$pkg.Sharada=FS;$pkg.Shavian=FT;$pkg.Siddham=FU;$pkg.SignWriting=FV;$pkg.Sinhala=FW;$pkg.Sora_Sompeng=FX;$pkg.Sundanese=FY;$pkg.Syloti_Nagri=FZ;$pkg.Syriac=GA;$pkg.Tagalog=GB;$pkg.Tagbanwa=GC;$pkg.Tai_Le=GD;$pkg.Tai_Tham=GE;$pkg.Tai_Viet=GF;$pkg.Takri=GG;$pkg.Tamil=GH;$pkg.Telugu=GI;$pkg.Thaana=GJ;$pkg.Thai=GK;$pkg.Tibetan=GL;$pkg.Tifinagh=GM;$pkg.Tirhuta=GN;$pkg.Ugaritic=GO;$pkg.Vai=GP;$pkg.Warang_Citi=GQ;$pkg.Yi=GR;$pkg.Scripts=$makeMap($String.keyFor,[{k:"Ahom",v:$pkg.Ahom},{k:"Anatolian_Hieroglyphs",v:$pkg.Anatolian_Hieroglyphs},{k:"Arabic",v:$pkg.Arabic},{k:"Armenian",v:$pkg.Armenian},{k:"Avestan",v:$pkg.Avestan},{k:"Balinese",v:$pkg.Balinese},{k:"Bamum",v:$pkg.Bamum},{k:"Bassa_Vah",v:$pkg.Bassa_Vah},{k:"Batak",v:$pkg.Batak},{k:"Bengali",v:$pkg.Bengali},{k:"Bopomofo",v:$pkg.Bopomofo},{k:"Brahmi",v:$pkg.Brahmi},{k:"Braille",v:$pkg.Braille},{k:"Buginese",v:$pkg.Buginese},{k:"Buhid",v:$pkg.Buhid},{k:"Canadian_Aboriginal",v:$pkg.Canadian_Aboriginal},{k:"Carian",v:$pkg.Carian},{k:"Caucasian_Albanian",v:$pkg.Caucasian_Albanian},{k:"Chakma",v:$pkg.Chakma},{k:"Cham",v:$pkg.Cham},{k:"Cherokee",v:$pkg.Cherokee},{k:"Common",v:$pkg.Common},{k:"Coptic",v:$pkg.Coptic},{k:"Cuneiform",v:$pkg.Cuneiform},{k:"Cypriot",v:$pkg.Cypriot},{k:"Cyrillic",v:$pkg.Cyrillic},{k:"Deseret",v:$pkg.Deseret},{k:"Devanagari",v:$pkg.Devanagari},{k:"Duployan",v:$pkg.Duployan},{k:"Egyptian_Hieroglyphs",v:$pkg.Egyptian_Hieroglyphs},{k:"Elbasan",v:$pkg.Elbasan},{k:"Ethiopic",v:$pkg.Ethiopic},{k:"Georgian",v:$pkg.Georgian},{k:"Glagolitic",v:$pkg.Glagolitic},{k:"Gothic",v:$pkg.Gothic},{k:"Grantha",v:$pkg.Grantha},{k:"Greek",v:$pkg.Greek},{k:"Gujarati",v:$pkg.Gujarati},{k:"Gurmukhi",v:$pkg.Gurmukhi},{k:"Han",v:$pkg.Han},{k:"Hangul",v:$pkg.Hangul},{k:"Hanunoo",v:$pkg.Hanunoo},{k:"Hatran",v:$pkg.Hatran},{k:"Hebrew",v:$pkg.Hebrew},{k:"Hiragana",v:$pkg.Hiragana},{k:"Imperial_Aramaic",v:$pkg.Imperial_Aramaic},{k:"Inherited",v:$pkg.Inherited},{k:"Inscriptional_Pahlavi",v:$pkg.Inscriptional_Pahlavi},{k:"Inscriptional_Parthian",v:$pkg.Inscriptional_Parthian},{k:"Javanese",v:$pkg.Javanese},{k:"Kaithi",v:$pkg.Kaithi},{k:"Kannada",v:$pkg.Kannada},{k:"Katakana",v:$pkg.Katakana},{k:"Kayah_Li",v:$pkg.Kayah_Li},{k:"Kharoshthi",v:$pkg.Kharoshthi},{k:"Khmer",v:$pkg.Khmer},{k:"Khojki",v:$pkg.Khojki},{k:"Khudawadi",v:$pkg.Khudawadi},{k:"Lao",v:$pkg.Lao},{k:"Latin",v:$pkg.Latin},{k:"Lepcha",v:$pkg.Lepcha},{k:"Limbu",v:$pkg.Limbu},{k:"Linear_A",v:$pkg.Linear_A},{k:"Linear_B",v:$pkg.Linear_B},{k:"Lisu",v:$pkg.Lisu},{k:"Lycian",v:$pkg.Lycian},{k:"Lydian",v:$pkg.Lydian},{k:"Mahajani",v:$pkg.Mahajani},{k:"Malayalam",v:$pkg.Malayalam},{k:"Mandaic",v:$pkg.Mandaic},{k:"Manichaean",v:$pkg.Manichaean},{k:"Meetei_Mayek",v:$pkg.Meetei_Mayek},{k:"Mende_Kikakui",v:$pkg.Mende_Kikakui},{k:"Meroitic_Cursive",v:$pkg.Meroitic_Cursive},{k:"Meroitic_Hieroglyphs",v:$pkg.Meroitic_Hieroglyphs},{k:"Miao",v:$pkg.Miao},{k:"Modi",v:$pkg.Modi},{k:"Mongolian",v:$pkg.Mongolian},{k:"Mro",v:$pkg.Mro},{k:"Multani",v:$pkg.Multani},{k:"Myanmar",v:$pkg.Myanmar},{k:"Nabataean",v:$pkg.Nabataean},{k:"New_Tai_Lue",v:$pkg.New_Tai_Lue},{k:"Nko",v:$pkg.Nko},{k:"Ogham",v:$pkg.Ogham},{k:"Ol_Chiki",v:$pkg.Ol_Chiki},{k:"Old_Hungarian",v:$pkg.Old_Hungarian},{k:"Old_Italic",v:$pkg.Old_Italic},{k:"Old_North_Arabian",v:$pkg.Old_North_Arabian},{k:"Old_Permic",v:$pkg.Old_Permic},{k:"Old_Persian",v:$pkg.Old_Persian},{k:"Old_South_Arabian",v:$pkg.Old_South_Arabian},{k:"Old_Turkic",v:$pkg.Old_Turkic},{k:"Oriya",v:$pkg.Oriya},{k:"Osmanya",v:$pkg.Osmanya},{k:"Pahawh_Hmong",v:$pkg.Pahawh_Hmong},{k:"Palmyrene",v:$pkg.Palmyrene},{k:"Pau_Cin_Hau",v:$pkg.Pau_Cin_Hau},{k:"Phags_Pa",v:$pkg.Phags_Pa},{k:"Phoenician",v:$pkg.Phoenician},{k:"Psalter_Pahlavi",v:$pkg.Psalter_Pahlavi},{k:"Rejang",v:$pkg.Rejang},{k:"Runic",v:$pkg.Runic},{k:"Samaritan",v:$pkg.Samaritan},{k:"Saurashtra",v:$pkg.Saurashtra},{k:"Sharada",v:$pkg.Sharada},{k:"Shavian",v:$pkg.Shavian},{k:"Siddham",v:$pkg.Siddham},{k:"SignWriting",v:$pkg.SignWriting},{k:"Sinhala",v:$pkg.Sinhala},{k:"Sora_Sompeng",v:$pkg.Sora_Sompeng},{k:"Sundanese",v:$pkg.Sundanese},{k:"Syloti_Nagri",v:$pkg.Syloti_Nagri},{k:"Syriac",v:$pkg.Syriac},{k:"Tagalog",v:$pkg.Tagalog},{k:"Tagbanwa",v:$pkg.Tagbanwa},{k:"Tai_Le",v:$pkg.Tai_Le},{k:"Tai_Tham",v:$pkg.Tai_Tham},{k:"Tai_Viet",v:$pkg.Tai_Viet},{k:"Takri",v:$pkg.Takri},{k:"Tamil",v:$pkg.Tamil},{k:"Telugu",v:$pkg.Telugu},{k:"Thaana",v:$pkg.Thaana},{k:"Thai",v:$pkg.Thai},{k:"Tibetan",v:$pkg.Tibetan},{k:"Tifinagh",v:$pkg.Tifinagh},{k:"Tirhuta",v:$pkg.Tirhuta},{k:"Ugaritic",v:$pkg.Ugaritic},{k:"Vai",v:$pkg.Vai},{k:"Warang_Citi",v:$pkg.Warang_Citi},{k:"Yi",v:$pkg.Yi}]);HX=new O.ptr(new IL([new P.ptr(9,13,1),new P.ptr(32,32,1),new P.ptr(133,133,1),new P.ptr(160,160,1),new P.ptr(5760,5760,1),new P.ptr(8192,8202,1),new P.ptr(8232,8233,1),new P.ptr(8239,8239,1),new P.ptr(8287,8287,1),new P.ptr(12288,12288,1)]),IM.nil,4);$pkg.White_Space=HX;HY=new IP([new R.ptr(65,90,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(97,122,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(181,181,$toNativeArray($kindInt32,[743,0,743])),new R.ptr(192,214,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(216,222,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(224,246,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(248,254,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(255,255,$toNativeArray($kindInt32,[121,0,121])),new R.ptr(256,303,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(304,304,$toNativeArray($kindInt32,[0,-199,0])),new R.ptr(305,305,$toNativeArray($kindInt32,[-232,0,-232])),new R.ptr(306,311,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(313,328,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(330,375,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(376,376,$toNativeArray($kindInt32,[0,-121,0])),new R.ptr(377,382,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(383,383,$toNativeArray($kindInt32,[-300,0,-300])),new R.ptr(384,384,$toNativeArray($kindInt32,[195,0,195])),new R.ptr(385,385,$toNativeArray($kindInt32,[0,210,0])),new R.ptr(386,389,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(390,390,$toNativeArray($kindInt32,[0,206,0])),new R.ptr(391,392,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(393,394,$toNativeArray($kindInt32,[0,205,0])),new R.ptr(395,396,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(398,398,$toNativeArray($kindInt32,[0,79,0])),new R.ptr(399,399,$toNativeArray($kindInt32,[0,202,0])),new R.ptr(400,400,$toNativeArray($kindInt32,[0,203,0])),new R.ptr(401,402,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(403,403,$toNativeArray($kindInt32,[0,205,0])),new R.ptr(404,404,$toNativeArray($kindInt32,[0,207,0])),new R.ptr(405,405,$toNativeArray($kindInt32,[97,0,97])),new R.ptr(406,406,$toNativeArray($kindInt32,[0,211,0])),new R.ptr(407,407,$toNativeArray($kindInt32,[0,209,0])),new R.ptr(408,409,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(410,410,$toNativeArray($kindInt32,[163,0,163])),new R.ptr(412,412,$toNativeArray($kindInt32,[0,211,0])),new R.ptr(413,413,$toNativeArray($kindInt32,[0,213,0])),new R.ptr(414,414,$toNativeArray($kindInt32,[130,0,130])),new R.ptr(415,415,$toNativeArray($kindInt32,[0,214,0])),new R.ptr(416,421,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(422,422,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(423,424,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(425,425,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(428,429,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(430,430,$toNativeArray($kindInt32,[0,218,0])),new R.ptr(431,432,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(433,434,$toNativeArray($kindInt32,[0,217,0])),new R.ptr(435,438,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(439,439,$toNativeArray($kindInt32,[0,219,0])),new R.ptr(440,441,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(444,445,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(447,447,$toNativeArray($kindInt32,[56,0,56])),new R.ptr(452,452,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(453,453,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(454,454,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(455,455,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(456,456,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(457,457,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(458,458,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(459,459,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(460,460,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(461,476,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(477,477,$toNativeArray($kindInt32,[-79,0,-79])),new R.ptr(478,495,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(497,497,$toNativeArray($kindInt32,[0,2,1])),new R.ptr(498,498,$toNativeArray($kindInt32,[-1,1,0])),new R.ptr(499,499,$toNativeArray($kindInt32,[-2,0,-1])),new R.ptr(500,501,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(502,502,$toNativeArray($kindInt32,[0,-97,0])),new R.ptr(503,503,$toNativeArray($kindInt32,[0,-56,0])),new R.ptr(504,543,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(544,544,$toNativeArray($kindInt32,[0,-130,0])),new R.ptr(546,563,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(570,570,$toNativeArray($kindInt32,[0,10795,0])),new R.ptr(571,572,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(573,573,$toNativeArray($kindInt32,[0,-163,0])),new R.ptr(574,574,$toNativeArray($kindInt32,[0,10792,0])),new R.ptr(575,576,$toNativeArray($kindInt32,[10815,0,10815])),new R.ptr(577,578,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(579,579,$toNativeArray($kindInt32,[0,-195,0])),new R.ptr(580,580,$toNativeArray($kindInt32,[0,69,0])),new R.ptr(581,581,$toNativeArray($kindInt32,[0,71,0])),new R.ptr(582,591,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(592,592,$toNativeArray($kindInt32,[10783,0,10783])),new R.ptr(593,593,$toNativeArray($kindInt32,[10780,0,10780])),new R.ptr(594,594,$toNativeArray($kindInt32,[10782,0,10782])),new R.ptr(595,595,$toNativeArray($kindInt32,[-210,0,-210])),new R.ptr(596,596,$toNativeArray($kindInt32,[-206,0,-206])),new R.ptr(598,599,$toNativeArray($kindInt32,[-205,0,-205])),new R.ptr(601,601,$toNativeArray($kindInt32,[-202,0,-202])),new R.ptr(603,603,$toNativeArray($kindInt32,[-203,0,-203])),new R.ptr(604,604,$toNativeArray($kindInt32,[42319,0,42319])),new R.ptr(608,608,$toNativeArray($kindInt32,[-205,0,-205])),new R.ptr(609,609,$toNativeArray($kindInt32,[42315,0,42315])),new R.ptr(611,611,$toNativeArray($kindInt32,[-207,0,-207])),new R.ptr(613,613,$toNativeArray($kindInt32,[42280,0,42280])),new R.ptr(614,614,$toNativeArray($kindInt32,[42308,0,42308])),new R.ptr(616,616,$toNativeArray($kindInt32,[-209,0,-209])),new R.ptr(617,617,$toNativeArray($kindInt32,[-211,0,-211])),new R.ptr(619,619,$toNativeArray($kindInt32,[10743,0,10743])),new R.ptr(620,620,$toNativeArray($kindInt32,[42305,0,42305])),new R.ptr(623,623,$toNativeArray($kindInt32,[-211,0,-211])),new R.ptr(625,625,$toNativeArray($kindInt32,[10749,0,10749])),new R.ptr(626,626,$toNativeArray($kindInt32,[-213,0,-213])),new R.ptr(629,629,$toNativeArray($kindInt32,[-214,0,-214])),new R.ptr(637,637,$toNativeArray($kindInt32,[10727,0,10727])),new R.ptr(640,640,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(643,643,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(647,647,$toNativeArray($kindInt32,[42282,0,42282])),new R.ptr(648,648,$toNativeArray($kindInt32,[-218,0,-218])),new R.ptr(649,649,$toNativeArray($kindInt32,[-69,0,-69])),new R.ptr(650,651,$toNativeArray($kindInt32,[-217,0,-217])),new R.ptr(652,652,$toNativeArray($kindInt32,[-71,0,-71])),new R.ptr(658,658,$toNativeArray($kindInt32,[-219,0,-219])),new R.ptr(669,669,$toNativeArray($kindInt32,[42261,0,42261])),new R.ptr(670,670,$toNativeArray($kindInt32,[42258,0,42258])),new R.ptr(837,837,$toNativeArray($kindInt32,[84,0,84])),new R.ptr(880,883,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(886,887,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(891,893,$toNativeArray($kindInt32,[130,0,130])),new R.ptr(895,895,$toNativeArray($kindInt32,[0,116,0])),new R.ptr(902,902,$toNativeArray($kindInt32,[0,38,0])),new R.ptr(904,906,$toNativeArray($kindInt32,[0,37,0])),new R.ptr(908,908,$toNativeArray($kindInt32,[0,64,0])),new R.ptr(910,911,$toNativeArray($kindInt32,[0,63,0])),new R.ptr(913,929,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(931,939,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(940,940,$toNativeArray($kindInt32,[-38,0,-38])),new R.ptr(941,943,$toNativeArray($kindInt32,[-37,0,-37])),new R.ptr(945,961,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(962,962,$toNativeArray($kindInt32,[-31,0,-31])),new R.ptr(963,971,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(972,972,$toNativeArray($kindInt32,[-64,0,-64])),new R.ptr(973,974,$toNativeArray($kindInt32,[-63,0,-63])),new R.ptr(975,975,$toNativeArray($kindInt32,[0,8,0])),new R.ptr(976,976,$toNativeArray($kindInt32,[-62,0,-62])),new R.ptr(977,977,$toNativeArray($kindInt32,[-57,0,-57])),new R.ptr(981,981,$toNativeArray($kindInt32,[-47,0,-47])),new R.ptr(982,982,$toNativeArray($kindInt32,[-54,0,-54])),new R.ptr(983,983,$toNativeArray($kindInt32,[-8,0,-8])),new R.ptr(984,1007,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1008,1008,$toNativeArray($kindInt32,[-86,0,-86])),new R.ptr(1009,1009,$toNativeArray($kindInt32,[-80,0,-80])),new R.ptr(1010,1010,$toNativeArray($kindInt32,[7,0,7])),new R.ptr(1011,1011,$toNativeArray($kindInt32,[-116,0,-116])),new R.ptr(1012,1012,$toNativeArray($kindInt32,[0,-60,0])),new R.ptr(1013,1013,$toNativeArray($kindInt32,[-96,0,-96])),new R.ptr(1015,1016,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1017,1017,$toNativeArray($kindInt32,[0,-7,0])),new R.ptr(1018,1019,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1021,1023,$toNativeArray($kindInt32,[0,-130,0])),new R.ptr(1024,1039,$toNativeArray($kindInt32,[0,80,0])),new R.ptr(1040,1071,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(1072,1103,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(1104,1119,$toNativeArray($kindInt32,[-80,0,-80])),new R.ptr(1120,1153,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1162,1215,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1216,1216,$toNativeArray($kindInt32,[0,15,0])),new R.ptr(1217,1230,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1231,1231,$toNativeArray($kindInt32,[-15,0,-15])),new R.ptr(1232,1327,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(1329,1366,$toNativeArray($kindInt32,[0,48,0])),new R.ptr(1377,1414,$toNativeArray($kindInt32,[-48,0,-48])),new R.ptr(4256,4293,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(4295,4295,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(4301,4301,$toNativeArray($kindInt32,[0,7264,0])),new R.ptr(5024,5103,$toNativeArray($kindInt32,[0,38864,0])),new R.ptr(5104,5109,$toNativeArray($kindInt32,[0,8,0])),new R.ptr(5112,5117,$toNativeArray($kindInt32,[-8,0,-8])),new R.ptr(7545,7545,$toNativeArray($kindInt32,[35332,0,35332])),new R.ptr(7549,7549,$toNativeArray($kindInt32,[3814,0,3814])),new R.ptr(7680,7829,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(7835,7835,$toNativeArray($kindInt32,[-59,0,-59])),new R.ptr(7838,7838,$toNativeArray($kindInt32,[0,-7615,0])),new R.ptr(7840,7935,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(7936,7943,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7944,7951,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7952,7957,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7960,7965,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7968,7975,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7976,7983,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(7984,7991,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(7992,7999,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8000,8005,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8008,8013,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8017,8017,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8019,8019,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8021,8021,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8023,8023,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8025,8025,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8027,8027,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8029,8029,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8031,8031,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8032,8039,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8040,8047,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8048,8049,$toNativeArray($kindInt32,[74,0,74])),new R.ptr(8050,8053,$toNativeArray($kindInt32,[86,0,86])),new R.ptr(8054,8055,$toNativeArray($kindInt32,[100,0,100])),new R.ptr(8056,8057,$toNativeArray($kindInt32,[128,0,128])),new R.ptr(8058,8059,$toNativeArray($kindInt32,[112,0,112])),new R.ptr(8060,8061,$toNativeArray($kindInt32,[126,0,126])),new R.ptr(8064,8071,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8072,8079,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8080,8087,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8088,8095,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8096,8103,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8104,8111,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8112,8113,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8115,8115,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8120,8121,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8122,8123,$toNativeArray($kindInt32,[0,-74,0])),new R.ptr(8124,8124,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8126,8126,$toNativeArray($kindInt32,[-7205,0,-7205])),new R.ptr(8131,8131,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8136,8139,$toNativeArray($kindInt32,[0,-86,0])),new R.ptr(8140,8140,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8144,8145,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8152,8153,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8154,8155,$toNativeArray($kindInt32,[0,-100,0])),new R.ptr(8160,8161,$toNativeArray($kindInt32,[8,0,8])),new R.ptr(8165,8165,$toNativeArray($kindInt32,[7,0,7])),new R.ptr(8168,8169,$toNativeArray($kindInt32,[0,-8,0])),new R.ptr(8170,8171,$toNativeArray($kindInt32,[0,-112,0])),new R.ptr(8172,8172,$toNativeArray($kindInt32,[0,-7,0])),new R.ptr(8179,8179,$toNativeArray($kindInt32,[9,0,9])),new R.ptr(8184,8185,$toNativeArray($kindInt32,[0,-128,0])),new R.ptr(8186,8187,$toNativeArray($kindInt32,[0,-126,0])),new R.ptr(8188,8188,$toNativeArray($kindInt32,[0,-9,0])),new R.ptr(8486,8486,$toNativeArray($kindInt32,[0,-7517,0])),new R.ptr(8490,8490,$toNativeArray($kindInt32,[0,-8383,0])),new R.ptr(8491,8491,$toNativeArray($kindInt32,[0,-8262,0])),new R.ptr(8498,8498,$toNativeArray($kindInt32,[0,28,0])),new R.ptr(8526,8526,$toNativeArray($kindInt32,[-28,0,-28])),new R.ptr(8544,8559,$toNativeArray($kindInt32,[0,16,0])),new R.ptr(8560,8575,$toNativeArray($kindInt32,[-16,0,-16])),new R.ptr(8579,8580,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(9398,9423,$toNativeArray($kindInt32,[0,26,0])),new R.ptr(9424,9449,$toNativeArray($kindInt32,[-26,0,-26])),new R.ptr(11264,11310,$toNativeArray($kindInt32,[0,48,0])),new R.ptr(11312,11358,$toNativeArray($kindInt32,[-48,0,-48])),new R.ptr(11360,11361,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11362,11362,$toNativeArray($kindInt32,[0,-10743,0])),new R.ptr(11363,11363,$toNativeArray($kindInt32,[0,-3814,0])),new R.ptr(11364,11364,$toNativeArray($kindInt32,[0,-10727,0])),new R.ptr(11365,11365,$toNativeArray($kindInt32,[-10795,0,-10795])),new R.ptr(11366,11366,$toNativeArray($kindInt32,[-10792,0,-10792])),new R.ptr(11367,11372,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11373,11373,$toNativeArray($kindInt32,[0,-10780,0])),new R.ptr(11374,11374,$toNativeArray($kindInt32,[0,-10749,0])),new R.ptr(11375,11375,$toNativeArray($kindInt32,[0,-10783,0])),new R.ptr(11376,11376,$toNativeArray($kindInt32,[0,-10782,0])),new R.ptr(11378,11379,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11381,11382,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11390,11391,$toNativeArray($kindInt32,[0,-10815,0])),new R.ptr(11392,11491,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11499,11502,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11506,11507,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(11520,11557,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(11559,11559,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(11565,11565,$toNativeArray($kindInt32,[-7264,0,-7264])),new R.ptr(42560,42605,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42624,42651,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42786,42799,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42802,42863,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42873,42876,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42877,42877,$toNativeArray($kindInt32,[0,-35332,0])),new R.ptr(42878,42887,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42891,42892,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42893,42893,$toNativeArray($kindInt32,[0,-42280,0])),new R.ptr(42896,42899,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42902,42921,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(42922,42922,$toNativeArray($kindInt32,[0,-42308,0])),new R.ptr(42923,42923,$toNativeArray($kindInt32,[0,-42319,0])),new R.ptr(42924,42924,$toNativeArray($kindInt32,[0,-42315,0])),new R.ptr(42925,42925,$toNativeArray($kindInt32,[0,-42305,0])),new R.ptr(42928,42928,$toNativeArray($kindInt32,[0,-42258,0])),new R.ptr(42929,42929,$toNativeArray($kindInt32,[0,-42282,0])),new R.ptr(42930,42930,$toNativeArray($kindInt32,[0,-42261,0])),new R.ptr(42931,42931,$toNativeArray($kindInt32,[0,928,0])),new R.ptr(42932,42935,$toNativeArray($kindInt32,[1114112,1114112,1114112])),new R.ptr(43859,43859,$toNativeArray($kindInt32,[-928,0,-928])),new R.ptr(43888,43967,$toNativeArray($kindInt32,[-38864,0,-38864])),new R.ptr(65313,65338,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(65345,65370,$toNativeArray($kindInt32,[-32,0,-32])),new R.ptr(66560,66599,$toNativeArray($kindInt32,[0,40,0])),new R.ptr(66600,66639,$toNativeArray($kindInt32,[-40,0,-40])),new R.ptr(68736,68786,$toNativeArray($kindInt32,[0,64,0])),new R.ptr(68800,68850,$toNativeArray($kindInt32,[-64,0,-64])),new R.ptr(71840,71871,$toNativeArray($kindInt32,[0,32,0])),new R.ptr(71872,71903,$toNativeArray($kindInt32,[-32,0,-32]))]);$pkg.CaseRanges=HY;HZ=$toNativeArray($kindUint8,[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,144,130,130,130,136,130,130,130,130,130,130,136,130,130,130,130,132,132,132,132,132,132,132,132,132,132,130,130,136,136,136,130,130,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,130,130,130,136,130,136,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,130,136,130,136,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,16,130,136,136,136,136,136,130,136,136,224,130,136,0,136,136,136,136,132,132,136,192,130,130,136,132,224,130,132,132,132,130,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,160,136,160,160,160,160,160,160,160,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,136,192,192,192,192,192,192,192,192]);IA=new IQ([new AF.ptr(75,107),new AF.ptr(83,115),new AF.ptr(107,8490),new AF.ptr(115,383),new AF.ptr(181,924),new AF.ptr(197,229),new AF.ptr(223,7838),new AF.ptr(229,8491),new AF.ptr(304,304),new AF.ptr(305,305),new AF.ptr(383,83),new AF.ptr(452,453),new AF.ptr(453,454),new AF.ptr(454,452),new AF.ptr(455,456),new AF.ptr(456,457),new AF.ptr(457,455),new AF.ptr(458,459),new AF.ptr(459,460),new AF.ptr(460,458),new AF.ptr(497,498),new AF.ptr(498,499),new AF.ptr(499,497),new AF.ptr(837,921),new AF.ptr(914,946),new AF.ptr(917,949),new AF.ptr(920,952),new AF.ptr(921,953),new AF.ptr(922,954),new AF.ptr(924,956),new AF.ptr(928,960),new AF.ptr(929,961),new AF.ptr(931,962),new AF.ptr(934,966),new AF.ptr(937,969),new AF.ptr(946,976),new AF.ptr(949,1013),new AF.ptr(952,977),new AF.ptr(953,8126),new AF.ptr(954,1008),new AF.ptr(956,181),new AF.ptr(960,982),new AF.ptr(961,1009),new AF.ptr(962,963),new AF.ptr(963,931),new AF.ptr(966,981),new AF.ptr(969,8486),new AF.ptr(976,914),new AF.ptr(977,1012),new AF.ptr(981,934),new AF.ptr(982,928),new AF.ptr(1008,922),new AF.ptr(1009,929),new AF.ptr(1012,920),new AF.ptr(1013,917),new AF.ptr(7776,7777),new AF.ptr(7777,7835),new AF.ptr(7835,7776),new AF.ptr(7838,223),new AF.ptr(8126,837),new AF.ptr(8486,937),new AF.ptr(8490,75),new AF.ptr(8491,197)]);IB=new O.ptr(new IL([new P.ptr(924,956,32)]),IM.nil,0);IC=new O.ptr(new IL([new P.ptr(181,837,656)]),IM.nil,0);ID=new O.ptr(new IL([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IM.nil,0);IE=new O.ptr(new IL([new P.ptr(837,837,1)]),IM.nil,0);IF=new O.ptr(new IL([new P.ptr(65,90,1),new P.ptr(192,214,1),new P.ptr(216,222,1),new P.ptr(256,302,2),new P.ptr(306,310,2),new P.ptr(313,327,2),new P.ptr(330,376,2),new P.ptr(377,381,2),new P.ptr(385,386,1),new P.ptr(388,390,2),new P.ptr(391,393,2),new P.ptr(394,395,1),new P.ptr(398,401,1),new P.ptr(403,404,1),new P.ptr(406,408,1),new P.ptr(412,413,1),new P.ptr(415,416,1),new P.ptr(418,422,2),new P.ptr(423,425,2),new P.ptr(428,430,2),new P.ptr(431,433,2),new P.ptr(434,435,1),new P.ptr(437,439,2),new P.ptr(440,444,4),new P.ptr(452,453,1),new P.ptr(455,456,1),new P.ptr(458,459,1),new P.ptr(461,475,2),new P.ptr(478,494,2),new P.ptr(497,498,1),new P.ptr(500,502,2),new P.ptr(503,504,1),new P.ptr(506,562,2),new P.ptr(570,571,1),new P.ptr(573,574,1),new P.ptr(577,579,2),new P.ptr(580,582,1),new P.ptr(584,590,2),new P.ptr(837,880,43),new P.ptr(882,886,4),new P.ptr(895,902,7),new P.ptr(904,906,1),new P.ptr(908,910,2),new P.ptr(911,913,2),new P.ptr(914,929,1),new P.ptr(931,939,1),new P.ptr(975,984,9),new P.ptr(986,1006,2),new P.ptr(1012,1015,3),new P.ptr(1017,1018,1),new P.ptr(1021,1071,1),new P.ptr(1120,1152,2),new P.ptr(1162,1216,2),new P.ptr(1217,1229,2),new P.ptr(1232,1326,2),new P.ptr(1329,1366,1),new P.ptr(4256,4293,1),new P.ptr(4295,4301,6),new P.ptr(5024,5109,1),new P.ptr(7680,7828,2),new P.ptr(7838,7934,2),new P.ptr(7944,7951,1),new P.ptr(7960,7965,1),new P.ptr(7976,7983,1),new P.ptr(7992,7999,1),new P.ptr(8008,8013,1),new P.ptr(8025,8031,2),new P.ptr(8040,8047,1),new P.ptr(8072,8079,1),new P.ptr(8088,8095,1),new P.ptr(8104,8111,1),new P.ptr(8120,8124,1),new P.ptr(8136,8140,1),new P.ptr(8152,8155,1),new P.ptr(8168,8172,1),new P.ptr(8184,8188,1),new P.ptr(8486,8490,4),new P.ptr(8491,8498,7),new P.ptr(8579,11264,2685),new P.ptr(11265,11310,1),new P.ptr(11360,11362,2),new P.ptr(11363,11364,1),new P.ptr(11367,11373,2),new P.ptr(11374,11376,1),new P.ptr(11378,11381,3),new P.ptr(11390,11392,1),new P.ptr(11394,11490,2),new P.ptr(11499,11501,2),new P.ptr(11506,42560,31054),new P.ptr(42562,42604,2),new P.ptr(42624,42650,2),new P.ptr(42786,42798,2),new P.ptr(42802,42862,2),new P.ptr(42873,42877,2),new P.ptr(42878,42886,2),new P.ptr(42891,42893,2),new P.ptr(42896,42898,2),new P.ptr(42902,42922,2),new P.ptr(42923,42925,1),new P.ptr(42928,42932,1),new P.ptr(42934,65313,22379),new P.ptr(65314,65338,1)]),new IM([new Q.ptr(66560,66599,1),new Q.ptr(68736,68786,1),new Q.ptr(71840,71871,1)]),3);IG=new O.ptr(new IL([new P.ptr(452,454,2),new P.ptr(455,457,2),new P.ptr(458,460,2),new P.ptr(497,499,2),new P.ptr(8064,8071,1),new P.ptr(8080,8087,1),new P.ptr(8096,8103,1),new P.ptr(8115,8131,16),new P.ptr(8179,8179,1)]),IM.nil,0);IH=new O.ptr(new IL([new P.ptr(97,122,1),new P.ptr(181,223,42),new P.ptr(224,246,1),new P.ptr(248,255,1),new P.ptr(257,303,2),new P.ptr(307,311,2),new P.ptr(314,328,2),new P.ptr(331,375,2),new P.ptr(378,382,2),new P.ptr(383,384,1),new P.ptr(387,389,2),new P.ptr(392,396,4),new P.ptr(402,405,3),new P.ptr(409,410,1),new P.ptr(414,417,3),new P.ptr(419,421,2),new P.ptr(424,429,5),new P.ptr(432,436,4),new P.ptr(438,441,3),new P.ptr(445,447,2),new P.ptr(453,454,1),new P.ptr(456,457,1),new P.ptr(459,460,1),new P.ptr(462,476,2),new P.ptr(477,495,2),new P.ptr(498,499,1),new P.ptr(501,505,4),new P.ptr(507,543,2),new P.ptr(547,563,2),new P.ptr(572,575,3),new P.ptr(576,578,2),new P.ptr(583,591,2),new P.ptr(592,596,1),new P.ptr(598,599,1),new P.ptr(601,603,2),new P.ptr(604,608,4),new P.ptr(609,613,2),new P.ptr(614,616,2),new P.ptr(617,619,2),new P.ptr(620,623,3),new P.ptr(625,626,1),new P.ptr(629,637,8),new P.ptr(640,643,3),new P.ptr(647,652,1),new P.ptr(658,669,11),new P.ptr(670,837,167),new P.ptr(881,883,2),new P.ptr(887,891,4),new P.ptr(892,893,1),new P.ptr(940,943,1),new P.ptr(945,974,1),new P.ptr(976,977,1),new P.ptr(981,983,1),new P.ptr(985,1007,2),new P.ptr(1008,1011,1),new P.ptr(1013,1019,3),new P.ptr(1072,1119,1),new P.ptr(1121,1153,2),new P.ptr(1163,1215,2),new P.ptr(1218,1230,2),new P.ptr(1231,1327,2),new P.ptr(1377,1414,1),new P.ptr(5112,5117,1),new P.ptr(7545,7549,4),new P.ptr(7681,7829,2),new P.ptr(7835,7841,6),new P.ptr(7843,7935,2),new P.ptr(7936,7943,1),new P.ptr(7952,7957,1),new P.ptr(7968,7975,1),new P.ptr(7984,7991,1),new P.ptr(8000,8005,1),new P.ptr(8017,8023,2),new P.ptr(8032,8039,1),new P.ptr(8048,8061,1),new P.ptr(8112,8113,1),new P.ptr(8126,8144,18),new P.ptr(8145,8160,15),new P.ptr(8161,8165,4),new P.ptr(8526,8580,54),new P.ptr(11312,11358,1),new P.ptr(11361,11365,4),new P.ptr(11366,11372,2),new P.ptr(11379,11382,3),new P.ptr(11393,11491,2),new P.ptr(11500,11502,2),new P.ptr(11507,11520,13),new P.ptr(11521,11557,1),new P.ptr(11559,11565,6),new P.ptr(42561,42605,2),new P.ptr(42625,42651,2),new P.ptr(42787,42799,2),new P.ptr(42803,42863,2),new P.ptr(42874,42876,2),new P.ptr(42879,42887,2),new P.ptr(42892,42897,5),new P.ptr(42899,42903,4),new P.ptr(42905,42921,2),new P.ptr(42933,42935,2),new P.ptr(43859,43888,29),new P.ptr(43889,43967,1),new P.ptr(65345,65370,1)]),new IM([new Q.ptr(66600,66639,1),new Q.ptr(68800,68850,1),new Q.ptr(71872,71903,1)]),4);II=new O.ptr(new IL([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IM.nil,0);IJ=new O.ptr(new IL([new P.ptr(921,953,32),new P.ptr(8126,8126,1)]),IM.nil,0);$pkg.FoldCategory=$makeMap($String.keyFor,[{k:"Common",v:IB},{k:"Greek",v:IC},{k:"Inherited",v:ID},{k:"L",v:IE},{k:"Ll",v:IF},{k:"Lt",v:IG},{k:"Lu",v:IH},{k:"M",v:II},{k:"Mn",v:IJ}]);$pkg.FoldScript=$makeMap($String.keyFor,[]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["unicode/utf8"]=(function(){var $pkg={},$init,A,B,C,E,F,G,H,I,J,K,L,M;A=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c=0;d=false;e=a.$length;if(e<1){f=65533;g=0;h=true;b=f;c=g;d=h;return[b,c,d];}i=(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);if(i<128){j=(i>>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=(2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=(3>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0);k=1;l=false;b=j;c=k;d=l;return[b,c,d];}if(i<192){m=65533;n=1;o=false;b=m;c=n;d=o;return[b,c,d];}if(e<2){p=65533;q=1;r=true;b=p;c=q;d=r;return[b,c,d];}s=a.charCodeAt(1);if(s<128||192<=s){t=65533;u=1;v=false;b=t;c=u;d=v;return[b,c,d];}if(i<224){b=((((i&31)>>>0)>>0)<<6>>0)|(((s&63)>>>0)>>0);if(b<=127){w=65533;x=1;y=false;b=w;c=x;d=y;return[b,c,d];}z=b;aa=2;ab=false;b=z;c=aa;d=ab;return[b,c,d];}if(e<3){ac=65533;ad=1;ae=true;b=ac;c=ad;d=ae;return[b,c,d];}af=a.charCodeAt(2);if(af<128||192<=af){ag=65533;ah=1;ai=false;b=ag;c=ah;d=ai;return[b,c,d];}if(i<240){b=(((((i&15)>>>0)>>0)<<12>>0)|((((s&63)>>>0)>>0)<<6>>0))|(((af&63)>>>0)>>0);if(b<=2047){aj=65533;ak=1;al=false;b=aj;c=ak;d=al;return[b,c,d];}if(55296<=b&&b<=57343){am=65533;an=1;ao=false;b=am;c=an;d=ao;return[b,c,d];}ap=b;aq=3;ar=false;b=ap;c=aq;d=ar;return[b,c,d];}if(e<4){as=65533;at=1;au=true;b=as;c=at;d=au;return[b,c,d];}av=a.charCodeAt(3);if(av<128||192<=av){aw=65533;ax=1;ay=false;b=aw;c=ax;d=ay;return[b,c,d];}if(i<248){b=((((((i&7)>>>0)>>0)<<18>>0)|((((s&63)>>>0)>>0)<<12>>0))|((((af&63)>>>0)>>0)<<6>>0))|(((av&63)>>>0)>>0);if(b<=65535||1114111>0;b=(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g])>>0);if(b<128){h=b;i=1;b=h;c=i;return[b,c];}j=d-4>>0;if(j<0){j=0;}g=g-(1)>>0;while(true){if(!(g>=j)){break;}if(M(((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]))){break;}g=g-(1)>>0;}if(g<0){g=0;}k=E($subslice(a,g,d));b=k[0];c=k[1];if(!(((g+c>>0)===d))){l=65533;m=1;b=l;c=m;return[b,c];}n=b;o=c;b=n;c=o;return[b,c];};$pkg.DecodeLastRune=G;H=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=0;c=0;d=a.length;if(d===0){e=65533;f=0;b=e;c=f;return[b,c];}g=d-1>>0;b=(a.charCodeAt(g)>>0);if(b<128){h=b;i=1;b=h;c=i;return[b,c];}j=d-4>>0;if(j<0){j=0;}g=g-(1)>>0;while(true){if(!(g>=j)){break;}if(M(a.charCodeAt(g))){break;}g=g-(1)>>0;}if(g<0){g=0;}k=F(a.substring(g,d));b=k[0];c=k[1];if(!(((g+c>>0)===d))){l=65533;m=1;b=l;c=m;return[b,c];}n=b;o=c;b=n;c=o;return[b,c];};$pkg.DecodeLastRuneInString=H;I=function(a){var $ptr,a;if(a<0){return-1;}else if(a<=127){return 1;}else if(a<=2047){return 2;}else if(55296<=a&&a<=57343){return-1;}else if(a<=65535){return 3;}else if(a<=1114111){return 4;}return-1;};$pkg.RuneLen=I;J=function(a,b){var $ptr,a,b,c;c=(b>>>0);if(c<=127){(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=(b<<24>>>24));return 1;}else if(c<=2047){(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((192|((b>>6>>0)<<24>>>24))>>>0));(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((128|(((b<<24>>>24)&63)>>>0))>>>0));return 2;}else if(c>1114111||55296<=c&&c<=57343){b=65533;(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((224|((b>>12>>0)<<24>>>24))>>>0));(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0));(2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=((128|(((b<<24>>>24)&63)>>>0))>>>0));return 3;}else if(c<=65535){(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((224|((b>>12>>0)<<24>>>24))>>>0));(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0));(2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=((128|(((b<<24>>>24)&63)>>>0))>>>0));return 3;}else{(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((240|((b>>18>>0)<<24>>>24))>>>0));(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((128|((((b>>12>>0)<<24>>>24)&63)>>>0))>>>0));(2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=((128|((((b>>6>>0)<<24>>>24)&63)>>>0))>>>0));(3>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+3]=((128|(((b<<24>>>24)&63)>>>0))>>>0));return 4;}};$pkg.EncodeRune=J;K=function(a){var $ptr,a,b,c,d,e;b=0;c=0;c=0;while(true){if(!(b=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b])<128){b=b+(1)>>0;}else{d=E($subslice(a,b));e=d[1];b=b+(e)>>0;}c=c+(1)>>0;}return c;};$pkg.RuneCount=K;L=function(a){var $ptr,a,b,c,d,e;b=0;c=a;d=0;while(true){if(!(d>0;d+=e[1];}return b;};$pkg.RuneCountInString=L;M=function(a){var $ptr,a;return!((((a&192)>>>0)===128));};$pkg.RuneStart=M;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["bytes"]=(function(){var $pkg={},$init,A,B,D,C,H,I,BK,BL,BM,BN,E,F,J,K,L,Q,V,AF,AH,AJ,AK,AR,AS,AT,AY,AZ,BA,BC,BD,BE,BH;A=$packages["errors"];B=$packages["io"];D=$packages["unicode"];C=$packages["unicode/utf8"];H=$pkg.Buffer=$newType(0,$kindStruct,"bytes.Buffer","Buffer","bytes",function(buf_,off_,runeBytes_,bootstrap_,lastRead_){this.$val=this;if(arguments.length===0){this.buf=BL.nil;this.off=0;this.runeBytes=BM.zero();this.bootstrap=BN.zero();this.lastRead=0;return;}this.buf=buf_;this.off=off_;this.runeBytes=runeBytes_;this.bootstrap=bootstrap_;this.lastRead=lastRead_;});I=$pkg.readOp=$newType(4,$kindInt,"bytes.readOp","readOp","bytes",null);BK=$ptrType(H);BL=$sliceType($Uint8);BM=$arrayType($Uint8,4);BN=$arrayType($Uint8,64);E=function(d,e){var $ptr,d,e,f,g,h,i;f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===e){return h;}g++;}return-1;};$pkg.IndexByte=E;F=function(d,e){var $ptr,d,e,f,g,h,i;if(!((d.$length===e.$length))){return false;}f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(!((i===((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h])))){return false;}g++;}return true;};$pkg.Equal=F;H.ptr.prototype.Bytes=function(){var $ptr,d;d=this;return $subslice(d.buf,d.off);};H.prototype.Bytes=function(){return this.$val.Bytes();};H.ptr.prototype.String=function(){var $ptr,d;d=this;if(d===BK.nil){return"";}return $bytesToString($subslice(d.buf,d.off));};H.prototype.String=function(){return this.$val.String();};H.ptr.prototype.Len=function(){var $ptr,d;d=this;return d.buf.$length-d.off>>0;};H.prototype.Len=function(){return this.$val.Len();};H.ptr.prototype.Cap=function(){var $ptr,d;d=this;return d.buf.$capacity;};H.prototype.Cap=function(){return this.$val.Cap();};H.ptr.prototype.Truncate=function(d){var $ptr,d,e;e=this;e.lastRead=0;if(d<0||d>e.Len()){$panic(new $String("bytes.Buffer: truncation out of range"));}else if(d===0){e.off=0;}e.buf=$subslice(e.buf,0,(e.off+d>>0));};H.prototype.Truncate=function(d){return this.$val.Truncate(d);};H.ptr.prototype.Reset=function(){var $ptr,d;d=this;d.Truncate(0);};H.prototype.Reset=function(){return this.$val.Reset();};H.ptr.prototype.grow=function(d){var $ptr,d,e,f,g,h;e=this;f=e.Len();if((f===0)&&!((e.off===0))){e.Truncate(0);}if((e.buf.$length+d>>0)>e.buf.$capacity){g=BL.nil;if(e.buf===BL.nil&&d<=64){g=$subslice(new BL(e.bootstrap),0);}else if((f+d>>0)<=(h=e.buf.$capacity/2,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"))){$copySlice(e.buf,$subslice(e.buf,e.off));g=$subslice(e.buf,0,f);}else{g=J((2*e.buf.$capacity>>0)+d>>0);$copySlice(g,$subslice(e.buf,e.off));}e.buf=g;e.off=0;}e.buf=$subslice(e.buf,0,((e.off+f>>0)+d>>0));return e.off+f>>0;};H.prototype.grow=function(d){return this.$val.grow(d);};H.ptr.prototype.Grow=function(d){var $ptr,d,e,f;e=this;if(d<0){$panic(new $String("bytes.Buffer.Grow: negative count"));}f=e.grow(d);e.buf=$subslice(e.buf,0,f);};H.prototype.Grow=function(d){return this.$val.Grow(d);};H.ptr.prototype.Write=function(d){var $ptr,d,e,f,g,h,i,j;e=0;f=$ifaceNil;g=this;g.lastRead=0;h=g.grow(d.$length);i=$copySlice($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.Write=function(d){return this.$val.Write(d);};H.ptr.prototype.WriteString=function(d){var $ptr,d,e,f,g,h,i,j;e=0;f=$ifaceNil;g=this;g.lastRead=0;h=g.grow(d.length);i=$copyString($subslice(g.buf,h),d);j=$ifaceNil;e=i;f=j;return[e,f];};H.prototype.WriteString=function(d){return this.$val.WriteString(d);};H.ptr.prototype.ReadFrom=function(d){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=new $Int64(0,0);f=$ifaceNil;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);}case 1:h=g.buf.$capacity-g.buf.$length>>0;if(h<512){i=g.buf;if((g.off+h>>0)<512){i=J((2*g.buf.$capacity>>0)+512>>0);}$copySlice(i,$subslice(g.buf,g.off));g.buf=$subslice(i,0,(g.buf.$length-g.off>>0));g.off=0;}k=d.Read($subslice(g.buf,g.buf.$length,g.buf.$capacity));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[0];m=j[1];g.buf=$subslice(g.buf,0,(g.buf.$length+l>>0));e=(n=new $Int64(0,l),new $Int64(e.$high+n.$high,e.$low+n.$low));if($interfaceIsEqual(m,B.EOF)){$s=2;continue;}if(!($interfaceIsEqual(m,$ifaceNil))){o=e;p=m;e=o;f=p;return[e,f];}$s=1;continue;case 2:q=e;r=$ifaceNil;e=q;f=r;return[e,f];}return;}if($f===undefined){$f={$blk:H.ptr.prototype.ReadFrom};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.ReadFrom=function(d){return this.$val.ReadFrom(d);};J=function(d){var $ptr,d,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);$deferred.push([(function(){var $ptr;if(!($interfaceIsEqual($recover(),$ifaceNil))){$panic($pkg.ErrTooLarge);}}),[]]);return $makeSlice(BL,d);}catch(err){$err=err;return BL.nil;}finally{$callDeferred($deferred,$err);}};H.ptr.prototype.WriteTo=function(d){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=new $Int64(0,0);f=$ifaceNil;g=this;g.lastRead=0;if(g.offh){$panic(new $String("bytes.Buffer.WriteTo: invalid Write count"));}g.off=g.off+(k)>>0;e=new $Int64(0,k);if(!($interfaceIsEqual(l,$ifaceNil))){m=e;n=l;e=m;f=n;return[e,f];}if(!((k===h))){o=e;p=B.ErrShortWrite;e=o;f=p;return[e,f];}case 2:g.Truncate(0);return[e,f];}return;}if($f===undefined){$f={$blk:H.ptr.prototype.WriteTo};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.WriteTo=function(d){return this.$val.WriteTo(d);};H.ptr.prototype.WriteByte=function(d){var $ptr,d,e,f,g;e=this;e.lastRead=0;f=e.grow(1);(g=e.buf,((f<0||f>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+f]=d));return $ifaceNil;};H.prototype.WriteByte=function(d){return this.$val.WriteByte(d);};H.ptr.prototype.WriteRune=function(d){var $ptr,d,e,f,g,h,i,j,k;e=0;f=$ifaceNil;g=this;if(d<128){g.WriteByte((d<<24>>>24));h=1;i=$ifaceNil;e=h;f=i;return[e,f];}e=C.EncodeRune($subslice(new BL(g.runeBytes),0),d);g.Write($subslice(new BL(g.runeBytes),0,e));j=e;k=$ifaceNil;e=j;f=k;return[e,f];};H.prototype.WriteRune=function(d){return this.$val.WriteRune(d);};H.ptr.prototype.Read=function(d){var $ptr,d,e,f,g,h,i;e=0;f=$ifaceNil;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);if(d.$length===0){return[e,f];}h=0;i=B.EOF;e=h;f=i;return[e,f];}e=$copySlice(d,$subslice(g.buf,g.off));g.off=g.off+(e)>>0;if(e>0){g.lastRead=2;}return[e,f];};H.prototype.Read=function(d){return this.$val.Read(d);};H.ptr.prototype.Next=function(d){var $ptr,d,e,f,g;e=this;e.lastRead=0;f=e.Len();if(d>f){d=f;}g=$subslice(e.buf,e.off,(e.off+d>>0));e.off=e.off+(d)>>0;if(d>0){e.lastRead=2;}return g;};H.prototype.Next=function(d){return this.$val.Next(d);};H.ptr.prototype.ReadByte=function(){var $ptr,d,e,f,g,h,i,j,k,l;d=0;e=$ifaceNil;f=this;f.lastRead=0;if(f.off>=f.buf.$length){f.Truncate(0);g=0;h=B.EOF;d=g;e=h;return[d,e];}d=(i=f.buf,j=f.off,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));f.off=f.off+(1)>>0;f.lastRead=2;k=d;l=$ifaceNil;d=k;e=l;return[d,e];};H.prototype.ReadByte=function(){return this.$val.ReadByte();};H.ptr.prototype.ReadRune=function(){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;d=0;e=0;f=$ifaceNil;g=this;g.lastRead=0;if(g.off>=g.buf.$length){g.Truncate(0);h=0;i=0;j=B.EOF;d=h;e=i;f=j;return[d,e,f];}g.lastRead=1;m=(k=g.buf,l=g.off,((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]));if(m<128){g.off=g.off+(1)>>0;n=(m>>0);o=1;p=$ifaceNil;d=n;e=o;f=p;return[d,e,f];}q=C.DecodeRune($subslice(g.buf,g.off));d=q[0];r=q[1];g.off=g.off+(r)>>0;s=d;t=r;u=$ifaceNil;d=s;e=t;f=u;return[d,e,f];};H.prototype.ReadRune=function(){return this.$val.ReadRune();};H.ptr.prototype.UnreadRune=function(){var $ptr,d,e,f;d=this;if(!((d.lastRead===1))){return A.New("bytes.Buffer: UnreadRune: previous operation was not ReadRune");}d.lastRead=0;if(d.off>0){e=C.DecodeLastRune($subslice(d.buf,0,d.off));f=e[1];d.off=d.off-(f)>>0;}return $ifaceNil;};H.prototype.UnreadRune=function(){return this.$val.UnreadRune();};H.ptr.prototype.UnreadByte=function(){var $ptr,d;d=this;if(!((d.lastRead===1))&&!((d.lastRead===2))){return A.New("bytes.Buffer: UnreadByte: previous operation was not a read");}d.lastRead=0;if(d.off>0){d.off=d.off-(1)>>0;}return $ifaceNil;};H.prototype.UnreadByte=function(){return this.$val.UnreadByte();};H.ptr.prototype.ReadBytes=function(d){var $ptr,d,e,f,g,h,i;e=BL.nil;f=$ifaceNil;g=this;h=g.readSlice(d);i=h[0];f=h[1];e=$appendSlice(e,i);return[e,f];};H.prototype.ReadBytes=function(d){return this.$val.ReadBytes(d);};H.ptr.prototype.readSlice=function(d){var $ptr,d,e,f,g,h,i,j,k;e=BL.nil;f=$ifaceNil;g=this;h=E($subslice(g.buf,g.off),d);i=(g.off+h>>0)+1>>0;if(h<0){i=g.buf.$length;f=B.EOF;}e=$subslice(g.buf,g.off,i);g.off=i;g.lastRead=2;j=e;k=f;e=j;f=k;return[e,f];};H.prototype.readSlice=function(d){return this.$val.readSlice(d);};H.ptr.prototype.ReadString=function(d){var $ptr,d,e,f,g,h,i,j,k;e="";f=$ifaceNil;g=this;h=g.readSlice(d);i=h[0];f=h[1];j=$bytesToString(i);k=f;e=j;f=k;return[e,f];};H.prototype.ReadString=function(d){return this.$val.ReadString(d);};K=function(d){var $ptr,d;return new H.ptr(d,0,BM.zero(),BN.zero(),0);};$pkg.NewBuffer=K;L=function(d){var $ptr,d;return new H.ptr(new BL($stringToBytes(d)),0,BM.zero(),BN.zero(),0);};$pkg.NewBufferString=L;Q=function(d,e){var $ptr,d,e,f,g,h,i,j;f=e.$length;if(f===0){return 0;}if(f>d.$length){return-1;}g=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);if(f===1){return E(d,g);}h=0;i=$subslice(d,0,((d.$length-f>>0)+1>>0));while(true){if(!(h=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h])===g))){j=E($subslice(i,h),g);if(j<0){break;}h=h+(j)>>0;}if(F($subslice(d,h,(h+f>>0)),e)){return h;}h=h+(1)>>0;}return-1;};$pkg.Index=Q;V=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m;if(e.length>0){f=0;g=0;h=0;while(true){if(!(h=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+h])>>0);if(f<128){g=1;}else{i=C.DecodeRune($subslice(d,h));f=i[0];g=i[1];}j=e;k=0;while(true){if(!(k>0;}}return-1;};$pkg.IndexAny=V;AF=function(d,e){var $ptr,d,e;return d.$length>=e.$length&&F($subslice(d,0,e.$length),e);};$pkg.HasPrefix=AF;AH=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=e.$length;g=0;h=$makeSlice(BL,f);i=0;case 1:if(!(i=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i])>>0);if(k>=128){l=C.DecodeRune($subslice(e,i));k=l[0];j=l[1];}m=d(k);$s=3;case 3:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;if(k>=0){n=C.RuneLen(k);if(n<0){n=3;}if((g+n>>0)>f){f=(f*2>>0)+4>>0;o=$makeSlice(BL,f);$copySlice(o,$subslice(h,0,g));h=o;}g=g+(C.EncodeRune($subslice(h,g,f),k))>>0;}i=i+(j)>>0;$s=1;continue;case 2:return $subslice(h,0,g);}return;}if($f===undefined){$f={$blk:AH};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Map=AH;AJ=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=AH(D.ToUpper,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AJ};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ToUpper=AJ;AK=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=AH(D.ToLower,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AK};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ToLower=AK;AR=function(d,e){var $ptr,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AY(d,e,false);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===-1){return BL.nil;}return $subslice(d,g);}return;}if($f===undefined){$f={$blk:AR};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimLeftFunc=AR;AS=function(d,e){var $ptr,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AZ(d,e,false);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g>=0&&((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])>=128){h=C.DecodeRune($subslice(d,g));i=h[1];g=g+(i)>>0;}else{g=g+(1)>>0;}return $subslice(d,0,g);}return;}if($f===undefined){$f={$blk:AS};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimRightFunc=AS;AT=function(d,e){var $ptr,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AR(d,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=AS(f,e);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AT};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimFunc=AT;AY=function(d,e,f){var $ptr,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;case 1:if(!(g=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])>>0);if(i>=128){j=C.DecodeRune($subslice(d,g));i=j[0];h=j[1];}k=e(i);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if(k===f){$s=3;continue;}$s=4;continue;case 3:return g;case 4:g=g+(h)>>0;$s=1;continue;case 2:return-1;}return;}if($f===undefined){$f={$blk:AY};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AZ=function(d,e,f){var $ptr,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=d.$length;case 1:if(!(g>0)){$s=2;continue;}h=((i=g-1>>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]))>>0);j=1;k=h;l=j;if(k>=128){m=C.DecodeLastRune($subslice(d,0,g));k=m[0];l=m[1];}g=g-(l)>>0;n=e(k);$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(n===f){$s=3;continue;}$s=4;continue;case 3:return g;case 4:$s=1;continue;case 2:return-1;}return;}if($f===undefined){$f={$blk:AZ};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BA=function(d){var $ptr,d;return(function(e){var $ptr,e,f,g,h,i;f=d;g=0;while(true){if(!(g=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])<128){j=((0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])>>0);k=$subslice(d,1);h=j;d=k;}else{l=C.DecodeRune(d);m=l[0];n=l[1];o=m;p=$subslice(d,n);h=o;d=p;}if((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])<128){q=((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0])>>0);r=$subslice(e,1);i=q;e=r;}else{s=C.DecodeRune(e);t=s[0];u=s[1];v=t;w=$subslice(e,u);i=v;e=w;}if(i===h){continue;}if(i>0)-65>>0)){continue;}return false;}z=D.SimpleFold(h);while(true){if(!(!((z===h))&&z=0){return D;}else{return E;}};$pkg.Inf=V;W=function(ao,ap){var $ptr,ao,ap;if(ao===D){return ap>=0;}if(ao===E){return ap<=0;}return false;};$pkg.IsInf=W;X=function(ao){var $ptr,ao,ap;ap=false;ap=!((ao===ao));return ap;};$pkg.IsNaN=X;Y=function(ao,ap){var $ptr,ao,ap;if(ao===0){return ao;}if(ap>=1024){return ao*$parseFloat(B.pow(2,1023))*$parseFloat(B.pow(2,ap-1023>>0));}if(ap<=-1024){return ao*$parseFloat(B.pow(2,-1023))*$parseFloat(B.pow(2,ap+1023>>0));}return ao*$parseFloat(B.pow(2,ap));};$pkg.Ldexp=Y;Z=function(ao){var $ptr,ao;if(!((ao===ao))){return F;}return $parseFloat(B.log(ao));};$pkg.Log=Z;AC=function(ao){var $ptr,ao;return EE(ao);};$pkg.Log2=AC;AH=function(){var $ptr;return F;};$pkg.NaN=AH;AR=function(){var $ptr,ao;ao=new($global.ArrayBuffer)(8);AQ.uint32array=new($global.Uint32Array)(ao);AQ.float32array=new($global.Float32Array)(ao);AQ.float64array=new($global.Float64Array)(ao);};AS=function(ao){var $ptr,ao;AQ.float32array[0]=ao;return AQ.uint32array[0];};$pkg.Float32bits=AS;AT=function(ao){var $ptr,ao;AQ.uint32array[0]=ao;return AQ.float32array[0];};$pkg.Float32frombits=AT;AU=function(ao){var $ptr,ao,ap,aq;AQ.float64array[0]=ao;return(ap=$shiftLeft64(new $Uint64(0,AQ.uint32array[1]),32),aq=new $Uint64(0,AQ.uint32array[0]),new $Uint64(ap.$high+aq.$high,ap.$low+aq.$low));};$pkg.Float64bits=AU;AV=function(ao){var $ptr,ao;AQ.uint32array[0]=(ao.$low>>>0);AQ.uint32array[1]=($shiftRightUint64(ao,32).$low>>>0);return AQ.float64array[0];};$pkg.Float64frombits=AV;AW=function(ao){var $ptr,ao;if(ao<0){return-ao;}else if(ao===0){return 0;}return ao;};BG=function(ao){var $ptr,ao,ap,aq,ar,as,at,au;ap=0;aq=0;if(G(ao)<2.2250738585072014e-308){ar=ao*4.503599627370496e+15;as=-52;ap=ar;aq=as;return[ap,aq];}at=ao;au=0;ap=at;aq=au;return[ap,aq];};BU=function(ao){var $ptr,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az;ap=0;aq=0;if(ao===0){ar=ao;as=0;ap=ar;aq=as;return[ap,aq];}else if(W(ao,0)||X(ao)){at=ao;au=0;ap=at;aq=au;return[ap,aq];}av=BG(ao);ao=av[0];aq=av[1];aw=AU(ao);aq=aq+(((((ax=$shiftRightUint64(aw,52),new $Uint64(ax.$high&0,(ax.$low&2047)>>>0)).$low>>0)-1023>>0)+1>>0))>>0;aw=(ay=new $Uint64(2146435072,0),new $Uint64(aw.$high&~ay.$high,(aw.$low&~ay.$low)>>>0));aw=(az=new $Uint64(1071644672,0),new $Uint64(aw.$high|az.$high,(aw.$low|az.$low)>>>0));ap=AV(aw);return[ap,aq];};EE=function(ao){var $ptr,ao,ap,aq,ar;ap=T(ao);aq=ap[0];ar=ap[1];if(aq===0.5){return(ar-1>>0);}return Z(aq)*1.4426950408889634+ar;};EQ=function(){var $ptr,ao,ap,aq,ar;EO[0]=1;EO[1]=10;ao=2;while(true){if(!(ao<70)){break;}aq=(ap=ao/2,(ap===ap&&ap!==1/0&&ap!==-1/0)?ap>>0:$throwRuntimeError("integer divide by zero"));((ao<0||ao>=EO.length)?$throwRuntimeError("index out of range"):EO[ao]=((aq<0||aq>=EO.length)?$throwRuntimeError("index out of range"):EO[aq])*(ar=ao-aq>>0,((ar<0||ar>=EO.length)?$throwRuntimeError("index out of range"):EO[ar])));ao=ao+(1)>>0;}};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AQ=new FK.ptr(FH.zero(),FI.zero(),FJ.zero());EO=FL.zero();B=$global.Math;C=0;D=1/C;E=-1/C;F=0/C;AR();EQ();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["strconv"]=(function(){var $pkg={},$init,B,A,C,S,Y,AC,AH,AO,AX,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,G,K,L,M,AD,AI,AJ,AK,AP,CF,AQ,CG,BD,BE,BF,BG,BM,D,H,I,J,N,O,P,Q,R,T,U,V,W,X,Z,AA,AB,AE,AF,AG,AL,AM,AN,AR,AS,AT,AU,AV,AW,AY,AZ,BA,BB,BC,BH,BI,BJ,BK,BL,BN,BO,BP,BR,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE;B=$packages["errors"];A=$packages["math"];C=$packages["unicode/utf8"];S=$pkg.NumError=$newType(0,$kindStruct,"strconv.NumError","NumError","strconv",function(Func_,Num_,Err_){this.$val=this;if(arguments.length===0){this.Func="";this.Num="";this.Err=$ifaceNil;return;}this.Func=Func_;this.Num=Num_;this.Err=Err_;});Y=$pkg.decimal=$newType(0,$kindStruct,"strconv.decimal","decimal","strconv",function(d_,nd_,dp_,neg_,trunc_){this.$val=this;if(arguments.length===0){this.d=CN.zero();this.nd=0;this.dp=0;this.neg=false;this.trunc=false;return;}this.d=d_;this.nd=nd_;this.dp=dp_;this.neg=neg_;this.trunc=trunc_;});AC=$pkg.leftCheat=$newType(0,$kindStruct,"strconv.leftCheat","leftCheat","strconv",function(delta_,cutoff_){this.$val=this;if(arguments.length===0){this.delta=0;this.cutoff="";return;}this.delta=delta_;this.cutoff=cutoff_;});AH=$pkg.extFloat=$newType(0,$kindStruct,"strconv.extFloat","extFloat","strconv",function(mant_,exp_,neg_){this.$val=this;if(arguments.length===0){this.mant=new $Uint64(0,0);this.exp=0;this.neg=false;return;}this.mant=mant_;this.exp=exp_;this.neg=neg_;});AO=$pkg.floatInfo=$newType(0,$kindStruct,"strconv.floatInfo","floatInfo","strconv",function(mantbits_,expbits_,bias_){this.$val=this;if(arguments.length===0){this.mantbits=0;this.expbits=0;this.bias=0;return;}this.mantbits=mantbits_;this.expbits=expbits_;this.bias=bias_;});AX=$pkg.decimalSlice=$newType(0,$kindStruct,"strconv.decimalSlice","decimalSlice","strconv",function(d_,nd_,dp_,neg_){this.$val=this;if(arguments.length===0){this.d=CP.nil;this.nd=0;this.dp=0;this.neg=false;return;}this.d=d_;this.nd=nd_;this.dp=dp_;this.neg=neg_;});CH=$sliceType($Int);CI=$sliceType($Float64);CJ=$sliceType($Float32);CK=$sliceType(AC);CL=$sliceType($Uint16);CM=$sliceType($Uint32);CN=$arrayType($Uint8,800);CO=$ptrType(S);CP=$sliceType($Uint8);CQ=$arrayType($Uint8,24);CR=$arrayType($Uint8,32);CS=$ptrType(AO);CT=$arrayType($Uint8,65);CU=$arrayType($Uint8,4);CV=$ptrType(Y);CW=$ptrType(AX);CX=$ptrType(AH);D=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=false;c=$ifaceNil;d=a;if(d==="1"||d==="t"||d==="T"||d==="true"||d==="TRUE"||d==="True"){e=true;f=$ifaceNil;b=e;c=f;return[b,c];}else if(d==="0"||d==="f"||d==="F"||d==="false"||d==="FALSE"||d==="False"){g=false;h=$ifaceNil;b=g;c=h;return[b,c];}i=false;j=T("ParseBool",a);b=i;c=j;return[b,c];};$pkg.ParseBool=D;H=function(a,b){var $ptr,a,b,c,d,e;if(!((a.length===b.length))){return false;}c=0;while(true){if(!(c>>24;}e=b.charCodeAt(c);if(65<=e&&e<=90){e=e+(32)<<24>>>24;}if(!((d===e))){return false;}c=c+(1)>>0;}return true;};I=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;b=0;c=false;if(a.length===0){return[b,c];}d=a.charCodeAt(0);if(d===43){if(H(a,"+inf")||H(a,"+infinity")){e=A.Inf(1);f=true;b=e;c=f;return[b,c];}}else if(d===45){if(H(a,"-inf")||H(a,"-infinity")){g=A.Inf(-1);h=true;b=g;c=h;return[b,c];}}else if(d===110||d===78){if(H(a,"nan")){i=A.NaN();j=true;b=i;c=j;return[b,c];}}else if(d===105||d===73){if(H(a,"inf")||H(a,"infinity")){k=A.Inf(1);l=true;b=k;c=l;return[b,c];}}else{return[b,c];}return[b,c];};Y.ptr.prototype.set=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=false;c=this;d=0;c.neg=false;c.trunc=false;if(d>=a.length){return b;}if(a.charCodeAt(d)===43){d=d+(1)>>0;}else if(a.charCodeAt(d)===45){c.neg=true;d=d+(1)>>0;}e=false;f=false;while(true){if(!(d>0;continue;}else if(48<=a.charCodeAt(d)&&a.charCodeAt(d)<=57){f=true;if((a.charCodeAt(d)===48)&&(c.nd===0)){c.dp=c.dp-(1)>>0;d=d+(1)>>0;continue;}if(c.nd<800){(g=c.d,h=c.nd,((h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=a.charCodeAt(d)));c.nd=c.nd+(1)>>0;}else if(!((a.charCodeAt(d)===48))){c.trunc=true;}d=d+(1)>>0;continue;}break;}if(!f){return b;}if(!e){c.dp=c.nd;}if(d>0;if(d>=a.length){return b;}i=1;if(a.charCodeAt(d)===43){d=d+(1)>>0;}else if(a.charCodeAt(d)===45){d=d+(1)>>0;i=-1;}if(d>=a.length||a.charCodeAt(d)<48||a.charCodeAt(d)>57){return b;}j=0;while(true){if(!(d>0)+(a.charCodeAt(d)>>0)>>0)-48>>0;}d=d+(1)>>0;}c.dp=c.dp+((j*i>>0))>>0;}if(!((d===a.length))){return b;}b=true;return b;};Y.prototype.set=function(a){return this.$val.set(a);};J=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=new $Uint64(0,0);c=0;d=false;e=false;f=false;g=0;if(g>=a.length){return[b,c,d,e,f];}if(a.charCodeAt(g)===43){g=g+(1)>>0;}else if(a.charCodeAt(g)===45){d=true;g=g+(1)>>0;}h=false;i=false;j=0;k=0;l=0;while(true){if(!(g>0;continue;}else if(48<=m&&m<=57){i=true;if((m===48)&&(j===0)){l=l-(1)>>0;g=g+(1)>>0;continue;}j=j+(1)>>0;if(k<19){b=$mul64(b,(new $Uint64(0,10)));b=(n=new $Uint64(0,(m-48<<24>>>24)),new $Uint64(b.$high+n.$high,b.$low+n.$low));k=k+(1)>>0;}else if(!((a.charCodeAt(g)===48))){e=true;}g=g+(1)>>0;continue;}break;}if(!i){return[b,c,d,e,f];}if(!h){l=j;}if(g>0;if(g>=a.length){return[b,c,d,e,f];}o=1;if(a.charCodeAt(g)===43){g=g+(1)>>0;}else if(a.charCodeAt(g)===45){g=g+(1)>>0;o=-1;}if(g>=a.length||a.charCodeAt(g)<48||a.charCodeAt(g)>57){return[b,c,d,e,f];}p=0;while(true){if(!(g>0)+(a.charCodeAt(g)>>0)>>0)-48>>0;}g=g+(1)>>0;}l=l+((p*o>>0))>>0;}if(!((g===a.length))){return[b,c,d,e,f];}c=l-k>>0;f=true;return[b,c,d,e,f];};Y.ptr.prototype.floatBits=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s;$s=0;s:while(true){switch($s){case 0:b=new $Uint64(0,0);c=false;d=this;e=0;f=new $Uint64(0,0);if(d.nd===0){$s=1;continue;}$s=2;continue;case 1:f=new $Uint64(0,0);e=a.bias;$s=3;continue;case 2:if(d.dp>310){$s=4;continue;}$s=5;continue;case 4:$s=6;continue;case 5:if(d.dp<-330){$s=7;continue;}$s=8;continue;case 7:f=new $Uint64(0,0);e=a.bias;$s=3;continue;case 8:e=0;while(true){if(!(d.dp>0)){break;}g=0;if(d.dp>=K.$length){g=27;}else{g=(h=d.dp,((h<0||h>=K.$length)?$throwRuntimeError("index out of range"):K.$array[K.$offset+h]));}d.Shift(-g);e=e+(g)>>0;}while(true){if(!(d.dp<0||(d.dp===0)&&d.d[0]<53)){break;}i=0;if(-d.dp>=K.$length){i=27;}else{i=(j=-d.dp,((j<0||j>=K.$length)?$throwRuntimeError("index out of range"):K.$array[K.$offset+j]));}d.Shift(i);e=e-(i)>>0;}e=e-(1)>>0;if(e<(a.bias+1>>0)){k=(a.bias+1>>0)-e>>0;d.Shift(-k);e=e+(k)>>0;}if((e-a.bias>>0)>=(((l=a.expbits,l<32?(1<>0)-1>>0)){$s=9;continue;}$s=10;continue;case 9:$s=6;continue;case 10:d.Shift(((1+a.mantbits>>>0)>>0));f=d.RoundedInteger();if((m=$shiftLeft64(new $Uint64(0,2),a.mantbits),(f.$high===m.$high&&f.$low===m.$low))){$s=11;continue;}$s=12;continue;case 11:f=$shiftRightUint64(f,(1));e=e+(1)>>0;if((e-a.bias>>0)>=(((n=a.expbits,n<32?(1<>0)-1>>0)){$s=13;continue;}$s=14;continue;case 13:$s=6;continue;case 14:case 12:if((o=(p=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(f.$high&p.$high,(f.$low&p.$low)>>>0)),(o.$high===0&&o.$low===0))){e=a.bias;}$s=3;continue;case 6:f=new $Uint64(0,0);e=(((q=a.expbits,q<32?(1<>0)-1>>0)+a.bias>>0;c=true;case 3:t=(r=(s=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(s.$high-0,s.$low-1)),new $Uint64(f.$high&r.$high,(f.$low&r.$low)>>>0));t=(u=$shiftLeft64(new $Uint64(0,(((e-a.bias>>0))&((((v=a.expbits,v<32?(1<>0)-1>>0)))),a.mantbits),new $Uint64(t.$high|u.$high,(t.$low|u.$low)>>>0));if(d.neg){t=(w=$shiftLeft64($shiftLeft64(new $Uint64(0,1),a.mantbits),a.expbits),new $Uint64(t.$high|w.$high,(t.$low|w.$low)>>>0));}x=t;y=c;b=x;c=y;return[b,c];}return;}};Y.prototype.floatBits=function(a){return this.$val.floatBits(a);};N=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n;d=0;e=false;if(!((f=$shiftRightUint64(a,AQ.mantbits),(f.$high===0&&f.$low===0)))){return[d,e];}d=$flatten64(a);if(c){d=-d;}if(b===0){g=d;h=true;d=g;e=h;return[d,e];}else if(b>0&&b<=37){if(b>22){d=d*((i=b-22>>0,((i<0||i>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+i])));b=22;}if(d>1e+15||d<-1e+15){return[d,e];}j=d*((b<0||b>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+b]);k=true;d=j;e=k;return[d,e];}else if(b<0&&b>=-22){l=d/(m=-b,((m<0||m>=L.$length)?$throwRuntimeError("index out of range"):L.$array[L.$offset+m]));n=true;d=l;e=n;return[d,e];}return[d,e];};O=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n;d=0;e=false;if(!((f=$shiftRightUint64(a,AP.mantbits),(f.$high===0&&f.$low===0)))){return[d,e];}d=$flatten64(a);if(c){d=-d;}if(b===0){g=d;h=true;d=g;e=h;return[d,e];}else if(b>0&&b<=17){if(b>10){d=$fround(d*((i=b-10>>0,((i<0||i>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+i]))));b=10;}if(d>1e+07||d<-1e+07){return[d,e];}j=$fround(d*((b<0||b>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+b]));k=true;d=j;e=k;return[d,e];}else if(b<0&&b>=-10){l=$fround(d/(m=-b,((m<0||m>=M.$length)?$throwRuntimeError("index out of range"):M.$array[M.$offset+m])));n=true;d=l;e=n;return[d,e];}return[d,e];};P=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c=$ifaceNil;d=I(a);e=d[0];f=d[1];if(f){g=$fround(e);h=$ifaceNil;b=g;c=h;return[b,c];}if(G){i=J(a);j=i[0];k=i[1];l=i[2];m=i[3];n=i[4];if(n){if(!m){o=O(j,k,l);p=o[0];q=o[1];if(q){r=p;s=$ifaceNil;b=r;c=s;return[b,c];}}t=new AH.ptr(new $Uint64(0,0),0,false);u=t.AssignDecimal(j,k,l,m,AP);if(u){v=t.floatBits(AP);w=v[0];x=v[1];b=A.Float32frombits((w.$low>>>0));if(x){c=U("ParseFloat",a);}y=b;z=c;b=y;c=z;return[b,c];}}}aa=new Y.ptr(CN.zero(),0,0,false,false);if(!aa.set(a)){ab=0;ac=T("ParseFloat",a);b=ab;c=ac;return[b,c];}ad=aa.floatBits(AP);ae=ad[0];af=ad[1];b=A.Float32frombits((ae.$low>>>0));if(af){c=U("ParseFloat",a);}ag=b;ah=c;b=ag;c=ah;return[b,c];};Q=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c=$ifaceNil;d=I(a);e=d[0];f=d[1];if(f){g=e;h=$ifaceNil;b=g;c=h;return[b,c];}if(G){i=J(a);j=i[0];k=i[1];l=i[2];m=i[3];n=i[4];if(n){if(!m){o=N(j,k,l);p=o[0];q=o[1];if(q){r=p;s=$ifaceNil;b=r;c=s;return[b,c];}}t=new AH.ptr(new $Uint64(0,0),0,false);u=t.AssignDecimal(j,k,l,m,AQ);if(u){v=t.floatBits(AQ);w=v[0];x=v[1];b=A.Float64frombits(w);if(x){c=U("ParseFloat",a);}y=b;z=c;b=y;c=z;return[b,c];}}}aa=new Y.ptr(CN.zero(),0,0,false,false);if(!aa.set(a)){ab=0;ac=T("ParseFloat",a);b=ab;c=ac;return[b,c];}ad=aa.floatBits(AQ);ae=ad[0];af=ad[1];b=A.Float64frombits(ae);if(af){c=U("ParseFloat",a);}ag=b;ah=c;b=ag;c=ah;return[b,c];};R=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=0;d=$ifaceNil;if(b===32){e=P(a);f=e[0];g=e[1];h=f;i=g;c=h;d=i;return[c,d];}j=Q(a);k=j[0];l=j[1];m=k;n=l;c=m;d=n;return[c,d];};$pkg.ParseFloat=R;S.ptr.prototype.Error=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Err.Error();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return"strconv."+a.Func+": "+"parsing "+BP(a.Num)+": "+b;}return;}if($f===undefined){$f={$blk:S.ptr.prototype.Error};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};S.prototype.Error=function(){return this.$val.Error();};T=function(a,b){var $ptr,a,b;return new S.ptr(a,b,$pkg.ErrSyntax);};U=function(a,b){var $ptr,a,b;return new S.ptr(a,b,$pkg.ErrRange);};V=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s;$s=0;s:while(true){switch($s){case 0:d=new $Uint64(0,0);e=$ifaceNil;f=new $Uint64(0,0);g=new $Uint64(0,0);h=f;i=g;if(c===0){c=32;}j=0;if(a.length<1){$s=1;continue;}if(2<=b&&b<=36){$s=2;continue;}if(b===0){$s=3;continue;}$s=4;continue;case 1:e=$pkg.ErrSyntax;$s=6;continue;$s=5;continue;case 2:$s=5;continue;case 3:if((a.charCodeAt(0)===48)&&a.length>1&&((a.charCodeAt(1)===120)||(a.charCodeAt(1)===88))){$s=7;continue;}if(a.charCodeAt(0)===48){$s=8;continue;}$s=9;continue;case 7:if(a.length<3){$s=11;continue;}$s=12;continue;case 11:e=$pkg.ErrSyntax;$s=6;continue;case 12:b=16;j=2;$s=10;continue;case 8:b=8;j=1;$s=10;continue;case 9:b=10;case 10:$s=5;continue;case 4:e=B.New("invalid base "+BJ(b));$s=6;continue;case 5:k=b;if(k===10){h=new $Uint64(429496729,2576980378);}else if(k===16){h=new $Uint64(268435456,0);}else{h=(l=$div64(new $Uint64(4294967295,4294967295),new $Uint64(0,b),false),new $Uint64(l.$high+0,l.$low+1));}i=(m=$shiftLeft64(new $Uint64(0,1),(c>>>0)),new $Uint64(m.$high-0,m.$low-1));case 13:if(!(j>>24;$s=19;continue;case 16:n=(o-97<<24>>>24)+10<<24>>>24;$s=19;continue;case 17:n=(o-65<<24>>>24)+10<<24>>>24;$s=19;continue;case 18:d=new $Uint64(0,0);e=$pkg.ErrSyntax;$s=6;continue;case 19:if(n>=(b<<24>>>24)){$s=20;continue;}$s=21;continue;case 20:d=new $Uint64(0,0);e=$pkg.ErrSyntax;$s=6;continue;case 21:if((d.$high>h.$high||(d.$high===h.$high&&d.$low>=h.$low))){$s=22;continue;}$s=23;continue;case 22:d=new $Uint64(4294967295,4294967295);e=$pkg.ErrRange;$s=6;continue;case 23:d=$mul64(d,(new $Uint64(0,b)));q=(p=new $Uint64(0,n),new $Uint64(d.$high+p.$high,d.$low+p.$low));if((q.$highi.$high||(q.$high===i.$high&&q.$low>i.$low))){$s=24;continue;}$s=25;continue;case 24:d=new $Uint64(4294967295,4294967295);e=$pkg.ErrRange;$s=6;continue;case 25:d=q;j=j+(1)>>0;$s=13;continue;case 14:r=d;s=$ifaceNil;d=r;e=s;return[d,e];case 6:t=d;u=new S.ptr("ParseUint",a,e);d=t;e=u;return[d,e];$s=-1;case-1:}return;}};$pkg.ParseUint=V;W=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;d=new $Int64(0,0);e=$ifaceNil;if(c===0){c=32;}if(a.length===0){f=new $Int64(0,0);g=T("ParseInt",a);d=f;e=g;return[d,e];}h=a;i=false;if(a.charCodeAt(0)===43){a=a.substring(1);}else if(a.charCodeAt(0)===45){i=true;a=a.substring(1);}j=new $Uint64(0,0);k=V(a,b,c);j=k[0];e=k[1];if(!($interfaceIsEqual(e,$ifaceNil))&&!($interfaceIsEqual($assertType(e,CO).Err,$pkg.ErrRange))){$assertType(e,CO).Func="ParseInt";$assertType(e,CO).Num=h;l=new $Int64(0,0);m=e;d=l;e=m;return[d,e];}n=$shiftLeft64(new $Uint64(0,1),((c-1>>0)>>>0));if(!i&&(j.$high>n.$high||(j.$high===n.$high&&j.$low>=n.$low))){o=(p=new $Uint64(n.$high-0,n.$low-1),new $Int64(p.$high,p.$low));q=U("ParseInt",h);d=o;e=q;return[d,e];}if(i&&(j.$high>n.$high||(j.$high===n.$high&&j.$low>n.$low))){r=(s=new $Int64(n.$high,n.$low),new $Int64(-s.$high,-s.$low));t=U("ParseInt",h);d=r;e=t;return[d,e];}u=new $Int64(j.$high,j.$low);if(i){u=new $Int64(-u.$high,-u.$low);}v=u;w=$ifaceNil;d=v;e=w;return[d,e];};$pkg.ParseInt=W;X=function(a){var $ptr,a,b,c,d,e,f,g;b=0;c=$ifaceNil;d=W(a,10,0);e=d[0];c=d[1];f=((e.$low+((e.$high>>31)*4294967296))>>0);g=c;b=f;c=g;return[b,c];};$pkg.Atoi=X;Y.ptr.prototype.String=function(){var $ptr,a,b,c,d;a=this;b=10+a.nd>>0;if(a.dp>0){b=b+(a.dp)>>0;}if(a.dp<0){b=b+(-a.dp)>>0;}c=$makeSlice(CP,b);d=0;if(a.nd===0){return"0";}else if(a.dp<=0){((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=48);d=d+(1)>>0;((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46);d=d+(1)>>0;d=d+(Z($subslice(c,d,(d+-a.dp>>0))))>>0;d=d+($copySlice($subslice(c,d),$subslice(new CP(a.d),0,a.nd)))>>0;}else if(a.dp>0;((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=46);d=d+(1)>>0;d=d+($copySlice($subslice(c,d),$subslice(new CP(a.d),a.dp,a.nd)))>>0;}else{d=d+($copySlice($subslice(c,d),$subslice(new CP(a.d),0,a.nd)))>>0;d=d+(Z($subslice(c,d,((d+a.dp>>0)-a.nd>>0))))>>0;}return $bytesToString($subslice(c,0,d));};Y.prototype.String=function(){return this.$val.String();};Z=function(a){var $ptr,a,b,c,d;b=a;c=0;while(true){if(!(c=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]=48);c++;}return a.$length;};AA=function(a){var $ptr,a,b,c;while(true){if(!(a.nd>0&&((b=a.d,c=a.nd-1>>0,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}};Y.ptr.prototype.Assign=function(a){var $ptr,a,b,c,d,e,f,g,h;b=this;c=CQ.zero();d=0;while(true){if(!((a.$high>0||(a.$high===0&&a.$low>0)))){break;}e=$div64(a,new $Uint64(0,10),false);a=(f=$mul64(new $Uint64(0,10),e),new $Uint64(a.$high-f.$high,a.$low-f.$low));((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d]=(new $Uint64(a.$high+0,a.$low+48).$low<<24>>>24));d=d+(1)>>0;a=e;}b.nd=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}(g=b.d,h=b.nd,((h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h]=((d<0||d>=c.length)?$throwRuntimeError("index out of range"):c[d])));b.nd=b.nd+(1)>>0;d=d-(1)>>0;}b.dp=b.nd;AA(b);};Y.prototype.Assign=function(a){return this.$val.Assign(a);};AB=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;c=0;d=0;e=0;while(true){if(!(((f=b,f<32?(e>>>f):0)>>>0)===0)){break;}if(c>=a.nd){if(e===0){a.nd=0;return;}while(true){if(!(((g=b,g<32?(e>>>g):0)>>>0)===0)){break;}e=e*10>>>0;c=c+(1)>>0;}break;}i=((h=a.d,((c<0||c>=h.length)?$throwRuntimeError("index out of range"):h[c]))>>>0);e=((e*10>>>0)+i>>>0)-48>>>0;c=c+(1)>>0;}a.dp=a.dp-((c-1>>0))>>0;while(true){if(!(c=j.length)?$throwRuntimeError("index out of range"):j[c]))>>>0);m=(l=b,l<32?(e>>>l):0)>>>0;e=e-(((n=b,n<32?(m<>>0))>>>0;(o=a.d,((d<0||d>=o.length)?$throwRuntimeError("index out of range"):o[d]=((m+48>>>0)<<24>>>24)));d=d+(1)>>0;e=((e*10>>>0)+k>>>0)-48>>>0;c=c+(1)>>0;}while(true){if(!(e>0)){break;}q=(p=b,p<32?(e>>>p):0)>>>0;e=e-(((r=b,r<32?(q<>>0))>>>0;if(d<800){(s=a.d,((d<0||d>=s.length)?$throwRuntimeError("index out of range"):s[d]=((q+48>>>0)<<24>>>24)));d=d+(1)>>0;}else if(q>0){a.trunc=true;}e=e*10>>>0;}a.nd=d;AA(a);};AE=function(a,b){var $ptr,a,b,c;c=0;while(true){if(!(c=a.$length){return true;}if(!((((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])===b.charCodeAt(c)))){return((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c])>0;}return false;};AF=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=((b<0||b>=AD.$length)?$throwRuntimeError("index out of range"):AD.$array[AD.$offset+b]).delta;if(AE($subslice(new CP(a.d),0,a.nd),((b<0||b>=AD.$length)?$throwRuntimeError("index out of range"):AD.$array[AD.$offset+b]).cutoff)){c=c-(1)>>0;}d=a.nd;e=a.nd+c>>0;f=0;d=d-(1)>>0;while(true){if(!(d>=0)){break;}f=f+(((g=b,g<32?(((((h=a.d,((d<0||d>=h.length)?$throwRuntimeError("index out of range"):h[d]))>>>0)-48>>>0))<>>0))>>>0;j=(i=f/10,(i===i&&i!==1/0&&i!==-1/0)?i>>>0:$throwRuntimeError("integer divide by zero"));k=f-(10*j>>>0)>>>0;e=e-(1)>>0;if(e<800){(l=a.d,((e<0||e>=l.length)?$throwRuntimeError("index out of range"):l[e]=((k+48>>>0)<<24>>>24)));}else if(!((k===0))){a.trunc=true;}f=j;d=d-(1)>>0;}while(true){if(!(f>0)){break;}n=(m=f/10,(m===m&&m!==1/0&&m!==-1/0)?m>>>0:$throwRuntimeError("integer divide by zero"));o=f-(10*n>>>0)>>>0;e=e-(1)>>0;if(e<800){(p=a.d,((e<0||e>=p.length)?$throwRuntimeError("index out of range"):p[e]=((o+48>>>0)<<24>>>24)));}else if(!((o===0))){a.trunc=true;}f=n;}a.nd=a.nd+(c)>>0;if(a.nd>=800){a.nd=800;}a.dp=a.dp+(c)>>0;AA(a);};Y.ptr.prototype.Shift=function(a){var $ptr,a,b;b=this;if(b.nd===0){}else if(a>0){while(true){if(!(a>28)){break;}AF(b,28);a=a-(28)>>0;}AF(b,(a>>>0));}else if(a<0){while(true){if(!(a<-28)){break;}AB(b,28);a=a+(28)>>0;}AB(b,(-a>>>0));}};Y.prototype.Shift=function(a){return this.$val.Shift(a);};AG=function(a,b){var $ptr,a,b,c,d,e,f,g;if(b<0||b>=a.nd){return false;}if(((c=a.d,((b<0||b>=c.length)?$throwRuntimeError("index out of range"):c[b]))===53)&&((b+1>>0)===a.nd)){if(a.trunc){return true;}return b>0&&!(((d=(((e=a.d,f=b-1>>0,((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]))-48<<24>>>24))%2,d===d?d:$throwRuntimeError("integer divide by zero"))===0));}return(g=a.d,((b<0||b>=g.length)?$throwRuntimeError("index out of range"):g[b]))>=53;};Y.ptr.prototype.Round=function(a){var $ptr,a,b;b=this;if(a<0||a>=b.nd){return;}if(AG(b,a)){b.RoundUp(a);}else{b.RoundDown(a);}};Y.prototype.Round=function(a){return this.$val.Round(a);};Y.ptr.prototype.RoundDown=function(a){var $ptr,a,b;b=this;if(a<0||a>=b.nd){return;}b.nd=a;AA(b);};Y.prototype.RoundDown=function(a){return this.$val.RoundDown(a);};Y.ptr.prototype.RoundUp=function(a){var $ptr,a,b,c,d,e,f,g;b=this;if(a<0||a>=b.nd){return;}c=a-1>>0;while(true){if(!(c>=0)){break;}e=(d=b.d,((c<0||c>=d.length)?$throwRuntimeError("index out of range"):d[c]));if(e<57){(g=b.d,((c<0||c>=g.length)?$throwRuntimeError("index out of range"):g[c]=((f=b.d,((c<0||c>=f.length)?$throwRuntimeError("index out of range"):f[c]))+(1)<<24>>>24)));b.nd=c+1>>0;return;}c=c-(1)>>0;}b.d[0]=49;b.nd=1;b.dp=b.dp+(1)>>0;};Y.prototype.RoundUp=function(a){return this.$val.RoundUp(a);};Y.ptr.prototype.RoundedInteger=function(){var $ptr,a,b,c,d,e,f,g;a=this;if(a.dp>20){return new $Uint64(4294967295,4294967295);}b=0;c=new $Uint64(0,0);b=0;while(true){if(!(b=f.length)?$throwRuntimeError("index out of range"):f[b]))-48<<24>>>24)),new $Uint64(d.$high+e.$high,d.$low+e.$low));b=b+(1)>>0;}while(true){if(!(b>0;}if(AG(a,a.dp)){c=(g=new $Uint64(0,1),new $Uint64(c.$high+g.$high,c.$low+g.$low));}return c;};Y.prototype.RoundedInteger=function(){return this.$val.RoundedInteger();};AH.ptr.prototype.floatBits=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;b=new $Uint64(0,0);c=false;d=this;d.Normalize();e=d.exp+63>>0;if(e<(a.bias+1>>0)){f=(a.bias+1>>0)-e>>0;d.mant=$shiftRightUint64(d.mant,((f>>>0)));e=e+(f)>>0;}g=$shiftRightUint64(d.mant,((63-a.mantbits>>>0)));if(!((h=(i=d.mant,j=$shiftLeft64(new $Uint64(0,1),((62-a.mantbits>>>0))),new $Uint64(i.$high&j.$high,(i.$low&j.$low)>>>0)),(h.$high===0&&h.$low===0)))){g=(k=new $Uint64(0,1),new $Uint64(g.$high+k.$high,g.$low+k.$low));}if((l=$shiftLeft64(new $Uint64(0,2),a.mantbits),(g.$high===l.$high&&g.$low===l.$low))){g=$shiftRightUint64(g,(1));e=e+(1)>>0;}if((e-a.bias>>0)>=(((m=a.expbits,m<32?(1<>0)-1>>0)){g=new $Uint64(0,0);e=(((p=a.expbits,p<32?(1<>0)-1>>0)+a.bias>>0;c=true;}else if((n=(o=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(g.$high&o.$high,(g.$low&o.$low)>>>0)),(n.$high===0&&n.$low===0))){e=a.bias;}b=(q=(r=$shiftLeft64(new $Uint64(0,1),a.mantbits),new $Uint64(r.$high-0,r.$low-1)),new $Uint64(g.$high&q.$high,(g.$low&q.$low)>>>0));b=(s=$shiftLeft64(new $Uint64(0,(((e-a.bias>>0))&((((t=a.expbits,t<32?(1<>0)-1>>0)))),a.mantbits),new $Uint64(b.$high|s.$high,(b.$low|s.$low)>>>0));if(d.neg){b=(u=$shiftLeft64(new $Uint64(0,1),((a.mantbits+a.expbits>>>0))),new $Uint64(b.$high|u.$high,(b.$low|u.$low)>>>0));}return[b,c];};AH.prototype.floatBits=function(a){return this.$val.floatBits(a);};AH.ptr.prototype.AssignComputeBounds=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;e=new AH.ptr(new $Uint64(0,0),0,false);f=new AH.ptr(new $Uint64(0,0),0,false);g=this;g.mant=a;g.exp=b-(d.mantbits>>0)>>0;g.neg=c;if(g.exp<=0&&(h=$shiftLeft64(($shiftRightUint64(a,(-g.exp>>>0))),(-g.exp>>>0)),(a.$high===h.$high&&a.$low===h.$low))){g.mant=$shiftRightUint64(g.mant,((-g.exp>>>0)));g.exp=0;i=$clone(g,AH);j=$clone(g,AH);AH.copy(e,i);AH.copy(f,j);return[e,f];}k=b-d.bias>>0;AH.copy(f,new AH.ptr((l=$mul64(new $Uint64(0,2),g.mant),new $Uint64(l.$high+0,l.$low+1)),g.exp-1>>0,g.neg));if(!((m=$shiftLeft64(new $Uint64(0,1),d.mantbits),(a.$high===m.$high&&a.$low===m.$low)))||(k===1)){AH.copy(e,new AH.ptr((n=$mul64(new $Uint64(0,2),g.mant),new $Uint64(n.$high-0,n.$low-1)),g.exp-1>>0,g.neg));}else{AH.copy(e,new AH.ptr((o=$mul64(new $Uint64(0,4),g.mant),new $Uint64(o.$high-0,o.$low-1)),g.exp-2>>0,g.neg));}return[e,f];};AH.prototype.AssignComputeBounds=function(a,b,c,d){return this.$val.AssignComputeBounds(a,b,c,d);};AH.ptr.prototype.Normalize=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n;a=0;b=this;c=b.mant;d=b.exp;e=c;f=d;if((e.$high===0&&e.$low===0)){a=0;return a;}if((g=$shiftRightUint64(e,32),(g.$high===0&&g.$low===0))){e=$shiftLeft64(e,(32));f=f-(32)>>0;}if((h=$shiftRightUint64(e,48),(h.$high===0&&h.$low===0))){e=$shiftLeft64(e,(16));f=f-(16)>>0;}if((i=$shiftRightUint64(e,56),(i.$high===0&&i.$low===0))){e=$shiftLeft64(e,(8));f=f-(8)>>0;}if((j=$shiftRightUint64(e,60),(j.$high===0&&j.$low===0))){e=$shiftLeft64(e,(4));f=f-(4)>>0;}if((k=$shiftRightUint64(e,62),(k.$high===0&&k.$low===0))){e=$shiftLeft64(e,(2));f=f-(2)>>0;}if((l=$shiftRightUint64(e,63),(l.$high===0&&l.$low===0))){e=$shiftLeft64(e,(1));f=f-(1)>>0;}a=((b.exp-f>>0)>>>0);m=e;n=f;b.mant=m;b.exp=n;return a;};AH.prototype.Normalize=function(){return this.$val.Normalize();};AH.ptr.prototype.Multiply=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;a=$clone(a,AH);b=this;c=$shiftRightUint64(b.mant,32);d=new $Uint64(0,(b.mant.$low>>>0));e=c;f=d;g=$shiftRightUint64(a.mant,32);h=new $Uint64(0,(a.mant.$low>>>0));i=g;j=h;k=$mul64(e,j);l=$mul64(f,i);b.mant=(m=(n=$mul64(e,i),o=$shiftRightUint64(k,32),new $Uint64(n.$high+o.$high,n.$low+o.$low)),p=$shiftRightUint64(l,32),new $Uint64(m.$high+p.$high,m.$low+p.$low));u=(q=(r=new $Uint64(0,(k.$low>>>0)),s=new $Uint64(0,(l.$low>>>0)),new $Uint64(r.$high+s.$high,r.$low+s.$low)),t=$shiftRightUint64(($mul64(f,j)),32),new $Uint64(q.$high+t.$high,q.$low+t.$low));u=(v=new $Uint64(0,2147483648),new $Uint64(u.$high+v.$high,u.$low+v.$low));b.mant=(w=b.mant,x=($shiftRightUint64(u,32)),new $Uint64(w.$high+x.$high,w.$low+x.$low));b.exp=(b.exp+a.exp>>0)+64>>0;};AH.prototype.Multiply=function(a){return this.$val.Multiply(a);};AH.ptr.prototype.AssignDecimal=function(a,b,c,d,e){var $ptr,a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=false;g=this;h=0;if(d){h=h+(4)>>0;}g.mant=a;g.exp=0;g.neg=c;j=(i=((b- -348>>0))/8,(i===i&&i!==1/0&&i!==-1/0)?i>>0:$throwRuntimeError("integer divide by zero"));if(b<-348||j>=87){f=false;return f;}l=(k=((b- -348>>0))%8,k===k?k:$throwRuntimeError("integer divide by zero"));if(l<19&&(m=(n=19-l>>0,((n<0||n>=AK.length)?$throwRuntimeError("index out of range"):AK[n])),(a.$high=AK.length)?$throwRuntimeError("index out of range"):AK[l])));g.Normalize();}else{g.Normalize();g.Multiply(((l<0||l>=AI.length)?$throwRuntimeError("index out of range"):AI[l]));h=h+(4)>>0;}g.Multiply(((j<0||j>=AJ.length)?$throwRuntimeError("index out of range"):AJ[j]));if(h>0){h=h+(1)>>0;}h=h+(4)>>0;o=g.Normalize();h=(p=(o),p<32?(h<>0;q=e.bias-63>>0;r=0;if(g.exp<=q){r=(((63-e.mantbits>>>0)+1>>>0)+((q-g.exp>>0)>>>0)>>>0);}else{r=(63-e.mantbits>>>0);}s=$shiftLeft64(new $Uint64(0,1),((r-1>>>0)));w=(t=g.mant,u=(v=$shiftLeft64(new $Uint64(0,1),r),new $Uint64(v.$high-0,v.$low-1)),new $Uint64(t.$high&u.$high,(t.$low&u.$low)>>>0));if((x=(y=new $Int64(s.$high,s.$low),z=new $Int64(0,h),new $Int64(y.$high-z.$high,y.$low-z.$low)),aa=new $Int64(w.$high,w.$low),(x.$high>0))*28>>0)/93,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));g=(f=((e- -348>>0))/8,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));Loop:while(true){h=(c.exp+((g<0||g>=AJ.length)?$throwRuntimeError("index out of range"):AJ[g]).exp>>0)+64>>0;if(h<-60){g=g+(1)>>0;}else if(h>-32){g=g-(1)>>0;}else{break Loop;}}c.Multiply(((g<0||g>=AJ.length)?$throwRuntimeError("index out of range"):AJ[g]));i=-((-348+(g*8>>0)>>0));j=g;a=i;b=j;return[a,b];};AH.prototype.frexp10=function(){return this.$val.frexp10();};AL=function(a,b,c){var $ptr,a,b,c,d,e,f;d=0;e=c.frexp10();d=e[0];f=e[1];a.Multiply(((f<0||f>=AJ.length)?$throwRuntimeError("index out of range"):AJ[f]));b.Multiply(((f<0||f>=AJ.length)?$throwRuntimeError("index out of range"):AJ[f]));return d;};AH.ptr.prototype.FixedDecimal=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if((d=c.mant,(d.$high===0&&d.$low===0))){a.nd=0;a.dp=0;a.neg=c.neg;return true;}if(b===0){$panic(new $String("strconv: internal error: extFloat.FixedDecimal called with n == 0"));}c.Normalize();e=c.frexp10();f=e[0];g=(-c.exp>>>0);h=($shiftRightUint64(c.mant,g).$low>>>0);k=(i=c.mant,j=$shiftLeft64(new $Uint64(0,h),g),new $Uint64(i.$high-j.$high,i.$low-j.$low));l=new $Uint64(0,1);m=b;n=0;o=new $Uint64(0,1);p=0;q=new $Uint64(0,1);r=p;s=q;while(true){if(!(r<20)){break;}if((t=new $Uint64(0,h),(s.$high>t.$high||(s.$high===t.$high&&s.$low>t.$low)))){n=r;break;}s=$mul64(s,(new $Uint64(0,10)));r=r+(1)>>0;}u=h;if(n>m){o=(v=n-m>>0,((v<0||v>=AK.length)?$throwRuntimeError("index out of range"):AK[v]));h=(w=h/((o.$low>>>0)),(w===w&&w!==1/0&&w!==-1/0)?w>>>0:$throwRuntimeError("integer divide by zero"));u=u-((x=(o.$low>>>0),(((h>>>16<<16)*x>>>0)+(h<<16>>>16)*x)>>>0))>>>0;}else{u=0;}y=CR.zero();z=32;aa=h;while(true){if(!(aa>0)){break;}ac=(ab=aa/10,(ab===ab&&ab!==1/0&&ab!==-1/0)?ab>>>0:$throwRuntimeError("integer divide by zero"));aa=aa-(((((10>>>16<<16)*ac>>>0)+(10<<16>>>16)*ac)>>>0))>>>0;z=z-(1)>>0;((z<0||z>=y.length)?$throwRuntimeError("index out of range"):y[z]=((aa+48>>>0)<<24>>>24));aa=ac;}ad=z;while(true){if(!(ad<32)){break;}(ae=a.d,af=ad-z>>0,((af<0||af>=ae.$length)?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+af]=((ad<0||ad>=y.length)?$throwRuntimeError("index out of range"):y[ad])));ad=ad+(1)>>0;}ag=32-z>>0;a.nd=ag;a.dp=n+f>>0;m=m-(ag)>>0;if(m>0){if(!((u===0))||!((o.$high===0&&o.$low===1))){$panic(new $String("strconv: internal error, rest != 0 but needed > 0"));}while(true){if(!(m>0)){break;}k=$mul64(k,(new $Uint64(0,10)));l=$mul64(l,(new $Uint64(0,10)));if((ah=$mul64(new $Uint64(0,2),l),ai=$shiftLeft64(new $Uint64(0,1),g),(ah.$high>ai.$high||(ah.$high===ai.$high&&ah.$low>ai.$low)))){return false;}aj=$shiftRightUint64(k,g);(ak=a.d,((ag<0||ag>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+ag]=(new $Uint64(aj.$high+0,aj.$low+48).$low<<24>>>24)));k=(al=$shiftLeft64(aj,g),new $Uint64(k.$high-al.$high,k.$low-al.$low));ag=ag+(1)>>0;m=m-(1)>>0;}a.nd=ag;}an=AM(a,(am=$shiftLeft64(new $Uint64(0,u),g),new $Uint64(am.$high|k.$high,(am.$low|k.$low)>>>0)),o,g,l);if(!an){return false;}ao=a.nd-1>>0;while(true){if(!(ao>=0)){break;}if(!(((ap=a.d,((ao<0||ao>=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+ao]))===48))){a.nd=ao+1>>0;break;}ao=ao-(1)>>0;}return true;};AH.prototype.FixedDecimal=function(a,b){return this.$val.FixedDecimal(a,b);};AM=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;if((f=$shiftLeft64(c,d),(b.$high>f.$high||(b.$high===f.$high&&b.$low>f.$low)))){$panic(new $String("strconv: num > den<h.$high||(g.$high===h.$high&&g.$low>h.$low)))){$panic(new $String("strconv: \xCE\xB5 > (den<l.$high||(k.$high===l.$high&&k.$low>l.$low)))){m=a.nd-1>>0;while(true){if(!(m>=0)){break;}if((n=a.d,((m<0||m>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+m]))===57){a.nd=a.nd-(1)>>0;}else{break;}m=m-(1)>>0;}if(m<0){(o=a.d,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]=49));a.nd=1;a.dp=a.dp+(1)>>0;}else{(q=a.d,((m<0||m>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+m]=((p=a.d,((m<0||m>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+m]))+(1)<<24>>>24)));}return true;}return false;};AH.ptr.prototype.ShortestDecimal=function(a,b,c){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=this;if((e=d.mant,(e.$high===0&&e.$low===0))){a.nd=0;a.dp=0;a.neg=d.neg;return true;}if((d.exp===0)&&$equal(b,d,AH)&&$equal(b,c,AH)){f=CQ.zero();g=23;h=d.mant;while(true){if(!((h.$high>0||(h.$high===0&&h.$low>0)))){break;}i=$div64(h,new $Uint64(0,10),false);h=(j=$mul64(new $Uint64(0,10),i),new $Uint64(h.$high-j.$high,h.$low-j.$low));((g<0||g>=f.length)?$throwRuntimeError("index out of range"):f[g]=(new $Uint64(h.$high+0,h.$low+48).$low<<24>>>24));g=g-(1)>>0;h=i;}k=(24-g>>0)-1>>0;l=0;while(true){if(!(l=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+l]=(m=(g+1>>0)+l>>0,((m<0||m>=f.length)?$throwRuntimeError("index out of range"):f[m]))));l=l+(1)>>0;}o=k;p=k;a.nd=o;a.dp=p;while(true){if(!(a.nd>0&&((q=a.d,r=a.nd-1>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]))===48))){break;}a.nd=a.nd-(1)>>0;}if(a.nd===0){a.dp=0;}a.neg=d.neg;return true;}c.Normalize();if(d.exp>c.exp){d.mant=$shiftLeft64(d.mant,(((d.exp-c.exp>>0)>>>0)));d.exp=c.exp;}if(b.exp>c.exp){b.mant=$shiftLeft64(b.mant,(((b.exp-c.exp>>0)>>>0)));b.exp=c.exp;}s=AL(b,d,c);c.mant=(t=c.mant,u=new $Uint64(0,1),new $Uint64(t.$high+u.$high,t.$low+u.$low));b.mant=(v=b.mant,w=new $Uint64(0,1),new $Uint64(v.$high-w.$high,v.$low-w.$low));x=(-c.exp>>>0);y=($shiftRightUint64(c.mant,x).$low>>>0);ab=(z=c.mant,aa=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(z.$high-aa.$high,z.$low-aa.$low));ae=(ac=c.mant,ad=b.mant,new $Uint64(ac.$high-ad.$high,ac.$low-ad.$low));ah=(af=c.mant,ag=d.mant,new $Uint64(af.$high-ag.$high,af.$low-ag.$low));ai=0;aj=0;ak=new $Uint64(0,1);al=aj;am=ak;while(true){if(!(al<20)){break;}if((an=new $Uint64(0,y),(am.$high>an.$high||(am.$high===an.$high&&am.$low>an.$low)))){ai=al;break;}am=$mul64(am,(new $Uint64(0,10)));al=al+(1)>>0;}ao=0;while(true){if(!(ao>0)-1>>0,((ap<0||ap>=AK.length)?$throwRuntimeError("index out of range"):AK[ap]));as=(ar=y/(aq.$low>>>0),(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>>0:$throwRuntimeError("integer divide by zero"));(at=a.d,((ao<0||ao>=at.$length)?$throwRuntimeError("index out of range"):at.$array[at.$offset+ao]=((as+48>>>0)<<24>>>24)));y=y-((au=(aq.$low>>>0),(((as>>>16<<16)*au>>>0)+(as<<16>>>16)*au)>>>0))>>>0;aw=(av=$shiftLeft64(new $Uint64(0,y),x),new $Uint64(av.$high+ab.$high,av.$low+ab.$low));if((aw.$high>0;a.dp=ai+s>>0;a.neg=d.neg;return AN(a,aw,ah,ae,$shiftLeft64(aq,x),new $Uint64(0,2));}ao=ao+(1)>>0;}a.nd=ai;a.dp=a.nd+s>>0;a.neg=d.neg;ax=0;ay=new $Uint64(0,1);while(true){ab=$mul64(ab,(new $Uint64(0,10)));ay=$mul64(ay,(new $Uint64(0,10)));ax=($shiftRightUint64(ab,x).$low>>0);(az=a.d,ba=a.nd,((ba<0||ba>=az.$length)?$throwRuntimeError("index out of range"):az.$array[az.$offset+ba]=((ax+48>>0)<<24>>>24)));a.nd=a.nd+(1)>>0;ab=(bb=$shiftLeft64(new $Uint64(0,ax),x),new $Uint64(ab.$high-bb.$high,ab.$low-bb.$low));if((bc=$mul64(ae,ay),(ab.$high>0;(m=a.d,((k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k]=((l=a.d,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]))-(1)<<24>>>24)));b=(n=e,new $Uint64(b.$high+n.$high,b.$low+n.$low));}if((o=new $Uint64(b.$high+e.$high,b.$low+e.$low),p=(q=(r=$div64(e,new $Uint64(0,2),false),new $Uint64(c.$high+r.$high,c.$low+r.$low)),new $Uint64(q.$high+f.$high,q.$low+f.$low)),(o.$highs.$high||(b.$high===s.$high&&b.$low>s.$low)))){return false;}if((a.nd===1)&&((t=a.d,(0>=t.$length?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]))===48)){a.nd=0;a.dp=0;}return true;};AR=function(a,b,c,d){var $ptr,a,b,c,d;return $bytesToString(AT($makeSlice(CP,0,BC(c+4>>0,24)),a,b,c,d));};$pkg.FormatFloat=AR;AS=function(a,b,c,d,e){var $ptr,a,b,c,d,e;return AT(a,b,c,d,e);};$pkg.AppendFloat=AS;AT=function(a,b,c,d,e){var $ptr,a,aa,ab,ac,ad,ae,af,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=new $Uint64(0,0);g=CS.nil;h=e;if(h===32){f=new $Uint64(0,A.Float32bits($fround(b)));g=AP;}else if(h===64){f=A.Float64bits(b);g=AQ;}else{$panic(new $String("strconv: illegal AppendFloat/FormatFloat bitSize"));}j=!((i=$shiftRightUint64(f,((g.expbits+g.mantbits>>>0))),(i.$high===0&&i.$low===0)));l=($shiftRightUint64(f,g.mantbits).$low>>0)&((((k=g.expbits,k<32?(1<>0)-1>>0));o=(m=(n=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(n.$high-0,n.$low-1)),new $Uint64(f.$high&m.$high,(f.$low&m.$low)>>>0));p=l;if(p===(((q=g.expbits,q<32?(1<>0)-1>>0)){r="";if(!((o.$high===0&&o.$low===0))){r="NaN";}else if(j){r="-Inf";}else{r="+Inf";}return $appendSlice(a,r);}else if(p===0){l=l+(1)>>0;}else{o=(s=$shiftLeft64(new $Uint64(0,1),g.mantbits),new $Uint64(o.$high|s.$high,(o.$low|s.$low)>>>0));}l=l+(g.bias)>>0;if(c===98){return BA(a,j,o,l,g);}if(!G){return AU(a,d,c,j,o,l,g);}t=new AX.ptr(CP.nil,0,0,false);u=false;v=d<0;if(v){w=new AH.ptr(new $Uint64(0,0),0,false);x=w.AssignComputeBounds(o,l,j,g);y=$clone(x[0],AH);z=$clone(x[1],AH);aa=CR.zero();t.d=new CP(aa);u=w.ShortestDecimal(t,y,z);if(!u){return AU(a,d,c,j,o,l,g);}ab=c;if(ab===101||ab===69){d=BC(t.nd-1>>0,0);}else if(ab===102){d=BC(t.nd-t.dp>>0,0);}else if(ab===103||ab===71){d=t.nd;}}else if(!((c===102))){ac=d;ad=c;if(ad===101||ad===69){ac=ac+(1)>>0;}else if(ad===103||ad===71){if(d===0){d=1;}ac=d;}if(ac<=15){ae=CQ.zero();t.d=new CP(ae);af=new AH.ptr(o,l-(g.mantbits>>0)>>0,j);u=af.FixedDecimal(t,ac);}}if(!u){return AU(a,d,c,j,o,l,g);}return AV(a,v,j,t,d,c);};AU=function(a,b,c,d,e,f,g){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;h=new Y.ptr(CN.zero(),0,0,false,false);h.Assign(e);h.Shift(f-(g.mantbits>>0)>>0);i=new AX.ptr(CP.nil,0,0,false);j=b<0;if(j){AW(h,e,f,g);AX.copy(i,new AX.ptr(new CP(h.d),h.nd,h.dp,false));k=c;if(k===101||k===69){b=i.nd-1>>0;}else if(k===102){b=BC(i.nd-i.dp>>0,0);}else if(k===103||k===71){b=i.nd;}}else{l=c;if(l===101||l===69){h.Round(b+1>>0);}else if(l===102){h.Round(h.dp+b>>0);}else if(l===103||l===71){if(b===0){b=1;}h.Round(b);}AX.copy(i,new AX.ptr(new CP(h.d),h.nd,h.dp,false));}return AV(a,j,d,i,b,c);};AV=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g,h,i;d=$clone(d,AX);g=f;if(g===101||g===69){return AY(a,c,d,e,f);}else if(g===102){return AZ(a,c,d,e);}else if(g===103||g===71){h=e;if(h>d.nd&&d.nd>=d.dp){h=d.nd;}if(b){h=6;}i=d.dp-1>>0;if(i<-4||i>=h){if(e>d.nd){e=d.nd;}return AY(a,c,d,e-1>>0,(f+101<<24>>>24)-103<<24>>>24);}if(e>d.dp){e=d.nd;}return AZ(a,c,d,BC(e-d.dp>>0,0));}return $append(a,37,f);};AW=function(a,b,c,d){var $ptr,a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((b.$high===0&&b.$low===0)){a.nd=0;return;}e=d.bias+1>>0;if(c>e&&(332*((a.dp-a.nd>>0))>>0)>=(100*((c-(d.mantbits>>0)>>0))>>0)){return;}f=new Y.ptr(CN.zero(),0,0,false,false);f.Assign((g=$mul64(b,new $Uint64(0,2)),new $Uint64(g.$high+0,g.$low+1)));f.Shift((c-(d.mantbits>>0)>>0)-1>>0);h=new $Uint64(0,0);i=0;if((j=$shiftLeft64(new $Uint64(0,1),d.mantbits),(b.$high>j.$high||(b.$high===j.$high&&b.$low>j.$low)))||(c===e)){h=new $Uint64(b.$high-0,b.$low-1);i=c;}else{h=(k=$mul64(b,new $Uint64(0,2)),new $Uint64(k.$high-0,k.$low-1));i=c-1>>0;}l=new Y.ptr(CN.zero(),0,0,false,false);l.Assign((m=$mul64(h,new $Uint64(0,2)),new $Uint64(m.$high+0,m.$low+1)));l.Shift((i-(d.mantbits>>0)>>0)-1>>0);o=(n=$div64(b,new $Uint64(0,2),true),(n.$high===0&&n.$low===0));p=0;while(true){if(!(p=w.length)?$throwRuntimeError("index out of range"):w[p]));}else{t=48;}u=(x=a.d,((p<0||p>=x.length)?$throwRuntimeError("index out of range"):x[p]));if(p=y.length)?$throwRuntimeError("index out of range"):y[p]));}else{v=48;}z=!((t===u))||(o&&(t===u)&&((p+1>>0)===l.nd));aa=!((u===v))&&(o||(u+1<<24>>>24)>0)>0);return;}else if(z){a.RoundDown(p+1>>0);return;}else if(aa){a.RoundUp(p+1>>0);return;}p=p+(1)>>0;}};AY=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;c=$clone(c,AX);if(b){a=$append(a,45);}f=48;if(!((c.nd===0))){f=(g=c.d,(0>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));}a=$append(a,f);if(d>0){a=$append(a,46);h=1;i=BB(c.nd,d+1>>0);if(h>0;}}a=$append(a,e);j=c.dp-1>>0;if(c.nd===0){j=0;}if(j<0){f=45;j=-j;}else{f=43;}a=$append(a,f);if(j<10){a=$append(a,48,(j<<24>>>24)+48<<24>>>24);}else if(j<100){a=$append(a,((k=j/10,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24)+48<<24>>>24,((l=j%10,l===l?l:$throwRuntimeError("integer divide by zero"))<<24>>>24)+48<<24>>>24);}else{a=$append(a,((m=j/100,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24)+48<<24>>>24,(n=((o=j/10,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"))<<24>>>24)%10,n===n?n:$throwRuntimeError("integer divide by zero"))+48<<24>>>24,((p=j%10,p===p?p:$throwRuntimeError("integer divide by zero"))<<24>>>24)+48<<24>>>24);}return a;};AZ=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i;c=$clone(c,AX);if(b){a=$append(a,45);}if(c.dp>0){e=BB(c.nd,c.dp);a=$appendSlice(a,$subslice(c.d,0,e));while(true){if(!(e>0;}}else{a=$append(a,48);}if(d>0){a=$append(a,46);f=0;while(true){if(!(f>0;if(0<=h&&h=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h]));}a=$append(a,g);f=f+(1)>>0;}}return a;};BA=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g;if(b){a=$append(a,45);}f=BN(a,c,10,false,true);a=f[0];a=$append(a,112);d=d-((e.mantbits>>0))>>0;if(d>=0){a=$append(a,43);}g=BN(a,new $Uint64(0,d),10,d<0,true);a=g[0];return a;};BB=function(a,b){var $ptr,a,b;if(ab){return a;}return b;};BH=function(a,b){var $ptr,a,b,c,d;c=BN(CP.nil,a,b,false,false);d=c[1];return d;};$pkg.FormatUint=BH;BI=function(a,b){var $ptr,a,b,c,d;c=BN(CP.nil,new $Uint64(a.$high,a.$low),b,(a.$high<0||(a.$high===0&&a.$low<0)),false);d=c[1];return d;};$pkg.FormatInt=BI;BJ=function(a){var $ptr,a;return BI(new $Int64(0,a),10);};$pkg.Itoa=BJ;BK=function(a,b,c){var $ptr,a,b,c,d;d=BN(a,new $Uint64(b.$high,b.$low),c,(b.$high<0||(b.$high===0&&b.$low<0)),true);a=d[0];return a;};$pkg.AppendInt=BK;BL=function(a,b,c){var $ptr,a,b,c,d;d=BN(a,b,c,false,true);a=d[0];return a;};$pkg.AppendUint=BL;BN=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;f=CP.nil;g="";if(c<2||c>36){$panic(new $String("strconv: illegal AppendInt/FormatInt base"));}h=CT.zero();i=65;if(d){b=new $Uint64(-b.$high,-b.$low);}if(c===10){while(true){if(!((b.$high>0||(b.$high===0&&b.$low>4294967295)))){break;}j=$div64(b,new $Uint64(0,1000000000),false);l=((k=$mul64(j,new $Uint64(0,1000000000)),new $Uint64(b.$high-k.$high,b.$low-k.$low)).$low>>>0);m=9;while(true){if(!(m>0)){break;}i=i-(1)>>0;o=(n=l/10,(n===n&&n!==1/0&&n!==-1/0)?n>>>0:$throwRuntimeError("integer divide by zero"));((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=(((l-((((o>>>16<<16)*10>>>0)+(o<<16>>>16)*10)>>>0)>>>0)+48>>>0)<<24>>>24));l=o;m=m-(1)>>0;}b=j;}p=(b.$low>>>0);while(true){if(!(p>=10)){break;}i=i-(1)>>0;r=(q=p/10,(q===q&&q!==1/0&&q!==-1/0)?q>>>0:$throwRuntimeError("integer divide by zero"));((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=(((p-((((r>>>16<<16)*10>>>0)+(r<<16>>>16)*10)>>>0)>>>0)+48>>>0)<<24>>>24));p=r;}i=i-(1)>>0;((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=((p+48>>>0)<<24>>>24));}else{s=((c<0||c>=BM.length)?$throwRuntimeError("index out of range"):BM[c]);if(s>0){t=new $Uint64(0,c);u=(t.$low>>>0)-1>>>0;while(true){if(!((b.$high>t.$high||(b.$high===t.$high&&b.$low>=t.$low)))){break;}i=i-(1)>>0;((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((((b.$low>>>0)&u)>>>0)));b=$shiftRightUint64(b,(s));}i=i-(1)>>0;((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((b.$low>>>0)));}else{v=new $Uint64(0,c);while(true){if(!((b.$high>v.$high||(b.$high===v.$high&&b.$low>=v.$low)))){break;}i=i-(1)>>0;w=$div64(b,v,false);((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt(((x=$mul64(w,v),new $Uint64(b.$high-x.$high,b.$low-x.$low)).$low>>>0)));b=w;}i=i-(1)>>0;((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]="0123456789abcdefghijklmnopqrstuvwxyz".charCodeAt((b.$low>>>0)));}}if(d){i=i-(1)>>0;((i<0||i>=h.length)?$throwRuntimeError("index out of range"):h[i]=45);}if(e){f=$appendSlice(a,$subslice(new CP(h),i));return[f,g];}g=$bytesToString($subslice(new CP(h),i));return[f,g];};BO=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;d=CU.zero();f=$makeSlice(CP,0,(e=(3*a.length>>0)/2,(e===e&&e!==1/0&&e!==-1/0)?e>>0:$throwRuntimeError("integer divide by zero")));f=$append(f,b);g=0;while(true){if(!(a.length>0)){break;}h=(a.charCodeAt(0)>>0);g=1;if(h>=128){i=C.DecodeRuneInString(a);h=i[0];g=i[1];}if((g===1)&&(h===65533)){f=$appendSlice(f,"\\x");f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));a=a.substring(g);continue;}if((h===(b>>0))||(h===92)){f=$append(f,92);f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}if(c){if(h<128&&CE(h)){f=$append(f,(h<<24>>>24));a=a.substring(g);continue;}}else if(CE(h)){j=C.EncodeRune(new CP(d),h);f=$appendSlice(f,$subslice(new CP(d),0,j));a=a.substring(g);continue;}k=h;if(k===7){f=$appendSlice(f,"\\a");}else if(k===8){f=$appendSlice(f,"\\b");}else if(k===12){f=$appendSlice(f,"\\f");}else if(k===10){f=$appendSlice(f,"\\n");}else if(k===13){f=$appendSlice(f,"\\r");}else if(k===9){f=$appendSlice(f,"\\t");}else if(k===11){f=$appendSlice(f,"\\v");}else{if(h<32){f=$appendSlice(f,"\\x");f=$append(f,"0123456789abcdef".charCodeAt((a.charCodeAt(0)>>>4<<24>>>24)));f=$append(f,"0123456789abcdef".charCodeAt(((a.charCodeAt(0)&15)>>>0)));}else if(h>1114111){h=65533;f=$appendSlice(f,"\\u");l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else if(h<65536){f=$appendSlice(f,"\\u");l=12;while(true){if(!(l>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((l>>>0),31))>>0)&15)));l=l-(4)>>0;}}else{f=$appendSlice(f,"\\U");m=28;while(true){if(!(m>=0)){break;}f=$append(f,"0123456789abcdef".charCodeAt((((h>>$min((m>>>0),31))>>0)&15)));m=m-(4)>>0;}}}a=a.substring(g);}f=$append(f,b);return $bytesToString(f);};BP=function(a){var $ptr,a;return BO(a,34,false);};$pkg.Quote=BP;BR=function(a){var $ptr,a;return BO(a,34,true);};$pkg.QuoteToASCII=BR;BT=function(a){var $ptr,a;return BO($encodeRune(a),39,false);};$pkg.QuoteRune=BT;BU=function(a,b){var $ptr,a,b;return $appendSlice(a,BT(b));};$pkg.AppendQuoteRune=BU;BV=function(a){var $ptr,a;return BO($encodeRune(a),39,true);};$pkg.QuoteRuneToASCII=BV;BW=function(a,b){var $ptr,a,b;return $appendSlice(a,BV(b));};$pkg.AppendQuoteRuneToASCII=BW;BX=function(a){var $ptr,a,b,c,d;while(true){if(!(a.length>0)){break;}b=C.DecodeRuneInString(a);c=b[0];d=b[1];a=a.substring(d);if(d>1){if(c===65279){return false;}continue;}if(c===65533){return false;}if((c<32&&!((c===9)))||(c===96)||(c===127)){return false;}}return true;};$pkg.CanBackquote=BX;BY=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=0;c=false;d=(a>>0);if(48<=d&&d<=57){e=d-48>>0;f=true;b=e;c=f;return[b,c];}else if(97<=d&&d<=102){g=(d-97>>0)+10>>0;h=true;b=g;c=h;return[b,c];}else if(65<=d&&d<=70){i=(d-65>>0)+10>>0;j=true;b=i;c=j;return[b,c];}return[b,c];};BZ=function(a,b){var $ptr,a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=0;d=false;e="";f=$ifaceNil;g=a.charCodeAt(0);if((g===b)&&((b===39)||(b===34))){f=$pkg.ErrSyntax;return[c,d,e,f];}else if(g>=128){h=C.DecodeRuneInString(a);i=h[0];j=h[1];k=i;l=true;m=a.substring(j);n=$ifaceNil;c=k;d=l;e=m;f=n;return[c,d,e,f];}else if(!((g===92))){o=(a.charCodeAt(0)>>0);p=false;q=a.substring(1);r=$ifaceNil;c=o;d=p;e=q;f=r;return[c,d,e,f];}if(a.length<=1){f=$pkg.ErrSyntax;return[c,d,e,f];}s=a.charCodeAt(1);a=a.substring(2);t=s;switch(0){default:if(t===97){c=7;}else if(t===98){c=8;}else if(t===102){c=12;}else if(t===110){c=10;}else if(t===114){c=13;}else if(t===116){c=9;}else if(t===118){c=11;}else if(t===120||t===117||t===85){u=0;v=s;if(v===120){u=2;}else if(v===117){u=4;}else if(v===85){u=8;}w=0;if(a.length>0)|z;x=x+(1)>>0;}a=a.substring(u);if(s===120){c=w;break;}if(w>1114111){f=$pkg.ErrSyntax;return[c,d,e,f];}c=w;d=true;}else if(t===48||t===49||t===50||t===51||t===52||t===53||t===54||t===55){ab=(s>>0)-48>>0;if(a.length<2){f=$pkg.ErrSyntax;return[c,d,e,f];}ac=0;while(true){if(!(ac<2)){break;}ad=(a.charCodeAt(ac)>>0)-48>>0;if(ad<0||ad>7){f=$pkg.ErrSyntax;return[c,d,e,f];}ab=((ab<<3>>0))|ad;ac=ac+(1)>>0;}a=a.substring(2);if(ab>255){f=$pkg.ErrSyntax;return[c,d,e,f];}c=ab;}else if(t===92){c=92;}else if(t===39||t===34){if(!((s===b))){f=$pkg.ErrSyntax;return[c,d,e,f];}c=(s>>0);}else{f=$pkg.ErrSyntax;return[c,d,e,f];}}e=a;return[c,d,e,f];};$pkg.UnquoteChar=BZ;CA=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b="";c=$ifaceNil;d=a.length;if(d<2){e="";f=$pkg.ErrSyntax;b=e;c=f;return[b,c];}g=a.charCodeAt(0);if(!((g===a.charCodeAt((d-1>>0))))){h="";i=$pkg.ErrSyntax;b=h;c=i;return[b,c];}a=a.substring(1,(d-1>>0));if(g===96){if(CB(a,96)){j="";k=$pkg.ErrSyntax;b=j;c=k;return[b,c];}l=a;m=$ifaceNil;b=l;c=m;return[b,c];}if(!((g===34))&&!((g===39))){n="";o=$pkg.ErrSyntax;b=n;c=o;return[b,c];}if(CB(a,10)){p="";q=$pkg.ErrSyntax;b=p;c=q;return[b,c];}if(!CB(a,92)&&!CB(a,g)){r=g;if(r===34){s=a;t=$ifaceNil;b=s;c=t;return[b,c];}else if(r===39){u=C.DecodeRuneInString(a);v=u[0];w=u[1];if((w===a.length)&&(!((v===65533))||!((w===1)))){x=a;y=$ifaceNil;b=x;c=y;return[b,c];}}}z=CU.zero();ab=$makeSlice(CP,0,(aa=(3*a.length>>0)/2,(aa===aa&&aa!==1/0&&aa!==-1/0)?aa>>0:$throwRuntimeError("integer divide by zero")));while(true){if(!(a.length>0)){break;}ac=BZ(a,g);ad=ac[0];ae=ac[1];af=ac[2];ag=ac[3];if(!($interfaceIsEqual(ag,$ifaceNil))){ah="";ai=ag;b=ah;c=ai;return[b,c];}a=af;if(ad<128||!ae){ab=$append(ab,(ad<<24>>>24));}else{aj=C.EncodeRune(new CP(z),ad);ab=$appendSlice(ab,$subslice(new CP(z),0,aj));}if((g===39)&&!((a.length===0))){ak="";al=$pkg.ErrSyntax;b=ak;c=al;return[b,c];}}am=$bytesToString(ab);an=$ifaceNil;b=am;c=an;return[b,c];};$pkg.Unquote=CA;CB=function(a,b){var $ptr,a,b,c;c=0;while(true){if(!(c>0;}return false;};CC=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CD=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=0;d=a.$length;e=c;f=d;while(true){if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;if(((h<0||h>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h])>0;}else{f=h;}}return e;};CE=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;if(a<=255){if(32<=a&&a<=126){return true;}if(161<=a&&a<=255){return!((a===173));}return false;}if(0<=a&&a<65536){b=(a<<16>>>16);c=BD;d=BE;e=b;f=c;g=d;h=CC(f,e);if(h>=f.$length||e<(i=(h&~1)>>0,((i<0||i>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+i]))||(j=h|1,((j<0||j>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+j]))=g.$length||!((((k<0||k>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+k])===e));}l=(a>>>0);m=BF;n=BG;o=l;p=m;q=n;r=CD(p,o);if(r>=p.$length||o<(s=(r&~1)>>0,((s<0||s>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+s]))||(t=r|1,((t<0||t>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+t]))=131072){return true;}a=a-(65536)>>0;u=CC(q,(a<<16>>>16));return u>=q.$length||!((((u<0||u>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+u])===(a<<16>>>16)));};$pkg.IsPrint=CE;CO.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];CV.methods=[{prop:"set",name:"set",pkg:"strconv",typ:$funcType([$String],[$Bool],false)},{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CS],[$Uint64,$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Assign",name:"Assign",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"Shift",name:"Shift",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundDown",name:"RoundDown",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundUp",name:"RoundUp",pkg:"",typ:$funcType([$Int],[],false)},{prop:"RoundedInteger",name:"RoundedInteger",pkg:"",typ:$funcType([],[$Uint64],false)}];CX.methods=[{prop:"floatBits",name:"floatBits",pkg:"strconv",typ:$funcType([CS],[$Uint64,$Bool],false)},{prop:"AssignComputeBounds",name:"AssignComputeBounds",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,CS],[AH,AH],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[$Uint],false)},{prop:"Multiply",name:"Multiply",pkg:"",typ:$funcType([AH],[],false)},{prop:"AssignDecimal",name:"AssignDecimal",pkg:"",typ:$funcType([$Uint64,$Int,$Bool,$Bool,CS],[$Bool],false)},{prop:"frexp10",name:"frexp10",pkg:"strconv",typ:$funcType([],[$Int,$Int],false)},{prop:"FixedDecimal",name:"FixedDecimal",pkg:"",typ:$funcType([CW,$Int],[$Bool],false)},{prop:"ShortestDecimal",name:"ShortestDecimal",pkg:"",typ:$funcType([CW,CX,CX],[$Bool],false)}];S.init([{prop:"Func",name:"Func",pkg:"",typ:$String,tag:""},{prop:"Num",name:"Num",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);Y.init([{prop:"d",name:"d",pkg:"strconv",typ:CN,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""},{prop:"trunc",name:"trunc",pkg:"strconv",typ:$Bool,tag:""}]);AC.init([{prop:"delta",name:"delta",pkg:"strconv",typ:$Int,tag:""},{prop:"cutoff",name:"cutoff",pkg:"strconv",typ:$String,tag:""}]);AH.init([{prop:"mant",name:"mant",pkg:"strconv",typ:$Uint64,tag:""},{prop:"exp",name:"exp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);AO.init([{prop:"mantbits",name:"mantbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"expbits",name:"expbits",pkg:"strconv",typ:$Uint,tag:""},{prop:"bias",name:"bias",pkg:"strconv",typ:$Int,tag:""}]);AX.init([{prop:"d",name:"d",pkg:"strconv",typ:CP,tag:""},{prop:"nd",name:"nd",pkg:"strconv",typ:$Int,tag:""},{prop:"dp",name:"dp",pkg:"strconv",typ:$Int,tag:""},{prop:"neg",name:"neg",pkg:"strconv",typ:$Bool,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}G=true;K=new CH([1,3,6,9,13,16,19,23,26]);L=new CI([1,10,100,1000,10000,100000,1e+06,1e+07,1e+08,1e+09,1e+10,1e+11,1e+12,1e+13,1e+14,1e+15,1e+16,1e+17,1e+18,1e+19,1e+20,1e+21,1e+22]);M=new CJ([1,10,100,1000,10000,100000,1e+06,1e+07,1e+08,1e+09,1e+10]);$pkg.ErrRange=B.New("value out of range");$pkg.ErrSyntax=B.New("invalid syntax");AD=new CK([new AC.ptr(0,""),new AC.ptr(1,"5"),new AC.ptr(1,"25"),new AC.ptr(1,"125"),new AC.ptr(2,"625"),new AC.ptr(2,"3125"),new AC.ptr(2,"15625"),new AC.ptr(3,"78125"),new AC.ptr(3,"390625"),new AC.ptr(3,"1953125"),new AC.ptr(4,"9765625"),new AC.ptr(4,"48828125"),new AC.ptr(4,"244140625"),new AC.ptr(4,"1220703125"),new AC.ptr(5,"6103515625"),new AC.ptr(5,"30517578125"),new AC.ptr(5,"152587890625"),new AC.ptr(6,"762939453125"),new AC.ptr(6,"3814697265625"),new AC.ptr(6,"19073486328125"),new AC.ptr(7,"95367431640625"),new AC.ptr(7,"476837158203125"),new AC.ptr(7,"2384185791015625"),new AC.ptr(7,"11920928955078125"),new AC.ptr(8,"59604644775390625"),new AC.ptr(8,"298023223876953125"),new AC.ptr(8,"1490116119384765625"),new AC.ptr(9,"7450580596923828125"),new AC.ptr(9,"37252902984619140625"),new AC.ptr(9,"186264514923095703125"),new AC.ptr(10,"931322574615478515625"),new AC.ptr(10,"4656612873077392578125"),new AC.ptr(10,"23283064365386962890625"),new AC.ptr(10,"116415321826934814453125"),new AC.ptr(11,"582076609134674072265625"),new AC.ptr(11,"2910383045673370361328125"),new AC.ptr(11,"14551915228366851806640625"),new AC.ptr(12,"72759576141834259033203125"),new AC.ptr(12,"363797880709171295166015625"),new AC.ptr(12,"1818989403545856475830078125"),new AC.ptr(13,"9094947017729282379150390625"),new AC.ptr(13,"45474735088646411895751953125"),new AC.ptr(13,"227373675443232059478759765625"),new AC.ptr(13,"1136868377216160297393798828125"),new AC.ptr(14,"5684341886080801486968994140625"),new AC.ptr(14,"28421709430404007434844970703125"),new AC.ptr(14,"142108547152020037174224853515625"),new AC.ptr(15,"710542735760100185871124267578125"),new AC.ptr(15,"3552713678800500929355621337890625"),new AC.ptr(15,"17763568394002504646778106689453125"),new AC.ptr(16,"88817841970012523233890533447265625"),new AC.ptr(16,"444089209850062616169452667236328125"),new AC.ptr(16,"2220446049250313080847263336181640625"),new AC.ptr(16,"11102230246251565404236316680908203125"),new AC.ptr(17,"55511151231257827021181583404541015625"),new AC.ptr(17,"277555756156289135105907917022705078125"),new AC.ptr(17,"1387778780781445675529539585113525390625"),new AC.ptr(18,"6938893903907228377647697925567626953125"),new AC.ptr(18,"34694469519536141888238489627838134765625"),new AC.ptr(18,"173472347597680709441192448139190673828125"),new AC.ptr(19,"867361737988403547205962240695953369140625")]);AI=$toNativeArray($kindStruct,[new AH.ptr(new $Uint64(2147483648,0),-63,false),new AH.ptr(new $Uint64(2684354560,0),-60,false),new AH.ptr(new $Uint64(3355443200,0),-57,false),new AH.ptr(new $Uint64(4194304000,0),-54,false),new AH.ptr(new $Uint64(2621440000,0),-50,false),new AH.ptr(new $Uint64(3276800000,0),-47,false),new AH.ptr(new $Uint64(4096000000,0),-44,false),new AH.ptr(new $Uint64(2560000000,0),-40,false)]);AJ=$toNativeArray($kindStruct,[new AH.ptr(new $Uint64(4203730336,136053384),-1220,false),new AH.ptr(new $Uint64(3132023167,2722021238),-1193,false),new AH.ptr(new $Uint64(2333539104,810921078),-1166,false),new AH.ptr(new $Uint64(3477244234,1573795306),-1140,false),new AH.ptr(new $Uint64(2590748842,1432697645),-1113,false),new AH.ptr(new $Uint64(3860516611,1025131999),-1087,false),new AH.ptr(new $Uint64(2876309015,3348809418),-1060,false),new AH.ptr(new $Uint64(4286034428,3200048207),-1034,false),new AH.ptr(new $Uint64(3193344495,1097586188),-1007,false),new AH.ptr(new $Uint64(2379227053,2424306748),-980,false),new AH.ptr(new $Uint64(3545324584,827693699),-954,false),new AH.ptr(new $Uint64(2641472655,2913388981),-927,false),new AH.ptr(new $Uint64(3936100983,602835915),-901,false),new AH.ptr(new $Uint64(2932623761,1081627501),-874,false),new AH.ptr(new $Uint64(2184974969,1572261463),-847,false),new AH.ptr(new $Uint64(3255866422,1308317239),-821,false),new AH.ptr(new $Uint64(2425809519,944281679),-794,false),new AH.ptr(new $Uint64(3614737867,629291719),-768,false),new AH.ptr(new $Uint64(2693189581,2545915892),-741,false),new AH.ptr(new $Uint64(4013165208,388672741),-715,false),new AH.ptr(new $Uint64(2990041083,708162190),-688,false),new AH.ptr(new $Uint64(2227754207,3536207675),-661,false),new AH.ptr(new $Uint64(3319612455,450088378),-635,false),new AH.ptr(new $Uint64(2473304014,3139815830),-608,false),new AH.ptr(new $Uint64(3685510180,2103616900),-582,false),new AH.ptr(new $Uint64(2745919064,224385782),-555,false),new AH.ptr(new $Uint64(4091738259,3737383206),-529,false),new AH.ptr(new $Uint64(3048582568,2868871352),-502,false),new AH.ptr(new $Uint64(2271371013,1820084875),-475,false),new AH.ptr(new $Uint64(3384606560,885076051),-449,false),new AH.ptr(new $Uint64(2521728396,2444895829),-422,false),new AH.ptr(new $Uint64(3757668132,1881767613),-396,false),new AH.ptr(new $Uint64(2799680927,3102062735),-369,false),new AH.ptr(new $Uint64(4171849679,2289335700),-343,false),new AH.ptr(new $Uint64(3108270227,2410191823),-316,false),new AH.ptr(new $Uint64(2315841784,3205436779),-289,false),new AH.ptr(new $Uint64(3450873173,1697722806),-263,false),new AH.ptr(new $Uint64(2571100870,3497754540),-236,false),new AH.ptr(new $Uint64(3831238852,707476230),-210,false),new AH.ptr(new $Uint64(2854495385,1769181907),-183,false),new AH.ptr(new $Uint64(4253529586,2197867022),-157,false),new AH.ptr(new $Uint64(3169126500,2450594539),-130,false),new AH.ptr(new $Uint64(2361183241,1867548876),-103,false),new AH.ptr(new $Uint64(3518437208,3793315116),-77,false),new AH.ptr(new $Uint64(2621440000,0),-50,false),new AH.ptr(new $Uint64(3906250000,0),-24,false),new AH.ptr(new $Uint64(2910383045,2892103680),3,false),new AH.ptr(new $Uint64(2168404344,4170451332),30,false),new AH.ptr(new $Uint64(3231174267,3372684723),56,false),new AH.ptr(new $Uint64(2407412430,2078956656),83,false),new AH.ptr(new $Uint64(3587324068,2884206696),109,false),new AH.ptr(new $Uint64(2672764710,395977285),136,false),new AH.ptr(new $Uint64(3982729777,3569679143),162,false),new AH.ptr(new $Uint64(2967364920,2361961896),189,false),new AH.ptr(new $Uint64(2210859150,447440347),216,false),new AH.ptr(new $Uint64(3294436857,1114709402),242,false),new AH.ptr(new $Uint64(2454546732,2786846552),269,false),new AH.ptr(new $Uint64(3657559652,443583978),295,false),new AH.ptr(new $Uint64(2725094297,2599384906),322,false),new AH.ptr(new $Uint64(4060706939,3028118405),348,false),new AH.ptr(new $Uint64(3025462433,2044532855),375,false),new AH.ptr(new $Uint64(2254145170,1536935362),402,false),new AH.ptr(new $Uint64(3358938053,3365297469),428,false),new AH.ptr(new $Uint64(2502603868,4204241075),455,false),new AH.ptr(new $Uint64(3729170365,2577424355),481,false),new AH.ptr(new $Uint64(2778448436,3677981733),508,false),new AH.ptr(new $Uint64(4140210802,2744688476),534,false),new AH.ptr(new $Uint64(3084697427,1424604878),561,false),new AH.ptr(new $Uint64(2298278679,4062331362),588,false),new AH.ptr(new $Uint64(3424702107,3546052773),614,false),new AH.ptr(new $Uint64(2551601907,2065781727),641,false),new AH.ptr(new $Uint64(3802183132,2535403578),667,false),new AH.ptr(new $Uint64(2832847187,1558426518),694,false),new AH.ptr(new $Uint64(4221271257,2762425404),720,false),new AH.ptr(new $Uint64(3145092172,2812560400),747,false),new AH.ptr(new $Uint64(2343276271,3057687578),774,false),new AH.ptr(new $Uint64(3491753744,2790753324),800,false),new AH.ptr(new $Uint64(2601559269,3918606633),827,false),new AH.ptr(new $Uint64(3876625403,2711358621),853,false),new AH.ptr(new $Uint64(2888311001,1648096297),880,false),new AH.ptr(new $Uint64(2151959390,2057817989),907,false),new AH.ptr(new $Uint64(3206669376,61660461),933,false),new AH.ptr(new $Uint64(2389154863,1581580175),960,false),new AH.ptr(new $Uint64(3560118173,2626467905),986,false),new AH.ptr(new $Uint64(2652494738,3034782633),1013,false),new AH.ptr(new $Uint64(3952525166,3135207385),1039,false),new AH.ptr(new $Uint64(2944860731,2616258155),1066,false)]);AK=$toNativeArray($kindUint64,[new $Uint64(0,1),new $Uint64(0,10),new $Uint64(0,100),new $Uint64(0,1000),new $Uint64(0,10000),new $Uint64(0,100000),new $Uint64(0,1000000),new $Uint64(0,10000000),new $Uint64(0,100000000),new $Uint64(0,1000000000),new $Uint64(2,1410065408),new $Uint64(23,1215752192),new $Uint64(232,3567587328),new $Uint64(2328,1316134912),new $Uint64(23283,276447232),new $Uint64(232830,2764472320),new $Uint64(2328306,1874919424),new $Uint64(23283064,1569325056),new $Uint64(232830643,2808348672),new $Uint64(2328306436,2313682944)]);AP=new AO.ptr(23,8,-127);AQ=new AO.ptr(52,11,-1023);BD=new CL([32,126,161,887,890,895,900,1366,1369,1418,1421,1479,1488,1514,1520,1524,1542,1563,1566,1805,1808,1866,1869,1969,1984,2042,2048,2093,2096,2139,2142,2142,2208,2228,2275,2444,2447,2448,2451,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2531,2534,2555,2561,2570,2575,2576,2579,2617,2620,2626,2631,2632,2635,2637,2641,2641,2649,2654,2662,2677,2689,2745,2748,2765,2768,2768,2784,2787,2790,2801,2809,2809,2817,2828,2831,2832,2835,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2915,2918,2935,2946,2954,2958,2965,2969,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3021,3024,3024,3031,3031,3046,3066,3072,3129,3133,3149,3157,3162,3168,3171,3174,3183,3192,3257,3260,3277,3285,3286,3294,3299,3302,3314,3329,3386,3389,3406,3415,3415,3423,3427,3430,3445,3449,3455,3458,3478,3482,3517,3520,3526,3530,3530,3535,3551,3558,3567,3570,3572,3585,3642,3647,3675,3713,3716,3719,3722,3725,3725,3732,3751,3754,3773,3776,3789,3792,3801,3804,3807,3840,3948,3953,4058,4096,4295,4301,4301,4304,4685,4688,4701,4704,4749,4752,4789,4792,4805,4808,4885,4888,4954,4957,4988,4992,5017,5024,5109,5112,5117,5120,5788,5792,5880,5888,5908,5920,5942,5952,5971,5984,6003,6016,6109,6112,6121,6128,6137,6144,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6443,6448,6459,6464,6464,6468,6509,6512,6516,6528,6571,6576,6601,6608,6618,6622,6683,6686,6780,6783,6793,6800,6809,6816,6829,6832,6846,6912,6987,6992,7036,7040,7155,7164,7223,7227,7241,7245,7295,7360,7367,7376,7417,7424,7669,7676,7957,7960,7965,7968,8005,8008,8013,8016,8061,8064,8147,8150,8175,8178,8190,8208,8231,8240,8286,8304,8305,8308,8348,8352,8382,8400,8432,8448,8587,8592,9210,9216,9254,9280,9290,9312,11123,11126,11157,11160,11193,11197,11217,11244,11247,11264,11507,11513,11559,11565,11565,11568,11623,11631,11632,11647,11670,11680,11842,11904,12019,12032,12245,12272,12283,12289,12438,12441,12543,12549,12589,12593,12730,12736,12771,12784,19893,19904,40917,40960,42124,42128,42182,42192,42539,42560,42743,42752,42925,42928,42935,42999,43051,43056,43065,43072,43127,43136,43204,43214,43225,43232,43261,43264,43347,43359,43388,43392,43481,43486,43574,43584,43597,43600,43609,43612,43714,43739,43766,43777,43782,43785,43790,43793,43798,43808,43877,43888,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64449,64467,64831,64848,64911,64914,64967,65008,65021,65024,65049,65056,65131,65136,65276,65281,65470,65474,65479,65482,65487,65490,65495,65498,65500,65504,65518,65532,65533]);BE=new CL([173,907,909,930,1328,1376,1416,1424,1757,2111,2436,2473,2481,2526,2564,2601,2609,2612,2615,2621,2653,2692,2702,2706,2729,2737,2740,2758,2762,2820,2857,2865,2868,2910,2948,2961,2971,2973,3017,3076,3085,3089,3113,3141,3145,3159,3200,3204,3213,3217,3241,3252,3269,3273,3295,3312,3332,3341,3345,3397,3401,3460,3506,3516,3541,3543,3715,3721,3736,3744,3748,3750,3756,3770,3781,3783,3912,3992,4029,4045,4294,4681,4695,4697,4745,4785,4799,4801,4823,4881,5760,5901,5997,6001,6431,6751,7415,8024,8026,8028,8030,8117,8133,8156,8181,8335,11209,11311,11359,11558,11687,11695,11703,11711,11719,11727,11735,11743,11930,12352,12687,12831,13055,43470,43519,43815,43823,64311,64317,64319,64322,64325,65107,65127,65141,65511]);BF=new CM([65536,65613,65616,65629,65664,65786,65792,65794,65799,65843,65847,65932,65936,65947,65952,65952,66000,66045,66176,66204,66208,66256,66272,66299,66304,66339,66352,66378,66384,66426,66432,66499,66504,66517,66560,66717,66720,66729,66816,66855,66864,66915,66927,66927,67072,67382,67392,67413,67424,67431,67584,67589,67592,67640,67644,67644,67647,67742,67751,67759,67808,67829,67835,67867,67871,67897,67903,67903,67968,68023,68028,68047,68050,68102,68108,68147,68152,68154,68159,68167,68176,68184,68192,68255,68288,68326,68331,68342,68352,68405,68409,68437,68440,68466,68472,68497,68505,68508,68521,68527,68608,68680,68736,68786,68800,68850,68858,68863,69216,69246,69632,69709,69714,69743,69759,69825,69840,69864,69872,69881,69888,69955,69968,70006,70016,70093,70096,70132,70144,70205,70272,70313,70320,70378,70384,70393,70400,70412,70415,70416,70419,70457,70460,70468,70471,70472,70475,70477,70480,70480,70487,70487,70493,70499,70502,70508,70512,70516,70784,70855,70864,70873,71040,71093,71096,71133,71168,71236,71248,71257,71296,71351,71360,71369,71424,71449,71453,71467,71472,71487,71840,71922,71935,71935,72384,72440,73728,74649,74752,74868,74880,75075,77824,78894,82944,83526,92160,92728,92736,92777,92782,92783,92880,92909,92912,92917,92928,92997,93008,93047,93053,93071,93952,94020,94032,94078,94095,94111,110592,110593,113664,113770,113776,113788,113792,113800,113808,113817,113820,113823,118784,119029,119040,119078,119081,119154,119163,119272,119296,119365,119552,119638,119648,119665,119808,119967,119970,119970,119973,119974,119977,120074,120077,120134,120138,120485,120488,120779,120782,121483,121499,121519,124928,125124,125127,125142,126464,126500,126503,126523,126530,126530,126535,126548,126551,126564,126567,126619,126625,126651,126704,126705,126976,127019,127024,127123,127136,127150,127153,127221,127232,127244,127248,127339,127344,127386,127462,127490,127504,127546,127552,127560,127568,127569,127744,128720,128736,128748,128752,128755,128768,128883,128896,128980,129024,129035,129040,129095,129104,129113,129120,129159,129168,129197,129296,129304,129408,129412,129472,129472,131072,173782,173824,177972,177984,178205,178208,183969,194560,195101,917760,917999]);BG=new CL([12,39,59,62,926,2057,2102,2134,2291,2564,2580,2584,4285,4405,4576,4626,4743,4745,4750,4766,4868,4905,4913,4916,9327,27231,27482,27490,54357,54429,54445,54458,54460,54468,54534,54549,54557,54586,54591,54597,54609,55968,60932,60960,60963,60968,60979,60984,60986,61000,61002,61004,61008,61011,61016,61018,61020,61022,61024,61027,61035,61043,61048,61053,61055,61066,61092,61098,61632,61648,61743,62842,62884]);BM=$toNativeArray($kindUint,[0,0,1,0,2,0,0,0,3,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["encoding/base64"]=(function(){var $pkg={},$init,A,B,C,E,G,K,L,M,N,O,P,Q,S,D,F;A=$packages["io"];B=$packages["strconv"];C=$pkg.Encoding=$newType(0,$kindStruct,"base64.Encoding","Encoding","encoding/base64",function(encode_,decodeMap_,padChar_){this.$val=this;if(arguments.length===0){this.encode=K.zero();this.decodeMap=L.zero();this.padChar=0;return;}this.encode=encode_;this.decodeMap=decodeMap_;this.padChar=padChar_;});E=$pkg.encoder=$newType(0,$kindStruct,"base64.encoder","encoder","encoding/base64",function(err_,enc_,w_,buf_,nbuf_,out_){this.$val=this;if(arguments.length===0){this.err=$ifaceNil;this.enc=N.nil;this.w=$ifaceNil;this.buf=O.zero();this.nbuf=0;this.out=P.zero();return;}this.err=err_;this.enc=enc_;this.w=w_;this.buf=buf_;this.nbuf=nbuf_;this.out=out_;});G=$pkg.CorruptInputError=$newType(8,$kindInt64,"base64.CorruptInputError","CorruptInputError","encoding/base64",null);K=$arrayType($Uint8,64);L=$arrayType($Uint8,256);M=$sliceType($Uint8);N=$ptrType(C);O=$arrayType($Uint8,3);P=$arrayType($Uint8,1024);Q=$arrayType($Uint8,4);S=$ptrType(E);D=function(a){var $ptr,a,b,c,d,e,f,g;if(!((a.length===64))){$panic(new $String("encoding alphabet is not 64-bytes long"));}b=new C.ptr(K.zero(),L.zero(),0);b.padChar=61;$copyString(new M(b.encode),a);c=0;while(true){if(!(c<256)){break;}(d=b.decodeMap,((c<0||c>=d.length)?$throwRuntimeError("index out of range"):d[c]=255));c=c+(1)>>0;}e=0;while(true){if(!(e=f.length)?$throwRuntimeError("index out of range"):f[g]=(e<<24>>>24)));e=e+(1)>>0;}return b;};$pkg.NewEncoding=D;C.ptr.prototype.WithPadding=function(a){var $ptr,a,b;b=$clone(this,C);b.padChar=a;return b;};C.prototype.WithPadding=function(a){return this.$val.WithPadding(a);};C.ptr.prototype.Encode=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=this;if(b.$length===0){return;}d=0;e=0;f=d;g=e;i=((h=b.$length/3,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero")))*3>>0;while(true){if(!(g>0,((j<0||j>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+j]))>>>0)<<16>>>0)|(((k=g+1>>0,((k<0||k>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+k]))>>>0)<<8>>>0))>>>0)|((l=g+2>>0,((l<0||l>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+l]))>>>0))>>>0;(p=f+0>>0,((p<0||p>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+p]=(n=c.encode,o=((m>>>18>>>0)&63)>>>0,((o<0||o>=n.length)?$throwRuntimeError("index out of range"):n[o]))));(s=f+1>>0,((s<0||s>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+s]=(q=c.encode,r=((m>>>12>>>0)&63)>>>0,((r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]))));(v=f+2>>0,((v<0||v>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+v]=(t=c.encode,u=((m>>>6>>>0)&63)>>>0,((u<0||u>=t.length)?$throwRuntimeError("index out of range"):t[u]))));(y=f+3>>0,((y<0||y>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+y]=(w=c.encode,x=(m&63)>>>0,((x<0||x>=w.length)?$throwRuntimeError("index out of range"):w[x]))));g=g+(3)>>0;f=f+(4)>>0;}z=b.$length-g>>0;if(z===0){return;}ab=((aa=g+0>>0,((aa<0||aa>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+aa]))>>>0)<<16>>>0;if(z===2){ab=(ab|((((ac=g+1>>0,((ac<0||ac>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+ac]))>>>0)<<8>>>0)))>>>0;}(af=f+0>>0,((af<0||af>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+af]=(ad=c.encode,ae=((ab>>>18>>>0)&63)>>>0,((ae<0||ae>=ad.length)?$throwRuntimeError("index out of range"):ad[ae]))));(ai=f+1>>0,((ai<0||ai>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ai]=(ag=c.encode,ah=((ab>>>12>>>0)&63)>>>0,((ah<0||ah>=ag.length)?$throwRuntimeError("index out of range"):ag[ah]))));aj=z;if(aj===2){(am=f+2>>0,((am<0||am>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+am]=(ak=c.encode,al=((ab>>>6>>>0)&63)>>>0,((al<0||al>=ak.length)?$throwRuntimeError("index out of range"):ak[al]))));if(!((c.padChar===-1))){(an=f+3>>0,((an<0||an>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+an]=(c.padChar<<24>>>24)));}}else if(aj===1){if(!((c.padChar===-1))){(ao=f+2>>0,((ao<0||ao>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ao]=(c.padChar<<24>>>24)));(ap=f+3>>0,((ap<0||ap>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ap]=(c.padChar<<24>>>24)));}}};C.prototype.Encode=function(a,b){return this.$val.Encode(a,b);};C.ptr.prototype.EncodeToString=function(a){var $ptr,a,b,c;b=this;c=$makeSlice(M,b.EncodedLen(a.$length));b.Encode(c,a);return $bytesToString(c);};C.prototype.EncodeToString=function(a){return this.$val.EncodeToString(a);};E.ptr.prototype.Write=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=0;c=$ifaceNil;d=this;if(!($interfaceIsEqual(d.err,$ifaceNil))){e=0;f=d.err;b=e;c=f;return[b,c];}if(d.nbuf>0){$s=1;continue;}$s=2;continue;case 1:g=0;g=0;while(true){if(!(g=h.length)?$throwRuntimeError("index out of range"):h[i]=((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g])));d.nbuf=d.nbuf+(1)>>0;g=g+(1)>>0;}b=b+(g)>>0;a=$subslice(a,g);if(d.nbuf<3){return[b,c];}d.enc.Encode(new M(d.out),new M(d.buf));k=d.w.Write($subslice(new M(d.out),0,4));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;d.err=j[1];if(!($interfaceIsEqual(d.err,$ifaceNil))){$s=4;continue;}$s=5;continue;case 4:l=b;m=d.err;b=l;c=m;return[b,c];case 5:d.nbuf=0;case 2:case 6:if(!(a.$length>=3)){$s=7;continue;}n=768;if(n>a.$length){n=a.$length;n=n-((o=n%3,o===o?o:$throwRuntimeError("integer divide by zero")))>>0;}d.enc.Encode(new M(d.out),$subslice(a,0,n));r=d.w.Write($subslice(new M(d.out),0,((q=n/3,(q===q&&q!==1/0&&q!==-1/0)?q>>0:$throwRuntimeError("integer divide by zero"))*4>>0)));$s=8;case 8:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}p=r;d.err=p[1];if(!($interfaceIsEqual(d.err,$ifaceNil))){$s=9;continue;}$s=10;continue;case 9:s=b;t=d.err;b=s;c=t;return[b,c];case 10:b=b+(n)>>0;a=$subslice(a,n);$s=6;continue;case 7:u=0;while(true){if(!(u=v.length)?$throwRuntimeError("index out of range"):v[u]=((u<0||u>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+u])));u=u+(1)>>0;}d.nbuf=a.$length;b=b+(a.$length)>>0;return[b,c];}return;}if($f===undefined){$f={$blk:E.ptr.prototype.Write};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.$s=$s;$f.$r=$r;return $f;};E.prototype.Write=function(a){return this.$val.Write(a);};E.ptr.prototype.Close=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if($interfaceIsEqual(a.err,$ifaceNil)&&a.nbuf>0){$s=1;continue;}$s=2;continue;case 1:a.enc.Encode(new M(a.out),$subslice(new M(a.buf),0,a.nbuf));c=a.w.Write($subslice(new M(a.out),0,a.enc.EncodedLen(a.nbuf)));$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;a.err=b[1];a.nbuf=0;case 2:return a.err;}return;}if($f===undefined){$f={$blk:E.ptr.prototype.Close};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};E.prototype.Close=function(){return this.$val.Close();};F=function(a,b){var $ptr,a,b;return new E.ptr($ifaceNil,a,b,O.zero(),0,P.zero());};$pkg.NewEncoder=F;C.ptr.prototype.EncodedLen=function(a){var $ptr,a,b,c,d;b=this;if(b.padChar===-1){return(c=(((a*8>>0)+5>>0))/6,(c===c&&c!==1/0&&c!==-1/0)?c>>0:$throwRuntimeError("integer divide by zero"));}return(d=((a+2>>0))/3,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"))*4>>0;};C.prototype.EncodedLen=function(a){return this.$val.EncodedLen(a);};G.prototype.Error=function(){var $ptr,a;a=this;return"illegal base64 data at input byte "+B.FormatInt(new $Int64(a.$high,a.$low),10);};$ptrType(G).prototype.Error=function(){return this.$get().Error();};C.ptr.prototype.decode=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=0;d=false;e=$ifaceNil;f=this;g=0;while(true){if(!(g=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===10)||(((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===13)))){break;}g=g+(1)>>0;}while(true){if(!(g>0));c=p;d=q;e=r;return[c,d,e];}s=o-1>>0;t=o;u=true;k=s;l=t;d=u;break;}v=((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g]);g=g+(1)>>0;while(true){if(!(g=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===10)||(((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===13)))){break;}g=g+(1)>>0;}if((v>>0)===f.padChar){w=o;if(w===0||w===1){x=c;y=false;z=new G(0,(g-1>>0));c=x;d=y;e=z;return[c,d,e];}else if(w===2){if(g===b.$length){aa=c;ab=false;ac=new G(0,b.$length);c=aa;d=ab;e=ac;return[c,d,e];}if(!(((((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])>>0)===f.padChar))){ad=c;ae=false;af=new G(0,(g-1>>0));c=ad;d=ae;e=af;return[c,d,e];}g=g+(1)>>0;while(true){if(!(g=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===10)||(((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g])===13)))){break;}g=g+(1)>>0;}}if(g=h.length)?$throwRuntimeError("index out of range"):h[o]=(aj=f.decodeMap,((v<0||v>=aj.length)?$throwRuntimeError("index out of range"):aj[v])));if(((o<0||o>=h.length)?$throwRuntimeError("index out of range"):h[o])===255){ak=c;al=false;am=new G(0,(g-1>>0));c=ak;d=al;e=am;return[c,d,e];}n++;}an=(((((((h[0]>>>0)<<18>>>0)|((h[1]>>>0)<<12>>>0))>>>0)|((h[2]>>>0)<<6>>>0))>>>0)|(h[3]>>>0))>>>0;ao=l;if(ao===4){(2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2]=((an>>>0>>>0)<<24>>>24));(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((an>>>8>>>0)<<24>>>24));(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((an>>>16>>>0)<<24>>>24));}else if(ao===3){(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1]=((an>>>8>>>0)<<24>>>24));(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((an>>>16>>>0)<<24>>>24));}else if(ao===2){(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]=((an>>>16>>>0)<<24>>>24));}a=$subslice(a,k);c=c+((l-1>>0))>>0;}ap=c;aq=d;ar=e;c=ap;d=aq;e=ar;return[c,d,e];};C.prototype.decode=function(a,b){return this.$val.decode(a,b);};C.ptr.prototype.Decode=function(a,b){var $ptr,a,b,c,d,e,f;c=0;d=$ifaceNil;e=this;f=e.decode(a,b);c=f[0];d=f[2];return[c,d];};C.prototype.Decode=function(a,b){return this.$val.Decode(a,b);};C.ptr.prototype.DecodeString=function(a){var $ptr,a,b,c,d,e,f;b=this;c=$makeSlice(M,b.DecodedLen(a.length));d=b.decode(c,new M($stringToBytes(a)));e=d[0];f=d[2];return[$subslice(c,0,e),f];};C.prototype.DecodeString=function(a){return this.$val.DecodeString(a);};C.ptr.prototype.DecodedLen=function(a){var $ptr,a,b,c,d;b=this;if(b.padChar===-1){return(c=(((a*6>>0)+7>>0))/8,(c===c&&c!==1/0&&c!==-1/0)?c>>0:$throwRuntimeError("integer divide by zero"));}return(d=a/4,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"))*3>>0;};C.prototype.DecodedLen=function(a){return this.$val.DecodedLen(a);};C.methods=[{prop:"WithPadding",name:"WithPadding",pkg:"",typ:$funcType([$Int32],[N],false)}];N.methods=[{prop:"Encode",name:"Encode",pkg:"",typ:$funcType([M,M],[],false)},{prop:"EncodeToString",name:"EncodeToString",pkg:"",typ:$funcType([M],[$String],false)},{prop:"EncodedLen",name:"EncodedLen",pkg:"",typ:$funcType([$Int],[$Int],false)},{prop:"decode",name:"decode",pkg:"encoding/base64",typ:$funcType([M,M],[$Int,$Bool,$error],false)},{prop:"Decode",name:"Decode",pkg:"",typ:$funcType([M,M],[$Int,$error],false)},{prop:"DecodeString",name:"DecodeString",pkg:"",typ:$funcType([$String],[M,$error],false)},{prop:"DecodedLen",name:"DecodedLen",pkg:"",typ:$funcType([$Int],[$Int],false)}];S.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([M],[$Int,$error],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)}];G.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];C.init([{prop:"encode",name:"encode",pkg:"encoding/base64",typ:K,tag:""},{prop:"decodeMap",name:"decodeMap",pkg:"encoding/base64",typ:L,tag:""},{prop:"padChar",name:"padChar",pkg:"encoding/base64",typ:$Int32,tag:""}]);E.init([{prop:"err",name:"err",pkg:"encoding/base64",typ:$error,tag:""},{prop:"enc",name:"enc",pkg:"encoding/base64",typ:N,tag:""},{prop:"w",name:"w",pkg:"encoding/base64",typ:A.Writer,tag:""},{prop:"buf",name:"buf",pkg:"encoding/base64",typ:O,tag:""},{prop:"nbuf",name:"nbuf",pkg:"encoding/base64",typ:$Int,tag:""},{prop:"out",name:"out",pkg:"encoding/base64",typ:P,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.StdEncoding=D("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");$pkg.URLEncoding=D("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");$pkg.RawStdEncoding=$pkg.StdEncoding.WithPadding(-1);$pkg.RawURLEncoding=$pkg.URLEncoding.WithPadding(-1);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["syscall"]=(function(){var $pkg={},$init,A,E,B,D,C,EW,EX,KP,KS,KY,LG,MN,MP,MW,MZ,NQ,NR,NZ,OI,OJ,OK,ON,OW,OX,OY,OZ,PD,PE,F,G,N,O,P,AP,AQ,AR,AS,BY,DZ,EY,EZ,FA,GC,H,I,J,K,L,Q,R,S,V,AU,AW,BH,BZ,CW,CX,CZ,DE,DU,EE,EF,FB,FD,FE,GW,GZ,HH,HK,HO,HP,HR,HS,HV,HX,HY,HZ,IS,JB,JD,JE,JF,JK,JZ,KI,KJ,KK;A=$packages["bytes"];E=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["runtime"];C=$packages["sync"];EW=$pkg.mmapper=$newType(0,$kindStruct,"syscall.mmapper","mmapper","syscall",function(Mutex_,active_,mmap_,munmap_){this.$val=this;if(arguments.length===0){this.Mutex=new C.Mutex.ptr(0,0);this.active=false;this.mmap=$throwNilPointerError;this.munmap=$throwNilPointerError;return;}this.Mutex=Mutex_;this.active=active_;this.mmap=mmap_;this.munmap=munmap_;});EX=$pkg.Errno=$newType(4,$kindUintptr,"syscall.Errno","Errno","syscall",null);KP=$pkg._C_int=$newType(4,$kindInt32,"syscall._C_int","_C_int","syscall",null);KS=$pkg.Timespec=$newType(0,$kindStruct,"syscall.Timespec","Timespec","syscall",function(Sec_,Nsec_){this.$val=this;if(arguments.length===0){this.Sec=new $Int64(0,0);this.Nsec=new $Int64(0,0);return;}this.Sec=Sec_;this.Nsec=Nsec_;});KY=$pkg.Stat_t=$newType(0,$kindStruct,"syscall.Stat_t","Stat_t","syscall",function(Dev_,Mode_,Nlink_,Ino_,Uid_,Gid_,Rdev_,Pad_cgo_0_,Atimespec_,Mtimespec_,Ctimespec_,Birthtimespec_,Size_,Blocks_,Blksize_,Flags_,Gen_,Lspare_,Qspare_){this.$val=this;if(arguments.length===0){this.Dev=0;this.Mode=0;this.Nlink=0;this.Ino=new $Uint64(0,0);this.Uid=0;this.Gid=0;this.Rdev=0;this.Pad_cgo_0=MZ.zero();this.Atimespec=new KS.ptr(new $Int64(0,0),new $Int64(0,0));this.Mtimespec=new KS.ptr(new $Int64(0,0),new $Int64(0,0));this.Ctimespec=new KS.ptr(new $Int64(0,0),new $Int64(0,0));this.Birthtimespec=new KS.ptr(new $Int64(0,0),new $Int64(0,0));this.Size=new $Int64(0,0);this.Blocks=new $Int64(0,0);this.Blksize=0;this.Flags=0;this.Gen=0;this.Lspare=0;this.Qspare=PE.zero();return;}this.Dev=Dev_;this.Mode=Mode_;this.Nlink=Nlink_;this.Ino=Ino_;this.Uid=Uid_;this.Gid=Gid_;this.Rdev=Rdev_;this.Pad_cgo_0=Pad_cgo_0_;this.Atimespec=Atimespec_;this.Mtimespec=Mtimespec_;this.Ctimespec=Ctimespec_;this.Birthtimespec=Birthtimespec_;this.Size=Size_;this.Blocks=Blocks_;this.Blksize=Blksize_;this.Flags=Flags_;this.Gen=Gen_;this.Lspare=Lspare_;this.Qspare=Qspare_;});LG=$pkg.Dirent=$newType(0,$kindStruct,"syscall.Dirent","Dirent","syscall",function(Ino_,Seekoff_,Reclen_,Namlen_,Type_,Name_,Pad_cgo_0_){this.$val=this;if(arguments.length===0){this.Ino=new $Uint64(0,0);this.Seekoff=new $Uint64(0,0);this.Reclen=0;this.Namlen=0;this.Type=0;this.Name=OJ.zero();this.Pad_cgo_0=OK.zero();return;}this.Ino=Ino_;this.Seekoff=Seekoff_;this.Reclen=Reclen_;this.Namlen=Namlen_;this.Type=Type_;this.Name=Name_;this.Pad_cgo_0=Pad_cgo_0_;});MN=$sliceType($Uint8);MP=$sliceType($String);MW=$ptrType($Uint8);MZ=$arrayType($Uint8,4);NQ=$sliceType(KP);NR=$ptrType($Uintptr);NZ=$arrayType($Uint8,32);OI=$arrayType(KP,14);OJ=$arrayType($Int8,1024);OK=$arrayType($Uint8,3);ON=$structType([{prop:"addr",name:"addr",pkg:"syscall",typ:$Uintptr,tag:""},{prop:"len",name:"len",pkg:"syscall",typ:$Int,tag:""},{prop:"cap",name:"cap",pkg:"syscall",typ:$Int,tag:""}]);OW=$ptrType(EW);OX=$mapType(MW,MN);OY=$funcType([$Uintptr,$Uintptr,$Int,$Int,$Int,$Int64],[$Uintptr,$error],false);OZ=$funcType([$Uintptr,$Uintptr],[$error],false);PD=$ptrType(KS);PE=$arrayType($Int64,2);H=function(){var $ptr;$flushConsole=(function(){var $ptr;if(!((G.$length===0))){$global.console.log($externalize($bytesToString(G),$String));G=MN.nil;}});};I=function(){var $ptr;if(!F){$global.console.error($externalize("warning: system calls not available, see https://github.com/gopherjs/gopherjs/blob/master/doc/syscalls.md",$String));}F=true;};J=function(i){var $ptr,i,j,k;j=$global.goPrintToConsole;if(!(j===undefined)){j(i);return;}G=$appendSlice(G,i);while(true){k=A.IndexByte(G,10);if(k===-1){break;}$global.console.log($externalize($bytesToString($subslice(G,0,k)),$String));G=$subslice(G,(k+1>>0));}};K=function(i){var $ptr,i;};L=function(){var $ptr,i,j,k,l,m,n;i=$global.process;if(i===undefined){return MP.nil;}j=i.env;k=$global.Object.keys(j);l=$makeSlice(MP,$parseInt(k.length));m=0;while(true){if(!(m<$parseInt(k.length))){break;}n=$internalize(k[m],$String);((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=n+"="+$internalize(j[$externalize(n,$String)],$String));m=m+(1)>>0;}return l;};Q=function(i){var $ptr,i,j,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);$deferred.push([(function(){var $ptr;$recover();}),[]]);if(N===null){if(O){return null;}O=true;j=$global.require;if(j===undefined){$panic(new $String(""));}N=j($externalize("syscall",$String));}return N[$externalize(i,$String)];}catch(err){$err=err;return null;}finally{$callDeferred($deferred,$err);}};R=function(i,j,k,l){var $ptr,aa,ab,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;m=0;n=0;o=0;p=Q("Syscall");if(!(p===null)){q=p(i,j,k,l);r=(($parseInt(q[0])>>0)>>>0);s=(($parseInt(q[1])>>0)>>>0);t=(($parseInt(q[2])>>0)>>>0);m=r;n=s;o=t;return[m,n,o];}if((i===4)&&((j===1)||(j===2))){u=k;v=$makeSlice(MN,$parseInt(u.length));v.$array=u;J(v);w=($parseInt(u.length)>>>0);x=0;y=0;m=w;n=x;o=y;return[m,n,o];}I();z=(P>>>0);aa=0;ab=13;m=z;n=aa;o=ab;return[m,n,o];};$pkg.Syscall=R;S=function(i,j,k,l,m,n,o){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=0;q=0;r=0;s=Q("Syscall6");if(!(s===null)){t=s(i,j,k,l,m,n,o);u=(($parseInt(t[0])>>0)>>>0);v=(($parseInt(t[1])>>0)>>>0);w=(($parseInt(t[2])>>0)>>>0);p=u;q=v;r=w;return[p,q,r];}if(!((i===202))){I();}x=(P>>>0);y=0;z=13;p=x;q=y;r=z;return[p,q,r];};$pkg.Syscall6=S;V=function(i){var $ptr,i,j,k,l,m,n;j=new($global.Uint8Array)(i.length+1>>0);k=new MN($stringToBytes(i));l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(n===0){return[MW.nil,new EX(22)];}j[m]=n;l++;}j[i.length]=0;return[j,$ifaceNil];};$pkg.BytePtrFromString=V;AU=function(){var $ptr,i,j,k,l,m,n,o,p,q,r;AR={};i=AS;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=0;while(true){if(!(m=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+k]="");}break;}m=m+(1)>>0;}j++;}};AW=function(i){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);j="";k=false;$r=AP.Do(AU);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(i.length===0){l="";m=false;j=l;k=m;return[j,k];}$r=AQ.RLock();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(AQ,"RUnlock"),[]]);n=(o=AR[$String.keyFor(i)],o!==undefined?[o.v,true]:[0,false]);p=n[0];q=n[1];if(!q){r="";s=false;j=r;k=s;return[j,k];}t=((p<0||p>=AS.$length)?$throwRuntimeError("index out of range"):AS.$array[AS.$offset+p]);u=0;while(true){if(!(u>0));w=true;j=v;k=w;return[j,k];}u=u+(1)>>0;}x="";y=false;j=x;k=y;return[j,k];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[j,k];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:AW};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};$pkg.Getenv=AW;BH=function(i){var $ptr,i;GZ(i,2,1);};$pkg.CloseOnExec=BH;BZ=function(i){var $ptr,i,j;j=8;j=4;if(i===0){return j;}return(((i+j>>0)-1>>0))&(~((j-1>>0))>>0);};CW=function(i){var $ptr,i;if(i<0){return"-"+CX((-i>>>0));}return CX((i>>>0));};CX=function(i){var $ptr,i,j,k,l,m;j=NZ.zero();k=31;while(true){if(!(i>=10)){break;}((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=(((l=i%10,l===l?l:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24));k=k-(1)>>0;i=(m=i/(10),(m===m&&m!==1/0&&m!==-1/0)?m>>>0:$throwRuntimeError("integer divide by zero"));}((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=((i+48>>>0)<<24>>>24));return $bytesToString($subslice(new MN(j),k));};CZ=function(i){var $ptr,i,j,k;j=0;while(true){if(!(j>0;}k=$makeSlice(MN,(i.length+1>>0));$copyString(k,i);return[k,$ifaceNil];};$pkg.ByteSliceFromString=CZ;KS.ptr.prototype.Unix=function(){var $ptr,i,j,k,l,m;i=new $Int64(0,0);j=new $Int64(0,0);k=this;l=k.Sec;m=k.Nsec;i=l;j=m;return[i,j];};KS.prototype.Unix=function(){return this.$val.Unix();};KS.ptr.prototype.Nano=function(){var $ptr,i,j,k;i=this;return(j=$mul64(i.Sec,new $Int64(0,1000000000)),k=i.Nsec,new $Int64(j.$high+k.$high,j.$low+k.$low));};KS.prototype.Nano=function(){return this.$val.Nano();};DE=function(i,j){var $ptr,i,j,k,l,m,n;k=0;l=$ifaceNil;m=new Uint8Array(8);n=HZ(i,j,m);k=n[0];l=n[1];return[k,l];};$pkg.ReadDirent=DE;DU=function(i){var $ptr,aa,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j="";k=$ifaceNil;l=EE(i);m=l[0];k=l[1];if(!($interfaceIsEqual(k,$ifaceNil))){n="";o=k;j=n;k=o;return[j,k];}p=0;k=GW(m,MW.nil,(q||(q=new NR(function(){return p;},function($v){p=$v;}))),MW.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){r="";s=k;j=r;k=s;return[j,k];}if(p===0){t="";u=$ifaceNil;j=t;k=u;return[j,k];}v=$makeSlice(MN,p);k=GW(m,$indexPtr(v.$array,v.$offset+0,MW),(q||(q=new NR(function(){return p;},function($v){p=$v;}))),MW.nil,0);if(!($interfaceIsEqual(k,$ifaceNil))){w="";x=k;j=w;k=x;return[j,k];}if(p>0&&((y=p-1>>>0,((y<0||y>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+y]))===0)){p=p-(1)>>>0;}z=$bytesToString($subslice(v,0,p));aa=$ifaceNil;j=z;k=aa;return[j,k];};$pkg.Sysctl=DU;EE=function(i){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;j=NQ.nil;k=$ifaceNil;l=OI.zero();m=48;n=$sliceToArray(new MN(l));o=CZ(i);p=o[0];k=o[1];if(!($interfaceIsEqual(k,$ifaceNil))){q=NQ.nil;r=k;j=q;k=r;return[j,k];}k=GW(new NQ([0,3]),n,(s||(s=new NR(function(){return m;},function($v){m=$v;}))),$indexPtr(p.$array,p.$offset+0,MW),(i.length>>>0));if(!($interfaceIsEqual(k,$ifaceNil))){t=NQ.nil;u=k;j=t;k=u;return[j,k];}v=$subslice(new NQ(l),0,(w=m/4,(w===w&&w!==1/0&&w!==-1/0)?w>>>0:$throwRuntimeError("integer divide by zero")));x=$ifaceNil;j=v;k=x;return[j,k];};EF=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y;l=0;m=0;n=MP.nil;o=i.$length;while(true){if(!(!((j===0))&&i.$length>0)){break;}s=(p=$sliceToArray(i),q=new LG.ptr(new $Uint64(0,0),new $Uint64(0,0),0,0,0,OJ.zero(),OK.zero()),r=new DataView(p.buffer,p.byteOffset),q.Ino=new $Uint64(r.getUint32(4,true),r.getUint32(0,true)),q.Seekoff=new $Uint64(r.getUint32(12,true),r.getUint32(8,true)),q.Reclen=r.getUint16(16,true),q.Namlen=r.getUint16(18,true),q.Type=r.getUint8(20,true),q.Name=new($nativeArray($kindInt8))(p.buffer,$min(p.byteOffset+21,p.buffer.byteLength)),q.Pad_cgo_0=new($nativeArray($kindUint8))(p.buffer,$min(p.byteOffset+1045,p.buffer.byteLength)),q);if(s.Reclen===0){i=MN.nil;break;}i=$subslice(i,s.Reclen);if((t=s.Ino,(t.$high===0&&t.$low===0))){continue;}u=$sliceToArray(new MN(s.Name));v=$bytesToString($subslice(new MN(u),0,s.Namlen));if(v==="."||v===".."){continue;}j=j-(1)>>0;m=m+(1)>>0;k=$append(k,v);}w=o-i.$length>>0;x=m;y=k;l=w;m=x;n=y;return[l,m,n];};$pkg.ParseDirent=EF;EW.ptr.prototype.Mmap=function(i,j,k,l,m){var $ptr,aa,ab,ac,ad,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);n=[n];o=MN.nil;p=$ifaceNil;q=this;if(k<=0){r=MN.nil;s=new EX(22);o=r;p=s;return[o,p];}u=q.mmap(0,(k>>>0),l,m,i,j);$s=1;case 1:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;v=t[0];w=t[1];if(!($interfaceIsEqual(w,$ifaceNil))){x=MN.nil;y=w;o=x;p=y;return[o,p];}n[0]=new ON.ptr(v,k,k);z=n[0];aa=$indexPtr(z.$array,z.$offset+(z.$capacity-1>>0),MW);$r=q.Mutex.Lock();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(q.Mutex,"Unlock"),[]]);ab=aa;(q.active||$throwRuntimeError("assignment to entry in nil map"))[MW.keyFor(ab)]={k:ab,v:z};ac=z;ad=$ifaceNil;o=ac;p=ad;return[o,p];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[o,p];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:EW.ptr.prototype.Mmap};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};EW.prototype.Mmap=function(i,j,k,l,m){return this.$val.Mmap(i,j,k,l,m);};EW.ptr.prototype.Munmap=function(i){var $ptr,i,j,k,l,m,n,o,p,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);j=$ifaceNil;k=this;if((i.$length===0)||!((i.$length===i.$capacity))){j=new EX(22);return j;}l=$indexPtr(i.$array,i.$offset+(i.$capacity-1>>0),MW);$r=k.Mutex.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(k.Mutex,"Unlock"),[]]);n=(m=k.active[MW.keyFor(l)],m!==undefined?m.v:MN.nil);if(n===MN.nil||!($indexPtr(n.$array,n.$offset+0,MW)===$indexPtr(i.$array,i.$offset+0,MW))){j=new EX(22);return j;}o=k.munmap($sliceToArray(n),(n.$length>>>0));$s=2;case 2:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;if(!($interfaceIsEqual(p,$ifaceNil))){$s=3;continue;}$s=4;continue;case 3:j=p;return j;case 4:delete k.active[MW.keyFor(l)];j=$ifaceNil;return j;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return j;}if($curGoroutine.asleep){if($f===undefined){$f={$blk:EW.ptr.prototype.Munmap};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};EW.prototype.Munmap=function(i){return this.$val.Munmap(i);};EX.prototype.Error=function(){var $ptr,i,j;i=this.$val;if(0<=(i>>0)&&(i>>0)<106){j=((i<0||i>=GC.length)?$throwRuntimeError("index out of range"):GC[i]);if(!(j==="")){return j;}}return"errno "+CW((i>>0));};$ptrType(EX).prototype.Error=function(){return new EX(this.$get()).Error();};EX.prototype.Temporary=function(){var $ptr,i;i=this.$val;return(i===4)||(i===24)||(i===54)||(i===53)||new EX(i).Timeout();};$ptrType(EX).prototype.Temporary=function(){return new EX(this.$get()).Temporary();};EX.prototype.Timeout=function(){var $ptr,i;i=this.$val;return(i===35)||(i===35)||(i===60);};$ptrType(EX).prototype.Timeout=function(){return new EX(this.$get()).Timeout();};FB=function(i){var $ptr,i,j;j=i;if(j===0){return $ifaceNil;}else if(j===35){return EY;}else if(j===22){return EZ;}else if(j===2){return FA;}return new EX(i);};FD=function(i,j){var $ptr,i,j,k,l,m;k=0;l=$ifaceNil;m=JF(i,j);k=m[0];l=m[1];return[k,l];};$pkg.Read=FD;FE=function(i,j){var $ptr,i,j,k,l,m;k=0;l=$ifaceNil;m=KI(i,j);k=m[0];l=m[1];return[k,l];};$pkg.Write=FE;GW=function(i,j,k,l,m){var $ptr,i,j,k,l,m,n,o,p,q;n=$ifaceNil;o=0;if(i.$length>0){o=$sliceToArray(i);}else{o=new Uint8Array(0);}p=S(202,o,(i.$length>>>0),j,k,l,m);q=p[2];if(!((q===0))){n=FB(q);}return n;};GZ=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p;l=0;m=$ifaceNil;n=R(92,(i>>>0),(j>>>0),(k>>>0));o=n[0];p=n[2];l=(o>>0);if(!((p===0))){m=FB(p);}return[l,m];};HH=function(i,j){var $ptr,i,j,k,l,m,n,o;k=$ifaceNil;l=MW.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}n=R(15,l,(j>>>0),0);o=n[2];K(l);if(!((o===0))){k=FB(o);}return k;};$pkg.Chmod=HH;HK=function(i){var $ptr,i,j,k,l;j=$ifaceNil;k=R(6,(i>>>0),0,0);l=k[2];if(!((l===0))){j=FB(l);}return j;};$pkg.Close=HK;HO=function(i){var $ptr,i;R(1,(i>>>0),0,0);return;};$pkg.Exit=HO;HP=function(i){var $ptr,i,j,k,l;j=$ifaceNil;k=R(13,(i>>>0),0,0);l=k[2];if(!((l===0))){j=FB(l);}return j;};$pkg.Fchdir=HP;HR=function(i,j){var $ptr,i,j,k,l,m;k=$ifaceNil;l=R(124,(i>>>0),(j>>>0),0);m=l[2];if(!((m===0))){k=FB(m);}return k;};$pkg.Fchmod=HR;HS=function(i,j,k){var $ptr,i,j,k,l,m,n;l=$ifaceNil;m=R(123,(i>>>0),(j>>>0),(k>>>0));n=m[2];if(!((n===0))){l=FB(n);}return l;};$pkg.Fchown=HS;HV=function(i,j){var $ptr,i,j,k,l,m,n,o,p;k=$ifaceNil;m=new Uint8Array(144);l=R(339,(i>>>0),m,0);n=j,o=new DataView(m.buffer,m.byteOffset),n.Dev=o.getInt32(0,true),n.Mode=o.getUint16(4,true),n.Nlink=o.getUint16(6,true),n.Ino=new $Uint64(o.getUint32(12,true),o.getUint32(8,true)),n.Uid=o.getUint32(16,true),n.Gid=o.getUint32(20,true),n.Rdev=o.getInt32(24,true),n.Pad_cgo_0=new($nativeArray($kindUint8))(m.buffer,$min(m.byteOffset+28,m.buffer.byteLength)),n.Atimespec.Sec=new $Int64(o.getUint32(36,true),o.getUint32(32,true)),n.Atimespec.Nsec=new $Int64(o.getUint32(44,true),o.getUint32(40,true)),n.Mtimespec.Sec=new $Int64(o.getUint32(52,true),o.getUint32(48,true)),n.Mtimespec.Nsec=new $Int64(o.getUint32(60,true),o.getUint32(56,true)),n.Ctimespec.Sec=new $Int64(o.getUint32(68,true),o.getUint32(64,true)),n.Ctimespec.Nsec=new $Int64(o.getUint32(76,true),o.getUint32(72,true)),n.Birthtimespec.Sec=new $Int64(o.getUint32(84,true),o.getUint32(80,true)),n.Birthtimespec.Nsec=new $Int64(o.getUint32(92,true),o.getUint32(88,true)),n.Size=new $Int64(o.getUint32(100,true),o.getUint32(96,true)),n.Blocks=new $Int64(o.getUint32(108,true),o.getUint32(104,true)),n.Blksize=o.getInt32(112,true),n.Flags=o.getUint32(116,true),n.Gen=o.getUint32(120,true),n.Lspare=o.getInt32(124,true),n.Qspare=new($nativeArray($kindInt64))(m.buffer,$min(m.byteOffset+128,m.buffer.byteLength));p=l[2];if(!((p===0))){k=FB(p);}return k;};$pkg.Fstat=HV;HX=function(i){var $ptr,i,j,k,l;j=$ifaceNil;k=R(95,(i>>>0),0,0);l=k[2];if(!((l===0))){j=FB(l);}return j;};$pkg.Fsync=HX;HY=function(i,j){var $ptr,i,j,k,l,m;k=$ifaceNil;l=R(201,(i>>>0),(j.$low>>>0),0);m=l[2];if(!((m===0))){k=FB(m);}return k;};$pkg.Ftruncate=HY;HZ=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q;l=0;m=$ifaceNil;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(344,(i>>>0),n,(j.$length>>>0),k,0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=FB(q);}return[l,m];};$pkg.Getdirentries=HZ;IS=function(i,j){var $ptr,i,j,k,l,m,n,o,p,q,r;k=$ifaceNil;l=MW.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}o=new Uint8Array(144);n=R(340,l,o,0);p=j,q=new DataView(o.buffer,o.byteOffset),p.Dev=q.getInt32(0,true),p.Mode=q.getUint16(4,true),p.Nlink=q.getUint16(6,true),p.Ino=new $Uint64(q.getUint32(12,true),q.getUint32(8,true)),p.Uid=q.getUint32(16,true),p.Gid=q.getUint32(20,true),p.Rdev=q.getInt32(24,true),p.Pad_cgo_0=new($nativeArray($kindUint8))(o.buffer,$min(o.byteOffset+28,o.buffer.byteLength)),p.Atimespec.Sec=new $Int64(q.getUint32(36,true),q.getUint32(32,true)),p.Atimespec.Nsec=new $Int64(q.getUint32(44,true),q.getUint32(40,true)),p.Mtimespec.Sec=new $Int64(q.getUint32(52,true),q.getUint32(48,true)),p.Mtimespec.Nsec=new $Int64(q.getUint32(60,true),q.getUint32(56,true)),p.Ctimespec.Sec=new $Int64(q.getUint32(68,true),q.getUint32(64,true)),p.Ctimespec.Nsec=new $Int64(q.getUint32(76,true),q.getUint32(72,true)),p.Birthtimespec.Sec=new $Int64(q.getUint32(84,true),q.getUint32(80,true)),p.Birthtimespec.Nsec=new $Int64(q.getUint32(92,true),q.getUint32(88,true)),p.Size=new $Int64(q.getUint32(100,true),q.getUint32(96,true)),p.Blocks=new $Int64(q.getUint32(108,true),q.getUint32(104,true)),p.Blksize=q.getInt32(112,true),p.Flags=q.getUint32(116,true),p.Gen=q.getUint32(120,true),p.Lspare=q.getInt32(124,true),p.Qspare=new($nativeArray($kindInt64))(o.buffer,$min(o.byteOffset+128,o.buffer.byteLength));r=n[2];K(l);if(!((r===0))){k=FB(r);}return k;};$pkg.Lstat=IS;JB=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q,r;l=0;m=$ifaceNil;n=MW.nil;o=V(i);n=o[0];m=o[1];if(!($interfaceIsEqual(m,$ifaceNil))){return[l,m];}p=R(5,n,(j>>>0),(k>>>0));q=p[0];r=p[2];K(n);l=(q>>0);if(!((r===0))){m=FB(r);}return[l,m];};$pkg.Open=JB;JD=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q;l=0;m=$ifaceNil;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(153,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=FB(q);}return[l,m];};$pkg.Pread=JD;JE=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q;l=0;m=$ifaceNil;n=0;if(j.$length>0){n=$sliceToArray(j);}else{n=new Uint8Array(0);}o=S(154,(i>>>0),n,(j.$length>>>0),(k.$low>>>0),0,0);p=o[0];q=o[2];l=(p>>0);if(!((q===0))){m=FB(q);}return[l,m];};$pkg.Pwrite=JE;JF=function(i,j){var $ptr,i,j,k,l,m,n,o,p;k=0;l=$ifaceNil;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(3,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=FB(p);}return[k,l];};JK=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p;l=new $Int64(0,0);m=$ifaceNil;n=R(199,(i>>>0),(j.$low>>>0),(k>>>0));o=n[0];p=n[2];l=new $Int64(0,o.constructor===Number?o:1);if(!((p===0))){m=FB(p);}return[l,m];};$pkg.Seek=JK;JZ=function(i,j){var $ptr,i,j,k,l,m,n,o,p,q,r;k=$ifaceNil;l=MW.nil;m=V(i);l=m[0];k=m[1];if(!($interfaceIsEqual(k,$ifaceNil))){return k;}o=new Uint8Array(144);n=R(338,l,o,0);p=j,q=new DataView(o.buffer,o.byteOffset),p.Dev=q.getInt32(0,true),p.Mode=q.getUint16(4,true),p.Nlink=q.getUint16(6,true),p.Ino=new $Uint64(q.getUint32(12,true),q.getUint32(8,true)),p.Uid=q.getUint32(16,true),p.Gid=q.getUint32(20,true),p.Rdev=q.getInt32(24,true),p.Pad_cgo_0=new($nativeArray($kindUint8))(o.buffer,$min(o.byteOffset+28,o.buffer.byteLength)),p.Atimespec.Sec=new $Int64(q.getUint32(36,true),q.getUint32(32,true)),p.Atimespec.Nsec=new $Int64(q.getUint32(44,true),q.getUint32(40,true)),p.Mtimespec.Sec=new $Int64(q.getUint32(52,true),q.getUint32(48,true)),p.Mtimespec.Nsec=new $Int64(q.getUint32(60,true),q.getUint32(56,true)),p.Ctimespec.Sec=new $Int64(q.getUint32(68,true),q.getUint32(64,true)),p.Ctimespec.Nsec=new $Int64(q.getUint32(76,true),q.getUint32(72,true)),p.Birthtimespec.Sec=new $Int64(q.getUint32(84,true),q.getUint32(80,true)),p.Birthtimespec.Nsec=new $Int64(q.getUint32(92,true),q.getUint32(88,true)),p.Size=new $Int64(q.getUint32(100,true),q.getUint32(96,true)),p.Blocks=new $Int64(q.getUint32(108,true),q.getUint32(104,true)),p.Blksize=q.getInt32(112,true),p.Flags=q.getUint32(116,true),p.Gen=q.getUint32(120,true),p.Lspare=q.getInt32(124,true),p.Qspare=new($nativeArray($kindInt64))(o.buffer,$min(o.byteOffset+128,o.buffer.byteLength));r=n[2];K(l);if(!((r===0))){k=FB(r);}return k;};$pkg.Stat=JZ;KI=function(i,j){var $ptr,i,j,k,l,m,n,o,p;k=0;l=$ifaceNil;m=0;if(j.$length>0){m=$sliceToArray(j);}else{m=new Uint8Array(0);}n=R(4,(i>>>0),m,(j.$length>>>0));o=n[0];p=n[2];k=(o>>0);if(!((p===0))){l=FB(p);}return[k,l];};KJ=function(i,j,k,l,m,n){var $ptr,i,j,k,l,m,n,o,p,q,r,s;o=0;p=$ifaceNil;q=S(197,i,j,(k>>>0),(l>>>0),(m>>>0),(n.$low>>>0));r=q[0];s=q[2];o=r;if(!((s===0))){p=FB(s);}return[o,p];};KK=function(i,j){var $ptr,i,j,k,l,m;k=$ifaceNil;l=R(73,i,j,0);m=l[2];if(!((m===0))){k=FB(m);}return k;};OW.methods=[{prop:"Mmap",name:"Mmap",pkg:"",typ:$funcType([$Int,$Int64,$Int,$Int,$Int],[MN,$error],false)},{prop:"Munmap",name:"Munmap",pkg:"",typ:$funcType([MN],[$error],false)}];EX.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)},{prop:"Temporary",name:"Temporary",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Timeout",name:"Timeout",pkg:"",typ:$funcType([],[$Bool],false)}];PD.methods=[{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64,$Int64],false)},{prop:"Nano",name:"Nano",pkg:"",typ:$funcType([],[$Int64],false)}];EW.init([{prop:"Mutex",name:"",pkg:"",typ:C.Mutex,tag:""},{prop:"active",name:"active",pkg:"syscall",typ:OX,tag:""},{prop:"mmap",name:"mmap",pkg:"syscall",typ:OY,tag:""},{prop:"munmap",name:"munmap",pkg:"syscall",typ:OZ,tag:""}]);KS.init([{prop:"Sec",name:"Sec",pkg:"",typ:$Int64,tag:""},{prop:"Nsec",name:"Nsec",pkg:"",typ:$Int64,tag:""}]);KY.init([{prop:"Dev",name:"Dev",pkg:"",typ:$Int32,tag:""},{prop:"Mode",name:"Mode",pkg:"",typ:$Uint16,tag:""},{prop:"Nlink",name:"Nlink",pkg:"",typ:$Uint16,tag:""},{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Uid",name:"Uid",pkg:"",typ:$Uint32,tag:""},{prop:"Gid",name:"Gid",pkg:"",typ:$Uint32,tag:""},{prop:"Rdev",name:"Rdev",pkg:"",typ:$Int32,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:MZ,tag:""},{prop:"Atimespec",name:"Atimespec",pkg:"",typ:KS,tag:""},{prop:"Mtimespec",name:"Mtimespec",pkg:"",typ:KS,tag:""},{prop:"Ctimespec",name:"Ctimespec",pkg:"",typ:KS,tag:""},{prop:"Birthtimespec",name:"Birthtimespec",pkg:"",typ:KS,tag:""},{prop:"Size",name:"Size",pkg:"",typ:$Int64,tag:""},{prop:"Blocks",name:"Blocks",pkg:"",typ:$Int64,tag:""},{prop:"Blksize",name:"Blksize",pkg:"",typ:$Int32,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:$Uint32,tag:""},{prop:"Gen",name:"Gen",pkg:"",typ:$Uint32,tag:""},{prop:"Lspare",name:"Lspare",pkg:"",typ:$Int32,tag:""},{prop:"Qspare",name:"Qspare",pkg:"",typ:PE,tag:""}]);LG.init([{prop:"Ino",name:"Ino",pkg:"",typ:$Uint64,tag:""},{prop:"Seekoff",name:"Seekoff",pkg:"",typ:$Uint64,tag:""},{prop:"Reclen",name:"Reclen",pkg:"",typ:$Uint16,tag:""},{prop:"Namlen",name:"Namlen",pkg:"",typ:$Uint16,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$Uint8,tag:""},{prop:"Name",name:"Name",pkg:"",typ:OJ,tag:""},{prop:"Pad_cgo_0",name:"Pad_cgo_0",pkg:"",typ:OK,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}G=MN.nil;N=null;AP=new C.Once.ptr(new C.Mutex.ptr(0,0),0);AQ=new C.RWMutex.ptr(new C.Mutex.ptr(0,0),0,0,0,0);AR=false;F=false;O=false;P=-1;AS=L();$pkg.Stdin=0;$pkg.Stdout=1;$pkg.Stderr=2;EY=new EX(35);EZ=new EX(22);FA=new EX(2);GC=$toNativeArray($kindString,["","operation not permitted","no such file or directory","no such process","interrupted system call","input/output error","device not configured","argument list too long","exec format error","bad file descriptor","no child processes","resource deadlock avoided","cannot allocate memory","permission denied","bad address","block device required","resource busy","file exists","cross-device link","operation not supported by device","not a directory","is a directory","invalid argument","too many open files in system","too many open files","inappropriate ioctl for device","text file busy","file too large","no space left on device","illegal seek","read-only file system","too many links","broken pipe","numerical argument out of domain","result too large","resource temporarily unavailable","operation now in progress","operation already in progress","socket operation on non-socket","destination address required","message too long","protocol wrong type for socket","protocol not available","protocol not supported","socket type not supported","operation not supported","protocol family not supported","address family not supported by protocol family","address already in use","can't assign requested address","network is down","network is unreachable","network dropped connection on reset","software caused connection abort","connection reset by peer","no buffer space available","socket is already connected","socket is not connected","can't send after socket shutdown","too many references: can't splice","operation timed out","connection refused","too many levels of symbolic links","file name too long","host is down","no route to host","directory not empty","too many processes","too many users","disc quota exceeded","stale NFS file handle","too many levels of remote in path","RPC struct is bad","RPC version wrong","RPC prog. not avail","program version wrong","bad procedure for program","no locks available","function not implemented","inappropriate file type or format","authentication error","need authenticator","device power is off","device error","value too large to be stored in data type","bad executable (or shared library)","bad CPU type in executable","shared library version mismatch","malformed Mach-o file","operation canceled","identifier removed","no message of desired type","illegal byte sequence","attribute not found","bad message","EMULTIHOP (Reserved)","no message available on STREAM","ENOLINK (Reserved)","no STREAM resources","not a STREAM","protocol error","STREAM ioctl timeout","operation not supported on socket","policy not found","state not recoverable","previous owner died"]);DZ=new EW.ptr(new C.Mutex.ptr(0,0),{},KJ,KK);BY=BZ(0);H();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/gopherjs/gopherjs/nosync"]=(function(){var $pkg={},$init,A,B,C,D,F,G,H,I,J;A=$pkg.Mutex=$newType(0,$kindStruct,"nosync.Mutex","Mutex","github.com/gopherjs/gopherjs/nosync",function(locked_){this.$val=this;if(arguments.length===0){this.locked=false;return;}this.locked=locked_;});B=$pkg.RWMutex=$newType(0,$kindStruct,"nosync.RWMutex","RWMutex","github.com/gopherjs/gopherjs/nosync",function(writeLocked_,readLockCounter_){this.$val=this;if(arguments.length===0){this.writeLocked=false;this.readLockCounter=0;return;}this.writeLocked=writeLocked_;this.readLockCounter=readLockCounter_;});C=$pkg.WaitGroup=$newType(0,$kindStruct,"nosync.WaitGroup","WaitGroup","github.com/gopherjs/gopherjs/nosync",function(counter_){this.$val=this;if(arguments.length===0){this.counter=0;return;}this.counter=counter_;});D=$pkg.Once=$newType(0,$kindStruct,"nosync.Once","Once","github.com/gopherjs/gopherjs/nosync",function(doing_,done_){this.$val=this;if(arguments.length===0){this.doing=false;this.done=false;return;}this.doing=doing_;this.done=done_;});F=$ptrType(A);G=$ptrType(B);H=$ptrType(C);I=$funcType([],[],false);J=$ptrType(D);A.ptr.prototype.Lock=function(){var $ptr,a;a=this;if(a.locked){$panic(new $String("nosync: mutex is already locked"));}a.locked=true;};A.prototype.Lock=function(){return this.$val.Lock();};A.ptr.prototype.Unlock=function(){var $ptr,a;a=this;if(!a.locked){$panic(new $String("nosync: unlock of unlocked mutex"));}a.locked=false;};A.prototype.Unlock=function(){return this.$val.Unlock();};B.ptr.prototype.Lock=function(){var $ptr,a;a=this;if(!((a.readLockCounter===0))||a.writeLocked){$panic(new $String("nosync: mutex is already locked"));}a.writeLocked=true;};B.prototype.Lock=function(){return this.$val.Lock();};B.ptr.prototype.Unlock=function(){var $ptr,a;a=this;if(!a.writeLocked){$panic(new $String("nosync: unlock of unlocked mutex"));}a.writeLocked=false;};B.prototype.Unlock=function(){return this.$val.Unlock();};B.ptr.prototype.RLock=function(){var $ptr,a;a=this;if(a.writeLocked){$panic(new $String("nosync: mutex is already locked"));}a.readLockCounter=a.readLockCounter+(1)>>0;};B.prototype.RLock=function(){return this.$val.RLock();};B.ptr.prototype.RUnlock=function(){var $ptr,a;a=this;if(a.readLockCounter===0){$panic(new $String("nosync: unlock of unlocked mutex"));}a.readLockCounter=a.readLockCounter-(1)>>0;};B.prototype.RUnlock=function(){return this.$val.RUnlock();};C.ptr.prototype.Add=function(a){var $ptr,a,b;b=this;b.counter=b.counter+(a)>>0;if(b.counter<0){$panic(new $String("sync: negative WaitGroup counter"));}};C.prototype.Add=function(a){return this.$val.Add(a);};C.ptr.prototype.Done=function(){var $ptr,a;a=this;a.Add(-1);};C.prototype.Done=function(){return this.$val.Done();};C.ptr.prototype.Wait=function(){var $ptr,a;a=this;if(!((a.counter===0))){$panic(new $String("sync: WaitGroup counter not zero"));}};C.prototype.Wait=function(){return this.$val.Wait();};D.ptr.prototype.Do=function(a){var $ptr,a,b,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);b=[b];b[0]=this;if(b[0].done){return;}if(b[0].doing){$panic(new $String("nosync: Do called within f"));}b[0].doing=true;$deferred.push([(function(b){return function(){var $ptr;b[0].doing=false;b[0].done=true;};})(b),[]]);$r=a();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:D.ptr.prototype.Do};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};D.prototype.Do=function(a){return this.$val.Do(a);};F.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)}];G.methods=[{prop:"Lock",name:"Lock",pkg:"",typ:$funcType([],[],false)},{prop:"Unlock",name:"Unlock",pkg:"",typ:$funcType([],[],false)},{prop:"RLock",name:"RLock",pkg:"",typ:$funcType([],[],false)},{prop:"RUnlock",name:"RUnlock",pkg:"",typ:$funcType([],[],false)}];H.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Done",name:"Done",pkg:"",typ:$funcType([],[],false)},{prop:"Wait",name:"Wait",pkg:"",typ:$funcType([],[],false)}];J.methods=[{prop:"Do",name:"Do",pkg:"",typ:$funcType([I],[],false)}];A.init([{prop:"locked",name:"locked",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);B.init([{prop:"writeLocked",name:"writeLocked",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"readLockCounter",name:"readLockCounter",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Int,tag:""}]);C.init([{prop:"counter",name:"counter",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Int,tag:""}]);D.init([{prop:"doing",name:"doing",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""},{prop:"done",name:"done",pkg:"github.com/gopherjs/gopherjs/nosync",typ:$Bool,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["strings"]=(function(){var $pkg={},$init,C,B,D,E,A,K,M,N,P,Q,S,T,U,W,Y,Z,AA,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,F,G,H,I,L,O,R,V,X,AB,AC,AD,AE,AH,AI,AJ,AK,AL,AO,AP,AR,AV,AW,AX,AY,BB,BI,BJ,BK,BL,BN,BO,BT,BU,BV,BW;C=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];D=$packages["io"];E=$packages["unicode"];A=$packages["unicode/utf8"];K=$pkg.Reader=$newType(0,$kindStruct,"strings.Reader","Reader","strings",function(s_,i_,prevRune_){this.$val=this;if(arguments.length===0){this.s="";this.i=new $Int64(0,0);this.prevRune=0;return;}this.s=s_;this.i=i_;this.prevRune=prevRune_;});M=$pkg.Replacer=$newType(0,$kindStruct,"strings.Replacer","Replacer","strings",function(r_){this.$val=this;if(arguments.length===0){this.r=$ifaceNil;return;}this.r=r_;});N=$pkg.replacer=$newType(8,$kindInterface,"strings.replacer","replacer","strings",null);P=$pkg.trieNode=$newType(0,$kindStruct,"strings.trieNode","trieNode","strings",function(value_,priority_,prefix_,next_,table_){this.$val=this;if(arguments.length===0){this.value="";this.priority=0;this.prefix="";this.next=CD.nil;this.table=CE.nil;return;}this.value=value_;this.priority=priority_;this.prefix=prefix_;this.next=next_;this.table=table_;});Q=$pkg.genericReplacer=$newType(0,$kindStruct,"strings.genericReplacer","genericReplacer","strings",function(root_,tableSize_,mapping_){this.$val=this;if(arguments.length===0){this.root=new P.ptr("",0,"",CD.nil,CE.nil);this.tableSize=0;this.mapping=BY.zero();return;}this.root=root_;this.tableSize=tableSize_;this.mapping=mapping_;});S=$pkg.appendSliceWriter=$newType(12,$kindSlice,"strings.appendSliceWriter","appendSliceWriter","strings",null);T=$pkg.stringWriterIface=$newType(8,$kindInterface,"strings.stringWriterIface","stringWriterIface","strings",null);U=$pkg.stringWriter=$newType(0,$kindStruct,"strings.stringWriter","stringWriter","strings",function(w_){this.$val=this;if(arguments.length===0){this.w=$ifaceNil;return;}this.w=w_;});W=$pkg.singleStringReplacer=$newType(0,$kindStruct,"strings.singleStringReplacer","singleStringReplacer","strings",function(finder_,value_){this.$val=this;if(arguments.length===0){this.finder=CG.nil;this.value="";return;}this.finder=finder_;this.value=value_;});Y=$pkg.byteReplacer=$newType(256,$kindArray,"strings.byteReplacer","byteReplacer","strings",null);Z=$pkg.byteStringReplacer=$newType(4092,$kindArray,"strings.byteStringReplacer","byteStringReplacer","strings",null);AA=$pkg.stringFinder=$newType(0,$kindStruct,"strings.stringFinder","stringFinder","strings",function(pattern_,badCharSkip_,goodSuffixSkip_){this.$val=this;if(arguments.length===0){this.pattern="";this.badCharSkip=CH.zero();this.goodSuffixSkip=CI.nil;return;}this.pattern=pattern_;this.badCharSkip=badCharSkip_;this.goodSuffixSkip=goodSuffixSkip_;});BY=$arrayType($Uint8,256);BZ=$ptrType(Y);CA=$sliceType($Uint8);CB=$arrayType(CA,256);CC=$ptrType(Z);CD=$ptrType(P);CE=$sliceType(CD);CF=$ptrType(S);CG=$ptrType(AA);CH=$arrayType($Int,256);CI=$sliceType($Int);CJ=$sliceType($String);CK=$ptrType(K);CL=$ptrType(M);CM=$ptrType(Q);CN=$ptrType(W);F=function(e,f){var $ptr,e,f;return $parseInt(e.indexOf($global.String.fromCharCode(f)))>>0;};$pkg.IndexByte=F;G=function(e,f){var $ptr,e,f;return $parseInt(e.indexOf(f))>>0;};$pkg.Index=G;H=function(e,f){var $ptr,e,f;return $parseInt(e.lastIndexOf(f))>>0;};$pkg.LastIndex=H;I=function(e,f){var $ptr,e,f,g,h;g=0;if(f.length===0){return A.RuneCountInString(e)+1>>0;}else if(f.length>e.length){return 0;}else if(f.length===e.length){if(f===e){return 1;}return 0;}while(true){h=G(e,f);if(h===-1){break;}g=g+(1)>>0;e=e.substring((h+f.length>>0));}return g;};$pkg.Count=I;K.ptr.prototype.Len=function(){var $ptr,e,f,g,h,i,j;e=this;if((f=e.i,g=new $Int64(0,e.s.length),(f.$high>g.$high||(f.$high===g.$high&&f.$low>=g.$low)))){return 0;}return((h=(i=new $Int64(0,e.s.length),j=e.i,new $Int64(i.$high-j.$high,i.$low-j.$low)),h.$low+((h.$high>>31)*4294967296))>>0);};K.prototype.Len=function(){return this.$val.Len();};K.ptr.prototype.Size=function(){var $ptr,e;e=this;return new $Int64(0,e.s.length);};K.prototype.Size=function(){return this.$val.Size();};K.ptr.prototype.Read=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p;f=0;g=$ifaceNil;h=this;if(e.$length===0){i=0;j=$ifaceNil;f=i;g=j;return[f,g];}if((k=h.i,l=new $Int64(0,h.s.length),(k.$high>l.$high||(k.$high===l.$high&&k.$low>=l.$low)))){m=0;n=D.EOF;f=m;g=n;return[f,g];}h.prevRune=-1;f=$copyString(e,h.s.substring($flatten64(h.i)));h.i=(o=h.i,p=new $Int64(0,f),new $Int64(o.$high+p.$high,o.$low+p.$low));return[f,g];};K.prototype.Read=function(e){return this.$val.Read(e);};K.ptr.prototype.ReadAt=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n;g=0;h=$ifaceNil;i=this;if((f.$high<0||(f.$high===0&&f.$low<0))){j=0;k=C.New("strings.Reader.ReadAt: negative offset");g=j;h=k;return[g,h];}if((l=new $Int64(0,i.s.length),(f.$high>l.$high||(f.$high===l.$high&&f.$low>=l.$low)))){m=0;n=D.EOF;g=m;h=n;return[g,h];}g=$copyString(e,i.s.substring($flatten64(f)));if(gi.$high||(h.$high===i.$high&&h.$low>=i.$low)))){j=0;k=D.EOF;e=j;f=k;return[e,f];}e=g.s.charCodeAt($flatten64(g.i));g.i=(l=g.i,m=new $Int64(0,1),new $Int64(l.$high+m.$high,l.$low+m.$low));return[e,f];};K.prototype.ReadByte=function(){return this.$val.ReadByte();};K.ptr.prototype.UnreadByte=function(){var $ptr,e,f,g,h;e=this;e.prevRune=-1;if((f=e.i,(f.$high<0||(f.$high===0&&f.$low<=0)))){return C.New("strings.Reader.UnreadByte: at beginning of string");}e.i=(g=e.i,h=new $Int64(0,1),new $Int64(g.$high-h.$high,g.$low-h.$low));return $ifaceNil;};K.prototype.UnreadByte=function(){return this.$val.UnreadByte();};K.ptr.prototype.ReadRune=function(){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;e=0;f=0;g=$ifaceNil;h=this;if((i=h.i,j=new $Int64(0,h.s.length),(i.$high>j.$high||(i.$high===j.$high&&i.$low>=j.$low)))){h.prevRune=-1;k=0;l=0;m=D.EOF;e=k;f=l;g=m;return[e,f,g];}h.prevRune=((n=h.i,n.$low+((n.$high>>31)*4294967296))>>0);o=h.s.charCodeAt($flatten64(h.i));if(o<128){h.i=(p=h.i,q=new $Int64(0,1),new $Int64(p.$high+q.$high,p.$low+q.$low));r=(o>>0);s=1;t=$ifaceNil;e=r;f=s;g=t;return[e,f,g];}u=A.DecodeRuneInString(h.s.substring($flatten64(h.i)));e=u[0];f=u[1];h.i=(v=h.i,w=new $Int64(0,f),new $Int64(v.$high+w.$high,v.$low+w.$low));return[e,f,g];};K.prototype.ReadRune=function(){return this.$val.ReadRune();};K.ptr.prototype.UnreadRune=function(){var $ptr,e;e=this;if(e.prevRune<0){return C.New("strings.Reader.UnreadRune: previous operation was not ReadRune");}e.i=new $Int64(0,e.prevRune);e.prevRune=-1;return $ifaceNil;};K.prototype.UnreadRune=function(){return this.$val.UnreadRune();};K.ptr.prototype.Seek=function(e,f){var $ptr,e,f,g,h,i,j,k;g=this;g.prevRune=-1;h=new $Int64(0,0);i=f;if(i===0){h=e;}else if(i===1){h=(j=g.i,new $Int64(j.$high+e.$high,j.$low+e.$low));}else if(i===2){h=(k=new $Int64(0,g.s.length),new $Int64(k.$high+e.$high,k.$low+e.$low));}else{return[new $Int64(0,0),C.New("strings.Reader.Seek: invalid whence")];}if((h.$high<0||(h.$high===0&&h.$low<0))){return[new $Int64(0,0),C.New("strings.Reader.Seek: negative position")];}g.i=h;return[h,$ifaceNil];};K.prototype.Seek=function(e,f){return this.$val.Seek(e,f);};K.ptr.prototype.WriteTo=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=new $Int64(0,0);g=$ifaceNil;h=this;h.prevRune=-1;if((i=h.i,j=new $Int64(0,h.s.length),(i.$high>j.$high||(i.$high===j.$high&&i.$low>=j.$low)))){k=new $Int64(0,0);l=$ifaceNil;f=k;g=l;return[f,g];}m=h.s.substring($flatten64(h.i));o=D.WriteString(e,m);$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];g=n[1];if(p>m.length){$panic(new $String("strings.Reader.WriteTo: invalid WriteString count"));}h.i=(q=h.i,r=new $Int64(0,p),new $Int64(q.$high+r.$high,q.$low+r.$low));f=new $Int64(0,p);if(!((p===m.length))&&$interfaceIsEqual(g,$ifaceNil)){g=D.ErrShortWrite;}return[f,g];}return;}if($f===undefined){$f={$blk:K.ptr.prototype.WriteTo};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.WriteTo=function(e){return this.$val.WriteTo(e);};L=function(e){var $ptr,e;return new K.ptr(e,new $Int64(0,0),-1);};$pkg.NewReader=L;O=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;if((f=e.$length%2,f===f?f:$throwRuntimeError("integer divide by zero"))===1){$panic(new $String("strings.NewReplacer: odd argument count"));}if((e.$length===2)&&(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]).length>1){return new M.ptr(X((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));}g=true;h=0;while(true){if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]).length===1))){return new M.ptr(R(e));}if(!(((i=h+1>>0,((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i])).length===1))){g=false;}h=h+(2)>>0;}if(g){j=BY.zero();k=j;l=0;while(true){if(!(l<256)){break;}m=l;((m<0||m>=j.length)?$throwRuntimeError("index out of range"):j[m]=(m<<24>>>24));l++;}n=e.$length-2>>0;while(true){if(!(n>=0)){break;}o=((n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n]).charCodeAt(0);q=(p=n+1>>0,((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p])).charCodeAt(0);((o<0||o>=j.length)?$throwRuntimeError("index out of range"):j[o]=q);n=n-(2)>>0;}return new M.ptr(new BZ(j));}r=CB.zero();s=e.$length-2>>0;while(true){if(!(s>=0)){break;}t=((s<0||s>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+s]).charCodeAt(0);v=(u=s+1>>0,((u<0||u>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+u]));((t<0||t>=r.length)?$throwRuntimeError("index out of range"):r[t]=new CA($stringToBytes(v)));s=s-(2)>>0;}return new M.ptr(new CC(r));};$pkg.NewReplacer=O;M.ptr.prototype.Replace=function(e){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=f.r.Replace(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:M.ptr.prototype.Replace};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};M.prototype.Replace=function(e){return this.$val.Replace(e);};M.ptr.prototype.WriteString=function(e,f){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;h=$ifaceNil;i=this;k=i.r.WriteString(e,f);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;g=j[0];h=j[1];return[g,h];}return;}if($f===undefined){$f={$blk:M.ptr.prototype.WriteString};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};M.prototype.WriteString=function(e,f){return this.$val.WriteString(e,f);};P.ptr.prototype.add=function(e,f,g,h){var $ptr,aa,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;i=this;if(e===""){if(i.priority===0){i.value=f;i.priority=g;}return;}if(!(i.prefix==="")){j=0;while(true){if(!(j>0;}if(j===i.prefix.length){i.next.add(e.substring(j),f,g,h);}else if(j===0){k=CD.nil;if(i.prefix.length===1){k=i.next;}else{k=new P.ptr("",0,i.prefix.substring(1),i.next,CE.nil);}l=new P.ptr("",0,"",CD.nil,CE.nil);i.table=$makeSlice(CE,h.tableSize);(m=i.table,n=(o=h.mapping,p=i.prefix.charCodeAt(0),((p<0||p>=o.length)?$throwRuntimeError("index out of range"):o[p])),((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]=k));(q=i.table,r=(s=h.mapping,t=e.charCodeAt(0),((t<0||t>=s.length)?$throwRuntimeError("index out of range"):s[t])),((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]=l));i.prefix="";i.next=CD.nil;l.add(e.substring(1),f,g,h);}else{u=new P.ptr("",0,i.prefix.substring(j),i.next,CE.nil);i.prefix=i.prefix.substring(0,j);i.next=u;u.add(e.substring(j),f,g,h);}}else if(!(i.table===CE.nil)){x=(v=h.mapping,w=e.charCodeAt(0),((w<0||w>=v.length)?$throwRuntimeError("index out of range"):v[w]));if((y=i.table,((x<0||x>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+x]))===CD.nil){(z=i.table,((x<0||x>=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+x]=new P.ptr("",0,"",CD.nil,CE.nil)));}(aa=i.table,((x<0||x>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+x])).add(e.substring(1),f,g,h);}else{i.prefix=e;i.next=new P.ptr("",0,"",CD.nil,CE.nil);i.next.add("",f,g,h);}};P.prototype.add=function(e,f,g,h){return this.$val.add(e,f,g,h);};Q.ptr.prototype.lookup=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q;g="";h=0;i=false;j=this;k=0;l=j.root;m=0;while(true){if(!(!(l===CD.nil))){break;}if(l.priority>k&&!(f&&l===j.root)){k=l.priority;g=l.value;h=m;i=true;}if(e===""){break;}if(!(l.table===CE.nil)){p=(n=j.mapping,o=e.charCodeAt(0),((o<0||o>=n.length)?$throwRuntimeError("index out of range"):n[o]));if((p>>0)===j.tableSize){break;}l=(q=l.table,((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p]));e=e.substring(1);m=m+(1)>>0;}else if(!(l.prefix==="")&&AW(e,l.prefix)){m=m+(l.prefix.length)>>0;e=e.substring(l.prefix.length);l=l.next;}else{break;}}return[g,h,i];};Q.prototype.lookup=function(e,f){return this.$val.lookup(e,f);};R=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;f=new Q.ptr(new P.ptr("",0,"",CD.nil,CE.nil),0,BY.zero());g=0;while(true){if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]);i=0;while(true){if(!(i=j.length)?$throwRuntimeError("index out of range"):j[k]=1));i=i+(1)>>0;}g=g+(2)>>0;}l=f.mapping;m=0;while(true){if(!(m<256)){break;}n=((m<0||m>=l.length)?$throwRuntimeError("index out of range"):l[m]);f.tableSize=f.tableSize+((n>>0))>>0;m++;}o=0;p=f.mapping;q=0;while(true){if(!(q<256)){break;}r=q;s=((q<0||q>=p.length)?$throwRuntimeError("index out of range"):p[q]);if(s===0){(t=f.mapping,((r<0||r>=t.length)?$throwRuntimeError("index out of range"):t[r]=(f.tableSize<<24>>>24)));}else{(u=f.mapping,((r<0||r>=u.length)?$throwRuntimeError("index out of range"):u[r]=o));o=o+(1)<<24>>>24;}q++;}f.root.table=$makeSlice(CE,f.tableSize);v=0;while(true){if(!(v=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+v]),(w=v+1>>0,((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w])),e.$length-v>>0,f);v=v+(2)>>0;}return f;};$ptrType(S).prototype.Write=function(e){var $ptr,e,f;f=this;f.$set($appendSlice(f.$get(),e));return[e.$length,$ifaceNil];};$ptrType(S).prototype.WriteString=function(e){var $ptr,e,f;f=this;f.$set($appendSlice(f.$get(),e));return[e.length,$ifaceNil];};U.ptr.prototype.WriteString=function(e){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=$clone(this,U);g=f.w.Write(new CA($stringToBytes(e)));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:U.ptr.prototype.WriteString};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};U.prototype.WriteString=function(e){return this.$val.WriteString(e);};V=function(e){var $ptr,e,f,g,h,i;f=$assertType(e,T,true);g=f[0];h=f[1];if(!h){g=(i=new U.ptr(e),new i.constructor.elem(i));}return g;};Q.ptr.prototype.Replace=function(e){var $ptr,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=[f];g=this;f[0]=$makeSlice(S,0,e.length);h=g.WriteString((f.$ptr||(f.$ptr=new CF(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f))),e);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;return $bytesToString(f[0]);}return;}if($f===undefined){$f={$blk:Q.ptr.prototype.Replace};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};Q.prototype.Replace=function(e){return this.$val.Replace(e);};Q.ptr.prototype.WriteString=function(e,f){var $ptr,aa,ab,ac,ad,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;h=$ifaceNil;i=this;j=V(e);k=0;l=0;m=k;n=l;o=false;p=0;case 1:if(!(p<=f.length)){$s=2;continue;}if(!((p===f.length))&&(i.root.priority===0)){$s=3;continue;}$s=4;continue;case 3:s=((q=i.mapping,r=f.charCodeAt(p),((r<0||r>=q.length)?$throwRuntimeError("index out of range"):q[r]))>>0);if((s===i.tableSize)||(t=i.root.table,((s<0||s>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+s]))===CD.nil){p=p+(1)>>0;$s=1;continue;}case 4:u=i.lookup(f.substring(p),o);v=u[0];w=u[1];x=u[2];o=x&&(w===0);if(x){$s=5;continue;}$s=6;continue;case 5:z=j.WriteString(f.substring(m,p));$s=7;case 7:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}y=z;n=y[0];h=y[1];g=g+(n)>>0;if(!($interfaceIsEqual(h,$ifaceNil))){return[g,h];}ab=j.WriteString(v);$s=8;case 8:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=ab;n=aa[0];h=aa[1];g=g+(n)>>0;if(!($interfaceIsEqual(h,$ifaceNil))){return[g,h];}p=p+(w)>>0;m=p;$s=1;continue;case 6:p=p+(1)>>0;$s=1;continue;case 2:if(!((m===f.length))){$s=9;continue;}$s=10;continue;case 9:ad=j.WriteString(f.substring(m));$s=11;case 11:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ac=ad;n=ac[0];h=ac[1];g=g+(n)>>0;case 10:return[g,h];}return;}if($f===undefined){$f={$blk:Q.ptr.prototype.WriteString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};Q.prototype.WriteString=function(e,f){return this.$val.WriteString(e,f);};X=function(e,f){var $ptr,e,f;return new W.ptr(AB(e),f);};W.ptr.prototype.Replace=function(e){var $ptr,e,f,g,h,i,j,k,l;f=this;g=CA.nil;h=0;i=false;j=h;k=i;while(true){l=f.finder.next(e.substring(j));if(l===-1){break;}k=true;g=$appendSlice(g,e.substring(j,(j+l>>0)));g=$appendSlice(g,f.value);j=j+((l+f.finder.pattern.length>>0))>>0;}if(!k){return e;}g=$appendSlice(g,e.substring(j));return $bytesToString(g);};W.prototype.Replace=function(e){return this.$val.Replace(e);};W.ptr.prototype.WriteString=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;h=$ifaceNil;i=this;j=V(e);k=0;l=0;m=k;n=l;case 1:o=i.finder.next(f.substring(m));if(o===-1){$s=2;continue;}q=j.WriteString(f.substring(m,(m+o>>0)));$s=3;case 3:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;n=p[0];h=p[1];g=g+(n)>>0;if(!($interfaceIsEqual(h,$ifaceNil))){return[g,h];}s=j.WriteString(i.value);$s=4;case 4:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;n=r[0];h=r[1];g=g+(n)>>0;if(!($interfaceIsEqual(h,$ifaceNil))){return[g,h];}m=m+((o+i.finder.pattern.length>>0))>>0;$s=1;continue;case 2:u=j.WriteString(f.substring(m));$s=5;case 5:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;n=t[0];h=t[1];g=g+(n)>>0;return[g,h];}return;}if($f===undefined){$f={$blk:W.ptr.prototype.WriteString};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};W.prototype.WriteString=function(e,f){return this.$val.WriteString(e,f);};Y.prototype.Replace=function(e){var $ptr,e,f,g,h,i;f=this.$val;g=CA.nil;h=0;while(true){if(!(h=f.length)?$throwRuntimeError("index out of range"):f[i]))===i))){if(g===CA.nil){g=new CA($stringToBytes(e));}((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]=(f.nilCheck,((i<0||i>=f.length)?$throwRuntimeError("index out of range"):f[i])));}h=h+(1)>>0;}if(g===CA.nil){return e;}return $bytesToString(g);};$ptrType(Y).prototype.Replace=function(e){return(new Y(this.$get())).Replace(e);};Y.prototype.WriteString=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;h=$ifaceNil;i=this.$val;j=32768;if(f.length0)){$s=2;continue;}l=$copyString(k,f);f=f.substring(l);m=$subslice(k,0,l);n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);((o<0||o>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+o]=(i.nilCheck,((p<0||p>=i.length)?$throwRuntimeError("index out of range"):i[p])));n++;}r=e.Write($subslice(k,0,l));$s=3;case 3:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;s=q[0];t=q[1];g=g+(s)>>0;if(!($interfaceIsEqual(t,$ifaceNil))){u=g;v=t;g=u;h=v;return[g,h];}$s=1;continue;case 2:w=g;x=$ifaceNil;g=w;h=x;return[g,h];}return;}if($f===undefined){$f={$blk:Y.prototype.WriteString};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(Y).prototype.WriteString=function(e,f){return(new Y(this.$get())).WriteString(e,f);};Z.prototype.Replace=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o;f=this.$val;g=e.length;h=false;i=0;while(true){if(!(i=f.length)?$throwRuntimeError("index out of range"):f[j]))===CA.nil)){h=true;g=g+(((f.nilCheck,((j<0||j>=f.length)?$throwRuntimeError("index out of range"):f[j])).$length-1>>0))>>0;}i=i+(1)>>0;}if(!h){return e;}k=$makeSlice(CA,g);l=k;m=0;while(true){if(!(m=f.length)?$throwRuntimeError("index out of range"):f[n]))===CA.nil)){o=$copySlice(l,(f.nilCheck,((n<0||n>=f.length)?$throwRuntimeError("index out of range"):f[n])));l=$subslice(l,o);}else{(0>=l.$length?$throwRuntimeError("index out of range"):l.$array[l.$offset+0]=n);l=$subslice(l,1);}m=m+(1)>>0;}return $bytesToString(k);};$ptrType(Z).prototype.Replace=function(e){return(new Z(this.$get())).Replace(e);};Z.prototype.WriteString=function(e,f){var $ptr,aa,ab,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=0;h=$ifaceNil;i=this.$val;j=V(e);k=0;l=0;case 1:if(!(l=i.length)?$throwRuntimeError("index out of range"):i[m]))===CA.nil){$s=3;continue;}$s=4;continue;case 3:l=l+(1)>>0;$s=1;continue;case 4:if(!((k===l))){$s=5;continue;}$s=6;continue;case 5:o=j.WriteString(f.substring(k,l));$s=7;case 7:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];g=g+(p)>>0;if(!($interfaceIsEqual(q,$ifaceNil))){r=g;s=q;g=r;h=s;return[g,h];}case 6:k=l+1>>0;u=e.Write((i.nilCheck,((m<0||m>=i.length)?$throwRuntimeError("index out of range"):i[m])));$s=8;case 8:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;v=t[0];w=t[1];g=g+(v)>>0;if(!($interfaceIsEqual(w,$ifaceNil))){x=g;y=w;g=x;h=y;return[g,h];}l=l+(1)>>0;$s=1;continue;case 2:if(!((k===f.length))){$s=9;continue;}$s=10;continue;case 9:z=0;ab=j.WriteString(f.substring(k));$s=11;case 11:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=ab;z=aa[0];h=aa[1];g=g+(z)>>0;case 10:return[g,h];}return;}if($f===undefined){$f={$blk:Z.prototype.WriteString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(Z).prototype.WriteString=function(e,f){return(new Z(this.$get())).WriteString(e,f);};AB=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;f=new AA.ptr(e,CH.zero(),$makeSlice(CI,e.length));g=e.length-1>>0;h=f.badCharSkip;i=0;while(true){if(!(i<256)){break;}j=i;(k=f.badCharSkip,((j<0||j>=k.length)?$throwRuntimeError("index out of range"):k[j]=e.length));i++;}l=0;while(true){if(!(l=m.length)?$throwRuntimeError("index out of range"):m[n]=(g-l>>0)));l=l+(1)>>0;}o=g;p=g;while(true){if(!(p>=0)){break;}if(AW(e,e.substring((p+1>>0)))){o=p+1>>0;}(q=f.goodSuffixSkip,((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p]=((o+g>>0)-p>>0)));p=p-(1)>>0;}r=0;while(true){if(!(r>0)));if(!((e.charCodeAt((r-s>>0))===e.charCodeAt((g-s>>0))))){(t=f.goodSuffixSkip,u=g-s>>0,((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]=((s+g>>0)-r>>0)));}r=r+(1)>>0;}return f;};AC=function(e,f){var $ptr,e,f,g;g=0;while(true){if(!(g>0)-g>>0))===f.charCodeAt(((f.length-1>>0)-g>>0))))){break;}g=g+(1)>>0;}return g;};AA.ptr.prototype.next=function(e){var $ptr,e,f,g,h,i,j,k;f=this;g=f.pattern.length-1>>0;while(true){if(!(g>0;while(true){if(!(h>=0&&(e.charCodeAt(g)===f.pattern.charCodeAt(h)))){break;}g=g-(1)>>0;h=h-(1)>>0;}if(h<0){return g+1>>0;}g=g+(AD((i=f.badCharSkip,j=e.charCodeAt(g),((j<0||j>=i.length)?$throwRuntimeError("index out of range"):i[j])),(k=f.goodSuffixSkip,((h<0||h>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+h]))))>>0;}return-1;};AA.prototype.next=function(e){return this.$val.next(e);};AD=function(e,f){var $ptr,e,f;if(e>f){return e;}return f;};AE=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o;if(f===0){return CJ.nil;}g=A.RuneCountInString(e);if(f<=0||f>g){f=g;}h=$makeSlice(CJ,f);i=0;j=0;k=0;l=0;m=k;n=l;while(true){if(!((m+1>>0)=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+m]="\xEF\xBF\xBD");}else{((m<0||m>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+m]=e.substring(n,(n+i>>0)));}n=n+(i)>>0;m=m+(1)>>0;}if(n=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+m]=e.substring(n));}return h;};AH=function(e,f){var $ptr,e,f;return G(e,f)>=0;};$pkg.Contains=AH;AI=function(e,f){var $ptr,e,f;return AL(e,f)>=0;};$pkg.ContainsAny=AI;AJ=function(e,f){var $ptr,e,f;return AK(e,f)>=0;};$pkg.ContainsRune=AJ;AK=function(e,f){var $ptr,e,f,g,h,i,j,k;if(f<128){return F(e,(f<<24>>>24));}else{g=e;h=0;while(true){if(!(h0){g=e;h=0;while(true){if(!(h>0;}i=f.charCodeAt(0);j=0;k=$makeSlice(CJ,h);l=0;m=0;while(true){if(!((m+f.length>>0)<=e.length&&(l+1>>0)>0))===f)){((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]=e.substring(j,(m+g>>0)));l=l+(1)>>0;j=m+f.length>>0;m=m+((f.length-1>>0))>>0;}m=m+(1)>>0;}((l<0||l>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]=e.substring(j));return $subslice(k,0,(l+1>>0));};AP=function(e,f,g){var $ptr,e,f,g;return AO(e,f,0,g);};$pkg.SplitN=AP;AR=function(e,f){var $ptr,e,f;return AO(e,f,0,-1);};$pkg.Split=AR;AV=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m;if(e.$length===0){return"";}if(e.$length===1){return(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);}g=f.length*((e.$length-1>>0))>>0;h=0;while(true){if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]).length)>>0;h=h+(1)>>0;}i=$makeSlice(CA,g);j=$copyString(i,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]));k=$subslice(e,1);l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);j=j+($copyString($subslice(i,j),f))>>0;j=j+($copyString($subslice(i,j),m))>>0;l++;}return $bytesToString(i);};$pkg.Join=AV;AW=function(e,f){var $ptr,e,f;return e.length>=f.length&&e.substring(0,f.length)===f;};$pkg.HasPrefix=AW;AX=function(e,f){var $ptr,e,f;return e.length>=f.length&&e.substring((e.length-f.length>>0))===f;};$pkg.HasSuffix=AX;AY=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=f.length;h=0;i=CA.nil;j=f;k=0;case 1:if(!(k=0){q=1;if(p>=128){q=A.RuneLen(p);}if((h+q>>0)>g){g=(g*2>>0)+4>>0;r=$makeSlice(CA,g);$copySlice(r,$subslice(i,0,h));i=r;}h=h+(A.EncodeRune($subslice(i,h,g),p))>>0;}k+=l[1];$s=1;continue;case 2:if(i===CA.nil){return f;}return $bytesToString($subslice(i,0,h));}return;}if($f===undefined){$f={$blk:AY};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Map=AY;BB=function(e){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AY(E.ToLower,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BB};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ToLower=BB;BI=function(e,f){var $ptr,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=BN(e,f,false);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(h===-1){return"";}return e.substring(h);}return;}if($f===undefined){$f={$blk:BI};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimLeftFunc=BI;BJ=function(e,f){var $ptr,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=BO(e,f,false);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(h>=0&&e.charCodeAt(h)>=128){i=A.DecodeRuneInString(e.substring(h));j=i[1];h=h+(j)>>0;}else{h=h+(1)>>0;}return e.substring(0,h);}return;}if($f===undefined){$f={$blk:BJ};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimRightFunc=BJ;BK=function(e,f){var $ptr,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=BI(e,f);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=BJ(g,f);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;}return;}if($f===undefined){$f={$blk:BK};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimFunc=BK;BL=function(e,f){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=BN(e,f,true);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:BL};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$pkg.IndexFunc=BL;BN=function(e,f,g){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=0;case 1:if(!(h>0);if(j>=128){k=A.DecodeRuneInString(e.substring(h));j=k[0];i=k[1];}l=f(j);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l===g){$s=3;continue;}$s=4;continue;case 3:return h;case 4:h=h+(i)>>0;$s=1;continue;case 2:return-1;}return;}if($f===undefined){$f={$blk:BN};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BO=function(e,f,g){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=e.length;case 1:if(!(h>0)){$s=2;continue;}i=A.DecodeLastRuneInString(e.substring(0,h));j=i[0];k=i[1];h=h-(k)>>0;l=f(j);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l===g){$s=3;continue;}$s=4;continue;case 3:return h;case 4:$s=1;continue;case 2:return-1;}return;}if($f===undefined){$f={$blk:BO};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BT=function(e){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=BK(e,E.IsSpace);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BT};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.TrimSpace=BT;BU=function(e,f){var $ptr,e,f;if(AW(e,f)){return e.substring(f.length);}return e;};$pkg.TrimPrefix=BU;BV=function(e,f){var $ptr,e,f;if(AX(e,f)){return e.substring(0,(e.length-f.length>>0));}return e;};$pkg.TrimSuffix=BV;BW=function(e,f,g,h){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p;if(f===g||(h===0)){return e;}i=I(e,f);if(i===0){return e;}else if(h<0||i>0))>>0)>>0));k=0;l=0;m=0;while(true){if(!(m0){o=A.DecodeRuneInString(e.substring(l));p=o[1];n=n+(p)>>0;}}else{n=n+(G(e.substring(l),f))>>0;}k=k+($copyString($subslice(j,k),e.substring(l,n)))>>0;k=k+($copyString($subslice(j,k),g))>>0;l=n+f.length>>0;m=m+(1)>>0;}k=k+($copyString($subslice(j,k),e.substring(l)))>>0;return $bytesToString($subslice(j,0,k));};$pkg.Replace=BW;CK.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([CA],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([CA,$Int64],[$Int,$error],false)},{prop:"ReadByte",name:"ReadByte",pkg:"",typ:$funcType([],[$Uint8,$error],false)},{prop:"UnreadByte",name:"UnreadByte",pkg:"",typ:$funcType([],[$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"WriteTo",name:"WriteTo",pkg:"",typ:$funcType([D.Writer],[$Int64,$error],false)}];CL.methods=[{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}];CD.methods=[{prop:"add",name:"add",pkg:"strings",typ:$funcType([$String,$String,$Int,CM],[],false)}];CM.methods=[{prop:"lookup",name:"lookup",pkg:"strings",typ:$funcType([$String,$Bool],[$String,$Int,$Bool],false)},{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}];CF.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([CA],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}];U.methods=[{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}];CN.methods=[{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}];BZ.methods=[{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}];CC.methods=[{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}];CG.methods=[{prop:"next",name:"next",pkg:"strings",typ:$funcType([$String],[$Int],false)}];K.init([{prop:"s",name:"s",pkg:"strings",typ:$String,tag:""},{prop:"i",name:"i",pkg:"strings",typ:$Int64,tag:""},{prop:"prevRune",name:"prevRune",pkg:"strings",typ:$Int,tag:""}]);M.init([{prop:"r",name:"r",pkg:"strings",typ:N,tag:""}]);N.init([{prop:"Replace",name:"Replace",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([D.Writer,$String],[$Int,$error],false)}]);P.init([{prop:"value",name:"value",pkg:"strings",typ:$String,tag:""},{prop:"priority",name:"priority",pkg:"strings",typ:$Int,tag:""},{prop:"prefix",name:"prefix",pkg:"strings",typ:$String,tag:""},{prop:"next",name:"next",pkg:"strings",typ:CD,tag:""},{prop:"table",name:"table",pkg:"strings",typ:CE,tag:""}]);Q.init([{prop:"root",name:"root",pkg:"strings",typ:P,tag:""},{prop:"tableSize",name:"tableSize",pkg:"strings",typ:$Int,tag:""},{prop:"mapping",name:"mapping",pkg:"strings",typ:BY,tag:""}]);S.init($Uint8);T.init([{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)}]);U.init([{prop:"w",name:"w",pkg:"strings",typ:D.Writer,tag:""}]);W.init([{prop:"finder",name:"finder",pkg:"strings",typ:CG,tag:""},{prop:"value",name:"value",pkg:"strings",typ:$String,tag:""}]);Y.init($Uint8,256);Z.init(CA,256);AA.init([{prop:"pattern",name:"pattern",pkg:"strings",typ:$String,tag:""},{prop:"badCharSkip",name:"badCharSkip",pkg:"strings",typ:CH,tag:""},{prop:"goodSuffixSkip",name:"goodSuffixSkip",pkg:"strings",typ:CI,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["time"]=(function(){var $pkg={},$init,D,C,F,A,B,E,AF,BL,BM,BO,BS,CF,CG,CH,CY,CZ,DA,DB,DE,DF,DG,DH,DI,DL,DP,DT,R,U,V,W,X,AB,AE,AR,AT,BN,BP,BX,CI,CW,CJ,CX,CK,CM,CQ,g,h,G,I,J,K,S,T,Y,Z,AA,AC,AD,AG,AH,AI,AJ,AK,AL,AN,AO,AP,AQ,AS,AU,BQ,BR,BT,BU,BW,BZ,CA,CB,CC,CD,CE,CL;D=$packages["errors"];C=$packages["github.com/gopherjs/gopherjs/js"];F=$packages["github.com/gopherjs/gopherjs/nosync"];A=$packages["runtime"];B=$packages["strings"];E=$packages["syscall"];AF=$pkg.ParseError=$newType(0,$kindStruct,"time.ParseError","ParseError","time",function(Layout_,Value_,LayoutElem_,ValueElem_,Message_){this.$val=this;if(arguments.length===0){this.Layout="";this.Value="";this.LayoutElem="";this.ValueElem="";this.Message="";return;}this.Layout=Layout_;this.Value=Value_;this.LayoutElem=LayoutElem_;this.ValueElem=ValueElem_;this.Message=Message_;});BL=$pkg.Time=$newType(0,$kindStruct,"time.Time","Time","time",function(sec_,nsec_,loc_){this.$val=this;if(arguments.length===0){this.sec=new $Int64(0,0);this.nsec=0;this.loc=DI.nil;return;}this.sec=sec_;this.nsec=nsec_;this.loc=loc_;});BM=$pkg.Month=$newType(4,$kindInt,"time.Month","Month","time",null);BO=$pkg.Weekday=$newType(4,$kindInt,"time.Weekday","Weekday","time",null);BS=$pkg.Duration=$newType(8,$kindInt64,"time.Duration","Duration","time",null);CF=$pkg.Location=$newType(0,$kindStruct,"time.Location","Location","time",function(name_,zone_,tx_,cacheStart_,cacheEnd_,cacheZone_){this.$val=this;if(arguments.length===0){this.name="";this.zone=CY.nil;this.tx=CZ.nil;this.cacheStart=new $Int64(0,0);this.cacheEnd=new $Int64(0,0);this.cacheZone=DA.nil;return;}this.name=name_;this.zone=zone_;this.tx=tx_;this.cacheStart=cacheStart_;this.cacheEnd=cacheEnd_;this.cacheZone=cacheZone_;});CG=$pkg.zone=$newType(0,$kindStruct,"time.zone","zone","time",function(name_,offset_,isDST_){this.$val=this;if(arguments.length===0){this.name="";this.offset=0;this.isDST=false;return;}this.name=name_;this.offset=offset_;this.isDST=isDST_;});CH=$pkg.zoneTrans=$newType(0,$kindStruct,"time.zoneTrans","zoneTrans","time",function(when_,index_,isstd_,isutc_){this.$val=this;if(arguments.length===0){this.when=new $Int64(0,0);this.index=0;this.isstd=false;this.isutc=false;return;}this.when=when_;this.index=index_;this.isstd=isstd_;this.isutc=isutc_;});CY=$sliceType(CG);CZ=$sliceType(CH);DA=$ptrType(CG);DB=$sliceType($String);DE=$arrayType($Uint8,20);DF=$sliceType($Uint8);DG=$arrayType($Uint8,9);DH=$arrayType($Uint8,64);DI=$ptrType(CF);DL=$arrayType($Uint8,32);DP=$ptrType(AF);DT=$ptrType(BL);G=function(){var $ptr;CA(new $Int64(0,0),new $Int64(0,0));};I=function(){var $ptr,i,j,k,l;i=new($global.Date)();j=$internalize(i,$String);k=B.IndexByte(j,40);l=B.IndexByte(j,41);if((k===-1)||(l===-1)){CJ.name="UTC";return;}CJ.name=j.substring((k+1>>0),l);CJ.zone=new CY([new CG.ptr(CJ.name,($parseInt(i.getTimezoneOffset())>>0)*-60>>0,false)]);};J=function(){var $ptr;return $mul64($internalize(new($global.Date)().getTime(),$Int64),new $Int64(0,1000000));};K=function(){var $ptr,i,j,k,l,m,n;i=new $Int64(0,0);j=0;k=J();l=$div64(k,new $Int64(0,1000000000),false);m=((n=$div64(k,new $Int64(0,1000000000),true),n.$low+((n.$high>>31)*4294967296))>>0);i=l;j=m;return[i,j];};S=function(i){var $ptr,i,j;if(i.length===0){return false;}j=i.charCodeAt(0);return 97<=j&&j<=122;};T=function(i){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j="";k=0;l="";m=0;while(true){if(!(m>0);o=n;if(o===74){if(i.length>=(m+3>>0)&&i.substring(m,(m+3>>0))==="Jan"){if(i.length>=(m+7>>0)&&i.substring(m,(m+7>>0))==="January"){p=i.substring(0,m);q=257;r=i.substring((m+7>>0));j=p;k=q;l=r;return[j,k,l];}if(!S(i.substring((m+3>>0)))){s=i.substring(0,m);t=258;u=i.substring((m+3>>0));j=s;k=t;l=u;return[j,k,l];}}}else if(o===77){if(i.length>=(m+3>>0)){if(i.substring(m,(m+3>>0))==="Mon"){if(i.length>=(m+6>>0)&&i.substring(m,(m+6>>0))==="Monday"){v=i.substring(0,m);w=261;x=i.substring((m+6>>0));j=v;k=w;l=x;return[j,k,l];}if(!S(i.substring((m+3>>0)))){y=i.substring(0,m);z=262;aa=i.substring((m+3>>0));j=y;k=z;l=aa;return[j,k,l];}}if(i.substring(m,(m+3>>0))==="MST"){ab=i.substring(0,m);ac=21;ad=i.substring((m+3>>0));j=ab;k=ac;l=ad;return[j,k,l];}}}else if(o===48){if(i.length>=(m+2>>0)&&49<=i.charCodeAt((m+1>>0))&&i.charCodeAt((m+1>>0))<=54){ae=i.substring(0,m);af=(ag=i.charCodeAt((m+1>>0))-49<<24>>>24,((ag<0||ag>=R.length)?$throwRuntimeError("index out of range"):R[ag]));ah=i.substring((m+2>>0));j=ae;k=af;l=ah;return[j,k,l];}}else if(o===49){if(i.length>=(m+2>>0)&&(i.charCodeAt((m+1>>0))===53)){ai=i.substring(0,m);aj=522;ak=i.substring((m+2>>0));j=ai;k=aj;l=ak;return[j,k,l];}al=i.substring(0,m);am=259;an=i.substring((m+1>>0));j=al;k=am;l=an;return[j,k,l];}else if(o===50){if(i.length>=(m+4>>0)&&i.substring(m,(m+4>>0))==="2006"){ao=i.substring(0,m);ap=273;aq=i.substring((m+4>>0));j=ao;k=ap;l=aq;return[j,k,l];}ar=i.substring(0,m);as=263;at=i.substring((m+1>>0));j=ar;k=as;l=at;return[j,k,l];}else if(o===95){if(i.length>=(m+2>>0)&&(i.charCodeAt((m+1>>0))===50)){au=i.substring(0,m);av=264;aw=i.substring((m+2>>0));j=au;k=av;l=aw;return[j,k,l];}}else if(o===51){ax=i.substring(0,m);ay=523;az=i.substring((m+1>>0));j=ax;k=ay;l=az;return[j,k,l];}else if(o===52){ba=i.substring(0,m);bb=525;bc=i.substring((m+1>>0));j=ba;k=bb;l=bc;return[j,k,l];}else if(o===53){bd=i.substring(0,m);be=527;bf=i.substring((m+1>>0));j=bd;k=be;l=bf;return[j,k,l];}else if(o===80){if(i.length>=(m+2>>0)&&(i.charCodeAt((m+1>>0))===77)){bg=i.substring(0,m);bh=531;bi=i.substring((m+2>>0));j=bg;k=bh;l=bi;return[j,k,l];}}else if(o===112){if(i.length>=(m+2>>0)&&(i.charCodeAt((m+1>>0))===109)){bj=i.substring(0,m);bk=532;bl=i.substring((m+2>>0));j=bj;k=bk;l=bl;return[j,k,l];}}else if(o===45){if(i.length>=(m+7>>0)&&i.substring(m,(m+7>>0))==="-070000"){bm=i.substring(0,m);bn=27;bo=i.substring((m+7>>0));j=bm;k=bn;l=bo;return[j,k,l];}if(i.length>=(m+9>>0)&&i.substring(m,(m+9>>0))==="-07:00:00"){bp=i.substring(0,m);bq=30;br=i.substring((m+9>>0));j=bp;k=bq;l=br;return[j,k,l];}if(i.length>=(m+5>>0)&&i.substring(m,(m+5>>0))==="-0700"){bs=i.substring(0,m);bt=26;bu=i.substring((m+5>>0));j=bs;k=bt;l=bu;return[j,k,l];}if(i.length>=(m+6>>0)&&i.substring(m,(m+6>>0))==="-07:00"){bv=i.substring(0,m);bw=29;bx=i.substring((m+6>>0));j=bv;k=bw;l=bx;return[j,k,l];}if(i.length>=(m+3>>0)&&i.substring(m,(m+3>>0))==="-07"){by=i.substring(0,m);bz=28;ca=i.substring((m+3>>0));j=by;k=bz;l=ca;return[j,k,l];}}else if(o===90){if(i.length>=(m+7>>0)&&i.substring(m,(m+7>>0))==="Z070000"){cb=i.substring(0,m);cc=23;cd=i.substring((m+7>>0));j=cb;k=cc;l=cd;return[j,k,l];}if(i.length>=(m+9>>0)&&i.substring(m,(m+9>>0))==="Z07:00:00"){ce=i.substring(0,m);cf=25;cg=i.substring((m+9>>0));j=ce;k=cf;l=cg;return[j,k,l];}if(i.length>=(m+5>>0)&&i.substring(m,(m+5>>0))==="Z0700"){ch=i.substring(0,m);ci=22;cj=i.substring((m+5>>0));j=ch;k=ci;l=cj;return[j,k,l];}if(i.length>=(m+6>>0)&&i.substring(m,(m+6>>0))==="Z07:00"){ck=i.substring(0,m);cl=24;cm=i.substring((m+6>>0));j=ck;k=cl;l=cm;return[j,k,l];}}else if(o===46){if((m+1>>0)>0))===48)||(i.charCodeAt((m+1>>0))===57))){cn=i.charCodeAt((m+1>>0));co=m+1>>0;while(true){if(!(co>0;}if(!AH(i,co)){cp=31;if(i.charCodeAt((m+1>>0))===57){cp=32;}cp=cp|((((co-((m+1>>0))>>0))<<16>>0));cq=i.substring(0,m);cr=cp;cs=i.substring(co);j=cq;k=cr;l=cs;return[j,k,l];}}}m=m+(1)>>0;}ct=i;cu=0;cv="";j=ct;k=cu;l=cv;return[j,k,l];};Y=function(i,j){var $ptr,i,j,k,l,m;k=0;while(true){if(!(k>>0;m=(m|(32))>>>0;if(!((l===m))||l<97||l>122){return false;}}k=k+(1)>>0;}return true;};Z=function(i,j){var $ptr,i,j,k,l,m,n;k=i;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);if(j.length>=n.length&&Y(j.substring(0,n.length),n)){return[m,j.substring(n.length),$ifaceNil];}l++;}return[-1,j,AE];};AA=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q;l=(j>>>0);if(j<0){i=$append(i,45);l=(-j>>>0);}m=DE.zero();n=20;while(true){if(!(l>=10)){break;}n=n-(1)>>0;p=(o=l/10,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"));((n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=(((48+l>>>0)-(p*10>>>0)>>>0)<<24>>>24));l=p;}n=n-(1)>>0;((n<0||n>=m.length)?$throwRuntimeError("index out of range"):m[n]=((48+l>>>0)<<24>>>24));q=20-n>>0;while(true){if(!(q>0;}return $appendSlice(i,$subslice(new DF(m),n));};AC=function(i){var $ptr,i,j,k,l,m,n,o,p,q,r,s;j=0;k=$ifaceNil;l=false;if(!(i==="")&&((i.charCodeAt(0)===45)||(i.charCodeAt(0)===43))){l=i.charCodeAt(0)===45;i=i.substring(1);}m=AS(i);n=m[0];o=m[1];k=m[2];j=((n.$low+((n.$high>>31)*4294967296))>>0);if(!($interfaceIsEqual(k,$ifaceNil))||!(o==="")){p=0;q=AB;j=p;k=q;return[j,k];}if(l){j=-j;}r=j;s=$ifaceNil;j=r;k=s;return[j,k];};AD=function(i,j,k,l){var $ptr,i,j,k,l,m,n,o,p,q,r;m=j;n=DG.zero();o=9;while(true){if(!(o>0)){break;}o=o-(1)>>0;((o<0||o>=n.length)?$throwRuntimeError("index out of range"):n[o]=(((p=m%10,p===p?p:$throwRuntimeError("integer divide by zero"))+48>>>0)<<24>>>24));m=(q=m/(10),(q===q&&q!==1/0&&q!==-1/0)?q>>>0:$throwRuntimeError("integer divide by zero"));}if(k>9){k=9;}if(l){while(true){if(!(k>0&&((r=k-1>>0,((r<0||r>=n.length)?$throwRuntimeError("index out of range"):n[r]))===48))){break;}k=k-(1)>>0;}if(k===0){return i;}}i=$append(i,46);return $appendSlice(i,$subslice(new DF(n),0,k));};BL.ptr.prototype.String=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.Format("2006-01-02 15:04:05.999999999 -0700 MST");$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.String};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.String=function(){return this.$val.String();};BL.ptr.prototype.Format=function(i){var $ptr,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=$clone(this,BL);k=DF.nil;l=i.length+10>>0;if(l<64){m=DH.zero();k=$subslice(new DF(m),0,0);}else{k=$makeSlice(DF,0,l);}n=j.AppendFormat(k,i);$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}k=n;return $bytesToString(k);}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Format};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Format=function(i){return this.$val.Format(i);};BL.ptr.prototype.AppendFormat=function(i,j){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:k=$clone(this,BL);m=k.locabs();$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[0];o=l[1];p=l[2];q=-1;r=0;s=0;t=-1;u=0;v=0;while(true){if(!(!(j===""))){break;}w=T(j);x=w[0];y=w[1];z=w[2];if(!(x==="")){i=$appendSlice(i,x);}if(y===0){break;}j=z;if(q<0&&!(((y&256)===0))){aa=BW(p,true);q=aa[0];r=aa[1];s=aa[2];}if(t<0&&!(((y&512)===0))){ab=BR(p);t=ab[0];u=ab[1];v=ab[2];}ac=y&65535;switch(0){default:if(ac===274){ad=q;if(ad<0){ad=-ad;}i=AA(i,(ae=ad%100,ae===ae?ae:$throwRuntimeError("integer divide by zero")),2);}else if(ac===273){i=AA(i,q,4);}else if(ac===258){i=$appendSlice(i,new BM(r).String().substring(0,3));}else if(ac===257){af=new BM(r).String();i=$appendSlice(i,af);}else if(ac===259){i=AA(i,(r>>0),0);}else if(ac===260){i=AA(i,(r>>0),2);}else if(ac===262){i=$appendSlice(i,new BO(BQ(p)).String().substring(0,3));}else if(ac===261){ag=new BO(BQ(p)).String();i=$appendSlice(i,ag);}else if(ac===263){i=AA(i,s,0);}else if(ac===264){if(s<10){i=$append(i,32);}i=AA(i,s,0);}else if(ac===265){i=AA(i,s,2);}else if(ac===522){i=AA(i,t,2);}else if(ac===523){ai=(ah=t%12,ah===ah?ah:$throwRuntimeError("integer divide by zero"));if(ai===0){ai=12;}i=AA(i,ai,0);}else if(ac===524){ak=(aj=t%12,aj===aj?aj:$throwRuntimeError("integer divide by zero"));if(ak===0){ak=12;}i=AA(i,ak,2);}else if(ac===525){i=AA(i,u,0);}else if(ac===526){i=AA(i,u,2);}else if(ac===527){i=AA(i,v,2);}else if(ac===528){i=AA(i,v,2);}else if(ac===531){if(t>=12){i=$appendSlice(i,"PM");}else{i=$appendSlice(i,"AM");}}else if(ac===532){if(t>=12){i=$appendSlice(i,"pm");}else{i=$appendSlice(i,"am");}}else if(ac===22||ac===24||ac===23||ac===25||ac===26||ac===29||ac===27||ac===30){if((o===0)&&((y===22)||(y===24)||(y===23)||(y===25))){i=$append(i,90);break;}am=(al=o/60,(al===al&&al!==1/0&&al!==-1/0)?al>>0:$throwRuntimeError("integer divide by zero"));an=o;if(am<0){i=$append(i,45);am=-am;an=-an;}else{i=$append(i,43);}i=AA(i,(ao=am/60,(ao===ao&&ao!==1/0&&ao!==-1/0)?ao>>0:$throwRuntimeError("integer divide by zero")),2);if((y===24)||(y===29)||(y===25)||(y===30)){i=$append(i,58);}i=AA(i,(ap=am%60,ap===ap?ap:$throwRuntimeError("integer divide by zero")),2);if((y===23)||(y===27)||(y===30)||(y===25)){if((y===30)||(y===25)){i=$append(i,58);}i=AA(i,(aq=an%60,aq===aq?aq:$throwRuntimeError("integer divide by zero")),2);}}else if(ac===21){if(!(n==="")){i=$appendSlice(i,n);break;}as=(ar=o/60,(ar===ar&&ar!==1/0&&ar!==-1/0)?ar>>0:$throwRuntimeError("integer divide by zero"));if(as<0){i=$append(i,45);as=-as;}else{i=$append(i,43);}i=AA(i,(at=as/60,(at===at&&at!==1/0&&at!==-1/0)?at>>0:$throwRuntimeError("integer divide by zero")),2);i=AA(i,(au=as%60,au===au?au:$throwRuntimeError("integer divide by zero")),2);}else if(ac===31||ac===32){i=AD(i,(k.Nanosecond()>>>0),y>>16>>0,(y&65535)===32);}}}return i;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.AppendFormat};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.AppendFormat=function(i,j){return this.$val.AppendFormat(i,j);};AG=function(i){var $ptr,i;return"\""+i+"\"";};AF.ptr.prototype.Error=function(){var $ptr,i;i=this;if(i.Message===""){return"parsing time "+AG(i.Value)+" as "+AG(i.Layout)+": cannot parse "+AG(i.ValueElem)+" as "+AG(i.LayoutElem);}return"parsing time "+AG(i.Value)+i.Message;};AF.prototype.Error=function(){return this.$val.Error();};AH=function(i,j){var $ptr,i,j,k;if(i.length<=j){return false;}k=i.charCodeAt(j);return 48<=k&&k<=57;};AI=function(i,j){var $ptr,i,j;if(!AH(i,0)){return[0,i,AE];}if(!AH(i,1)){if(j){return[0,i,AE];}return[((i.charCodeAt(0)-48<<24>>>24)>>0),i.substring(1),$ifaceNil];}return[(((i.charCodeAt(0)-48<<24>>>24)>>0)*10>>0)+((i.charCodeAt(1)-48<<24>>>24)>>0)>>0,i.substring(2),$ifaceNil];};AJ=function(i){var $ptr,i;while(true){if(!(i.length>0&&(i.charCodeAt(0)===32))){break;}i=i.substring(1);}return i;};AK=function(i,j){var $ptr,i,j;while(true){if(!(j.length>0)){break;}if(j.charCodeAt(0)===32){if(i.length>0&&!((i.charCodeAt(0)===32))){return[i,AE];}j=AJ(j);i=AJ(i);continue;}if((i.length===0)||!((i.charCodeAt(0)===j.charCodeAt(0)))){return[i,AE];}j=j.substring(1);i=i.substring(1);}return[i,$ifaceNil];};AL=function(i,j){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:k=AN(i,j,$pkg.UTC,$pkg.Local);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:AL};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Parse=AL;AN=function(i,j,k,l){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,cn,co,cp,cq,cr,cs,ct,cu,cv,cw,cx,cy,cz,da,db,dc,dd,de,df,dg,dh,di,dj,dk,dl,dm,dn,dp,dq,dr,ds,dt,du,dv,dw,dx,dy,dz,ea,eb,ec,ed,ee,ef,eg,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;bo=$f.bo;bp=$f.bp;bq=$f.bq;br=$f.br;bs=$f.bs;bt=$f.bt;bu=$f.bu;bv=$f.bv;bw=$f.bw;bx=$f.bx;by=$f.by;bz=$f.bz;ca=$f.ca;cb=$f.cb;cc=$f.cc;cd=$f.cd;ce=$f.ce;cf=$f.cf;cg=$f.cg;ch=$f.ch;ci=$f.ci;cj=$f.cj;ck=$f.ck;cl=$f.cl;cm=$f.cm;cn=$f.cn;co=$f.co;cp=$f.cp;cq=$f.cq;cr=$f.cr;cs=$f.cs;ct=$f.ct;cu=$f.cu;cv=$f.cv;cw=$f.cw;cx=$f.cx;cy=$f.cy;cz=$f.cz;da=$f.da;db=$f.db;dc=$f.dc;dd=$f.dd;de=$f.de;df=$f.df;dg=$f.dg;dh=$f.dh;di=$f.di;dj=$f.dj;dk=$f.dk;dl=$f.dl;dm=$f.dm;dn=$f.dn;dp=$f.dp;dq=$f.dq;dr=$f.dr;ds=$f.ds;dt=$f.dt;du=$f.du;dv=$f.dv;dw=$f.dw;dx=$f.dx;dy=$f.dy;dz=$f.dz;ea=$f.ea;eb=$f.eb;ec=$f.ec;ed=$f.ed;ee=$f.ee;ef=$f.ef;eg=$f.eg;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:m=i;n=j;o=m;p=n;q="";r=false;s=false;t=0;u=1;v=1;w=0;x=0;y=0;z=0;aa=DI.nil;ab=-1;ac="";while(true){ad=$ifaceNil;ae=T(i);af=ae[0];ag=ae[1];ah=ae[2];ai=i.substring(af.length,(i.length-ah.length>>0));aj=AK(j,af);j=aj[0];ad=aj[1];if(!($interfaceIsEqual(ad,$ifaceNil))){return[new BL.ptr(new $Int64(0,0),0,DI.nil),new AF.ptr(o,p,af,j,"")];}if(ag===0){if(!((j.length===0))){return[new BL.ptr(new $Int64(0,0),0,DI.nil),new AF.ptr(o,p,"",j,": extra text: "+j)];}break;}i=ah;ak="";al=ag&65535;switch(0){default:if(al===274){if(j.length<2){ad=AE;break;}am=j.substring(0,2);an=j.substring(2);ak=am;j=an;ao=AC(ak);t=ao[0];ad=ao[1];if(t>=69){t=t+(1900)>>0;}else{t=t+(2000)>>0;}}else if(al===273){if(j.length<4||!AH(j,0)){ad=AE;break;}ap=j.substring(0,4);aq=j.substring(4);ak=ap;j=aq;ar=AC(ak);t=ar[0];ad=ar[1];}else if(al===258){as=Z(W,j);u=as[0];j=as[1];ad=as[2];}else if(al===257){at=Z(X,j);u=at[0];j=at[1];ad=at[2];}else if(al===259||al===260){au=AI(j,ag===260);u=au[0];j=au[1];ad=au[2];if(u<=0||120&&(j.charCodeAt(0)===32)){j=j.substring(1);}ax=AI(j,ag===265);v=ax[0];j=ax[1];ad=ax[2];if(v<0||31=2&&(j.charCodeAt(0)===46)&&AH(j,1)){bc=T(i);ag=bc[1];ag=ag&(65535);if((ag===31)||(ag===32)){break;}bd=2;while(true){if(!(bd>0;}be=AQ(j,bd);z=be[0];q=be[1];ad=be[2];j=j.substring(bd);}}else if(al===531){if(j.length<2){ad=AE;break;}bf=j.substring(0,2);bg=j.substring(2);ak=bf;j=bg;bh=ak;if(bh==="PM"){s=true;}else if(bh==="AM"){r=true;}else{ad=AE;}}else if(al===532){if(j.length<2){ad=AE;break;}bi=j.substring(0,2);bj=j.substring(2);ak=bi;j=bj;bk=ak;if(bk==="pm"){s=true;}else if(bk==="am"){r=true;}else{ad=AE;}}else if(al===22||al===24||al===23||al===25||al===26||al===28||al===29||al===27||al===30){if(((ag===22)||(ag===24))&&j.length>=1&&(j.charCodeAt(0)===90)){j=j.substring(1);aa=$pkg.UTC;break;}bl="";bm="";bn="";bo="";bp=bl;bq=bm;br=bn;bs=bo;if((ag===24)||(ag===29)){if(j.length<6){ad=AE;break;}if(!((j.charCodeAt(3)===58))){ad=AE;break;}bt=j.substring(0,1);bu=j.substring(1,3);bv=j.substring(4,6);bw="00";bx=j.substring(6);bp=bt;bq=bu;br=bv;bs=bw;j=bx;}else if(ag===28){if(j.length<3){ad=AE;break;}by=j.substring(0,1);bz=j.substring(1,3);ca="00";cb="00";cc=j.substring(3);bp=by;bq=bz;br=ca;bs=cb;j=cc;}else if((ag===25)||(ag===30)){if(j.length<9){ad=AE;break;}if(!((j.charCodeAt(3)===58))||!((j.charCodeAt(6)===58))){ad=AE;break;}cd=j.substring(0,1);ce=j.substring(1,3);cf=j.substring(4,6);cg=j.substring(7,9);ch=j.substring(9);bp=cd;bq=ce;br=cf;bs=cg;j=ch;}else if((ag===23)||(ag===27)){if(j.length<7){ad=AE;break;}ci=j.substring(0,1);cj=j.substring(1,3);ck=j.substring(3,5);cl=j.substring(5,7);cm=j.substring(7);bp=ci;bq=cj;br=ck;bs=cl;j=cm;}else{if(j.length<5){ad=AE;break;}cn=j.substring(0,1);co=j.substring(1,3);cp=j.substring(3,5);cq="00";cr=j.substring(5);bp=cn;bq=co;br=cp;bs=cq;j=cr;}cs=0;ct=0;cu=0;cv=cs;cw=ct;cx=cu;cy=AC(bq);cv=cy[0];ad=cy[1];if($interfaceIsEqual(ad,$ifaceNil)){cz=AC(br);cw=cz[0];ad=cz[1];}if($interfaceIsEqual(ad,$ifaceNil)){da=AC(bs);cx=da[0];ad=da[1];}ab=((((cv*60>>0)+cw>>0))*60>>0)+cx>>0;db=bp.charCodeAt(0);if(db===43){}else if(db===45){ab=-ab;}else{ad=AE;}}else if(al===21){if(j.length>=3&&j.substring(0,3)==="UTC"){aa=$pkg.UTC;j=j.substring(3);break;}dc=AO(j);dd=dc[0];de=dc[1];if(!de){ad=AE;break;}df=j.substring(0,dd);dg=j.substring(dd);ac=df;j=dg;}else if(al===31){dh=1+((ag>>16>>0))>>0;if(j.length>0)>0))&&j.charCodeAt((dj+1>>0))<=57)){break;}dj=dj+(1)>>0;}dk=AQ(j,1+dj>>0);z=dk[0];q=dk[1];ad=dk[2];j=j.substring((1+dj>>0));}}if(!(q==="")){return[new BL.ptr(new $Int64(0,0),0,DI.nil),new AF.ptr(o,p,ai,j,": "+q+" out of range")];}if(!($interfaceIsEqual(ad,$ifaceNil))){return[new BL.ptr(new $Int64(0,0),0,DI.nil),new AF.ptr(o,p,ai,j,"")];}}if(s&&w<12){w=w+(12)>>0;}else if(r&&(w===12)){w=0;}if(!(aa===DI.nil)){$s=1;continue;}$s=2;continue;case 1:dl=CD(t,(u>>0),v,w,x,y,z,aa);$s=3;case 3:if($c){$c=false;dl=dl.$blk();}if(dl&&dl.$blk!==undefined){break s;}return[dl,$ifaceNil];case 2:if(!((ab===-1))){$s=4;continue;}$s=5;continue;case 4:dm=CD(t,(u>>0),v,w,x,y,z,$pkg.UTC);$s=6;case 6:if($c){$c=false;dm=dm.$blk();}if(dm&&dm.$blk!==undefined){break s;}dn=$clone(dm,BL);dn.sec=(dp=dn.sec,dq=new $Int64(0,ab),new $Int64(dp.$high-dq.$high,dp.$low-dq.$low));dt=l.lookup((ds=dn.sec,new $Int64(ds.$high+-15,ds.$low+2288912640)));$s=7;case 7:if($c){$c=false;dt=dt.$blk();}if(dt&&dt.$blk!==undefined){break s;}dr=dt;du=dr[0];dv=dr[1];if((dv===ab)&&(ac===""||du===ac)){dn.loc=l;return[dn,$ifaceNil];}dn.loc=CL(ac,ab);return[dn,$ifaceNil];case 5:if(!(ac==="")){$s=8;continue;}$s=9;continue;case 8:dw=CD(t,(u>>0),v,w,x,y,z,$pkg.UTC);$s=10;case 10:if($c){$c=false;dw=dw.$blk();}if(dw&&dw.$blk!==undefined){break s;}dx=$clone(dw,BL);ea=l.lookupName(ac,(dz=dx.sec,new $Int64(dz.$high+-15,dz.$low+2288912640)));$s=11;case 11:if($c){$c=false;ea=ea.$blk();}if(ea&&ea.$blk!==undefined){break s;}dy=ea;eb=dy[0];ec=dy[2];if(ec){dx.sec=(ed=dx.sec,ee=new $Int64(0,eb),new $Int64(ed.$high-ee.$high,ed.$low-ee.$low));dx.loc=l;return[dx,$ifaceNil];}if(ac.length>3&&ac.substring(0,3)==="GMT"){ef=AC(ac.substring(3));eb=ef[0];eb=eb*(3600)>>0;}dx.loc=CL(ac,eb);return[dx,$ifaceNil];case 9:eg=CD(t,(u>>0),v,w,x,y,z,k);$s=12;case 12:if($c){$c=false;eg=eg.$blk();}if(eg&&eg.$blk!==undefined){break s;}return[eg,$ifaceNil];}return;}if($f===undefined){$f={$blk:AN};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.bo=bo;$f.bp=bp;$f.bq=bq;$f.br=br;$f.bs=bs;$f.bt=bt;$f.bu=bu;$f.bv=bv;$f.bw=bw;$f.bx=bx;$f.by=by;$f.bz=bz;$f.ca=ca;$f.cb=cb;$f.cc=cc;$f.cd=cd;$f.ce=ce;$f.cf=cf;$f.cg=cg;$f.ch=ch;$f.ci=ci;$f.cj=cj;$f.ck=ck;$f.cl=cl;$f.cm=cm;$f.cn=cn;$f.co=co;$f.cp=cp;$f.cq=cq;$f.cr=cr;$f.cs=cs;$f.ct=ct;$f.cu=cu;$f.cv=cv;$f.cw=cw;$f.cx=cx;$f.cy=cy;$f.cz=cz;$f.da=da;$f.db=db;$f.dc=dc;$f.dd=dd;$f.de=de;$f.df=df;$f.dg=dg;$f.dh=dh;$f.di=di;$f.dj=dj;$f.dk=dk;$f.dl=dl;$f.dm=dm;$f.dn=dn;$f.dp=dp;$f.dq=dq;$f.dr=dr;$f.ds=ds;$f.dt=dt;$f.du=du;$f.dv=dv;$f.dw=dw;$f.dx=dx;$f.dy=dy;$f.dz=dz;$f.ea=ea;$f.eb=eb;$f.ec=ec;$f.ed=ed;$f.ee=ee;$f.ef=ef;$f.eg=eg;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AO=function(i){var $ptr,aa,ab,ac,ad,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=0;k=false;if(i.length<3){l=0;m=false;j=l;k=m;return[j,k];}if(i.length>=4&&(i.substring(0,4)==="ChST"||i.substring(0,4)==="MeST")){n=4;o=true;j=n;k=o;return[j,k];}if(i.substring(0,3)==="GMT"){j=AP(i);p=j;q=true;j=p;k=q;return[j,k];}r=0;r=0;while(true){if(!(r<6)){break;}if(r>=i.length){break;}s=i.charCodeAt(r);if(s<65||90>0;}t=r;if(t===0||t===1||t===2||t===6){u=0;v=false;j=u;k=v;return[j,k];}else if(t===5){if(i.charCodeAt(4)===84){w=5;x=true;j=w;k=x;return[j,k];}}else if(t===4){if(i.charCodeAt(3)===84){y=4;z=true;j=y;k=z;return[j,k];}}else if(t===3){aa=3;ab=true;j=aa;k=ab;return[j,k];}ac=0;ad=false;j=ac;k=ad;return[j,k];};AP=function(i){var $ptr,i,j,k,l,m,n;i=i.substring(3);if(i.length===0){return 3;}j=i.charCodeAt(0);if(!((j===45))&&!((j===43))){return 3;}k=AS(i.substring(1));l=k[0];m=k[1];n=k[2];if(!($interfaceIsEqual(n,$ifaceNil))){return 3;}if(j===45){l=new $Int64(-l.$high,-l.$low);}if((l.$high===0&&l.$low===0)||(l.$high<-1||(l.$high===-1&&l.$low<4294967282))||(0>0)-m.length>>0;};AQ=function(i,j){var $ptr,i,j,k,l,m,n,o,p;k=0;l="";m=$ifaceNil;if(!((i.charCodeAt(0)===46))){m=AE;return[k,l,m];}n=AC(i.substring(1,j));k=n[0];m=n[1];if(!($interfaceIsEqual(m,$ifaceNil))){return[k,l,m];}if(k<0||1000000000<=k){l="fractional second";return[k,l,m];}o=10-j>>0;p=0;while(true){if(!(p>0;p=p+(1)>>0;}return[k,l,m];};AS=function(i){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=new $Int64(0,0);k="";l=$ifaceNil;m=0;while(true){if(!(m57){break;}if((j.$high>214748364||(j.$high===214748364&&j.$low>3435973836))){o=new $Int64(0,0);p="";q=AR;j=o;k=p;l=q;return[j,k,l];}j=(r=(s=$mul64(j,new $Int64(0,10)),t=new $Int64(0,n),new $Int64(s.$high+t.$high,s.$low+t.$low)),new $Int64(r.$high-0,r.$low-48));if((j.$high<0||(j.$high===0&&j.$low<0))){u=new $Int64(0,0);v="";w=AR;j=u;k=v;l=w;return[j,k,l];}m=m+(1)>>0;}x=j;y=i.substring(m);z=$ifaceNil;j=x;k=y;l=z;return[j,k,l];};AU=function(i){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;j=i;k=new $Int64(0,0);l=false;if(!(i==="")){m=i.charCodeAt(0);if((m===45)||(m===43)){l=m===45;i=i.substring(1);}}if(i==="0"){return[new BS(0,0),$ifaceNil];}if(i===""){return[new BS(0,0),D.New("time: invalid duration "+j)];}while(true){if(!(!(i===""))){break;}n=new $Int64(0,0);o=new $Int64(0,0);p=n;q=o;r=1;s=$ifaceNil;if(!((i.charCodeAt(0)===46)||48<=i.charCodeAt(0)&&i.charCodeAt(0)<=57)){return[new BS(0,0),D.New("time: invalid duration "+j)];}t=i.length;u=AS(i);p=u[0];i=u[1];s=u[2];if(!($interfaceIsEqual(s,$ifaceNil))){return[new BS(0,0),D.New("time: invalid duration "+j)];}v=!((t===i.length));w=false;if(!(i==="")&&(i.charCodeAt(0)===46)){i=i.substring(1);x=i.length;y=AS(i);q=y[0];i=y[1];s=y[2];if(!($interfaceIsEqual(s,$ifaceNil))){return[new BS(0,0),D.New("time: invalid duration "+j)];}z=x-i.length>>0;while(true){if(!(z>0)){break;}r=r*(10);z=z-(1)>>0;}w=!((x===i.length));}if(!v&&!w){return[new BS(0,0),D.New("time: invalid duration "+j)];}aa=0;while(true){if(!(aa>0;}if(aa===0){return[new BS(0,0),D.New("time: missing unit in duration "+j)];}ac=i.substring(0,aa);i=i.substring(aa);ad=(ae=AT[$String.keyFor(ac)],ae!==undefined?[ae.v,true]:[new $Int64(0,0),false]);af=ad[0];ag=ad[1];if(!ag){return[new BS(0,0),D.New("time: unknown unit "+ac+" in duration "+j)];}if((ah=$div64(new $Int64(2147483647,4294967295),af,false),(p.$high>ah.$high||(p.$high===ah.$high&&p.$low>ah.$low)))){return[new BS(0,0),D.New("time: invalid duration "+j)];}p=$mul64(p,(af));if((q.$high>0||(q.$high===0&&q.$low>0))){p=(ai=new $Int64(0,$flatten64(q)*($flatten64(af)/r)),new $Int64(p.$high+ai.$high,p.$low+ai.$low));if((p.$high<0||(p.$high===0&&p.$low<0))){return[new BS(0,0),D.New("time: invalid duration "+j)];}}k=(aj=p,new $Int64(k.$high+aj.$high,k.$low+aj.$low));if((k.$high<0||(k.$high===0&&k.$low<0))){return[new BS(0,0),D.New("time: invalid duration "+j)];}}if(l){k=new $Int64(-k.$high,-k.$low);}return[new BS(k.$high,k.$low),$ifaceNil];};$pkg.ParseDuration=AU;BL.ptr.prototype.After=function(i){var $ptr,i,j,k,l,m,n;i=$clone(i,BL);j=$clone(this,BL);return(k=j.sec,l=i.sec,(k.$high>l.$high||(k.$high===l.$high&&k.$low>l.$low)))||(m=j.sec,n=i.sec,(m.$high===n.$high&&m.$low===n.$low))&&j.nsec>i.nsec;};BL.prototype.After=function(i){return this.$val.After(i);};BL.ptr.prototype.Before=function(i){var $ptr,i,j,k,l,m,n;i=$clone(i,BL);j=$clone(this,BL);return(k=j.sec,l=i.sec,(k.$high>0,((j<0||j>=BN.length)?$throwRuntimeError("index out of range"):BN[j]));};$ptrType(BM).prototype.String=function(){return new BM(this.$get()).String();};BO.prototype.String=function(){var $ptr,i;i=this.$val;return((i<0||i>=BP.length)?$throwRuntimeError("index out of range"):BP[i]);};$ptrType(BO).prototype.String=function(){return new BO(this.$get()).String();};BL.ptr.prototype.IsZero=function(){var $ptr,i,j;i=$clone(this,BL);return(j=i.sec,(j.$high===0&&j.$low===0))&&(i.nsec===0);};BL.prototype.IsZero=function(){return this.$val.IsZero();};BL.ptr.prototype.abs=function(){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.loc;if(j===DI.nil||j===CJ){$s=1;continue;}$s=2;continue;case 1:k=j.get();$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;case 2:m=(l=i.sec,new $Int64(l.$high+-15,l.$low+2288912640));if(!(j===CI)){$s=4;continue;}$s=5;continue;case 4:if(!(j.cacheZone===DA.nil)&&(n=j.cacheStart,(n.$high>0)/86400,(k===k&&k!==1/0&&k!==-1/0)?k>>0:$throwRuntimeError("integer divide by zero"))>>0);};BL.ptr.prototype.ISOWeek=function(){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=0;j=0;k=$clone(this,BL);m=k.date(true);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;i=l[0];n=l[1];o=l[2];p=l[3];r=k.Weekday();$s=2;case 2:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=(q=((r+6>>0)>>0)%7,q===q?q:$throwRuntimeError("integer divide by zero"));j=(t=(((p-s>>0)+7>>0))/7,(t===t&&t!==1/0&&t!==-1/0)?t>>0:$throwRuntimeError("integer divide by zero"));v=(u=(((s-p>>0)+371>>0))%7,u===u?u:$throwRuntimeError("integer divide by zero"));if(1<=v&&v<=3){j=j+(1)>>0;}if(j===0){i=i-(1)>>0;j=52;if((v===4)||((v===5)&&CB(i))){j=j+(1)>>0;}}if((n===12)&&o>=29&&s<3){x=(w=(((s+31>>0)-o>>0))%7,w===w?w:$throwRuntimeError("integer divide by zero"));if(0<=x&&x<=2){i=i+(1)>>0;j=1;}}return[i,j];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.ISOWeek};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.ISOWeek=function(){return this.$val.ISOWeek();};BL.ptr.prototype.Clock=function(){var $ptr,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=0;j=0;k=0;l=$clone(this,BL);n=l.abs();$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=BR(n);$s=2;case 2:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}m=o;i=m[0];j=m[1];k=m[2];return[i,j,k];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Clock};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Clock=function(){return this.$val.Clock();};BR=function(i){var $ptr,i,j,k,l,m,n;j=0;k=0;l=0;l=($div64(i,new $Uint64(0,86400),true).$low>>0);j=(m=l/3600,(m===m&&m!==1/0&&m!==-1/0)?m>>0:$throwRuntimeError("integer divide by zero"));l=l-((j*3600>>0))>>0;k=(n=l/60,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"));l=l-((k*60>>0))>>0;return[j,k,l];};BL.ptr.prototype.Hour=function(){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);k=i.abs();$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return(j=($div64(k,new $Uint64(0,86400),true).$low>>0)/3600,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero"));}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Hour};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Hour=function(){return this.$val.Hour();};BL.ptr.prototype.Minute=function(){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);k=i.abs();$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return(j=($div64(k,new $Uint64(0,3600),true).$low>>0)/60,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero"));}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Minute};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Minute=function(){return this.$val.Minute();};BL.ptr.prototype.Second=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.abs();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return($div64(j,new $Uint64(0,60),true).$low>>0);}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Second};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Second=function(){return this.$val.Second();};BL.ptr.prototype.Nanosecond=function(){var $ptr,i;i=$clone(this,BL);return(i.nsec>>0);};BL.prototype.Nanosecond=function(){return this.$val.Nanosecond();};BL.ptr.prototype.YearDay=function(){var $ptr,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);k=i.date(false);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[3];return l+1>>0;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.YearDay};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.YearDay=function(){return this.$val.YearDay();};BS.prototype.String=function(){var $ptr,i,j,k,l,m,n,o,p;i=this;j=DL.zero();k=32;l=new $Uint64(i.$high,i.$low);m=(i.$high<0||(i.$high===0&&i.$low<0));if(m){l=new $Uint64(-l.$high,-l.$low);}if((l.$high<0||(l.$high===0&&l.$low<1000000000))){n=0;k=k-(1)>>0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=115);k=k-(1)>>0;if((l.$high===0&&l.$low===0)){return"0";}else if((l.$high<0||(l.$high===0&&l.$low<1000))){n=0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=110);}else if((l.$high<0||(l.$high===0&&l.$low<1000000))){n=3;k=k-(1)>>0;$copyString($subslice(new DF(j),k),"\xC2\xB5");}else{n=6;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=109);}o=BT($subslice(new DF(j),0,k),l,n);k=o[0];l=o[1];k=BU($subslice(new DF(j),0,k),l);}else{k=k-(1)>>0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=115);p=BT($subslice(new DF(j),0,k),l,9);k=p[0];l=p[1];k=BU($subslice(new DF(j),0,k),$div64(l,new $Uint64(0,60),true));l=$div64(l,(new $Uint64(0,60)),false);if((l.$high>0||(l.$high===0&&l.$low>0))){k=k-(1)>>0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=109);k=BU($subslice(new DF(j),0,k),$div64(l,new $Uint64(0,60),true));l=$div64(l,(new $Uint64(0,60)),false);if((l.$high>0||(l.$high===0&&l.$low>0))){k=k-(1)>>0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=104);k=BU($subslice(new DF(j),0,k),l);}}}if(m){k=k-(1)>>0;((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=45);}return $bytesToString($subslice(new DF(j),k));};$ptrType(BS).prototype.String=function(){return this.$get().String();};BT=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q,r,s;l=0;m=new $Uint64(0,0);n=i.$length;o=false;p=0;while(true){if(!(p>0;((n<0||n>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+n]=((q.$low<<24>>>24)+48<<24>>>24));}j=$div64(j,(new $Uint64(0,10)),false);p=p+(1)>>0;}if(o){n=n-(1)>>0;((n<0||n>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+n]=46);}r=n;s=j;l=r;m=s;return[l,m];};BU=function(i,j){var $ptr,i,j,k;k=i.$length;if((j.$high===0&&j.$low===0)){k=k-(1)>>0;((k<0||k>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+k]=48);}else{while(true){if(!((j.$high>0||(j.$high===0&&j.$low>0)))){break;}k=k-(1)>>0;((k<0||k>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+k]=(($div64(j,new $Uint64(0,10),true).$low<<24>>>24)+48<<24>>>24));j=$div64(j,(new $Uint64(0,10)),false);}}return k;};BS.prototype.Nanoseconds=function(){var $ptr,i;i=this;return new $Int64(i.$high,i.$low);};$ptrType(BS).prototype.Nanoseconds=function(){return this.$get().Nanoseconds();};BS.prototype.Seconds=function(){var $ptr,i,j,k;i=this;j=$div64(i,new BS(0,1000000000),false);k=$div64(i,new BS(0,1000000000),true);return $flatten64(j)+$flatten64(k)*1e-09;};$ptrType(BS).prototype.Seconds=function(){return this.$get().Seconds();};BS.prototype.Minutes=function(){var $ptr,i,j,k;i=this;j=$div64(i,new BS(13,4165425152),false);k=$div64(i,new BS(13,4165425152),true);return $flatten64(j)+$flatten64(k)*1.6666666666666667e-11;};$ptrType(BS).prototype.Minutes=function(){return this.$get().Minutes();};BS.prototype.Hours=function(){var $ptr,i,j,k;i=this;j=$div64(i,new BS(838,817405952),false);k=$div64(i,new BS(838,817405952),true);return $flatten64(j)+$flatten64(k)*2.777777777777778e-13;};$ptrType(BS).prototype.Hours=function(){return this.$get().Hours();};BL.ptr.prototype.Add=function(i){var $ptr,i,j,k,l,m,n,o,p,q,r,s;j=$clone(this,BL);j.sec=(k=j.sec,l=(m=$div64(i,new BS(0,1000000000),false),new $Int64(m.$high,m.$low)),new $Int64(k.$high+l.$high,k.$low+l.$low));o=j.nsec+((n=$div64(i,new BS(0,1000000000),true),n.$low+((n.$high>>31)*4294967296))>>0)>>0;if(o>=1000000000){j.sec=(p=j.sec,q=new $Int64(0,1),new $Int64(p.$high+q.$high,p.$low+q.$low));o=o-(1000000000)>>0;}else if(o<0){j.sec=(r=j.sec,s=new $Int64(0,1),new $Int64(r.$high-s.$high,r.$low-s.$low));o=o+(1000000000)>>0;}j.nsec=o;return j;};BL.prototype.Add=function(i){return this.$val.Add(i);};BL.ptr.prototype.Sub=function(i){var $ptr,i,j,k,l,m,n,o,p;i=$clone(i,BL);j=$clone(this,BL);p=(k=$mul64((l=(m=j.sec,n=i.sec,new $Int64(m.$high-n.$high,m.$low-n.$low)),new BS(l.$high,l.$low)),new BS(0,1000000000)),o=new BS(0,(j.nsec-i.nsec>>0)),new BS(k.$high+o.$high,k.$low+o.$low));if(i.Add(p).Equal(j)){return p;}else if(j.Before(i)){return new BS(-2147483648,0);}else{return new BS(2147483647,4294967295);}};BL.prototype.Sub=function(i){return this.$val.Sub(i);};BL.ptr.prototype.AddDate=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:l=$clone(this,BL);n=l.Date();$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[0];p=m[1];q=m[2];s=l.Clock();$s=2;case 2:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;t=r[0];u=r[1];v=r[2];w=CD(o+i>>0,p+(j>>0)>>0,q+k>>0,t,u,v,(l.nsec>>0),l.loc);$s=3;case 3:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}return w;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.AddDate};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.AddDate=function(i,j,k){return this.$val.AddDate(i,j,k);};BL.ptr.prototype.date=function(i){var $ptr,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=0;k=0;l=0;m=0;n=$clone(this,BL);p=n.abs();$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=BW(p,i);$s=2;case 2:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}o=q;j=o[0];k=o[1];l=o[2];m=o[3];return[j,k,l,m];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.date};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.date=function(i){return this.$val.date(i);};BW=function(i,j){var $ptr,aa,ab,ac,ad,ae,af,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;k=0;l=0;m=0;n=0;o=$div64(i,new $Uint64(0,86400),false);p=$div64(o,new $Uint64(0,146097),false);q=$mul64(new $Uint64(0,400),p);o=(r=$mul64(new $Uint64(0,146097),p),new $Uint64(o.$high-r.$high,o.$low-r.$low));p=$div64(o,new $Uint64(0,36524),false);p=(s=$shiftRightUint64(p,2),new $Uint64(p.$high-s.$high,p.$low-s.$low));q=(t=$mul64(new $Uint64(0,100),p),new $Uint64(q.$high+t.$high,q.$low+t.$low));o=(u=$mul64(new $Uint64(0,36524),p),new $Uint64(o.$high-u.$high,o.$low-u.$low));p=$div64(o,new $Uint64(0,1461),false);q=(v=$mul64(new $Uint64(0,4),p),new $Uint64(q.$high+v.$high,q.$low+v.$low));o=(w=$mul64(new $Uint64(0,1461),p),new $Uint64(o.$high-w.$high,o.$low-w.$low));p=$div64(o,new $Uint64(0,365),false);p=(x=$shiftRightUint64(p,2),new $Uint64(p.$high-x.$high,p.$low-x.$low));q=(y=p,new $Uint64(q.$high+y.$high,q.$low+y.$low));o=(z=$mul64(new $Uint64(0,365),p),new $Uint64(o.$high-z.$high,o.$low-z.$low));k=((aa=(ab=new $Int64(q.$high,q.$low),new $Int64(ab.$high+-69,ab.$low+4075721025)),aa.$low+((aa.$high>>31)*4294967296))>>0);n=(o.$low>>0);if(!j){return[k,l,m,n];}m=n;if(CB(k)){if(m>59){m=m-(1)>>0;}else if(m===59){l=2;m=29;return[k,l,m,n];}}l=((ac=m/31,(ac===ac&&ac!==1/0&&ac!==-1/0)?ac>>0:$throwRuntimeError("integer divide by zero"))>>0);ae=((ad=l+1>>0,((ad<0||ad>=BX.length)?$throwRuntimeError("index out of range"):BX[ad]))>>0);af=0;if(m>=ae){l=l+(1)>>0;af=ae;}else{af=(((l<0||l>=BX.length)?$throwRuntimeError("index out of range"):BX[l])>>0);}l=l+(1)>>0;m=(m-af>>0)+1>>0;return[k,l,m,n];};BZ=function(){var $ptr,i,j,k;i=K();j=i[0];k=i[1];return new BL.ptr(new $Int64(j.$high+14,j.$low+2006054656),k,$pkg.Local);};$pkg.Now=BZ;BL.ptr.prototype.UTC=function(){var $ptr,i;i=$clone(this,BL);i.loc=$pkg.UTC;return i;};BL.prototype.UTC=function(){return this.$val.UTC();};BL.ptr.prototype.Local=function(){var $ptr,i;i=$clone(this,BL);i.loc=$pkg.Local;return i;};BL.prototype.Local=function(){return this.$val.Local();};BL.ptr.prototype.In=function(i){var $ptr,i,j;j=$clone(this,BL);if(i===DI.nil){$panic(new $String("time: missing Location in call to Time.In"));}j.loc=i;return j;};BL.prototype.In=function(i){return this.$val.In(i);};BL.ptr.prototype.Location=function(){var $ptr,i,j;i=$clone(this,BL);j=i.loc;if(j===DI.nil){j=$pkg.UTC;}return j;};BL.prototype.Location=function(){return this.$val.Location();};BL.ptr.prototype.Zone=function(){var $ptr,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i="";j=0;k=$clone(this,BL);n=k.loc.lookup((m=k.sec,new $Int64(m.$high+-15,m.$low+2288912640)));$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}l=n;i=l[0];j=l[1];return[i,j];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Zone};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Zone=function(){return this.$val.Zone();};BL.ptr.prototype.Unix=function(){var $ptr,i,j;i=$clone(this,BL);return(j=i.sec,new $Int64(j.$high+-15,j.$low+2288912640));};BL.prototype.Unix=function(){return this.$val.Unix();};BL.ptr.prototype.UnixNano=function(){var $ptr,i,j,k,l;i=$clone(this,BL);return(j=$mul64(((k=i.sec,new $Int64(k.$high+-15,k.$low+2288912640))),new $Int64(0,1000000000)),l=new $Int64(0,i.nsec),new $Int64(j.$high+l.$high,j.$low+l.$low));};BL.prototype.UnixNano=function(){return this.$val.UnixNano();};BL.ptr.prototype.MarshalBinary=function(){var $ptr,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=0;if(i.Location()===CI){$s=1;continue;}$s=2;continue;case 1:j=-1;$s=3;continue;case 2:l=i.Zone();$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[1];if(!(((n=m%60,n===n?n:$throwRuntimeError("integer divide by zero"))===0))){return[DF.nil,D.New("Time.MarshalBinary: zone offset has fractional minute")];}m=(o=m/(60),(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"));if(m<-32768||(m===-1)||m>32767){return[DF.nil,D.New("Time.MarshalBinary: unexpected zone offset")];}j=(m<<16>>16);case 3:p=new DF([1,($shiftRightInt64(i.sec,56).$low<<24>>>24),($shiftRightInt64(i.sec,48).$low<<24>>>24),($shiftRightInt64(i.sec,40).$low<<24>>>24),($shiftRightInt64(i.sec,32).$low<<24>>>24),($shiftRightInt64(i.sec,24).$low<<24>>>24),($shiftRightInt64(i.sec,16).$low<<24>>>24),($shiftRightInt64(i.sec,8).$low<<24>>>24),(i.sec.$low<<24>>>24),((i.nsec>>24>>0)<<24>>>24),((i.nsec>>16>>0)<<24>>>24),((i.nsec>>8>>0)<<24>>>24),(i.nsec<<24>>>24),((j>>8<<16>>16)<<24>>>24),(j<<24>>>24)]);return[p,$ifaceNil];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.MarshalBinary};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.MarshalBinary=function(){return this.$val.MarshalBinary();};BL.ptr.prototype.UnmarshalBinary=function(i){var $ptr,aa,ab,ac,ad,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=this;k=i;if(k.$length===0){return D.New("Time.UnmarshalBinary: no data");}if(!(((0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])===1))){return D.New("Time.UnmarshalBinary: unsupported version");}if(!((k.$length===15))){return D.New("Time.UnmarshalBinary: invalid length");}k=$subslice(k,1);j.sec=(l=(m=(n=(o=(p=(q=(r=new $Int64(0,(7>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+7])),s=$shiftLeft64(new $Int64(0,(6>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+6])),8),new $Int64(r.$high|s.$high,(r.$low|s.$low)>>>0)),t=$shiftLeft64(new $Int64(0,(5>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+5])),16),new $Int64(q.$high|t.$high,(q.$low|t.$low)>>>0)),u=$shiftLeft64(new $Int64(0,(4>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+4])),24),new $Int64(p.$high|u.$high,(p.$low|u.$low)>>>0)),v=$shiftLeft64(new $Int64(0,(3>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+3])),32),new $Int64(o.$high|v.$high,(o.$low|v.$low)>>>0)),w=$shiftLeft64(new $Int64(0,(2>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+2])),40),new $Int64(n.$high|w.$high,(n.$low|w.$low)>>>0)),x=$shiftLeft64(new $Int64(0,(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])),48),new $Int64(m.$high|x.$high,(m.$low|x.$low)>>>0)),y=$shiftLeft64(new $Int64(0,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])),56),new $Int64(l.$high|y.$high,(l.$low|y.$low)>>>0));k=$subslice(k,8);j.nsec=((((3>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+3])>>0)|(((2>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+2])>>0)<<8>>0))|(((1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])>>0)<<16>>0))|(((0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])>>0)<<24>>0);k=$subslice(k,4);z=((((1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])<<16>>16)|(((0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])<<16>>16)<<8<<16>>16))>>0)*60>>0;if(z===-60){$s=1;continue;}$s=2;continue;case 1:j.loc=CI;$s=3;continue;case 2:ac=$pkg.Local.lookup((ab=j.sec,new $Int64(ab.$high+-15,ab.$low+2288912640)));$s=4;case 4:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}aa=ac;ad=aa[1];if(z===ad){$s=5;continue;}$s=6;continue;case 5:j.loc=$pkg.Local;$s=7;continue;case 6:j.loc=CL("",z);case 7:case 3:return $ifaceNil;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.UnmarshalBinary};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.UnmarshalBinary=function(i){return this.$val.UnmarshalBinary(i);};BL.ptr.prototype.GobEncode=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.MarshalBinary();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.GobEncode};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.GobEncode=function(){return this.$val.GobEncode();};BL.ptr.prototype.GobDecode=function(i){var $ptr,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=this;k=j.UnmarshalBinary(i);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.GobDecode};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.GobDecode=function(i){return this.$val.GobDecode(i);};BL.ptr.prototype.MarshalJSON=function(){var $ptr,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.Year();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(k<0||k>=10000){$s=2;continue;}$s=3;continue;case 2:return[DF.nil,D.New("Time.MarshalJSON: year outside of range [0,9999]")];case 3:l=i.Format("\"2006-01-02T15:04:05.999999999Z07:00\"");$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return[new DF($stringToBytes(l)),$ifaceNil];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.MarshalJSON};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};BL.ptr.prototype.UnmarshalJSON=function(i){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=$ifaceNil;k=this;m=AL("\"2006-01-02T15:04:05Z07:00\"",$bytesToString(i));$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;BL.copy(k,l[0]);j=l[1];return j;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.UnmarshalJSON};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.UnmarshalJSON=function(i){return this.$val.UnmarshalJSON(i);};BL.ptr.prototype.MarshalText=function(){var $ptr,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=$clone(this,BL);j=i.Year();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(k<0||k>=10000){$s=2;continue;}$s=3;continue;case 2:return[DF.nil,D.New("Time.MarshalText: year outside of range [0,9999]")];case 3:l=i.Format("2006-01-02T15:04:05.999999999Z07:00");$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return[new DF($stringToBytes(l)),$ifaceNil];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.MarshalText};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.MarshalText=function(){return this.$val.MarshalText();};BL.ptr.prototype.UnmarshalText=function(i){var $ptr,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=$ifaceNil;k=this;m=AL("2006-01-02T15:04:05Z07:00",$bytesToString(i));$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;BL.copy(k,l[0]);j=l[1];return j;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.UnmarshalText};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.UnmarshalText=function(i){return this.$val.UnmarshalText(i);};CA=function(i,j){var $ptr,i,j,k,l,m,n,o;if((j.$high<0||(j.$high===0&&j.$low<0))||(j.$high>0||(j.$high===0&&j.$low>=1000000000))){k=$div64(j,new $Int64(0,1000000000),false);i=(l=k,new $Int64(i.$high+l.$high,i.$low+l.$low));j=(m=$mul64(k,new $Int64(0,1000000000)),new $Int64(j.$high-m.$high,j.$low-m.$low));if((j.$high<0||(j.$high===0&&j.$low<0))){j=(n=new $Int64(0,1000000000),new $Int64(j.$high+n.$high,j.$low+n.$low));i=(o=new $Int64(0,1),new $Int64(i.$high-o.$high,i.$low-o.$low));}}return new BL.ptr(new $Int64(i.$high+14,i.$low+2006054656),((j.$low+((j.$high>>31)*4294967296))>>0),$pkg.Local);};$pkg.Unix=CA;CB=function(i){var $ptr,i,j,k,l;return((j=i%4,j===j?j:$throwRuntimeError("integer divide by zero"))===0)&&(!(((k=i%100,k===k?k:$throwRuntimeError("integer divide by zero"))===0))||((l=i%400,l===l?l:$throwRuntimeError("integer divide by zero"))===0));};CC=function(i,j,k){var $ptr,i,j,k,l,m,n,o,p,q,r,s;l=0;m=0;if(j<0){o=(n=((-j-1>>0))/k,(n===n&&n!==1/0&&n!==-1/0)?n>>0:$throwRuntimeError("integer divide by zero"))+1>>0;i=i-(o)>>0;j=j+((o*k>>0))>>0;}if(j>=k){q=(p=j/k,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero"));i=i+(q)>>0;j=j-((q*k>>0))>>0;}r=i;s=j;l=r;m=s;return[l,m];};CD=function(i,j,k,l,m,n,o,p){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(p===DI.nil){$panic(new $String("time: missing Location in call to Date"));}q=(j>>0)-1>>0;r=CC(i,q,12);i=r[0];q=r[1];j=(q>>0)+1>>0;s=CC(n,o,1000000000);n=s[0];o=s[1];t=CC(m,n,60);m=t[0];n=t[1];u=CC(l,m,60);l=u[0];m=u[1];v=CC(k,l,24);k=v[0];l=v[1];y=(w=(x=new $Int64(0,i),new $Int64(x.$high- -69,x.$low-4075721025)),new $Uint64(w.$high,w.$low));z=$div64(y,new $Uint64(0,400),false);y=(aa=$mul64(new $Uint64(0,400),z),new $Uint64(y.$high-aa.$high,y.$low-aa.$low));ab=$mul64(new $Uint64(0,146097),z);z=$div64(y,new $Uint64(0,100),false);y=(ac=$mul64(new $Uint64(0,100),z),new $Uint64(y.$high-ac.$high,y.$low-ac.$low));ab=(ad=$mul64(new $Uint64(0,36524),z),new $Uint64(ab.$high+ad.$high,ab.$low+ad.$low));z=$div64(y,new $Uint64(0,4),false);y=(ae=$mul64(new $Uint64(0,4),z),new $Uint64(y.$high-ae.$high,y.$low-ae.$low));ab=(af=$mul64(new $Uint64(0,1461),z),new $Uint64(ab.$high+af.$high,ab.$low+af.$low));z=y;ab=(ag=$mul64(new $Uint64(0,365),z),new $Uint64(ab.$high+ag.$high,ab.$low+ag.$low));ab=(ah=new $Uint64(0,(ai=j-1>>0,((ai<0||ai>=BX.length)?$throwRuntimeError("index out of range"):BX[ai]))),new $Uint64(ab.$high+ah.$high,ab.$low+ah.$low));if(CB(i)&&j>=3){ab=(aj=new $Uint64(0,1),new $Uint64(ab.$high+aj.$high,ab.$low+aj.$low));}ab=(ak=new $Uint64(0,(k-1>>0)),new $Uint64(ab.$high+ak.$high,ab.$low+ak.$low));al=$mul64(ab,new $Uint64(0,86400));al=(am=new $Uint64(0,(((l*3600>>0)+(m*60>>0)>>0)+n>>0)),new $Uint64(al.$high+am.$high,al.$low+am.$low));ao=(an=new $Int64(al.$high,al.$low),new $Int64(an.$high+-2147483647,an.$low+3844486912));aq=p.lookup(ao);$s=1;case 1:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ap=aq;ar=ap[1];as=ap[3];at=ap[4];if(!((ar===0))){$s=2;continue;}$s=3;continue;case 2:av=(au=new $Int64(0,ar),new $Int64(ao.$high-au.$high,ao.$low-au.$low));if((av.$highat.$high||(av.$high===at.$high&&av.$low>=at.$low))){$s=5;continue;}$s=6;continue;case 4:ax=p.lookup(new $Int64(as.$high-0,as.$low-1));$s=7;case 7:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}aw=ax;ar=aw[1];$s=6;continue;case 5:az=p.lookup(at);$s=8;case 8:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay=az;ar=ay[1];case 6:ao=(ba=new $Int64(0,ar),new $Int64(ao.$high-ba.$high,ao.$low-ba.$low));case 3:return new BL.ptr(new $Int64(ao.$high+14,ao.$low+2006054656),(o>>0),p);}return;}if($f===undefined){$f={$blk:CD};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Date=CD;BL.ptr.prototype.Truncate=function(i){var $ptr,i,j,k,l;j=$clone(this,BL);if((i.$high<0||(i.$high===0&&i.$low<=0))){return j;}k=CE(j,i);l=k[1];return j.Add(new BS(-l.$high,-l.$low));};BL.prototype.Truncate=function(i){return this.$val.Truncate(i);};BL.ptr.prototype.Round=function(i){var $ptr,i,j,k,l,m;j=$clone(this,BL);if((i.$high<0||(i.$high===0&&i.$low<=0))){return j;}k=CE(j,i);l=k[1];if((m=new BS(l.$high+l.$high,l.$low+l.$low),(m.$high>0;i.sec=(q=i.sec,r=new $Int64(0,1),new $Int64(q.$high-r.$high,q.$low-r.$low));}}if((j.$high<0||(j.$high===0&&j.$low<1000000000))&&(s=$div64(new BS(0,1000000000),(new BS(j.$high+j.$high,j.$low+j.$low)),true),(s.$high===0&&s.$low===0))){k=((u=n/((j.$low+((j.$high>>31)*4294967296))>>0),(u===u&&u!==1/0&&u!==-1/0)?u>>0:$throwRuntimeError("integer divide by zero"))>>0)&1;l=new BS(0,(v=n%((j.$low+((j.$high>>31)*4294967296))>>0),v===v?v:$throwRuntimeError("integer divide by zero")));}else if((t=$div64(j,new BS(0,1000000000),true),(t.$high===0&&t.$low===0))){x=(w=$div64(j,new BS(0,1000000000),false),new $Int64(w.$high,w.$low));k=((y=$div64(i.sec,x,false),y.$low+((y.$high>>31)*4294967296))>>0)&1;l=(z=$mul64((aa=$div64(i.sec,x,true),new BS(aa.$high,aa.$low)),new BS(0,1000000000)),ab=new BS(0,n),new BS(z.$high+ab.$high,z.$low+ab.$low));}else{ad=(ac=i.sec,new $Uint64(ac.$high,ac.$low));ae=$mul64(($shiftRightUint64(ad,32)),new $Uint64(0,1000000000));af=$shiftRightUint64(ae,32);ag=$shiftLeft64(ae,32);ae=$mul64(new $Uint64(ad.$high&0,(ad.$low&4294967295)>>>0),new $Uint64(0,1000000000));ah=ag;ai=new $Uint64(ag.$high+ae.$high,ag.$low+ae.$low);aj=ah;ag=ai;if((ag.$highap.$high||(af.$high===ap.$high&&af.$low>ap.$low))||(af.$high===ap.$high&&af.$low===ap.$low)&&(ag.$high>ar.$high||(ag.$high===ar.$high&&ag.$low>=ar.$low))){k=1;as=ag;at=new $Uint64(ag.$high-ar.$high,ag.$low-ar.$low);aj=as;ag=at;if((ag.$high>aj.$high||(ag.$high===aj.$high&&ag.$low>aj.$low))){af=(au=new $Uint64(0,1),new $Uint64(af.$high-au.$high,af.$low-au.$low));}af=(av=ap,new $Uint64(af.$high-av.$high,af.$low-av.$low));}if((ap.$high===0&&ap.$low===0)&&(aw=new $Uint64(j.$high,j.$low),(ar.$high===aw.$high&&ar.$low===aw.$low))){break;}ar=$shiftRightUint64(ar,(1));ar=(ax=$shiftLeft64((new $Uint64(ap.$high&0,(ap.$low&1)>>>0)),63),new $Uint64(ar.$high|ax.$high,(ar.$low|ax.$low)>>>0));ap=$shiftRightUint64(ap,(1));}l=new BS(ag.$high,ag.$low);}if(m&&!((l.$high===0&&l.$low===0))){k=(k^(1))>>0;l=new BS(j.$high-l.$high,j.$low-l.$low);}return[k,l];};CF.ptr.prototype.get=function(){var $ptr,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;if(i===DI.nil){return CI;}if(i===CJ){$s=1;continue;}$s=2;continue;case 1:$r=CK.Do(I);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:return i;}return;}if($f===undefined){$f={$blk:CF.ptr.prototype.get};}$f.$ptr=$ptr;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};CF.prototype.get=function(){return this.$val.get();};CF.ptr.prototype.String=function(){var $ptr,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=this;j=i.get();$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j.name;}return;}if($f===undefined){$f={$blk:CF.ptr.prototype.String};}$f.$ptr=$ptr;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};CF.prototype.String=function(){return this.$val.String();};CL=function(i,j){var $ptr,i,j,k,l;k=new CF.ptr(i,new CY([new CG.ptr(i,j,false)]),new CZ([new CH.ptr(new $Int64(-2147483648,0),0,false,false)]),new $Int64(-2147483648,0),new $Int64(2147483647,4294967295),DA.nil);k.cacheZone=(l=k.zone,(0>=l.$length?$throwRuntimeError("index out of range"):l.$array[l.$offset+0]));return k;};$pkg.FixedZone=CL;CF.ptr.prototype.lookup=function(i){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j="";k=0;l=false;m=new $Int64(0,0);n=new $Int64(0,0);o=this;p=o.get();$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;if(o.zone.$length===0){j="UTC";k=0;l=false;m=new $Int64(-2147483648,0);n=new $Int64(2147483647,4294967295);return[j,k,l,m,n];}q=o.cacheZone;if(!(q===DA.nil)&&(r=o.cacheStart,(r.$high=u.$length?$throwRuntimeError("index out of range"):u.$array[u.$offset+0])).when,(i.$high=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w]));j=x.name;k=x.offset;l=x.isDST;m=new $Int64(-2147483648,0);if(o.tx.$length>0){n=(y=o.tx,(0>=y.$length?$throwRuntimeError("index out of range"):y.$array[y.$offset+0])).when;}else{n=new $Int64(2147483647,4294967295);}return[j,k,l,m,n];}z=o.tx;n=new $Int64(2147483647,4294967295);aa=0;ab=z.$length;while(true){if(!((ab-aa>>0)>1)){break;}ad=aa+(ac=((ab-aa>>0))/2,(ac===ac&&ac!==1/0&&ac!==-1/0)?ac>>0:$throwRuntimeError("integer divide by zero"))>>0;ae=((ad<0||ad>=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+ad]).when;if((i.$high=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+aa]).index,((ag<0||ag>=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]));j=ah.name;k=ah.offset;l=ah.isDST;m=((aa<0||aa>=z.$length)?$throwRuntimeError("index out of range"):z.$array[z.$offset+aa]).when;return[j,k,l,m,n];}return;}if($f===undefined){$f={$blk:CF.ptr.prototype.lookup};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CF.prototype.lookup=function(i){return this.$val.lookup(i);};CF.ptr.prototype.lookupFirstZone=function(){var $ptr,i,j,k,l,m,n,o,p,q,r,s;i=this;if(!i.firstZoneUsed()){return 0;}if(i.tx.$length>0&&(j=i.zone,k=(l=i.tx,(0>=l.$length?$throwRuntimeError("index out of range"):l.$array[l.$offset+0])).index,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k])).isDST){n=((m=i.tx,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])).index>>0)-1>>0;while(true){if(!(n>=0)){break;}if(!(o=i.zone,((n<0||n>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+n])).isDST){return n;}n=n-(1)>>0;}}p=i.zone;q=0;while(true){if(!(q=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+r])).isDST){return r;}q++;}return 0;};CF.prototype.lookupFirstZone=function(){return this.$val.lookupFirstZone();};CF.ptr.prototype.firstZoneUsed=function(){var $ptr,i,j,k,l;i=this;j=i.tx;k=0;while(true){if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]),CH);if(l.index===0){return true;}k++;}return false;};CF.prototype.firstZoneUsed=function(){return this.$val.firstZoneUsed();};CF.ptr.prototype.lookupName=function(i,j){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:k=0;l=false;m=false;n=this;o=n.get();$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n.zone;q=0;case 2:if(!(q=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+r]));if(t.name===i){$s=4;continue;}$s=5;continue;case 4:w=n.lookup((v=new $Int64(0,t.offset),new $Int64(j.$high-v.$high,j.$low-v.$low)));$s=6;case 6:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}u=w;x=u[0];y=u[1];z=u[2];if(x===t.name){aa=y;ab=z;ac=true;k=aa;l=ab;m=ac;return[k,l,m];}case 5:q++;$s=2;continue;case 3:ad=n.zone;ae=0;while(true){if(!(ae=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+af]));if(ah.name===i){ai=ah.offset;aj=ah.isDST;ak=true;k=ai;l=aj;m=ak;return[k,l,m];}ae++;}return[k,l,m];}return;}if($f===undefined){$f={$blk:CF.ptr.prototype.lookupName};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CF.prototype.lookupName=function(i,j){return this.$val.lookupName(i,j);};DP.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"AppendFormat",name:"AppendFormat",pkg:"",typ:$funcType([DF,$String],[DF],false)},{prop:"After",name:"After",pkg:"",typ:$funcType([BL],[$Bool],false)},{prop:"Before",name:"Before",pkg:"",typ:$funcType([BL],[$Bool],false)},{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([BL],[$Bool],false)},{prop:"IsZero",name:"IsZero",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"abs",name:"abs",pkg:"time",typ:$funcType([],[$Uint64],false)},{prop:"locabs",name:"locabs",pkg:"time",typ:$funcType([],[$String,$Int,$Uint64],false)},{prop:"Date",name:"Date",pkg:"",typ:$funcType([],[$Int,BM,$Int],false)},{prop:"Year",name:"Year",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Month",name:"Month",pkg:"",typ:$funcType([],[BM],false)},{prop:"Day",name:"Day",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Weekday",name:"Weekday",pkg:"",typ:$funcType([],[BO],false)},{prop:"ISOWeek",name:"ISOWeek",pkg:"",typ:$funcType([],[$Int,$Int],false)},{prop:"Clock",name:"Clock",pkg:"",typ:$funcType([],[$Int,$Int,$Int],false)},{prop:"Hour",name:"Hour",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Minute",name:"Minute",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Second",name:"Second",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Nanosecond",name:"Nanosecond",pkg:"",typ:$funcType([],[$Int],false)},{prop:"YearDay",name:"YearDay",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([BS],[BL],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([BL],[BS],false)},{prop:"AddDate",name:"AddDate",pkg:"",typ:$funcType([$Int,$Int,$Int],[BL],false)},{prop:"date",name:"date",pkg:"time",typ:$funcType([$Bool],[$Int,BM,$Int,$Int],false)},{prop:"UTC",name:"UTC",pkg:"",typ:$funcType([],[BL],false)},{prop:"Local",name:"Local",pkg:"",typ:$funcType([],[BL],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([DI],[BL],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[DI],false)},{prop:"Zone",name:"Zone",pkg:"",typ:$funcType([],[$String,$Int],false)},{prop:"Unix",name:"Unix",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"UnixNano",name:"UnixNano",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"MarshalBinary",name:"MarshalBinary",pkg:"",typ:$funcType([],[DF,$error],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[DF,$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[DF,$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[DF,$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([BS],[BL],false)},{prop:"Round",name:"Round",pkg:"",typ:$funcType([BS],[BL],false)}];DT.methods=[{prop:"UnmarshalBinary",name:"UnmarshalBinary",pkg:"",typ:$funcType([DF],[$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([DF],[$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([DF],[$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([DF],[$error],false)}];BM.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BO.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BS.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Nanoseconds",name:"Nanoseconds",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seconds",name:"Seconds",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Minutes",name:"Minutes",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Hours",name:"Hours",pkg:"",typ:$funcType([],[$Float64],false)}];DI.methods=[{prop:"get",name:"get",pkg:"time",typ:$funcType([],[DI],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"lookup",name:"lookup",pkg:"time",typ:$funcType([$Int64],[$String,$Int,$Bool,$Int64,$Int64],false)},{prop:"lookupFirstZone",name:"lookupFirstZone",pkg:"time",typ:$funcType([],[$Int],false)},{prop:"firstZoneUsed",name:"firstZoneUsed",pkg:"time",typ:$funcType([],[$Bool],false)},{prop:"lookupName",name:"lookupName",pkg:"time",typ:$funcType([$String,$Int64],[$Int,$Bool,$Bool],false)}];AF.init([{prop:"Layout",name:"Layout",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""},{prop:"LayoutElem",name:"LayoutElem",pkg:"",typ:$String,tag:""},{prop:"ValueElem",name:"ValueElem",pkg:"",typ:$String,tag:""},{prop:"Message",name:"Message",pkg:"",typ:$String,tag:""}]);BL.init([{prop:"sec",name:"sec",pkg:"time",typ:$Int64,tag:""},{prop:"nsec",name:"nsec",pkg:"time",typ:$Int32,tag:""},{prop:"loc",name:"loc",pkg:"time",typ:DI,tag:""}]);CF.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"zone",name:"zone",pkg:"time",typ:CY,tag:""},{prop:"tx",name:"tx",pkg:"time",typ:CZ,tag:""},{prop:"cacheStart",name:"cacheStart",pkg:"time",typ:$Int64,tag:""},{prop:"cacheEnd",name:"cacheEnd",pkg:"time",typ:$Int64,tag:""},{prop:"cacheZone",name:"cacheZone",pkg:"time",typ:DA,tag:""}]);CG.init([{prop:"name",name:"name",pkg:"time",typ:$String,tag:""},{prop:"offset",name:"offset",pkg:"time",typ:$Int,tag:""},{prop:"isDST",name:"isDST",pkg:"time",typ:$Bool,tag:""}]);CH.init([{prop:"when",name:"when",pkg:"time",typ:$Int64,tag:""},{prop:"index",name:"index",pkg:"time",typ:$Uint8,tag:""},{prop:"isstd",name:"isstd",pkg:"time",typ:$Bool,tag:""},{prop:"isutc",name:"isutc",pkg:"time",typ:$Bool,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}CJ=new CF.ptr("",CY.nil,CZ.nil,new $Int64(0,0),new $Int64(0,0),DA.nil);CK=new F.Once.ptr(false,false);R=$toNativeArray($kindInt,[260,265,524,526,528,274]);U=new DB(["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);V=new DB(["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);W=new DB(["---","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]);X=new DB(["---","January","February","March","April","May","June","July","August","September","October","November","December"]);AB=D.New("time: invalid number");AE=D.New("bad value for field");AR=D.New("time: bad [0-9]*");BN=$toNativeArray($kindString,["January","February","March","April","May","June","July","August","September","October","November","December"]);BP=$toNativeArray($kindString,["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]);AT=$makeMap($String.keyFor,[{k:"ns",v:new $Int64(0,1)},{k:"us",v:new $Int64(0,1000)},{k:"\xC2\xB5s",v:new $Int64(0,1000)},{k:"\xCE\xBCs",v:new $Int64(0,1000)},{k:"ms",v:new $Int64(0,1000000)},{k:"s",v:new $Int64(0,1000000000)},{k:"m",v:new $Int64(13,4165425152)},{k:"h",v:new $Int64(838,817405952)}]);BX=$toNativeArray($kindInt32,[0,31,59,90,120,151,181,212,243,273,304,334,365]);CI=new CF.ptr("UTC",CY.nil,CZ.nil,new $Int64(0,0),new $Int64(0,0),DA.nil);$pkg.UTC=CI;$pkg.Local=CJ;h=E.Getenv("ZONEINFO");$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;CM=g[0];CQ=D.New("malformed time zone information");G();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["os"]=(function(){var $pkg={},$init,E,A,B,F,H,G,C,D,Z,AA,AS,BI,BJ,BL,CW,CX,CZ,DB,DC,DD,DF,DG,DH,DI,DP,DU,DV,DW,DX,EB,ED,EE,EF,AQ,AX,BX,CT,I,J,K,AB,AD,AG,AV,AZ,BA,BC,BD,BK,BM,BN,BO,BP,BS,BZ,CA,CD,CF,CL,CN,CO,CU;E=$packages["errors"];A=$packages["github.com/gopherjs/gopherjs/js"];B=$packages["io"];F=$packages["runtime"];H=$packages["sync"];G=$packages["sync/atomic"];C=$packages["syscall"];D=$packages["time"];Z=$pkg.PathError=$newType(0,$kindStruct,"os.PathError","PathError","os",function(Op_,Path_,Err_){this.$val=this;if(arguments.length===0){this.Op="";this.Path="";this.Err=$ifaceNil;return;}this.Op=Op_;this.Path=Path_;this.Err=Err_;});AA=$pkg.SyscallError=$newType(0,$kindStruct,"os.SyscallError","SyscallError","os",function(Syscall_,Err_){this.$val=this;if(arguments.length===0){this.Syscall="";this.Err=$ifaceNil;return;}this.Syscall=Syscall_;this.Err=Err_;});AS=$pkg.LinkError=$newType(0,$kindStruct,"os.LinkError","LinkError","os",function(Op_,Old_,New_,Err_){this.$val=this;if(arguments.length===0){this.Op="";this.Old="";this.New="";this.Err=$ifaceNil;return;}this.Op=Op_;this.Old=Old_;this.New=New_;this.Err=Err_;});BI=$pkg.File=$newType(0,$kindStruct,"os.File","File","os",function(file_){this.$val=this;if(arguments.length===0){this.file=DU.nil;return;}this.file=file_;});BJ=$pkg.file=$newType(0,$kindStruct,"os.file","file","os",function(fd_,name_,dirinfo_,nepipe_){this.$val=this;if(arguments.length===0){this.fd=0;this.name="";this.dirinfo=DC.nil;this.nepipe=0;return;}this.fd=fd_;this.name=name_;this.dirinfo=dirinfo_;this.nepipe=nepipe_;});BL=$pkg.dirInfo=$newType(0,$kindStruct,"os.dirInfo","dirInfo","os",function(buf_,nbuf_,bufp_){this.$val=this;if(arguments.length===0){this.buf=DD.nil;this.nbuf=0;this.bufp=0;return;}this.buf=buf_;this.nbuf=nbuf_;this.bufp=bufp_;});CW=$pkg.FileInfo=$newType(8,$kindInterface,"os.FileInfo","FileInfo","os",null);CX=$pkg.FileMode=$newType(4,$kindUint32,"os.FileMode","FileMode","os",null);CZ=$pkg.fileStat=$newType(0,$kindStruct,"os.fileStat","fileStat","os",function(name_,size_,mode_,modTime_,sys_){this.$val=this;if(arguments.length===0){this.name="";this.size=new $Int64(0,0);this.mode=0;this.modTime=new D.Time.ptr(new $Int64(0,0),0,EB.nil);this.sys=$ifaceNil;return;}this.name=name_;this.size=size_;this.mode=mode_;this.modTime=modTime_;this.sys=sys_;});DB=$sliceType($String);DC=$ptrType(BL);DD=$sliceType($Uint8);DF=$sliceType(CW);DG=$ptrType(BI);DH=$ptrType(Z);DI=$ptrType(AS);DP=$arrayType($Uint8,4);DU=$ptrType(BJ);DV=$funcType([DU],[$error],false);DW=$ptrType($Int32);DX=$arrayType($Int64,2);EB=$ptrType(D.Location);ED=$arrayType($Uint8,32);EE=$ptrType(CZ);EF=$ptrType(AA);I=function(){var $ptr;return $pkg.Args;};J=function(){var $ptr,c,d,e;c=$global.process;if(!(c===undefined)){d=c.argv;$pkg.Args=$makeSlice(DB,($parseInt(d.length)-1>>0));e=0;while(true){if(!(e<($parseInt(d.length)-1>>0))){break;}((e<0||e>=$pkg.Args.$length)?$throwRuntimeError("index out of range"):$pkg.Args.$array[$pkg.Args.$offset+e]=$internalize(d[(e+1>>0)],$String));e=e+(1)>>0;}}if($pkg.Args.$length===0){$pkg.Args=new DB(["?"]);}};K=function(){var $ptr;};BI.ptr.prototype.readdirnames=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;d=DB.nil;e=$ifaceNil;f=this;if(f.file.dirinfo===DC.nil){f.file.dirinfo=new BL.ptr(DD.nil,0,0);f.file.dirinfo.buf=$makeSlice(DD,4096);}g=f.file.dirinfo;h=c;if(h<=0){h=100;c=-1;}d=$makeSlice(DB,0,h);while(true){if(!(!((c===0)))){break;}if(g.bufp>=g.nbuf){g.bufp=0;i=$ifaceNil;k=C.ReadDirent(f.file.fd,g.buf);j=AZ(k[0],k[1]);g.nbuf=j[0];i=j[1];if(!($interfaceIsEqual(i,$ifaceNil))){l=d;m=AB("readdirent",i);d=l;e=m;return[d,e];}if(g.nbuf<=0){break;}}n=0;o=0;p=n;q=o;r=C.ParseDirent($subslice(g.buf,g.bufp,g.nbuf),c,d);p=r[0];q=r[1];d=r[2];g.bufp=g.bufp+(p)>>0;c=c-(q)>>0;}if(c>=0&&(d.$length===0)){s=d;t=B.EOF;d=s;e=t;return[d,e];}u=d;v=$ifaceNil;d=u;e=v;return[d,e];};BI.prototype.readdirnames=function(c){return this.$val.readdirnames(c);};BI.ptr.prototype.Readdir=function(c){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=DF.nil;e=$ifaceNil;f=this;if(f===DG.nil){g=DF.nil;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}j=f.readdir(c);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;d=i[0];e=i[1];return[d,e];}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.Readdir};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.Readdir=function(c){return this.$val.Readdir(c);};BI.ptr.prototype.Readdirnames=function(c){var $ptr,c,d,e,f,g,h,i;d=DB.nil;e=$ifaceNil;f=this;if(f===DG.nil){g=DB.nil;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.readdirnames(c);d=i[0];e=i[1];return[d,e];};BI.prototype.Readdirnames=function(c){return this.$val.Readdirnames(c);};Z.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Err.Error();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return c.Op+" "+c.Path+": "+d;}return;}if($f===undefined){$f={$blk:Z.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};Z.prototype.Error=function(){return this.$val.Error();};AA.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Err.Error();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return c.Syscall+": "+d;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.Error=function(){return this.$val.Error();};AB=function(c,d){var $ptr,c,d;if($interfaceIsEqual(d,$ifaceNil)){return $ifaceNil;}return new AA.ptr(c,d);};$pkg.NewSyscallError=AB;AD=function(c){var $ptr,c;return AG(c);};$pkg.IsNotExist=AD;AG=function(c){var $ptr,c,d,e,f,g;d=c;if(d===$ifaceNil){e=d;return false;}else if($assertType(d,DH,true)[1]){f=d.$val;c=f.Err;}else if($assertType(d,DI,true)[1]){g=d.$val;c=g.Err;}return $interfaceIsEqual(c,new C.Errno(2))||$interfaceIsEqual(c,$pkg.ErrNotExist);};BI.ptr.prototype.Name=function(){var $ptr,c;c=this;return c.file.name;};BI.prototype.Name=function(){return this.$val.Name();};AS.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Err.Error();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return c.Op+" "+c.Old+" "+c.New+": "+d;}return;}if($f===undefined){$f={$blk:AS.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AS.prototype.Error=function(){return this.$val.Error();};BI.ptr.prototype.Read=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n;d=0;e=$ifaceNil;f=this;if(f===DG.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.read(c);d=i[0];j=i[1];if(d<0){d=0;}if((d===0)&&c.$length>0&&$interfaceIsEqual(j,$ifaceNil)){k=0;l=B.EOF;d=k;e=l;return[d,e];}if(!($interfaceIsEqual(j,$ifaceNil))){e=new Z.ptr("read",f.file.name,j);}m=d;n=e;d=m;e=n;return[d,e];};BI.prototype.Read=function(c){return this.$val.Read(c);};BI.ptr.prototype.ReadAt=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o;e=0;f=$ifaceNil;g=this;if(g===DG.nil){h=0;i=$pkg.ErrInvalid;e=h;f=i;return[e,f];}while(true){if(!(c.$length>0)){break;}j=g.pread(c,d);k=j[0];l=j[1];if((k===0)&&$interfaceIsEqual(l,$ifaceNil)){m=e;n=B.EOF;e=m;f=n;return[e,f];}if(!($interfaceIsEqual(l,$ifaceNil))){f=new Z.ptr("read",g.file.name,l);break;}e=e+(k)>>0;c=$subslice(c,k);d=(o=new $Int64(0,k),new $Int64(d.$high+o.$high,d.$low+o.$low));}return[e,f];};BI.prototype.ReadAt=function(c,d){return this.$val.ReadAt(c,d);};BI.ptr.prototype.Write=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l;d=0;e=$ifaceNil;f=this;if(f===DG.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.write(c);d=i[0];j=i[1];if(d<0){d=0;}if(!((d===c.$length))){e=B.ErrShortWrite;}BM(f,j);if(!($interfaceIsEqual(j,$ifaceNil))){e=new Z.ptr("write",f.file.name,j);}k=d;l=e;d=k;e=l;return[d,e];};BI.prototype.Write=function(c){return this.$val.Write(c);};BI.ptr.prototype.WriteAt=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m;e=0;f=$ifaceNil;g=this;if(g===DG.nil){h=0;i=$pkg.ErrInvalid;e=h;f=i;return[e,f];}while(true){if(!(c.$length>0)){break;}j=g.pwrite(c,d);k=j[0];l=j[1];if(!($interfaceIsEqual(l,$ifaceNil))){f=new Z.ptr("write",g.file.name,l);break;}e=e+(k)>>0;c=$subslice(c,k);d=(m=new $Int64(0,k),new $Int64(d.$high+m.$high,d.$low+m.$low));}return[e,f];};BI.prototype.WriteAt=function(c,d){return this.$val.WriteAt(c,d);};BI.ptr.prototype.Seek=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p;e=new $Int64(0,0);f=$ifaceNil;g=this;if(g===DG.nil){h=new $Int64(0,0);i=$pkg.ErrInvalid;e=h;f=i;return[e,f];}j=g.seek(c,d);k=j[0];l=j[1];if($interfaceIsEqual(l,$ifaceNil)&&!(g.file.dirinfo===DC.nil)&&!((k.$high===0&&k.$low===0))){l=new C.Errno(21);}if(!($interfaceIsEqual(l,$ifaceNil))){m=new $Int64(0,0);n=new Z.ptr("seek",g.file.name,l);e=m;f=n;return[e,f];}o=k;p=$ifaceNil;e=o;f=p;return[e,f];};BI.prototype.Seek=function(c,d){return this.$val.Seek(c,d);};BI.ptr.prototype.WriteString=function(c){var $ptr,c,d,e,f,g,h,i;d=0;e=$ifaceNil;f=this;if(f===DG.nil){g=0;h=$pkg.ErrInvalid;d=g;e=h;return[d,e];}i=f.Write(new DD($stringToBytes(c)));d=i[0];e=i[1];return[d,e];};BI.prototype.WriteString=function(c){return this.$val.WriteString(c);};BI.ptr.prototype.Chdir=function(){var $ptr,c,d;c=this;if(c===DG.nil){return $pkg.ErrInvalid;}d=C.Fchdir(c.file.fd);if(!($interfaceIsEqual(d,$ifaceNil))){return new Z.ptr("chdir",c.file.name,d);}return $ifaceNil;};BI.prototype.Chdir=function(){return this.$val.Chdir();};AV=function(c){var $ptr,c;return BN(c,0,0);};$pkg.Open=AV;AZ=function(c,d){var $ptr,c,d;if(c<0){c=0;}return[c,d];};BA=function(){$panic("Native function not implemented: os.sigpipe");};BC=function(c){var $ptr,c,d;d=0;d=(d|((new CX(c).Perm()>>>0)))>>>0;if(!((((c&8388608)>>>0)===0))){d=(d|(2048))>>>0;}if(!((((c&4194304)>>>0)===0))){d=(d|(1024))>>>0;}if(!((((c&1048576)>>>0)===0))){d=(d|(512))>>>0;}return d;};BD=function(c,d){var $ptr,c,d,e;e=C.Chmod(c,BC(d));if(!($interfaceIsEqual(e,$ifaceNil))){return new Z.ptr("chmod",c,e);}return $ifaceNil;};$pkg.Chmod=BD;BI.ptr.prototype.Chmod=function(c){var $ptr,c,d,e;d=this;if(d===DG.nil){return $pkg.ErrInvalid;}e=C.Fchmod(d.file.fd,BC(c));if(!($interfaceIsEqual(e,$ifaceNil))){return new Z.ptr("chmod",d.file.name,e);}return $ifaceNil;};BI.prototype.Chmod=function(c){return this.$val.Chmod(c);};BI.ptr.prototype.Chown=function(c,d){var $ptr,c,d,e,f;e=this;if(e===DG.nil){return $pkg.ErrInvalid;}f=C.Fchown(e.file.fd,c,d);if(!($interfaceIsEqual(f,$ifaceNil))){return new Z.ptr("chown",e.file.name,f);}return $ifaceNil;};BI.prototype.Chown=function(c,d){return this.$val.Chown(c,d);};BI.ptr.prototype.Truncate=function(c){var $ptr,c,d,e;d=this;if(d===DG.nil){return $pkg.ErrInvalid;}e=C.Ftruncate(d.file.fd,c);if(!($interfaceIsEqual(e,$ifaceNil))){return new Z.ptr("truncate",d.file.name,e);}return $ifaceNil;};BI.prototype.Truncate=function(c){return this.$val.Truncate(c);};BI.ptr.prototype.Sync=function(){var $ptr,c,d;c=this;if(c===DG.nil){return $pkg.ErrInvalid;}d=C.Fsync(c.file.fd);if(!($interfaceIsEqual(d,$ifaceNil))){return AB("fsync",d);}return $ifaceNil;};BI.prototype.Sync=function(){return this.$val.Sync();};BI.ptr.prototype.Fd=function(){var $ptr,c;c=this;if(c===DG.nil){return 4294967295;}return(c.file.fd>>>0);};BI.prototype.Fd=function(){return this.$val.Fd();};BK=function(c,d){var $ptr,c,d,e,f;e=(c>>0);if(e<0){return DG.nil;}f=new BI.ptr(new BJ.ptr(e,d,DC.nil,0));F.SetFinalizer(f.file,new DV($methodExpr(DU,"close")));return f;};$pkg.NewFile=BK;BM=function(c,d){var $ptr,c,d;if($interfaceIsEqual(d,new C.Errno(32))){if(G.AddInt32((c.$ptr_nepipe||(c.$ptr_nepipe=new DW(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},c))),1)>=10){BA();}}else{G.StoreInt32((c.$ptr_nepipe||(c.$ptr_nepipe=new DW(function(){return this.$target.file.nepipe;},function($v){this.$target.file.nepipe=$v;},c))),0);}};BN=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k;f=false;if(true&&!(((d&512)===0))&&!((((e&1048576)>>>0)===0))){g=BO(c);h=g[1];if(AD(h)){f=true;}}i=C.Open(c,d|16777216,BC(e));j=i[0];k=i[1];if(!($interfaceIsEqual(k,$ifaceNil))){return[DG.nil,new Z.ptr("open",c,k)];}if(f){BD(c,e);}if(!CT){C.CloseOnExec(j);}return[BK((j>>>0),c),$ifaceNil];};$pkg.OpenFile=BN;BI.ptr.prototype.Close=function(){var $ptr,c;c=this;if(c===DG.nil){return $pkg.ErrInvalid;}return c.file.close();};BI.prototype.Close=function(){return this.$val.Close();};BJ.ptr.prototype.close=function(){var $ptr,c,d,e;c=this;if(c===DU.nil||c.fd<0){return new C.Errno(22);}d=$ifaceNil;e=C.Close(c.fd);if(!($interfaceIsEqual(e,$ifaceNil))){d=new Z.ptr("close",c.name,e);}c.fd=-1;F.SetFinalizer(c,$ifaceNil);return d;};BJ.prototype.close=function(){return this.$val.close();};BI.ptr.prototype.Stat=function(){var $ptr,c,d,e;c=this;if(c===DG.nil){return[$ifaceNil,$pkg.ErrInvalid];}d=new C.Stat_t.ptr(0,0,0,new $Uint64(0,0),0,0,0,DP.zero(),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new $Int64(0,0),new $Int64(0,0),0,0,0,0,DX.zero());e=C.Fstat(c.file.fd,d);if(!($interfaceIsEqual(e,$ifaceNil))){return[$ifaceNil,new Z.ptr("stat",c.file.name,e)];}return[CN(d,c.file.name),$ifaceNil];};BI.prototype.Stat=function(){return this.$val.Stat();};BO=function(c){var $ptr,c,d,e;d=new C.Stat_t.ptr(0,0,0,new $Uint64(0,0),0,0,0,DP.zero(),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new $Int64(0,0),new $Int64(0,0),0,0,0,0,DX.zero());e=C.Stat(c,d);if(!($interfaceIsEqual(e,$ifaceNil))){return[$ifaceNil,new Z.ptr("stat",c,e)];}return[CN(d,c),$ifaceNil];};$pkg.Stat=BO;BP=function(c){var $ptr,c,d,e;d=new C.Stat_t.ptr(0,0,0,new $Uint64(0,0),0,0,0,DP.zero(),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new C.Timespec.ptr(new $Int64(0,0),new $Int64(0,0)),new $Int64(0,0),new $Int64(0,0),0,0,0,0,DX.zero());e=C.Lstat(c,d);if(!($interfaceIsEqual(e,$ifaceNil))){return[$ifaceNil,new Z.ptr("lstat",c,e)];}return[CN(d,c),$ifaceNil];};$pkg.Lstat=BP;BI.ptr.prototype.readdir=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=DF.nil;e=$ifaceNil;f=this;g=f.file.name;if(g===""){g=".";}h=f.Readdirnames(c);i=h[0];e=h[1];d=$makeSlice(DF,0,i.$length);j=i;k=0;case 1:if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]);n=AX(g+"/"+l);$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;o=m[0];p=m[1];if(AD(p)){k++;$s=1;continue;}if(!($interfaceIsEqual(p,$ifaceNil))){q=d;r=p;d=q;e=r;return[d,e];}d=$append(d,o);k++;$s=1;continue;case 2:s=d;t=e;d=s;e=t;return[d,e];}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.readdir};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.readdir=function(c){return this.$val.readdir(c);};BI.ptr.prototype.read=function(c){var $ptr,c,d,e,f,g,h;d=0;e=$ifaceNil;f=this;if(true&&c.$length>1073741824){c=$subslice(c,0,1073741824);}h=C.Read(f.file.fd,c);g=AZ(h[0],h[1]);d=g[0];e=g[1];return[d,e];};BI.prototype.read=function(c){return this.$val.read(c);};BI.ptr.prototype.pread=function(c,d){var $ptr,c,d,e,f,g,h,i;e=0;f=$ifaceNil;g=this;if(true&&c.$length>1073741824){c=$subslice(c,0,1073741824);}i=C.Pread(g.file.fd,c,d);h=AZ(i[0],i[1]);e=h[0];f=h[1];return[e,f];};BI.prototype.pread=function(c,d){return this.$val.pread(c,d);};BI.ptr.prototype.write=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m;d=0;e=$ifaceNil;f=this;while(true){g=c;if(true&&g.$length>1073741824){g=$subslice(g,0,1073741824);}i=C.Write(f.file.fd,g);h=AZ(i[0],i[1]);j=h[0];k=h[1];d=d+(j)>>0;if(01073741824){c=$subslice(c,0,1073741824);}i=C.Pwrite(g.file.fd,c,d);h=AZ(i[0],i[1]);e=h[0];f=h[1];return[e,f];};BI.prototype.pwrite=function(c,d){return this.$val.pwrite(c,d);};BI.ptr.prototype.seek=function(c,d){var $ptr,c,d,e,f,g,h;e=new $Int64(0,0);f=$ifaceNil;g=this;h=C.Seek(g.file.fd,c,d);e=h[0];f=h[1];return[e,f];};BI.prototype.seek=function(c,d){return this.$val.seek(c,d);};BS=function(c){var $ptr,c,d;d=c.length-1>>0;while(true){if(!(d>0&&(c.charCodeAt(d)===47))){break;}c=c.substring(0,d);d=d-(1)>>0;}d=d-(1)>>0;while(true){if(!(d>=0)){break;}if(c.charCodeAt(d)===47){c=c.substring((d+1>>0));break;}d=d-(1)>>0;}return c;};BZ=function(){var $ptr;BX=CA;};CA=function(c){var $ptr,c;return!($interfaceIsEqual(c,new C.Errno(45)));};CD=function(c){var $ptr,c;return 47===c;};$pkg.IsPathSeparator=CD;CF=function(){var $ptr;$pkg.Args=I();};CL=function(c){var $ptr,c;if(c===0){K();}C.Exit(c);};$pkg.Exit=CL;CN=function(c,d){var $ptr,c,d,e,f;e=new CZ.ptr(BS(d),c.Size,0,$clone(CO(c.Mtimespec),D.Time),c);e.mode=(((c.Mode&511)>>>0)>>>0);f=(c.Mode&61440)>>>0;if(f===24576||f===57344){e.mode=(e.mode|(67108864))>>>0;}else if(f===8192){e.mode=(e.mode|(69206016))>>>0;}else if(f===16384){e.mode=(e.mode|(2147483648))>>>0;}else if(f===4096){e.mode=(e.mode|(33554432))>>>0;}else if(f===40960){e.mode=(e.mode|(134217728))>>>0;}else if(f===32768){}else if(f===49152){e.mode=(e.mode|(16777216))>>>0;}if(!((((c.Mode&1024)>>>0)===0))){e.mode=(e.mode|(4194304))>>>0;}if(!((((c.Mode&2048)>>>0)===0))){e.mode=(e.mode|(8388608))>>>0;}if(!((((c.Mode&512)>>>0)===0))){e.mode=(e.mode|(1048576))>>>0;}return e;};CO=function(c){var $ptr,c;c=$clone(c,C.Timespec);return D.Unix(c.Sec,c.Nsec);};CU=function(){var $ptr,c,d,e,f,g,h,i;c=C.Sysctl("kern.osrelease");d=c[0];e=c[1];if(!($interfaceIsEqual(e,$ifaceNil))){return;}f=0;g=d;h=0;while(true){if(!(h2||(f===2)&&d.charCodeAt(0)>=49&&d.charCodeAt(1)>=49){CT=true;}};CX.prototype.String=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q;c=this.$val;d=ED.zero();e=0;f="dalTLDpSugct";g=0;while(true){if(!(g>0)>>>0),k<32?(1<>>0)))>>>0)===0))){((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=(j<<24>>>24));e=e+(1)>>0;}g+=h[1];}if(e===0){((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=45);e=e+(1)>>0;}l="rwxrwxrwx";m=0;while(true){if(!(m>0)>>>0),q<32?(1<>>0)))>>>0)===0))){((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=(p<<24>>>24));}else{((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=45);}e=e+(1)>>0;m+=n[1];}return $bytesToString($subslice(new DD(d),0,e));};$ptrType(CX).prototype.String=function(){return new CX(this.$get()).String();};CX.prototype.IsDir=function(){var $ptr,c;c=this.$val;return!((((c&2147483648)>>>0)===0));};$ptrType(CX).prototype.IsDir=function(){return new CX(this.$get()).IsDir();};CX.prototype.IsRegular=function(){var $ptr,c;c=this.$val;return((c&2399141888)>>>0)===0;};$ptrType(CX).prototype.IsRegular=function(){return new CX(this.$get()).IsRegular();};CX.prototype.Perm=function(){var $ptr,c;c=this.$val;return(c&511)>>>0;};$ptrType(CX).prototype.Perm=function(){return new CX(this.$get()).Perm();};CZ.ptr.prototype.Name=function(){var $ptr,c;c=this;return c.name;};CZ.prototype.Name=function(){return this.$val.Name();};CZ.ptr.prototype.IsDir=function(){var $ptr,c;c=this;return new CX(c.Mode()).IsDir();};CZ.prototype.IsDir=function(){return this.$val.IsDir();};CZ.ptr.prototype.Size=function(){var $ptr,c;c=this;return c.size;};CZ.prototype.Size=function(){return this.$val.Size();};CZ.ptr.prototype.Mode=function(){var $ptr,c;c=this;return c.mode;};CZ.prototype.Mode=function(){return this.$val.Mode();};CZ.ptr.prototype.ModTime=function(){var $ptr,c;c=this;return c.modTime;};CZ.prototype.ModTime=function(){return this.$val.ModTime();};CZ.ptr.prototype.Sys=function(){var $ptr,c;c=this;return c.sys;};CZ.prototype.Sys=function(){return this.$val.Sys();};DH.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];EF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DI.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];DG.methods=[{prop:"readdirnames",name:"readdirnames",pkg:"os",typ:$funcType([$Int],[DB,$error],false)},{prop:"Readdir",name:"Readdir",pkg:"",typ:$funcType([$Int],[DF,$error],false)},{prop:"Readdirnames",name:"Readdirnames",pkg:"",typ:$funcType([$Int],[DB,$error],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Read",name:"Read",pkg:"",typ:$funcType([DD],[$Int,$error],false)},{prop:"ReadAt",name:"ReadAt",pkg:"",typ:$funcType([DD,$Int64],[$Int,$error],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([DD],[$Int,$error],false)},{prop:"WriteAt",name:"WriteAt",pkg:"",typ:$funcType([DD,$Int64],[$Int,$error],false)},{prop:"Seek",name:"Seek",pkg:"",typ:$funcType([$Int64,$Int],[$Int64,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"Chdir",name:"Chdir",pkg:"",typ:$funcType([],[$error],false)},{prop:"Chmod",name:"Chmod",pkg:"",typ:$funcType([CX],[$error],false)},{prop:"Chown",name:"Chown",pkg:"",typ:$funcType([$Int,$Int],[$error],false)},{prop:"Truncate",name:"Truncate",pkg:"",typ:$funcType([$Int64],[$error],false)},{prop:"Sync",name:"Sync",pkg:"",typ:$funcType([],[$error],false)},{prop:"Fd",name:"Fd",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[$error],false)},{prop:"Stat",name:"Stat",pkg:"",typ:$funcType([],[CW,$error],false)},{prop:"readdir",name:"readdir",pkg:"os",typ:$funcType([$Int],[DF,$error],false)},{prop:"read",name:"read",pkg:"os",typ:$funcType([DD],[$Int,$error],false)},{prop:"pread",name:"pread",pkg:"os",typ:$funcType([DD,$Int64],[$Int,$error],false)},{prop:"write",name:"write",pkg:"os",typ:$funcType([DD],[$Int,$error],false)},{prop:"pwrite",name:"pwrite",pkg:"os",typ:$funcType([DD,$Int64],[$Int,$error],false)},{prop:"seek",name:"seek",pkg:"os",typ:$funcType([$Int64,$Int],[$Int64,$error],false)}];DU.methods=[{prop:"close",name:"close",pkg:"os",typ:$funcType([],[$error],false)}];CX.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsRegular",name:"IsRegular",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([],[CX],false)}];EE.methods=[{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CX],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}];Z.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Path",name:"Path",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AA.init([{prop:"Syscall",name:"Syscall",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AS.init([{prop:"Op",name:"Op",pkg:"",typ:$String,tag:""},{prop:"Old",name:"Old",pkg:"",typ:$String,tag:""},{prop:"New",name:"New",pkg:"",typ:$String,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);BI.init([{prop:"file",name:"",pkg:"os",typ:DU,tag:""}]);BJ.init([{prop:"fd",name:"fd",pkg:"os",typ:$Int,tag:""},{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"dirinfo",name:"dirinfo",pkg:"os",typ:DC,tag:""},{prop:"nepipe",name:"nepipe",pkg:"os",typ:$Int32,tag:""}]);BL.init([{prop:"buf",name:"buf",pkg:"os",typ:DD,tag:""},{prop:"nbuf",name:"nbuf",pkg:"os",typ:$Int,tag:""},{prop:"bufp",name:"bufp",pkg:"os",typ:$Int,tag:""}]);CW.init([{prop:"IsDir",name:"IsDir",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ModTime",name:"ModTime",pkg:"",typ:$funcType([],[D.Time],false)},{prop:"Mode",name:"Mode",pkg:"",typ:$funcType([],[CX],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Sys",name:"Sys",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);CZ.init([{prop:"name",name:"name",pkg:"os",typ:$String,tag:""},{prop:"size",name:"size",pkg:"os",typ:$Int64,tag:""},{prop:"mode",name:"mode",pkg:"os",typ:CX,tag:""},{prop:"modTime",name:"modTime",pkg:"os",typ:D.Time,tag:""},{prop:"sys",name:"sys",pkg:"os",typ:$emptyInterface,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.Args=DB.nil;CT=false;$pkg.ErrInvalid=E.New("invalid argument");$pkg.ErrPermission=E.New("permission denied");$pkg.ErrExist=E.New("file already exists");$pkg.ErrNotExist=E.New("file does not exist");AQ=E.New("os: process already finished");$pkg.Stdin=BK((C.Stdin>>>0),"/dev/stdin");$pkg.Stdout=BK((C.Stdout>>>0),"/dev/stdout");$pkg.Stderr=BK((C.Stderr>>>0),"/dev/stderr");BX=(function(c){var $ptr,c;return true;});AX=BP;J();BZ();CF();CU();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["reflect"]=(function(){var $pkg={},$init,A,C,F,D,B,E,AK,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CF,CG,CH,DI,DJ,DM,DO,FW,GC,GI,GJ,GK,GL,GM,GN,GO,GP,GQ,GR,GS,GT,GU,GV,GW,GX,GY,GZ,HA,HD,HE,HF,HG,HH,HI,HJ,HO,HQ,HT,HU,HV,HW,HX,G,L,AW,AX,BB,CE,DV,H,I,J,K,M,N,O,P,Q,R,S,X,Y,Z,AA,AC,AF,AG,AH,AI,AJ,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,AY,AZ,BA,BC,BD,CJ,CL,CM,CN,DA,DF,DW,EB,EN,EP,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FJ,FK,FL,FM;A=$packages["errors"];C=$packages["github.com/gopherjs/gopherjs/js"];F=$packages["math"];D=$packages["runtime"];B=$packages["strconv"];E=$packages["sync"];AK=$pkg.mapIter=$newType(0,$kindStruct,"reflect.mapIter","mapIter","reflect",function(t_,m_,keys_,i_){this.$val=this;if(arguments.length===0){this.t=$ifaceNil;this.m=null;this.keys=null;this.i=0;return;}this.t=t_;this.m=m_;this.keys=keys_;this.i=i_;});BM=$pkg.Type=$newType(8,$kindInterface,"reflect.Type","Type","reflect",null);BN=$pkg.Kind=$newType(4,$kindUint,"reflect.Kind","Kind","reflect",null);BO=$pkg.rtype=$newType(0,$kindStruct,"reflect.rtype","rtype","reflect",function(size_,ptrdata_,hash_,_$3_,align_,fieldAlign_,kind_,alg_,gcdata_,string_,uncommonType_,ptrToThis_,zero_){this.$val=this;if(arguments.length===0){this.size=0;this.ptrdata=0;this.hash=0;this._$3=0;this.align=0;this.fieldAlign=0;this.kind=0;this.alg=GM.nil;this.gcdata=GN.nil;this.string=GO.nil;this.uncommonType=GP.nil;this.ptrToThis=FW.nil;this.zero=0;return;}this.size=size_;this.ptrdata=ptrdata_;this.hash=hash_;this._$3=_$3_;this.align=align_;this.fieldAlign=fieldAlign_;this.kind=kind_;this.alg=alg_;this.gcdata=gcdata_;this.string=string_;this.uncommonType=uncommonType_;this.ptrToThis=ptrToThis_;this.zero=zero_;});BP=$pkg.typeAlg=$newType(0,$kindStruct,"reflect.typeAlg","typeAlg","reflect",function(hash_,equal_){this.$val=this;if(arguments.length===0){this.hash=$throwNilPointerError;this.equal=$throwNilPointerError;return;}this.hash=hash_;this.equal=equal_;});BQ=$pkg.method=$newType(0,$kindStruct,"reflect.method","method","reflect",function(name_,pkgPath_,mtyp_,typ_,ifn_,tfn_){this.$val=this;if(arguments.length===0){this.name=GO.nil;this.pkgPath=GO.nil;this.mtyp=FW.nil;this.typ=FW.nil;this.ifn=0;this.tfn=0;return;}this.name=name_;this.pkgPath=pkgPath_;this.mtyp=mtyp_;this.typ=typ_;this.ifn=ifn_;this.tfn=tfn_;});BR=$pkg.uncommonType=$newType(0,$kindStruct,"reflect.uncommonType","uncommonType","reflect",function(name_,pkgPath_,methods_){this.$val=this;if(arguments.length===0){this.name=GO.nil;this.pkgPath=GO.nil;this.methods=GQ.nil;return;}this.name=name_;this.pkgPath=pkgPath_;this.methods=methods_;});BS=$pkg.ChanDir=$newType(4,$kindInt,"reflect.ChanDir","ChanDir","reflect",null);BT=$pkg.arrayType=$newType(0,$kindStruct,"reflect.arrayType","arrayType","reflect",function(rtype_,elem_,slice_,len_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.elem=FW.nil;this.slice=FW.nil;this.len=0;return;}this.rtype=rtype_;this.elem=elem_;this.slice=slice_;this.len=len_;});BU=$pkg.chanType=$newType(0,$kindStruct,"reflect.chanType","chanType","reflect",function(rtype_,elem_,dir_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.elem=FW.nil;this.dir=0;return;}this.rtype=rtype_;this.elem=elem_;this.dir=dir_;});BV=$pkg.funcType=$newType(0,$kindStruct,"reflect.funcType","funcType","reflect",function(rtype_,dotdotdot_,in$2_,out_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.dotdotdot=false;this.in$2=GC.nil;this.out=GC.nil;return;}this.rtype=rtype_;this.dotdotdot=dotdotdot_;this.in$2=in$2_;this.out=out_;});BW=$pkg.imethod=$newType(0,$kindStruct,"reflect.imethod","imethod","reflect",function(name_,pkgPath_,typ_){this.$val=this;if(arguments.length===0){this.name=GO.nil;this.pkgPath=GO.nil;this.typ=FW.nil;return;}this.name=name_;this.pkgPath=pkgPath_;this.typ=typ_;});BX=$pkg.interfaceType=$newType(0,$kindStruct,"reflect.interfaceType","interfaceType","reflect",function(rtype_,methods_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.methods=GR.nil;return;}this.rtype=rtype_;this.methods=methods_;});BY=$pkg.mapType=$newType(0,$kindStruct,"reflect.mapType","mapType","reflect",function(rtype_,key_,elem_,bucket_,hmap_,keysize_,indirectkey_,valuesize_,indirectvalue_,bucketsize_,reflexivekey_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.key=FW.nil;this.elem=FW.nil;this.bucket=FW.nil;this.hmap=FW.nil;this.keysize=0;this.indirectkey=0;this.valuesize=0;this.indirectvalue=0;this.bucketsize=0;this.reflexivekey=false;return;}this.rtype=rtype_;this.key=key_;this.elem=elem_;this.bucket=bucket_;this.hmap=hmap_;this.keysize=keysize_;this.indirectkey=indirectkey_;this.valuesize=valuesize_;this.indirectvalue=indirectvalue_;this.bucketsize=bucketsize_;this.reflexivekey=reflexivekey_;});BZ=$pkg.ptrType=$newType(0,$kindStruct,"reflect.ptrType","ptrType","reflect",function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.elem=FW.nil;return;}this.rtype=rtype_;this.elem=elem_;});CA=$pkg.sliceType=$newType(0,$kindStruct,"reflect.sliceType","sliceType","reflect",function(rtype_,elem_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.elem=FW.nil;return;}this.rtype=rtype_;this.elem=elem_;});CB=$pkg.structField=$newType(0,$kindStruct,"reflect.structField","structField","reflect",function(name_,pkgPath_,typ_,tag_,offset_){this.$val=this;if(arguments.length===0){this.name=GO.nil;this.pkgPath=GO.nil;this.typ=FW.nil;this.tag=GO.nil;this.offset=0;return;}this.name=name_;this.pkgPath=pkgPath_;this.typ=typ_;this.tag=tag_;this.offset=offset_;});CC=$pkg.structType=$newType(0,$kindStruct,"reflect.structType","structType","reflect",function(rtype_,fields_){this.$val=this;if(arguments.length===0){this.rtype=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);this.fields=GS.nil;return;}this.rtype=rtype_;this.fields=fields_;});CD=$pkg.Method=$newType(0,$kindStruct,"reflect.Method","Method","reflect",function(Name_,PkgPath_,Type_,Func_,Index_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Func=new DI.ptr(FW.nil,0,0);this.Index=0;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Func=Func_;this.Index=Index_;});CF=$pkg.StructField=$newType(0,$kindStruct,"reflect.StructField","StructField","reflect",function(Name_,PkgPath_,Type_,Tag_,Offset_,Index_,Anonymous_){this.$val=this;if(arguments.length===0){this.Name="";this.PkgPath="";this.Type=$ifaceNil;this.Tag="";this.Offset=0;this.Index=HG.nil;this.Anonymous=false;return;}this.Name=Name_;this.PkgPath=PkgPath_;this.Type=Type_;this.Tag=Tag_;this.Offset=Offset_;this.Index=Index_;this.Anonymous=Anonymous_;});CG=$pkg.StructTag=$newType(8,$kindString,"reflect.StructTag","StructTag","reflect",null);CH=$pkg.fieldScan=$newType(0,$kindStruct,"reflect.fieldScan","fieldScan","reflect",function(typ_,index_){this.$val=this;if(arguments.length===0){this.typ=HI.nil;this.index=HG.nil;return;}this.typ=typ_;this.index=index_;});DI=$pkg.Value=$newType(0,$kindStruct,"reflect.Value","Value","reflect",function(typ_,ptr_,flag_){this.$val=this;if(arguments.length===0){this.typ=FW.nil;this.ptr=0;this.flag=0;return;}this.typ=typ_;this.ptr=ptr_;this.flag=flag_;});DJ=$pkg.flag=$newType(4,$kindUintptr,"reflect.flag","flag","reflect",null);DM=$pkg.ValueError=$newType(0,$kindStruct,"reflect.ValueError","ValueError","reflect",function(Method_,Kind_){this.$val=this;if(arguments.length===0){this.Method="";this.Kind=0;return;}this.Method=Method_;this.Kind=Kind_;});DO=$pkg.nonEmptyInterface=$newType(0,$kindStruct,"reflect.nonEmptyInterface","nonEmptyInterface","reflect",function(itab_,word_){this.$val=this;if(arguments.length===0){this.itab=GZ.nil;this.word=0;return;}this.itab=itab_;this.word=word_;});FW=$ptrType(BO);GC=$sliceType(FW);GI=$sliceType($emptyInterface);GJ=$ptrType(C.Object);GK=$funcType([GI],[GJ],true);GL=$sliceType($String);GM=$ptrType(BP);GN=$ptrType($Uint8);GO=$ptrType($String);GP=$ptrType(BR);GQ=$sliceType(BQ);GR=$sliceType(BW);GS=$sliceType(CB);GT=$structType([{prop:"str",name:"str",pkg:"reflect",typ:$String,tag:""}]);GU=$sliceType(GJ);GV=$sliceType(DI);GW=$ptrType(DO);GX=$arrayType($UnsafePointer,100000);GY=$structType([{prop:"ityp",name:"ityp",pkg:"reflect",typ:FW,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FW,tag:""},{prop:"link",name:"link",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"bad",name:"bad",pkg:"reflect",typ:$Int32,tag:""},{prop:"unused",name:"unused",pkg:"reflect",typ:$Int32,tag:""},{prop:"fun",name:"fun",pkg:"reflect",typ:GX,tag:""}]);GZ=$ptrType(GY);HA=$sliceType(GI);HD=$ptrType(BQ);HE=$ptrType(BX);HF=$ptrType(BW);HG=$sliceType($Int);HH=$sliceType(CH);HI=$ptrType(CC);HJ=$sliceType($Uint8);HO=$ptrType($UnsafePointer);HQ=$sliceType($Int32);HT=$funcType([$String],[$Bool],false);HU=$funcType([$UnsafePointer,$Uintptr],[$Uintptr],false);HV=$funcType([$UnsafePointer,$UnsafePointer],[$Bool],false);HW=$arrayType($Uintptr,2);HX=$ptrType(DM);H=function(){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=(function(ag){var $ptr,ag;});$r=ag((ah=new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),new ah.constructor.elem(ah)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((ai=new BR.ptr(GO.nil,GO.nil,GQ.nil),new ai.constructor.elem(ai)));$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((aj=new BQ.ptr(GO.nil,GO.nil,FW.nil,FW.nil,0,0),new aj.constructor.elem(aj)));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((ak=new BT.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),FW.nil,FW.nil,0),new ak.constructor.elem(ak)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((al=new BU.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),FW.nil,0),new al.constructor.elem(al)));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((am=new BV.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),false,GC.nil,GC.nil),new am.constructor.elem(am)));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((an=new BX.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),GR.nil),new an.constructor.elem(an)));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((ao=new BY.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),FW.nil,FW.nil,FW.nil,FW.nil,0,0,0,0,0,false),new ao.constructor.elem(ao)));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((ap=new BZ.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),FW.nil),new ap.constructor.elem(ap)));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((aq=new CA.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),FW.nil),new aq.constructor.elem(aq)));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((ar=new CC.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),GS.nil),new ar.constructor.elem(ar)));$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((as=new BW.ptr(GO.nil,GO.nil,FW.nil),new as.constructor.elem(as)));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=ag((at=new CB.ptr(GO.nil,GO.nil,FW.nil,GO.nil,0),new at.constructor.elem(at)));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}G=true;DV=$assertType(R(new $Uint8(0)),FW);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.$s=$s;$f.$r=$r;return $f;};I=function(ag){var $ptr,ag;return ag.jsType;};J=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm;if(ag.reflectType===undefined){ah=new BO.ptr((($parseInt(ag.size)>>0)>>>0),0,0,0,0,0,(($parseInt(ag.kind)>>0)<<24>>>24),GM.nil,GN.nil,M(ag.string),GP.nil,FW.nil,0);ah.jsType=ag;ag.reflectType=ah;ai=$methodSet(ag);if(!($internalize(ag.typeName,$String)==="")||!(($parseInt(ai.length)===0))){aj=$makeSlice(GQ,$parseInt(ai.length));ak=aj;al=0;while(true){if(!(al=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+am]),new BQ.ptr(M(an.name),M(an.pkg),J(ao),J($funcType(new($global.Array)(ag).concat(ao.params),ao.results,ao.variadic)),0,0));al++;}ah.uncommonType=new BR.ptr(M(ag.typeName),M(ag.pkg),aj);ah.uncommonType.jsType=ag;}ap=ah.Kind();if(ap===17){K(ah,new BT.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),J(ag.elem),FW.nil,(($parseInt(ag.len)>>0)>>>0)));}else if(ap===18){aq=3;if(!!(ag.sendOnly)){aq=2;}if(!!(ag.recvOnly)){aq=1;}K(ah,new BU.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),J(ag.elem),(aq>>>0)));}else if(ap===19){ar=ag.params;as=$makeSlice(GC,$parseInt(ar.length));at=as;au=0;while(true){if(!(au=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+av]=J(ar[av]));au++;}aw=ag.results;ax=$makeSlice(GC,$parseInt(aw.length));ay=ax;az=0;while(true){if(!(az=ax.$length)?$throwRuntimeError("index out of range"):ax.$array[ax.$offset+ba]=J(aw[ba]));az++;}K(ah,new BV.ptr($clone(ah,BO),!!(ag.variadic),as,ax));}else if(ap===20){bb=ag.methods;bc=$makeSlice(GR,$parseInt(bb.length));bd=bc;be=0;while(true){if(!(be=bc.$length)?$throwRuntimeError("index out of range"):bc.$array[bc.$offset+bf]),new BW.ptr(M(bg.name),M(bg.pkg),J(bg.typ)));be++;}K(ah,new BX.ptr($clone(ah,BO),bc));}else if(ap===21){K(ah,new BY.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),J(ag.key),J(ag.elem),FW.nil,FW.nil,0,0,0,0,0,false));}else if(ap===22){K(ah,new BZ.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),J(ag.elem)));}else if(ap===23){K(ah,new CA.ptr(new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0),J(ag.elem)));}else if(ap===25){bh=ag.fields;bi=$makeSlice(GS,$parseInt(bh.length));bj=bi;bk=0;while(true){if(!(bk=bi.$length)?$throwRuntimeError("index out of range"):bi.$array[bi.$offset+bl]),new CB.ptr(M(bm.name),M(bm.pkg),J(bm.typ),M(bm.tag),(bl>>>0)));bk++;}K(ah,new CC.ptr($clone(ah,BO),bi));}}return ag.reflectType;};K=function(ag,ah){var $ptr,ag,ah;ag.kindType=ah;ah.rtype=ag;};M=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao;ah=new GT.ptr("");ah.str=ag;ai=ah.str;if(ai===""){return GO.nil;}aj=(ak=L[$String.keyFor(ai)],ak!==undefined?[ak.v,true]:[GO.nil,false]);al=aj[0];am=aj[1];if(!am){al=(an||(an=new GO(function(){return ai;},function($v){ai=$v;})));ao=ai;(L||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(ao)]={k:ao,v:al};}return al;};N=function(ag){var $ptr,ag;return!!(I(ag).wrapped);};O=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al;aj=I(ai).fields;ak=0;while(true){if(!(ak<$parseInt(aj.length))){break;}al=$internalize(aj[ak].prop,$String);ag[$externalize(al,$String)]=ah[$externalize(al,$String)];ak=ak+(1)>>0;}};P=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=ag.common();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj;an=ag.Kind();$s=6;case 6:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}if(an===17){am=true;$s=5;continue s;}ao=ag.Kind();$s=7;case 7:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}am=ao===25;case 5:if(am){al=true;$s=4;continue s;}ap=ag.Kind();$s=8;case 8:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}al=ap===22;case 4:if(al){$s=2;continue;}$s=3;continue;case 2:aq=ag.Kind();$s=9;case 9:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}return new DI.ptr(ak,ah,(ai|(aq>>>0))>>>0);case 3:ar=ag.Kind();$s=10;case 10:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}return new DI.ptr(ak,$newDataPointer(ah,I(ak.ptrTo())),(((ai|(ar>>>0))>>>0)|64)>>>0);}return;}if($f===undefined){$f={$blk:P};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.$s=$s;$f.$r=$r;return $f;};Q=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=[ag];aj=ag[0].Kind();$s=3;case 3:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}if(!((aj===23))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.MakeSlice of non-slice type"));case 2:if(ah<0){$panic(new $String("reflect.MakeSlice: negative len"));}if(ai<0){$panic(new $String("reflect.MakeSlice: negative cap"));}if(ah>ai){$panic(new $String("reflect.MakeSlice: len > cap"));}ak=P(ag[0],$makeSlice(I(ag[0]),ah,ai,(function(ag){return function $b(){var $ptr,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ak=ag[0].Elem();$s=1;case 1:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=I(ak);$s=2;case 2:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}return al.zero();}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};})(ag)),0);$s=4;case 4:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}return ak;}return;}if($f===undefined){$f={$blk:Q};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};$pkg.MakeSlice=Q;R=function(ag){var $ptr,ag;if(!G){return new BO.ptr(0,0,0,0,0,0,0,GM.nil,GN.nil,GO.nil,GP.nil,FW.nil,0);}if($interfaceIsEqual(ag,$ifaceNil)){return $ifaceNil;}return J(ag.constructor);};$pkg.TypeOf=R;S=function(ag){var $ptr,ag,ah,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if($interfaceIsEqual(ag,$ifaceNil)){return new DI.ptr(FW.nil,0,0);}ah=P(J(ag.constructor),ag.$val,0);$s=1;case 1:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}return ah;}return;}if($f===undefined){$f={$blk:S};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ValueOf=S;BO.ptr.prototype.ptrTo=function(){var $ptr,ag;ag=this;return J($ptrType(I(ag)));};BO.prototype.ptrTo=function(){return this.$val.ptrTo();};X=function(ag){var $ptr,ag;return J($sliceType(I(ag)));};$pkg.SliceOf=X;Y=function(ag){var $ptr,ag,ah,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=P(ag,I(ag).zero(),0);$s=1;case 1:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}return ah;}return;}if($f===undefined){$f={$blk:Y};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Zero=Y;Z=function(ag){var $ptr,ag,ah;ah=ag.Kind();if(ah===25){return new(I(ag).ptr)();}else if(ah===17){return I(ag).zero();}else{return $newDataPointer(I(ag).zero(),I(ag.ptrTo()));}};AA=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=ai.common();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj;al=Z(ak);am=ak.Kind();if(am===3){al.$set((ah.$low<<24>>24));}else if(am===4){al.$set((ah.$low<<16>>16));}else if(am===2||am===5){al.$set((ah.$low>>0));}else if(am===6){al.$set(new $Int64(ah.$high,ah.$low));}else if(am===8){al.$set((ah.$low<<24>>>24));}else if(am===9){al.$set((ah.$low<<16>>>16));}else if(am===7||am===10||am===12){al.$set((ah.$low>>>0));}else if(am===11){al.$set(ah);}return new DI.ptr(ak,al,(((ag|64)>>>0)|(ak.Kind()>>>0))>>>0);}return;}if($f===undefined){$f={$blk:AA};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};AC=function(ag,ah,ai){var $ptr,ag,ah,ai;ah.$set(ai.$get());};AF=function(ag){var $ptr,ag,ah;ah=0;ah=new($global.Object)();return ah;};AG=function(ag,ah){var $ptr,ag,ah,ai,aj;ai=ah;if(!(ai.$get===undefined)){ai=ai.$get();}aj=$internalize(I(ag.Key()).keyFor(ai),$String);return[ai,aj];};AH=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al;aj=AG(ag,ai);ak=aj[1];al=ah[$externalize(ak,$String)];if(al===undefined){return 0;}return $newDataPointer(al.v,I(CJ(ag.Elem())));};AI=function(ag,ah,ai,aj){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ak=AG(ag,ai);al=ak[0];am=ak[1];an=aj.$get();ao=ag.Elem();ap=ao.Kind();$s=3;case 3:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}if(ap===25){$s=1;continue;}$s=2;continue;case 1:aq=I(ao).zero();O(aq,an,ao);an=aq;case 2:ar=new($global.Object)();ar.k=al;ar.v=an;ah[$externalize(am,$String)]=ar;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AI};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.$s=$s;$f.$r=$r;return $f;};AJ=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak;aj=AG(ag,ai);ak=aj[1];delete ah[$externalize(ak,$String)];};AL=function(ag,ah){var $ptr,ag,ah;return new AK.ptr(ag,ah,$keys(ah),0);};AM=function(ag){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=ag;ai=ah.keys[ah.i];aj=ah.t.Key();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=CJ(aj);$s=2;case 2:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=I(ak);$s=3;case 3:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}return $newDataPointer(ah.m[$externalize($internalize(ai,$String),$String)].k,al);}return;}if($f===undefined){$f={$blk:AM};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};AN=function(ag){var $ptr,ag,ah;ah=ag;ah.i=ah.i+(1)>>0;};AO=function(ag){var $ptr,ag;return $parseInt($keys(ag).length);};AP=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ag.object();if(ai===I(ag.typ).nil){$s=1;continue;}$s=2;continue;case 1:aj=P(ah,I(ah).nil,ag.flag);$s=3;case 3:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;case 2:ak=null;al=ah.Kind();$s=4;case 4:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;an=am;if(an===18){$s=5;continue;}if(an===23){$s=6;continue;}if(an===22){$s=7;continue;}if(an===25){$s=8;continue;}if(an===17||an===19||an===20||an===21||an===24){$s=9;continue;}$s=10;continue;case 5:ak=new(I(ah))();$s=11;continue;case 6:ao=new(I(ah))(ai.$array);ao.$offset=ai.$offset;ao.$length=ai.$length;ao.$capacity=ai.$capacity;ak=$newDataPointer(ao,I(CJ(ah)));$s=11;continue;case 7:ap=ah.Elem();$s=14;case 14:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}aq=ap.Kind();$s=15;case 15:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}if(aq===25){$s=12;continue;}$s=13;continue;case 12:ar=ah.Elem();$s=18;case 18:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}if($interfaceIsEqual(ar,ag.typ.Elem())){$s=16;continue;}$s=17;continue;case 16:ak=ai;$s=11;continue;case 17:ak=new(I(ah))();as=ak;at=ai;au=ah.Elem();$s=19;case 19:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}av=au;$r=O(as,at,av);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 13:ak=new(I(ah))(ai.$get,ai.$set);$s=11;continue;case 8:ak=new(I(ah).ptr)();O(ak,ai,ah);$s=11;continue;case 9:ak=ag.ptr;$s=11;continue;case 10:$panic(new DM.ptr("reflect.Convert",am));case 11:aw=ah.common();$s=21;case 21:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}ax=ah.Kind();$s=22;case 22:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}return new DI.ptr(aw,ak,(((ag.flag&96)>>>0)|(ax>>>0))>>>0);}return;}if($f===undefined){$f={$blk:AP};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.$s=$s;$f.$r=$r;return $f;};AQ=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=ah;ag=ag;ai=new DJ(ag.flag).kind();if(!((ai===17))&&!((ai===23))){$panic(new DM.ptr("reflect.Copy",ai));}if(ai===17){new DJ(ag.flag).mustBeAssignable();}new DJ(ag.flag).mustBeExported();aj=new DJ(ah.flag).kind();if(!((aj===17))&&!((aj===23))){$panic(new DM.ptr("reflect.Copy",aj));}new DJ(ah.flag).mustBeExported();$r=EB("reflect.Copy",ag.typ.Elem(),ah.typ.Elem());$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ak=ag.object();if(ai===17){ak=new(I(X(ag.typ.Elem())))(ak);}al=ah.object();if(aj===17){al=new(I(X(ah.typ.Elem())))(al);}return $parseInt($copySlice(ak,al))>>0;}return;}if($f===undefined){$f={$blk:AQ};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Copy=AQ;AR=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au;aj=FW.nil;ak=FW.nil;al=0;ah=ah;am="";if(ah.typ.Kind()===20){an=ah.typ.kindType;if(ai<0||ai>=an.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}ap=(ao=an.methods,((ai<0||ai>=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ai]));if(!(ap.pkgPath===GO.nil)){$panic(new $String("reflect: "+ag+" of unexported method"));}aq=$pointerOfStructConversion(ah.ptr,GW);if(aq.itab===GZ.nil){$panic(new $String("reflect: "+ag+" of method on nil interface value"));}ak=ap.typ;am=ap.name.$get();}else{ar=ah.typ.uncommonType.uncommon();if(ar===GP.nil||ai<0||ai>=ar.methods.$length){$panic(new $String("reflect: internal error: invalid method index"));}at=(as=ar.methods,((ai<0||ai>=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+ai]));if(!(at.pkgPath===GO.nil)){$panic(new $String("reflect: "+ag+" of unexported method"));}ak=at.mtyp;am=$internalize($methodSet(I(ah.typ))[ai].prop,$String);}au=ah.object();if(N(ah.typ)){au=new(I(ah.typ))(au);}al=au[$externalize(am,$String)];return[aj,ak,al];};AS=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;if(ag.flag===0){$panic(new DM.ptr("reflect.Value.Interface",0));}if(ah&&!((((ag.flag&32)>>>0)===0))){$panic(new $String("reflect.Value.Interface: cannot return value obtained from unexported field or method"));}if(!((((ag.flag&256)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ai=AV("Interface",ag);$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ag=ai;case 2:if(N(ag.typ)){return new(I(ag.typ))(ag.object());}return ag.object();}return;}if($f===undefined){$f={$blk:AS};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};AT=function(ag,ah,ai){var $ptr,ag,ah,ai;ai.$set(ah);};AU=function(){var $ptr;return"?FIXME?";};AV=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ai=[ai];aj=[aj];ah=ah;if(((ah.flag&256)>>>0)===0){$panic(new $String("reflect: internal error: invalid use of makePartialFunc"));}ak=AR(ag,ah,(ah.flag>>0)>>9>>0);ai[0]=ak[2];aj[0]=ah.object();if(N(ah.typ)){aj[0]=new(I(ah.typ))(aj[0]);}al=$makeFunc((function(ai,aj){return function(al){var $ptr,al;return ai[0].apply(aj[0],$externalize(al,GU));};})(ai,aj));am=ah.Type().common();$s=1;case 1:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return new DI.ptr(am,al,(((ah.flag&32)>>>0)|19)>>>0);}return;}if($f===undefined){$f={$blk:AV};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};BO.ptr.prototype.pointers=function(){var $ptr,ag,ah;ag=this;ah=ag.Kind();if(ah===22||ah===21||ah===18||ah===19||ah===25||ah===17){return true;}else{return false;}};BO.prototype.pointers=function(){return this.$val.pointers();};BO.ptr.prototype.Comparable=function(){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;ah=ag.Kind();if(ah===19||ah===23||ah===21){$s=1;continue;}if(ah===17){$s=2;continue;}if(ah===25){$s=3;continue;}$s=4;continue;case 1:return false;case 2:ai=ag.Elem().Comparable();$s=5;case 5:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;case 3:aj=0;case 6:if(!(aj>0;$s=6;continue;case 7:case 4:return true;}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.Comparable};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.Comparable=function(){return this.$val.Comparable();};BR.ptr.prototype.Method=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=this;if(ai===GP.nil||ag<0||ag>=ai.methods.$length){$panic(new $String("reflect: Method index out of range"));}ak=(aj=ai.methods,((ag<0||ag>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ag]));if(!(ak.name===GO.nil)){ah.Name=ak.name.$get();}al=19;if(!(ak.pkgPath===GO.nil)){ah.PkgPath=ak.pkgPath.$get();al=(al|(32))>>>0;}am=ak.typ;ah.Type=am;an=$internalize($methodSet(ai.jsType)[ag].prop,$String);ao=$makeFunc((function(ao){var $ptr,ao,ap;ap=(0>=ao.$length?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+0]);return ap[$externalize(an,$String)].apply(ap,$externalize($subslice(ao,1),GU));}));ah.Func=new DI.ptr(am,ao,al);ah.Index=ag;return ah;};BR.prototype.Method=function(ag){return this.$val.Method(ag);};DI.ptr.prototype.object=function(){var $ptr,ag,ah,ai,aj;ag=this;if((ag.typ.Kind()===17)||(ag.typ.Kind()===25)){return ag.ptr;}if(!((((ag.flag&64)>>>0)===0))){ah=ag.ptr.$get();if(!(ah===$ifaceNil)&&!(ah.constructor===I(ag.typ))){ai=ag.typ.Kind();switch(0){default:if(ai===11||ai===6){ah=new(I(ag.typ))(ah.$high,ah.$low);}else if(ai===15||ai===16){ah=new(I(ag.typ))(ah.$real,ah.$imag);}else if(ai===23){if(ah===ah.constructor.nil){ah=I(ag.typ).nil;break;}aj=new(I(ag.typ))(ah.$array);aj.$offset=ah.$offset;aj.$length=ah.$length;aj.$capacity=ah.$capacity;ah=aj;}}}return ah;}return ag.ptr;};DI.prototype.object=function(){return this.$val.object();};DI.ptr.prototype.call=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;bo=$f.bo;bp=$f.bp;bq=$f.bq;br=$f.br;bs=$f.bs;bt=$f.bt;bu=$f.bu;bv=$f.bv;bw=$f.bw;bx=$f.bx;by=$f.by;bz=$f.bz;ca=$f.ca;cb=$f.cb;cc=$f.cc;cd=$f.cd;ce=$f.ce;cf=$f.cf;cg=$f.cg;ch=$f.ch;ci=$f.ci;cj=$f.cj;ck=$f.ck;cl=$f.cl;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ai=this;aj=ai.typ;ak=0;al=null;if(!((((ai.flag&256)>>>0)===0))){am=AR(ag,ai,(ai.flag>>0)>>9>>0);aj=am[1];ak=am[2];al=ai.object();if(N(ai.typ)){al=new(I(ai.typ))(al);}}else{ak=ai.object();al=undefined;}if(ak===0){$panic(new $String("reflect.Value.Call: call of nil function"));}an=ag==="CallSlice";ao=aj.NumIn();if(an){if(!aj.IsVariadic()){$panic(new $String("reflect: CallSlice of non-variadic function"));}if(ah.$lengthao){$panic(new $String("reflect: CallSlice with too many input arguments"));}}else{if(aj.IsVariadic()){ao=ao-(1)>>0;}if(ah.$lengthao){$panic(new $String("reflect: Call with too many input arguments"));}}ap=ah;aq=0;while(true){if(!(aq=ap.$length)?$throwRuntimeError("index out of range"):ap.$array[ap.$offset+aq]);if(ar.Kind()===0){$panic(new $String("reflect: "+ag+" using zero Value argument"));}aq++;}as=0;case 1:if(!(as=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+as]).Type();au=aj.In(as);av=at;aw=au;ax=av.AssignableTo(aw);$s=5;case 5:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}if(!ax){$s=3;continue;}$s=4;continue;case 3:ay=av.String();$s=6;case 6:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=aw.String();$s=7;case 7:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}$panic(new $String("reflect: "+ag+" using "+ay+" as type "+az));case 4:as=as+(1)>>0;$s=1;continue;case 2:if(!an&&aj.IsVariadic()){$s=8;continue;}$s=9;continue;case 8:ba=ah.$length-ao>>0;bb=Q(aj.In(ao),ba,ba);$s=10;case 10:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=bb;bd=aj.In(ao).Elem();$s=11;case 11:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;bf=0;case 12:if(!(bf>0,((bg<0||bg>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+bg]));bi=bh.Type();bj=bi.AssignableTo(be);$s=16;case 16:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}if(!bj){$s=14;continue;}$s=15;continue;case 14:bk=bi.String();$s=17;case 17:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bl=be.String();$s=18;case 18:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}$panic(new $String("reflect: cannot use "+bk+" as type "+bl+" in "+ag));case 15:bm=bc.Index(bf);$s=19;case 19:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}$r=bm.Set(bh);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}bf=bf+(1)>>0;$s=12;continue;case 13:bn=ah;ah=$makeSlice(GV,(ao+1>>0));$copySlice($subslice(ah,0,ao),bn);((ao<0||ao>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+ao]=bc);case 9:bo=ah.$length;if(!((bo===aj.NumIn()))){$panic(new $String("reflect.Value.Call: wrong argument count"));}bp=aj.NumOut();bq=new($global.Array)(aj.NumIn());br=ah;bs=0;case 21:if(!(bs=br.$length)?$throwRuntimeError("index out of range"):br.$array[br.$offset+bs]);bv=aj.In(bt);bw=aj.In(bt).common();$s=23;case 23:if($c){$c=false;bw=bw.$blk();}if(bw&&bw.$blk!==undefined){break s;}bx=bw;by=0;bz=bu.assignTo("reflect.Value.Call",bx,by);$s=24;case 24:if($c){$c=false;bz=bz.$blk();}if(bz&&bz.$blk!==undefined){break s;}ca=bz.object();$s=25;case 25:if($c){$c=false;ca=ca.$blk();}if(ca&&ca.$blk!==undefined){break s;}cb=ca;cc=AZ(bv,cb);$s=26;case 26:if($c){$c=false;cc=cc.$blk();}if(cc&&cc.$blk!==undefined){break s;}bq[bt]=cc;bs++;$s=21;continue;case 22:cd=AW(new GI([new $jsObjectPtr(ak),new $jsObjectPtr(al),new $jsObjectPtr(bq)]));$s=27;case 27:if($c){$c=false;cd=cd.$blk();}if(cd&&cd.$blk!==undefined){break s;}ce=cd;cf=bp;if(cf===0){$s=28;continue;}if(cf===1){$s=29;continue;}$s=30;continue;case 28:return GV.nil;case 29:cg=P(aj.Out(0),AY(aj.Out(0),ce),0);$s=32;case 32:if($c){$c=false;cg=cg.$blk();}if(cg&&cg.$blk!==undefined){break s;}return new GV([$clone(cg,DI)]);case 30:ch=$makeSlice(GV,bp);ci=ch;cj=0;case 33:if(!(cj=ch.$length)?$throwRuntimeError("index out of range"):ch.$array[ch.$offset+ck]=cl);cj++;$s=33;continue;case 34:return ch;case 31:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.call};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.bo=bo;$f.bp=bp;$f.bq=bq;$f.br=br;$f.bs=bs;$f.bt=bt;$f.bu=bu;$f.bv=bv;$f.bw=bw;$f.bx=bx;$f.by=by;$f.bz=bz;$f.ca=ca;$f.cb=cb;$f.cc=cc;$f.cd=cd;$f.ce=ce;$f.cf=cf;$f.cg=cg;$f.ch=ch;$f.ci=ci;$f.cj=cj;$f.ck=ck;$f.cl=cl;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.call=function(ag,ah){return this.$val.call(ag,ah);};DI.ptr.prototype.Cap=function(){var $ptr,ag,ah,ai;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===17){return ag.typ.Len();}else if(ai===18||ai===23){return $parseInt(ag.object().$capacity)>>0;}$panic(new DM.ptr("reflect.Value.Cap",ah));};DI.prototype.Cap=function(){return this.$val.Cap();};AY=function(ag,ah){var $ptr,ag,ah;if($interfaceIsEqual(ag,AX)){return new(I(AX))(ah);}return ah;};AZ=function(ag,ah){var $ptr,ag,ah;if($interfaceIsEqual(ag,AX)){return ah.object;}return ah;};DI.ptr.prototype.Elem=function(){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===20){$s=1;continue;}if(ai===22){$s=2;continue;}$s=3;continue;case 1:aj=ag.object();if(aj===$ifaceNil){return new DI.ptr(FW.nil,0,0);}ak=J(aj.constructor);al=P(ak,aj.$val,(ag.flag&32)>>>0);$s=5;case 5:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}return al;case 2:if(ag.IsNil()){return new DI.ptr(FW.nil,0,0);}am=ag.object();an=ag.typ.kindType;ao=(((((ag.flag&32)>>>0)|64)>>>0)|128)>>>0;ao=(ao|((an.elem.Kind()>>>0)))>>>0;return new DI.ptr(an.elem,AY(an.elem,am),ao);case 3:$panic(new DM.ptr("reflect.Value.Elem",ah));case 4:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Elem};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Elem=function(){return this.$val.Elem();};DI.ptr.prototype.Field=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=[ah];ai=[ai];aj=[aj];ak=[ak];al=this;new DJ(al.flag).mustBe(25);am=al.typ.kindType;if(ag<0||ag>=am.fields.$length){$panic(new $String("reflect: Field index out of range"));}ah[0]=$internalize(I(al.typ).fields[ag].prop,$String);ao=(an=am.fields,((ag<0||ag>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+ag]));aj[0]=ao.typ;ap=(al.flag&224)>>>0;if(!(ao.pkgPath===GO.nil)){ap=(ap|(32))>>>0;}ap=(ap|((aj[0].Kind()>>>0)))>>>0;ar=(aq=am.fields,((ag<0||ag>=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ag])).tag;if(!(ar===GO.nil)&&!((ag===0))){$s=1;continue;}$s=2;continue;case 1:ai[0]=BA(ar.$get());if(!(ai[0]==="")){$s=3;continue;}$s=4;continue;case 3:case 5:as=[as];at=al.Field(0);$s=7;case 7:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}al=at;if(al.typ===AX){$s=8;continue;}$s=9;continue;case 8:as[0]=al.object().object;return new DI.ptr(aj[0],new(I(CJ(aj[0])))((function(ah,ai,aj,ak,as){return function(){var $ptr;return $internalize(as[0][$externalize(ai[0],$String)],I(aj[0]));};})(ah,ai,aj,ak,as),(function(ah,ai,aj,ak,as){return function(au){var $ptr,au;as[0][$externalize(ai[0],$String)]=$externalize(au,I(aj[0]));};})(ah,ai,aj,ak,as)),ap);case 9:if(al.typ.Kind()===22){$s=10;continue;}$s=11;continue;case 10:au=al.Elem();$s=12;case 12:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}al=au;case 11:$s=5;continue;case 6:case 4:case 2:ak[0]=al.ptr;if(!((((ap&64)>>>0)===0))&&!((aj[0].Kind()===17))&&!((aj[0].Kind()===25))){$s=13;continue;}$s=14;continue;case 13:return new DI.ptr(aj[0],new(I(CJ(aj[0])))((function(ah,ai,aj,ak){return function(){var $ptr;return AY(aj[0],ak[0][$externalize(ah[0],$String)]);};})(ah,ai,aj,ak),(function(ah,ai,aj,ak){return function(av){var $ptr,av;ak[0][$externalize(ah[0],$String)]=AZ(aj[0],av);};})(ah,ai,aj,ak)),ap);case 14:av=P(aj[0],AY(aj[0],ak[0][$externalize(ah[0],$String)]),ap);$s=15;case 15:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}return av;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Field};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Field=function(ag){return this.$val.Field(ag);};BA=function(ag){var $ptr,ag,ah,ai,aj,ak,al;while(true){if(!(!(ag===""))){break;}ah=0;while(true){if(!(ah>0;}ag=ag.substring(ah);if(ag===""){break;}ah=0;while(true){if(!(ah>0;}if((ah+1>>0)>=ag.length||!((ag.charCodeAt(ah)===58))||!((ag.charCodeAt((ah+1>>0))===34))){break;}ai=ag.substring(0,ah);ag=ag.substring((ah+1>>0));ah=1;while(true){if(!(ah>0;}ah=ah+(1)>>0;}if(ah>=ag.length){break;}aj=ag.substring(0,(ah+1>>0));ag=ag.substring((ah+1>>0));if(ai==="js"){ak=B.Unquote(aj);al=ak[0];return al;}}return"";};DI.ptr.prototype.Index=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=[ag];ah=[ah];ai=[ai];aj=[aj];ak=[ak];al=[al];am=this;an=new DJ(am.flag).kind();ao=an;if(ao===17){$s=1;continue;}if(ao===23){$s=2;continue;}if(ao===24){$s=3;continue;}$s=4;continue;case 1:ap=am.typ.kindType;if(ag[0]<0||ag[0]>(ap.len>>0)){$panic(new $String("reflect: array index out of range"));}ak[0]=ap.elem;aq=(am.flag&224)>>>0;aq=(aq|((ak[0].Kind()>>>0)))>>>0;al[0]=am.ptr;if(!((((aq&64)>>>0)===0))&&!((ak[0].Kind()===17))&&!((ak[0].Kind()===25))){$s=6;continue;}$s=7;continue;case 6:return new DI.ptr(ak[0],new(I(CJ(ak[0])))((function(ag,ah,ai,aj,ak,al){return function(){var $ptr;return AY(ak[0],al[0][ag[0]]);};})(ag,ah,ai,aj,ak,al),(function(ag,ah,ai,aj,ak,al){return function(ar){var $ptr,ar;al[0][ag[0]]=AZ(ak[0],ar);};})(ag,ah,ai,aj,ak,al)),aq);case 7:ar=P(ak[0],AY(ak[0],al[0][ag[0]]),aq);$s=8;case 8:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}return ar;case 2:as=am.object();if(ag[0]<0||ag[0]>=($parseInt(as.$length)>>0)){$panic(new $String("reflect: slice index out of range"));}at=am.typ.kindType;ah[0]=at.elem;au=(192|((am.flag&32)>>>0))>>>0;au=(au|((ah[0].Kind()>>>0)))>>>0;ag[0]=ag[0]+(($parseInt(as.$offset)>>0))>>0;ai[0]=as.$array;if(!((((au&64)>>>0)===0))&&!((ah[0].Kind()===17))&&!((ah[0].Kind()===25))){$s=9;continue;}$s=10;continue;case 9:return new DI.ptr(ah[0],new(I(CJ(ah[0])))((function(ag,ah,ai,aj,ak,al){return function(){var $ptr;return AY(ah[0],ai[0][ag[0]]);};})(ag,ah,ai,aj,ak,al),(function(ag,ah,ai,aj,ak,al){return function(av){var $ptr,av;ai[0][ag[0]]=AZ(ah[0],av);};})(ag,ah,ai,aj,ak,al)),au);case 10:av=P(ah[0],AY(ah[0],ai[0][ag[0]]),au);$s=11;case 11:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}return av;case 3:aw=am.ptr.$get();if(ag[0]<0||ag[0]>=aw.length){$panic(new $String("reflect: string index out of range"));}ax=(((am.flag&32)>>>0)|8)>>>0;aj[0]=aw.charCodeAt(ag[0]);return new DI.ptr(DV,(aj.$ptr||(aj.$ptr=new GN(function(){return this.$target[0];},function($v){this.$target[0]=$v;},aj))),(ax|64)>>>0);case 4:$panic(new DM.ptr("reflect.Value.Index",an));case 5:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Index};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Index=function(ag){return this.$val.Index(ag);};DI.ptr.prototype.InterfaceData=function(){var $ptr,ag;ag=this;$panic(A.New("InterfaceData is not supported by GopherJS"));};DI.prototype.InterfaceData=function(){return this.$val.InterfaceData();};DI.ptr.prototype.IsNil=function(){var $ptr,ag,ah,ai;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===22||ai===23){return ag.object()===I(ag.typ).nil;}else if(ai===18){return ag.object()===$chanNil;}else if(ai===19){return ag.object()===$throwNilPointerError;}else if(ai===21){return ag.object()===false;}else if(ai===20){return ag.object()===$ifaceNil;}else{$panic(new DM.ptr("reflect.Value.IsNil",ah));}};DI.prototype.IsNil=function(){return this.$val.IsNil();};DI.ptr.prototype.Len=function(){var $ptr,ag,ah,ai;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===17||ai===24){return $parseInt(ag.object().length);}else if(ai===23){return $parseInt(ag.object().$length)>>0;}else if(ai===18){return $parseInt(ag.object().$buffer.length)>>0;}else if(ai===21){return $parseInt($keys(ag.object()).length);}else{$panic(new DM.ptr("reflect.Value.Len",ah));}};DI.prototype.Len=function(){return this.$val.Len();};DI.ptr.prototype.Pointer=function(){var $ptr,ag,ah,ai;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===18||ai===21||ai===22||ai===26){if(ag.IsNil()){return 0;}return ag.object();}else if(ai===19){if(ag.IsNil()){return 0;}return 1;}else if(ai===23){if(ag.IsNil()){return 0;}return ag.object().$array;}else{$panic(new DM.ptr("reflect.Value.Pointer",ah));}};DI.prototype.Pointer=function(){return this.$val.Pointer();};DI.ptr.prototype.Set=function(ag){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ag.flag).mustBeExported();ai=ag.assignTo("reflect.Set",ah.typ,0);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ag=ai;if(!((((ah.flag&64)>>>0)===0))){$s=2;continue;}$s=3;continue;case 2:aj=ah.typ.Kind();if(aj===17){$s=4;continue;}if(aj===20){$s=5;continue;}if(aj===25){$s=6;continue;}$s=7;continue;case 4:$copy(ah.ptr,ag.ptr,I(ah.typ));$s=8;continue;case 5:ak=AS(ag,false);$s=9;case 9:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}ah.ptr.$set(ak);$s=8;continue;case 6:O(ah.ptr,ag.ptr,ah.typ);$s=8;continue;case 7:ah.ptr.$set(ag.object());case 8:return;case 3:ah.ptr=ag.ptr;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Set};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Set=function(ag){return this.$val.Set(ag);};DI.ptr.prototype.SetCap=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(23);ai=ah.ptr.$get();if(ag<($parseInt(ai.$length)>>0)||ag>($parseInt(ai.$capacity)>>0)){$panic(new $String("reflect: slice capacity out of range in SetCap"));}aj=new(I(ah.typ))(ai.$array);aj.$offset=ai.$offset;aj.$length=ai.$length;aj.$capacity=ag;ah.ptr.$set(aj);};DI.prototype.SetCap=function(ag){return this.$val.SetCap(ag);};DI.ptr.prototype.SetLen=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(23);ai=ah.ptr.$get();if(ag<0||ag>($parseInt(ai.$capacity)>>0)){$panic(new $String("reflect: slice length out of range in SetLen"));}aj=new(I(ah.typ))(ai.$array);aj.$offset=ai.$offset;aj.$length=ag;aj.$capacity=ai.$capacity;ah.ptr.$set(aj);};DI.prototype.SetLen=function(ag){return this.$val.SetLen(ag);};DI.ptr.prototype.Slice=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ai=this;aj=0;ak=$ifaceNil;al=null;am=new DJ(ai.flag).kind();an=am;if(an===17){$s=1;continue;}if(an===23){$s=2;continue;}if(an===24){$s=3;continue;}$s=4;continue;case 1:if(((ai.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}ao=ai.typ.kindType;aj=(ao.len>>0);ak=X(ao.elem);al=new(I(ak))(ai.object());$s=5;continue;case 2:ak=ai.typ;al=ai.object();aj=$parseInt(al.$capacity)>>0;$s=5;continue;case 3:ap=ai.ptr.$get();if(ag<0||ahap.length){$panic(new $String("reflect.Value.Slice: string slice index out of bounds"));}aq=S(new $String(ap.substring(ag,ah)));$s=6;case 6:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}return aq;case 4:$panic(new DM.ptr("reflect.Value.Slice",am));case 5:if(ag<0||ahaj){$panic(new $String("reflect.Value.Slice: slice index out of bounds"));}ar=P(ak,$subslice(al,ag,ah),(ai.flag&32)>>>0);$s=7;case 7:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}return ar;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Slice};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Slice=function(ag,ah){return this.$val.Slice(ag,ah);};DI.ptr.prototype.Slice3=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=this;ak=0;al=$ifaceNil;am=null;an=new DJ(aj.flag).kind();ao=an;if(ao===17){if(((aj.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Slice: slice of unaddressable array"));}ap=aj.typ.kindType;ak=(ap.len>>0);al=X(ap.elem);am=new(I(al))(aj.object());}else if(ao===23){al=aj.typ;am=aj.object();ak=$parseInt(am.$capacity)>>0;}else{$panic(new DM.ptr("reflect.Value.Slice3",an));}if(ag<0||ahak){$panic(new $String("reflect.Value.Slice3: slice index out of bounds"));}aq=P(al,$subslice(am,ag,ah,ai),(aj.flag&32)>>>0);$s=1;case 1:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}return aq;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Slice3};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Slice3=function(ag,ah,ai){return this.$val.Slice3(ag,ah,ai);};DI.ptr.prototype.Close=function(){var $ptr,ag;ag=this;new DJ(ag.flag).mustBe(18);new DJ(ag.flag).mustBeExported();$close(ag.object());};DI.prototype.Close=function(){return this.$val.Close();};BC=function(ag,ah,ai,aj){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ak=false;al=false;am=new HA([new GI([new $jsObjectPtr(ah)])]);if(ai){am=$append(am,new GI([]));}an=BB(new GI([am]));$s=1;case 1:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ao=an;if(ai&&(($parseInt(ao[0])>>0)===1)){ap=false;aq=false;ak=ap;al=aq;return[ak,al];}ar=ao[1];aj.$set(ar[0]);as=true;at=!!(ar[1]);ak=as;al=at;return[ak,al];}return;}if($f===undefined){$f={$blk:BC};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.$s=$s;$f.$r=$r;return $f;};BD=function(ag,ah,ai,aj){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ak=new HA([new GI([new $jsObjectPtr(ah),new $jsObjectPtr(ai.$get())])]);if(aj){ak=$append(ak,new GI([]));}al=BB(new GI([ak]));$s=1;case 1:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;if(aj&&(($parseInt(am[0])>>0)===1)){return false;}return true;}return;}if($f===undefined){$f={$blk:BD};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};BN.prototype.String=function(){var $ptr,ag;ag=this.$val;if((ag>>0)=CE.$length)?$throwRuntimeError("index out of range"):CE.$array[CE.$offset+ag]);}return"kind"+B.Itoa((ag>>0));};$ptrType(BN).prototype.String=function(){return new BN(this.$get()).String();};BR.ptr.prototype.uncommon=function(){var $ptr,ag;ag=this;return ag;};BR.prototype.uncommon=function(){return this.$val.uncommon();};BR.ptr.prototype.PkgPath=function(){var $ptr,ag;ag=this;if(ag===GP.nil||ag.pkgPath===GO.nil){return"";}return ag.pkgPath.$get();};BR.prototype.PkgPath=function(){return this.$val.PkgPath();};BR.ptr.prototype.Name=function(){var $ptr,ag;ag=this;if(ag===GP.nil||ag.name===GO.nil){return"";}return ag.name.$get();};BR.prototype.Name=function(){return this.$val.Name();};BO.ptr.prototype.String=function(){var $ptr,ag;ag=this;return ag.string.$get();};BO.prototype.String=function(){return this.$val.String();};BO.ptr.prototype.Size=function(){var $ptr,ag;ag=this;return ag.size;};BO.prototype.Size=function(){return this.$val.Size();};BO.ptr.prototype.Bits=function(){var $ptr,ag,ah;ag=this;if(ag===FW.nil){$panic(new $String("reflect: Bits of nil Type"));}ah=ag.Kind();if(ah<2||ah>16){$panic(new $String("reflect: Bits of non-arithmetic Type "+ag.String()));}return(ag.size>>0)*8>>0;};BO.prototype.Bits=function(){return this.$val.Bits();};BO.ptr.prototype.Align=function(){var $ptr,ag;ag=this;return(ag.align>>0);};BO.prototype.Align=function(){return this.$val.Align();};BO.ptr.prototype.FieldAlign=function(){var $ptr,ag;ag=this;return(ag.fieldAlign>>0);};BO.prototype.FieldAlign=function(){return this.$val.FieldAlign();};BO.ptr.prototype.Kind=function(){var $ptr,ag;ag=this;return(((ag.kind&31)>>>0)>>>0);};BO.prototype.Kind=function(){return this.$val.Kind();};BO.ptr.prototype.common=function(){var $ptr,ag;ag=this;return ag;};BO.prototype.common=function(){return this.$val.common();};BR.ptr.prototype.NumMethod=function(){var $ptr,ag;ag=this;if(ag===GP.nil){return 0;}return ag.methods.$length;};BR.prototype.NumMethod=function(){return this.$val.NumMethod();};BR.ptr.prototype.MethodByName=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=false;aj=this;if(aj===GP.nil){return[ah,ai];}ak=HD.nil;al=aj.methods;am=0;while(true){if(!(am=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+an]));if(!(ak.name===GO.nil)&&ak.name.$get()===ag){ap=$clone(aj.Method(an),CD);aq=true;CD.copy(ah,ap);ai=aq;return[ah,ai];}am++;}return[ah,ai];};BR.prototype.MethodByName=function(ag){return this.$val.MethodByName(ag);};BO.ptr.prototype.NumMethod=function(){var $ptr,ag,ah;ag=this;if(ag.Kind()===20){ah=ag.kindType;return ah.NumMethod();}return ag.uncommonType.NumMethod();};BO.prototype.NumMethod=function(){return this.$val.NumMethod();};BO.ptr.prototype.Method=function(ag){var $ptr,ag,ah,ai,aj;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=this;if(ai.Kind()===20){aj=ai.kindType;CD.copy(ah,aj.Method(ag));return ah;}CD.copy(ah,ai.uncommonType.Method(ag));return ah;};BO.prototype.Method=function(ag){return this.$val.Method(ag);};BO.ptr.prototype.MethodByName=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=false;aj=this;if(aj.Kind()===20){ak=aj.kindType;al=ak.MethodByName(ag);CD.copy(ah,al[0]);ai=al[1];return[ah,ai];}am=aj.uncommonType.MethodByName(ag);CD.copy(ah,am[0]);ai=am[1];return[ah,ai];};BO.prototype.MethodByName=function(ag){return this.$val.MethodByName(ag);};BO.ptr.prototype.PkgPath=function(){var $ptr,ag;ag=this;return ag.uncommonType.PkgPath();};BO.prototype.PkgPath=function(){return this.$val.PkgPath();};BO.ptr.prototype.Name=function(){var $ptr,ag;ag=this;return ag.uncommonType.Name();};BO.prototype.Name=function(){return this.$val.Name();};BO.ptr.prototype.ChanDir=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===18))){$panic(new $String("reflect: ChanDir of non-chan type"));}ah=ag.kindType;return(ah.dir>>0);};BO.prototype.ChanDir=function(){return this.$val.ChanDir();};BO.ptr.prototype.IsVariadic=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===19))){$panic(new $String("reflect: IsVariadic of non-func type"));}ah=ag.kindType;return ah.dotdotdot;};BO.prototype.IsVariadic=function(){return this.$val.IsVariadic();};BO.ptr.prototype.Elem=function(){var $ptr,ag,ah,ai,aj,ak,al,am;ag=this;ah=ag.Kind();if(ah===17){ai=ag.kindType;return DA(ai.elem);}else if(ah===18){aj=ag.kindType;return DA(aj.elem);}else if(ah===21){ak=ag.kindType;return DA(ak.elem);}else if(ah===22){al=ag.kindType;return DA(al.elem);}else if(ah===23){am=ag.kindType;return DA(am.elem);}$panic(new $String("reflect: Elem of invalid type"));};BO.prototype.Elem=function(){return this.$val.Elem();};BO.ptr.prototype.Field=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(!((ah.Kind()===25))){$panic(new $String("reflect: Field of non-struct type"));}ai=ah.kindType;aj=ai.Field(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.Field};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.Field=function(ag){return this.$val.Field(ag);};BO.ptr.prototype.FieldByIndex=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(!((ah.Kind()===25))){$panic(new $String("reflect: FieldByIndex of non-struct type"));}ai=ah.kindType;aj=ai.FieldByIndex(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.FieldByIndex};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.FieldByIndex=function(ag){return this.$val.FieldByIndex(ag);};BO.ptr.prototype.FieldByName=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(!((ah.Kind()===25))){$panic(new $String("reflect: FieldByName of non-struct type"));}ai=ah.kindType;aj=ai.FieldByName(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.FieldByName};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.FieldByName=function(ag){return this.$val.FieldByName(ag);};BO.ptr.prototype.FieldByNameFunc=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(!((ah.Kind()===25))){$panic(new $String("reflect: FieldByNameFunc of non-struct type"));}ai=ah.kindType;aj=ai.FieldByNameFunc(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.FieldByNameFunc};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.FieldByNameFunc=function(ag){return this.$val.FieldByNameFunc(ag);};BO.ptr.prototype.In=function(ag){var $ptr,ag,ah,ai,aj;ah=this;if(!((ah.Kind()===19))){$panic(new $String("reflect: In of non-func type"));}ai=ah.kindType;return DA((aj=ai.in$2,((ag<0||ag>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ag])));};BO.prototype.In=function(ag){return this.$val.In(ag);};BO.ptr.prototype.Key=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===21))){$panic(new $String("reflect: Key of non-map type"));}ah=ag.kindType;return DA(ah.key);};BO.prototype.Key=function(){return this.$val.Key();};BO.ptr.prototype.Len=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===17))){$panic(new $String("reflect: Len of non-array type"));}ah=ag.kindType;return(ah.len>>0);};BO.prototype.Len=function(){return this.$val.Len();};BO.ptr.prototype.NumField=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===25))){$panic(new $String("reflect: NumField of non-struct type"));}ah=ag.kindType;return ah.fields.$length;};BO.prototype.NumField=function(){return this.$val.NumField();};BO.ptr.prototype.NumIn=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===19))){$panic(new $String("reflect: NumIn of non-func type"));}ah=ag.kindType;return ah.in$2.$length;};BO.prototype.NumIn=function(){return this.$val.NumIn();};BO.ptr.prototype.NumOut=function(){var $ptr,ag,ah;ag=this;if(!((ag.Kind()===19))){$panic(new $String("reflect: NumOut of non-func type"));}ah=ag.kindType;return ah.out.$length;};BO.prototype.NumOut=function(){return this.$val.NumOut();};BO.ptr.prototype.Out=function(ag){var $ptr,ag,ah,ai,aj;ah=this;if(!((ah.Kind()===19))){$panic(new $String("reflect: Out of non-func type"));}ai=ah.kindType;return DA((aj=ai.out,((ag<0||ag>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ag])));};BO.prototype.Out=function(ag){return this.$val.Out(ag);};BS.prototype.String=function(){var $ptr,ag,ah;ag=this.$val;ah=ag;if(ah===2){return"chan<-";}else if(ah===1){return"<-chan";}else if(ah===3){return"chan";}return"ChanDir"+B.Itoa((ag>>0));};$ptrType(BS).prototype.String=function(){return new BS(this.$get()).String();};BX.ptr.prototype.Method=function(ag){var $ptr,ag,ah,ai,aj,ak;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=this;if(ag<0||ag>=ai.methods.$length){return ah;}ak=(aj=ai.methods,((ag<0||ag>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ag]));ah.Name=ak.name.$get();if(!(ak.pkgPath===GO.nil)){ah.PkgPath=ak.pkgPath.$get();}ah.Type=DA(ak.typ);ah.Index=ag;return ah;};BX.prototype.Method=function(ag){return this.$val.Method(ag);};BX.ptr.prototype.NumMethod=function(){var $ptr,ag;ag=this;return ag.methods.$length;};BX.prototype.NumMethod=function(){return this.$val.NumMethod();};BX.ptr.prototype.MethodByName=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq;ah=new CD.ptr("","",$ifaceNil,new DI.ptr(FW.nil,0,0),0);ai=false;aj=this;if(aj===HE.nil){return[ah,ai];}ak=HF.nil;al=aj.methods;am=0;while(true){if(!(am=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+an]));if(ak.name.$get()===ag){ap=$clone(aj.Method(an),CD);aq=true;CD.copy(ah,ap);ai=aq;return[ah,ai];}am++;}return[ah,ai];};BX.prototype.MethodByName=function(ag){return this.$val.MethodByName(ag);};CG.prototype.Get=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an;ah=this.$val;while(true){if(!(!(ah===""))){break;}ai=0;while(true){if(!(ai>0;}ah=ah.substring(ai);if(ah===""){break;}ai=0;while(true){if(!(ai32&&!((ah.charCodeAt(ai)===58))&&!((ah.charCodeAt(ai)===34))&&!((ah.charCodeAt(ai)===127)))){break;}ai=ai+(1)>>0;}if((ai===0)||(ai+1>>0)>=ah.length||!((ah.charCodeAt(ai)===58))||!((ah.charCodeAt((ai+1>>0))===34))){break;}aj=ah.substring(0,ai);ah=ah.substring((ai+1>>0));ai=1;while(true){if(!(ai>0;}ai=ai+(1)>>0;}if(ai>=ah.length){break;}ak=ah.substring(0,(ai+1>>0));ah=ah.substring((ai+1>>0));if(ag===aj){al=B.Unquote(ak);am=al[0];an=al[1];if(!($interfaceIsEqual(an,$ifaceNil))){break;}return am;}}return"";};$ptrType(CG).prototype.Get=function(ag){return new CG(this.$get()).Get(ag);};CC.ptr.prototype.Field=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=new CF.ptr("","",$ifaceNil,"",0,HG.nil,false);ai=this;if(ag<0||ag>=ai.fields.$length){return ah;}ak=(aj=ai.fields,((ag<0||ag>=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ag]));ah.Type=DA(ak.typ);if(!(ak.name===GO.nil)){$s=1;continue;}$s=2;continue;case 1:ah.Name=ak.name.$get();$s=3;continue;case 2:al=ah.Type;am=al.Kind();$s=6;case 6:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}if(am===22){$s=4;continue;}$s=5;continue;case 4:an=al.Elem();$s=7;case 7:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}al=an;case 5:ao=al.Name();$s=8;case 8:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}ah.Name=ao;ah.Anonymous=true;case 3:if(!(ak.pkgPath===GO.nil)){ah.PkgPath=ak.pkgPath.$get();}if(!(ak.tag===GO.nil)){ah.Tag=ak.tag.$get();}ah.Offset=ak.offset;ah.Index=new HG([ag]);return ah;}return;}if($f===undefined){$f={$blk:CC.ptr.prototype.Field};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.$s=$s;$f.$r=$r;return $f;};CC.prototype.Field=function(ag){return this.$val.Field(ag);};CC.ptr.prototype.FieldByIndex=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=new CF.ptr("","",$ifaceNil,"",0,HG.nil,false);ai=this;ah.Type=DA(ai.rtype);aj=ag;ak=0;case 1:if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(al>0){$s=3;continue;}$s=4;continue;case 3:an=ah.Type;ap=an.Kind();$s=8;case 8:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}if(!(ap===22)){ao=false;$s=7;continue s;}aq=an.Elem();$s=9;case 9:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ar=aq.Kind();$s=10;case 10:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}ao=ar===25;case 7:if(ao){$s=5;continue;}$s=6;continue;case 5:as=an.Elem();$s=11;case 11:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}an=as;case 6:ah.Type=an;case 4:at=ah.Type.Field(am);$s=12;case 12:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}CF.copy(ah,at);ak++;$s=1;continue;case 2:return ah;}return;}if($f===undefined){$f={$blk:CC.ptr.prototype.FieldByIndex};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.$s=$s;$f.$r=$r;return $f;};CC.prototype.FieldByIndex=function(ag){return this.$val.FieldByIndex(ag);};CC.ptr.prototype.FieldByNameFunc=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;bo=$f.bo;bp=$f.bp;bq=$f.bq;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=new CF.ptr("","",$ifaceNil,"",0,HG.nil,false);ai=false;aj=this;ak=new HH([]);al=new HH([new CH.ptr(aj,HG.nil)]);am=false;an=$makeMap(HI.keyFor,[]);case 1:if(!(al.$length>0)){$s=2;continue;}ao=al;ap=$subslice(ak,0,0);ak=ao;al=ap;aq=am;am=false;ar=ak;as=0;case 3:if(!(as=ar.$length)?$throwRuntimeError("index out of range"):ar.$array[ar.$offset+as]),CH);au=at.typ;if((av=an[HI.keyFor(au)],av!==undefined?av.v:false)){$s=5;continue;}$s=6;continue;case 5:as++;$s=3;continue;case 6:aw=au;(an||$throwRuntimeError("assignment to entry in nil map"))[HI.keyFor(aw)]={k:aw,v:true};ax=au.fields;ay=0;case 7:if(!(ay=ba.$length)?$throwRuntimeError("index out of range"):ba.$array[ba.$offset+az]));bc="";bd=FW.nil;if(!(bb.name===GO.nil)){$s=9;continue;}$s=10;continue;case 9:bc=bb.name.$get();$s=11;continue;case 10:bd=bb.typ;if(bd.Kind()===22){$s=12;continue;}$s=13;continue;case 12:be=bd.Elem().common();$s=14;case 14:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be;case 13:bc=bd.Name();case 11:bf=ag(bc);$s=17;case 17:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}if(bf){$s=15;continue;}$s=16;continue;case 15:if((bg=aq[HI.keyFor(au)],bg!==undefined?bg.v:0)>1||ai){bh=new CF.ptr("","",$ifaceNil,"",0,HG.nil,false);bi=false;CF.copy(ah,bh);ai=bi;return[ah,ai];}bj=au.Field(az);$s=18;case 18:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}CF.copy(ah,bj);ah.Index=HG.nil;ah.Index=$appendSlice(ah.Index,at.index);ah.Index=$append(ah.Index,az);ai=true;ay++;$s=7;continue;case 16:if(ai||bd===FW.nil||!((bd.Kind()===25))){ay++;$s=7;continue;}bk=bd.kindType;if((bl=am[HI.keyFor(bk)],bl!==undefined?bl.v:0)>0){bm=bk;(am||$throwRuntimeError("assignment to entry in nil map"))[HI.keyFor(bm)]={k:bm,v:2};ay++;$s=7;continue;}if(am===false){am=$makeMap(HI.keyFor,[]);}bn=bk;(am||$throwRuntimeError("assignment to entry in nil map"))[HI.keyFor(bn)]={k:bn,v:1};if((bo=aq[HI.keyFor(au)],bo!==undefined?bo.v:0)>1){bp=bk;(am||$throwRuntimeError("assignment to entry in nil map"))[HI.keyFor(bp)]={k:bp,v:2};}bq=HG.nil;bq=$appendSlice(bq,at.index);bq=$append(bq,az);al=$append(al,new CH.ptr(bk,bq));ay++;$s=7;continue;case 8:as++;$s=3;continue;case 4:if(ai){$s=2;continue;}$s=1;continue;case 2:return[ah,ai];}return;}if($f===undefined){$f={$blk:CC.ptr.prototype.FieldByNameFunc};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.bo=bo;$f.bp=bp;$f.bq=bq;$f.$s=$s;$f.$r=$r;return $f;};CC.prototype.FieldByNameFunc=function(ag){return this.$val.FieldByNameFunc(ag);};CC.ptr.prototype.FieldByName=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=[ag];ah=new CF.ptr("","",$ifaceNil,"",0,HG.nil,false);ai=false;aj=this;ak=false;if(!(ag[0]==="")){$s=1;continue;}$s=2;continue;case 1:al=aj.fields;am=0;case 3:if(!(am=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+an]));if(ap.name===GO.nil){$s=5;continue;}$s=6;continue;case 5:ak=true;am++;$s=3;continue;case 6:if(ap.name.$get()===ag[0]){$s=7;continue;}$s=8;continue;case 7:ar=aj.Field(an);$s=9;case 9:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}aq=$clone(ar,CF);as=true;CF.copy(ah,aq);ai=as;return[ah,ai];case 8:am++;$s=3;continue;case 4:case 2:if(!ak){return[ah,ai];}au=aj.FieldByNameFunc((function(ag){return function(au){var $ptr,au;return au===ag[0];};})(ag));$s=10;case 10:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}at=au;CF.copy(ah,at[0]);ai=at[1];return[ah,ai];}return;}if($f===undefined){$f={$blk:CC.ptr.prototype.FieldByName};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.$s=$s;$f.$r=$r;return $f;};CC.prototype.FieldByName=function(ag){return this.$val.FieldByName(ag);};CJ=function(ag){var $ptr,ag;return $assertType(ag,FW).ptrTo();};$pkg.PtrTo=CJ;BO.ptr.prototype.Implements=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if($interfaceIsEqual(ag,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.Implements"));}ai=ag.Kind();$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(!((ai===20))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect: non-interface type passed to Type.Implements"));case 2:return CL($assertType(ag,FW),ah);}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.Implements};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.Implements=function(ag){return this.$val.Implements(ag);};BO.ptr.prototype.AssignableTo=function(ag){var $ptr,ag,ah,ai;ah=this;if($interfaceIsEqual(ag,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.AssignableTo"));}ai=$assertType(ag,FW);return CM(ai,ah)||CL(ai,ah);};BO.prototype.AssignableTo=function(ag){return this.$val.AssignableTo(ag);};BO.ptr.prototype.ConvertibleTo=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if($interfaceIsEqual(ag,$ifaceNil)){$panic(new $String("reflect: nil type passed to Type.ConvertibleTo"));}ai=$assertType(ag,FW);aj=ER(ai,ah);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return!(aj===$throwNilPointerError);}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.ConvertibleTo};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.ConvertibleTo=function(ag){return this.$val.ConvertibleTo(ag);};CL=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw;if(!((ag.Kind()===20))){return false;}ai=ag.kindType;if(ai.methods.$length===0){return true;}if(ah.Kind()===20){aj=ah.kindType;ak=0;al=0;while(true){if(!(al=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+ak]));ap=(ao=aj.methods,((al<0||al>=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+al]));if(ap.name.$get()===an.name.$get()&&ap.pkgPath===an.pkgPath&&ap.typ===an.typ){ak=ak+(1)>>0;if(ak>=ai.methods.$length){return true;}}al=al+(1)>>0;}return false;}aq=ah.uncommonType.uncommon();if(aq===GP.nil){return false;}ar=0;as=0;while(true){if(!(as=at.$length)?$throwRuntimeError("index out of range"):at.$array[at.$offset+ar]));aw=(av=aq.methods,((as<0||as>=av.$length)?$throwRuntimeError("index out of range"):av.$array[av.$offset+as]));if(aw.name.$get()===au.name.$get()&&aw.pkgPath===au.pkgPath&&aw.mtyp===au.typ){ar=ar+(1)>>0;if(ar>=ai.methods.$length){return true;}}as=as+(1)>>0;}return false;};CM=function(ag,ah){var $ptr,ag,ah;if(ag===ah){return true;}if(!(ag.Name()==="")&&!(ah.Name()==="")||!((ag.Kind()===ah.Kind()))){return false;}return CN(ag,ah);};CN=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg;if(ag===ah){return true;}ai=ag.Kind();if(!((ai===ah.Kind()))){return false;}if(1<=ai&&ai<=16||(ai===24)||(ai===26)){return true;}aj=ai;if(aj===17){return $interfaceIsEqual(ag.Elem(),ah.Elem())&&(ag.Len()===ah.Len());}else if(aj===18){if((ah.ChanDir()===3)&&$interfaceIsEqual(ag.Elem(),ah.Elem())){return true;}return(ah.ChanDir()===ag.ChanDir())&&$interfaceIsEqual(ag.Elem(),ah.Elem());}else if(aj===19){ak=ag.kindType;al=ah.kindType;if(!(ak.dotdotdot===al.dotdotdot)||!((ak.in$2.$length===al.in$2.$length))||!((ak.out.$length===al.out.$length))){return false;}am=ak.in$2;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);if(!(ap===(aq=al.in$2,((ao<0||ao>=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ao])))){return false;}an++;}ar=ak.out;as=0;while(true){if(!(as=ar.$length)?$throwRuntimeError("index out of range"):ar.$array[ar.$offset+as]);if(!(au===(av=al.out,((at<0||at>=av.$length)?$throwRuntimeError("index out of range"):av.$array[av.$offset+at])))){return false;}as++;}return true;}else if(aj===20){aw=ag.kindType;ax=ah.kindType;if((aw.methods.$length===0)&&(ax.methods.$length===0)){return true;}return false;}else if(aj===21){return $interfaceIsEqual(ag.Key(),ah.Key())&&$interfaceIsEqual(ag.Elem(),ah.Elem());}else if(aj===22||aj===23){return $interfaceIsEqual(ag.Elem(),ah.Elem());}else if(aj===25){ay=ag.kindType;az=ah.kindType;if(!((ay.fields.$length===az.fields.$length))){return false;}ba=ay.fields;bb=0;while(true){if(!(bb=bd.$length)?$throwRuntimeError("index out of range"):bd.$array[bd.$offset+bc]));bg=(bf=az.fields,((bc<0||bc>=bf.$length)?$throwRuntimeError("index out of range"):bf.$array[bf.$offset+bc]));if(!(be.name===bg.name)&&(be.name===GO.nil||bg.name===GO.nil||!(be.name.$get()===bg.name.$get()))){return false;}if(!(be.pkgPath===bg.pkgPath)&&(be.pkgPath===GO.nil||bg.pkgPath===GO.nil||!(be.pkgPath.$get()===bg.pkgPath.$get()))){return false;}if(!(be.typ===bg.typ)){return false;}if(!(be.tag===bg.tag)&&(be.tag===GO.nil||bg.tag===GO.nil||!(be.tag.$get()===bg.tag.$get()))){return false;}if(!((be.offset===bg.offset))){return false;}bb++;}return true;}return false;};DA=function(ag){var $ptr,ag;if(ag===FW.nil){return $ifaceNil;}return ag;};DF=function(ag){var $ptr,ag;return((ag.kind&32)>>>0)===0;};DJ.prototype.kind=function(){var $ptr,ag;ag=this.$val;return(((ag&31)>>>0)>>>0);};$ptrType(DJ).prototype.kind=function(){return new DJ(this.$get()).kind();};DI.ptr.prototype.pointer=function(){var $ptr,ag;ag=this;if(!((ag.typ.size===4))||!ag.typ.pointers()){$panic(new $String("can't call pointer on a non-pointer Value"));}if(!((((ag.flag&64)>>>0)===0))){return ag.ptr.$get();}return ag.ptr;};DI.prototype.pointer=function(){return this.$val.pointer();};DM.ptr.prototype.Error=function(){var $ptr,ag;ag=this;if(ag.Kind===0){return"reflect: call of "+ag.Method+" on zero Value";}return"reflect: call of "+ag.Method+" on "+new BN(ag.Kind).String()+" Value";};DM.prototype.Error=function(){return this.$val.Error();};DJ.prototype.mustBe=function(ag){var $ptr,ag,ah;ah=this.$val;if(!((new DJ(ah).kind()===ag))){$panic(new DM.ptr(AU(),new DJ(ah).kind()));}};$ptrType(DJ).prototype.mustBe=function(ag){return new DJ(this.$get()).mustBe(ag);};DJ.prototype.mustBeExported=function(){var $ptr,ag;ag=this.$val;if(ag===0){$panic(new DM.ptr(AU(),0));}if(!((((ag&32)>>>0)===0))){$panic(new $String("reflect: "+AU()+" using value obtained using unexported field"));}};$ptrType(DJ).prototype.mustBeExported=function(){return new DJ(this.$get()).mustBeExported();};DJ.prototype.mustBeAssignable=function(){var $ptr,ag;ag=this.$val;if(ag===0){$panic(new DM.ptr(AU(),0));}if(!((((ag&32)>>>0)===0))){$panic(new $String("reflect: "+AU()+" using value obtained using unexported field"));}if(((ag&128)>>>0)===0){$panic(new $String("reflect: "+AU()+" using unaddressable value"));}};$ptrType(DJ).prototype.mustBeAssignable=function(){return new DJ(this.$get()).mustBeAssignable();};DI.ptr.prototype.Addr=function(){var $ptr,ag;ag=this;if(((ag.flag&128)>>>0)===0){$panic(new $String("reflect.Value.Addr of unaddressable value"));}return new DI.ptr(ag.typ.ptrTo(),ag.ptr,((((ag.flag&32)>>>0))|22)>>>0);};DI.prototype.Addr=function(){return this.$val.Addr();};DI.ptr.prototype.Bool=function(){var $ptr,ag;ag=this;new DJ(ag.flag).mustBe(1);return ag.ptr.$get();};DI.prototype.Bool=function(){return this.$val.Bool();};DI.ptr.prototype.Bytes=function(){var $ptr,ag,ah,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;new DJ(ag.flag).mustBe(23);ah=ag.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}if(!((ah===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.Bytes of non-byte slice"));case 2:return ag.ptr.$get();}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Bytes};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Bytes=function(){return this.$val.Bytes();};DI.ptr.prototype.runes=function(){var $ptr,ag,ah,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;new DJ(ag.flag).mustBe(23);ah=ag.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}if(!((ah===5))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.Bytes of non-rune slice"));case 2:return ag.ptr.$get();}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.runes};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.runes=function(){return this.$val.runes();};DI.ptr.prototype.CanAddr=function(){var $ptr,ag;ag=this;return!((((ag.flag&128)>>>0)===0));};DI.prototype.CanAddr=function(){return this.$val.CanAddr();};DI.ptr.prototype.CanSet=function(){var $ptr,ag;ag=this;return((ag.flag&160)>>>0)===128;};DI.prototype.CanSet=function(){return this.$val.CanSet();};DI.ptr.prototype.Call=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;new DJ(ah.flag).mustBe(19);new DJ(ah.flag).mustBeExported();ai=ah.call("Call",ag);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Call};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Call=function(ag){return this.$val.Call(ag);};DI.ptr.prototype.CallSlice=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;new DJ(ah.flag).mustBe(19);new DJ(ah.flag).mustBeExported();ai=ah.call("CallSlice",ag);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.CallSlice};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.CallSlice=function(ag){return this.$val.CallSlice(ag);};DI.ptr.prototype.Complex=function(){var $ptr,ag,ah,ai,aj;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===15){return(aj=ag.ptr.$get(),new $Complex128(aj.$real,aj.$imag));}else if(ai===16){return ag.ptr.$get();}$panic(new DM.ptr("reflect.Value.Complex",new DJ(ag.flag).kind()));};DI.prototype.Complex=function(){return this.$val.Complex();};DI.ptr.prototype.FieldByIndex=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(ag.$length===1){$s=1;continue;}$s=2;continue;case 1:ai=ah.Field((0>=ag.$length?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+0]));$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;case 2:new DJ(ah.flag).mustBe(25);aj=ag;ak=0;case 4:if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);if(al>0){$s=6;continue;}$s=7;continue;case 6:if(!(ah.Kind()===22)){an=false;$s=10;continue s;}ao=ah.typ.Elem().Kind();$s=11;case 11:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}an=ao===25;case 10:if(an){$s=8;continue;}$s=9;continue;case 8:if(ah.IsNil()){$panic(new $String("reflect: indirection through nil pointer to embedded struct"));}ap=ah.Elem();$s=12;case 12:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}ah=ap;case 9:case 7:aq=ah.Field(am);$s=13;case 13:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ah=aq;ak++;$s=4;continue;case 5:return ah;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.FieldByIndex};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.FieldByIndex=function(ag){return this.$val.FieldByIndex(ag);};DI.ptr.prototype.FieldByName=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;new DJ(ah.flag).mustBe(25);aj=ah.typ.FieldByName(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai=aj;ak=$clone(ai[0],CF);al=ai[1];if(al){$s=2;continue;}$s=3;continue;case 2:am=ah.FieldByIndex(ak.Index);$s=4;case 4:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;case 3:return new DI.ptr(FW.nil,0,0);}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.FieldByName};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.FieldByName=function(ag){return this.$val.FieldByName(ag);};DI.ptr.prototype.FieldByNameFunc=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;aj=ah.typ.FieldByNameFunc(ag);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai=aj;ak=$clone(ai[0],CF);al=ai[1];if(al){$s=2;continue;}$s=3;continue;case 2:am=ah.FieldByIndex(ak.Index);$s=4;case 4:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;case 3:return new DI.ptr(FW.nil,0,0);}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.FieldByNameFunc};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.FieldByNameFunc=function(ag){return this.$val.FieldByNameFunc(ag);};DI.ptr.prototype.Float=function(){var $ptr,ag,ah,ai;ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===13){return ag.ptr.$get();}else if(ai===14){return ag.ptr.$get();}$panic(new DM.ptr("reflect.Value.Float",new DJ(ag.flag).kind()));};DI.prototype.Float=function(){return this.$val.Float();};DI.ptr.prototype.Int=function(){var $ptr,ag,ah,ai,aj;ag=this;ah=new DJ(ag.flag).kind();ai=ag.ptr;aj=ah;if(aj===2){return new $Int64(0,ai.$get());}else if(aj===3){return new $Int64(0,ai.$get());}else if(aj===4){return new $Int64(0,ai.$get());}else if(aj===5){return new $Int64(0,ai.$get());}else if(aj===6){return ai.$get();}$panic(new DM.ptr("reflect.Value.Int",new DJ(ag.flag).kind()));};DI.prototype.Int=function(){return this.$val.Int();};DI.ptr.prototype.CanInterface=function(){var $ptr,ag;ag=this;if(ag.flag===0){$panic(new DM.ptr("reflect.Value.CanInterface",0));}return((ag.flag&32)>>>0)===0;};DI.prototype.CanInterface=function(){return this.$val.CanInterface();};DI.ptr.prototype.Interface=function(){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=$ifaceNil;ah=this;ai=AS(ah,true);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ag=ai;return ag;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Interface};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Interface=function(){return this.$val.Interface();};DI.ptr.prototype.IsValid=function(){var $ptr,ag;ag=this;return!((ag.flag===0));};DI.prototype.IsValid=function(){return this.$val.IsValid();};DI.ptr.prototype.Kind=function(){var $ptr,ag;ag=this;return new DJ(ag.flag).kind();};DI.prototype.Kind=function(){return this.$val.Kind();};DI.ptr.prototype.MapIndex=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ah=this;new DJ(ah.flag).mustBe(21);ai=ah.typ.kindType;aj=ag.assignTo("reflect.Value.MapIndex",ai.key,0);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ag=aj;ak=0;if(!((((ag.flag&64)>>>0)===0))){ak=ag.ptr;}else{ak=(ag.$ptr_ptr||(ag.$ptr_ptr=new HO(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ag)));}al=AH(ah.typ,ah.pointer(),ak);if(al===0){return new DI.ptr(FW.nil,0,0);}am=ai.elem;an=((((ah.flag|ag.flag)>>>0))&32)>>>0;an=(an|((am.Kind()>>>0)))>>>0;if(DF(am)){ao=Z(am);AC(am,ao,al);return new DI.ptr(am,ao,(an|64)>>>0);}else{return new DI.ptr(am,al.$get(),an);}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.MapIndex};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.MapIndex=function(ag){return this.$val.MapIndex(ag);};DI.ptr.prototype.MapKeys=function(){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;new DJ(ag.flag).mustBe(21);ah=ag.typ.kindType;ai=ah.key;aj=(((ag.flag&32)>>>0)|(ai.Kind()>>>0))>>>0;ak=ag.pointer();al=0;if(!(ak===0)){al=AO(ak);}am=AL(ag.typ,ak);an=$makeSlice(GV,al);ao=0;ao=0;case 1:if(!(ao=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+ao]=new DI.ptr(ai,ar,(aj|64)>>>0));}else{((ao<0||ao>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+ao]=new DI.ptr(ai,aq.$get(),aj));}AN(am);ao=ao+(1)>>0;$s=1;continue;case 2:return $subslice(an,0,ao);}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.MapKeys};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.MapKeys=function(){return this.$val.MapKeys();};DI.ptr.prototype.Method=function(ag){var $ptr,ag,ah,ai;ah=this;if(ah.typ===FW.nil){$panic(new DM.ptr("reflect.Value.Method",0));}if(!((((ah.flag&256)>>>0)===0))||(ag>>>0)>=(ah.typ.NumMethod()>>>0)){$panic(new $String("reflect: Method index out of range"));}if((ah.typ.Kind()===20)&&ah.IsNil()){$panic(new $String("reflect: Method on nil interface value"));}ai=(ah.flag&96)>>>0;ai=(ai|(19))>>>0;ai=(ai|(((((ag>>>0)<<9>>>0)|256)>>>0)))>>>0;return new DI.ptr(ah.typ,ah.ptr,ai);};DI.prototype.Method=function(ag){return this.$val.Method(ag);};DI.ptr.prototype.NumMethod=function(){var $ptr,ag;ag=this;if(ag.typ===FW.nil){$panic(new DM.ptr("reflect.Value.NumMethod",0));}if(!((((ag.flag&256)>>>0)===0))){return 0;}return ag.typ.NumMethod();};DI.prototype.NumMethod=function(){return this.$val.NumMethod();};DI.ptr.prototype.MethodByName=function(ag){var $ptr,ag,ah,ai,aj,ak;ah=this;if(ah.typ===FW.nil){$panic(new DM.ptr("reflect.Value.MethodByName",0));}if(!((((ah.flag&256)>>>0)===0))){return new DI.ptr(FW.nil,0,0);}ai=ah.typ.MethodByName(ag);aj=$clone(ai[0],CD);ak=ai[1];if(!ak){return new DI.ptr(FW.nil,0,0);}return ah.Method(aj.Index);};DI.prototype.MethodByName=function(ag){return this.$val.MethodByName(ag);};DI.ptr.prototype.NumField=function(){var $ptr,ag,ah;ag=this;new DJ(ag.flag).mustBe(25);ah=ag.typ.kindType;return ah.fields.$length;};DI.prototype.NumField=function(){return this.$val.NumField();};DI.ptr.prototype.OverflowComplex=function(ag){var $ptr,ag,ah,ai,aj;ah=this;ai=new DJ(ah.flag).kind();aj=ai;if(aj===15){return DW(ag.$real)||DW(ag.$imag);}else if(aj===16){return false;}$panic(new DM.ptr("reflect.Value.OverflowComplex",new DJ(ah.flag).kind()));};DI.prototype.OverflowComplex=function(ag){return this.$val.OverflowComplex(ag);};DI.ptr.prototype.OverflowFloat=function(ag){var $ptr,ag,ah,ai,aj;ah=this;ai=new DJ(ah.flag).kind();aj=ai;if(aj===13){return DW(ag);}else if(aj===14){return false;}$panic(new DM.ptr("reflect.Value.OverflowFloat",new DJ(ah.flag).kind()));};DI.prototype.OverflowFloat=function(ag){return this.$val.OverflowFloat(ag);};DW=function(ag){var $ptr,ag;if(ag<0){ag=-ag;}return 3.4028234663852886e+38>>16<<16)*8>>>0)+(ak<<16>>>16)*8)>>>0);am=$shiftRightInt64(($shiftLeft64(ag,((64-al>>>0)))),((64-al>>>0)));return!((ag.$high===am.$high&&ag.$low===am.$low));}$panic(new DM.ptr("reflect.Value.OverflowInt",new DJ(ah.flag).kind()));};DI.prototype.OverflowInt=function(ag){return this.$val.OverflowInt(ag);};DI.ptr.prototype.OverflowUint=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am;ah=this;ai=new DJ(ah.flag).kind();aj=ai;if(aj===7||aj===12||aj===8||aj===9||aj===10||aj===11){al=(ak=ah.typ.size,(((ak>>>16<<16)*8>>>0)+(ak<<16>>>16)*8)>>>0);am=$shiftRightUint64(($shiftLeft64(ag,((64-al>>>0)))),((64-al>>>0)));return!((ag.$high===am.$high&&ag.$low===am.$low));}$panic(new DM.ptr("reflect.Value.OverflowUint",new DJ(ah.flag).kind()));};DI.prototype.OverflowUint=function(ag){return this.$val.OverflowUint(ag);};DI.ptr.prototype.Recv=function(){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=new DI.ptr(FW.nil,0,0);ah=false;ai=this;new DJ(ai.flag).mustBe(18);new DJ(ai.flag).mustBeExported();ak=ai.recv(false);$s=1;case 1:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}aj=ak;ag=aj[0];ah=aj[1];return[ag,ah];}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Recv};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Recv=function(){return this.$val.Recv();};DI.ptr.prototype.recv=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=new DI.ptr(FW.nil,0,0);ai=false;aj=this;ak=aj.typ.kindType;if(((ak.dir>>0)&1)===0){$panic(new $String("reflect: recv on send-only channel"));}al=ak.elem;ah=new DI.ptr(al,0,(al.Kind()>>>0));am=0;if(DF(al)){am=Z(al);ah.ptr=am;ah.flag=(ah.flag|(64))>>>0;}else{am=(ah.$ptr_ptr||(ah.$ptr_ptr=new HO(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ah)));}ao=BC(aj.typ,aj.pointer(),ag,am);$s=1;case 1:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}an=ao;ap=an[0];ai=an[1];if(!ap){ah=new DI.ptr(FW.nil,0,0);}return[ah,ai];}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.recv};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.recv=function(ag){return this.$val.recv(ag);};DI.ptr.prototype.Send=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ah=this;new DJ(ah.flag).mustBe(18);new DJ(ah.flag).mustBeExported();ai=ah.send(ag,false);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ai;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Send};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Send=function(ag){return this.$val.Send(ag);};DI.ptr.prototype.send=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ai=false;ag=ag;aj=this;ak=aj.typ.kindType;if(((ak.dir>>0)&2)===0){$panic(new $String("reflect: send on recv-only channel"));}new DJ(ag.flag).mustBeExported();al=ag.assignTo("reflect.Value.Send",ak.elem,0);$s=1;case 1:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}ag=al;am=0;if(!((((ag.flag&64)>>>0)===0))){am=ag.ptr;}else{am=(ag.$ptr_ptr||(ag.$ptr_ptr=new HO(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ag)));}an=BD(aj.typ,aj.pointer(),am,ah);$s=2;case 2:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ai=an;return ai;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.send};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.send=function(ag,ah){return this.$val.send(ag,ah);};DI.ptr.prototype.SetBool=function(ag){var $ptr,ag,ah;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(1);ah.ptr.$set(ag);};DI.prototype.SetBool=function(ag){return this.$val.SetBool(ag);};DI.ptr.prototype.SetBytes=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(23);ai=ah.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(!((ai===8))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.SetBytes of non-byte slice"));case 2:ah.ptr.$set(ag);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.SetBytes};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.SetBytes=function(ag){return this.$val.SetBytes(ag);};DI.ptr.prototype.setRunes=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(23);ai=ah.typ.Elem().Kind();$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(!((ai===5))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.Value.setRunes of non-rune slice"));case 2:ah.ptr.$set(ag);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.setRunes};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.setRunes=function(ag){return this.$val.setRunes(ag);};DI.ptr.prototype.SetComplex=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();ai=new DJ(ah.flag).kind();aj=ai;if(aj===15){ah.ptr.$set(new $Complex64(ag.$real,ag.$imag));}else if(aj===16){ah.ptr.$set(ag);}else{$panic(new DM.ptr("reflect.Value.SetComplex",new DJ(ah.flag).kind()));}};DI.prototype.SetComplex=function(ag){return this.$val.SetComplex(ag);};DI.ptr.prototype.SetFloat=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();ai=new DJ(ah.flag).kind();aj=ai;if(aj===13){ah.ptr.$set($fround(ag));}else if(aj===14){ah.ptr.$set(ag);}else{$panic(new DM.ptr("reflect.Value.SetFloat",new DJ(ah.flag).kind()));}};DI.prototype.SetFloat=function(ag){return this.$val.SetFloat(ag);};DI.ptr.prototype.SetInt=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();ai=new DJ(ah.flag).kind();aj=ai;if(aj===2){ah.ptr.$set(((ag.$low+((ag.$high>>31)*4294967296))>>0));}else if(aj===3){ah.ptr.$set(((ag.$low+((ag.$high>>31)*4294967296))<<24>>24));}else if(aj===4){ah.ptr.$set(((ag.$low+((ag.$high>>31)*4294967296))<<16>>16));}else if(aj===5){ah.ptr.$set(((ag.$low+((ag.$high>>31)*4294967296))>>0));}else if(aj===6){ah.ptr.$set(ag);}else{$panic(new DM.ptr("reflect.Value.SetInt",new DJ(ah.flag).kind()));}};DI.prototype.SetInt=function(ag){return this.$val.SetInt(ag);};DI.ptr.prototype.SetMapIndex=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=ah;ag=ag;ai=this;new DJ(ai.flag).mustBe(21);new DJ(ai.flag).mustBeExported();new DJ(ag.flag).mustBeExported();aj=ai.typ.kindType;ak=ag.assignTo("reflect.Value.SetMapIndex",aj.key,0);$s=1;case 1:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}ag=ak;al=0;if(!((((ag.flag&64)>>>0)===0))){al=ag.ptr;}else{al=(ag.$ptr_ptr||(ag.$ptr_ptr=new HO(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ag)));}if(ah.typ===FW.nil){AJ(ai.typ,ai.pointer(),al);return;}new DJ(ah.flag).mustBeExported();am=ah.assignTo("reflect.Value.SetMapIndex",aj.elem,0);$s=2;case 2:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}ah=am;an=0;if(!((((ah.flag&64)>>>0)===0))){an=ah.ptr;}else{an=(ah.$ptr_ptr||(ah.$ptr_ptr=new HO(function(){return this.$target.ptr;},function($v){this.$target.ptr=$v;},ah)));}$r=AI(ai.typ,ai.pointer(),al,an);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.SetMapIndex};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.SetMapIndex=function(ag,ah){return this.$val.SetMapIndex(ag,ah);};DI.ptr.prototype.SetUint=function(ag){var $ptr,ag,ah,ai,aj;ah=this;new DJ(ah.flag).mustBeAssignable();ai=new DJ(ah.flag).kind();aj=ai;if(aj===7){ah.ptr.$set((ag.$low>>>0));}else if(aj===8){ah.ptr.$set((ag.$low<<24>>>24));}else if(aj===9){ah.ptr.$set((ag.$low<<16>>>16));}else if(aj===10){ah.ptr.$set((ag.$low>>>0));}else if(aj===11){ah.ptr.$set(ag);}else if(aj===12){ah.ptr.$set((ag.$low>>>0));}else{$panic(new DM.ptr("reflect.Value.SetUint",new DJ(ah.flag).kind()));}};DI.prototype.SetUint=function(ag){return this.$val.SetUint(ag);};DI.ptr.prototype.SetPointer=function(ag){var $ptr,ag,ah;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(26);ah.ptr.$set(ag);};DI.prototype.SetPointer=function(ag){return this.$val.SetPointer(ag);};DI.ptr.prototype.SetString=function(ag){var $ptr,ag,ah;ah=this;new DJ(ah.flag).mustBeAssignable();new DJ(ah.flag).mustBe(24);ah.ptr.$set(ag);};DI.prototype.SetString=function(ag){return this.$val.SetString(ag);};DI.ptr.prototype.String=function(){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=this;ah=new DJ(ag.flag).kind();ai=ah;if(ai===0){return"";}else if(ai===24){return ag.ptr.$get();}aj=ag.Type().String();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return"<"+aj+" Value>";}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.String};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.String=function(){return this.$val.String();};DI.ptr.prototype.TryRecv=function(){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=new DI.ptr(FW.nil,0,0);ah=false;ai=this;new DJ(ai.flag).mustBe(18);new DJ(ai.flag).mustBeExported();ak=ai.recv(true);$s=1;case 1:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}aj=ak;ag=aj[0];ah=aj[1];return[ag,ah];}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.TryRecv};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.TryRecv=function(){return this.$val.TryRecv();};DI.ptr.prototype.TrySend=function(ag){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ah=this;new DJ(ah.flag).mustBe(18);new DJ(ah.flag).mustBeExported();ai=ah.send(ag,true);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.TrySend};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.TrySend=function(ag){return this.$val.TrySend(ag);};DI.ptr.prototype.Type=function(){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao;ag=this;ah=ag.flag;if(ah===0){$panic(new DM.ptr("reflect.Value.Type",0));}if(((ah&256)>>>0)===0){return ag.typ;}ai=(ag.flag>>0)>>9>>0;if(ag.typ.Kind()===20){aj=ag.typ.kindType;if((ai>>>0)>=(aj.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}al=(ak=aj.methods,((ai<0||ai>=ak.$length)?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+ai]));return al.typ;}am=ag.typ.uncommonType.uncommon();if(am===GP.nil||(ai>>>0)>=(am.methods.$length>>>0)){$panic(new $String("reflect: internal error: invalid method index"));}ao=(an=am.methods,((ai<0||ai>=an.$length)?$throwRuntimeError("index out of range"):an.$array[an.$offset+ai]));return ao.mtyp;};DI.prototype.Type=function(){return this.$val.Type();};DI.ptr.prototype.Uint=function(){var $ptr,ag,ah,ai,aj,ak;ag=this;ah=new DJ(ag.flag).kind();ai=ag.ptr;aj=ah;if(aj===7){return new $Uint64(0,ai.$get());}else if(aj===8){return new $Uint64(0,ai.$get());}else if(aj===9){return new $Uint64(0,ai.$get());}else if(aj===10){return new $Uint64(0,ai.$get());}else if(aj===11){return ai.$get();}else if(aj===12){return(ak=ai.$get(),new $Uint64(0,ak.constructor===Number?ak:1));}$panic(new DM.ptr("reflect.Value.Uint",new DJ(ag.flag).kind()));};DI.prototype.Uint=function(){return this.$val.Uint();};DI.ptr.prototype.UnsafeAddr=function(){var $ptr,ag;ag=this;if(ag.typ===FW.nil){$panic(new DM.ptr("reflect.Value.UnsafeAddr",0));}if(((ag.flag&128)>>>0)===0){$panic(new $String("reflect.Value.UnsafeAddr of unaddressable value"));}return ag.ptr;};DI.prototype.UnsafeAddr=function(){return this.$val.UnsafeAddr();};EB=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(!($interfaceIsEqual(ah,ai))){$s=1;continue;}$s=2;continue;case 1:aj=ah.String();$s=3;case 3:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=ai.String();$s=4;case 4:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}$panic(new $String(ag+": "+aj+" != "+ak));case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:EB};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};EN=function(ag){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=ag.Kind();$s=3;case 3:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}if(!((ah===21))){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("reflect.MakeMap of non-map type"));case 2:ai=AF($assertType(ag,FW));aj=ag.common();$s=4;case 4:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return new DI.ptr(aj,ai,21);}return;}if($f===undefined){$f={$blk:EN};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};$pkg.MakeMap=EN;EP=function(ag){var $ptr,ag,ah,ai,aj,ak,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if($interfaceIsEqual(ag,$ifaceNil)){$panic(new $String("reflect: New(nil)"));}ah=Z($assertType(ag,FW));ai=22;aj=ag.common();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.ptrTo();$s=2;case 2:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}return new DI.ptr(ak,ah,ai);}return;}if($f===undefined){$f={$blk:EP};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.$s=$s;$f.$r=$r;return $f;};$pkg.New=EP;DI.ptr.prototype.assignTo=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,an,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=this;if(!((((aj.flag&256)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ak=AV(ag,aj);$s=3;case 3:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}aj=ak;case 2:if(CM(ah,aj.typ)){$s=4;continue;}if(CL(ah,aj.typ)){$s=5;continue;}$s=6;continue;case 4:aj.typ=ah;al=(aj.flag&224)>>>0;al=(al|((ah.Kind()>>>0)))>>>0;return new DI.ptr(ah,aj.ptr,al);case 5:if(ai===0){ai=Z(ah);}am=AS(aj,false);$s=7;case 7:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}an=am;if(ah.NumMethod()===0){ai.$set(an);}else{AT(ah,an,ai);}return new DI.ptr(ah,ai,84);case 6:$panic(new $String(ag+": value of type "+aj.typ.String()+" is not assignable to type "+ah.String()));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.assignTo};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.assignTo=function(ag,ah,ai){return this.$val.assignTo(ag,ah,ai);};DI.ptr.prototype.Convert=function(ag){var $ptr,ag,ah,ai,aj,ak,al,am,an,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ah=this;if(!((((ah.flag&256)>>>0)===0))){$s=1;continue;}$s=2;continue;case 1:ai=AV("Convert",ah);$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ah=ai;case 2:aj=ag.common();$s=4;case 4:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=ER(aj,ah.typ);$s=5;case 5:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;if(al===$throwNilPointerError){$s=6;continue;}$s=7;continue;case 6:am=ag.String();$s=8;case 8:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}$panic(new $String("reflect.Value.Convert: value of type "+ah.typ.String()+" cannot be converted to type "+am));case 7:an=al(ah,ag);$s=9;case 9:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}return an;}return;}if($f===undefined){$f={$blk:DI.ptr.prototype.Convert};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.$s=$s;$f.$r=$r;return $f;};DI.prototype.Convert=function(ag){return this.$val.Convert(ag);};ER=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ai=ah.Kind();if(ai===2||ai===3||ai===4||ai===5||ai===6){$s=1;continue;}if(ai===7||ai===8||ai===9||ai===10||ai===11||ai===12){$s=2;continue;}if(ai===13||ai===14){$s=3;continue;}if(ai===15||ai===16){$s=4;continue;}if(ai===24){$s=5;continue;}if(ai===23){$s=6;continue;}$s=7;continue;case 1:aj=ag.Kind();if(aj===2||aj===3||aj===4||aj===5||aj===6||aj===7||aj===8||aj===9||aj===10||aj===11||aj===12){return EX;}else if(aj===13||aj===14){return FB;}else if(aj===24){return FF;}$s=7;continue;case 2:ak=ag.Kind();if(ak===2||ak===3||ak===4||ak===5||ak===6||ak===7||ak===8||ak===9||ak===10||ak===11||ak===12){return EY;}else if(ak===13||ak===14){return FC;}else if(ak===24){return FG;}$s=7;continue;case 3:al=ag.Kind();if(al===2||al===3||al===4||al===5||al===6){return EZ;}else if(al===7||al===8||al===9||al===10||al===11||al===12){return FA;}else if(al===13||al===14){return FD;}$s=7;continue;case 4:am=ag.Kind();if(am===15||am===16){return FE;}$s=7;continue;case 5:if(!(ag.Kind()===23)){an=false;$s=10;continue s;}ao=ag.Elem().PkgPath();$s=11;case 11:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}an=ao==="";case 10:if(an){$s=8;continue;}$s=9;continue;case 8:aq=ag.Elem().Kind();$s=12;case 12:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ap=aq;if(ap===8){$s=13;continue;}if(ap===5){$s=14;continue;}$s=15;continue;case 13:return FI;case 14:return FK;case 15:case 9:$s=7;continue;case 6:if(!(ag.Kind()===24)){ar=false;$s=18;continue s;}as=ah.Elem().PkgPath();$s=19;case 19:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}ar=as==="";case 18:if(ar){$s=16;continue;}$s=17;continue;case 16:au=ah.Elem().Kind();$s=20;case 20:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}at=au;if(at===8){$s=21;continue;}if(at===5){$s=22;continue;}$s=23;continue;case 21:return FH;case 22:return FJ;case 23:case 17:case 7:if(CN(ag,ah)){return AP;}if(!((ag.Kind()===22)&&ag.Name()===""&&(ah.Kind()===22)&&ah.Name()==="")){av=false;$s=26;continue s;}aw=ag.Elem().common();$s=27;case 27:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}ax=aw;ay=ah.Elem().common();$s=28;case 28:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=ay;ba=CN(ax,az);$s=29;case 29:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}av=ba;case 26:if(av){$s=24;continue;}$s=25;continue;case 24:return AP;case 25:if(CL(ag,ah)){if(ah.Kind()===20){return FM;}return FL;}return $throwNilPointerError;}return;}if($f===undefined){$f={$blk:ER};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.$s=$s;$f.$r=$r;return $f;};ES=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=ai.common();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj;al=Z(ak);am=ak.size;if(am===4){al.$set($fround(ah));}else if(am===8){al.$set(ah);}return new DI.ptr(ak,al,(((ag|64)>>>0)|(ak.Kind()>>>0))>>>0);}return;}if($f===undefined){$f={$blk:ES};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};ET=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=ai.common();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj;al=Z(ak);am=ak.size;if(am===8){al.$set(new $Complex64(ah.$real,ah.$imag));}else if(am===16){al.$set(ah);}return new DI.ptr(ak,al,(((ag|64)>>>0)|(ak.Kind()>>>0))>>>0);}return;}if($f===undefined){$f={$blk:ET};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};EU=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=EP(ai);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.Elem();$s=2;case 2:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;al.SetString(ah);al.flag=(((al.flag&~128)>>>0)|ag)>>>0;return al;}return;}if($f===undefined){$f={$blk:EU};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};EV=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=EP(ai);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.Elem();$s=2;case 2:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;$r=al.SetBytes(ah);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}al.flag=(((al.flag&~128)>>>0)|ag)>>>0;return al;}return;}if($f===undefined){$f={$blk:EV};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};EW=function(ag,ah,ai){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aj=EP(ai);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.Elem();$s=2;case 2:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=ak;$r=al.setRunes(ah);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}al.flag=(((al.flag&~128)>>>0)|ag)>>>0;return al;}return;}if($f===undefined){$f={$blk:EW};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};EX=function(ag,ah){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;aj=AA((ag.flag&32)>>>0,(ai=ag.Int(),new $Uint64(ai.$high,ai.$low)),ah);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:EX};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};EY=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=AA((ag.flag&32)>>>0,ag.Uint(),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:EY};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};EZ=function(ag,ah){var $ptr,ag,ah,ai,aj,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;aj=AA((ag.flag&32)>>>0,(ai=new $Int64(0,ag.Float()),new $Uint64(ai.$high,ai.$low)),ah);$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;}return;}if($f===undefined){$f={$blk:EZ};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.$s=$s;$f.$r=$r;return $f;};FA=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=AA((ag.flag&32)>>>0,new $Uint64(0,ag.Float()),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FA};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FB=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ES((ag.flag&32)>>>0,$flatten64(ag.Int()),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FB};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FC=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ES((ag.flag&32)>>>0,$flatten64(ag.Uint()),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FC};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FD=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ES((ag.flag&32)>>>0,ag.Float(),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FD};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FE=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ET((ag.flag&32)>>>0,ag.Complex(),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FE};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FF=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=EU((ag.flag&32)>>>0,$encodeRune(ag.Int().$low),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FF};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FG=function(ag,ah){var $ptr,ag,ah,ai,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=EU((ag.flag&32)>>>0,$encodeRune(ag.Uint().$low),ah);$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return ai;}return;}if($f===undefined){$f={$blk:FG};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.$s=$s;$f.$r=$r;return $f;};FH=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=(ag.flag&32)>>>0;aj=ag.Bytes();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=$bytesToString(aj);al=ah;am=EU(ai,ak,al);$s=2;case 2:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;}return;}if($f===undefined){$f={$blk:FH};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};FI=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=(ag.flag&32)>>>0;aj=ag.String();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=new HJ($stringToBytes(aj));al=ah;am=EV(ai,ak,al);$s=2;case 2:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;}return;}if($f===undefined){$f={$blk:FI};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};FJ=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=(ag.flag&32)>>>0;aj=ag.runes();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=$runesToString(aj);al=ah;am=EU(ai,ak,al);$s=2;case 2:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;}return;}if($f===undefined){$f={$blk:FJ};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};FK=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=(ag.flag&32)>>>0;aj=ag.String();$s=1;case 1:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=new HQ($stringToRunes(aj));al=ah;am=EW(ai,ak,al);$s=2;case 2:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}return am;}return;}if($f===undefined){$f={$blk:FK};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.$s=$s;$f.$r=$r;return $f;};FL=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,am,an,ao,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;ai=ah.common();$s=1;case 1:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=Z(ai);$s=2;case 2:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj;al=AS(ag,false);$s=3;case 3:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;an=ah.NumMethod();$s=7;case 7:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}if(an===0){$s=4;continue;}$s=5;continue;case 4:ak.$set(am);$s=6;continue;case 5:AT($assertType(ah,FW),am,ak);case 6:ao=ah.common();$s=8;case 8:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}return new DI.ptr(ao,ak,(((((ag.flag&32)>>>0)|64)>>>0)|20)>>>0);}return;}if($f===undefined){$f={$blk:FL};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.$s=$s;$f.$r=$r;return $f;};FM=function(ag,ah){var $ptr,ag,ah,ai,aj,ak,al,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ag=ag;if(ag.IsNil()){$s=1;continue;}$s=2;continue;case 1:ai=Y(ah);$s=3;case 3:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=ai;aj.flag=(aj.flag|(((ag.flag&32)>>>0)))>>>0;return aj;case 2:ak=ag.Elem();$s=4;case 4:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=FL(ak,ah);$s=5;case 5:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}return al;}return;}if($f===undefined){$f={$blk:FM};}$f.$ptr=$ptr;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.$s=$s;$f.$r=$r;return $f;};BN.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];FW.methods=[{prop:"ptrTo",name:"ptrTo",pkg:"reflect",typ:$funcType([],[FW],false)},{prop:"pointers",name:"pointers",pkg:"reflect",typ:$funcType([],[$Bool],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BN],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FW],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CD],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CD,$Bool],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BS],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BM],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CF],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([HG],[CF],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CF,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HT],[CF,$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BM],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BM],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BM],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BM],[$Bool],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BM],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BM],[$Bool],false)}];GP.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CD],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[GP],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CD,$Bool],false)}];BS.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];HE.methods=[{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CD],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CD,$Bool],false)}];HI.methods=[{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CF],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([HG],[CF],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HT],[CF,$Bool],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CF,$Bool],false)}];CG.methods=[{prop:"Get",name:"Get",pkg:"",typ:$funcType([$String],[$String],false)}];DI.methods=[{prop:"object",name:"object",pkg:"reflect",typ:$funcType([],[GJ],false)},{prop:"call",name:"call",pkg:"reflect",typ:$funcType([$String,GV],[GV],false)},{prop:"Cap",name:"Cap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[DI],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[DI],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[DI],false)},{prop:"InterfaceData",name:"InterfaceData",pkg:"",typ:$funcType([],[HW],false)},{prop:"IsNil",name:"IsNil",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Pointer",name:"Pointer",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([DI],[],false)},{prop:"SetCap",name:"SetCap",pkg:"",typ:$funcType([$Int],[],false)},{prop:"SetLen",name:"SetLen",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([$Int,$Int],[DI],false)},{prop:"Slice3",name:"Slice3",pkg:"",typ:$funcType([$Int,$Int,$Int],[DI],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"pointer",name:"pointer",pkg:"reflect",typ:$funcType([],[$UnsafePointer],false)},{prop:"Addr",name:"Addr",pkg:"",typ:$funcType([],[DI],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[HJ],false)},{prop:"runes",name:"runes",pkg:"reflect",typ:$funcType([],[HQ],false)},{prop:"CanAddr",name:"CanAddr",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CanSet",name:"CanSet",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Call",name:"Call",pkg:"",typ:$funcType([GV],[GV],false)},{prop:"CallSlice",name:"CallSlice",pkg:"",typ:$funcType([GV],[GV],false)},{prop:"Complex",name:"Complex",pkg:"",typ:$funcType([],[$Complex128],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([HG],[DI],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[DI],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HT],[DI],false)},{prop:"Float",name:"Float",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"CanInterface",name:"CanInterface",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Interface",name:"Interface",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"IsValid",name:"IsValid",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BN],false)},{prop:"MapIndex",name:"MapIndex",pkg:"",typ:$funcType([DI],[DI],false)},{prop:"MapKeys",name:"MapKeys",pkg:"",typ:$funcType([],[GV],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[DI],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[DI],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OverflowComplex",name:"OverflowComplex",pkg:"",typ:$funcType([$Complex128],[$Bool],false)},{prop:"OverflowFloat",name:"OverflowFloat",pkg:"",typ:$funcType([$Float64],[$Bool],false)},{prop:"OverflowInt",name:"OverflowInt",pkg:"",typ:$funcType([$Int64],[$Bool],false)},{prop:"OverflowUint",name:"OverflowUint",pkg:"",typ:$funcType([$Uint64],[$Bool],false)},{prop:"Recv",name:"Recv",pkg:"",typ:$funcType([],[DI,$Bool],false)},{prop:"recv",name:"recv",pkg:"reflect",typ:$funcType([$Bool],[DI,$Bool],false)},{prop:"Send",name:"Send",pkg:"",typ:$funcType([DI],[],false)},{prop:"send",name:"send",pkg:"reflect",typ:$funcType([DI,$Bool],[$Bool],false)},{prop:"SetBool",name:"SetBool",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([HJ],[],false)},{prop:"setRunes",name:"setRunes",pkg:"reflect",typ:$funcType([HQ],[],false)},{prop:"SetComplex",name:"SetComplex",pkg:"",typ:$funcType([$Complex128],[],false)},{prop:"SetFloat",name:"SetFloat",pkg:"",typ:$funcType([$Float64],[],false)},{prop:"SetInt",name:"SetInt",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"SetMapIndex",name:"SetMapIndex",pkg:"",typ:$funcType([DI,DI],[],false)},{prop:"SetUint",name:"SetUint",pkg:"",typ:$funcType([$Uint64],[],false)},{prop:"SetPointer",name:"SetPointer",pkg:"",typ:$funcType([$UnsafePointer],[],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"TryRecv",name:"TryRecv",pkg:"",typ:$funcType([],[DI,$Bool],false)},{prop:"TrySend",name:"TrySend",pkg:"",typ:$funcType([DI],[$Bool],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[BM],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"UnsafeAddr",name:"UnsafeAddr",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"assignTo",name:"assignTo",pkg:"reflect",typ:$funcType([$String,FW,$UnsafePointer],[DI],false)},{prop:"Convert",name:"Convert",pkg:"",typ:$funcType([BM],[DI],false)}];DJ.methods=[{prop:"kind",name:"kind",pkg:"reflect",typ:$funcType([],[BN],false)},{prop:"mustBe",name:"mustBe",pkg:"reflect",typ:$funcType([BN],[],false)},{prop:"mustBeExported",name:"mustBeExported",pkg:"reflect",typ:$funcType([],[],false)},{prop:"mustBeAssignable",name:"mustBeAssignable",pkg:"reflect",typ:$funcType([],[],false)}];HX.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];AK.init([{prop:"t",name:"t",pkg:"reflect",typ:BM,tag:""},{prop:"m",name:"m",pkg:"reflect",typ:GJ,tag:""},{prop:"keys",name:"keys",pkg:"reflect",typ:GJ,tag:""},{prop:"i",name:"i",pkg:"reflect",typ:$Int,tag:""}]);BM.init([{prop:"Align",name:"Align",pkg:"",typ:$funcType([],[$Int],false)},{prop:"AssignableTo",name:"AssignableTo",pkg:"",typ:$funcType([BM],[$Bool],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ChanDir",name:"ChanDir",pkg:"",typ:$funcType([],[BS],false)},{prop:"Comparable",name:"Comparable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ConvertibleTo",name:"ConvertibleTo",pkg:"",typ:$funcType([BM],[$Bool],false)},{prop:"Elem",name:"Elem",pkg:"",typ:$funcType([],[BM],false)},{prop:"Field",name:"Field",pkg:"",typ:$funcType([$Int],[CF],false)},{prop:"FieldAlign",name:"FieldAlign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"FieldByIndex",name:"FieldByIndex",pkg:"",typ:$funcType([HG],[CF],false)},{prop:"FieldByName",name:"FieldByName",pkg:"",typ:$funcType([$String],[CF,$Bool],false)},{prop:"FieldByNameFunc",name:"FieldByNameFunc",pkg:"",typ:$funcType([HT],[CF,$Bool],false)},{prop:"Implements",name:"Implements",pkg:"",typ:$funcType([BM],[$Bool],false)},{prop:"In",name:"In",pkg:"",typ:$funcType([$Int],[BM],false)},{prop:"IsVariadic",name:"IsVariadic",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Key",name:"Key",pkg:"",typ:$funcType([],[BM],false)},{prop:"Kind",name:"Kind",pkg:"",typ:$funcType([],[BN],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Method",name:"Method",pkg:"",typ:$funcType([$Int],[CD],false)},{prop:"MethodByName",name:"MethodByName",pkg:"",typ:$funcType([$String],[CD,$Bool],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"NumField",name:"NumField",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumIn",name:"NumIn",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumMethod",name:"NumMethod",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NumOut",name:"NumOut",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Out",name:"Out",pkg:"",typ:$funcType([$Int],[BM],false)},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$funcType([],[$String],false)},{prop:"Size",name:"Size",pkg:"",typ:$funcType([],[$Uintptr],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"common",name:"common",pkg:"reflect",typ:$funcType([],[FW],false)},{prop:"uncommon",name:"uncommon",pkg:"reflect",typ:$funcType([],[GP],false)}]);BO.init([{prop:"size",name:"size",pkg:"reflect",typ:$Uintptr,tag:""},{prop:"ptrdata",name:"ptrdata",pkg:"reflect",typ:$Uintptr,tag:""},{prop:"hash",name:"hash",pkg:"reflect",typ:$Uint32,tag:""},{prop:"_$3",name:"_",pkg:"reflect",typ:$Uint8,tag:""},{prop:"align",name:"align",pkg:"reflect",typ:$Uint8,tag:""},{prop:"fieldAlign",name:"fieldAlign",pkg:"reflect",typ:$Uint8,tag:""},{prop:"kind",name:"kind",pkg:"reflect",typ:$Uint8,tag:""},{prop:"alg",name:"alg",pkg:"reflect",typ:GM,tag:""},{prop:"gcdata",name:"gcdata",pkg:"reflect",typ:GN,tag:""},{prop:"string",name:"string",pkg:"reflect",typ:GO,tag:""},{prop:"uncommonType",name:"",pkg:"reflect",typ:GP,tag:""},{prop:"ptrToThis",name:"ptrToThis",pkg:"reflect",typ:FW,tag:""},{prop:"zero",name:"zero",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BP.init([{prop:"hash",name:"hash",pkg:"reflect",typ:HU,tag:""},{prop:"equal",name:"equal",pkg:"reflect",typ:HV,tag:""}]);BQ.init([{prop:"name",name:"name",pkg:"reflect",typ:GO,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:GO,tag:""},{prop:"mtyp",name:"mtyp",pkg:"reflect",typ:FW,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FW,tag:""},{prop:"ifn",name:"ifn",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"tfn",name:"tfn",pkg:"reflect",typ:$UnsafePointer,tag:""}]);BR.init([{prop:"name",name:"name",pkg:"reflect",typ:GO,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:GO,tag:""},{prop:"methods",name:"methods",pkg:"reflect",typ:GQ,tag:""}]);BT.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"array\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FW,tag:""},{prop:"slice",name:"slice",pkg:"reflect",typ:FW,tag:""},{prop:"len",name:"len",pkg:"reflect",typ:$Uintptr,tag:""}]);BU.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"chan\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FW,tag:""},{prop:"dir",name:"dir",pkg:"reflect",typ:$Uintptr,tag:""}]);BV.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"func\""},{prop:"dotdotdot",name:"dotdotdot",pkg:"reflect",typ:$Bool,tag:""},{prop:"in$2",name:"in",pkg:"reflect",typ:GC,tag:""},{prop:"out",name:"out",pkg:"reflect",typ:GC,tag:""}]);BW.init([{prop:"name",name:"name",pkg:"reflect",typ:GO,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:GO,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FW,tag:""}]);BX.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"interface\""},{prop:"methods",name:"methods",pkg:"reflect",typ:GR,tag:""}]);BY.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"map\""},{prop:"key",name:"key",pkg:"reflect",typ:FW,tag:""},{prop:"elem",name:"elem",pkg:"reflect",typ:FW,tag:""},{prop:"bucket",name:"bucket",pkg:"reflect",typ:FW,tag:""},{prop:"hmap",name:"hmap",pkg:"reflect",typ:FW,tag:""},{prop:"keysize",name:"keysize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectkey",name:"indirectkey",pkg:"reflect",typ:$Uint8,tag:""},{prop:"valuesize",name:"valuesize",pkg:"reflect",typ:$Uint8,tag:""},{prop:"indirectvalue",name:"indirectvalue",pkg:"reflect",typ:$Uint8,tag:""},{prop:"bucketsize",name:"bucketsize",pkg:"reflect",typ:$Uint16,tag:""},{prop:"reflexivekey",name:"reflexivekey",pkg:"reflect",typ:$Bool,tag:""}]);BZ.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"ptr\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FW,tag:""}]);CA.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"slice\""},{prop:"elem",name:"elem",pkg:"reflect",typ:FW,tag:""}]);CB.init([{prop:"name",name:"name",pkg:"reflect",typ:GO,tag:""},{prop:"pkgPath",name:"pkgPath",pkg:"reflect",typ:GO,tag:""},{prop:"typ",name:"typ",pkg:"reflect",typ:FW,tag:""},{prop:"tag",name:"tag",pkg:"reflect",typ:GO,tag:""},{prop:"offset",name:"offset",pkg:"reflect",typ:$Uintptr,tag:""}]);CC.init([{prop:"rtype",name:"",pkg:"reflect",typ:BO,tag:"reflect:\"struct\""},{prop:"fields",name:"fields",pkg:"reflect",typ:GS,tag:""}]);CD.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BM,tag:""},{prop:"Func",name:"Func",pkg:"",typ:DI,tag:""},{prop:"Index",name:"Index",pkg:"",typ:$Int,tag:""}]);CF.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"PkgPath",name:"PkgPath",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:BM,tag:""},{prop:"Tag",name:"Tag",pkg:"",typ:CG,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Uintptr,tag:""},{prop:"Index",name:"Index",pkg:"",typ:HG,tag:""},{prop:"Anonymous",name:"Anonymous",pkg:"",typ:$Bool,tag:""}]);CH.init([{prop:"typ",name:"typ",pkg:"reflect",typ:HI,tag:""},{prop:"index",name:"index",pkg:"reflect",typ:HG,tag:""}]);DI.init([{prop:"typ",name:"typ",pkg:"reflect",typ:FW,tag:""},{prop:"ptr",name:"ptr",pkg:"reflect",typ:$UnsafePointer,tag:""},{prop:"flag",name:"",pkg:"reflect",typ:DJ,tag:""}]);DM.init([{prop:"Method",name:"Method",pkg:"",typ:$String,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:BN,tag:""}]);DO.init([{prop:"itab",name:"itab",pkg:"reflect",typ:GZ,tag:""},{prop:"word",name:"word",pkg:"reflect",typ:$UnsafePointer,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}G=false;L={};AW=$assertType($internalize($call,$emptyInterface),GK);BB=$assertType($internalize($select,$emptyInterface),GK);CE=new GL(["invalid","bool","int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","uintptr","float32","float64","complex64","complex128","array","chan","func","interface","map","ptr","slice","string","struct","unsafe.Pointer"]);AX=J($jsObjectPtr);DV=$assertType(R(new $Uint8(0)),FW);$r=H();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["fmt"]=(function(){var $pkg={},$init,D,E,A,F,G,B,H,C,L,M,AF,AG,AH,AI,AJ,AK,BF,BG,BH,BL,BS,BT,BU,BY,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,I,J,N,O,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AL,BA,BB,BC,BV,BZ,CB,CC,a,b,K,P,AM,AN,AP,AQ,AR,AT,AU,AW,AX,AY,AZ,BD,BE,BM,BP,BW,BX,CA,CD,CE,CF;D=$packages["errors"];E=$packages["io"];A=$packages["math"];F=$packages["os"];G=$packages["reflect"];B=$packages["strconv"];H=$packages["sync"];C=$packages["unicode/utf8"];L=$pkg.fmtFlags=$newType(0,$kindStruct,"fmt.fmtFlags","fmtFlags","fmt",function(widPresent_,precPresent_,minus_,plus_,sharp_,space_,unicode_,uniQuote_,zero_,plusV_,sharpV_){this.$val=this;if(arguments.length===0){this.widPresent=false;this.precPresent=false;this.minus=false;this.plus=false;this.sharp=false;this.space=false;this.unicode=false;this.uniQuote=false;this.zero=false;this.plusV=false;this.sharpV=false;return;}this.widPresent=widPresent_;this.precPresent=precPresent_;this.minus=minus_;this.plus=plus_;this.sharp=sharp_;this.space=space_;this.unicode=unicode_;this.uniQuote=uniQuote_;this.zero=zero_;this.plusV=plusV_;this.sharpV=sharpV_;});M=$pkg.fmt=$newType(0,$kindStruct,"fmt.fmt","fmt","fmt",function(intbuf_,buf_,wid_,prec_,fmtFlags_){this.$val=this;if(arguments.length===0){this.intbuf=CK.zero();this.buf=CL.nil;this.wid=0;this.prec=0;this.fmtFlags=new L.ptr(false,false,false,false,false,false,false,false,false,false,false);return;}this.intbuf=intbuf_;this.buf=buf_;this.wid=wid_;this.prec=prec_;this.fmtFlags=fmtFlags_;});AF=$pkg.State=$newType(8,$kindInterface,"fmt.State","State","fmt",null);AG=$pkg.Formatter=$newType(8,$kindInterface,"fmt.Formatter","Formatter","fmt",null);AH=$pkg.Stringer=$newType(8,$kindInterface,"fmt.Stringer","Stringer","fmt",null);AI=$pkg.GoStringer=$newType(8,$kindInterface,"fmt.GoStringer","GoStringer","fmt",null);AJ=$pkg.buffer=$newType(12,$kindSlice,"fmt.buffer","buffer","fmt",null);AK=$pkg.pp=$newType(0,$kindStruct,"fmt.pp","pp","fmt",function(n_,panicking_,erroring_,buf_,arg_,value_,reordered_,goodArgNum_,runeBuf_,fmt_){this.$val=this;if(arguments.length===0){this.n=0;this.panicking=false;this.erroring=false;this.buf=AJ.nil;this.arg=$ifaceNil;this.value=new G.Value.ptr(CI.nil,0,0);this.reordered=false;this.goodArgNum=false;this.runeBuf=CJ.zero();this.fmt=new M.ptr(CK.zero(),CL.nil,0,0,new L.ptr(false,false,false,false,false,false,false,false,false,false,false));return;}this.n=n_;this.panicking=panicking_;this.erroring=erroring_;this.buf=buf_;this.arg=arg_;this.value=value_;this.reordered=reordered_;this.goodArgNum=goodArgNum_;this.runeBuf=runeBuf_;this.fmt=fmt_;});BF=$pkg.runeUnreader=$newType(8,$kindInterface,"fmt.runeUnreader","runeUnreader","fmt",null);BG=$pkg.ScanState=$newType(8,$kindInterface,"fmt.ScanState","ScanState","fmt",null);BH=$pkg.Scanner=$newType(8,$kindInterface,"fmt.Scanner","Scanner","fmt",null);BL=$pkg.stringReader=$newType(8,$kindString,"fmt.stringReader","stringReader","fmt",null);BS=$pkg.scanError=$newType(0,$kindStruct,"fmt.scanError","scanError","fmt",function(err_){this.$val=this;if(arguments.length===0){this.err=$ifaceNil;return;}this.err=err_;});BT=$pkg.ss=$newType(0,$kindStruct,"fmt.ss","ss","fmt",function(rr_,buf_,peekRune_,prevRune_,count_,atEOF_,ssave_){this.$val=this;if(arguments.length===0){this.rr=$ifaceNil;this.buf=AJ.nil;this.peekRune=0;this.prevRune=0;this.count=0;this.atEOF=false;this.ssave=new BU.ptr(false,false,false,0,0,0);return;}this.rr=rr_;this.buf=buf_;this.peekRune=peekRune_;this.prevRune=prevRune_;this.count=count_;this.atEOF=atEOF_;this.ssave=ssave_;});BU=$pkg.ssave=$newType(0,$kindStruct,"fmt.ssave","ssave","fmt",function(validSave_,nlIsEnd_,nlIsSpace_,argLimit_,limit_,maxWid_){this.$val=this;if(arguments.length===0){this.validSave=false;this.nlIsEnd=false;this.nlIsSpace=false;this.argLimit=0;this.limit=0;this.maxWid=0;return;}this.validSave=validSave_;this.nlIsEnd=nlIsEnd_;this.nlIsSpace=nlIsSpace_;this.argLimit=argLimit_;this.limit=limit_;this.maxWid=maxWid_;});BY=$pkg.readRune=$newType(0,$kindStruct,"fmt.readRune","readRune","fmt",function(reader_,buf_,pending_,pendBuf_){this.$val=this;if(arguments.length===0){this.reader=$ifaceNil;this.buf=CJ.zero();this.pending=0;this.pendBuf=CJ.zero();return;}this.reader=reader_;this.buf=buf_;this.pending=pending_;this.pendBuf=pendBuf_;});CG=$sliceType($Uint8);CH=$sliceType($emptyInterface);CI=$ptrType(G.rtype);CJ=$arrayType($Uint8,4);CK=$arrayType($Uint8,65);CL=$ptrType(AJ);CM=$arrayType($Uint16,2);CN=$sliceType(CM);CO=$ptrType(AK);CP=$ptrType(BL);CQ=$ptrType($String);CR=$ptrType(BT);CS=$ptrType(B.NumError);CT=$ptrType($Bool);CU=$ptrType($Complex64);CV=$ptrType($Complex128);CW=$ptrType($Int);CX=$ptrType($Int8);CY=$ptrType($Int16);CZ=$ptrType($Int32);DA=$ptrType($Int64);DB=$ptrType($Uint);DC=$ptrType($Uint8);DD=$ptrType($Uint16);DE=$ptrType($Uint32);DF=$ptrType($Uint64);DG=$ptrType($Uintptr);DH=$ptrType($Float32);DI=$ptrType($Float64);DJ=$ptrType(CG);DK=$ptrType($error);DL=$ptrType(M);DM=$funcType([$Int32],[$Bool],false);DN=$ptrType(BY);K=function(){var $ptr,c;c=0;while(true){if(!(c<65)){break;}((c<0||c>=I.$length)?$throwRuntimeError("index out of range"):I.$array[I.$offset+c]=48);((c<0||c>=J.$length)?$throwRuntimeError("index out of range"):J.$array[J.$offset+c]=32);c=c+(1)>>0;}};M.ptr.prototype.clearflags=function(){var $ptr,c;c=this;L.copy(c.fmtFlags,new L.ptr(false,false,false,false,false,false,false,false,false,false,false));};M.prototype.clearflags=function(){return this.$val.clearflags();};M.ptr.prototype.init=function(c){var $ptr,c,d;d=this;d.buf=c;d.clearflags();};M.prototype.init=function(c){return this.$val.init(c);};M.ptr.prototype.computePadding=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;d=CG.nil;e=0;f=0;g=this;h=!g.fmtFlags.minus;i=g.wid;if(i<0){h=false;i=-i;}i=i-(c)>>0;if(i>0){if(h&&g.fmtFlags.zero){j=I;k=i;l=0;d=j;e=k;f=l;return[d,e,f];}if(h){m=J;n=i;o=0;d=m;e=n;f=o;return[d,e,f];}else{p=J;q=0;r=i;d=p;e=q;f=r;return[d,e,f];}}return[d,e,f];};M.prototype.computePadding=function(c){return this.$val.computePadding(c);};M.ptr.prototype.writePadding=function(c,d){var $ptr,c,d,e,f;e=this;while(true){if(!(c>0)){break;}f=c;if(f>65){f=65;}e.buf.Write($subslice(d,0,f));c=c-(f)>>0;}};M.prototype.writePadding=function(c,d){return this.$val.writePadding(c,d);};M.ptr.prototype.pad=function(c){var $ptr,c,d,e,f,g,h;d=this;if(!d.fmtFlags.widPresent||(d.wid===0)){d.buf.Write(c);return;}e=d.computePadding(C.RuneCount(c));f=e[0];g=e[1];h=e[2];if(g>0){d.writePadding(g,f);}d.buf.Write(c);if(h>0){d.writePadding(h,f);}};M.prototype.pad=function(c){return this.$val.pad(c);};M.ptr.prototype.padString=function(c){var $ptr,c,d,e,f,g,h;d=this;if(!d.fmtFlags.widPresent||(d.wid===0)){d.buf.WriteString(c);return;}e=d.computePadding(C.RuneCountInString(c));f=e[0];g=e[1];h=e[2];if(g>0){d.writePadding(g,f);}d.buf.WriteString(c);if(h>0){d.writePadding(h,f);}};M.prototype.padString=function(c){return this.$val.padString(c);};M.ptr.prototype.fmt_boolean=function(c){var $ptr,c,d;d=this;if(c){d.pad(N);}else{d.pad(O);}};M.prototype.fmt_boolean=function(c){return this.$val.fmt_boolean(c);};M.ptr.prototype.integer=function(c,d,e,f){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;g=this;if(g.fmtFlags.precPresent&&(g.prec===0)&&(c.$high===0&&c.$low===0)){return;}h=e&&(c.$high<0||(c.$high===0&&c.$low<0));if(h){c=new $Int64(-c.$high,-c.$low);}i=$subslice(new CG(g.intbuf),0);if(g.fmtFlags.widPresent||g.fmtFlags.precPresent||g.fmtFlags.plus||g.fmtFlags.space){j=g.wid+g.prec>>0;if((d.$high===0&&d.$low===16)&&g.fmtFlags.sharp){j=j+(2)>>0;}if(g.fmtFlags.unicode){j=j+(2)>>0;if(g.fmtFlags.uniQuote){j=j+(7)>>0;}}if(h||g.fmtFlags.plus||g.fmtFlags.space){j=j+(1)>>0;}if(j>65){i=$makeSlice(CG,j);}}k=0;if(g.fmtFlags.precPresent){k=g.prec;g.fmtFlags.zero=false;}else if(g.fmtFlags.zero&&g.fmtFlags.widPresent&&!g.fmtFlags.minus&&g.wid>0){k=g.wid;if(h||g.fmtFlags.plus||g.fmtFlags.space){k=k-(1)>>0;}}l=i.$length;m=new $Uint64(c.$high,c.$low);n=d;if((n.$high===0&&n.$low===10)){while(true){if(!((m.$high>0||(m.$high===0&&m.$low>=10)))){break;}l=l-(1)>>0;o=$div64(m,new $Uint64(0,10),false);((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=((p=new $Uint64(0+m.$high,48+m.$low),q=$mul64(o,new $Uint64(0,10)),new $Uint64(p.$high-q.$high,p.$low-q.$low)).$low<<24>>>24));m=o;}}else if((n.$high===0&&n.$low===16)){while(true){if(!((m.$high>0||(m.$high===0&&m.$low>=16)))){break;}l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=f.charCodeAt($flatten64(new $Uint64(m.$high&0,(m.$low&15)>>>0))));m=$shiftRightUint64(m,(4));}}else if((n.$high===0&&n.$low===8)){while(true){if(!((m.$high>0||(m.$high===0&&m.$low>=8)))){break;}l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=((r=new $Uint64(m.$high&0,(m.$low&7)>>>0),new $Uint64(0+r.$high,48+r.$low)).$low<<24>>>24));m=$shiftRightUint64(m,(3));}}else if((n.$high===0&&n.$low===2)){while(true){if(!((m.$high>0||(m.$high===0&&m.$low>=2)))){break;}l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=((s=new $Uint64(m.$high&0,(m.$low&1)>>>0),new $Uint64(0+s.$high,48+s.$low)).$low<<24>>>24));m=$shiftRightUint64(m,(1));}}else{$panic(new $String("fmt: unknown base; can't happen"));}l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=f.charCodeAt($flatten64(m)));while(true){if(!(l>0&&k>(i.$length-l>>0))){break;}l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=48);}if(g.fmtFlags.sharp){t=d;if((t.$high===0&&t.$low===8)){if(!((((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l])===48))){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=48);}}else if((t.$high===0&&t.$low===16)){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=((120+f.charCodeAt(10)<<24>>>24)-97<<24>>>24));l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=48);}}if(g.fmtFlags.unicode){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=43);l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=85);}if(h){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=45);}else if(g.fmtFlags.plus){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=43);}else if(g.fmtFlags.space){l=l-(1)>>0;((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l]=32);}if(g.fmtFlags.unicode&&g.fmtFlags.uniQuote&&(c.$high>0||(c.$high===0&&c.$low>=0))&&(c.$high<0||(c.$high===0&&c.$low<=1114111))&&B.IsPrint(((c.$low+((c.$high>>31)*4294967296))>>0))){u=C.RuneLen(((c.$low+((c.$high>>31)*4294967296))>>0));v=(2+u>>0)+1>>0;$copySlice($subslice(i,(l-v>>0)),$subslice(i,l));l=l-(v)>>0;w=i.$length-v>>0;((w<0||w>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+w]=32);w=w+(1)>>0;((w<0||w>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+w]=39);w=w+(1)>>0;C.EncodeRune($subslice(i,w),((c.$low+((c.$high>>31)*4294967296))>>0));w=w+(u)>>0;((w<0||w>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+w]=39);}g.pad($subslice(i,l));};M.prototype.integer=function(c,d,e,f){return this.$val.integer(c,d,e,f);};M.ptr.prototype.truncate=function(c){var $ptr,c,d,e,f,g,h,i;d=this;if(d.fmtFlags.precPresent&&d.prec>0;g+=h[1];}}return c;};M.prototype.truncate=function(c){return this.$val.truncate(c);};M.ptr.prototype.fmt_s=function(c){var $ptr,c,d;d=this;c=d.truncate(c);d.padString(c);};M.prototype.fmt_s=function(c){return this.$val.fmt_s(c);};M.ptr.prototype.fmt_sbx=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k;f=this;g=d.$length;if(d===CG.nil){g=c.length;}h=(e.charCodeAt(10)-97<<24>>>24)+120<<24>>>24;i=CG.nil;j=0;while(true){if(!(j0&&f.fmtFlags.space){i=$append(i,32);}if(f.fmtFlags.sharp&&(f.fmtFlags.space||(j===0))){i=$append(i,48,h);}k=0;if(d===CG.nil){k=c.charCodeAt(j);}else{k=((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j]);}i=$append(i,e.charCodeAt((k>>>4<<24>>>24)),e.charCodeAt(((k&15)>>>0)));j=j+(1)>>0;}f.pad(i);};M.prototype.fmt_sbx=function(c,d,e){return this.$val.fmt_sbx(c,d,e);};M.ptr.prototype.fmt_sx=function(c,d){var $ptr,c,d,e;e=this;if(e.fmtFlags.precPresent&&e.prec>31)*4294967296))>>0));}else{e=B.AppendQuoteRune($subslice(new CG(d.intbuf),0,0),((c.$low+((c.$high>>31)*4294967296))>>0));}d.pad(e);};M.prototype.fmt_qc=function(c){return this.$val.fmt_qc(c);};P=function(c,d){var $ptr,c,d;if(c.fmtFlags.precPresent){return c.prec;}return d;};M.ptr.prototype.formatFloat=function(c,d,e,f){var $ptr,c,d,e,f,g,h,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);g=this;h=B.AppendFloat($subslice(new CG(g.intbuf),0,1),c,d,e,f);if(((1>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+1])===45)||((1>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+1])===43)){h=$subslice(h,1);}else{(0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]=43);}if(A.IsInf(c,0)){if(g.fmtFlags.zero){$deferred.push([(function(){var $ptr;g.fmtFlags.zero=true;}),[]]);g.fmtFlags.zero=false;}}if(g.fmtFlags.zero&&g.fmtFlags.widPresent&&g.wid>h.$length){if(g.fmtFlags.space&&c>=0){g.buf.WriteByte(32);g.wid=g.wid-(1)>>0;}else if(g.fmtFlags.plus||c<0){g.buf.WriteByte((0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]));g.wid=g.wid-(1)>>0;}g.pad($subslice(h,1));return;}if(g.fmtFlags.space&&((0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0])===43)){(0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]=32);g.pad(h);return;}if(g.fmtFlags.plus||((0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0])===45)||A.IsInf(c,0)){g.pad(h);return;}g.pad($subslice(h,1));}catch(err){$err=err;}finally{$callDeferred($deferred,$err);}};M.prototype.formatFloat=function(c,d,e,f){return this.$val.formatFloat(c,d,e,f);};M.ptr.prototype.fmt_e64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,101,P(d,6),64);};M.prototype.fmt_e64=function(c){return this.$val.fmt_e64(c);};M.ptr.prototype.fmt_E64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,69,P(d,6),64);};M.prototype.fmt_E64=function(c){return this.$val.fmt_E64(c);};M.ptr.prototype.fmt_f64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,102,P(d,6),64);};M.prototype.fmt_f64=function(c){return this.$val.fmt_f64(c);};M.ptr.prototype.fmt_g64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,103,P(d,-1),64);};M.prototype.fmt_g64=function(c){return this.$val.fmt_g64(c);};M.ptr.prototype.fmt_G64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,71,P(d,-1),64);};M.prototype.fmt_G64=function(c){return this.$val.fmt_G64(c);};M.ptr.prototype.fmt_fb64=function(c){var $ptr,c,d;d=this;d.formatFloat(c,98,0,64);};M.prototype.fmt_fb64=function(c){return this.$val.fmt_fb64(c);};M.ptr.prototype.fmt_e32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,101,P(d,6),32);};M.prototype.fmt_e32=function(c){return this.$val.fmt_e32(c);};M.ptr.prototype.fmt_E32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,69,P(d,6),32);};M.prototype.fmt_E32=function(c){return this.$val.fmt_E32(c);};M.ptr.prototype.fmt_f32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,102,P(d,6),32);};M.prototype.fmt_f32=function(c){return this.$val.fmt_f32(c);};M.ptr.prototype.fmt_g32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,103,P(d,-1),32);};M.prototype.fmt_g32=function(c){return this.$val.fmt_g32(c);};M.ptr.prototype.fmt_G32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,71,P(d,-1),32);};M.prototype.fmt_G32=function(c){return this.$val.fmt_G32(c);};M.ptr.prototype.fmt_fb32=function(c){var $ptr,c,d;d=this;d.formatFloat(c,98,0,32);};M.prototype.fmt_fb32=function(c){return this.$val.fmt_fb32(c);};M.ptr.prototype.fmt_c64=function(c,d){var $ptr,c,d,e;e=this;e.fmt_complex(c.$real,c.$imag,32,d);};M.prototype.fmt_c64=function(c,d){return this.$val.fmt_c64(c,d);};M.ptr.prototype.fmt_c128=function(c,d){var $ptr,c,d,e;e=this;e.fmt_complex(c.$real,c.$imag,64,d);};M.prototype.fmt_c128=function(c,d){return this.$val.fmt_c128(c,d);};M.ptr.prototype.fmt_complex=function(c,d,e,f){var $ptr,c,d,e,f,g,h,i,j,k,l;g=this;g.buf.WriteByte(40);h=g.fmtFlags.plus;i=g.fmtFlags.space;j=g.wid;k=0;while(true){l=f;if(l===98){g.formatFloat(c,98,0,e);}else if(l===101){g.formatFloat(c,101,P(g,6),e);}else if(l===69){g.formatFloat(c,69,P(g,6),e);}else if(l===102||l===70){g.formatFloat(c,102,P(g,6),e);}else if(l===103){g.formatFloat(c,103,P(g,-1),e);}else if(l===71){g.formatFloat(c,71,P(g,-1),e);}if(!((k===0))){break;}g.fmtFlags.plus=true;g.fmtFlags.space=false;g.wid=j;c=d;k=k+(1)>>0;}g.fmtFlags.space=i;g.fmtFlags.plus=h;g.wid=j;g.buf.Write(AA);};M.prototype.fmt_complex=function(c,d,e,f){return this.$val.fmt_complex(c,d,e,f);};$ptrType(AJ).prototype.Write=function(c){var $ptr,c,d,e,f,g,h;d=0;e=$ifaceNil;f=this;f.$set($appendSlice(f.$get(),c));g=c.$length;h=$ifaceNil;d=g;e=h;return[d,e];};$ptrType(AJ).prototype.WriteString=function(c){var $ptr,c,d,e,f,g,h;d=0;e=$ifaceNil;f=this;f.$set($appendSlice(f.$get(),c));g=c.length;h=$ifaceNil;d=g;e=h;return[d,e];};$ptrType(AJ).prototype.WriteByte=function(c){var $ptr,c,d;d=this;d.$set($append(d.$get(),c));return $ifaceNil;};$ptrType(AJ).prototype.WriteRune=function(c){var $ptr,c,d,e,f,g,h;d=this;if(c<128){d.$set($append(d.$get(),(c<<24>>>24)));return $ifaceNil;}e=d.$get();f=e.$length;while(true){if(!((f+4>>0)>e.$capacity)){break;}e=$append(e,0);}h=C.EncodeRune((g=$subslice(e,f,(f+4>>0)),$subslice(new CG(g.$array),g.$offset,g.$offset+g.$length)),c);d.$set($subslice(e,0,(f+h>>0)));return $ifaceNil;};AM=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=AL.Get();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=$assertType(c,CO);d.panicking=false;d.erroring=false;d.fmt.init((d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))));return d;}return;}if($f===undefined){$f={$blk:AM};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AK.ptr.prototype.free=function(){var $ptr,c;c=this;if(c.buf.$capacity>1024){return;}c.buf=$subslice(c.buf,0,0);c.arg=$ifaceNil;c.value=new G.Value.ptr(CI.nil,0,0);AL.Put(c);};AK.prototype.free=function(){return this.$val.free();};AK.ptr.prototype.Width=function(){var $ptr,c,d,e,f,g;c=0;d=false;e=this;f=e.fmt.wid;g=e.fmt.fmtFlags.widPresent;c=f;d=g;return[c,d];};AK.prototype.Width=function(){return this.$val.Width();};AK.ptr.prototype.Precision=function(){var $ptr,c,d,e,f,g;c=0;d=false;e=this;f=e.fmt.prec;g=e.fmt.fmtFlags.precPresent;c=f;d=g;return[c,d];};AK.prototype.Precision=function(){return this.$val.Precision();};AK.ptr.prototype.Flag=function(c){var $ptr,c,d,e;d=this;e=c;if(e===45){return d.fmt.fmtFlags.minus;}else if(e===43){return d.fmt.fmtFlags.plus;}else if(e===35){return d.fmt.fmtFlags.sharp;}else if(e===32){return d.fmt.fmtFlags.space;}else if(e===48){return d.fmt.fmtFlags.zero;}return false;};AK.prototype.Flag=function(c){return this.$val.Flag(c);};AK.ptr.prototype.add=function(c){var $ptr,c,d;d=this;(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteRune(c);};AK.prototype.add=function(c){return this.$val.add(c);};AK.ptr.prototype.Write=function(c){var $ptr,c,d,e,f,g;d=0;e=$ifaceNil;f=this;g=(f.$ptr_buf||(f.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},f))).Write(c);d=g[0];e=g[1];return[d,e];};AK.prototype.Write=function(c){return this.$val.Write(c);};AN=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=0;g=$ifaceNil;h=AM();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;$r=i.doPrintf(d,e);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=c.Write((k=i.buf,$subslice(new CG(k.$array),k.$offset,k.$offset+k.$length)));$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}j=l;f=j[0];g=j[1];i.free();return[f,g];}return;}if($f===undefined){$f={$blk:AN};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fprintf=AN;AP=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=AM();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;$r=f.doPrintf(c,d);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=$bytesToString(f.buf);f.free();return g;}return;}if($f===undefined){$f={$blk:AP};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sprintf=AP;AQ=function(c,d){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=AP(c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=D.New(e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AQ};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Errorf=AQ;AR=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=0;f=$ifaceNil;g=AM();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$r=h.doPrint(d,false,false);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=c.Write((j=h.buf,$subslice(new CG(j.$array),j.$offset,j.$offset+j.$length)));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}i=k;e=i[0];f=i[1];h.free();return[e,f];}return;}if($f===undefined){$f={$blk:AR};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fprint=AR;AT=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=AM();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$r=e.doPrint(c,false,false);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$bytesToString(e.buf);e.free();return f;}return;}if($f===undefined){$f={$blk:AT};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sprint=AT;AU=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=0;f=$ifaceNil;g=AM();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;$r=h.doPrint(d,true,true);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=c.Write((j=h.buf,$subslice(new CG(j.$array),j.$offset,j.$offset+j.$length)));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}i=k;e=i[0];f=i[1];h.free();return[e,f];}return;}if($f===undefined){$f={$blk:AU};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fprintln=AU;AW=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=AM();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;$r=e.doPrint(c,true,true);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=$bytesToString(e.buf);e.free();return f;}return;}if($f===undefined){$f={$blk:AW};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sprintln=AW;AX=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;e=c.Field(d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if((f.Kind()===20)&&!f.IsNil()){$s=2;continue;}$s=3;continue;case 2:g=f.Elem();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 3:return f;}return;}if($f===undefined){$f={$blk:AX};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AY=function(c){var $ptr,c;return c>1000000||c<-1000000;};AZ=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n;f=0;g=false;h=0;if(d>=e){i=0;j=false;k=e;f=i;g=j;h=k;return[f,g,h];}h=d;while(true){if(!(h>0)+((c.charCodeAt(h)-48<<24>>>24)>>0)>>0;g=true;h=h+(1)>>0;}return[f,g,h];};AK.ptr.prototype.unknownType=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;if(!c.IsValid()){(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).Write(R);return;}(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteByte(63);e=c.Type().String();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteString(e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteByte(63);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.unknownType};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.unknownType=function(c){return this.$val.unknownType(c);};AK.ptr.prototype.badVerb=function(c){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;d.erroring=true;d.add(37);d.add(33);d.add(c);d.add(40);if(!($interfaceIsEqual(d.arg,$ifaceNil))){$s=1;continue;}if(d.value.IsValid()){$s=2;continue;}$s=3;continue;case 1:e=G.TypeOf(d.arg).String();$s=5;case 5:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteString(e);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;d.add(61);g=d.printArg(d.arg,118,0);$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=4;continue;case 2:h=d.value.Type().String();$s=8;case 8:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).WriteString(h);$s=9;case 9:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;d.add(61);j=d.printValue(d.value,118,0);$s=10;case 10:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;$s=4;continue;case 3:(d.$ptr_buf||(d.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},d))).Write(R);case 4:d.add(41);d.erroring=false;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.badVerb};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.badVerb=function(c){return this.$val.badVerb(c);};AK.ptr.prototype.fmtBool=function(c,d){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=d;if(f===116||f===118){$s=1;continue;}$s=2;continue;case 1:e.fmt.fmt_boolean(c);$s=3;continue;case 2:$r=e.badVerb(d);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.fmtBool};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.fmtBool=function(c,d){return this.$val.fmtBool(c,d);};AK.ptr.prototype.fmtC=function(c){var $ptr,c,d,e,f,g;d=this;e=((c.$low+((c.$high>>31)*4294967296))>>0);if(!((f=new $Int64(0,e),(f.$high===c.$high&&f.$low===c.$low)))){e=65533;}g=C.EncodeRune($subslice(new CG(d.runeBuf),0,4),e);d.fmt.pad($subslice(new CG(d.runeBuf),0,g));};AK.prototype.fmtC=function(c){return this.$val.fmtC(c);};AK.ptr.prototype.fmtInt64=function(c,d){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=d;if(f===98){$s=1;continue;}if(f===99){$s=2;continue;}if(f===100||f===118){$s=3;continue;}if(f===111){$s=4;continue;}if(f===113){$s=5;continue;}if(f===120){$s=6;continue;}if(f===85){$s=7;continue;}if(f===88){$s=8;continue;}$s=9;continue;case 1:e.fmt.integer(c,new $Uint64(0,2),true,"0123456789abcdef");$s=10;continue;case 2:e.fmtC(c);$s=10;continue;case 3:e.fmt.integer(c,new $Uint64(0,10),true,"0123456789abcdef");$s=10;continue;case 4:e.fmt.integer(c,new $Uint64(0,8),true,"0123456789abcdef");$s=10;continue;case 5:if((0=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);if(n>0){if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(Q);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(32);}}p=g.printArg(new $Uint8(o),118,f+1>>0);$s=20;case 20:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}p;m++;$s=18;continue;case 19:if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(125);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(93);}return;case 2:q=d;if(q===115){$s=21;continue;}if(q===120){$s=22;continue;}if(q===88){$s=23;continue;}if(q===113){$s=24;continue;}$s=25;continue;case 21:g.fmt.fmt_s($bytesToString(c));$s=26;continue;case 22:g.fmt.fmt_bx(c,"0123456789abcdef");$s=26;continue;case 23:g.fmt.fmt_bx(c,"0123456789ABCDEF");$s=26;continue;case 24:g.fmt.fmt_q($bytesToString(c));$s=26;continue;case 25:$r=g.badVerb(d);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 26:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.fmtBytes};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.fmtBytes=function(c,d,e,f){return this.$val.fmtBytes(c,d,e,f);};AK.ptr.prototype.fmtPointer=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;e=this;f=true;g=d;if(g===112||g===118){$s=1;continue;}if(g===98||g===100||g===111||g===120||g===88){$s=2;continue;}$s=3;continue;case 1:$s=4;continue;case 2:f=false;$s=4;continue;case 3:$r=e.badVerb(d);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 4:h=0;i=c.Kind();if(i===18||i===19||i===21||i===22||i===23||i===26){$s=6;continue;}$s=7;continue;case 6:h=c.Pointer();$s=8;continue;case 7:$r=e.badVerb(d);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 8:if(e.fmt.fmtFlags.sharpV){$s=10;continue;}if((d===118)&&(h===0)){$s=11;continue;}$s=12;continue;case 10:e.add(40);j=c.Type().String();$s=14;case 14:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteString(j);$s=15;case 15:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;e.add(41);e.add(40);if(h===0){(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(T);}else{e.fmt0x64(new $Uint64(0,h.constructor===Number?h:1),true);}e.add(41);$s=13;continue;case 11:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(R);$s=13;continue;case 12:if(f){$s=16;continue;}$s=17;continue;case 16:e.fmt0x64(new $Uint64(0,h.constructor===Number?h:1),!e.fmt.fmtFlags.sharp);$s=18;continue;case 17:$r=e.fmtUint64(new $Uint64(0,h.constructor===Number?h:1),d);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 18:case 13:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.fmtPointer};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.fmtPointer=function(c,d){return this.$val.fmtPointer(c,d);};AK.ptr.prototype.catchPanic=function(c,d){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:g=G.ValueOf(c);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if((h.Kind()===22)&&h.IsNil()){$s=4;continue;}$s=5;continue;case 4:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(R);return;case 5:if(e.panicking){$panic(f);}e.fmt.clearflags();(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(V);e.add(d);(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(Y);e.panicking=true;i=e.printArg(f,118,0);$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;e.panicking=false;(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteByte(41);case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.catchPanic};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.catchPanic=function(c,d){return this.$val.catchPanic(c,d);};AK.ptr.prototype.clearSpecialFlags=function(){var $ptr,c,d,e;c=false;d=false;e=this;c=e.fmt.fmtFlags.plusV;if(c){e.fmt.fmtFlags.plus=true;e.fmt.fmtFlags.plusV=false;}d=e.fmt.fmtFlags.sharpV;if(d){e.fmt.fmtFlags.sharp=true;e.fmt.fmtFlags.sharpV=false;}return[c,d];};AK.prototype.clearSpecialFlags=function(){return this.$val.clearSpecialFlags();};AK.ptr.prototype.restoreSpecialFlags=function(c,d){var $ptr,c,d,e;e=this;if(c){e.fmt.fmtFlags.plus=false;e.fmt.fmtFlags.plusV=true;}if(d){e.fmt.fmtFlags.sharp=false;e.fmt.fmtFlags.sharpV=true;}};AK.prototype.restoreSpecialFlags=function(c,d){return this.$val.restoreSpecialFlags(c,d);};AK.ptr.prototype.handleMethods=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=false;f=this;if(f.erroring){return e;}g=$assertType(f.arg,AG,true);h=g[0];i=g[1];if(i){$s=1;continue;}$s=2;continue;case 1:e=true;j=f.clearSpecialFlags();$deferred.push([$methodVal(f,"restoreSpecialFlags"),[j[0],j[1]]]);$deferred.push([$methodVal(f,"catchPanic"),[f.arg,c]]);$r=h.Format(f,c);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e;case 2:if(f.fmt.fmtFlags.sharpV){$s=4;continue;}$s=5;continue;case 4:k=$assertType(f.arg,AI,true);l=k[0];m=k[1];if(m){$s=7;continue;}$s=8;continue;case 7:e=true;$deferred.push([$methodVal(f,"catchPanic"),[f.arg,c]]);n=l.GoString();$s=9;case 9:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$r=f.fmt.fmt_s(n);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e;case 8:$s=6;continue;case 5:o=c;if(o===118||o===115||o===120||o===88||o===113){$s=11;continue;}$s=12;continue;case 11:p=f.arg;if($assertType(p,$error,true)[1]){$s=13;continue;}if($assertType(p,AH,true)[1]){$s=14;continue;}$s=15;continue;case 13:q=p;e=true;$deferred.push([$methodVal(f,"catchPanic"),[f.arg,c]]);r=q.Error();$s=16;case 16:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=f.printArg(new $String(r),c,d);$s=17;case 17:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}s;return e;case 14:t=p;e=true;$deferred.push([$methodVal(f,"catchPanic"),[f.arg,c]]);u=t.String();$s=18;case 18:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=f.printArg(new $String(u),c,d);$s=19;case 19:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}v;return e;case 15:case 12:case 6:e=false;return e;}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return e;}if($curGoroutine.asleep){if($f===undefined){$f={$blk:AK.ptr.prototype.handleMethods};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};AK.prototype.handleMethods=function(c,d){return this.$val.handleMethods(c,d);};AK.ptr.prototype.printArg=function(c,d,e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=false;g=this;g.arg=c;g.value=new G.Value.ptr(CI.nil,0,0);if($interfaceIsEqual(c,$ifaceNil)){$s=1;continue;}$s=2;continue;case 1:if((d===84)||(d===118)){$s=3;continue;}$s=4;continue;case 3:g.fmt.pad(R);$s=5;continue;case 4:$r=g.badVerb(d);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:f=false;return f;case 2:h=d;if(h===84){$s=7;continue;}if(h===112){$s=8;continue;}$s=9;continue;case 7:i=G.TypeOf(c).String();$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=g.printArg(new $String(i),115,0);$s=11;case 11:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;f=false;return f;case 8:k=G.ValueOf(c);$s=12;case 12:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$r=g.fmtPointer(k,d);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=false;return f;case 9:l=c;if($assertType(l,$Bool,true)[1]){$s=14;continue;}if($assertType(l,$Float32,true)[1]){$s=15;continue;}if($assertType(l,$Float64,true)[1]){$s=16;continue;}if($assertType(l,$Complex64,true)[1]){$s=17;continue;}if($assertType(l,$Complex128,true)[1]){$s=18;continue;}if($assertType(l,$Int,true)[1]){$s=19;continue;}if($assertType(l,$Int8,true)[1]){$s=20;continue;}if($assertType(l,$Int16,true)[1]){$s=21;continue;}if($assertType(l,$Int32,true)[1]){$s=22;continue;}if($assertType(l,$Int64,true)[1]){$s=23;continue;}if($assertType(l,$Uint,true)[1]){$s=24;continue;}if($assertType(l,$Uint8,true)[1]){$s=25;continue;}if($assertType(l,$Uint16,true)[1]){$s=26;continue;}if($assertType(l,$Uint32,true)[1]){$s=27;continue;}if($assertType(l,$Uint64,true)[1]){$s=28;continue;}if($assertType(l,$Uintptr,true)[1]){$s=29;continue;}if($assertType(l,$String,true)[1]){$s=30;continue;}if($assertType(l,CG,true)[1]){$s=31;continue;}if($assertType(l,G.Value,true)[1]){$s=32;continue;}$s=33;continue;case 14:m=l.$val;$r=g.fmtBool(m,d);$s=35;case 35:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 15:n=l.$val;$r=g.fmtFloat32(n,d);$s=36;case 36:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 16:o=l.$val;$r=g.fmtFloat64(o,d);$s=37;case 37:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 17:p=l.$val;$r=g.fmtComplex64(p,d);$s=38;case 38:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 18:q=l.$val;$r=g.fmtComplex128(q,d);$s=39;case 39:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 19:r=l.$val;$r=g.fmtInt64(new $Int64(0,r),d);$s=40;case 40:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 20:s=l.$val;$r=g.fmtInt64(new $Int64(0,s),d);$s=41;case 41:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 21:t=l.$val;$r=g.fmtInt64(new $Int64(0,t),d);$s=42;case 42:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 22:u=l.$val;$r=g.fmtInt64(new $Int64(0,u),d);$s=43;case 43:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 23:v=l.$val;$r=g.fmtInt64(v,d);$s=44;case 44:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 24:w=l.$val;$r=g.fmtUint64(new $Uint64(0,w),d);$s=45;case 45:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 25:x=l.$val;$r=g.fmtUint64(new $Uint64(0,x),d);$s=46;case 46:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 26:y=l.$val;$r=g.fmtUint64(new $Uint64(0,y),d);$s=47;case 47:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 27:z=l.$val;$r=g.fmtUint64(new $Uint64(0,z),d);$s=48;case 48:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 28:aa=l.$val;$r=g.fmtUint64(aa,d);$s=49;case 49:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 29:ab=l.$val;$r=g.fmtUint64(new $Uint64(0,ab.constructor===Number?ab:1),d);$s=50;case 50:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=34;continue;case 30:ac=l.$val;$r=g.fmtString(ac,d);$s=51;case 51:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=(d===115)||(d===118);$s=34;continue;case 31:ad=l.$val;$r=g.fmtBytes(ad,d,$ifaceNil,e);$s=52;case 52:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=d===115;$s=34;continue;case 32:ae=l.$val;af=g.printReflectValue(ae,d,e);$s=53;case 53:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}f=af;return f;case 33:ag=l;ah=g.handleMethods(d,e);$s=54;case 54:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;if(ai){$s=55;continue;}$s=56;continue;case 55:f=false;return f;case 56:aj=G.ValueOf(c);$s=57;case 57:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=g.printReflectValue(aj,d,e);$s=58;case 58:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}f=ak;return f;case 34:g.arg=$ifaceNil;return f;}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.printArg};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.printArg=function(c,d,e){return this.$val.printArg(c,d,e);};AK.ptr.prototype.printValue=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=false;c=c;g=this;if(!c.IsValid()){$s=1;continue;}$s=2;continue;case 1:if((d===84)||(d===118)){$s=3;continue;}$s=4;continue;case 3:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(R);$s=5;continue;case 4:$r=g.badVerb(d);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:f=false;return f;case 2:h=d;if(h===84){$s=7;continue;}if(h===112){$s=8;continue;}$s=9;continue;case 7:i=c.Type().String();$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=g.printArg(new $String(i),115,0);$s=11;case 11:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;f=false;return f;case 8:$r=g.fmtPointer(c,d);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=false;return f;case 9:g.arg=$ifaceNil;if(c.CanInterface()){$s=13;continue;}$s=14;continue;case 13:k=c.Interface();$s=15;case 15:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}g.arg=k;case 14:l=g.handleMethods(d,e);$s=16;case 16:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(m){$s=17;continue;}$s=18;continue;case 17:f=false;return f;case 18:n=g.printReflectValue(c,d,e);$s=19;case 19:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}f=n;return f;}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.printValue};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.printValue=function(c,d,e){return this.$val.printValue(c,d,e);};AK.ptr.prototype.printReflectValue=function(c,d,e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=false;c=c;g=this;h=g.value;g.value=c;i=c;j=i.Kind();if(j===0){$s=1;continue;}if(j===1){$s=2;continue;}if(j===2||j===3||j===4||j===5||j===6){$s=3;continue;}if(j===7||j===8||j===9||j===10||j===11||j===12){$s=4;continue;}if(j===13||j===14){$s=5;continue;}if(j===15||j===16){$s=6;continue;}if(j===24){$s=7;continue;}if(j===21){$s=8;continue;}if(j===25){$s=9;continue;}if(j===20){$s=10;continue;}if(j===17||j===23){$s=11;continue;}if(j===22){$s=12;continue;}if(j===18||j===19||j===26){$s=13;continue;}$s=14;continue;case 1:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString("");$s=15;continue;case 2:$r=g.fmtBool(i.Bool(),d);$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 3:$r=g.fmtInt64(i.Int(),d);$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 4:$r=g.fmtUint64(i.Uint(),d);$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 5:k=i.Type().Size();$s=22;case 22:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if(k===4){$s=19;continue;}$s=20;continue;case 19:$r=g.fmtFloat32($fround(i.Float()),d);$s=23;case 23:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=21;continue;case 20:$r=g.fmtFloat64(i.Float(),d);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 21:$s=15;continue;case 6:l=i.Type().Size();$s=28;case 28:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l===8){$s=25;continue;}$s=26;continue;case 25:$r=g.fmtComplex64((m=i.Complex(),new $Complex64(m.$real,m.$imag)),d);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=27;continue;case 26:$r=g.fmtComplex128(i.Complex(),d);$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 27:$s=15;continue;case 7:n=i.String();$s=31;case 31:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$r=g.fmtString(n,d);$s=32;case 32:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 8:if(g.fmt.fmtFlags.sharpV){$s=33;continue;}$s=34;continue;case 33:o=i.Type().String();$s=36;case 36:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString(o);$s=37;case 37:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}p;if(i.IsNil()){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString("(nil)");$s=15;continue;}(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(123);$s=35;continue;case 34:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(U);case 35:q=i.MapKeys();$s=38;case 38:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;s=r;t=0;case 39:if(!(t=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t]);if(u>0){if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(Q);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(32);}}w=g.printValue(v,d,e+1>>0);$s=41;case 41:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}w;(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(58);x=i.MapIndex(v);$s=42;case 42:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=g.printValue(x,d,e+1>>0);$s=43;case 43:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}y;t++;$s=39;continue;case 40:if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(125);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(93);}$s=15;continue;case 9:if(g.fmt.fmtFlags.sharpV){$s=44;continue;}$s=45;continue;case 44:z=c.Type().String();$s=46;case 46:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}aa=(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString(z);$s=47;case 47:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}aa;case 45:g.add(123);ab=i;ac=ab.Type();ad=0;case 48:if(!(ad0){if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(Q);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(32);}}if(g.fmt.fmtFlags.plusV||g.fmt.fmtFlags.sharpV){$s=50;continue;}$s=51;continue;case 50:ae=ac.Field(ad);$s=52;case 52:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}af=$clone(ae,G.StructField);if(!(af.Name==="")){$s=53;continue;}$s=54;continue;case 53:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString(af.Name);(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(58);case 54:case 51:ag=AX(ab,ad);$s=55;case 55:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ah=g.printValue(ag,d,e+1>>0);$s=56;case 56:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ah;ad=ad+(1)>>0;$s=48;continue;case 49:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(125);$s=15;continue;case 10:ai=i.Elem();$s=57;case 57:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=ai;if(!aj.IsValid()){$s=58;continue;}$s=59;continue;case 58:if(g.fmt.fmtFlags.sharpV){$s=61;continue;}$s=62;continue;case 61:ak=i.Type().String();$s=64;case 64:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}al=(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString(ak);$s=65;case 65:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}al;(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(S);$s=63;continue;case 62:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(R);case 63:$s=60;continue;case 59:am=g.printValue(aj,d,e+1>>0);$s=66;case 66:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}f=am;case 60:$s=15;continue;case 11:an=i.Type();ap=an.Elem();$s=70;case 70:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}aq=ap.Kind();$s=71;case 71:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}if(!(aq===8)){ao=false;$s=69;continue s;}ar=an.Elem();$s=72;case 72:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}ao=$interfaceIsEqual(ar,BC)||(d===115)||(d===113)||(d===120);case 69:if(ao){$s=67;continue;}$s=68;continue;case 67:as=CG.nil;if(i.Kind()===23){$s=73;continue;}if(i.CanAddr()){$s=74;continue;}$s=75;continue;case 73:at=i.Bytes();$s=77;case 77:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}as=at;$s=76;continue;case 74:au=i.Slice(0,i.Len());$s=78;case 78:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}av=au.Bytes();$s=79;case 79:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}as=av;$s=76;continue;case 75:as=$makeSlice(CG,i.Len());aw=as;ax=0;case 80:if(!(ax=as.$length)?$throwRuntimeError("index out of range"):as.$array[as.$offset+ay]=(ba.$low<<24>>>24));ax++;$s=80;continue;case 81:case 76:$r=g.fmtBytes(as,d,an,e);$s=84;case 84:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=d===115;$s=15;continue;case 68:if(g.fmt.fmtFlags.sharpV){$s=85;continue;}$s=86;continue;case 85:bb=c.Type().String();$s=88;case 88:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}bc=(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString(bb);$s=89;case 89:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}bc;if((i.Kind()===23)&&i.IsNil()){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteString("(nil)");$s=15;continue;}(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(123);$s=87;continue;case 86:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(91);case 87:bd=0;case 90:if(!(bd0){if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).Write(Q);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(32);}}be=i.Index(bd);$s=92;case 92:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bf=g.printValue(be,d,e+1>>0);$s=93;case 93:if($c){$c=false;bf=bf.$blk();}if(bf&&bf.$blk!==undefined){break s;}bf;bd=bd+(1)>>0;$s=90;continue;case 91:if(g.fmt.fmtFlags.sharpV){(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(125);}else{(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(93);}$s=15;continue;case 12:bg=i.Pointer();if(!((bg===0))&&(e===0)){$s=94;continue;}$s=95;continue;case 94:bh=i.Elem();$s=96;case 96:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;bj=bi.Kind();if(bj===17||bj===23){$s=97;continue;}if(bj===25){$s=98;continue;}if(bj===21){$s=99;continue;}$s=100;continue;case 97:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(38);bk=g.printValue(bi,d,e+1>>0);$s=101;case 101:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bk;$s=15;continue s;$s=100;continue;case 98:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(38);bl=g.printValue(bi,d,e+1>>0);$s=102;case 102:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bl;$s=15;continue s;$s=100;continue;case 99:(g.$ptr_buf||(g.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},g))).WriteByte(38);bm=g.printValue(bi,d,e+1>>0);$s=103;case 103:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}bm;$s=15;continue s;case 100:case 95:$r=g.fmtPointer(c,d);$s=104;case 104:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 13:$r=g.fmtPointer(c,d);$s=105;case 105:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 14:$r=g.unknownType(i);$s=106;case 106:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 15:g.value=h;f=f;return f;}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.printReflectValue};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.printReflectValue=function(c,d,e){return this.$val.printReflectValue(c,d,e);};BD=function(c,d){var $ptr,c,d,e,f,g,h;e=0;f=false;g=0;g=d;if(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),$Int,true);e=h[0];f=h[1];g=d+1>>0;if(AY(e)){e=0;f=false;}}return[e,f,g];};BE=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;d=0;e=0;f=false;if(c.length<3){g=0;h=1;i=false;d=g;e=h;f=i;return[d,e,f];}j=1;while(true){if(!(j>0;q=false;d=o;e=p;f=q;return[d,e,f];}r=l-1>>0;s=j+1>>0;t=true;d=r;e=s;f=t;return[d,e,f];}j=j+(1)>>0;}u=0;v=1;w=false;d=u;e=v;f=w;return[d,e,f];};AK.ptr.prototype.argNumber=function(c,d,e,f){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;g=0;h=0;i=false;j=this;if(d.length<=e||!((d.charCodeAt(e)===91))){k=c;l=e;m=false;g=k;h=l;i=m;return[g,h,i];}j.reordered=true;n=BE(d.substring(e));o=n[0];p=n[1];q=n[2];if(q&&0<=o&&o>0;t=true;g=r;h=s;i=t;return[g,h,i];}j.goodArgNum=false;u=c;v=e+p>>0;w=q;g=u;h=v;i=w;return[g,h,i];};AK.prototype.argNumber=function(c,d,e,f){return this.$val.argNumber(c,d,e,f);};AK.ptr.prototype.doPrintf=function(c,d){var $ptr,aa,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=c.length;g=0;h=false;e.reordered=false;i=0;case 1:if(!(i>0;}if(i>j){(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteString(c.substring(j,i));}if(i>=f){$s=2;continue;}i=i+(1)>>0;e.fmt.clearflags();F:while(true){if(!(i>0;}l=e.argNumber(g,c,i,d.$length);g=l[0];i=l[1];h=l[2];if(i>0;m=BD(d,g);e.fmt.wid=m[0];e.fmt.fmtFlags.widPresent=m[1];g=m[2];if(!e.fmt.fmtFlags.widPresent){(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(AC);}if(e.fmt.wid<0){e.fmt.wid=-e.fmt.wid;e.fmt.fmtFlags.minus=true;}h=false;}else{n=AZ(c,i,f);e.fmt.wid=n[0];e.fmt.fmtFlags.widPresent=n[1];i=n[2];if(h&&e.fmt.fmtFlags.widPresent){e.goodArgNum=false;}}if((i+1>>0)>0;if(h){e.goodArgNum=false;}o=e.argNumber(g,c,i,d.$length);g=o[0];i=o[1];h=o[2];if(i>0;p=BD(d,g);e.fmt.prec=p[0];e.fmt.fmtFlags.precPresent=p[1];g=p[2];if(e.fmt.prec<0){e.fmt.prec=0;e.fmt.fmtFlags.precPresent=false;}if(!e.fmt.fmtFlags.precPresent){(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(AD);}h=false;}else{q=AZ(c,i,f);e.fmt.prec=q[0];e.fmt.fmtFlags.precPresent=q[1];i=q[2];if(!e.fmt.fmtFlags.precPresent){e.fmt.prec=0;e.fmt.fmtFlags.precPresent=true;}}}if(!h){r=e.argNumber(g,c,i,d.$length);g=r[0];i=r[1];h=r[2];}if(i>=f){$s=3;continue;}$s=4;continue;case 3:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(AE);$s=1;continue;case 4:s=C.DecodeRuneInString(c.substring(i));t=s[0];u=s[1];i=i+(u)>>0;if(t===37){$s=5;continue;}$s=6;continue;case 5:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteByte(37);$s=1;continue;case 6:if(!e.goodArgNum){$s=7;continue;}if(g>=d.$length){$s=8;continue;}$s=9;continue;case 7:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(V);e.add(t);(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(X);$s=1;continue;$s=9;continue;case 8:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(V);e.add(t);(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).Write(W);$s=1;continue;case 9:v=((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]);g=g+(1)>>0;if(t===118){if(e.fmt.fmtFlags.sharp){e.fmt.fmtFlags.sharp=false;e.fmt.fmtFlags.sharpV=true;}if(e.fmt.fmtFlags.plus){e.fmt.fmtFlags.plus=false;e.fmt.fmtFlags.plusV=true;}}w=e.printArg(v,t,0);$s=10;case 10:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}w;$s=1;continue;case 2:if(!e.reordered&&g=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]);if(!($interfaceIsEqual(x,$ifaceNil))){$s=15;continue;}$s=16;continue;case 15:y=G.TypeOf(x).String();$s=17;case 17:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteString(y);$s=18;case 18:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}z;(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteByte(61);case 16:aa=e.printArg(x,118,0);$s=19;case 19:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}aa;if((g+1>>0)>0;$s=13;continue;case 14:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteByte(41);case 12:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.doPrintf};}$f.$ptr=$ptr;$f.aa=aa;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.doPrintf=function(c,d){return this.$val.doPrintf(c,d);};AK.ptr.prototype.doPrint=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=false;h=0;case 1:if(!(h=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+h]);if(h>0){$s=3;continue;}$s=4;continue;case 3:if(!(!($interfaceIsEqual(i,$ifaceNil)))){j=false;$s=5;continue s;}k=G.TypeOf(i).Kind();$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k===24;case 5:l=j;if(d||!l&&!g){(f.$ptr_buf||(f.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},f))).WriteByte(32);}case 4:m=f.printArg(i,118,0);$s=7;case 7:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}g=m;h=h+(1)>>0;$s=1;continue;case 2:if(e){(f.$ptr_buf||(f.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},f))).WriteByte(10);}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.doPrint};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.doPrint=function(c,d,e){return this.$val.doPrint(c,d,e);};$ptrType(BL).prototype.Read=function(c){var $ptr,c,d,e,f;d=0;e=$ifaceNil;f=this;d=$copyString(c,f.$get());f.$set((f.$get()).substring(d));if(d===0){e=E.EOF;}return[d,e];};BM=function(c,d){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];e=0;f=$ifaceNil;i=BP((h=(c.$ptr||(c.$ptr=new CQ(function(){return this.$target[0];},function($v){this.$target[0]=$v;},c))),new CP(function(){return h.$get();},function($v){h.$set($v);},h.$target)),d);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}g=i;e=g[0];f=g[1];return[e,f];}return;}if($f===undefined){$f={$blk:BM};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sscan=BM;BP=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=0;f=$ifaceNil;h=CA(c,true,false);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=$clone(g[1],BU);l=i.doScan(d);$s=2;case 2:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;e=k[0];f=k[1];i.free(j);return[e,f];}return;}if($f===undefined){$f={$blk:BP};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fscan=BP;BT.ptr.prototype.Read=function(c){var $ptr,c,d,e,f,g,h;d=0;e=$ifaceNil;f=this;g=0;h=D.New("ScanState's Read should not be called. Use ReadRune");d=g;e=h;return[d,e];};BT.prototype.Read=function(c){return this.$val.Read(c);};BT.ptr.prototype.ReadRune=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=0;e=$ifaceNil;f=this;if(f.peekRune>=0){f.count=f.count+(1)>>0;c=f.peekRune;d=C.RuneLen(c);f.prevRune=c;f.peekRune=-1;return[c,d,e];}if(f.atEOF||f.ssave.nlIsEnd&&(f.prevRune===10)||f.count>=f.ssave.argLimit){e=E.EOF;return[c,d,e];}h=f.rr.ReadRune();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;c=g[0];d=g[1];e=g[2];if($interfaceIsEqual(e,$ifaceNil)){f.count=f.count+(1)>>0;f.prevRune=c;}else if($interfaceIsEqual(e,E.EOF)){f.atEOF=true;}return[c,d,e];}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.ReadRune};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.ReadRune=function(){return this.$val.ReadRune();};BT.ptr.prototype.Width=function(){var $ptr,c,d,e,f,g,h,i;c=0;d=false;e=this;if(e.ssave.maxWid===1073741824){f=0;g=false;c=f;d=g;return[c,d];}h=e.ssave.maxWid;i=true;c=h;d=i;return[c,d];};BT.prototype.Width=function(){return this.$val.Width();};BT.ptr.prototype.getRune=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=this;f=d.ReadRune();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;c=e[0];g=e[2];if(!($interfaceIsEqual(g,$ifaceNil))){if($interfaceIsEqual(g,E.EOF)){c=-1;return c;}d.error(g);}return c;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.getRune};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.getRune=function(){return this.$val.getRune();};BT.ptr.prototype.mustReadRune=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=this;e=d.getRune();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}c=e;if(c===-1){d.error(E.ErrUnexpectedEOF);}return c;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.mustReadRune};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.mustReadRune=function(){return this.$val.mustReadRune();};BT.ptr.prototype.UnreadRune=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=$assertType(c.rr,BF,true);e=d[0];f=d[1];if(f){$s=1;continue;}$s=2;continue;case 1:g=e.UnreadRune();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$s=3;continue;case 2:c.peekRune=c.prevRune;case 3:c.prevRune=-1;c.count=c.count-(1)>>0;return $ifaceNil;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.UnreadRune};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.UnreadRune=function(){return this.$val.UnreadRune();};BT.ptr.prototype.error=function(c){var $ptr,c,d,e;d=this;$panic((e=new BS.ptr(c),new e.constructor.elem(e)));};BT.prototype.error=function(c){return this.$val.error(c);};BT.ptr.prototype.errorString=function(c){var $ptr,c,d,e;d=this;$panic((e=new BS.ptr(D.New(c)),new e.constructor.elem(e)));};BT.prototype.errorString=function(c){return this.$val.errorString(c);};BT.ptr.prototype.Token=function(c,d){var $ptr,c,d,e,f,g,h,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=[e];f=CG.nil;e[0]=$ifaceNil;g=this;$deferred.push([(function(e){return function(){var $ptr,h,i,j,k;h=$recover();if(!($interfaceIsEqual(h,$ifaceNil))){i=$assertType(h,BS,true);j=$clone(i[0],BS);k=i[1];if(k){e[0]=j.err;}else{$panic(h);}}};})(e),[]]);if(d===$throwNilPointerError){d=BX;}g.buf=$subslice(g.buf,0,0);h=g.token(c,d);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}f=h;return[f,e[0]];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[f,e[0]];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:BT.ptr.prototype.Token};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};BT.prototype.Token=function(c,d){return this.$val.Token(c,d);};BW=function(c){var $ptr,c,d,e,f,g;if(c>=65536){return false;}d=(c<<16>>>16);e=BV;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]),CM);if(d0){c=e.pendBuf[0];$copySlice($subslice(new CG(e.pendBuf),0),$subslice(new CG(e.pendBuf),1));e.pending=e.pending-(1)>>0;return[c,d];}g=E.ReadFull(e.reader,$subslice(new CG(e.pendBuf),0,1));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];d=f[1];if(!((h===1))){i=0;j=d;c=i;d=j;return[c,d];}k=e.pendBuf[0];l=d;c=k;d=l;return[c,d];}return;}if($f===undefined){$f={$blk:BY.ptr.prototype.readByte};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BY.prototype.readByte=function(){return this.$val.readByte();};BY.ptr.prototype.unread=function(c){var $ptr,c,d;d=this;$copySlice($subslice(new CG(d.pendBuf),d.pending),c);d.pending=d.pending+(c.$length)>>0;};BY.prototype.unread=function(c){return this.$val.unread(c);};BY.ptr.prototype.ReadRune=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=0;e=$ifaceNil;f=this;h=f.readByte();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;f.buf[0]=g[0];e=g[1];if(!($interfaceIsEqual(e,$ifaceNil))){i=0;j=0;k=e;c=i;d=j;e=k;return[c,d,e];}if(f.buf[0]<128){c=(f.buf[0]>>0);d=1;return[c,d,e];}l=0;l=1;case 2:if(!(!C.FullRune($subslice(new CG(f.buf),0,l)))){$s=3;continue;}n=f.readByte();$s=4;case 4:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;(o=f.buf,((l<0||l>=o.length)?$throwRuntimeError("index out of range"):o[l]=m[0]));e=m[1];if(!($interfaceIsEqual(e,$ifaceNil))){if($interfaceIsEqual(e,E.EOF)){e=$ifaceNil;$s=3;continue;}return[c,d,e];}l=l+(1)>>0;$s=2;continue;case 3:p=C.DecodeRune($subslice(new CG(f.buf),0,l));c=p[0];d=p[1];if(d1024){return;}d.buf=$subslice(d.buf,0,0);d.rr=$ifaceNil;BZ.Put(d);};BT.prototype.free=function(c){return this.$val.free(c);};BT.ptr.prototype.skipSpace=function(c){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;case 1:e=d.getRune();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(f===-1){return;}if(!(f===13)){g=false;$s=6;continue s;}h=d.peek("\n");$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 6:if(g){$s=4;continue;}$s=5;continue;case 4:$s=1;continue;case 5:if(f===10){$s=8;continue;}$s=9;continue;case 8:if(c){$s=2;continue;}if(d.ssave.nlIsSpace){$s=1;continue;}d.errorString("unexpected newline");return;case 9:if(!BW(f)){$s=10;continue;}$s=11;continue;case 10:i=d.UnreadRune();$s=12;case 12:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=2;continue;case 11:$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.skipSpace};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.skipSpace=function(c){return this.$val.skipSpace(c);};BT.ptr.prototype.token=function(c,d){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(c){$s=1;continue;}$s=2;continue;case 1:$r=e.skipSpace(false);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:case 4:f=e.getRune();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===-1){$s=5;continue;}h=d(g);$s=9;case 9:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(!h){$s=7;continue;}$s=8;continue;case 7:i=e.UnreadRune();$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;$s=5;continue;case 8:(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteRune(g);$s=4;continue;case 5:return(j=e.buf,$subslice(new CG(j.$array),j.$offset,j.$offset+j.$length));}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.token};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.token=function(c,d){return this.$val.token(c,d);};CD=function(c,d){var $ptr,c,d,e,f,g,h,i;e=c;f=0;while(true){if(!(f=0){if(d){(e.$ptr_buf||(e.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},e))).WriteRune(g);}return true;}if(!((g===-1))&&d){$s=2;continue;}$s=3;continue;case 2:h=e.UnreadRune();$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;case 3:return false;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.consume};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.consume=function(c,d){return this.$val.consume(c,d);};BT.ptr.prototype.peek=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=d.getRune();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!((f===-1))){$s=2;continue;}$s=3;continue;case 2:g=d.UnreadRune();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;case 3:return CD(c,f)>=0;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.peek};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.peek=function(c){return this.$val.peek(c);};BT.ptr.prototype.notEOF=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.getRune();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(e===-1){$s=2;continue;}$s=3;continue;case 2:$panic(E.EOF);case 3:f=c.UnreadRune();$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.notEOF};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.notEOF=function(){return this.$val.notEOF();};BT.ptr.prototype.accept=function(c){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=d.consume(c,true);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.accept};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.accept=function(c){return this.$val.accept(c);};BT.ptr.prototype.okVerb=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j;f=this;g=d;h=0;while(true){if(!(h>>0);h=$shiftRightInt64(($shiftLeft64(f,((64-g>>>0)))),((64-g>>>0)));if(!((h.$high===f.$high&&h.$low===f.$low))){d.errorString("overflow on character value "+$encodeRune(f.$low));}return f;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanRune};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanRune=function(c){return this.$val.scanRune(c);};BT.ptr.prototype.scanBasePrefix=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d="";e=false;f=this;g=f.peek("0");$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(!g){$s=1;continue;}$s=2;continue;case 1:h=10;i="0123456789";j=false;c=h;d=i;e=j;return[c,d,e];case 2:k=f.accept("0");$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;e=true;l=8;m="01234567";c=l;d=m;n=f.peek("xX");$s=7;case 7:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(n){$s=5;continue;}$s=6;continue;case 5:o=f.consume("xX",false);$s=8;case 8:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;p=16;q="0123456789aAbBcCdDeEfF";c=p;d=q;case 6:return[c,d,e];}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanBasePrefix};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanBasePrefix=function(){return this.$val.scanBasePrefix();};BT.ptr.prototype.scanInt=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(c===99){$s=1;continue;}$s=2;continue;case 1:f=e.scanRune(d);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 2:$r=e.skipSpace(false);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=e.getBase(c);h=g[0];i=g[1];j=false;if(c===85){$s=6;continue;}$s=7;continue;case 6:l=e.consume("U",false);$s=12;case 12:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!l){k=true;$s=11;continue s;}m=e.consume("+",false);$s=13;case 13:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=!m;case 11:if(k){$s=9;continue;}$s=10;continue;case 9:e.errorString("bad unicode format ");case 10:$s=8;continue;case 7:n=e.accept("+-");$s=14;case 14:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;if(c===118){$s=15;continue;}$s=16;continue;case 15:p=e.scanBasePrefix();$s=17;case 17:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;h=o[0];i=o[1];j=o[2];case 16:case 8:q=e.scanNumber(i,j);$s=18;case 18:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;s=B.ParseInt(r,h,64);t=s[0];u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){e.error(u);}v=(d>>>0);w=$shiftRightInt64(($shiftLeft64(t,((64-v>>>0)))),((64-v>>>0)));if(!((w.$high===t.$high&&w.$low===t.$low))){e.errorString("integer overflow on token "+r);}return t;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanInt};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanInt=function(c,d){return this.$val.scanInt(c,d);};BT.ptr.prototype.scanUint=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(c===99){$s=1;continue;}$s=2;continue;case 1:g=e.scanRune(d);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return(f=g,new $Uint64(f.$high,f.$low));case 2:$r=e.skipSpace(false);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=e.getBase(c);i=h[0];j=h[1];k=false;if(c===85){$s=6;continue;}if(c===118){$s=7;continue;}$s=8;continue;case 6:m=e.consume("U",false);$s=12;case 12:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(!m){l=true;$s=11;continue s;}n=e.consume("+",false);$s=13;case 13:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}l=!n;case 11:if(l){$s=9;continue;}$s=10;continue;case 9:e.errorString("bad unicode format ");case 10:$s=8;continue;case 7:p=e.scanBasePrefix();$s=14;case 14:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;i=o[0];j=o[1];k=o[2];case 8:q=e.scanNumber(j,k);$s=15;case 15:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;s=B.ParseUint(r,i,64);t=s[0];u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){e.error(u);}v=(d>>>0);w=$shiftRightUint64(($shiftLeft64(t,((64-v>>>0)))),((64-v>>>0)));if(!((w.$high===t.$high&&w.$low===t.$low))){e.errorString("unsigned integer overflow on token "+r);}return t;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanUint};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanUint=function(c,d){return this.$val.scanUint(c,d);};BT.ptr.prototype.floatToken=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;c.buf=$subslice(c.buf,0,0);f=c.accept("nN");$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!(f)){e=false;$s=4;continue s;}g=c.accept("aA");$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=g;case 4:if(!(e)){d=false;$s=3;continue s;}h=c.accept("nN");$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d=h;case 3:if(d){$s=1;continue;}$s=2;continue;case 1:return $bytesToString(c.buf);case 2:i=c.accept("+-");$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;l=c.accept("iI");$s=13;case 13:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!(l)){k=false;$s=12;continue s;}m=c.accept("nN");$s=14;case 14:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;case 12:if(!(k)){j=false;$s=11;continue s;}n=c.accept("fF");$s=15;case 15:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}j=n;case 11:if(j){$s=9;continue;}$s=10;continue;case 9:return $bytesToString(c.buf);case 10:case 16:o=c.accept("0123456789");$s=18;case 18:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!(o)){$s=17;continue;}$s=16;continue;case 17:p=c.accept(".");$s=21;case 21:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}if(p){$s=19;continue;}$s=20;continue;case 19:case 22:q=c.accept("0123456789");$s=24;case 24:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}if(!(q)){$s=23;continue;}$s=22;continue;case 23:case 20:r=c.accept("eEp");$s=27;case 27:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r){$s=25;continue;}$s=26;continue;case 25:s=c.accept("+-");$s=28;case 28:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}s;case 29:t=c.accept("0123456789");$s=31;case 31:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(!(t)){$s=30;continue;}$s=29;continue;case 30:case 26:return $bytesToString(c.buf);}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.floatToken};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.floatToken=function(){return this.$val.floatToken();};BT.ptr.prototype.complexTokens=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c="";d="";e=this;f=e.accept("(");$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=e.floatToken();$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}c=h;e.buf=$subslice(e.buf,0,0);i=e.accept("+-");$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=3;continue;}$s=4;continue;case 3:e.error(CB);case 4:j=$bytesToString(e.buf);k=e.floatToken();$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}d=k;l=e.accept("i");$s=9;case 9:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!l){$s=7;continue;}$s=8;continue;case 7:e.error(CB);case 8:if(!(g)){m=false;$s=12;continue s;}n=e.accept(")");$s=13;case 13:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=!n;case 12:if(m){$s=10;continue;}$s=11;continue;case 10:e.error(CB);case 11:o=c;p=j+d;c=o;d=p;return[c,d];}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.complexTokens};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.complexTokens=function(){return this.$val.complexTokens();};BT.ptr.prototype.convertFloat=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;e=this;f=CD(c,112);if(f>=0){g=B.ParseFloat(c.substring(0,f),d);h=g[0];i=g[1];if(!($interfaceIsEqual(i,$ifaceNil))){j=$assertType(i,CS,true);k=j[0];l=j[1];if(l){k.Num=c;}e.error(i);}m=B.Atoi(c.substring((f+1>>0)));n=m[0];i=m[1];if(!($interfaceIsEqual(i,$ifaceNil))){o=$assertType(i,CS,true);p=o[0];q=o[1];if(q){p.Num=c;}e.error(i);}return A.Ldexp(h,n);}r=B.ParseFloat(c,d);s=r[0];t=r[1];if(!($interfaceIsEqual(t,$ifaceNil))){e.error(t);}return s;};BT.prototype.convertFloat=function(c,d){return this.$val.convertFloat(c,d);};BT.ptr.prototype.scanComplex=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(!e.okVerb(c,"beEfFgGv","complex")){return new $Complex128(0,0);}$r=e.skipSpace(false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=e.complexTokens();$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];k=e.convertFloat(h,(j=d/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero")));m=e.convertFloat(i,(l=d/2,(l===l&&l!==1/0&&l!==-1/0)?l>>0:$throwRuntimeError("integer divide by zero")));return new $Complex128(k,m);}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanComplex};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanComplex=function(c,d){return this.$val.scanComplex(c,d);};BT.ptr.prototype.convertString=function(c){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d="";e=this;if(!e.okVerb(c,"svqx","string")){d="";return d;}$r=e.skipSpace(false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f=c;if(f===113){$s=3;continue;}if(f===120){$s=4;continue;}$s=5;continue;case 3:g=e.quotedString();$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}d=g;$s=6;continue;case 4:h=e.hexString();$s=8;case 8:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d=h;$s=6;continue;case 5:i=e.token(true,BX);$s=9;case 9:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}d=$bytesToString(i);case 6:return d;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.convertString};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.convertString=function(c){return this.$val.convertString(c);};BT.ptr.prototype.quotedString=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;$r=c.notEOF();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d=c.getRune();$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;if(f===96){$s=3;continue;}if(f===34){$s=4;continue;}$s=5;continue;case 3:case 7:g=c.mustReadRune();$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(h===e){$s=8;continue;}(c.$ptr_buf||(c.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).WriteRune(h);$s=7;continue;case 8:return $bytesToString(c.buf);case 4:(c.$ptr_buf||(c.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).WriteRune(e);case 10:i=c.mustReadRune();$s=12;case 12:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;(c.$ptr_buf||(c.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).WriteRune(j);if(j===92){$s=13;continue;}if(j===34){$s=14;continue;}$s=15;continue;case 13:k=c.mustReadRune();$s=16;case 16:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=(c.$ptr_buf||(c.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).WriteRune(k);$s=17;case 17:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;$s=15;continue;case 14:$s=11;continue;case 15:$s=10;continue;case 11:m=B.Unquote($bytesToString(c.buf));n=m[0];o=m[1];if(!($interfaceIsEqual(o,$ifaceNil))){c.error(o);}return n;case 5:c.errorString("expected quoted string");case 6:return"";}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.quotedString};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.quotedString=function(){return this.$val.quotedString();};CE=function(c){var $ptr,c,d,e;d=(c>>0);e=d;if(e===48||e===49||e===50||e===51||e===52||e===53||e===54||e===55||e===56||e===57){return[d-48>>0,true];}else if(e===97||e===98||e===99||e===100||e===101||e===102){return[(10+d>>0)-97>>0,true];}else if(e===65||e===66||e===67||e===68||e===69||e===70){return[(10+d>>0)-65>>0,true];}return[-1,false];};BT.ptr.prototype.hexByte=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=false;e=this;f=e.getRune();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===-1){return[c,d];}h=CE(g);i=h[0];d=h[1];if(!d){$s=2;continue;}$s=3;continue;case 2:j=e.UnreadRune();$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;return[c,d];case 3:l=e.mustReadRune();$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=CE(l);$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;n=k[0];d=k[1];if(!d){e.errorString("illegal hex digit");return[c,d];}o=(((i<<4>>0)|n)<<24>>>24);p=true;c=o;d=p;return[c,d];}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.hexByte};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.hexByte=function(){return this.$val.hexByte();};BT.ptr.prototype.hexString=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;$r=c.notEOF();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:e=c.hexByte();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(!g){$s=3;continue;}(c.$ptr_buf||(c.$ptr_buf=new CL(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))).WriteByte(f);$s=2;continue;case 3:if(c.buf.$length===0){c.errorString("no hex data for %x string");return"";}return $bytesToString(c.buf);}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.hexString};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.hexString=function(){return this.$val.hexString();};BT.ptr.prototype.scanOne=function(c,d){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,c,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,cm,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;bo=$f.bo;bp=$f.bp;bq=$f.bq;br=$f.br;bs=$f.bs;bt=$f.bt;bu=$f.bu;bv=$f.bv;bw=$f.bw;bx=$f.bx;by=$f.by;bz=$f.bz;c=$f.c;ca=$f.ca;cb=$f.cb;cc=$f.cc;cd=$f.cd;ce=$f.ce;cf=$f.cf;cg=$f.cg;ch=$f.ch;ci=$f.ci;cj=$f.cj;ck=$f.ck;cl=$f.cl;cm=$f.cm;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;e.buf=$subslice(e.buf,0,0);f=$ifaceNil;g=$assertType(d,BH,true);h=g[0];i=g[1];if(i){$s=1;continue;}$s=2;continue;case 1:j=h.Scan(e,c);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}f=j;if(!($interfaceIsEqual(f,$ifaceNil))){if($interfaceIsEqual(f,E.EOF)){f=E.ErrUnexpectedEOF;}e.error(f);}return;case 2:k=d;if($assertType(k,CT,true)[1]){$s=4;continue;}if($assertType(k,CU,true)[1]){$s=5;continue;}if($assertType(k,CV,true)[1]){$s=6;continue;}if($assertType(k,CW,true)[1]){$s=7;continue;}if($assertType(k,CX,true)[1]){$s=8;continue;}if($assertType(k,CY,true)[1]){$s=9;continue;}if($assertType(k,CZ,true)[1]){$s=10;continue;}if($assertType(k,DA,true)[1]){$s=11;continue;}if($assertType(k,DB,true)[1]){$s=12;continue;}if($assertType(k,DC,true)[1]){$s=13;continue;}if($assertType(k,DD,true)[1]){$s=14;continue;}if($assertType(k,DE,true)[1]){$s=15;continue;}if($assertType(k,DF,true)[1]){$s=16;continue;}if($assertType(k,DG,true)[1]){$s=17;continue;}if($assertType(k,DH,true)[1]){$s=18;continue;}if($assertType(k,DI,true)[1]){$s=19;continue;}if($assertType(k,CQ,true)[1]){$s=20;continue;}if($assertType(k,DJ,true)[1]){$s=21;continue;}$s=22;continue;case 4:l=k.$val;m=e.scanBool(c);$s=24;case 24:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l.$set(m);$s=23;continue;case 5:n=k.$val;p=e.scanComplex(c,64);$s=25;case 25:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}n.$set((o=p,new $Complex64(o.$real,o.$imag)));$s=23;continue;case 6:q=k.$val;r=e.scanComplex(c,128);$s=26;case 26:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q.$set(r);$s=23;continue;case 7:s=k.$val;u=e.scanInt(c,BA);$s=27;case 27:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}s.$set(((t=u,t.$low+((t.$high>>31)*4294967296))>>0));$s=23;continue;case 8:v=k.$val;x=e.scanInt(c,8);$s=28;case 28:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}v.$set(((w=x,w.$low+((w.$high>>31)*4294967296))<<24>>24));$s=23;continue;case 9:y=k.$val;aa=e.scanInt(c,16);$s=29;case 29:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}y.$set(((z=aa,z.$low+((z.$high>>31)*4294967296))<<16>>16));$s=23;continue;case 10:ab=k.$val;ad=e.scanInt(c,32);$s=30;case 30:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ab.$set(((ac=ad,ac.$low+((ac.$high>>31)*4294967296))>>0));$s=23;continue;case 11:ae=k.$val;af=e.scanInt(c,64);$s=31;case 31:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ae.$set(af);$s=23;continue;case 12:ag=k.$val;ah=e.scanUint(c,BA);$s=32;case 32:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ag.$set((ah.$low>>>0));$s=23;continue;case 13:ai=k.$val;aj=e.scanUint(c,8);$s=33;case 33:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai.$set((aj.$low<<24>>>24));$s=23;continue;case 14:ak=k.$val;al=e.scanUint(c,16);$s=34;case 34:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}ak.$set((al.$low<<16>>>16));$s=23;continue;case 15:am=k.$val;an=e.scanUint(c,32);$s=35;case 35:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}am.$set((an.$low>>>0));$s=23;continue;case 16:ao=k.$val;ap=e.scanUint(c,64);$s=36;case 36:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}ao.$set(ap);$s=23;continue;case 17:aq=k.$val;ar=e.scanUint(c,BB);$s=37;case 37:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}aq.$set((ar.$low>>>0));$s=23;continue;case 18:as=k.$val;if(e.okVerb(c,"beEfFgGv","float32")){$s=38;continue;}$s=39;continue;case 38:$r=e.skipSpace(false);$s=40;case 40:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=41;case 41:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}at=e.floatToken();$s=42;case 42:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}au=e.convertFloat(at,32);$s=43;case 43:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}as.$set($fround(au));case 39:$s=23;continue;case 19:av=k.$val;if(e.okVerb(c,"beEfFgGv","float64")){$s=44;continue;}$s=45;continue;case 44:$r=e.skipSpace(false);$s=46;case 46:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=47;case 47:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}aw=e.floatToken();$s=48;case 48:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}ax=e.convertFloat(aw,64);$s=49;case 49:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}av.$set(ax);case 45:$s=23;continue;case 20:ay=k.$val;az=e.convertString(c);$s=50;case 50:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}ay.$set(az);$s=23;continue;case 21:ba=k.$val;bb=e.convertString(c);$s=51;case 51:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}ba.$set(new CG($stringToBytes(bb)));$s=23;continue;case 22:bc=k;bd=G.ValueOf(bc);$s=52;case 52:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd;bf=be;if(!((bf.Kind()===22))){$s=53;continue;}$s=54;continue;case 53:bg=be.Type().String();$s=55;case 55:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}$r=e.errorString("type not a pointer: "+bg);$s=56;case 56:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 54:bh=bf.Elem();$s=57;case 57:if($c){$c=false;bh=bh.$blk();}if(bh&&bh.$blk!==undefined){break s;}bi=bh;bj=bi.Kind();if(bj===1){$s=58;continue;}if(bj===2||bj===3||bj===4||bj===5||bj===6){$s=59;continue;}if(bj===7||bj===8||bj===9||bj===10||bj===11||bj===12){$s=60;continue;}if(bj===24){$s=61;continue;}if(bj===23){$s=62;continue;}if(bj===13||bj===14){$s=63;continue;}if(bj===15||bj===16){$s=64;continue;}$s=65;continue;case 58:bk=e.scanBool(c);$s=67;case 67:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}$r=bi.SetBool(bk);$s=68;case 68:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 59:bl=c;bm=bi.Type().Bits();$s=69;case 69:if($c){$c=false;bm=bm.$blk();}if(bm&&bm.$blk!==undefined){break s;}bn=bm;bo=e.scanInt(bl,bn);$s=70;case 70:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}$r=bi.SetInt(bo);$s=71;case 71:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 60:bp=c;bq=bi.Type().Bits();$s=72;case 72:if($c){$c=false;bq=bq.$blk();}if(bq&&bq.$blk!==undefined){break s;}br=bq;bs=e.scanUint(bp,br);$s=73;case 73:if($c){$c=false;bs=bs.$blk();}if(bs&&bs.$blk!==undefined){break s;}$r=bi.SetUint(bs);$s=74;case 74:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 61:bt=e.convertString(c);$s=75;case 75:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}$r=bi.SetString(bt);$s=76;case 76:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 62:bu=bi.Type();bv=bu.Elem();$s=79;case 79:if($c){$c=false;bv=bv.$blk();}if(bv&&bv.$blk!==undefined){break s;}bw=bv.Kind();$s=80;case 80:if($c){$c=false;bw=bw.$blk();}if(bw&&bw.$blk!==undefined){break s;}if(!((bw===8))){$s=77;continue;}$s=78;continue;case 77:bx=be.Type().String();$s=81;case 81:if($c){$c=false;bx=bx.$blk();}if(bx&&bx.$blk!==undefined){break s;}$r=e.errorString("can't scan type: "+bx);$s=82;case 82:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 78:by=e.convertString(c);$s=83;case 83:if($c){$c=false;by=by.$blk();}if(by&&by.$blk!==undefined){break s;}bz=by;ca=G.MakeSlice(bu,bz.length,bz.length);$s=84;case 84:if($c){$c=false;ca=ca.$blk();}if(ca&&ca.$blk!==undefined){break s;}$r=bi.Set(ca);$s=85;case 85:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cb=0;case 86:if(!(cb>0;$s=86;continue;case 87:$s=66;continue;case 63:$r=e.skipSpace(false);$s=90;case 90:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=e.notEOF();$s=91;case 91:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}cd=e.floatToken();$s=92;case 92:if($c){$c=false;cd=cd.$blk();}if(cd&&cd.$blk!==undefined){break s;}ce=cd;cf=bi.Type().Bits();$s=93;case 93:if($c){$c=false;cf=cf.$blk();}if(cf&&cf.$blk!==undefined){break s;}cg=cf;ch=e.convertFloat(ce,cg);$s=94;case 94:if($c){$c=false;ch=ch.$blk();}if(ch&&ch.$blk!==undefined){break s;}$r=bi.SetFloat(ch);$s=95;case 95:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 64:ci=c;cj=bi.Type().Bits();$s=96;case 96:if($c){$c=false;cj=cj.$blk();}if(cj&&cj.$blk!==undefined){break s;}ck=cj;cl=e.scanComplex(ci,ck);$s=97;case 97:if($c){$c=false;cl=cl.$blk();}if(cl&&cl.$blk!==undefined){break s;}$r=bi.SetComplex(cl);$s=98;case 98:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=66;continue;case 65:cm=be.Type().String();$s=99;case 99:if($c){$c=false;cm=cm.$blk();}if(cm&&cm.$blk!==undefined){break s;}$r=e.errorString("can't scan type: "+cm);$s=100;case 100:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 66:case 23:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.scanOne};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.bo=bo;$f.bp=bp;$f.bq=bq;$f.br=br;$f.bs=bs;$f.bt=bt;$f.bu=bu;$f.bv=bv;$f.bw=bw;$f.bx=bx;$f.by=by;$f.bz=bz;$f.c=c;$f.ca=ca;$f.cb=cb;$f.cc=cc;$f.cd=cd;$f.ce=ce;$f.cf=cf;$f.cg=cg;$f.ch=ch;$f.ci=ci;$f.cj=cj;$f.ck=ck;$f.cl=cl;$f.cm=cm;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.scanOne=function(c,d){return this.$val.scanOne(c,d);};CF=function(c){var $ptr,c,d,e,f,g,h,i,j;d=$recover();if(!($interfaceIsEqual(d,$ifaceNil))){e=$assertType(d,BS,true);f=$clone(e[0],BS);g=e[1];if(g){c.$set(f.err);}else{h=$assertType(d,$error,true);i=h[0];j=h[1];if(j&&$interfaceIsEqual(i,E.EOF)){c.$set(i);}else{$panic(d);}}}};BT.ptr.prototype.doScan=function(c){var $ptr,c,d,e,f,g,h,i,j,k,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=[d];e=0;d[0]=$ifaceNil;f=this;$deferred.push([CF,[(d.$ptr||(d.$ptr=new DK(function(){return this.$target[0];},function($v){this.$target[0]=$v;},d)))]]);g=c;h=0;case 1:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);$r=f.scanOne(118,i);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e+(1)>>0;h++;$s=1;continue;case 2:if(f.ssave.nlIsEnd){$s=4;continue;}$s=5;continue;case 4:case 6:j=f.getRune();$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if((k===10)||(k===-1)){$s=7;continue;}if(!BW(k)){f.errorString("expected newline");$s=7;continue;}$s=6;continue;case 7:case 5:return[e,d[0]];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[e,d[0]];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:BT.ptr.prototype.doScan};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};BT.prototype.doScan=function(c){return this.$val.doScan(c);};DL.methods=[{prop:"clearflags",name:"clearflags",pkg:"fmt",typ:$funcType([],[],false)},{prop:"init",name:"init",pkg:"fmt",typ:$funcType([CL],[],false)},{prop:"computePadding",name:"computePadding",pkg:"fmt",typ:$funcType([$Int],[CG,$Int,$Int],false)},{prop:"writePadding",name:"writePadding",pkg:"fmt",typ:$funcType([$Int,CG],[],false)},{prop:"pad",name:"pad",pkg:"fmt",typ:$funcType([CG],[],false)},{prop:"padString",name:"padString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_boolean",name:"fmt_boolean",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"integer",name:"integer",pkg:"fmt",typ:$funcType([$Int64,$Uint64,$Bool,$String],[],false)},{prop:"truncate",name:"truncate",pkg:"fmt",typ:$funcType([$String],[$String],false)},{prop:"fmt_s",name:"fmt_s",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_sbx",name:"fmt_sbx",pkg:"fmt",typ:$funcType([$String,CG,$String],[],false)},{prop:"fmt_sx",name:"fmt_sx",pkg:"fmt",typ:$funcType([$String,$String],[],false)},{prop:"fmt_bx",name:"fmt_bx",pkg:"fmt",typ:$funcType([CG,$String],[],false)},{prop:"fmt_q",name:"fmt_q",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"fmt_qc",name:"fmt_qc",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"formatFloat",name:"formatFloat",pkg:"fmt",typ:$funcType([$Float64,$Uint8,$Int,$Int],[],false)},{prop:"fmt_e64",name:"fmt_e64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_E64",name:"fmt_E64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_f64",name:"fmt_f64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_g64",name:"fmt_g64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_G64",name:"fmt_G64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_fb64",name:"fmt_fb64",pkg:"fmt",typ:$funcType([$Float64],[],false)},{prop:"fmt_e32",name:"fmt_e32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_E32",name:"fmt_E32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_f32",name:"fmt_f32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_g32",name:"fmt_g32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_G32",name:"fmt_G32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_fb32",name:"fmt_fb32",pkg:"fmt",typ:$funcType([$Float32],[],false)},{prop:"fmt_c64",name:"fmt_c64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmt_c128",name:"fmt_c128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmt_complex",name:"fmt_complex",pkg:"fmt",typ:$funcType([$Float64,$Float64,$Int,$Int32],[],false)}];CL.methods=[{prop:"Write",name:"Write",pkg:"",typ:$funcType([CG],[$Int,$error],false)},{prop:"WriteString",name:"WriteString",pkg:"",typ:$funcType([$String],[$Int,$error],false)},{prop:"WriteByte",name:"WriteByte",pkg:"",typ:$funcType([$Uint8],[$error],false)},{prop:"WriteRune",name:"WriteRune",pkg:"",typ:$funcType([$Int32],[$error],false)}];CO.methods=[{prop:"free",name:"free",pkg:"fmt",typ:$funcType([],[],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"add",name:"add",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CG],[$Int,$error],false)},{prop:"unknownType",name:"unknownType",pkg:"fmt",typ:$funcType([G.Value],[],false)},{prop:"badVerb",name:"badVerb",pkg:"fmt",typ:$funcType([$Int32],[],false)},{prop:"fmtBool",name:"fmtBool",pkg:"fmt",typ:$funcType([$Bool,$Int32],[],false)},{prop:"fmtC",name:"fmtC",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtInt64",name:"fmtInt64",pkg:"fmt",typ:$funcType([$Int64,$Int32],[],false)},{prop:"fmt0x64",name:"fmt0x64",pkg:"fmt",typ:$funcType([$Uint64,$Bool],[],false)},{prop:"fmtUnicode",name:"fmtUnicode",pkg:"fmt",typ:$funcType([$Int64],[],false)},{prop:"fmtUint64",name:"fmtUint64",pkg:"fmt",typ:$funcType([$Uint64,$Int32],[],false)},{prop:"fmtFloat32",name:"fmtFloat32",pkg:"fmt",typ:$funcType([$Float32,$Int32],[],false)},{prop:"fmtFloat64",name:"fmtFloat64",pkg:"fmt",typ:$funcType([$Float64,$Int32],[],false)},{prop:"fmtComplex64",name:"fmtComplex64",pkg:"fmt",typ:$funcType([$Complex64,$Int32],[],false)},{prop:"fmtComplex128",name:"fmtComplex128",pkg:"fmt",typ:$funcType([$Complex128,$Int32],[],false)},{prop:"fmtString",name:"fmtString",pkg:"fmt",typ:$funcType([$String,$Int32],[],false)},{prop:"fmtBytes",name:"fmtBytes",pkg:"fmt",typ:$funcType([CG,$Int32,G.Type,$Int],[],false)},{prop:"fmtPointer",name:"fmtPointer",pkg:"fmt",typ:$funcType([G.Value,$Int32],[],false)},{prop:"catchPanic",name:"catchPanic",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32],[],false)},{prop:"clearSpecialFlags",name:"clearSpecialFlags",pkg:"fmt",typ:$funcType([],[$Bool,$Bool],false)},{prop:"restoreSpecialFlags",name:"restoreSpecialFlags",pkg:"fmt",typ:$funcType([$Bool,$Bool],[],false)},{prop:"handleMethods",name:"handleMethods",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Bool],false)},{prop:"printArg",name:"printArg",pkg:"fmt",typ:$funcType([$emptyInterface,$Int32,$Int],[$Bool],false)},{prop:"printValue",name:"printValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"printReflectValue",name:"printReflectValue",pkg:"fmt",typ:$funcType([G.Value,$Int32,$Int],[$Bool],false)},{prop:"argNumber",name:"argNumber",pkg:"fmt",typ:$funcType([$Int,$String,$Int,$Int],[$Int,$Int,$Bool],false)},{prop:"doPrintf",name:"doPrintf",pkg:"fmt",typ:$funcType([$String,CH],[],false)},{prop:"doPrint",name:"doPrint",pkg:"fmt",typ:$funcType([CH,$Bool,$Bool],[],false)}];CP.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([CG],[$Int,$error],false)}];CR.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([CG],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"getRune",name:"getRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"mustReadRune",name:"mustReadRune",pkg:"fmt",typ:$funcType([],[$Int32],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"error",name:"error",pkg:"fmt",typ:$funcType([$error],[],false)},{prop:"errorString",name:"errorString",pkg:"fmt",typ:$funcType([$String],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,DM],[CG,$error],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"free",name:"free",pkg:"fmt",typ:$funcType([BU],[],false)},{prop:"skipSpace",name:"skipSpace",pkg:"fmt",typ:$funcType([$Bool],[],false)},{prop:"token",name:"token",pkg:"fmt",typ:$funcType([$Bool,DM],[CG],false)},{prop:"consume",name:"consume",pkg:"fmt",typ:$funcType([$String,$Bool],[$Bool],false)},{prop:"peek",name:"peek",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"notEOF",name:"notEOF",pkg:"fmt",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"fmt",typ:$funcType([$String],[$Bool],false)},{prop:"okVerb",name:"okVerb",pkg:"fmt",typ:$funcType([$Int32,$String,$String],[$Bool],false)},{prop:"scanBool",name:"scanBool",pkg:"fmt",typ:$funcType([$Int32],[$Bool],false)},{prop:"getBase",name:"getBase",pkg:"fmt",typ:$funcType([$Int32],[$Int,$String],false)},{prop:"scanNumber",name:"scanNumber",pkg:"fmt",typ:$funcType([$String,$Bool],[$String],false)},{prop:"scanRune",name:"scanRune",pkg:"fmt",typ:$funcType([$Int],[$Int64],false)},{prop:"scanBasePrefix",name:"scanBasePrefix",pkg:"fmt",typ:$funcType([],[$Int,$String,$Bool],false)},{prop:"scanInt",name:"scanInt",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Int64],false)},{prop:"scanUint",name:"scanUint",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Uint64],false)},{prop:"floatToken",name:"floatToken",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"complexTokens",name:"complexTokens",pkg:"fmt",typ:$funcType([],[$String,$String],false)},{prop:"convertFloat",name:"convertFloat",pkg:"fmt",typ:$funcType([$String,$Int],[$Float64],false)},{prop:"scanComplex",name:"scanComplex",pkg:"fmt",typ:$funcType([$Int32,$Int],[$Complex128],false)},{prop:"convertString",name:"convertString",pkg:"fmt",typ:$funcType([$Int32],[$String],false)},{prop:"quotedString",name:"quotedString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"hexByte",name:"hexByte",pkg:"fmt",typ:$funcType([],[$Uint8,$Bool],false)},{prop:"hexString",name:"hexString",pkg:"fmt",typ:$funcType([],[$String],false)},{prop:"scanOne",name:"scanOne",pkg:"fmt",typ:$funcType([$Int32,$emptyInterface],[],false)},{prop:"doScan",name:"doScan",pkg:"fmt",typ:$funcType([CH],[$Int,$error],false)},{prop:"advance",name:"advance",pkg:"fmt",typ:$funcType([$String],[$Int],false)},{prop:"doScanf",name:"doScanf",pkg:"fmt",typ:$funcType([$String,CH],[$Int,$error],false)}];DN.methods=[{prop:"readByte",name:"readByte",pkg:"fmt",typ:$funcType([],[$Uint8,$error],false)},{prop:"unread",name:"unread",pkg:"fmt",typ:$funcType([CG],[],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)}];L.init([{prop:"widPresent",name:"widPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"precPresent",name:"precPresent",pkg:"fmt",typ:$Bool,tag:""},{prop:"minus",name:"minus",pkg:"fmt",typ:$Bool,tag:""},{prop:"plus",name:"plus",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharp",name:"sharp",pkg:"fmt",typ:$Bool,tag:""},{prop:"space",name:"space",pkg:"fmt",typ:$Bool,tag:""},{prop:"unicode",name:"unicode",pkg:"fmt",typ:$Bool,tag:""},{prop:"uniQuote",name:"uniQuote",pkg:"fmt",typ:$Bool,tag:""},{prop:"zero",name:"zero",pkg:"fmt",typ:$Bool,tag:""},{prop:"plusV",name:"plusV",pkg:"fmt",typ:$Bool,tag:""},{prop:"sharpV",name:"sharpV",pkg:"fmt",typ:$Bool,tag:""}]);M.init([{prop:"intbuf",name:"intbuf",pkg:"fmt",typ:CK,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:CL,tag:""},{prop:"wid",name:"wid",pkg:"fmt",typ:$Int,tag:""},{prop:"prec",name:"prec",pkg:"fmt",typ:$Int,tag:""},{prop:"fmtFlags",name:"",pkg:"fmt",typ:L,tag:""}]);AF.init([{prop:"Flag",name:"Flag",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Precision",name:"Precision",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)},{prop:"Write",name:"Write",pkg:"",typ:$funcType([CG],[$Int,$error],false)}]);AG.init([{prop:"Format",name:"Format",pkg:"",typ:$funcType([AF,$Int32],[],false)}]);AH.init([{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AI.init([{prop:"GoString",name:"GoString",pkg:"",typ:$funcType([],[$String],false)}]);AJ.init($Uint8);AK.init([{prop:"n",name:"n",pkg:"fmt",typ:$Int,tag:""},{prop:"panicking",name:"panicking",pkg:"fmt",typ:$Bool,tag:""},{prop:"erroring",name:"erroring",pkg:"fmt",typ:$Bool,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"arg",name:"arg",pkg:"fmt",typ:$emptyInterface,tag:""},{prop:"value",name:"value",pkg:"fmt",typ:G.Value,tag:""},{prop:"reordered",name:"reordered",pkg:"fmt",typ:$Bool,tag:""},{prop:"goodArgNum",name:"goodArgNum",pkg:"fmt",typ:$Bool,tag:""},{prop:"runeBuf",name:"runeBuf",pkg:"fmt",typ:CJ,tag:""},{prop:"fmt",name:"fmt",pkg:"fmt",typ:M,tag:""}]);BF.init([{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)}]);BG.init([{prop:"Read",name:"Read",pkg:"",typ:$funcType([CG],[$Int,$error],false)},{prop:"ReadRune",name:"ReadRune",pkg:"",typ:$funcType([],[$Int32,$Int,$error],false)},{prop:"SkipSpace",name:"SkipSpace",pkg:"",typ:$funcType([],[],false)},{prop:"Token",name:"Token",pkg:"",typ:$funcType([$Bool,DM],[CG,$error],false)},{prop:"UnreadRune",name:"UnreadRune",pkg:"",typ:$funcType([],[$error],false)},{prop:"Width",name:"Width",pkg:"",typ:$funcType([],[$Int,$Bool],false)}]);BH.init([{prop:"Scan",name:"Scan",pkg:"",typ:$funcType([BG,$Int32],[$error],false)}]);BS.init([{prop:"err",name:"err",pkg:"fmt",typ:$error,tag:""}]);BT.init([{prop:"rr",name:"rr",pkg:"fmt",typ:E.RuneReader,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:AJ,tag:""},{prop:"peekRune",name:"peekRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"prevRune",name:"prevRune",pkg:"fmt",typ:$Int32,tag:""},{prop:"count",name:"count",pkg:"fmt",typ:$Int,tag:""},{prop:"atEOF",name:"atEOF",pkg:"fmt",typ:$Bool,tag:""},{prop:"ssave",name:"",pkg:"fmt",typ:BU,tag:""}]);BU.init([{prop:"validSave",name:"validSave",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsEnd",name:"nlIsEnd",pkg:"fmt",typ:$Bool,tag:""},{prop:"nlIsSpace",name:"nlIsSpace",pkg:"fmt",typ:$Bool,tag:""},{prop:"argLimit",name:"argLimit",pkg:"fmt",typ:$Int,tag:""},{prop:"limit",name:"limit",pkg:"fmt",typ:$Int,tag:""},{prop:"maxWid",name:"maxWid",pkg:"fmt",typ:$Int,tag:""}]);BY.init([{prop:"reader",name:"reader",pkg:"fmt",typ:E.Reader,tag:""},{prop:"buf",name:"buf",pkg:"fmt",typ:CJ,tag:""},{prop:"pending",name:"pending",pkg:"fmt",typ:$Int,tag:""},{prop:"pendBuf",name:"pendBuf",pkg:"fmt",typ:CJ,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}I=$makeSlice(CG,65);J=$makeSlice(CG,65);N=new CG($stringToBytes("true"));O=new CG($stringToBytes("false"));Q=new CG($stringToBytes(", "));R=new CG($stringToBytes(""));S=new CG($stringToBytes("(nil)"));T=new CG($stringToBytes("nil"));U=new CG($stringToBytes("map["));V=new CG($stringToBytes("%!"));W=new CG($stringToBytes("(MISSING)"));X=new CG($stringToBytes("(BADINDEX)"));Y=new CG($stringToBytes("(PANIC="));Z=new CG($stringToBytes("%!(EXTRA "));AA=new CG($stringToBytes("i)"));AB=new CG($stringToBytes("[]byte{"));AC=new CG($stringToBytes("%!(BADWIDTH)"));AD=new CG($stringToBytes("%!(BADPREC)"));AE=new CG($stringToBytes("%!(NOVERB)"));AL=new H.Pool.ptr(0,0,CH.nil,(function(){var $ptr;return new AK.ptr(0,false,false,AJ.nil,$ifaceNil,new G.Value.ptr(CI.nil,0,0),false,false,CJ.zero(),new M.ptr(CK.zero(),CL.nil,0,0,new L.ptr(false,false,false,false,false,false,false,false,false,false,false)));}));a=G.TypeOf(new $Int(0)).Bits();$s=9;case 9:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}BA=a;b=G.TypeOf(new $Uintptr(0)).Bits();$s=10;case 10:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}BB=b;BC=G.TypeOf(new $Uint8(0));BV=new CN([$toNativeArray($kindUint16,[9,13]),$toNativeArray($kindUint16,[32,32]),$toNativeArray($kindUint16,[133,133]),$toNativeArray($kindUint16,[160,160]),$toNativeArray($kindUint16,[5760,5760]),$toNativeArray($kindUint16,[8192,8202]),$toNativeArray($kindUint16,[8232,8233]),$toNativeArray($kindUint16,[8239,8239]),$toNativeArray($kindUint16,[8287,8287]),$toNativeArray($kindUint16,[12288,12288])]);BZ=new H.Pool.ptr(0,0,CH.nil,(function(){var $ptr;return new BT.ptr($ifaceNil,AJ.nil,0,0,0,false,new BU.ptr(false,false,false,0,0,0));}));CB=D.New("syntax error scanning complex number");CC=D.New("syntax error scanning boolean");K();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["sort"]=(function(){var $pkg={},$init,U,AG,A,D,F,G,H,I,J,K,L,M,N,X;U=$pkg.StringSlice=$newType(12,$kindSlice,"sort.StringSlice","StringSlice","sort",null);AG=$sliceType($String);A=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=0;d=a;e=c;f=d;case 1:if(!(e>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"))>>0;i=b(h);$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=3;continue;}$s=4;continue;case 3:e=h+1>>0;$s=5;continue;case 4:f=h;case 5:$s=1;continue;case 2:return e;}return;}if($f===undefined){$f={$blk:A};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Search=A;D=function(a,b){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=A(a[0].$length,(function(a,b){return function(c){var $ptr,c;return((c<0||c>=a[0].$length)?$throwRuntimeError("index out of range"):a[0].$array[a[0].$offset+c])>=b[0];};})(a,b));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:D};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};$pkg.SearchStrings=D;U.prototype.Search=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=D($subslice(new AG(b.$array),b.$offset,b.$offset+b.$length),a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:U.prototype.Search};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(U).prototype.Search=function(a){return this.$get().Search(a);};F=function(a,b){var $ptr,a,b;if(a>0;case 1:if(!(db)){f=false;$s=5;continue s;}g=a.Less(e,e-1>>0);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;case 5:if(!(f)){$s=4;continue;}$r=a.Swap(e,e-1>>0);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e-(1)>>0;$s=3;continue;case 4:d=d+(1)>>0;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};H=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=b;case 1:f=(2*e>>0)+1>>0;if(f>=c){$s=2;continue;}if(!((f+1>>0)>0,(d+f>>0)+1>>0);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 5:if(g){$s=3;continue;}$s=4;continue;case 3:f=f+(1)>>0;case 4:i=a.Less(d+e>>0,d+f>>0);$s=9;case 9:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=7;continue;}$s=8;continue;case 7:return;case 8:$r=a.Swap(d+e>>0,d+f>>0);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=f;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};I=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=b;e=0;f=c-b>>0;h=(g=((f-1>>0))/2,(g===g&&g!==1/0&&g!==-1/0)?g>>0:$throwRuntimeError("integer divide by zero"));case 1:if(!(h>=0)){$s=2;continue;}$r=H(a,h,f,d);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=h-(1)>>0;$s=1;continue;case 2:i=f-1>>0;case 4:if(!(i>=0)){$s=5;continue;}$r=a.Swap(d,d+i>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H(a,e,i,d);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i=i-(1)>>0;$s=4;continue;case 5:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};J=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=a.Less(b,c);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=1;continue;}$s=2;continue;case 1:$r=a.Swap(b,c);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:f=a.Less(d,b);$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f){$s=5;continue;}$s=6;continue;case 5:$r=a.Swap(d,b);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=a.Less(b,c);$s=11;case 11:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=9;continue;}$s=10;continue;case 9:$r=a.Swap(b,c);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 10:case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};K=function(a,b,c,d){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=0;case 1:if(!(e>0,c+e>>0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}e=e+(1)>>0;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};L=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=0;e=0;g=b+(f=((c-b>>0))/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"))>>0;if((c-b>>0)>40){$s=1;continue;}$s=2;continue;case 1:i=(h=((c-b>>0))/8,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"));$r=J(a,b,b+i>>0,b+(2*i>>0)>>0);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J(a,g,g-i>>0,g+i>>0);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J(a,c-1>>0,(c-1>>0)-i>>0,(c-1>>0)-(2*i>>0)>>0);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$r=J(a,b,g,c-1>>0);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=b;k=b+1>>0;l=b+1>>0;m=c;n=c;o=k;p=l;q=m;r=n;case 7:case 9:if(!(p>0;$s=14;continue;case 12:$r=a.Swap(o,p);$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}o=o+(1)>>0;p=p+(1)>>0;$s=14;continue;case 13:$s=10;continue;case 14:$s=9;continue;case 10:case 18:if(!(p>0);$s=24;case 24:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}if(u){$s=20;continue;}v=a.Less(q-1>>0,j);$s=25;case 25:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}if(!v){$s=21;continue;}$s=22;continue;case 20:q=q-(1)>>0;$s=23;continue;case 21:$r=a.Swap(q-1>>0,r-1>>0);$s=26;case 26:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}q=q-(1)>>0;r=r-(1)>>0;$s=23;continue;case 22:$s=19;continue;case 23:$s=18;continue;case 19:if(p>=q){$s=8;continue;}$r=a.Swap(p,q-1>>0);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=p+(1)>>0;q=q-(1)>>0;$s=7;continue;case 8:w=F(p-o>>0,o-b>>0);$r=K(a,b,p-w>>0,w);$s=28;case 28:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}w=F(c-r>>0,r-q>>0);$r=K(a,q,c-w>>0,w);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}x=(b+p>>0)-o>>0;y=c-((r-q>>0))>>0;d=x;e=y;return[d,e];}return;}if($f===undefined){$f={$blk:L};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.$s=$s;$f.$r=$r;return $f;};M=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:case 1:if(!((c-b>>0)>7)){$s=2;continue;}if(d===0){$s=3;continue;}$s=4;continue;case 3:$r=I(a,b,c);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 4:d=d-(1)>>0;f=L(a,b,c);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[0];h=e[1];if((g-b>>0)<(c-h>>0)){$s=7;continue;}$s=8;continue;case 7:$r=M(a,b,g,d);$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b=h;$s=9;continue;case 8:$r=M(a,h,c,d);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=g;case 9:$s=1;continue;case 2:if((c-b>>0)>1){$s=12;continue;}$s=13;continue;case 12:$r=G(a,b,c);$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 13:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:M};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};N=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=a.Len();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=0;e=c;while(true){if(!(e>0)){break;}d=d+(1)>>0;e=(e>>$min((1),31))>>0;}d=d*(2)>>0;$r=M(a,0,c,d);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:N};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sort=N;U.prototype.Len=function(){var $ptr,a;a=this;return a.$length;};$ptrType(U).prototype.Len=function(){return this.$get().Len();};U.prototype.Less=function(a,b){var $ptr,a,b,c;c=this;return((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a])<((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);};$ptrType(U).prototype.Less=function(a,b){return this.$get().Less(a,b);};U.prototype.Swap=function(a,b){var $ptr,a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d);((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e);};$ptrType(U).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};U.prototype.Sort=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;$r=N(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:U.prototype.Sort};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(U).prototype.Sort=function(){return this.$get().Sort();};X=function(a){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=N($subslice(new U(a.$array),a.$offset,a.$offset+a.$length));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:X};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Strings=X;U.methods=[{prop:"Search",name:"Search",pkg:"",typ:$funcType([$String],[$Int],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Sort",name:"Sort",pkg:"",typ:$funcType([],[],false)}];U.init($String);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["flag"]=(function(){var $pkg={},$init,A,B,C,D,E,F,G,H,J,K,M,O,Q,S,U,W,Y,AA,AB,AC,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,a,I,L,N,P,R,T,V,X,AD,AI,AJ,AK,AL,AR,AT,AX,BB,BF,BJ;A=$packages["errors"];B=$packages["fmt"];C=$packages["io"];D=$packages["os"];E=$packages["sort"];F=$packages["strconv"];G=$packages["time"];H=$pkg.boolValue=$newType(1,$kindBool,"flag.boolValue","boolValue","flag",null);J=$pkg.boolFlag=$newType(8,$kindInterface,"flag.boolFlag","boolFlag","flag",null);K=$pkg.intValue=$newType(4,$kindInt,"flag.intValue","intValue","flag",null);M=$pkg.int64Value=$newType(8,$kindInt64,"flag.int64Value","int64Value","flag",null);O=$pkg.uintValue=$newType(4,$kindUint,"flag.uintValue","uintValue","flag",null);Q=$pkg.uint64Value=$newType(8,$kindUint64,"flag.uint64Value","uint64Value","flag",null);S=$pkg.stringValue=$newType(8,$kindString,"flag.stringValue","stringValue","flag",null);U=$pkg.float64Value=$newType(8,$kindFloat64,"flag.float64Value","float64Value","flag",null);W=$pkg.durationValue=$newType(8,$kindInt64,"flag.durationValue","durationValue","flag",null);Y=$pkg.Value=$newType(8,$kindInterface,"flag.Value","Value","flag",null);AA=$pkg.ErrorHandling=$newType(4,$kindInt,"flag.ErrorHandling","ErrorHandling","flag",null);AB=$pkg.FlagSet=$newType(0,$kindStruct,"flag.FlagSet","FlagSet","flag",function(Usage_,name_,parsed_,actual_,formal_,args_,errorHandling_,output_){this.$val=this;if(arguments.length===0){this.Usage=$throwNilPointerError;this.name="";this.parsed=false;this.actual=false;this.formal=false;this.args=CD.nil;this.errorHandling=0;this.output=$ifaceNil;return;}this.Usage=Usage_;this.name=name_;this.parsed=parsed_;this.actual=actual_;this.formal=formal_;this.args=args_;this.errorHandling=errorHandling_;this.output=output_;});AC=$pkg.Flag=$newType(0,$kindStruct,"flag.Flag","Flag","flag",function(Name_,Usage_,Value_,DefValue_){this.$val=this;if(arguments.length===0){this.Name="";this.Usage="";this.Value=$ifaceNil;this.DefValue="";return;}this.Name=Name_;this.Usage=Usage_;this.Value=Value_;this.DefValue=DefValue_;});BK=$sliceType($emptyInterface);BL=$ptrType(H);BM=$ptrType(K);BN=$ptrType(M);BO=$ptrType(O);BP=$ptrType(Q);BQ=$ptrType(S);BR=$ptrType(U);BS=$ptrType(W);BT=$ptrType(G.Duration);BU=$ptrType(AC);BV=$sliceType(BU);BW=$ptrType($Bool);BX=$ptrType($Int);BY=$ptrType($Int64);BZ=$ptrType($Uint);CA=$ptrType($Uint64);CB=$ptrType($String);CC=$ptrType($Float64);CD=$sliceType($String);CE=$funcType([BU],[],false);CF=$ptrType(AB);CG=$funcType([],[],false);CH=$mapType($String,BU);I=function(b,c){var $ptr,b,c,d;c.$set(b);return(d=c,new BL(function(){return d.$get();},function($v){d.$set($v);},d.$target));};$ptrType(H).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseBool(b);e=d[0];f=d[1];c.$set(e);return f;};$ptrType(H).prototype.Get=function(){var $ptr,b;b=this;return new $Bool(b.$get());};$ptrType(H).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([new H(b.$get())]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(H).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(H).prototype.IsBoolFlag=function(){var $ptr,b;b=this;return true;};L=function(b,c){var $ptr,b,c,d;c.$set(b);return(d=c,new BM(function(){return(d.$get()>>0);},function($v){d.$set(($v>>0));},d.$target));};$ptrType(K).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseInt(b,0,64);e=d[0];f=d[1];c.$set(((e.$low+((e.$high>>31)*4294967296))>>0));return f;};$ptrType(K).prototype.Get=function(){var $ptr,b;b=this;return new $Int((b.$get()>>0));};$ptrType(K).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([new K(b.$get())]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(K).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};N=function(b,c){var $ptr,b,c,d,e;c.$set(b);return(d=c,new BN(function(){return(e=d.$get(),new M(e.$high,e.$low));},function($v){d.$set(new $Int64($v.$high,$v.$low));},d.$target));};$ptrType(M).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseInt(b,0,64);e=d[0];f=d[1];c.$set(new M(e.$high,e.$low));return f;};$ptrType(M).prototype.Get=function(){var $ptr,b,c;b=this;return(c=b.$get(),new $Int64(c.$high,c.$low));};$ptrType(M).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([b.$get()]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(M).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};P=function(b,c){var $ptr,b,c,d;c.$set(b);return(d=c,new BO(function(){return(d.$get()>>>0);},function($v){d.$set(($v>>>0));},d.$target));};$ptrType(O).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseUint(b,0,64);e=d[0];f=d[1];c.$set((e.$low>>>0));return f;};$ptrType(O).prototype.Get=function(){var $ptr,b;b=this;return new $Uint((b.$get()>>>0));};$ptrType(O).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([new O(b.$get())]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(O).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};R=function(b,c){var $ptr,b,c,d,e;c.$set(b);return(d=c,new BP(function(){return(e=d.$get(),new Q(e.$high,e.$low));},function($v){d.$set(new $Uint64($v.$high,$v.$low));},d.$target));};$ptrType(Q).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseUint(b,0,64);e=d[0];f=d[1];c.$set(new Q(e.$high,e.$low));return f;};$ptrType(Q).prototype.Get=function(){var $ptr,b,c;b=this;return(c=b.$get(),new $Uint64(c.$high,c.$low));};$ptrType(Q).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([b.$get()]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(Q).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};T=function(b,c){var $ptr,b,c,d;c.$set(b);return(d=c,new BQ(function(){return d.$get();},function($v){d.$set($v);},d.$target));};$ptrType(S).prototype.Set=function(b){var $ptr,b,c;c=this;c.$set(b);return $ifaceNil;};$ptrType(S).prototype.Get=function(){var $ptr,b;b=this;return new $String(b.$get());};$ptrType(S).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%s",new BK([new S(b.$get())]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(S).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};V=function(b,c){var $ptr,b,c,d;c.$set(b);return(d=c,new BR(function(){return d.$get();},function($v){d.$set($v);},d.$target));};$ptrType(U).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=F.ParseFloat(b,64);e=d[0];f=d[1];c.$set(e);return f;};$ptrType(U).prototype.Get=function(){var $ptr,b;b=this;return new $Float64(b.$get());};$ptrType(U).prototype.String=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.Sprintf("%v",new BK([new U(b.$get())]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:$ptrType(U).prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};X=function(b,c){var $ptr,b,c,d,e;c.$set(b);return(d=c,new BS(function(){return(e=d.$get(),new W(e.$high,e.$low));},function($v){d.$set(new G.Duration($v.$high,$v.$low));},d.$target));};$ptrType(W).prototype.Set=function(b){var $ptr,b,c,d,e,f;c=this;d=G.ParseDuration(b);e=d[0];f=d[1];c.$set(new W(e.$high,e.$low));return f;};$ptrType(W).prototype.Get=function(){var $ptr,b,c;b=this;return(c=b.$get(),new G.Duration(c.$high,c.$low));};$ptrType(W).prototype.String=function(){var $ptr,b,c,d;b=this;return(c=b,new BT(function(){return(d=c.$get(),new G.Duration(d.$high,d.$low));},function($v){c.$set(new W($v.$high,$v.$low));},c.$target)).String();};AD=function(b){var $ptr,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$makeSlice(E.StringSlice,$keys(b).length);d=0;e=b;f=0;g=$keys(e);while(true){if(!(f=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=i.Name);d=d+(1)>>0;f++;}$r=c.Sort();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=$makeSlice(BV,c.$length);k=c;l=0;while(true){if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);((m<0||m>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+m]=(o=b[$String.keyFor(n)],o!==undefined?o.v:BU.nil));l++;}return j;}return;}if($f===undefined){$f={$blk:AD};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};AB.ptr.prototype.out=function(){var $ptr,b;b=this;if($interfaceIsEqual(b.output,$ifaceNil)){return D.Stderr;}return b.output;};AB.prototype.out=function(){return this.$val.out();};AB.ptr.prototype.SetOutput=function(b){var $ptr,b,c;c=this;c.output=b;};AB.prototype.SetOutput=function(b){return this.$val.SetOutput(b);};AB.ptr.prototype.VisitAll=function(b){var $ptr,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=AD(c.formal);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=0;case 2:if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f]);$r=b(g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=2;continue;case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.VisitAll};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.VisitAll=function(b){return this.$val.VisitAll(b);};AB.ptr.prototype.Visit=function(b){var $ptr,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=AD(c.actual);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=0;case 2:if(!(f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f]);$r=b(g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=2;continue;case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Visit};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Visit=function(b){return this.$val.Visit(b);};AB.ptr.prototype.Lookup=function(b){var $ptr,b,c,d;c=this;return(d=c.formal[$String.keyFor(b)],d!==undefined?d.v:BU.nil);};AB.prototype.Lookup=function(b){return this.$val.Lookup(b);};AB.ptr.prototype.Set=function(b,c){var $ptr,b,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=(f=d.formal[$String.keyFor(b)],f!==undefined?[f.v,true]:[BU.nil,false]);g=e[0];h=e[1];if(!h){$s=1;continue;}$s=2;continue;case 1:i=B.Errorf("no such flag -%v",new BK([new $String(b)]));$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;case 2:j=g.Value.Set(c);$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!($interfaceIsEqual(k,$ifaceNil))){return k;}if(d.actual===false){d.actual={};}l=b;(d.actual||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(l)]={k:l,v:g};return $ifaceNil;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Set};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Set=function(b,c){return this.$val.Set(b,c);};AI=function(b){var $ptr,b,c;c=b;if(c==="false"){return true;}else if(c===""){return true;}else if(c==="0"){return true;}return false;};AJ=function(b){var $ptr,b,c,d,e,f,g,h,i;c="";d="";d=b.Usage;e=0;while(true){if(!(e>0;while(true){if(!(f>0),f);d=d.substring(0,e)+c+d.substring((f+1>>0));g=c;h=d;c=g;d=h;return[c,d];}f=f+(1)>>0;}break;}e=e+(1)>>0;}c="value";i=b.Value;if($assertType(i,J,true)[1]){c="";}else if($assertType(i,BS,true)[1]){c="duration";}else if($assertType(i,BR,true)[1]){c="float";}else if($assertType(i,BM,true)[1]||$assertType(i,BN,true)[1]){c="int";}else if($assertType(i,BQ,true)[1]){c="string";}else if($assertType(i,BO,true)[1]||$assertType(i,BP,true)[1]){c="uint";}return[c,d];};$pkg.UnquoteUsage=AJ;AB.ptr.prototype.PrintDefaults=function(){var $ptr,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=[b];b[0]=this;$r=b[0].VisitAll((function(b){return function $b(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=B.Sprintf(" -%s",new BK([new $String(c.Name)]));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=AJ(c);g=f[0];h=f[1];if(g.length>0){e=e+(" "+g);}if(e.length<=4){e=e+("\t");}else{e=e+("\n \t");}e=e+(h);if(!AI(c.DefValue)){$s=2;continue;}$s=3;continue;case 2:i=$assertType(c.Value,BQ,true);j=i[1];if(j){$s=4;continue;}$s=5;continue;case 4:k=B.Sprintf(" (default %q)",new BK([new $String(c.DefValue)]));$s=7;case 7:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}e=e+(k);$s=6;continue;case 5:l=B.Sprintf(" (default %v)",new BK([new $String(c.DefValue)]));$s=8;case 8:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}e=e+(l);case 6:case 3:m=B.Fprint(b[0].out(),new BK([new $String(e),new $String("\n")]));$s=9;case 9:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};})(b));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.PrintDefaults};}$f.$ptr=$ptr;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.PrintDefaults=function(){return this.$val.PrintDefaults();};AK=function(){var $ptr,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=$pkg.CommandLine.PrintDefaults();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AK};}$f.$ptr=$ptr;$f.$s=$s;$f.$r=$r;return $f;};$pkg.PrintDefaults=AK;AL=function(b){var $ptr,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(b.name===""){$s=1;continue;}$s=2;continue;case 1:c=B.Fprintf(b.out(),"Usage:\n",new BK([]));$s=4;case 4:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$s=3;continue;case 2:d=B.Fprintf(b.out(),"Usage of %s:\n",new BK([new $String(b.name)]));$s=5;case 5:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;case 3:$r=b.PrintDefaults();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AL};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AB.ptr.prototype.NFlag=function(){var $ptr,b;b=this;return $keys(b.actual).length;};AB.prototype.NFlag=function(){return this.$val.NFlag();};AB.ptr.prototype.Arg=function(b){var $ptr,b,c,d;c=this;if(b<0||b>=c.args.$length){return"";}return(d=c.args,((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b]));};AB.prototype.Arg=function(b){return this.$val.Arg(b);};AB.ptr.prototype.NArg=function(){var $ptr,b;b=this;return b.args.$length;};AB.prototype.NArg=function(){return this.$val.NArg();};AB.ptr.prototype.Args=function(){var $ptr,b;b=this;return b.args;};AB.prototype.Args=function(){return this.$val.Args();};AB.ptr.prototype.BoolVar=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(I(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.BoolVar};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.BoolVar=function(b,c,d,e){return this.$val.BoolVar(b,c,d,e);};AB.ptr.prototype.Bool=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(false,BW);$r=e.BoolVar(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Bool};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Bool=function(b,c,d){return this.$val.Bool(b,c,d);};AR=function(b,c,d){var $ptr,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$pkg.CommandLine.Bool(b,c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AR};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Bool=AR;AB.ptr.prototype.IntVar=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(L(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.IntVar};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.IntVar=function(b,c,d,e){return this.$val.IntVar(b,c,d,e);};AB.ptr.prototype.Int=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(0,BX);$r=e.IntVar(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Int};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Int=function(b,c,d){return this.$val.Int(b,c,d);};AT=function(b,c,d){var $ptr,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$pkg.CommandLine.Int(b,c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AT};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Int=AT;AB.ptr.prototype.Int64Var=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(N(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Int64Var};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Int64Var=function(b,c,d,e){return this.$val.Int64Var(b,c,d,e);};AB.ptr.prototype.Int64=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(new $Int64(0,0),BY);$r=e.Int64Var(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Int64};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Int64=function(b,c,d){return this.$val.Int64(b,c,d);};AB.ptr.prototype.UintVar=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(P(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.UintVar};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.UintVar=function(b,c,d,e){return this.$val.UintVar(b,c,d,e);};AB.ptr.prototype.Uint=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(0,BZ);$r=e.UintVar(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Uint};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Uint=function(b,c,d){return this.$val.Uint(b,c,d);};AX=function(b,c,d){var $ptr,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$pkg.CommandLine.Uint(b,c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AX};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Uint=AX;AB.ptr.prototype.Uint64Var=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(R(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Uint64Var};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Uint64Var=function(b,c,d,e){return this.$val.Uint64Var(b,c,d,e);};AB.ptr.prototype.Uint64=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(new $Uint64(0,0),CA);$r=e.Uint64Var(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Uint64};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Uint64=function(b,c,d){return this.$val.Uint64(b,c,d);};AB.ptr.prototype.StringVar=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(T(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.StringVar};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.StringVar=function(b,c,d,e){return this.$val.StringVar(b,c,d,e);};AB.ptr.prototype.String=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer("",CB);$r=e.StringVar(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.String};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.String=function(b,c,d){return this.$val.String(b,c,d);};BB=function(b,c,d){var $ptr,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$pkg.CommandLine.String(b,c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BB};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.String=BB;AB.ptr.prototype.Float64Var=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(V(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Float64Var};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Float64Var=function(b,c,d,e){return this.$val.Float64Var(b,c,d,e);};AB.ptr.prototype.Float64=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(0,CC);$r=e.Float64Var(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Float64};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Float64=function(b,c,d){return this.$val.Float64(b,c,d);};AB.ptr.prototype.DurationVar=function(b,c,d,e){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;$r=f.Var(X(d,b),c,e);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.DurationVar};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.DurationVar=function(b,c,d,e){return this.$val.DurationVar(b,c,d,e);};AB.ptr.prototype.Duration=function(b,c,d){var $ptr,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=$newDataPointer(new G.Duration(0,0),BT);$r=e.DurationVar(f,b,c,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Duration};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Duration=function(b,c,d){return this.$val.Duration(b,c,d);};BF=function(b,c,d){var $ptr,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$pkg.CommandLine.Duration(b,c,d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BF};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Duration=BF;AB.ptr.prototype.Var=function(b,c,d){var $ptr,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=b.String();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=new AC.ptr(c,d,b,f);h=(i=e.formal[$String.keyFor(c)],i!==undefined?[i.v,true]:[BU.nil,false]);j=h[1];if(j){$s=2;continue;}$s=3;continue;case 2:k="";if(e.name===""){$s=4;continue;}$s=5;continue;case 4:l=B.Sprintf("flag redefined: %s",new BK([new $String(c)]));$s=7;case 7:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;$s=6;continue;case 5:m=B.Sprintf("%s flag redefined: %s",new BK([new $String(e.name),new $String(c)]));$s=8;case 8:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;case 6:n=B.Fprintln(e.out(),new BK([new $String(k)]));$s=9;case 9:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;$panic(new $String(k));case 3:if(e.formal===false){e.formal={};}o=c;(e.formal||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(o)]={k:o,v:g};$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Var};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Var=function(b,c,d){return this.$val.Var(b,c,d);};AB.ptr.prototype.failf=function(b,c){var $ptr,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=B.Errorf(b,c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=B.Fprintln(d.out(),new BK([f]));$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;$r=d.usage();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.failf};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.failf=function(b,c){return this.$val.failf(b,c);};AB.ptr.prototype.usage=function(){var $ptr,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if(b.Usage===$throwNilPointerError){$s=1;continue;}$s=2;continue;case 1:if(b===$pkg.CommandLine){$s=4;continue;}$s=5;continue;case 4:$r=$pkg.Usage();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=6;continue;case 5:$r=AL(b);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=3;continue;case 2:$r=b.Usage();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.usage};}$f.$ptr=$ptr;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.usage=function(){return this.$val.usage();};AB.ptr.prototype.parseOne=function(){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if(b.args.$length===0){return[false,$ifaceNil];}d=(c=b.args,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]));if((d.length===0)||!((d.charCodeAt(0)===45))||(d.length===1)){return[false,$ifaceNil];}e=1;if(d.charCodeAt(1)===45){e=e+(1)>>0;if(d.length===2){b.args=$subslice(b.args,1);return[false,$ifaceNil];}}f=d.substring(e);if((f.length===0)||(f.charCodeAt(0)===45)||(f.charCodeAt(0)===61)){$s=1;continue;}$s=2;continue;case 1:g=b.failf("bad flag syntax: %s",new BK([new $String(d)]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return[false,g];case 2:b.args=$subslice(b.args,1);h=false;i="";j=1;while(true){if(!(j>0));h=true;f=f.substring(0,j);break;}j=j+(1)>>0;}k=b.formal;l=(m=k[$String.keyFor(f)],m!==undefined?[m.v,true]:[BU.nil,false]);n=l[0];o=l[1];if(!o){$s=4;continue;}$s=5;continue;case 4:if(f==="help"||f==="h"){$s=6;continue;}$s=7;continue;case 6:$r=b.usage();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[false,$pkg.ErrHelp];case 7:p=b.failf("flag provided but not defined: -%s",new BK([new $String(f)]));$s=9;case 9:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return[false,p];case 5:q=$assertType(n.Value,J,true);r=q[0];s=q[1];if(!(s)){t=false;$s=13;continue s;}u=r.IsBoolFlag();$s=14;case 14:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;case 13:if(t){$s=10;continue;}$s=11;continue;case 10:if(h){$s=15;continue;}$s=16;continue;case 15:v=r.Set(i);$s=18;case 18:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v;if(!($interfaceIsEqual(w,$ifaceNil))){$s=19;continue;}$s=20;continue;case 19:x=b.failf("invalid boolean value %q for -%s: %v",new BK([new $String(i),new $String(f),w]));$s=21;case 21:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}return[false,x];case 20:$s=17;continue;case 16:y=r.Set("true");$s=22;case 22:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;if(!($interfaceIsEqual(z,$ifaceNil))){$s=23;continue;}$s=24;continue;case 23:aa=b.failf("invalid boolean flag %s: %v",new BK([new $String(f),z]));$s=25;case 25:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}return[false,aa];case 24:case 17:$s=12;continue;case 11:if(!h&&b.args.$length>0){h=true;ab=(ac=b.args,(0>=ac.$length?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+0]));ad=$subslice(b.args,1);i=ab;b.args=ad;}if(!h){$s=26;continue;}$s=27;continue;case 26:ae=b.failf("flag needs an argument: -%s",new BK([new $String(f)]));$s=28;case 28:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}return[false,ae];case 27:af=n.Value.Set(i);$s=29;case 29:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=af;if(!($interfaceIsEqual(ag,$ifaceNil))){$s=30;continue;}$s=31;continue;case 30:ah=b.failf("invalid value %q for flag -%s: %v",new BK([new $String(i),new $String(f),ag]));$s=32;case 32:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}return[false,ah];case 31:case 12:if(b.actual===false){b.actual={};}ai=f;(b.actual||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(ai)]={k:ai,v:n};return[true,$ifaceNil];}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.parseOne};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.parseOne=function(){return this.$val.parseOne();};AB.ptr.prototype.Parse=function(b){var $ptr,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;c.parsed=true;c.args=b;case 1:e=c.parseOne();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(f){$s=1;continue;}if($interfaceIsEqual(g,$ifaceNil)){$s=2;continue;}h=c.errorHandling;if(h===0){return g;}else if(h===1){D.Exit(2);}else if(h===2){$panic(g);}$s=1;continue;case 2:return $ifaceNil;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Parse};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Parse=function(b){return this.$val.Parse(b);};AB.ptr.prototype.Parsed=function(){var $ptr,b;b=this;return b.parsed;};AB.prototype.Parsed=function(){return this.$val.Parsed();};BJ=function(b,c){var $ptr,b,c,d;d=new AB.ptr($throwNilPointerError,b,false,false,false,CD.nil,c,$ifaceNil);return d;};$pkg.NewFlagSet=BJ;AB.ptr.prototype.Init=function(b,c){var $ptr,b,c,d;d=this;d.name=b;d.errorHandling=c;};AB.prototype.Init=function(b,c){return this.$val.Init(b,c);};BL.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"IsBoolFlag",name:"IsBoolFlag",pkg:"",typ:$funcType([],[$Bool],false)}];BM.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BN.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BO.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BP.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BQ.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BR.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];BS.methods=[{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"Get",name:"Get",pkg:"",typ:$funcType([],[$emptyInterface],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CF.methods=[{prop:"out",name:"out",pkg:"flag",typ:$funcType([],[C.Writer],false)},{prop:"SetOutput",name:"SetOutput",pkg:"",typ:$funcType([C.Writer],[],false)},{prop:"VisitAll",name:"VisitAll",pkg:"",typ:$funcType([CE],[],false)},{prop:"Visit",name:"Visit",pkg:"",typ:$funcType([CE],[],false)},{prop:"Lookup",name:"Lookup",pkg:"",typ:$funcType([$String],[BU],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String,$String],[$error],false)},{prop:"PrintDefaults",name:"PrintDefaults",pkg:"",typ:$funcType([],[],false)},{prop:"NFlag",name:"NFlag",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Arg",name:"Arg",pkg:"",typ:$funcType([$Int],[$String],false)},{prop:"NArg",name:"NArg",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Args",name:"Args",pkg:"",typ:$funcType([],[CD],false)},{prop:"BoolVar",name:"BoolVar",pkg:"",typ:$funcType([BW,$String,$Bool,$String],[],false)},{prop:"Bool",name:"Bool",pkg:"",typ:$funcType([$String,$Bool,$String],[BW],false)},{prop:"IntVar",name:"IntVar",pkg:"",typ:$funcType([BX,$String,$Int,$String],[],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([$String,$Int,$String],[BX],false)},{prop:"Int64Var",name:"Int64Var",pkg:"",typ:$funcType([BY,$String,$Int64,$String],[],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([$String,$Int64,$String],[BY],false)},{prop:"UintVar",name:"UintVar",pkg:"",typ:$funcType([BZ,$String,$Uint,$String],[],false)},{prop:"Uint",name:"Uint",pkg:"",typ:$funcType([$String,$Uint,$String],[BZ],false)},{prop:"Uint64Var",name:"Uint64Var",pkg:"",typ:$funcType([CA,$String,$Uint64,$String],[],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([$String,$Uint64,$String],[CA],false)},{prop:"StringVar",name:"StringVar",pkg:"",typ:$funcType([CB,$String,$String,$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([$String,$String,$String],[CB],false)},{prop:"Float64Var",name:"Float64Var",pkg:"",typ:$funcType([CC,$String,$Float64,$String],[],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([$String,$Float64,$String],[CC],false)},{prop:"DurationVar",name:"DurationVar",pkg:"",typ:$funcType([BT,$String,G.Duration,$String],[],false)},{prop:"Duration",name:"Duration",pkg:"",typ:$funcType([$String,G.Duration,$String],[BT],false)},{prop:"Var",name:"Var",pkg:"",typ:$funcType([Y,$String,$String],[],false)},{prop:"failf",name:"failf",pkg:"flag",typ:$funcType([$String,BK],[$error],true)},{prop:"usage",name:"usage",pkg:"flag",typ:$funcType([],[],false)},{prop:"parseOne",name:"parseOne",pkg:"flag",typ:$funcType([],[$Bool,$error],false)},{prop:"Parse",name:"Parse",pkg:"",typ:$funcType([CD],[$error],false)},{prop:"Parsed",name:"Parsed",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Init",name:"Init",pkg:"",typ:$funcType([$String,AA],[],false)}];J.init([{prop:"IsBoolFlag",name:"IsBoolFlag",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);Y.init([{prop:"Set",name:"Set",pkg:"",typ:$funcType([$String],[$error],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}]);AB.init([{prop:"Usage",name:"Usage",pkg:"",typ:CG,tag:""},{prop:"name",name:"name",pkg:"flag",typ:$String,tag:""},{prop:"parsed",name:"parsed",pkg:"flag",typ:$Bool,tag:""},{prop:"actual",name:"actual",pkg:"flag",typ:CH,tag:""},{prop:"formal",name:"formal",pkg:"flag",typ:CH,tag:""},{prop:"args",name:"args",pkg:"flag",typ:CD,tag:""},{prop:"errorHandling",name:"errorHandling",pkg:"flag",typ:AA,tag:""},{prop:"output",name:"output",pkg:"flag",typ:C.Writer,tag:""}]);AC.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Usage",name:"Usage",pkg:"",typ:$String,tag:""},{prop:"Value",name:"Value",pkg:"",typ:Y,tag:""},{prop:"DefValue",name:"DefValue",pkg:"",typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrHelp=A.New("flag: help requested");$pkg.CommandLine=BJ((a=D.Args,(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])),1);$pkg.Usage=(function $b(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=B.Fprintf(D.Stderr,"Usage of %s:\n",new BK([new $String((b=D.Args,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])))]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;$r=AK();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;});}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["runtime/pprof"]=(function(){var $pkg={},$init,A,B;A=$packages["io"];B=$packages["sync"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["runtime/trace"]=(function(){var $pkg={},$init,A,B;A=$packages["io"];B=$packages["runtime"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["testing"]=(function(){var $pkg={},$init,H,B,C,E,I,D,A,K,L,M,J,F,G,O,P,Q,AO,AP,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;H=$packages["bytes"];B=$packages["flag"];C=$packages["fmt"];E=$packages["github.com/gopherjs/gopherjs/nosync"];I=$packages["io"];D=$packages["os"];A=$packages["runtime"];K=$packages["runtime/pprof"];L=$packages["runtime/trace"];M=$packages["strconv"];J=$packages["strings"];F=$packages["sync/atomic"];G=$packages["time"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=H.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a=B.String("test.bench","","regular expression to select benchmarks to run");$s=14;case 14:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}O=a;b=B.Duration("test.benchtime",new G.Duration(0,1000000000),"approximate run time for each benchmark");$s=15;case 15:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}P=b;c=B.Bool("test.benchmem",false,"print memory allocations for benchmarks");$s=16;case 16:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}Q=c;d=B.Bool("test.short",false,"run smaller test suite to save time");$s=17;case 17:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}AO=d;e=B.String("test.outputdir","","directory in which to write profiles");$s=18;case 18:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}AP=e;f=B.Bool("test.v",false,"verbose: print additional output");$s=19;case 19:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}AQ=f;g=B.Uint("test.count",1,"run tests and benchmarks `n` times");$s=20;case 20:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}AR=g;h=B.String("test.coverprofile","","write a coverage profile to the named file after execution");$s=21;case 21:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}AS=h;i=B.String("test.run","","regular expression to select tests and examples to run");$s=22;case 22:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}AT=i;j=B.String("test.memprofile","","write a memory profile to the named file after execution");$s=23;case 23:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}AU=j;k=B.Int("test.memprofilerate",0,"if >=0, sets runtime.MemProfileRate");$s=24;case 24:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}AV=k;l=B.String("test.cpuprofile","","write a cpu profile to the named file during execution");$s=25;case 25:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}AW=l;m=B.String("test.blockprofile","","write a goroutine blocking profile to the named file after execution");$s=26;case 26:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}AX=m;n=B.Int("test.blockprofilerate",1,"if >= 0, calls runtime.SetBlockProfileRate()");$s=27;case 27:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}AY=n;o=B.String("test.trace","","write an execution trace to the named file after execution");$s=28;case 28:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}AZ=o;p=B.Duration("test.timeout",new G.Duration(0,0),"if positive, sets an aggregate time limit for all tests");$s=29;case 29:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}BA=p;q=B.String("test.cpu","","comma-separated list of number of CPUs to use for each test");$s=30;case 30:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}BB=q;r=B.Int("test.parallel",A.GOMAXPROCS(0),"maximum test parallelism");$s=31;case 31:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}BC=r;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["unicode/utf16"]=(function(){var $pkg={},$init,A,B;A=function(a){var $ptr,a;return 55296<=a&&a<57344;};$pkg.IsSurrogate=A;B=function(a,b){var $ptr,a,b;if(55296<=a&&a<56320&&56320<=b&&b<57344){return((((a-55296>>0))<<10>>0)|((b-56320>>0)))+65536>>0;}return 65533;};$pkg.DecodeRune=B;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["encoding/json"]=(function(){var $pkg={},$init,B,C,D,E,F,P,Q,M,G,H,N,I,O,A,J,K,L,T,U,W,X,Y,AA,AJ,AK,AL,AN,AP,AT,BI,BO,BQ,BT,BV,BX,BZ,CE,CF,CH,CI,CX,CY,EQ,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FM,FN,FP,FQ,FR,FS,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,Z,AB,AC,AO,AU,AX,AY,BJ,BK,CL,a,b,S,AD,AE,AF,AG,AS,AV,AW,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BL,BM,BN,BP,BR,BS,BU,BW,BY,CA,CB,CC,CD,CG,CJ,CK,CM,CN,CO,CP,CQ,CS,CV,CW,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,EG,ER;B=$packages["bytes"];C=$packages["encoding"];D=$packages["encoding/base64"];E=$packages["errors"];F=$packages["fmt"];P=$packages["github.com/gopherjs/gopherjs/nosync"];Q=$packages["io"];M=$packages["math"];G=$packages["reflect"];H=$packages["runtime"];N=$packages["sort"];I=$packages["strconv"];O=$packages["strings"];A=$packages["testing"];J=$packages["unicode"];K=$packages["unicode/utf16"];L=$packages["unicode/utf8"];T=$pkg.Unmarshaler=$newType(8,$kindInterface,"json.Unmarshaler","Unmarshaler","encoding/json",null);U=$pkg.UnmarshalTypeError=$newType(0,$kindStruct,"json.UnmarshalTypeError","UnmarshalTypeError","encoding/json",function(Value_,Type_,Offset_){this.$val=this;if(arguments.length===0){this.Value="";this.Type=$ifaceNil;this.Offset=new $Int64(0,0);return;}this.Value=Value_;this.Type=Type_;this.Offset=Offset_;});W=$pkg.InvalidUnmarshalError=$newType(0,$kindStruct,"json.InvalidUnmarshalError","InvalidUnmarshalError","encoding/json",function(Type_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;return;}this.Type=Type_;});X=$pkg.Number=$newType(8,$kindString,"json.Number","Number","encoding/json",null);Y=$pkg.decodeState=$newType(0,$kindStruct,"json.decodeState","decodeState","encoding/json",function(data_,off_,scan_,nextscan_,savedError_,useNumber_){this.$val=this;if(arguments.length===0){this.data=EY.nil;this.off=0;this.scan=new CY.ptr($throwNilPointerError,false,FB.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0));this.nextscan=new CY.ptr($throwNilPointerError,false,FB.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0));this.savedError=$ifaceNil;this.useNumber=false;return;}this.data=data_;this.off=off_;this.scan=scan_;this.nextscan=nextscan_;this.savedError=savedError_;this.useNumber=useNumber_;});AA=$pkg.unquotedValue=$newType(0,$kindStruct,"json.unquotedValue","unquotedValue","encoding/json",function(){this.$val=this;if(arguments.length===0){return;}});AJ=$pkg.Marshaler=$newType(8,$kindInterface,"json.Marshaler","Marshaler","encoding/json",null);AK=$pkg.UnsupportedTypeError=$newType(0,$kindStruct,"json.UnsupportedTypeError","UnsupportedTypeError","encoding/json",function(Type_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;return;}this.Type=Type_;});AL=$pkg.UnsupportedValueError=$newType(0,$kindStruct,"json.UnsupportedValueError","UnsupportedValueError","encoding/json",function(Value_,Str_){this.$val=this;if(arguments.length===0){this.Value=new G.Value.ptr(FC.nil,0,0);this.Str="";return;}this.Value=Value_;this.Str=Str_;});AN=$pkg.MarshalerError=$newType(0,$kindStruct,"json.MarshalerError","MarshalerError","encoding/json",function(Type_,Err_){this.$val=this;if(arguments.length===0){this.Type=$ifaceNil;this.Err=$ifaceNil;return;}this.Type=Type_;this.Err=Err_;});AP=$pkg.encodeState=$newType(0,$kindStruct,"json.encodeState","encodeState","encoding/json",function(Buffer_,scratch_){this.$val=this;if(arguments.length===0){this.Buffer=new B.Buffer.ptr(EY.nil,0,FF.zero(),FG.zero(),0);this.scratch=FG.zero();return;}this.Buffer=Buffer_;this.scratch=scratch_;});AT=$pkg.encoderFunc=$newType(4,$kindFunc,"json.encoderFunc","encoderFunc","encoding/json",null);BI=$pkg.floatEncoder=$newType(4,$kindInt,"json.floatEncoder","floatEncoder","encoding/json",null);BO=$pkg.structEncoder=$newType(0,$kindStruct,"json.structEncoder","structEncoder","encoding/json",function(fields_,fieldEncs_){this.$val=this;if(arguments.length===0){this.fields=EV.nil;this.fieldEncs=FI.nil;return;}this.fields=fields_;this.fieldEncs=fieldEncs_;});BQ=$pkg.mapEncoder=$newType(0,$kindStruct,"json.mapEncoder","mapEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});BT=$pkg.sliceEncoder=$newType(0,$kindStruct,"json.sliceEncoder","sliceEncoder","encoding/json",function(arrayEnc_){this.$val=this;if(arguments.length===0){this.arrayEnc=$throwNilPointerError;return;}this.arrayEnc=arrayEnc_;});BV=$pkg.arrayEncoder=$newType(0,$kindStruct,"json.arrayEncoder","arrayEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});BX=$pkg.ptrEncoder=$newType(0,$kindStruct,"json.ptrEncoder","ptrEncoder","encoding/json",function(elemEnc_){this.$val=this;if(arguments.length===0){this.elemEnc=$throwNilPointerError;return;}this.elemEnc=elemEnc_;});BZ=$pkg.condAddrEncoder=$newType(0,$kindStruct,"json.condAddrEncoder","condAddrEncoder","encoding/json",function(canAddrEnc_,elseEnc_){this.$val=this;if(arguments.length===0){this.canAddrEnc=$throwNilPointerError;this.elseEnc=$throwNilPointerError;return;}this.canAddrEnc=canAddrEnc_;this.elseEnc=elseEnc_;});CE=$pkg.stringValues=$newType(12,$kindSlice,"json.stringValues","stringValues","encoding/json",null);CF=$pkg.field=$newType(0,$kindStruct,"json.field","field","encoding/json",function(name_,nameBytes_,equalFold_,tag_,index_,typ_,omitEmpty_,quoted_){this.$val=this;if(arguments.length===0){this.name="";this.nameBytes=EY.nil;this.equalFold=$throwNilPointerError;this.tag=false;this.index=FB.nil;this.typ=$ifaceNil;this.omitEmpty=false;this.quoted=false;return;}this.name=name_;this.nameBytes=nameBytes_;this.equalFold=equalFold_;this.tag=tag_;this.index=index_;this.typ=typ_;this.omitEmpty=omitEmpty_;this.quoted=quoted_;});CH=$pkg.byName=$newType(12,$kindSlice,"json.byName","byName","encoding/json",null);CI=$pkg.byIndex=$newType(12,$kindSlice,"json.byIndex","byIndex","encoding/json",null);CX=$pkg.SyntaxError=$newType(0,$kindStruct,"json.SyntaxError","SyntaxError","encoding/json",function(msg_,Offset_){this.$val=this;if(arguments.length===0){this.msg="";this.Offset=new $Int64(0,0);return;}this.msg=msg_;this.Offset=Offset_;});CY=$pkg.scanner=$newType(0,$kindStruct,"json.scanner","scanner","encoding/json",function(step_,endTop_,parseState_,err_,redo_,redoCode_,redoState_,bytes_){this.$val=this;if(arguments.length===0){this.step=$throwNilPointerError;this.endTop=false;this.parseState=FB.nil;this.err=$ifaceNil;this.redo=false;this.redoCode=0;this.redoState=$throwNilPointerError;this.bytes=new $Int64(0,0);return;}this.step=step_;this.endTop=endTop_;this.parseState=parseState_;this.err=err_;this.redo=redo_;this.redoCode=redoCode_;this.redoState=redoState_;this.bytes=bytes_;});EQ=$pkg.tagOptions=$newType(8,$kindString,"json.tagOptions","tagOptions","encoding/json",null);ES=$sliceType($emptyInterface);ET=$mapType(G.Type,AT);EU=$structType([{prop:"RWMutex",name:"",pkg:"",typ:P.RWMutex,tag:""},{prop:"m",name:"m",pkg:"encoding/json",typ:ET,tag:""}]);EV=$sliceType(CF);EW=$mapType(G.Type,EV);EX=$structType([{prop:"RWMutex",name:"",pkg:"",typ:P.RWMutex,tag:""},{prop:"m",name:"m",pkg:"encoding/json",typ:EW,tag:""}]);EY=$sliceType($Uint8);EZ=$ptrType(AJ);FA=$ptrType(C.TextMarshaler);FB=$sliceType($Int);FC=$ptrType(G.rtype);FD=$mapType($String,$emptyInterface);FE=$ptrType(CF);FF=$arrayType($Uint8,4);FG=$arrayType($Uint8,64);FH=$ptrType(AP);FI=$sliceType(AT);FM=$ptrType(CX);FN=$ptrType(U);FP=$ptrType(W);FQ=$ptrType(Y);FR=$ptrType(AK);FS=$ptrType(AL);FU=$ptrType(AN);FV=$ptrType(BO);FW=$ptrType(BQ);FX=$ptrType(BT);FY=$ptrType(BV);FZ=$ptrType(BX);GA=$ptrType(BZ);GB=$funcType([EY,EY],[$Bool],false);GC=$ptrType(CY);GD=$funcType([GC,$Int],[$Int],false);S=function(c,d){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=new Y.ptr(EY.nil,0,new CY.ptr($throwNilPointerError,false,FB.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0)),new CY.ptr($throwNilPointerError,false,FB.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0)),$ifaceNil,false);f=CV(c,e.scan);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){return g;}e.init(c);h=e.unmarshal(d);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;}return;}if($f===undefined){$f={$blk:S};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Unmarshal=S;U.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Type.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return"json: cannot unmarshal "+c.Value+" into Go value of type "+d;}return;}if($f===undefined){$f={$blk:U.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};U.prototype.Error=function(){return this.$val.Error();};W.ptr.prototype.Error=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if($interfaceIsEqual(c.Type,$ifaceNil)){return"json: Unmarshal(nil)";}d=c.Type.Kind();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}if(!((d===22))){$s=1;continue;}$s=2;continue;case 1:e=c.Type.String();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return"json: Unmarshal(non-pointer "+e+")";case 2:f=c.Type.String();$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return"json: Unmarshal(nil "+f+")";}return;}if($f===undefined){$f={$blk:W.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};W.prototype.Error=function(){return this.$val.Error();};Y.ptr.prototype.unmarshal=function(c){var $ptr,c,d,e,f,g,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=[d];d[0]=$ifaceNil;e=this;$deferred.push([(function(d){return function(){var $ptr,f,g,h;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,H.Error,true);h=g[1];if(h){$panic(f);}d[0]=$assertType(f,$error);}};})(d),[]]);f=G.ValueOf(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!((g.Kind()===22))||g.IsNil()){d[0]=new W.ptr(G.TypeOf(c));return d[0];}e.scan.reset();$r=e.value(g);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d[0]=e.savedError;return d[0];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return d[0];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:Y.ptr.prototype.unmarshal};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};Y.prototype.unmarshal=function(c){return this.$val.unmarshal(c);};X.prototype.String=function(){var $ptr,c;c=this.$val;return c;};$ptrType(X).prototype.String=function(){return new X(this.$get()).String();};X.prototype.Float64=function(){var $ptr,c;c=this.$val;return I.ParseFloat(c,64);};$ptrType(X).prototype.Float64=function(){return new X(this.$get()).Float64();};X.prototype.Int64=function(){var $ptr,c;c=this.$val;return I.ParseInt(c,10,64);};$ptrType(X).prototype.Int64=function(){return new X(this.$get()).Int64();};Y.ptr.prototype.init=function(c){var $ptr,c,d;d=this;d.data=c;d.off=0;d.savedError=$ifaceNil;return d;};Y.prototype.init=function(c){return this.$val.init(c);};Y.ptr.prototype.error=function(c){var $ptr,c,d;d=this;$panic(c);};Y.prototype.error=function(c){return this.$val.error(c);};Y.ptr.prototype.saveError=function(c){var $ptr,c,d;d=this;if($interfaceIsEqual(d.savedError,$ifaceNil)){d.savedError=c;}};Y.prototype.saveError=function(c){return this.$val.saveError(c);};Y.ptr.prototype.next=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;f=(d=c.data,e=c.off,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]));h=CW($subslice(c.data,c.off),c.nextscan);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];k=g[2];if(!($interfaceIsEqual(k,$ifaceNil))){c.error(k);}c.off=c.data.$length-j.$length>>0;if(f===123){$s=2;continue;}$s=3;continue;case 2:l=c.scan.step(c.scan,125);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;$s=4;continue;case 3:m=c.scan.step(c.scan,93);$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;case 4:return i;}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.next};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.next=function(){return this.$val.next();};Y.ptr.prototype.scanWhile=function(c){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=0;case 1:if(d.off>=d.data.$length){$s=3;continue;}$s=4;continue;case 3:f=d.scan.eof();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;d.off=d.data.$length+1>>0;$s=5;continue;case 4:i=((g=d.data,h=d.off,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]))>>0);d.off=d.off+(1)>>0;j=d.scan.step(d.scan,i);$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}e=j;case 5:if(!((e===c))){$s=2;continue;}$s=1;continue;case 2:return e;}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.scanWhile};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.scanWhile=function(c){return this.$val.scanWhile(c);};Y.ptr.prototype.value=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;if(!c.IsValid()){$s=1;continue;}$s=2;continue;case 1:f=CW($subslice(d.data,d.off),d.nextscan);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[1];h=e[2];if(!($interfaceIsEqual(h,$ifaceNil))){d.error(h);}d.off=d.data.$length-g.$length>>0;if(d.scan.redo){d.scan.redo=false;d.scan.step=DB;}i=d.scan.step(d.scan,34);$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;j=d.scan.step(d.scan,34);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;k=d.scan.parseState.$length;if(k>0&&((l=d.scan.parseState,m=k-1>>0,((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]))===0)){$s=6;continue;}$s=7;continue;case 6:n=d.scan.step(d.scan,58);$s=8;case 8:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;o=d.scan.step(d.scan,34);$s=9;case 9:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;p=d.scan.step(d.scan,34);$s=10;case 10:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}p;q=d.scan.step(d.scan,125);$s=11;case 11:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}q;case 7:return;case 2:r=d.scanWhile(9);$s=12;case 12:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r;t=s;if(t===6){$s=13;continue;}if(t===2){$s=14;continue;}if(t===1){$s=15;continue;}$s=16;continue;case 13:$r=d.array(c);$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=17;continue;case 14:$r=d.object(c);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=17;continue;case 15:$r=d.literal(c);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=17;continue;case 16:d.error(Z);case 17:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.value};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.value=function(c){return this.$val.value(c);};Y.ptr.prototype.valueQuoted=function(){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.scanWhile(9);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;if(f===6){$s=2;continue;}if(f===2){$s=3;continue;}if(f===1){$s=4;continue;}$s=5;continue;case 2:$r=c.array(new G.Value.ptr(FC.nil,0,0));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=6;continue;case 3:$r=c.object(new G.Value.ptr(FC.nil,0,0));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=6;continue;case 4:h=c.literalInterface();$s=9;case 9:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;if(g===$ifaceNil||$assertType(g,$String,true)[1]){$s=10;continue;}$s=11;continue;case 10:i=g;return i;case 11:$s=6;continue;case 5:c.error(Z);case 6:return(j=new AA.ptr(),new j.constructor.elem(j));}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.valueQuoted};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.valueQuoted=function(){return this.$val.valueQuoted();};Y.ptr.prototype.indirect=function(c,d){var $ptr,aa,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;e=this;if(!(!((c.Kind()===22)))){f=false;$s=3;continue s;}g=c.Type().Name();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=!(g==="");case 3:if(f&&c.CanAddr()){$s=1;continue;}$s=2;continue;case 1:c=c.Addr();case 2:case 5:if((c.Kind()===20)&&!c.IsNil()){$s=7;continue;}$s=8;continue;case 7:h=c.Elem();$s=9;case 9:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!((i.Kind()===22)&&!i.IsNil())){j=false;$s=12;continue s;}if(!d){k=true;$s=13;continue s;}l=i.Elem();$s=14;case 14:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l.Kind();$s=15;case 15:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m===22;case 13:j=k;case 12:if(j){$s=10;continue;}$s=11;continue;case 10:c=i;$s=5;continue;case 11:case 8:if(!((c.Kind()===22))){$s=6;continue;}n=c.Elem();$s=18;case 18:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n.Kind();$s=19;case 19:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(!((o===22))&&d&&c.CanSet()){$s=16;continue;}$s=17;continue;case 16:$s=6;continue;case 17:if(c.IsNil()){$s=20;continue;}$s=21;continue;case 20:p=c.Type().Elem();$s=22;case 22:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=G.New(p);$s=23;case 23:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}$r=c.Set(q);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 21:r=c.Type().NumMethod();$s=27;case 27:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r>0){$s=25;continue;}$s=26;continue;case 25:t=c.Interface();$s=28;case 28:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=$assertType(t,T,true);u=s[0];v=s[1];if(v){$s=29;continue;}$s=30;continue;case 29:return[u,$ifaceNil,new G.Value.ptr(FC.nil,0,0)];case 30:x=c.Interface();$s=31;case 31:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=$assertType(x,C.TextUnmarshaler,true);y=w[0];z=w[1];if(z){$s=32;continue;}$s=33;continue;case 32:return[$ifaceNil,y,new G.Value.ptr(FC.nil,0,0)];case 33:case 26:aa=c.Elem();$s=34;case 34:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}c=aa;$s=5;continue;case 6:return[$ifaceNil,$ifaceNil,c];}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.indirect};}$f.$ptr=$ptr;$f.aa=aa;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.indirect=function(c,d){return this.$val.indirect(c,d);};Y.ptr.prototype.array=function(c){var $ptr,aa,ab,ac,ad,ae,af,ag,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;f=d.indirect(c,false);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[0];h=e[1];i=e[2];if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:d.off=d.off-(1)>>0;j=d.next();$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=g.UnmarshalJSON(j);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!($interfaceIsEqual(l,$ifaceNil))){d.error(l);}return;case 3:if(!($interfaceIsEqual(h,$ifaceNil))){$s=6;continue;}$s=7;continue;case 6:d.saveError(new U.ptr("array",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;m=d.next();$s=8;case 8:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;return;case 7:c=i;n=c.Kind();if(n===20){$s=9;continue;}if(n===17){$s=10;continue;}if(n===23){$s=11;continue;}$s=12;continue;case 9:if(c.NumMethod()===0){$s=14;continue;}$s=15;continue;case 14:o=d.arrayInterface();$s=16;case 16:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=G.ValueOf(o);$s=17;case 17:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}$r=c.Set(p);$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 15:d.saveError(new U.ptr("array",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;q=d.next();$s=19;case 19:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}q;return;case 10:$s=13;continue;case 11:$s=13;continue;$s=13;continue;case 12:d.saveError(new U.ptr("array",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;r=d.next();$s=20;case 20:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}r;return;case 13:s=0;case 21:t=d.scanWhile(9);$s=23;case 23:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t;if(u===8){$s=22;continue;}d.off=d.off-(1)>>0;d.scan.undo(u);if(c.Kind()===23){$s=24;continue;}$s=25;continue;case 24:if(s>=c.Cap()){$s=26;continue;}$s=27;continue;case 26:w=c.Cap()+(v=c.Cap()/2,(v===v&&v!==1/0&&v!==-1/0)?v>>0:$throwRuntimeError("integer divide by zero"))>>0;if(w<4){w=4;}x=G.MakeSlice(c.Type(),c.Len(),w);$s=28;case 28:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;z=G.Copy(y,c);$s=29;case 29:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}z;$r=c.Set(y);$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 27:if(s>=c.Len()){c.SetLen(s+1>>0);}case 25:if(s>0;ab=d.scanWhile(9);$s=37;case 37:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}u=ab;if(u===8){$s=22;continue;}if(!((u===7))){d.error(Z);}$s=21;continue;case 22:if(s>0;$s=45;continue;case 46:$s=42;continue;case 41:c.SetLen(s);case 42:case 39:if((s===0)&&(c.Kind()===23)){$s=49;continue;}$s=50;continue;case 49:ag=G.MakeSlice(c.Type(),0,0);$s=51;case 51:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}$r=c.Set(ag);$s=52;case 52:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 50:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.array};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.array=function(c){return this.$val.array(c);};Y.ptr.prototype.object=function(c){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;f=d.indirect(c,false);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;g=e[0];h=e[1];i=e[2];if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:d.off=d.off-(1)>>0;j=d.next();$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=g.UnmarshalJSON(j);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!($interfaceIsEqual(l,$ifaceNil))){d.error(l);}return;case 3:if(!($interfaceIsEqual(h,$ifaceNil))){$s=6;continue;}$s=7;continue;case 6:d.saveError(new U.ptr("object",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;m=d.next();$s=8;case 8:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;return;case 7:c=i;if((c.Kind()===20)&&(c.NumMethod()===0)){$s=9;continue;}$s=10;continue;case 9:n=d.objectInterface();$s=11;case 11:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=G.ValueOf(new FD(n));$s=12;case 12:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}$r=c.Set(o);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 10:p=c.Kind();if(p===21){$s=14;continue;}if(p===25){$s=15;continue;}$s=16;continue;case 14:q=c.Type();r=q.Key();$s=20;case 20:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=r.Kind();$s=21;case 21:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}if(!((s===24))){$s=18;continue;}$s=19;continue;case 18:d.saveError(new U.ptr("object",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;t=d.next();$s=22;case 22:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}t;return;case 19:if(c.IsNil()){$s=23;continue;}$s=24;continue;case 23:u=G.MakeMap(q);$s=25;case 25:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}$r=c.Set(u);$s=26;case 26:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 24:$s=17;continue;case 15:$s=17;continue;case 16:d.saveError(new U.ptr("object",c.Type(),new $Int64(0,d.off)));d.off=d.off-(1)>>0;v=d.next();$s=27;case 27:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}v;return;case 17:w=new G.Value.ptr(FC.nil,0,0);case 28:x=d.scanWhile(9);$s=30;case 30:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;if(y===5){$s=29;continue;}if(!((y===1))){d.error(Z);}z=d.off-1>>0;aa=d.scanWhile(0);$s=31;case 31:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}y=aa;ab=$subslice(d.data,z,(d.off-1>>0));ac=AF(ab);ad=ac[0];ae=ac[1];if(!ae){d.error(Z);}af=new G.Value.ptr(FC.nil,0,0);ag=false;if(c.Kind()===21){$s=32;continue;}$s=33;continue;case 32:ah=c.Type().Elem();$s=35;case 35:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;if(!w.IsValid()){$s=36;continue;}$s=37;continue;case 36:aj=G.New(ai);$s=39;case 39:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.Elem();$s=40;case 40:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}w=ak;$s=38;continue;case 37:al=G.Zero(ai);$s=41;case 41:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}$r=w.Set(al);$s=42;case 42:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 38:af=w;$s=34;continue;case 33:am=FE.nil;an=CM(c.Type());$s=43;case 43:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ao=an;ap=ao;aq=0;case 44:if(!(aq=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ar]);if(B.Equal(as.nameBytes,ad)){am=as;$s=45;continue;}if(!(am===FE.nil)){at=false;$s=48;continue s;}au=as.equalFold(as.nameBytes,ad);$s=49;case 49:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}at=au;case 48:if(at){$s=46;continue;}$s=47;continue;case 46:am=as;case 47:aq++;$s=44;continue;case 45:if(!(am===FE.nil)){$s=50;continue;}$s=51;continue;case 50:af=c;ag=am.quoted;av=am.index;aw=0;case 52:if(!(aw=av.$length)?$throwRuntimeError("index out of range"):av.$array[av.$offset+aw]);if(af.Kind()===22){$s=54;continue;}$s=55;continue;case 54:if(af.IsNil()){$s=56;continue;}$s=57;continue;case 56:ay=af.Type().Elem();$s=58;case 58:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}az=G.New(ay);$s=59;case 59:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}$r=af.Set(az);$s=60;case 60:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 57:ba=af.Elem();$s=61;case 61:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}af=ba;case 55:bb=af.Field(ax);$s=62;case 62:if($c){$c=false;bb=bb.$blk();}if(bb&&bb.$blk!==undefined){break s;}af=bb;aw++;$s=52;continue;case 53:case 51:case 34:if(y===9){$s=63;continue;}$s=64;continue;case 63:bc=d.scanWhile(9);$s=65;case 65:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}y=bc;case 64:if(!((y===3))){d.error(Z);}if(ag){$s=66;continue;}$s=67;continue;case 66:be=d.valueQuoted();$s=69;case 69:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}bd=be;if(bd===$ifaceNil){$s=70;continue;}if($assertType(bd,$String,true)[1]){$s=71;continue;}$s=72;continue;case 70:bf=bd;$r=d.literalStore(AB,af,false);$s=74;case 74:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=73;continue;case 71:bg=bd.$val;$r=d.literalStore(new EY($stringToBytes(bg)),af,true);$s=75;case 75:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=73;continue;case 72:bh=bd;bi=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal unquoted value into %v",new ES([af.Type()]));$s=76;case 76:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}$r=d.saveError(bi);$s=77;case 77:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 73:$s=68;continue;case 67:$r=d.value(af);$s=78;case 78:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 68:if(c.Kind()===21){$s=79;continue;}$s=80;continue;case 79:bj=G.ValueOf(ad);$s=81;case 81:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bk=c.Type().Key();$s=82;case 82:if($c){$c=false;bk=bk.$blk();}if(bk&&bk.$blk!==undefined){break s;}bl=bj.Convert(bk);$s=83;case 83:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bm=bl;$r=c.SetMapIndex(bm,af);$s=84;case 84:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 80:bn=d.scanWhile(9);$s=85;case 85:if($c){$c=false;bn=bn.$blk();}if(bn&&bn.$blk!==undefined){break s;}y=bn;if(y===5){$s=29;continue;}if(!((y===4))){d.error(Z);}$s=28;continue;case 29:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.object};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.object=function(c){return this.$val.object(c);};Y.ptr.prototype.literal=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;e=d.off-1>>0;f=d.scanWhile(0);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;d.off=d.off-(1)>>0;d.scan.undo(g);$r=d.literalStore($subslice(d.data,e,d.off),c,false);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.literal};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.literal=function(c){return this.$val.literal(c);};Y.ptr.prototype.convertNumber=function(c){var $ptr,c,d,e,f,g;d=this;if(d.useNumber){return[new X(c),$ifaceNil];}e=I.ParseFloat(c,64);f=e[0];g=e[1];if(!($interfaceIsEqual(g,$ifaceNil))){return[$ifaceNil,new U.ptr("number "+c,G.TypeOf(new $Float64(0)),new $Int64(0,d.off))];}return[new $Float64(f),$ifaceNil];};Y.prototype.convertNumber=function(c){return this.$val.convertNumber(c);};Y.ptr.prototype.literalStore=function(c,d,e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(c.$length===0){$s=1;continue;}$s=2;continue;case 1:g=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$r=f.saveError(g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 2:h=(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===110;j=f.indirect(d,h);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];m=i[2];if(!($interfaceIsEqual(k,$ifaceNil))){$s=6;continue;}$s=7;continue;case 6:n=k.UnmarshalJSON(c);$s=8;case 8:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;if(!($interfaceIsEqual(o,$ifaceNil))){f.error(o);}return;case 7:if(!($interfaceIsEqual(l,$ifaceNil))){$s=9;continue;}$s=10;continue;case 9:if(!(((0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===34))){$s=11;continue;}$s=12;continue;case 11:if(e){$s=13;continue;}$s=14;continue;case 13:p=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=16;case 16:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}$r=f.saveError(p);$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=15;continue;case 14:f.saveError(new U.ptr("string",d.Type(),new $Int64(0,f.off)));case 15:return;case 12:q=AF(c);r=q[0];s=q[1];if(!s){$s=18;continue;}$s=19;continue;case 18:if(e){$s=20;continue;}$s=21;continue;case 20:t=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=23;case 23:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}$r=f.error(t);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=22;continue;case 21:f.error(Z);case 22:case 19:u=l.UnmarshalText(r);$s=25;case 25:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=u;if(!($interfaceIsEqual(v,$ifaceNil))){f.error(v);}return;case 10:d=m;w=(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]);x=w;if(x===110){$s=26;continue;}if(x===116||x===102){$s=27;continue;}if(x===34){$s=28;continue;}$s=29;continue;case 26:y=d.Kind();if(y===20||y===22||y===21||y===23){$s=31;continue;}$s=32;continue;case 31:z=G.Zero(d.Type());$s=33;case 33:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}$r=d.Set(z);$s=34;case 34:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 32:$s=30;continue;case 27:aa=w===116;ab=d.Kind();if(ab===1){$s=35;continue;}if(ab===20){$s=36;continue;}$s=37;continue;case 35:d.SetBool(aa);$s=38;continue;case 36:if(d.NumMethod()===0){$s=39;continue;}$s=40;continue;case 39:ac=G.ValueOf(new $Bool(aa));$s=42;case 42:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}$r=d.Set(ac);$s=43;case 43:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=41;continue;case 40:f.saveError(new U.ptr("bool",d.Type(),new $Int64(0,f.off)));case 41:$s=38;continue;case 37:if(e){$s=44;continue;}$s=45;continue;case 44:ad=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=47;case 47:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}$r=f.saveError(ad);$s=48;case 48:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=46;continue;case 45:f.saveError(new U.ptr("bool",d.Type(),new $Int64(0,f.off)));case 46:case 38:$s=30;continue;case 28:ae=AF(c);af=ae[0];ag=ae[1];if(!ag){$s=49;continue;}$s=50;continue;case 49:if(e){$s=51;continue;}$s=52;continue;case 51:ah=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=54;case 54:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}$r=f.error(ah);$s=55;case 55:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=53;continue;case 52:f.error(Z);case 53:case 50:ai=d.Kind();if(ai===23){$s=56;continue;}if(ai===24){$s=57;continue;}if(ai===20){$s=58;continue;}$s=59;continue;case 56:aj=d.Type().Elem();$s=63;case 63:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=aj.Kind();$s=64;case 64:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}if(!((ak===8))){$s=61;continue;}$s=62;continue;case 61:f.saveError(new U.ptr("string",d.Type(),new $Int64(0,f.off)));$s=60;continue;case 62:al=$makeSlice(EY,D.StdEncoding.DecodedLen(af.$length));am=D.StdEncoding.Decode(al,af);an=am[0];ao=am[1];if(!($interfaceIsEqual(ao,$ifaceNil))){f.saveError(ao);$s=60;continue;}ap=G.ValueOf($subslice(al,0,an));$s=65;case 65:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}$r=d.Set(ap);$s=66;case 66:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=60;continue;case 57:d.SetString($bytesToString(af));$s=60;continue;case 58:if(d.NumMethod()===0){$s=67;continue;}$s=68;continue;case 67:aq=G.ValueOf(new $String($bytesToString(af)));$s=70;case 70:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}$r=d.Set(aq);$s=71;case 71:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=69;continue;case 68:f.saveError(new U.ptr("string",d.Type(),new $Int64(0,f.off)));case 69:$s=60;continue;case 59:f.saveError(new U.ptr("string",d.Type(),new $Int64(0,f.off)));case 60:$s=30;continue;case 29:if(!((w===45))&&(w<48||w>57)){$s=72;continue;}$s=73;continue;case 72:if(e){$s=74;continue;}$s=75;continue;case 74:ar=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=77;case 77:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}$r=f.error(ar);$s=78;case 78:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=76;continue;case 75:f.error(Z);case 76:case 73:as=$bytesToString(c);at=d.Kind();if(at===20){$s=79;continue;}if(at===2||at===3||at===4||at===5||at===6){$s=80;continue;}if(at===7||at===8||at===9||at===10||at===11||at===12){$s=81;continue;}if(at===13||at===14){$s=82;continue;}$s=83;continue;case 79:au=f.convertNumber(as);av=au[0];aw=au[1];if(!($interfaceIsEqual(aw,$ifaceNil))){f.saveError(aw);$s=84;continue;}if(!((d.NumMethod()===0))){f.saveError(new U.ptr("number",d.Type(),new $Int64(0,f.off)));$s=84;continue;}ax=G.ValueOf(av);$s=85;case 85:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}$r=d.Set(ax);$s=86;case 86:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=84;continue;case 80:ay=I.ParseInt(as,10,64);az=ay[0];ba=ay[1];if(!($interfaceIsEqual(ba,$ifaceNil))||d.OverflowInt(az)){f.saveError(new U.ptr("number "+as,d.Type(),new $Int64(0,f.off)));$s=84;continue;}d.SetInt(az);$s=84;continue;case 81:bb=I.ParseUint(as,10,64);bc=bb[0];bd=bb[1];if(!($interfaceIsEqual(bd,$ifaceNil))||d.OverflowUint(bc)){f.saveError(new U.ptr("number "+as,d.Type(),new $Int64(0,f.off)));$s=84;continue;}d.SetUint(bc);$s=84;continue;case 82:bf=as;bg=d.Type().Bits();$s=87;case 87:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bh=bg;bi=I.ParseFloat(bf,bh);$s=88;case 88:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}be=bi;bj=be[0];bk=be[1];if(!($interfaceIsEqual(bk,$ifaceNil))||d.OverflowFloat(bj)){f.saveError(new U.ptr("number "+as,d.Type(),new $Int64(0,f.off)));$s=84;continue;}d.SetFloat(bj);$s=84;continue;case 83:if((d.Kind()===24)&&$interfaceIsEqual(d.Type(),AC)){d.SetString(as);$s=84;continue;}if(e){$s=89;continue;}$s=90;continue;case 89:bl=F.Errorf("json: invalid use of ,string struct tag, trying to unmarshal %q into %v",new ES([c,d.Type()]));$s=92;case 92:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}$r=f.error(bl);$s=93;case 93:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=91;continue;case 90:f.error(new U.ptr("number",d.Type(),new $Int64(0,f.off)));case 91:case 84:case 30:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.literalStore};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.literalStore=function(c,d,e){return this.$val.literalStore(c,d,e);};Y.ptr.prototype.valueInterface=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=c.scanWhile(9);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;if(d===6){$s=2;continue;}if(d===2){$s=3;continue;}if(d===1){$s=4;continue;}$s=5;continue;case 2:f=c.arrayInterface();$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 3:g=c.objectInterface();$s=8;case 8:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return new FD(g);case 4:h=c.literalInterface();$s=9;case 9:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;case 5:c.error(Z);$panic(new $String("unreachable"));case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.valueInterface};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.valueInterface=function(){return this.$val.valueInterface();};Y.ptr.prototype.arrayInterface=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=$makeSlice(ES,0);case 1:e=c.scanWhile(9);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(f===8){$s=2;continue;}c.off=c.off-(1)>>0;c.scan.undo(f);g=c.valueInterface();$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}d=$append(d,g);h=c.scanWhile(9);$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}f=h;if(f===8){$s=2;continue;}if(!((f===7))){c.error(Z);}$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.arrayInterface};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.arrayInterface=function(){return this.$val.arrayInterface();};Y.ptr.prototype.objectInterface=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d={};case 1:e=c.scanWhile(9);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(f===5){$s=2;continue;}if(!((f===1))){c.error(Z);}g=c.off-1>>0;h=c.scanWhile(0);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}f=h;i=$subslice(c.data,g,(c.off-1>>0));j=AE(i);k=j[0];l=j[1];if(!l){c.error(Z);}if(f===9){$s=5;continue;}$s=6;continue;case 5:m=c.scanWhile(9);$s=7;case 7:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}f=m;case 6:if(!((f===3))){c.error(Z);}o=c.valueInterface();$s=8;case 8:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=k;(d||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(n)]={k:n,v:o};p=c.scanWhile(9);$s=9;case 9:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}f=p;if(f===5){$s=2;continue;}if(!((f===4))){c.error(Z);}$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.objectInterface};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.objectInterface=function(){return this.$val.objectInterface();};Y.ptr.prototype.literalInterface=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.off-1>>0;e=c.scanWhile(0);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;c.off=c.off-(1)>>0;c.scan.undo(f);g=$subslice(c.data,d,c.off);h=(0>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]);i=h;if(i===110){return $ifaceNil;}else if(i===116||i===102){return new $Bool((h===116));}else if(i===34){j=AE(g);k=j[0];l=j[1];if(!l){c.error(Z);}return new $String(k);}else{if(!((h===45))&&(h<48||h>57)){c.error(Z);}m=c.convertNumber($bytesToString(g));n=m[0];o=m[1];if(!($interfaceIsEqual(o,$ifaceNil))){c.saveError(o);}return n;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.literalInterface};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.literalInterface=function(){return this.$val.literalInterface();};AD=function(c){var $ptr,c,d,e,f;if(c.$length<6||!(((0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===92))||!(((1>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+1])===117))){return-1;}d=I.ParseUint($bytesToString($subslice(c,2,6)),16,64);e=d[0];f=d[1];if(!($interfaceIsEqual(f,$ifaceNil))){return-1;}return(e.$low>>0);};AE=function(c){var $ptr,c,d,e,f;d="";e=false;f=AF(c);c=f[0];e=f[1];d=$bytesToString(c);return[d,e];};AF=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;d=EY.nil;e=false;if(c.$length<2||!(((0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0])===34))||!(((f=c.$length-1>>0,((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]))===34))){return[d,e];}c=$subslice(c,1,(c.$length-1>>0));g=0;while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]);if((h===92)||(h===34)||h<32){break;}if(h<128){g=g+(1)>>0;continue;}i=L.DecodeRune($subslice(c,g));j=i[0];k=i[1];if((j===65533)&&(k===1)){break;}g=g+(k)>>0;}if(g===c.$length){l=c;m=true;d=l;e=m;return[d,e];}n=$makeSlice(EY,(c.$length+8>>0));o=$copySlice(n,$subslice(c,0,g));while(true){if(!(g=(n.$length-8>>0)){p=$makeSlice(EY,(((n.$length+4>>0))*2>>0));$copySlice(p,$subslice(n,0,o));n=p;}q=((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]);if(q===92){g=g+(1)>>0;if(g>=c.$length){return[d,e];}r=((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]);switch(0){default:if(r===34||r===92||r===47||r===39){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]));g=g+(1)>>0;o=o+(1)>>0;}else if(r===98){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=8);g=g+(1)>>0;o=o+(1)>>0;}else if(r===102){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=12);g=g+(1)>>0;o=o+(1)>>0;}else if(r===110){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=10);g=g+(1)>>0;o=o+(1)>>0;}else if(r===114){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=13);g=g+(1)>>0;o=o+(1)>>0;}else if(r===116){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=9);g=g+(1)>>0;o=o+(1)>>0;}else if(r===117){g=g-(1)>>0;s=AD($subslice(c,g));if(s<0){return[d,e];}g=g+(6)>>0;if(K.IsSurrogate(s)){t=AD($subslice(c,g));u=K.DecodeRune(s,t);if(!((u===65533))){g=g+(6)>>0;o=o+(L.EncodeRune($subslice(n,o),u))>>0;break;}s=65533;}o=o+(L.EncodeRune($subslice(n,o),s))>>0;}else{return[d,e];}}}else if(q===34||q<32){return[d,e];}else if(q<128){((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=q);g=g+(1)>>0;o=o+(1)>>0;}else{v=L.DecodeRune($subslice(c,g));w=v[0];x=v[1];g=g+(x)>>0;o=o+(L.EncodeRune($subslice(n,o),w))>>0;}}y=$subslice(n,0,o);z=true;d=y;e=z;return[d,e];};AG=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=new AP.ptr(new B.Buffer.ptr(EY.nil,0,FF.zero(),FG.zero(),0),FG.zero());e=d.marshal(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){return[EY.nil,f];}return[d.Buffer.Bytes(),$ifaceNil];}return;}if($f===undefined){$f={$blk:AG};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Marshal=AG;AK.ptr.prototype.Error=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Type.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return"json: unsupported type: "+d;}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.Error=function(){return this.$val.Error();};AL.ptr.prototype.Error=function(){var $ptr,c;c=this;return"json: unsupported value: "+c.Str;};AL.prototype.Error=function(){return this.$val.Error();};AN.ptr.prototype.Error=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Type.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=c.Err.Error();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return"json: error calling MarshalJSON for type "+d+": "+e;}return;}if($f===undefined){$f={$blk:AN.ptr.prototype.Error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AN.prototype.Error=function(){return this.$val.Error();};AP.ptr.prototype.marshal=function(c){var $ptr,c,d,e,f,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=[d];d[0]=$ifaceNil;e=this;$deferred.push([(function(d){return function(){var $ptr,f,g,h,i,j,k;f=$recover();if(!($interfaceIsEqual(f,$ifaceNil))){g=$assertType(f,H.Error,true);h=g[1];if(h){$panic(f);}i=$assertType(f,$String,true);j=i[0];k=i[1];if(k){$panic(new $String(j));}d[0]=$assertType(f,$error);}};})(d),[]]);f=G.ValueOf(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=e.reflectValue(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d[0]=$ifaceNil;return d[0];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return d[0];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:AP.ptr.prototype.marshal};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};AP.prototype.marshal=function(c){return this.$val.marshal(c);};AP.ptr.prototype.error=function(c){var $ptr,c,d;d=this;$panic(c);};AP.prototype.error=function(c){return this.$val.error(c);};AS=function(c){var $ptr,c,d,e,f;c=c;d=c.Kind();if(d===17||d===21||d===23||d===24){return c.Len()===0;}else if(d===1){return!c.Bool();}else if(d===2||d===3||d===4||d===5||d===6){return(e=c.Int(),(e.$high===0&&e.$low===0));}else if(d===7||d===8||d===9||d===10||d===11||d===12){return(f=c.Uint(),(f.$high===0&&f.$low===0));}else if(d===13||d===14){return c.Float()===0;}else if(d===20||d===22){return c.IsNil();}return false;};AP.ptr.prototype.reflectValue=function(c){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;d=this;e=AV(c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$r=e(d,c,false);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AP.ptr.prototype.reflectValue};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AP.prototype.reflectValue=function(c){return this.$val.reflectValue(c);};AV=function(c){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;if(!c.IsValid()){return BA;}d=AW(c.Type());$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AV};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AW=function(c){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=[d];e=[e];AU.RWMutex.RLock();e[0]=(f=AU.m[G.Type.keyFor(c)],f!==undefined?f.v:$throwNilPointerError);AU.RWMutex.RUnlock();if(!(e[0]===$throwNilPointerError)){return e[0];}AU.RWMutex.Lock();if(AU.m===false){AU.m={};}d[0]=new P.WaitGroup.ptr(0);d[0].Add(1);g=c;(AU.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(g)]={k:g,v:(function(d,e){return function $b(h,i,j){var $ptr,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=i;d[0].Wait();$r=e[0](h,i,j);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};})(d,e)};AU.RWMutex.Unlock();h=AZ(c,true);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}e[0]=h;d[0].Done();AU.RWMutex.Lock();i=c;(AU.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(i)]={k:i,v:e[0]};AU.RWMutex.Unlock();return e[0];}return;}if($f===undefined){$f={$blk:AW};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AZ=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=c.Implements(AX);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e){$s=1;continue;}$s=2;continue;case 1:return BB;case 2:f=c.Kind();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!((f===22))&&d){$s=4;continue;}$s=5;continue;case 4:g=G.PtrTo(c).Implements(AX);$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=7;continue;}$s=8;continue;case 7:h=BC;i=AZ(c,false);$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;k=CA(h,j);$s=11;case 11:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;case 8:case 5:l=c.Implements(AY);$s=14;case 14:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){$s=12;continue;}$s=13;continue;case 12:return BD;case 13:m=c.Kind();$s=17;case 17:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(!((m===22))&&d){$s=15;continue;}$s=16;continue;case 15:n=G.PtrTo(c).Implements(AY);$s=20;case 20:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(n){$s=18;continue;}$s=19;continue;case 18:o=BE;p=AZ(c,false);$s=21;case 21:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;r=CA(o,q);$s=22;case 22:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return r;case 19:case 16:t=c.Kind();$s=23;case 23:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=t;if(s===1){$s=24;continue;}if(s===2||s===3||s===4||s===5||s===6){$s=25;continue;}if(s===7||s===8||s===9||s===10||s===11||s===12){$s=26;continue;}if(s===13){$s=27;continue;}if(s===14){$s=28;continue;}if(s===24){$s=29;continue;}if(s===20){$s=30;continue;}if(s===25){$s=31;continue;}if(s===21){$s=32;continue;}if(s===23){$s=33;continue;}if(s===17){$s=34;continue;}if(s===22){$s=35;continue;}$s=36;continue;case 24:return BF;case 25:return BG;case 26:return BH;case 27:return BJ;case 28:return BK;case 29:return BL;case 30:return BM;case 31:u=BP(c);$s=38;case 38:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}return u;case 32:v=BR(c);$s=39;case 39:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}return v;case 33:w=BU(c);$s=40;case 40:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}return w;case 34:x=BW(c);$s=41;case 41:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}return x;case 35:y=BY(c);$s=42;case 42:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}return y;case 36:return BN;case 37:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AZ};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.$s=$s;$f.$r=$r;return $f;};BA=function(c,d,e){var $ptr,c,d,e;d=d;c.Buffer.WriteString("null");};BB=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if((d.Kind()===22)&&d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Interface();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$assertType(f,AJ);i=g.MarshalJSON();$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if($interfaceIsEqual(k,$ifaceNil)){$s=3;continue;}$s=4;continue;case 3:l=CS(c.Buffer,j,true);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;case 4:if(!($interfaceIsEqual(k,$ifaceNil))){c.error(new AN.ptr(d.Type(),k));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BB};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BC=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=d.Addr();if(f.IsNil()){c.Buffer.WriteString("null");return;}g=f.Interface();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$assertType(g,AJ);j=h.MarshalJSON();$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if($interfaceIsEqual(l,$ifaceNil)){$s=3;continue;}$s=4;continue;case 3:m=CS(c.Buffer,k,true);$s=5;case 5:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;case 4:if(!($interfaceIsEqual(l,$ifaceNil))){c.error(new AN.ptr(d.Type(),l));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BC};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BD=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if((d.Kind()===22)&&d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Interface();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$assertType(f,C.TextMarshaler);i=g.MarshalText();$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if($interfaceIsEqual(k,$ifaceNil)){l=c.stringBytes(j);k=l[1];}if(!($interfaceIsEqual(k,$ifaceNil))){c.error(new AN.ptr(d.Type(),k));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BD};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BE=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=d.Addr();if(f.IsNil()){c.Buffer.WriteString("null");return;}g=f.Interface();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$assertType(g,C.TextMarshaler);j=h.MarshalText();$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if($interfaceIsEqual(l,$ifaceNil)){m=c.stringBytes(k);l=m[1];}if(!($interfaceIsEqual(l,$ifaceNil))){c.error(new AN.ptr(d.Type(),l));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BF=function(c,d,e){var $ptr,c,d,e;d=d;if(e){c.Buffer.WriteByte(34);}if(d.Bool()){c.Buffer.WriteString("true");}else{c.Buffer.WriteString("false");}if(e){c.Buffer.WriteByte(34);}};BG=function(c,d,e){var $ptr,c,d,e,f;d=d;f=I.AppendInt($subslice(new EY(c.scratch),0,0),d.Int(),10);if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(f);if(e){c.Buffer.WriteByte(34);}};BH=function(c,d,e){var $ptr,c,d,e,f;d=d;f=I.AppendUint($subslice(new EY(c.scratch),0,0),d.Uint(),10);if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(f);if(e){c.Buffer.WriteByte(34);}};BI.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h;d=d;f=this.$val;g=d.Float();if(M.IsInf(g,0)||M.IsNaN(g)){c.error(new AL.ptr($clone(d,G.Value),I.FormatFloat(g,103,-1,(f>>0))));}h=I.AppendFloat($subslice(new EY(c.scratch),0,0),g,103,-1,(f>>0));if(e){c.Buffer.WriteByte(34);}c.Buffer.Write(h);if(e){c.Buffer.WriteByte(34);}};$ptrType(BI).prototype.encode=function(c,d,e){return new BI(this.$get()).encode(c,d,e);};BL=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if($interfaceIsEqual(d.Type(),AC)){$s=1;continue;}$s=2;continue;case 1:f=d.String();$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===""){g="0";}c.Buffer.WriteString(g);return;case 2:if(e){$s=4;continue;}$s=5;continue;case 4:i=d.String();$s=7;case 7:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=AG(new $String(i));$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=j;k=h[0];l=h[1];if(!($interfaceIsEqual(l,$ifaceNil))){c.error(l);}c.string($bytesToString(k));$s=6;continue;case 5:m=d.String();$s=9;case 9:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=c.string(m);$s=10;case 10:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BL};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BM=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if(d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Elem();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=c.reflectValue(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BM};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BN=function(c,d,e){var $ptr,c,d,e;d=d;c.error(new AK.ptr(d.Type()));};BO.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;c.Buffer.WriteByte(123);g=true;h=f.fields;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]),CF);l=CC(d,k.index);$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(!m.IsValid()||k.omitEmpty&&AS(m)){$s=4;continue;}$s=5;continue;case 4:i++;$s=1;continue;case 5:if(g){g=false;}else{c.Buffer.WriteByte(44);}c.string(k.name);c.Buffer.WriteByte(58);$r=(n=f.fieldEncs,((j<0||j>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+j]))(c,m,k.quoted);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}i++;$s=1;continue;case 2:c.Buffer.WriteByte(125);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BO.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BO.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BP=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=CM(c);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=new BO.ptr(e,$makeSlice(FI,e.$length));g=e;h=0;case 2:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]),CF);k=CD(c,j.index);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=AW(k);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}(m=f.fieldEncs,((i<0||i>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+i]=l));h++;$s=2;continue;case 3:return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BP};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BQ.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}c.Buffer.WriteByte(123);h=d.MapKeys();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=(g=h,$subslice(new CE(g.$array),g.$offset,g.$offset+g.$length));$r=N.Sort(i);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j=i;k=0;case 3:if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]);if(l>0){c.Buffer.WriteByte(44);}n=m.String();$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=c.string(n);$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;c.Buffer.WriteByte(58);p=c;q=d.MapIndex(m);$s=7;case 7:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;$r=f.elemEnc(p,r,false);$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k++;$s=3;continue;case 4:c.Buffer.WriteByte(125);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BQ.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BQ.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BR=function(c){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Key();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d.Kind();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(!((e===24))){$s=1;continue;}$s=2;continue;case 1:return BN;case 2:f=c.Elem();$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=AW(f);$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=new BQ.ptr(g);return $methodVal(h,"encode");}return;}if($f===undefined){$f={$blk:BR};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BS=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if(d.IsNil()){c.Buffer.WriteString("null");return;}f=d.Bytes();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;c.Buffer.WriteByte(34);if(g.$length<1024){$s=2;continue;}$s=3;continue;case 2:h=$makeSlice(EY,D.StdEncoding.EncodedLen(g.$length));D.StdEncoding.Encode(h,g);c.Buffer.Write(h);$s=4;continue;case 3:i=D.NewEncoder(D.StdEncoding,c);j=i.Write(g);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}j;k=i.Close();$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;case 4:c.Buffer.WriteByte(34);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BS};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BT.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}$r=f.arrayEnc(c,d,false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BU=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d.Kind();$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}if(e===8){$s=1;continue;}$s=2;continue;case 1:return BS;case 2:f=BW(c);$s=5;case 5:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=new BT.ptr(f);return $methodVal(g,"encode");}return;}if($f===undefined){$f={$blk:BU};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BV.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;c.Buffer.WriteByte(91);g=d.Len();h=0;case 1:if(!(h0){c.Buffer.WriteByte(44);}i=c;j=d.Index(h);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;$r=f.elemEnc(i,k,false);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h=h+(1)>>0;$s=1;continue;case 2:c.Buffer.WriteByte(93);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BV.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BV.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BW=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=AW(d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=new BV.ptr(e);return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BW};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BX.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.IsNil()){c.Buffer.WriteString("null");return;}g=c;h=d.Elem();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=e;$r=f.elemEnc(g,i,j);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BX.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BX.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};BY=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Elem();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=AW(d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=new BX.ptr(e);return $methodVal(f,"encode");}return;}if($f===undefined){$f={$blk:BY};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BZ.ptr.prototype.encode=function(c,d,e){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(d.CanAddr()){$s=1;continue;}$s=2;continue;case 1:$r=f.canAddrEnc(c,d,e);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=3;continue;case 2:$r=f.elseEnc(c,d,e);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BZ.ptr.prototype.encode};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BZ.prototype.encode=function(c,d,e){return this.$val.encode(c,d,e);};CA=function(c,d){var $ptr,c,d,e;e=new BZ.ptr(c,d);return $methodVal(e,"encode");};CB=function(c){var $ptr,c,d,e,f,g;if(c===""){return false;}d=c;e=0;while(true){if(!(e?@[]^_{|}~ ",g)){}else{if(!J.IsLetter(g)&&!J.IsDigit(g)){return false;}}e+=f[1];}return true;};CC=function(c,d){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=c;e=d;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(c.Kind()===22){$s=3;continue;}$s=4;continue;case 3:if(c.IsNil()){return new G.Value.ptr(FC.nil,0,0);}h=c.Elem();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}c=h;case 4:i=c.Field(g);$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c=i;f++;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:CC};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};CD=function(c,d){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=d;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=c.Kind();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(h===22){$s=3;continue;}$s=4;continue;case 3:i=c.Elem();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c=i;case 4:j=c.Field(g);$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}c=j.Type;f++;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:CD};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};CE.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CE).prototype.Len=function(){return this.$get().Len();};CE.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]);g=((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]);((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]=f);((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]=g);};$ptrType(CE).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CE.prototype.Less=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.get(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=e.get(d);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return f=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]).String();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:CE.prototype.get};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(CE).prototype.get=function(c){return this.$get().get(c);};AP.ptr.prototype.string=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l;d=this;e=d.Buffer.Len();d.Buffer.WriteByte(34);f=0;g=0;while(true){if(!(g>0;continue;}if(f>>4<<24>>>24)));d.Buffer.WriteByte(AO.charCodeAt(((h&15)>>>0)));}g=g+(1)>>0;f=g;continue;}j=L.DecodeRuneInString(c.substring(g));k=j[0];l=j[1];if((k===65533)&&(l===1)){if(f>0;f=g;continue;}if((k===8232)||(k===8233)){if(f>0;f=g;continue;}g=g+(l)>>0;}if(f>0,$ifaceNil];};AP.prototype.string=function(c){return this.$val.string(c);};AP.ptr.prototype.stringBytes=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l;d=this;e=d.Buffer.Len();d.Buffer.WriteByte(34);f=0;g=0;while(true){if(!(g=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]);if(h<128){if(32<=h&&!((h===92))&&!((h===34))&&!((h===60))&&!((h===62))&&!((h===38))){g=g+(1)>>0;continue;}if(f>>4<<24>>>24)));d.Buffer.WriteByte(AO.charCodeAt(((h&15)>>>0)));}g=g+(1)>>0;f=g;continue;}j=L.DecodeRune($subslice(c,g));k=j[0];l=j[1];if((k===65533)&&(l===1)){if(f>0;f=g;continue;}if((k===8232)||(k===8233)){if(f>0;f=g;continue;}g=g+(l)>>0;}if(f>0,$ifaceNil];};AP.prototype.stringBytes=function(c){return this.$val.stringBytes(c);};CG=function(c){var $ptr,c;c=$clone(c,CF);c.nameBytes=new EY($stringToBytes(c.name));c.equalFold=CN(c.nameBytes);return c;};CH.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CH).prototype.Len=function(){return this.$get().Len();};CH.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=$clone(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),CF);g=$clone(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),CF);CF.copy(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),f);CF.copy(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),g);};$ptrType(CH).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CH.prototype.Less=function(c,d){var $ptr,c,d,e;e=this;if(!(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).name===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).name)){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).name<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).name;}if(!((((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length))){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length;}if(!(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).tag===((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).tag)){return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).tag;}return $subslice(new CI(e.$array),e.$offset,e.$offset+e.$length).Less(c,d);};$ptrType(CH).prototype.Less=function(c,d){return this.$get().Less(c,d);};CI.prototype.Len=function(){var $ptr,c;c=this;return c.$length;};$ptrType(CI).prototype.Len=function(){return this.$get().Len();};CI.prototype.Swap=function(c,d){var $ptr,c,d,e,f,g;e=this;f=$clone(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),CF);g=$clone(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),CF);CF.copy(((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]),f);CF.copy(((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]),g);};$ptrType(CI).prototype.Swap=function(c,d){return this.$get().Swap(c,d);};CI.prototype.Less=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k;e=this;f=((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length){return false;}if(!((i===(j=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index,((h<0||h>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h]))))){return i<(k=((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index,((h<0||h>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+h]));}g++;}return((c<0||c>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+c]).index.$length<((d<0||d>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+d]).index.$length;};$ptrType(CI).prototype.Less=function(c,d){return this.$get().Less(c,d);};CJ=function(c){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=new EV([]);e=new EV([new CF.ptr("",EY.nil,$throwNilPointerError,false,FB.nil,c,false,false)]);f=$makeMap(G.Type.keyFor,[]);g=$makeMap(G.Type.keyFor,[]);h=$makeMap(G.Type.keyFor,[]);i=EV.nil;case 1:if(!(e.$length>0)){$s=2;continue;}j=e;k=$subslice(d,0,0);d=j;e=k;l=g;m=$makeMap(G.Type.keyFor,[]);f=l;g=m;n=d;o=0;case 3:if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]),CF);if((q=h[G.Type.keyFor(p.typ)],q!==undefined?q.v:false)){$s=5;continue;}$s=6;continue;case 5:o++;$s=3;continue;case 6:r=p.typ;(h||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(r)]={k:r,v:true};s=0;case 7:t=p.typ.NumField();$s=9;case 9:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(!(s>0;$s=7;continue;case 12:w=new G.StructTag(v.Tag).Get("json");if(w==="-"){$s=13;continue;}$s=14;continue;case 13:s=s+(1)>>0;$s=7;continue;case 14:x=ER(w);y=x[0];z=x[1];if(!CB(y)){y="";}aa=$makeSlice(FB,(p.index.$length+1>>0));$copySlice(aa,p.index);(ab=p.index.$length,((ab<0||ab>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+ab]=s));ac=v.Type;ae=ac.Name();$s=18;case 18:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(!(ae==="")){ad=false;$s=17;continue s;}af=ac.Kind();$s=19;case 19:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ad=af===22;case 17:if(ad){$s=15;continue;}$s=16;continue;case 15:ag=ac.Elem();$s=20;case 20:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ac=ag;case 16:ah=false;if(new EQ(z).Contains("string")){$s=21;continue;}$s=22;continue;case 21:aj=ac.Kind();$s=23;case 23:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai=aj;if(ai===1||ai===2||ai===3||ai===4||ai===5||ai===6||ai===7||ai===8||ai===9||ai===10||ai===11||ai===13||ai===14||ai===24){$s=24;continue;}$s=25;continue;case 24:ah=true;case 25:case 22:if(!(y==="")||!v.Anonymous){ak=true;$s=28;continue s;}al=ac.Kind();$s=29;case 29:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}ak=!((al===25));case 28:if(ak){$s=26;continue;}$s=27;continue;case 26:am=!(y==="");if(y===""){y=v.Name;}i=$append(i,CG(new CF.ptr(y,EY.nil,$throwNilPointerError,am,aa,ac,new EQ(z).Contains("omitempty"),ah)));if((an=f[G.Type.keyFor(p.typ)],an!==undefined?an.v:0)>1){i=$append(i,(ao=i.$length-1>>0,((ao<0||ao>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+ao])));}s=s+(1)>>0;$s=7;continue;case 27:ap=ac;(g||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(ap)]={k:ap,v:(aq=g[G.Type.keyFor(ac)],aq!==undefined?aq.v:0)+(1)>>0};if((ar=g[G.Type.keyFor(ac)],ar!==undefined?ar.v:0)===1){$s=30;continue;}$s=31;continue;case 30:as=ac.Name();$s=32;case 32:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}at=CG(new CF.ptr(as,EY.nil,$throwNilPointerError,false,aa,ac,false,false));$s=33;case 33:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}e=$append(e,at);case 31:s=s+(1)>>0;$s=7;continue;case 8:o++;$s=3;continue;case 4:$s=1;continue;case 2:$r=N.Sort($subslice(new CH(i.$array),i.$offset,i.$offset+i.$length));$s=34;case 34:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}au=$subslice(i,0,0);av=0;aw=0;ax=av;ay=aw;case 35:if(!(ay=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+ay]),CF);ba=az.name;ax=1;while(true){if(!((ay+ax>>0)>0,((bb<0||bb>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+bb])),CF);if(!(bc.name===ba)){break;}ax=ax+(1)>>0;}if(ax===1){au=$append(au,az);ay=ay+(ax)>>0;$s=35;continue;}bd=CK($subslice(i,ay,(ay+ax>>0)));be=$clone(bd[0],CF);bf=bd[1];if(bf){au=$append(au,be);}ay=ay+(ax)>>0;$s=35;continue;case 36:i=au;$r=N.Sort($subslice(new CI(i.$array),i.$offset,i.$offset+i.$length));$s=37;case 37:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return i;}return;}if($f===undefined){$f={$blk:CJ};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CK=function(c){var $ptr,c,d,e,f,g,h,i;d=(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]).index.$length;e=-1;f=c;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]),CF);if(i.index.$length>d){c=$subslice(c,0,h);break;}if(i.tag){if(e>=0){return[new CF.ptr("",EY.nil,$throwNilPointerError,false,FB.nil,$ifaceNil,false,false),false];}e=h;}g++;}if(e>=0){return[((e<0||e>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]),true];}if(c.$length>1){return[new CF.ptr("",EY.nil,$throwNilPointerError,false,FB.nil,$ifaceNil,false,false),false];}return[(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]),true];};CM=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:CL.RWMutex.RLock();e=(d=CL.m[G.Type.keyFor(c)],d!==undefined?d.v:EV.nil);CL.RWMutex.RUnlock();if(!(e===EV.nil)){return e;}f=CJ(c);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;if(e===EV.nil){e=new EV([]);}CL.RWMutex.Lock();if(CL.m===false){CL.m=$makeMap(G.Type.keyFor,[]);}g=c;(CL.m||$throwRuntimeError("assignment to entry in nil map"))[G.Type.keyFor(g)]={k:g,v:e};CL.RWMutex.Unlock();return e;}return;}if($f===undefined){$f={$blk:CM};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};CN=function(c){var $ptr,c,d,e,f,g,h,i;d=false;e=false;f=c;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(h>=128){return B.EqualFold;}i=(h&223)>>>0;if(i<65||i>90){d=true;}else if((i===75)||(i===83)){e=true;}g++;}if(e){return CO;}if(d){return CP;}return CQ;};CO=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m;e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(d.$length===0){return false;}h=(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]);if(h<128){if(!((g===h))){i=(g&223)>>>0;if(65<=i&&i<=90){if(!((i===((h&223)>>>0)))){return false;}}else{return false;}}d=$subslice(d,1);f++;continue;}j=L.DecodeRune(d);k=j[0];l=j[1];m=g;if(m===115||m===83){if(!((k===383))){return false;}}else if(m===107||m===75){if(!((k===8490))){return false;}}else{return false;}d=$subslice(d,l);f++;}if(d.$length>0){return false;}return true;};CP=function(c,d){var $ptr,c,d,e,f,g,h,i;if(!((c.$length===d.$length))){return false;}e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);i=((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]);if(h===i){f++;continue;}if((97<=h&&h<=122)||(65<=h&&h<=90)){if(!((((h&223)>>>0)===((i&223)>>>0)))){return false;}}else{return false;}f++;}return true;};CQ=function(c,d){var $ptr,c,d,e,f,g,h;if(!((c.$length===d.$length))){return false;}e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(!((((h&223)>>>0)===((((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g])&223)>>>0)))){return false;}f++;}return true;};CS=function(c,d,e){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=[f];g=c.Len();f[0]=new CY.ptr($throwNilPointerError,false,FB.nil,$ifaceNil,false,0,$throwNilPointerError,new $Int64(0,0));f[0].reset();h=0;i=d;j=0;case 1:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(e&&((l===60)||(l===62)||(l===38))){if(h>>4<<24>>>24)));c.WriteByte(AO.charCodeAt(((l&15)>>>0)));h=k+1>>0;}if((l===226)&&(k+2>>0)>0,((m<0||m>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+m]))===128)&&((((n=k+2>>0,((n<0||n>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+n]))&~1)<<24>>>24)===168)){if(h>0,((o<0||o>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+o]))&15)>>>0)));h=k+3>>0;}p=f[0].step(f[0],(l>>0));$s=3;case 3:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;if(q>=9){if(q===11){$s=2;continue;}if(h>0;}j++;$s=1;continue;case 2:r=f[0].eof();$s=6;case 6:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r===11){$s=4;continue;}$s=5;continue;case 4:c.Truncate(g);return f[0].err;case 5:if(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);d.bytes=(h=d.bytes,i=new $Int64(0,1),new $Int64(h.$high+i.$high,h.$low+i.$low));j=d.step(d,(g>>0));$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j===11){$s=3;continue;}$s=4;continue;case 3:return d.err;case 4:f++;$s=1;continue;case 2:k=d.eof();$s=8;case 8:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if(k===11){$s=6;continue;}$s=7;continue;case 6:return d.err;case 7:return $ifaceNil;}return;}if($f===undefined){$f={$blk:CV};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};CW=function(c,d){var $ptr,aa,ab,ac,ad,ae,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=EY.nil;f=EY.nil;g=$ifaceNil;d.reset();h=c;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);l=d.step(d,(k>>0));$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(m>=5){$s=4;continue;}$s=5;continue;case 4:n=m;if(n===5||n===8){$s=6;continue;}if(n===11){$s=7;continue;}if(n===10){$s=8;continue;}$s=9;continue;case 6:o=d.step(d,32);$s=12;case 12:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}if(o===10){$s=10;continue;}$s=11;continue;case 10:p=$subslice(c,0,(j+1>>0));q=$subslice(c,(j+1>>0));r=$ifaceNil;e=p;f=q;g=r;return[e,f,g];case 11:$s=9;continue;case 7:s=EY.nil;t=EY.nil;u=d.err;e=s;f=t;g=u;return[e,f,g];case 8:v=$subslice(c,0,j);w=$subslice(c,j);x=$ifaceNil;e=v;f=w;g=x;return[e,f,g];case 9:case 5:i++;$s=1;continue;case 2:y=d.eof();$s=15;case 15:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}if(y===11){$s=13;continue;}$s=14;continue;case 13:z=EY.nil;aa=EY.nil;ab=d.err;e=z;f=aa;g=ab;return[e,f,g];case 14:ac=c;ad=EY.nil;ae=$ifaceNil;e=ac;f=ad;g=ae;return[e,f,g];}return;}if($f===undefined){$f={$blk:CW};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CX.ptr.prototype.Error=function(){var $ptr,c;c=this;return c.msg;};CX.prototype.Error=function(){return this.$val.Error();};CY.ptr.prototype.reset=function(){var $ptr,c;c=this;c.step=DB;c.parseState=$subslice(c.parseState,0,0);c.err=$ifaceNil;c.redo=false;c.endTop=false;};CY.prototype.reset=function(){return this.$val.reset();};CY.ptr.prototype.eof=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(!($interfaceIsEqual(c.err,$ifaceNil))){return 11;}if(c.endTop){return 10;}d=c.step(c,32);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;if(c.endTop){return 10;}if($interfaceIsEqual(c.err,$ifaceNil)){c.err=new CX.ptr("unexpected end of JSON input",c.bytes);}return 11;}return;}if($f===undefined){$f={$blk:CY.ptr.prototype.eof};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};CY.prototype.eof=function(){return this.$val.eof();};CY.ptr.prototype.pushParseState=function(c){var $ptr,c,d;d=this;d.parseState=$append(d.parseState,c);};CY.prototype.pushParseState=function(c){return this.$val.pushParseState(c);};CY.ptr.prototype.popParseState=function(){var $ptr,c,d;c=this;d=c.parseState.$length-1>>0;c.parseState=$subslice(c.parseState,0,d);c.redo=false;if(d===0){c.step=DF;c.endTop=true;}else{c.step=DE;}};CY.prototype.popParseState=function(){return this.$val.popParseState();};CZ=function(c){var $ptr,c;return(c===32)||(c===9)||(c===13)||(c===10);};DA=function(c,d){var $ptr,c,d;if(d<=32&&CZ((d>>0))){return 9;}if(d===93){return DE(c,d);}return DB(c,d);};DB=function(c,d){var $ptr,c,d,e;if(d<=32&&CZ((d>>0))){return 9;}e=d;if(e===123){c.step=DC;c.pushParseState(0);return 2;}else if(e===91){c.step=DA;c.pushParseState(2);return 6;}else if(e===34){c.step=DG;return 1;}else if(e===45){c.step=DM;return 1;}else if(e===48){c.step=DO;return 1;}else if(e===116){c.step=DU;return 1;}else if(e===102){c.step=DX;return 1;}else if(e===110){c.step=EB;return 1;}if(49<=d&&d<=57){c.step=DN;return 1;}return c.error(d,"looking for beginning of value");};DC=function(c,d){var $ptr,c,d,e,f,g;if(d<=32&&CZ((d>>0))){return 9;}if(d===125){e=c.parseState.$length;(f=c.parseState,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]=1));return DE(c,d);}return DD(c,d);};DD=function(c,d){var $ptr,c,d;if(d<=32&&CZ((d>>0))){return 9;}if(d===34){c.step=DG;return 1;}return c.error(d,"looking for beginning of object key string");};DE=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,m;e=c.parseState.$length;if(e===0){c.step=DF;c.endTop=true;return DF(c,d);}if(d<=32&&CZ((d>>0))){c.step=DE;return 9;}h=(f=c.parseState,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]));i=h;if(i===0){if(d===58){(j=c.parseState,k=e-1>>0,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]=1));c.step=DB;return 3;}return c.error(d,"after object key");}else if(i===1){if(d===44){(l=c.parseState,m=e-1>>0,((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]=0));c.step=DD;return 4;}if(d===125){c.popParseState();return 5;}return c.error(d,"after object key:value pair");}else if(i===2){if(d===44){c.step=DB;return 7;}if(d===93){c.popParseState();return 8;}return c.error(d,"after array element");}return c.error(d,"");};DF=function(c,d){var $ptr,c,d;if(!((d===32))&&!((d===9))&&!((d===13))&&!((d===10))){c.error(d,"after top-level value");}return 10;};DG=function(c,d){var $ptr,c,d;if(d===34){c.step=DE;return 0;}if(d===92){c.step=DH;return 0;}if(d<32){return c.error(d,"in string literal");}return 0;};DH=function(c,d){var $ptr,c,d,e;e=d;if(e===98||e===102||e===110||e===114||e===116||e===92||e===47||e===34){c.step=DG;return 0;}if(d===117){c.step=DI;return 0;}return c.error(d,"in string escape code");};DI=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DJ;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DJ=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DK;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DK=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DL;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DL=function(c,d){var $ptr,c,d;if(48<=d&&d<=57||97<=d&&d<=102||65<=d&&d<=70){c.step=DG;return 0;}return c.error(d,"in \\u hexadecimal character escape");};DM=function(c,d){var $ptr,c,d;if(d===48){c.step=DO;return 0;}if(49<=d&&d<=57){c.step=DN;return 0;}return c.error(d,"in numeric literal");};DN=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DN;return 0;}return DO(c,d);};DO=function(c,d){var $ptr,c,d;if(d===46){c.step=DP;return 0;}if((d===101)||(d===69)){c.step=DR;return 0;}return DE(c,d);};DP=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DQ;return 0;}return c.error(d,"after decimal point in numeric literal");};DQ=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DQ;return 0;}if((d===101)||(d===69)){c.step=DR;return 0;}return DE(c,d);};DR=function(c,d){var $ptr,c,d;if(d===43){c.step=DS;return 0;}if(d===45){c.step=DS;return 0;}return DS(c,d);};DS=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DT;return 0;}return c.error(d,"in exponent of numeric literal");};DT=function(c,d){var $ptr,c,d;if(48<=d&&d<=57){c.step=DT;return 0;}return DE(c,d);};DU=function(c,d){var $ptr,c,d;if(d===114){c.step=DV;return 0;}return c.error(d,"in literal true (expecting 'r')");};DV=function(c,d){var $ptr,c,d;if(d===117){c.step=DW;return 0;}return c.error(d,"in literal true (expecting 'u')");};DW=function(c,d){var $ptr,c,d;if(d===101){c.step=DE;return 0;}return c.error(d,"in literal true (expecting 'e')");};DX=function(c,d){var $ptr,c,d;if(d===97){c.step=DY;return 0;}return c.error(d,"in literal false (expecting 'a')");};DY=function(c,d){var $ptr,c,d;if(d===108){c.step=DZ;return 0;}return c.error(d,"in literal false (expecting 'l')");};DZ=function(c,d){var $ptr,c,d;if(d===115){c.step=EA;return 0;}return c.error(d,"in literal false (expecting 's')");};EA=function(c,d){var $ptr,c,d;if(d===101){c.step=DE;return 0;}return c.error(d,"in literal false (expecting 'e')");};EB=function(c,d){var $ptr,c,d;if(d===117){c.step=EC;return 0;}return c.error(d,"in literal null (expecting 'u')");};EC=function(c,d){var $ptr,c,d;if(d===108){c.step=ED;return 0;}return c.error(d,"in literal null (expecting 'l')");};ED=function(c,d){var $ptr,c,d;if(d===108){c.step=DE;return 0;}return c.error(d,"in literal null (expecting 'l')");};EE=function(c,d){var $ptr,c,d;return 11;};CY.ptr.prototype.error=function(c,d){var $ptr,c,d,e;e=this;e.step=EE;e.err=new CX.ptr("invalid character "+EF(c)+" "+d,e.bytes);return 11;};CY.prototype.error=function(c,d){return this.$val.error(c,d);};EF=function(c){var $ptr,c,d;if(c===39){return"'\\''";}if(c===34){return"'\"'";}d=I.Quote($encodeRune(c));return"'"+d.substring(1,(d.length-1>>0))+"'";};CY.ptr.prototype.undo=function(c){var $ptr,c,d;d=this;if(d.redo){$panic(new $String("json: invalid use of scanner"));}d.redoCode=c;d.redoState=d.step;d.step=EG;d.redo=true;};CY.prototype.undo=function(c){return this.$val.undo(c);};EG=function(c,d){var $ptr,c,d;c.redo=false;c.step=c.redoState;return c.redoCode;};ER=function(c){var $ptr,c,d;d=O.Index(c,",");if(!((d===-1))){return[c.substring(0,d),c.substring((d+1>>0))];}return[c,""];};EQ.prototype.Contains=function(c){var $ptr,c,d,e,f,g,h,i;d=this.$val;if(d.length===0){return false;}e=d;while(true){if(!(!(e===""))){break;}f="";g=O.Index(e,",");if(g>=0){h=e.substring(0,g);i=e.substring((g+1>>0));e=h;f=i;}if(e===c){return true;}e=f;}return false;};$ptrType(EQ).prototype.Contains=function(c){return new EQ(this.$get()).Contains(c);};FN.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FP.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];X.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([],[$Float64,$error],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64,$error],false)}];FQ.methods=[{prop:"unmarshal",name:"unmarshal",pkg:"encoding/json",typ:$funcType([$emptyInterface],[$error],false)},{prop:"init",name:"init",pkg:"encoding/json",typ:$funcType([EY],[FQ],false)},{prop:"error",name:"error",pkg:"encoding/json",typ:$funcType([$error],[],false)},{prop:"saveError",name:"saveError",pkg:"encoding/json",typ:$funcType([$error],[],false)},{prop:"next",name:"next",pkg:"encoding/json",typ:$funcType([],[EY],false)},{prop:"scanWhile",name:"scanWhile",pkg:"encoding/json",typ:$funcType([$Int],[$Int],false)},{prop:"value",name:"value",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"valueQuoted",name:"valueQuoted",pkg:"encoding/json",typ:$funcType([],[$emptyInterface],false)},{prop:"indirect",name:"indirect",pkg:"encoding/json",typ:$funcType([G.Value,$Bool],[T,C.TextUnmarshaler,G.Value],false)},{prop:"array",name:"array",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"object",name:"object",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"literal",name:"literal",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"convertNumber",name:"convertNumber",pkg:"encoding/json",typ:$funcType([$String],[$emptyInterface,$error],false)},{prop:"literalStore",name:"literalStore",pkg:"encoding/json",typ:$funcType([EY,G.Value,$Bool],[],false)},{prop:"valueInterface",name:"valueInterface",pkg:"encoding/json",typ:$funcType([],[$emptyInterface],false)},{prop:"arrayInterface",name:"arrayInterface",pkg:"encoding/json",typ:$funcType([],[ES],false)},{prop:"objectInterface",name:"objectInterface",pkg:"encoding/json",typ:$funcType([],[FD],false)},{prop:"literalInterface",name:"literalInterface",pkg:"encoding/json",typ:$funcType([],[$emptyInterface],false)}];FR.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FS.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FU.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];FH.methods=[{prop:"marshal",name:"marshal",pkg:"encoding/json",typ:$funcType([$emptyInterface],[$error],false)},{prop:"error",name:"error",pkg:"encoding/json",typ:$funcType([$error],[],false)},{prop:"reflectValue",name:"reflectValue",pkg:"encoding/json",typ:$funcType([G.Value],[],false)},{prop:"string",name:"string",pkg:"encoding/json",typ:$funcType([$String],[$Int,$error],false)},{prop:"stringBytes",name:"stringBytes",pkg:"encoding/json",typ:$funcType([EY],[$Int,$error],false)}];BI.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];FV.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];FW.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];FX.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];FY.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];FZ.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];GA.methods=[{prop:"encode",name:"encode",pkg:"encoding/json",typ:$funcType([FH,G.Value,$Bool],[],false)}];CE.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"get",name:"get",pkg:"encoding/json",typ:$funcType([$Int],[$String],false)}];CH.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)}];CI.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)}];FM.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];GC.methods=[{prop:"reset",name:"reset",pkg:"encoding/json",typ:$funcType([],[],false)},{prop:"eof",name:"eof",pkg:"encoding/json",typ:$funcType([],[$Int],false)},{prop:"pushParseState",name:"pushParseState",pkg:"encoding/json",typ:$funcType([$Int],[],false)},{prop:"popParseState",name:"popParseState",pkg:"encoding/json",typ:$funcType([],[],false)},{prop:"error",name:"error",pkg:"encoding/json",typ:$funcType([$Int,$String],[$Int],false)},{prop:"undo",name:"undo",pkg:"encoding/json",typ:$funcType([$Int],[],false)}];EQ.methods=[{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([$String],[$Bool],false)}];T.init([{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([EY],[$error],false)}]);U.init([{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""},{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Int64,tag:""}]);W.init([{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""}]);Y.init([{prop:"data",name:"data",pkg:"encoding/json",typ:EY,tag:""},{prop:"off",name:"off",pkg:"encoding/json",typ:$Int,tag:""},{prop:"scan",name:"scan",pkg:"encoding/json",typ:CY,tag:""},{prop:"nextscan",name:"nextscan",pkg:"encoding/json",typ:CY,tag:""},{prop:"savedError",name:"savedError",pkg:"encoding/json",typ:$error,tag:""},{prop:"useNumber",name:"useNumber",pkg:"encoding/json",typ:$Bool,tag:""}]);AA.init([]);AJ.init([{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[EY,$error],false)}]);AK.init([{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""}]);AL.init([{prop:"Value",name:"Value",pkg:"",typ:G.Value,tag:""},{prop:"Str",name:"Str",pkg:"",typ:$String,tag:""}]);AN.init([{prop:"Type",name:"Type",pkg:"",typ:G.Type,tag:""},{prop:"Err",name:"Err",pkg:"",typ:$error,tag:""}]);AP.init([{prop:"Buffer",name:"",pkg:"",typ:B.Buffer,tag:""},{prop:"scratch",name:"scratch",pkg:"encoding/json",typ:FG,tag:""}]);AT.init([FH,G.Value,$Bool],[],false);BO.init([{prop:"fields",name:"fields",pkg:"encoding/json",typ:EV,tag:""},{prop:"fieldEncs",name:"fieldEncs",pkg:"encoding/json",typ:FI,tag:""}]);BQ.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AT,tag:""}]);BT.init([{prop:"arrayEnc",name:"arrayEnc",pkg:"encoding/json",typ:AT,tag:""}]);BV.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AT,tag:""}]);BX.init([{prop:"elemEnc",name:"elemEnc",pkg:"encoding/json",typ:AT,tag:""}]);BZ.init([{prop:"canAddrEnc",name:"canAddrEnc",pkg:"encoding/json",typ:AT,tag:""},{prop:"elseEnc",name:"elseEnc",pkg:"encoding/json",typ:AT,tag:""}]);CE.init(G.Value);CF.init([{prop:"name",name:"name",pkg:"encoding/json",typ:$String,tag:""},{prop:"nameBytes",name:"nameBytes",pkg:"encoding/json",typ:EY,tag:""},{prop:"equalFold",name:"equalFold",pkg:"encoding/json",typ:GB,tag:""},{prop:"tag",name:"tag",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"index",name:"index",pkg:"encoding/json",typ:FB,tag:""},{prop:"typ",name:"typ",pkg:"encoding/json",typ:G.Type,tag:""},{prop:"omitEmpty",name:"omitEmpty",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"quoted",name:"quoted",pkg:"encoding/json",typ:$Bool,tag:""}]);CH.init(CF);CI.init(CF);CX.init([{prop:"msg",name:"msg",pkg:"encoding/json",typ:$String,tag:""},{prop:"Offset",name:"Offset",pkg:"",typ:$Int64,tag:""}]);CY.init([{prop:"step",name:"step",pkg:"encoding/json",typ:GD,tag:""},{prop:"endTop",name:"endTop",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"parseState",name:"parseState",pkg:"encoding/json",typ:FB,tag:""},{prop:"err",name:"err",pkg:"encoding/json",typ:$error,tag:""},{prop:"redo",name:"redo",pkg:"encoding/json",typ:$Bool,tag:""},{prop:"redoCode",name:"redoCode",pkg:"encoding/json",typ:$Int,tag:""},{prop:"redoState",name:"redoState",pkg:"encoding/json",typ:GD,tag:""},{prop:"bytes",name:"bytes",pkg:"encoding/json",typ:$Int64,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=P.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=Q.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=O.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AU=new EU.ptr(new P.RWMutex.ptr(false,0),false);CL=new EX.ptr(new P.RWMutex.ptr(false,0),false);Z=E.New("JSON decoder out of sync - data changing underfoot?");AB=new EY($stringToBytes("null"));AC=G.TypeOf(new X(""));AO="0123456789abcdef";a=G.TypeOf($newDataPointer($ifaceNil,EZ)).Elem();$s=18;case 18:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}AX=a;b=G.TypeOf($newDataPointer($ifaceNil,FA)).Elem();$s=19;case 19:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}AY=b;BJ=$methodVal(new BI(32),"encode");BK=$methodVal(new BI(64),"encode");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["encoding/binary"]=(function(){var $pkg={},$init,A,B,C,D,U;A=$packages["errors"];B=$packages["io"];C=$packages["math"];D=$packages["reflect"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}U=A.New("binary: varint overflows a 64-bit integer");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["math/rand"]=(function(){var $pkg={},$init,B,A,J,L,AB,AD,AH,AI,AJ,AL,AM,C,D,E,G,H,I,N,AC,F,K,M,AE;B=$packages["github.com/gopherjs/gopherjs/nosync"];A=$packages["math"];J=$pkg.Source=$newType(8,$kindInterface,"rand.Source","Source","math/rand",null);L=$pkg.Rand=$newType(0,$kindStruct,"rand.Rand","Rand","math/rand",function(src_){this.$val=this;if(arguments.length===0){this.src=$ifaceNil;return;}this.src=src_;});AB=$pkg.lockedSource=$newType(0,$kindStruct,"rand.lockedSource","lockedSource","math/rand",function(lk_,src_){this.$val=this;if(arguments.length===0){this.lk=new B.Mutex.ptr(false);this.src=$ifaceNil;return;}this.lk=lk_;this.src=src_;});AD=$pkg.rngSource=$newType(0,$kindStruct,"rand.rngSource","rngSource","math/rand",function(tap_,feed_,vec_){this.$val=this;if(arguments.length===0){this.tap=0;this.feed=0;this.vec=AH.zero();return;}this.tap=tap_;this.feed=feed_;this.vec=vec_;});AH=$arrayType($Int64,607);AI=$sliceType($Int);AJ=$ptrType(L);AL=$ptrType(AB);AM=$ptrType(AD);L.ptr.prototype.ExpFloat64=function(){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;case 1:b=a.Uint32();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=(c&255)>>>0;e=c*((d<0||d>=D.length)?$throwRuntimeError("index out of range"):D[d]);if(c<((d<0||d>=C.length)?$throwRuntimeError("index out of range"):C[d])){return e;}if(d===0){$s=4;continue;}$s=5;continue;case 4:f=a.Float64();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.Log(f);$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return 7.69711747013105-g;case 5:h=a.Float64();$s=10;case 10:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if($fround(((d<0||d>=E.length)?$throwRuntimeError("index out of range"):E[d])+$fround($fround(h)*($fround((i=d-1>>>0,((i<0||i>=E.length)?$throwRuntimeError("index out of range"):E[i]))-((d<0||d>=E.length)?$throwRuntimeError("index out of range"):E[d])))))<$fround(A.Exp(-e))){$s=8;continue;}$s=9;continue;case 8:return e;case 9:$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:L.ptr.prototype.ExpFloat64};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.ExpFloat64=function(){return this.$val.ExpFloat64();};F=function(a){var $ptr,a;if(a<0){return(-a>>>0);}return(a>>>0);};L.ptr.prototype.NormFloat64=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;case 1:b=a.Uint32();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=(b>>0);d=c&127;e=c*((d<0||d>=H.length)?$throwRuntimeError("index out of range"):H[d]);if(F(c)<((d<0||d>=G.length)?$throwRuntimeError("index out of range"):G[d])){return e;}if(d===0){$s=4;continue;}$s=5;continue;case 4:case 6:f=a.Float64();$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=A.Log(f);$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=-g*0.29047645161474317;h=a.Float64();$s=10;case 10:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=A.Log(h);$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=-i;if(j+j>=e*e){$s=7;continue;}$s=6;continue;case 7:if(c>0){return 3.442619855899+e;}return-3.442619855899-e;case 5:k=a.Float64();$s=14;case 14:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if($fround(((d<0||d>=I.length)?$throwRuntimeError("index out of range"):I[d])+$fround($fround(k)*($fround((l=d-1>>0,((l<0||l>=I.length)?$throwRuntimeError("index out of range"):I[l]))-((d<0||d>=I.length)?$throwRuntimeError("index out of range"):I[d])))))<$fround(A.Exp(-0.5*e*e))){$s=12;continue;}$s=13;continue;case 12:return e;case 13:$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:L.ptr.prototype.NormFloat64};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.NormFloat64=function(){return this.$val.NormFloat64();};K=function(a){var $ptr,a,b;b=new AD.ptr(0,0,AH.zero());b.Seed(a);return b;};$pkg.NewSource=K;M=function(a){var $ptr,a;return new L.ptr(a);};$pkg.New=M;L.ptr.prototype.Seed=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;$r=b.src.Seed(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Seed};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Seed=function(a){return this.$val.Seed(a);};L.ptr.prototype.Int63=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.src.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Int63};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Int63=function(){return this.$val.Int63();};L.ptr.prototype.Uint32=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return($shiftRightInt64(b,31).$low>>>0);}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Uint32};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Uint32=function(){return this.$val.Uint32();};L.ptr.prototype.Int31=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;c=a.Int63();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return((b=$shiftRightInt64(c,32),b.$low+((b.$high>>31)*4294967296))>>0);}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Int31};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Int31=function(){return this.$val.Int31();};L.ptr.prototype.Int=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=(b.$low>>>0);return(((c<<1>>>0)>>>1>>>0)>>0);}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Int};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Int=function(){return this.$val.Int();};L.ptr.prototype.Int63n=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if((a.$high<0||(a.$high===0&&a.$low<=0))){$panic(new $String("invalid argument to Int63n"));}if((c=(d=new $Int64(a.$high-0,a.$low-1),new $Int64(a.$high&d.$high,(a.$low&d.$low)>>>0)),(c.$high===0&&c.$low===0))){$s=1;continue;}$s=2;continue;case 1:f=b.Int63();$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return(e=f,g=new $Int64(a.$high-0,a.$low-1),new $Int64(e.$high&g.$high,(e.$low&g.$low)>>>0));case 2:j=(h=(i=$div64(new $Uint64(2147483648,0),new $Uint64(a.$high,a.$low),true),new $Uint64(2147483647-i.$high,4294967295-i.$low)),new $Int64(h.$high,h.$low));k=b.Int63();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;case 5:if(!((l.$high>j.$high||(l.$high===j.$high&&l.$low>j.$low)))){$s=6;continue;}m=b.Int63();$s=7;case 7:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;$s=5;continue;case 6:return $div64(l,a,true);}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Int63n};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Int63n=function(a){return this.$val.Int63n(a);};L.ptr.prototype.Int31n=function(a){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if(a<=0){$panic(new $String("invalid argument to Int31n"));}if((a&((a-1>>0)))===0){$s=1;continue;}$s=2;continue;case 1:c=b.Int31();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c&((a-1>>0));case 2:e=((2147483647-(d=2147483648%(a>>>0),d===d?d:$throwRuntimeError("integer divide by zero"))>>>0)>>0);f=b.Int31();$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;case 5:if(!(g>e)){$s=6;continue;}h=b.Int31();$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;$s=5;continue;case 6:return(i=g%a,i===i?i:$throwRuntimeError("integer divide by zero"));}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Int31n};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Int31n=function(a){return this.$val.Int31n(a);};L.ptr.prototype.Intn=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if(a<=0){$panic(new $String("invalid argument to Intn"));}if(a<=2147483647){$s=1;continue;}$s=2;continue;case 1:c=b.Int31n((a>>0));$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return(c>>0);case 2:e=b.Int63n(new $Int64(0,a));$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return((d=e,d.$low+((d.$high>>31)*4294967296))>>0);}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Intn};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Intn=function(a){return this.$val.Intn(a);};L.ptr.prototype.Float64=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Int63();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=$flatten64(b)/9.223372036854776e+18;if(c===1){c=0;}return c;}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Float64};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Float64=function(){return this.$val.Float64();};L.ptr.prototype.Float32=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Float64();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=$fround(b);if(c===1){c=0;}return c;}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Float32};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Float32=function(){return this.$val.Float32();};L.ptr.prototype.Perm=function(a){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=$makeSlice(AI,a);d=0;case 1:if(!(d>0);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]));((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=d);d=d+(1)>>0;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:L.ptr.prototype.Perm};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};L.prototype.Perm=function(a){return this.$val.Perm(a);};AB.ptr.prototype.Int63=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=new $Int64(0,0);b=this;b.lk.Lock();c=b.src.Int63();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}a=c;b.lk.Unlock();return a;}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Int63};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Int63=function(){return this.$val.Int63();};AB.ptr.prototype.Seed=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;b.lk.Lock();$r=b.src.Seed(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b.lk.Unlock();$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AB.ptr.prototype.Seed};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Seed=function(a){return this.$val.Seed(a);};AE=function(a){var $ptr,a,b,c,d,e;c=(b=a/44488,(b===b&&b!==1/0&&b!==-1/0)?b>>0:$throwRuntimeError("integer divide by zero"));e=(d=a%44488,d===d?d:$throwRuntimeError("integer divide by zero"));a=((((48271>>>16<<16)*e>>0)+(48271<<16>>>16)*e)>>0)-((((3399>>>16<<16)*c>>0)+(3399<<16>>>16)*c)>>0)>>0;if(a<0){a=a+(2147483647)>>0;}return a;};AD.ptr.prototype.Seed=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=this;b.tap=0;b.feed=334;a=$div64(a,new $Int64(0,2147483647),true);if((a.$high<0||(a.$high===0&&a.$low<0))){a=(c=new $Int64(0,2147483647),new $Int64(a.$high+c.$high,a.$low+c.$low));}if((a.$high===0&&a.$low===0)){a=new $Int64(0,89482311);}d=((a.$low+((a.$high>>31)*4294967296))>>0);e=-20;while(true){if(!(e<607)){break;}d=AE(d);if(e>=0){f=new $Int64(0,0);f=$shiftLeft64(new $Int64(0,d),40);d=AE(d);f=(g=$shiftLeft64(new $Int64(0,d),20),new $Int64(f.$high^g.$high,(f.$low^g.$low)>>>0));d=AE(d);f=(h=new $Int64(0,d),new $Int64(f.$high^h.$high,(f.$low^h.$low)>>>0));f=(i=((e<0||e>=AC.length)?$throwRuntimeError("index out of range"):AC[e]),new $Int64(f.$high^i.$high,(f.$low^i.$low)>>>0));(j=b.vec,((e<0||e>=j.length)?$throwRuntimeError("index out of range"):j[e]=new $Int64(f.$high&2147483647,(f.$low&4294967295)>>>0)));}e=e+(1)>>0;}};AD.prototype.Seed=function(a){return this.$val.Seed(a);};AD.ptr.prototype.Int63=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k;a=this;a.tap=a.tap-(1)>>0;if(a.tap<0){a.tap=a.tap+(607)>>0;}a.feed=a.feed-(1)>>0;if(a.feed<0){a.feed=a.feed+(607)>>0;}i=(b=(c=(d=a.vec,e=a.feed,((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e])),f=(g=a.vec,h=a.tap,((h<0||h>=g.length)?$throwRuntimeError("index out of range"):g[h])),new $Int64(c.$high+f.$high,c.$low+f.$low)),new $Int64(b.$high&2147483647,(b.$low&4294967295)>>>0));(j=a.vec,k=a.feed,((k<0||k>=j.length)?$throwRuntimeError("index out of range"):j[k]=i));return i;};AD.prototype.Int63=function(){return this.$val.Int63();};AJ.methods=[{prop:"ExpFloat64",name:"ExpFloat64",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"NormFloat64",name:"NormFloat64",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint32",name:"Uint32",pkg:"",typ:$funcType([],[$Uint32],false)},{prop:"Int31",name:"Int31",pkg:"",typ:$funcType([],[$Int32],false)},{prop:"Int",name:"Int",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Int63n",name:"Int63n",pkg:"",typ:$funcType([$Int64],[$Int64],false)},{prop:"Int31n",name:"Int31n",pkg:"",typ:$funcType([$Int32],[$Int32],false)},{prop:"Intn",name:"Intn",pkg:"",typ:$funcType([$Int],[$Int],false)},{prop:"Float64",name:"Float64",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Float32",name:"Float32",pkg:"",typ:$funcType([],[$Float32],false)},{prop:"Perm",name:"Perm",pkg:"",typ:$funcType([$Int],[AI],false)}];AL.methods=[{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)}];AM.methods=[{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)},{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)}];J.init([{prop:"Int63",name:"Int63",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Seed",name:"Seed",pkg:"",typ:$funcType([$Int64],[],false)}]);L.init([{prop:"src",name:"src",pkg:"math/rand",typ:J,tag:""}]);AB.init([{prop:"lk",name:"lk",pkg:"math/rand",typ:B.Mutex,tag:""},{prop:"src",name:"src",pkg:"math/rand",typ:J,tag:""}]);AD.init([{prop:"tap",name:"tap",pkg:"math/rand",typ:$Int,tag:""},{prop:"feed",name:"feed",pkg:"math/rand",typ:$Int,tag:""},{prop:"vec",name:"vec",pkg:"math/rand",typ:AH,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}C=$toNativeArray($kindUint32,[3801129273,0,2615860924,3279400049,3571300752,3733536696,3836274812,3906990442,3958562475,3997804264,4028649213,4053523342,4074002619,4091154507,4105727352,4118261130,4129155133,4138710916,4147160435,4154685009,4161428406,4167506077,4173011791,4178022498,4182601930,4186803325,4190671498,4194244443,4197554582,4200629752,4203493986,4206168142,4208670408,4211016720,4213221098,4215295924,4217252177,4219099625,4220846988,4222502074,4224071896,4225562770,4226980400,4228329951,4229616109,4230843138,4232014925,4233135020,4234206673,4235232866,4236216336,4237159604,4238064994,4238934652,4239770563,4240574564,4241348362,4242093539,4242811568,4243503822,4244171579,4244816032,4245438297,4246039419,4246620374,4247182079,4247725394,4248251127,4248760037,4249252839,4249730206,4250192773,4250641138,4251075867,4251497493,4251906522,4252303431,4252688672,4253062674,4253425844,4253778565,4254121205,4254454110,4254777611,4255092022,4255397640,4255694750,4255983622,4256264513,4256537670,4256803325,4257061702,4257313014,4257557464,4257795244,4258026541,4258251531,4258470383,4258683258,4258890309,4259091685,4259287526,4259477966,4259663135,4259843154,4260018142,4260188212,4260353470,4260514019,4260669958,4260821380,4260968374,4261111028,4261249421,4261383632,4261513736,4261639802,4261761900,4261880092,4261994441,4262105003,4262211835,4262314988,4262414513,4262510454,4262602857,4262691764,4262777212,4262859239,4262937878,4263013162,4263085118,4263153776,4263219158,4263281289,4263340187,4263395872,4263448358,4263497660,4263543789,4263586755,4263626565,4263663224,4263696735,4263727099,4263754314,4263778377,4263799282,4263817020,4263831582,4263842955,4263851124,4263856071,4263857776,4263856218,4263851370,4263843206,4263831695,4263816804,4263798497,4263776735,4263751476,4263722676,4263690284,4263654251,4263614520,4263571032,4263523724,4263472530,4263417377,4263358192,4263294892,4263227394,4263155608,4263079437,4262998781,4262913534,4262823581,4262728804,4262629075,4262524261,4262414220,4262298801,4262177846,4262051187,4261918645,4261780032,4261635148,4261483780,4261325704,4261160681,4260988457,4260808763,4260621313,4260425802,4260221905,4260009277,4259787550,4259556329,4259315195,4259063697,4258801357,4258527656,4258242044,4257943926,4257632664,4257307571,4256967906,4256612870,4256241598,4255853155,4255446525,4255020608,4254574202,4254106002,4253614578,4253098370,4252555662,4251984571,4251383021,4250748722,4250079132,4249371435,4248622490,4247828790,4246986404,4246090910,4245137315,4244119963,4243032411,4241867296,4240616155,4239269214,4237815118,4236240596,4234530035,4232664930,4230623176,4228378137,4225897409,4223141146,4220059768,4216590757,4212654085,4208145538,4202926710,4196809522,4189531420,4180713890,4169789475,4155865042,4137444620,4111806704,4073393724,4008685917,3873074895]);D=$toNativeArray($kindFloat32,[2.0249555365836613e-09,1.4866739783681027e-11,2.4409616689036184e-11,3.1968806074589295e-11,3.844677007314168e-11,4.42282044321729e-11,4.951644302919611e-11,5.443358958023836e-11,5.905943789574764e-11,6.34494193296753e-11,6.764381416113352e-11,7.167294535648239e-11,7.556032188826833e-11,7.932458162551725e-11,8.298078890689453e-11,8.654132271912474e-11,9.001651507523079e-11,9.341507428706208e-11,9.674443190998971e-11,1.0001099254308699e-10,1.0322031424037093e-10,1.0637725422757427e-10,1.0948611461891744e-10,1.1255067711157807e-10,1.1557434870246297e-10,1.1856014781042035e-10,1.2151082917633005e-10,1.2442885610752796e-10,1.2731647680563896e-10,1.3017574518325858e-10,1.330085347417409e-10,1.3581656632677408e-10,1.386014220061682e-10,1.413645728254309e-10,1.4410737880776736e-10,1.4683107507629245e-10,1.4953686899854546e-10,1.522258291641876e-10,1.5489899640730442e-10,1.575573282952547e-10,1.6020171300645814e-10,1.628330109637588e-10,1.6545202707884954e-10,1.68059510752272e-10,1.7065616975120435e-10,1.73242697965037e-10,1.758197337720091e-10,1.783878739169964e-10,1.8094774290045024e-10,1.834998542005195e-10,1.8604476292871652e-10,1.8858298256319017e-10,1.9111498494872592e-10,1.9364125580789704e-10,1.9616222535212557e-10,1.9867835154840918e-10,2.011900368525943e-10,2.0369768372052732e-10,2.062016807302669e-10,2.0870240258208383e-10,2.1120022397624894e-10,2.136955057352452e-10,2.1618855317040442e-10,2.1867974098199738e-10,2.2116936060356807e-10,2.2365774510202385e-10,2.2614519978869652e-10,2.2863201609713002e-10,2.3111849933865614e-10,2.3360494094681883e-10,2.3609159072179864e-10,2.3857874009713953e-10,2.4106666662859766e-10,2.4355562011635357e-10,2.460458781161634e-10,2.485376904282077e-10,2.5103127909709144e-10,2.5352694943414633e-10,2.560248957284017e-10,2.585253955356137e-10,2.610286709003873e-10,2.6353494386732734e-10,2.6604446423661443e-10,2.6855745405285347e-10,2.71074163116225e-10,2.7359478571575835e-10,2.7611959940720965e-10,2.786487707240326e-10,2.8118254946640775e-10,2.8372118543451563e-10,2.8626484516180994e-10,2.8881380620404684e-10,2.9136826285025563e-10,2.9392840938946563e-10,2.96494523377433e-10,2.990667713476114e-10,3.016454031001814e-10,3.042306406797479e-10,3.068226783753403e-10,3.09421765987139e-10,3.12028125559749e-10,3.1464195138219964e-10,3.17263521010247e-10,3.1989300097734485e-10,3.225306410836737e-10,3.2517669112941405e-10,3.2783134540359526e-10,3.3049485370639786e-10,3.3316743808242677e-10,3.3584937608743815e-10,3.385408342548857e-10,3.4124211789610115e-10,3.4395342130011386e-10,3.4667499426710435e-10,3.494071143528288e-10,3.521500313574677e-10,3.54903967325626e-10,3.576691720574843e-10,3.6044595086437425e-10,3.632345535464765e-10,3.660352021483959e-10,3.688482297370399e-10,3.716738583570134e-10,3.7451239331964814e-10,3.773641121807003e-10,3.802292924959261e-10,3.831082673322328e-10,3.8600128648980103e-10,3.8890865527996255e-10,3.9183070676962473e-10,3.9476774627011935e-10,3.977200790927782e-10,4.006880383045086e-10,4.0367195697221803e-10,4.066721681628138e-10,4.0968900494320337e-10,4.127228558914453e-10,4.15774054074447e-10,4.188429603146915e-10,4.2192993543466173e-10,4.25035395767992e-10,4.2815970213716525e-10,4.313032986313914e-10,4.3446651831757777e-10,4.376498607960855e-10,4.408536868893975e-10,4.4407846844229937e-10,4.4732464954400086e-10,4.5059267428371186e-10,4.538830145062178e-10,4.5719619756745544e-10,4.605326675566346e-10,4.638929240741163e-10,4.672775499869886e-10,4.706869893844612e-10,4.74121908400349e-10,4.775827511238617e-10,4.810701836888143e-10,4.845848167178701e-10,4.881271498113904e-10,4.916979601254923e-10,4.952977472605369e-10,4.989272883726414e-10,5.025872495956207e-10,5.062783525744408e-10,5.100013189540675e-10,5.13756870379467e-10,5.175458395179078e-10,5.21369003525507e-10,5.252272505806843e-10,5.29121357839557e-10,5.330522134805449e-10,5.3702081670437e-10,5.41028055689452e-10,5.450749851476644e-10,5.491624932574268e-10,5.532918012640664e-10,5.574638528571541e-10,5.616799247931681e-10,5.659410717839819e-10,5.702485705860738e-10,5.746036979559221e-10,5.790077306500052e-10,5.83462111958255e-10,5.879682296594524e-10,5.925275825546805e-10,5.971417249561739e-10,6.01812211176167e-10,6.065408175714992e-10,6.113292094767075e-10,6.16179329782085e-10,6.21092954844471e-10,6.260721940876124e-10,6.311191569352559e-10,6.362359528111483e-10,6.414249686947926e-10,6.466885360545405e-10,6.520292639144998e-10,6.574497612987784e-10,6.629528592760892e-10,6.685415554485985e-10,6.742187919073217e-10,6.799880103436351e-10,6.858525969377638e-10,6.918161599145378e-10,6.978825850545434e-10,7.040559801829716e-10,7.103406751696184e-10,7.167412219288849e-10,7.232625609532306e-10,7.2990985477972e-10,7.366885990123251e-10,7.436047333442275e-10,7.506645305355164e-10,7.57874762946642e-10,7.652426470272644e-10,7.727759543385559e-10,7.804830115532013e-10,7.883728114777e-10,7.964550685635174e-10,8.047402189070851e-10,8.132396422944055e-10,8.219657177122031e-10,8.309318788590758e-10,8.401527806789488e-10,8.496445214056791e-10,8.594246980742071e-10,8.695127395874636e-10,8.799300732498239e-10,8.90700457834015e-10,9.01850316648023e-10,9.134091816243028e-10,9.254100818978372e-10,9.37890431984556e-10,9.508922538259412e-10,9.64463842123564e-10,9.78660263939446e-10,9.935448019859905e-10,1.0091912860943353e-09,1.0256859805934937e-09,1.0431305819125214e-09,1.0616465484503124e-09,1.0813799855569073e-09,1.1025096391392708e-09,1.1252564435793033e-09,1.149898620766976e-09,1.176793218427008e-09,1.2064089727203964e-09,1.2393785997488749e-09,1.2765849488616254e-09,1.319313880365769e-09,1.36954347862428e-09,1.4305497897382224e-09,1.5083649884672923e-09,1.6160853766322703e-09,1.7921247819074893e-09]);E=$toNativeArray($kindFloat32,[1,0.9381436705589294,0.900469958782196,0.8717043399810791,0.847785472869873,0.8269932866096497,0.8084216713905334,0.7915276288986206,0.7759568691253662,0.7614634037017822,0.7478685975074768,0.7350381016731262,0.7228676676750183,0.7112747430801392,0.7001926302909851,0.6895664930343628,0.6793505549430847,0.669506311416626,0.6600008606910706,0.6508058309555054,0.6418967247009277,0.633251965045929,0.62485271692276,0.6166821718215942,0.608725368976593,0.6009689569473267,0.5934008955955505,0.5860103368759155,0.5787873864173889,0.5717230439186096,0.5648092031478882,0.5580382943153381,0.5514034032821655,0.5448982119560242,0.5385168790817261,0.5322538614273071,0.526104211807251,0.5200631618499756,0.5141264200210571,0.5082897543907166,0.5025495290756226,0.4969019889831543,0.4913438558578491,0.4858720004558563,0.48048335313796997,0.4751752018928528,0.4699448347091675,0.4647897481918335,0.4597076177597046,0.4546961486339569,0.4497532546520233,0.44487687945365906,0.4400651156902313,0.4353161156177521,0.4306281507015228,0.42599955201148987,0.42142874002456665,0.4169141948223114,0.4124544560909271,0.40804818272590637,0.4036940038204193,0.39939069747924805,0.3951369822025299,0.39093172550201416,0.38677382469177246,0.38266217708587646,0.378595769405365,0.37457355856895447,0.37059465050697327,0.366658091545105,0.362762987613678,0.358908474445343,0.35509374737739563,0.35131800174713135,0.3475804924964905,0.34388044476509094,0.34021714329719543,0.33658990263938904,0.3329980671405792,0.3294409513473511,0.32591795921325684,0.32242849469184875,0.3189719021320343,0.3155476748943329,0.31215524673461914,0.3087940812110901,0.30546361207962036,0.30216339230537415,0.29889291524887085,0.29565170407295227,0.2924392819404602,0.2892552316188812,0.28609907627105713,0.2829704284667969,0.27986884117126465,0.2767939269542694,0.2737452983856201,0.2707225978374481,0.26772540807724,0.26475343108177185,0.2618062496185303,0.258883535861969,0.2559850215911865,0.25311028957366943,0.25025907158851624,0.24743106961250305,0.2446259707212448,0.24184346199035645,0.23908329010009766,0.23634515702724457,0.2336287796497345,0.23093391954898834,0.22826029360294342,0.22560766339302063,0.22297576069831848,0.22036437690258026,0.21777324378490448,0.21520215272903442,0.212650865316391,0.21011915802955627,0.20760682225227356,0.20511364936828613,0.20263944566249847,0.20018397271633148,0.19774706661701202,0.1953285187482834,0.19292815029621124,0.19054576754570007,0.18818120658397675,0.18583425879478455,0.18350479006767273,0.18119260668754578,0.17889754474163055,0.17661945521831512,0.17435817420482635,0.1721135377883911,0.16988539695739746,0.16767361760139465,0.16547803580760956,0.16329853236675262,0.16113494336605072,0.1589871346950531,0.15685498714447021,0.15473836660385132,0.15263713896274567,0.1505511850118637,0.1484803706407547,0.14642459154129028,0.1443837285041809,0.14235764741897583,0.1403462439775467,0.13834942877292633,0.136367067694664,0.13439907133579254,0.1324453204870224,0.1305057406425476,0.12858019769191742,0.12666863203048706,0.12477091699838638,0.12288697808980942,0.1210167184472084,0.11916005611419678,0.11731690168380737,0.11548716574907303,0.11367076635360718,0.11186762899160385,0.11007767915725708,0.1083008274435997,0.10653700679540634,0.10478614270687103,0.1030481606721878,0.10132300108671188,0.0996105819940567,0.09791085124015808,0.09622374176979065,0.09454918652772903,0.09288713335990906,0.09123751521110535,0.08960027992725372,0.08797537535429001,0.08636274188756943,0.0847623273730278,0.08317409455776215,0.08159798383712769,0.08003395050764084,0.07848194986581802,0.07694194465875626,0.07541389018297195,0.07389774918556213,0.07239348441362381,0.070901058614254,0.06942043453454971,0.06795158982276917,0.06649449467658997,0.06504911929368973,0.06361543387174606,0.06219341605901718,0.06078304722905159,0.0593843050301075,0.05799717456102371,0.05662164092063904,0.05525768920779228,0.05390531197190285,0.05256449431180954,0.05123523622751236,0.04991753399372101,0.04861138388514519,0.047316793352365494,0.04603376239538193,0.044762298464775085,0.04350241273641586,0.04225412383675575,0.04101744294166565,0.039792392402887344,0.03857899457216263,0.03737728297710419,0.03618728369474411,0.03500903770327568,0.03384258225560188,0.0326879620552063,0.031545232981443405,0.030414443463087082,0.0292956605553627,0.028188949450850487,0.027094384655356407,0.02601204626262188,0.024942025542259216,0.023884421214461327,0.022839335724711418,0.021806888282299042,0.020787203684449196,0.019780423492193222,0.018786700442433357,0.017806200310587883,0.016839107498526573,0.015885621309280396,0.014945968054234982,0.01402039173990488,0.013109165243804455,0.012212592177093029,0.011331013403832912,0.010464809834957123,0.009614413604140282,0.008780314587056637,0.007963077165186405,0.007163353264331818,0.0063819061033427715,0.005619642324745655,0.004877655766904354,0.004157294984906912,0.003460264764726162,0.0027887988835573196,0.0021459676790982485,0.001536299823783338,0.0009672692976891994,0.0004541343660093844]);G=$toNativeArray($kindUint32,[1991057938,0,1611602771,1826899878,1918584482,1969227037,2001281515,2023368125,2039498179,2051788381,2061460127,2069267110,2075699398,2081089314,2085670119,2089610331,2093034710,2096037586,2098691595,2101053571,2103168620,2105072996,2106796166,2108362327,2109791536,2111100552,2112303493,2113412330,2114437283,2115387130,2116269447,2117090813,2117856962,2118572919,2119243101,2119871411,2120461303,2121015852,2121537798,2122029592,2122493434,2122931299,2123344971,2123736059,2124106020,2124456175,2124787725,2125101763,2125399283,2125681194,2125948325,2126201433,2126441213,2126668298,2126883268,2127086657,2127278949,2127460589,2127631985,2127793506,2127945490,2128088244,2128222044,2128347141,2128463758,2128572095,2128672327,2128764606,2128849065,2128925811,2128994934,2129056501,2129110560,2129157136,2129196237,2129227847,2129251929,2129268426,2129277255,2129278312,2129271467,2129256561,2129233410,2129201800,2129161480,2129112170,2129053545,2128985244,2128906855,2128817916,2128717911,2128606255,2128482298,2128345305,2128194452,2128028813,2127847342,2127648860,2127432031,2127195339,2126937058,2126655214,2126347546,2126011445,2125643893,2125241376,2124799783,2124314271,2123779094,2123187386,2122530867,2121799464,2120980787,2120059418,2119015917,2117825402,2116455471,2114863093,2112989789,2110753906,2108037662,2104664315,2100355223,2094642347,2086670106,2074676188,2054300022,2010539237]);H=$toNativeArray($kindFloat32,[1.7290404663583558e-09,1.2680928529462676e-10,1.689751810696194e-10,1.9862687883343e-10,2.223243117382978e-10,2.4244936613904144e-10,2.601613091623989e-10,2.761198769629658e-10,2.9073962681813725e-10,3.042996965518796e-10,3.169979556627567e-10,3.289802041894774e-10,3.4035738116777736e-10,3.5121602848242617e-10,3.61625090983253e-10,3.7164057942185025e-10,3.813085680537398e-10,3.906675816178762e-10,3.997501218933053e-10,4.0858399996679395e-10,4.1719308563337165e-10,4.255982233303257e-10,4.3381759295968436e-10,4.4186720948857783e-10,4.497613115272969e-10,4.57512583373898e-10,4.6513240481438345e-10,4.726310454117311e-10,4.800177477726209e-10,4.873009773476156e-10,4.944885056978876e-10,5.015873272284921e-10,5.086040477664255e-10,5.155446070048697e-10,5.224146670812502e-10,5.292193350214802e-10,5.359634958068682e-10,5.426517013518151e-10,5.492881705038144e-10,5.558769555769061e-10,5.624218868405251e-10,5.689264614971989e-10,5.75394121238304e-10,5.818281967329142e-10,5.882316855831959e-10,5.946076964136182e-10,6.009590047817426e-10,6.072883862451306e-10,6.135985053390414e-10,6.19892026598734e-10,6.261713370037114e-10,6.324390455780815e-10,6.386973727678935e-10,6.449488165749528e-10,6.511955974453087e-10,6.574400468473129e-10,6.636843297158634e-10,6.699307220081607e-10,6.761814441702541e-10,6.824387166481927e-10,6.887046488657234e-10,6.949815167800466e-10,7.012714853260604e-10,7.075767749498141e-10,7.13899661608508e-10,7.202424212593428e-10,7.266072743483676e-10,7.329966078550854e-10,7.394128087589991e-10,7.458582640396116e-10,7.523354716987285e-10,7.588469852493063e-10,7.653954137154528e-10,7.719834771435785e-10,7.786139510912449e-10,7.852897221383159e-10,7.920137878869582e-10,7.987892014504894e-10,8.056192379868321e-10,8.125072836762115e-10,8.194568912323064e-10,8.264716688799467e-10,8.3355555791087e-10,8.407127216614185e-10,8.479473234679347e-10,8.552640262671218e-10,8.626675485068347e-10,8.701631637464402e-10,8.777562010564566e-10,8.854524335966119e-10,8.932581896381464e-10,9.011799639857543e-10,9.092249730890956e-10,9.174008219758889e-10,9.25715837318819e-10,9.341788453909317e-10,9.42799727177146e-10,9.515889187738935e-10,9.605578554783278e-10,9.697193048552322e-10,9.790869226478094e-10,9.886760299337993e-10,9.985036131254788e-10,1.008588212947359e-09,1.0189509236369076e-09,1.0296150598776421e-09,1.040606933955246e-09,1.0519566329136865e-09,1.0636980185552147e-09,1.0758701707302976e-09,1.0885182755160372e-09,1.101694735439196e-09,1.115461056855338e-09,1.1298901814171813e-09,1.1450695946990663e-09,1.1611052119775422e-09,1.178127595480305e-09,1.1962995039027646e-09,1.2158286599728285e-09,1.2369856250415978e-09,1.2601323318151003e-09,1.2857697129220469e-09,1.3146201904845611e-09,1.3477839955200466e-09,1.3870635751089821e-09,1.43574030442295e-09,1.5008658760251592e-09,1.6030947680434338e-09]);I=$toNativeArray($kindFloat32,[1,0.963599681854248,0.9362826943397522,0.9130436182022095,0.8922816514968872,0.8732430338859558,0.8555005788803101,0.8387836217880249,0.8229072093963623,0.8077383041381836,0.7931770086288452,0.7791460752487183,0.7655841708183289,0.7524415850639343,0.7396772503852844,0.7272568941116333,0.7151514887809753,0.7033361196517944,0.6917891502380371,0.6804918646812439,0.6694276928901672,0.6585819721221924,0.6479418277740479,0.6374954581260681,0.6272324919700623,0.6171433925628662,0.6072195172309875,0.5974531769752502,0.5878370404243469,0.5783646702766418,0.5690299868583679,0.5598273873329163,0.550751805305481,0.5417983531951904,0.5329626798629761,0.5242405533790588,0.5156282186508179,0.5071220397949219,0.49871864914894104,0.4904148280620575,0.48220765590667725,0.47409430146217346,0.466072142124176,0.45813870429992676,0.45029163360595703,0.44252872467041016,0.4348478317260742,0.42724698781967163,0.41972434520721436,0.41227802634239197,0.40490642189979553,0.39760786294937134,0.3903807997703552,0.3832238018512726,0.3761354684829712,0.3691144585609436,0.36215949058532715,0.3552693724632263,0.3484429717063904,0.3416791558265686,0.33497685194015503,0.32833510637283325,0.3217529058456421,0.3152293860912323,0.30876362323760986,0.3023548424243927,0.2960021495819092,0.2897048592567444,0.28346219658851624,0.2772735059261322,0.271138072013855,0.2650552988052368,0.25902456045150757,0.25304529070854187,0.24711695313453674,0.24123899638652802,0.23541094362735748,0.22963231801986694,0.22390270233154297,0.21822164952754974,0.21258877217769623,0.20700371265411377,0.20146611332893372,0.1959756463766098,0.19053204357624054,0.18513499200344086,0.17978426814079285,0.1744796335697174,0.16922089457511902,0.16400785744190216,0.1588403731584549,0.15371830761432648,0.14864157140254974,0.14361007511615753,0.13862377405166626,0.13368265330791473,0.12878671288490295,0.12393598258495331,0.11913054436445236,0.11437050998210907,0.10965602099895477,0.1049872562289238,0.10036443918943405,0.09578784555196762,0.09125780314207077,0.08677466958761215,0.08233889937400818,0.07795098423957825,0.07361150532960892,0.06932111829519272,0.06508058309555054,0.06089077144861221,0.05675266310572624,0.05266740173101425,0.048636294901371,0.044660862535238266,0.040742866694927216,0.03688438981771469,0.03308788686990738,0.029356317594647408,0.025693291798233986,0.02210330404341221,0.018592102453112602,0.015167297795414925,0.011839478276669979,0.0086244847625494,0.005548994988203049,0.0026696291752159595]);AC=$toNativeArray($kindInt64,[new $Int64(1173834291,3952672746),new $Int64(1081821761,3130416987),new $Int64(324977939,3414273807),new $Int64(1241840476,2806224363),new $Int64(669549340,1997590414),new $Int64(2103305448,2402795971),new $Int64(1663160183,1140819369),new $Int64(1120601685,1788868961),new $Int64(1848035537,1089001426),new $Int64(1235702047,873593504),new $Int64(1911387977,581324885),new $Int64(492609478,1609182556),new $Int64(1069394745,1241596776),new $Int64(1895445337,1771189259),new $Int64(772864846,3467012610),new $Int64(2006957225,2344407434),new $Int64(402115761,782467244),new $Int64(26335124,3404933915),new $Int64(1063924276,618867887),new $Int64(1178782866,520164395),new $Int64(555910815,1341358184),new $Int64(632398609,665794848),new $Int64(1527227641,3183648150),new $Int64(1781176124,696329606),new $Int64(1789146075,4151988961),new $Int64(60039534,998951326),new $Int64(1535158725,1364957564),new $Int64(63173359,4090230633),new $Int64(649454641,4009697548),new $Int64(248009524,2569622517),new $Int64(778703922,3742421481),new $Int64(1038377625,1506914633),new $Int64(1738099768,1983412561),new $Int64(236311649,1436266083),new $Int64(1035966148,3922894967),new $Int64(810508934,1792680179),new $Int64(563141142,1188796351),new $Int64(1349617468,405968250),new $Int64(1044074554,433754187),new $Int64(870549669,4073162024),new $Int64(1053232044,433121399),new $Int64(2451824,4162580594),new $Int64(2010221076,4132415622),new $Int64(611252600,3033822028),new $Int64(2016407895,824682382),new $Int64(2366218,3583765414),new $Int64(1522878809,535386927),new $Int64(1637219058,2286693689),new $Int64(1453075389,2968466525),new $Int64(193683513,1351410206),new $Int64(1863677552,1412813499),new $Int64(492736522,4126267639),new $Int64(512765208,2105529399),new $Int64(2132966268,2413882233),new $Int64(947457634,32226200),new $Int64(1149341356,2032329073),new $Int64(106485445,1356518208),new $Int64(79673492,3430061722),new $Int64(663048513,3820169661),new $Int64(481498454,2981816134),new $Int64(1017155588,4184371017),new $Int64(206574701,2119206761),new $Int64(1295374591,2472200560),new $Int64(1587026100,2853524696),new $Int64(1307803389,1681119904),new $Int64(1972496813,95608918),new $Int64(392686347,3690479145),new $Int64(941912722,1397922290),new $Int64(988169623,1516129515),new $Int64(1827305493,1547420459),new $Int64(1311333971,1470949486),new $Int64(194013850,1336785672),new $Int64(2102397034,4131677129),new $Int64(755205548,4246329084),new $Int64(1004983461,3788585631),new $Int64(2081005363,3080389532),new $Int64(1501045284,2215402037),new $Int64(391002300,1171593935),new $Int64(1408774047,1423855166),new $Int64(1628305930,2276716302),new $Int64(1779030508,2068027241),new $Int64(1369359303,3427553297),new $Int64(189241615,3289637845),new $Int64(1057480830,3486407650),new $Int64(634572984,3071877822),new $Int64(1159653919,3363620705),new $Int64(1213226718,4159821533),new $Int64(2070861710,1894661),new $Int64(1472989750,1156868282),new $Int64(348271067,776219088),new $Int64(1646054810,2425634259),new $Int64(1716021749,680510161),new $Int64(1573220192,1310101429),new $Int64(1095885995,2964454134),new $Int64(1821788136,3467098407),new $Int64(1990672920,2109628894),new $Int64(7834944,1232604732),new $Int64(309412934,3261916179),new $Int64(1699175360,434597899),new $Int64(235436061,1624796439),new $Int64(521080809,3589632480),new $Int64(1198416575,864579159),new $Int64(208735487,1380889830),new $Int64(619206309,2654509477),new $Int64(1419738251,1468209306),new $Int64(403198876,100794388),new $Int64(956062190,2991674471),new $Int64(1938816907,2224662036),new $Int64(1973824487,977097250),new $Int64(1351320195,726419512),new $Int64(1964023751,1747974366),new $Int64(1394388465,1556430604),new $Int64(1097991433,1080776742),new $Int64(1761636690,280794874),new $Int64(117767733,919835643),new $Int64(1180474222,3434019658),new $Int64(196069168,2461941785),new $Int64(133215641,3615001066),new $Int64(417204809,3103414427),new $Int64(790056561,3380809712),new $Int64(879802240,2724693469),new $Int64(547796833,598827710),new $Int64(300924196,3452273442),new $Int64(2071705424,649274915),new $Int64(1346182319,2585724112),new $Int64(636549385,3165579553),new $Int64(1185578221,2635894283),new $Int64(2094573470,2053289721),new $Int64(985976581,3169337108),new $Int64(1170569632,144717764),new $Int64(1079216270,1383666384),new $Int64(2022678706,681540375),new $Int64(1375448925,537050586),new $Int64(182715304,315246468),new $Int64(226402871,849323088),new $Int64(1262421183,45543944),new $Int64(1201038398,2319052083),new $Int64(2106775454,3613090841),new $Int64(560472520,2992171180),new $Int64(1765620479,2068244785),new $Int64(917538188,4239862634),new $Int64(777927839,3892253031),new $Int64(720683925,958186149),new $Int64(1724185863,1877702262),new $Int64(1357886971,837674867),new $Int64(1837048883,1507589294),new $Int64(1905518400,873336795),new $Int64(267722611,2764496274),new $Int64(341003118,4196182374),new $Int64(1080717893,550964545),new $Int64(818747069,420611474),new $Int64(222653272,204265180),new $Int64(1549974541,1787046383),new $Int64(1215581865,3102292318),new $Int64(418321538,1552199393),new $Int64(1243493047,980542004),new $Int64(267284263,3293718720),new $Int64(1179528763,3771917473),new $Int64(599484404,2195808264),new $Int64(252818753,3894702887),new $Int64(780007692,2099949527),new $Int64(1424094358,338442522),new $Int64(490737398,637158004),new $Int64(419862118,281976339),new $Int64(574970164,3619802330),new $Int64(1715552825,3084554784),new $Int64(882872465,4129772886),new $Int64(43084605,1680378557),new $Int64(525521057,3339087776),new $Int64(1680500332,4220317857),new $Int64(211654685,2959322499),new $Int64(1675600481,1488354890),new $Int64(1312620086,3958162143),new $Int64(920972075,2773705983),new $Int64(1876039582,225908689),new $Int64(963748535,908216283),new $Int64(1541787429,3574646075),new $Int64(319760557,1936937569),new $Int64(1519770881,75492235),new $Int64(816689472,1935193178),new $Int64(2142521206,2018250883),new $Int64(455141620,3943126022),new $Int64(1546084160,3066544345),new $Int64(1932392669,2793082663),new $Int64(908474287,3297036421),new $Int64(1640597065,2206987825),new $Int64(1594236910,807894872),new $Int64(366158341,766252117),new $Int64(2060649606,3833114345),new $Int64(845619743,1255067973),new $Int64(1201145605,741697208),new $Int64(671241040,2810093753),new $Int64(1109032642,4229340371),new $Int64(1462188720,1361684224),new $Int64(988084219,1906263026),new $Int64(475781207,3904421704),new $Int64(1523946520,1769075545),new $Int64(1062308525,2621599764),new $Int64(1279509432,3431891480),new $Int64(404732502,1871896503),new $Int64(128756421,1412808876),new $Int64(1605404688,952876175),new $Int64(1917039957,1824438899),new $Int64(1662295856,1005035476),new $Int64(1990909507,527508597),new $Int64(1288873303,3066806859),new $Int64(565995893,3244940914),new $Int64(1257737460,209092916),new $Int64(1899814242,1242699167),new $Int64(1433653252,456723774),new $Int64(1776978905,1001252870),new $Int64(1468772157,2026725874),new $Int64(857254202,2137562569),new $Int64(765939740,3183366709),new $Int64(1533887628,2612072960),new $Int64(56977098,1727148468),new $Int64(949899753,3803658212),new $Int64(1883670356,479946959),new $Int64(685713571,1562982345),new $Int64(201241205,1766109365),new $Int64(700596547,3257093788),new $Int64(1962768719,2365720207),new $Int64(93384808,3742754173),new $Int64(1689098413,2878193673),new $Int64(1096135042,2174002182),new $Int64(1313222695,3573511231),new $Int64(1392911121,1760299077),new $Int64(771856457,2260779833),new $Int64(1281464374,1452805722),new $Int64(917811730,2940011802),new $Int64(1890251082,1886183802),new $Int64(893897673,2514369088),new $Int64(1644345561,3924317791),new $Int64(172616216,500935732),new $Int64(1403501753,676580929),new $Int64(581571365,1184984890),new $Int64(1455515235,1271474274),new $Int64(318728910,3163791473),new $Int64(2051027584,2842487377),new $Int64(1511537551,2170968612),new $Int64(573262976,3535856740),new $Int64(94256461,1488599718),new $Int64(966951817,3408913763),new $Int64(60951736,2501050084),new $Int64(1272353200,1639124157),new $Int64(138001144,4088176393),new $Int64(1574896563,3989947576),new $Int64(1982239940,3414355209),new $Int64(1355154361,2275136352),new $Int64(89709303,2151835223),new $Int64(1216338715,1654534827),new $Int64(1467562197,377892833),new $Int64(1664767638,660204544),new $Int64(85706799,390828249),new $Int64(725310955,3402783878),new $Int64(678849488,3717936603),new $Int64(1113532086,2211058823),new $Int64(1564224320,2692150867),new $Int64(1952770442,1928910388),new $Int64(788716862,3931011137),new $Int64(1083670504,1112701047),new $Int64(2079333076,2452299106),new $Int64(1251318826,2337204777),new $Int64(1774877857,273889282),new $Int64(1798719843,1462008793),new $Int64(2138834788,1554494002),new $Int64(952516517,182675323),new $Int64(548928884,1882802136),new $Int64(589279648,3700220025),new $Int64(381039426,3083431543),new $Int64(1295624457,3622207527),new $Int64(338126939,432729309),new $Int64(480013522,2391914317),new $Int64(297925497,235747924),new $Int64(2120733629,3088823825),new $Int64(1402403853,2314658321),new $Int64(1165929723,2957634338),new $Int64(501323675,4117056981),new $Int64(1564699815,1482500298),new $Int64(1406657158,840489337),new $Int64(799522364,3483178565),new $Int64(532129761,2074004656),new $Int64(724246478,3643392642),new $Int64(1482330167,1583624461),new $Int64(1261660694,287473085),new $Int64(1667835381,3136843981),new $Int64(1138806821,1266970974),new $Int64(135185781,1998688839),new $Int64(392094735,1492900209),new $Int64(1031326774,1538112737),new $Int64(76914806,2207265429),new $Int64(260686035,963263315),new $Int64(1671145500,2295892134),new $Int64(1068469660,2002560897),new $Int64(1791233343,1369254035),new $Int64(33436120,3353312708),new $Int64(57507843,947771099),new $Int64(201728503,1747061399),new $Int64(1507240140,2047354631),new $Int64(720000810,4165367136),new $Int64(479265078,3388864963),new $Int64(1195302398,286492130),new $Int64(2045622690,2795735007),new $Int64(1431753082,3703961339),new $Int64(1999047161,1797825479),new $Int64(1429039600,1116589674),new $Int64(482063550,2593309206),new $Int64(1329049334,3404995677),new $Int64(1396904208,3453462936),new $Int64(1014767077,3016498634),new $Int64(75698599,1650371545),new $Int64(1592007860,212344364),new $Int64(1127766888,3843932156),new $Int64(1399463792,3573129983),new $Int64(1256901817,665897820),new $Int64(1071492673,1675628772),new $Int64(243225682,2831752928),new $Int64(2120298836,1486294219),new $Int64(193076235,268782709),new $Int64(1145360145,4186179080),new $Int64(624342951,1613720397),new $Int64(857179861,2703686015),new $Int64(1235864944,2205342611),new $Int64(1474779655,1411666394),new $Int64(619028749,677744900),new $Int64(270855115,4172867247),new $Int64(135494707,2163418403),new $Int64(849547544,2841526879),new $Int64(1029966689,1082141470),new $Int64(377371856,4046134367),new $Int64(51415528,2142943655),new $Int64(1897659315,3124627521),new $Int64(998228909,219992939),new $Int64(1068692697,1756846531),new $Int64(1283749206,1225118210),new $Int64(1621625642,1647770243),new $Int64(111523943,444807907),new $Int64(2036369448,3952076173),new $Int64(53201823,1461839639),new $Int64(315761893,3699250910),new $Int64(702974850,1373688981),new $Int64(734022261,147523747),new $Int64(100152742,1211276581),new $Int64(1294440951,2548832680),new $Int64(1144696256,1995631888),new $Int64(154500578,2011457303),new $Int64(796460974,3057425772),new $Int64(667839456,81484597),new $Int64(465502760,3646681560),new $Int64(775020923,635548515),new $Int64(602489502,2508044581),new $Int64(353263531,1014917157),new $Int64(719992433,3214891315),new $Int64(852684611,959582252),new $Int64(226415134,3347040449),new $Int64(1784615552,4102971975),new $Int64(397887437,4078022210),new $Int64(1610679822,2851767182),new $Int64(749162636,1540160644),new $Int64(598384772,1057290595),new $Int64(2034890660,3907769253),new $Int64(579300318,4248952684),new $Int64(1092907599,132554364),new $Int64(1061621234,1029351092),new $Int64(697840928,2583007416),new $Int64(298619124,1486185789),new $Int64(55905697,2871589073),new $Int64(2017643612,723203291),new $Int64(146250550,2494333952),new $Int64(1064490251,2230939180),new $Int64(342915576,3943232912),new $Int64(1768732449,2181367922),new $Int64(1418222537,2889274791),new $Int64(1824032949,2046728161),new $Int64(1653899792,1376052477),new $Int64(1022327048,381236993),new $Int64(1034385958,3188942166),new $Int64(2073003539,350070824),new $Int64(144881592,61758415),new $Int64(1405659422,3492950336),new $Int64(117440928,3093818430),new $Int64(1693893113,2962480613),new $Int64(235432940,3154871160),new $Int64(511005079,3228564679),new $Int64(610731502,888276216),new $Int64(1200780674,3574998604),new $Int64(870415268,1967526716),new $Int64(591335707,1554691298),new $Int64(574459414,339944798),new $Int64(1223764147,1154515356),new $Int64(1825645307,967516237),new $Int64(1546195135,596588202),new $Int64(279882768,3764362170),new $Int64(492091056,266611402),new $Int64(1754227768,2047856075),new $Int64(1146757215,21444105),new $Int64(1198058894,3065563181),new $Int64(1915064845,1140663212),new $Int64(633187674,2323741028),new $Int64(2126290159,3103873707),new $Int64(1008658319,2766828349),new $Int64(1661896145,1970872996),new $Int64(1628585413,3766615585),new $Int64(1552335120,2036813414),new $Int64(152606527,3105536507),new $Int64(13954645,3396176938),new $Int64(1426081645,1377154485),new $Int64(2085644467,3807014186),new $Int64(543009040,3710110597),new $Int64(396058129,916420443),new $Int64(734556788,2103831255),new $Int64(381322154,717331943),new $Int64(572884752,3550505941),new $Int64(45939673,378749927),new $Int64(149867929,611017331),new $Int64(592130075,758907650),new $Int64(1012992349,154266815),new $Int64(1107028706,1407468696),new $Int64(469292398,970098704),new $Int64(1862426162,1971660656),new $Int64(998365243,3332747885),new $Int64(1947089649,1935189867),new $Int64(1510248801,203520055),new $Int64(842317902,3916463034),new $Int64(1758884993,3474113316),new $Int64(1036101639,316544223),new $Int64(373738757,1650844677),new $Int64(1240292229,4267565603),new $Int64(1077208624,2501167616),new $Int64(626831785,3929401789),new $Int64(56122796,337170252),new $Int64(1186981558,2061966842),new $Int64(1843292800,2508461464),new $Int64(206012532,2791377107),new $Int64(1240791848,1227227588),new $Int64(1813978778,1709681848),new $Int64(1153692192,3768820575),new $Int64(1145186199,2887126398),new $Int64(700372314,296561685),new $Int64(700300844,3729960077),new $Int64(575172304,372833036),new $Int64(2078875613,2409779288),new $Int64(1829161290,555274064),new $Int64(1041887929,4239804901),new $Int64(1839403216,3723486978),new $Int64(498390553,2145871984),new $Int64(564717933,3565480803),new $Int64(578829821,2197313814),new $Int64(974785092,3613674566),new $Int64(438638731,3042093666),new $Int64(2050927384,3324034321),new $Int64(869420878,3708873369),new $Int64(946682149,1698090092),new $Int64(1618900382,4213940712),new $Int64(304003901,2087477361),new $Int64(381315848,2407950639),new $Int64(851258090,3942568569),new $Int64(923583198,4088074412),new $Int64(723260036,2964773675),new $Int64(1473561819,1539178386),new $Int64(1062961552,2694849566),new $Int64(460977733,2120273838),new $Int64(542912908,2484608657),new $Int64(880846449,2956190677),new $Int64(1970902366,4223313749),new $Int64(662161910,3502682327),new $Int64(705634754,4133891139),new $Int64(1116124348,1166449596),new $Int64(1038247601,3362705993),new $Int64(93734798,3892921029),new $Int64(1876124043,786869787),new $Int64(1057490746,1046342263),new $Int64(242763728,493777327),new $Int64(1293910447,3304827646),new $Int64(616460742,125356352),new $Int64(499300063,74094113),new $Int64(1351896723,2500816079),new $Int64(1657235204,514015239),new $Int64(1377565129,543520454),new $Int64(107706923,3614531153),new $Int64(2056746300,2356753985),new $Int64(1390062617,2018141668),new $Int64(131272971,2087974891),new $Int64(644556607,3166972343),new $Int64(372256200,1517638666),new $Int64(1212207984,173466846),new $Int64(1451709187,4241513471),new $Int64(733932806,2783126920),new $Int64(1972004134,4167264826),new $Int64(29260506,3907395640),new $Int64(1236582087,1539634186),new $Int64(1551526350,178241987),new $Int64(2034206012,182168164),new $Int64(1044953189,2386154934),new $Int64(1379126408,4077374341),new $Int64(32803926,1732699140),new $Int64(1726425903,1041306002),new $Int64(1860414813,2068001749),new $Int64(1005320202,3208962910),new $Int64(844054010,697710380),new $Int64(638124245,2228431183),new $Int64(1337169671,3554678728),new $Int64(1396494601,173470263),new $Int64(2061597383,3848297795),new $Int64(1220546671,246236185),new $Int64(163293187,2066374846),new $Int64(1771673660,312890749),new $Int64(703378057,3573310289),new $Int64(1548631747,143166754),new $Int64(613554316,2081511079),new $Int64(1197802104,486038032),new $Int64(240999859,2982218564),new $Int64(364901986,1000939191),new $Int64(1902782651,2750454885),new $Int64(1475638791,3375313137),new $Int64(503615608,881302957),new $Int64(638698903,2514186393),new $Int64(443860803,360024739),new $Int64(1399671872,292500025),new $Int64(1381210821,2276300752),new $Int64(521803381,4069087683),new $Int64(208500981,1637778212),new $Int64(720490469,1676670893),new $Int64(1067262482,3855174429),new $Int64(2114075974,2067248671),new $Int64(2058057389,2884561259),new $Int64(1341742553,2456511185),new $Int64(983726246,561175414),new $Int64(427994085,432588903),new $Int64(885133709,4059399550),new $Int64(2054387382,1075014784),new $Int64(413651020,2728058415),new $Int64(1839142064,1299703678),new $Int64(1262333188,2347583393),new $Int64(1285481956,2468164145),new $Int64(989129637,1140014346),new $Int64(2033889184,1936972070),new $Int64(409904655,3870530098),new $Int64(1662989391,1717789158),new $Int64(1914486492,1153452491),new $Int64(1157059232,3948827651),new $Int64(790338018,2101413152),new $Int64(1495744672,3854091229),new $Int64(83644069,4215565463),new $Int64(762206335,1202710438),new $Int64(1582574611,2072216740),new $Int64(705690639,2066751068),new $Int64(33900336,173902580),new $Int64(1405499842,142459001),new $Int64(172391592,1889151926),new $Int64(1648540523,3034199774),new $Int64(1618587731,516490102),new $Int64(93114264,3692577783),new $Int64(68662295,2953948865),new $Int64(1826544975,4041040923),new $Int64(204965672,592046130),new $Int64(1441840008,384297211),new $Int64(95834184,265863924),new $Int64(2101717619,1333136237),new $Int64(1499611781,1406273556),new $Int64(1074670496,426305476),new $Int64(125704633,2750898176),new $Int64(488068495,1633944332),new $Int64(2037723464,3236349343),new $Int64(444060402,4013676611),new $Int64(1718532237,2265047407),new $Int64(1433593806,875071080),new $Int64(1804436145,1418843655),new $Int64(2009228711,451657300),new $Int64(1229446621,1866374663),new $Int64(1653472867,1551455622),new $Int64(577191481,3560962459),new $Int64(1669204077,3347903778),new $Int64(1849156454,2675874918),new $Int64(316128071,2762991672),new $Int64(530492383,3689068477),new $Int64(844089962,4071997905),new $Int64(1508155730,1381702441),new $Int64(2089931018,2373284878),new $Int64(1283216186,2143983064),new $Int64(308739063,1938207195),new $Int64(1754949306,1188152253),new $Int64(1272345009,615870490),new $Int64(742653194,2662252621),new $Int64(1477718295,3839976789),new $Int64(56149435,306752547),new $Int64(720795581,2162363077),new $Int64(2090431015,2767224719),new $Int64(675859549,2628837712),new $Int64(1678405918,2967771969),new $Int64(1694285728,499792248),new $Int64(403352367,4285253508),new $Int64(962357072,2856511070),new $Int64(679471692,2526409716),new $Int64(353777175,1240875658),new $Int64(1232590226,2577342868),new $Int64(1146185433,4136853496),new $Int64(670368674,2403540137),new $Int64(1372824515,1371410668),new $Int64(1970921600,371758825),new $Int64(1706420536,1528834084),new $Int64(2075795018,1504757260),new $Int64(685663576,699052551),new $Int64(1641940109,3347789870),new $Int64(1951619734,3430604759),new $Int64(2119672219,1935601723),new $Int64(966789690,834676166)]);N=M(new AB.ptr(new B.Mutex.ptr(false),K(new $Int64(0,1))));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["math/big"]=(function(){var $pkg={},$init,I,G,A,H,C,B,F,E,D,W,BL,BU,BV,CP,DB,DC,DD,DE,DG,DH,DJ,DK,DL,DM,DO,BM,BW,BX,CC,CI,CJ,CO,CQ,J,K,L,M,N,O,P,Q,R,S,T,U,X,Z,AA,AB,AD,AF,AG,AH,AI,AJ,AK,AL,AM,AN,AO,BP,BQ,BR,BS,BT,BZ,CA,CB,CD,CE,CF,CG,CH,CK,CL,CM,CN,CR;I=$packages["encoding/binary"];G=$packages["errors"];A=$packages["fmt"];H=$packages["github.com/gopherjs/gopherjs/nosync"];C=$packages["io"];B=$packages["math"];F=$packages["math/rand"];E=$packages["strconv"];D=$packages["strings"];W=$pkg.Word=$newType(4,$kindUintptr,"big.Word","Word","math/big",null);BL=$pkg.Int=$newType(0,$kindStruct,"big.Int","Int","math/big",function(neg_,abs_){this.$val=this;if(arguments.length===0){this.neg=false;this.abs=BV.nil;return;}this.neg=neg_;this.abs=abs_;});BU=$pkg.byteReader=$newType(0,$kindStruct,"big.byteReader","byteReader","math/big",function(ScanState_){this.$val=this;if(arguments.length===0){this.ScanState=$ifaceNil;return;}this.ScanState=ScanState_;});BV=$pkg.nat=$newType(12,$kindSlice,"big.nat","nat","math/big",null);CP=$pkg.divisor=$newType(0,$kindStruct,"big.divisor","divisor","math/big",function(bbb_,nbits_,ndigits_){this.$val=this;if(arguments.length===0){this.bbb=BV.nil;this.nbits=0;this.ndigits=0;return;}this.bbb=bbb_;this.nbits=nbits_;this.ndigits=ndigits_;});DB=$arrayType(CP,64);DC=$structType([{prop:"Mutex",name:"",pkg:"",typ:H.Mutex,tag:""},{prop:"table",name:"table",pkg:"math/big",typ:DB,tag:""}]);DD=$sliceType($Uint8);DE=$sliceType($emptyInterface);DG=$sliceType(W);DH=$ptrType(BL);DJ=$ptrType(W);DK=$arrayType(BV,16);DL=$ptrType(BV);DM=$sliceType(CP);DO=$ptrType(F.Rand);J=function(m,n){var $ptr,m,n,o,p,q;o=0;p=0;q=Z(m,n);o=q[0];p=q[1];return[o,p];};K=function(m,n,o){var $ptr,m,n,o,p,q,r;p=0;q=0;r=AF(m,n,o);p=r[0];q=r[1];return[p,q];};L=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AG(m,n,o);return p;};M=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AH(m,n,o);return p;};N=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AI(m,n,o);return p;};O=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AJ(m,n,o);return p;};P=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AK(m,n,o);return p;};Q=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AL(m,n,o);return p;};R=function(m,n,o,p){var $ptr,m,n,o,p,q;q=0;q=AM(m,n,o,p);return q;};S=function(m,n,o){var $ptr,m,n,o,p;p=0;p=AN(m,n,o);return p;};T=function(m,n,o,p){var $ptr,m,n,o,p,q;q=0;q=AO(m,n,o,p);return q;};U=function(m){var $ptr,m,n;n=0;n=AB(m);return n;};X=function(m,n,o){var $ptr,m,n,o,p,q,r;p=0;q=0;r=n+o>>>0;q=m+r>>>0;if(q>>0;r=m>>>16>>>0;s=(n&65535)>>>0;t=n>>>16>>>0;u=(((q>>>16<<16)*s>>>0)+(q<<16>>>16)*s)>>>0;v=((((r>>>16<<16)*s>>>0)+(r<<16>>>16)*s)>>>0)+(u>>>16>>>0)>>>0;w=(v&65535)>>>0;x=v>>>16>>>0;w=w+(((((q>>>16<<16)*t>>>0)+(q<<16>>>16)*t)>>>0))>>>0;o=(((((r>>>16<<16)*t>>>0)+(r<<16>>>16)*t)>>>0)+x>>>0)+(w>>>16>>>0)>>>0;p=(((m>>>16<<16)*n>>>0)+(m<<16>>>16)*n)>>>0;return[o,p];};AA=function(m,n,o){var $ptr,m,n,o,p,q,r,s;p=0;q=0;r=Z(m,n);p=r[0];s=r[1];q=s+o>>>0;if(q>>0;}return[p,q];};AB=function(m){var $ptr,m,n,o,p,q,r;n=0;while(true){if(!(m>=32768)){break;}n=n+(16)>>0;m=(o=(16),o<32?(m>>>o):0)>>>0;}if(m>=128){m=(p=(8),p<32?(m>>>p):0)>>>0;n=n+(8)>>0;}if(m>=8){m=(q=(4),q<32?(m>>>q):0)>>>0;n=n+(4)>>0;}if(m>=2){m=(r=(2),r<32?(m>>>r):0)>>>0;n=n+(2)>>0;}if(m>=1){n=n+(1)>>0;}return n;};AD=function(m){var $ptr,m;return((32-U(m)>>0)>>>0);};AF=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=0;q=0;if(m>=o){r=4294967295;s=4294967295;p=r;q=s;return[p,q];}t=AD(o);o=(u=(t),u<32?(o<>>0;v=o>>>16>>>0;w=(o&65535)>>>0;z=(((x=t,x<32?(m<>>0)|((y=((32-t>>>0)),y<32?(n>>>y):0)>>>0))>>>0;ab=(aa=t,aa<32?(n<>>0;ac=ab>>>16>>>0;ad=(ab&65535)>>>0;af=(ae=z/v,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>>0:$throwRuntimeError("integer divide by zero"));ag=z-((((af>>>16<<16)*v>>>0)+(af<<16>>>16)*v)>>>0)>>>0;while(true){if(!(af>=65536||((((af>>>16<<16)*w>>>0)+(af<<16>>>16)*w)>>>0)>(((((65536>>>16<<16)*ag>>>0)+(65536<<16>>>16)*ag)>>>0)+ac>>>0))){break;}af=af-(1)>>>0;ag=ag+(v)>>>0;if(ag>=65536){break;}}ah=(((((z>>>16<<16)*65536>>>0)+(z<<16>>>16)*65536)>>>0)+ac>>>0)-((((af>>>16<<16)*o>>>0)+(af<<16>>>16)*o)>>>0)>>>0;aj=(ai=ah/v,(ai===ai&&ai!==1/0&&ai!==-1/0)?ai>>>0:$throwRuntimeError("integer divide by zero"));ag=ah-((((aj>>>16<<16)*v>>>0)+(aj<<16>>>16)*v)>>>0)>>>0;while(true){if(!(aj>=65536||((((aj>>>16<<16)*w>>>0)+(aj<<16>>>16)*w)>>>0)>(((((65536>>>16<<16)*ag>>>0)+(65536<<16>>>16)*ag)>>>0)+ad>>>0))){break;}aj=aj-(1)>>>0;ag=ag+(v)>>>0;if(ag>=65536){break;}}ak=((((af>>>16<<16)*65536>>>0)+(af<<16>>>16)*65536)>>>0)+aj>>>0;al=(am=t,am<32?((((((((ah>>>16<<16)*65536>>>0)+(ah<<16>>>16)*65536)>>>0)+ad>>>0)-((((aj>>>16<<16)*o>>>0)+(aj<<16>>>16)*o)>>>0)>>>0))>>>am):0)>>>0;p=ak;q=al;return[p,q];};AG=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u,v;p=0;q=$subslice(n,0,m.$length);r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);u=((s<0||s>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+s]);v=(t+u>>>0)+p>>>0;((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]=v);p=(((((t&u)>>>0)|(((((t|u)>>>0))&~v)>>>0))>>>0))>>>31>>>0;r++;}return p;};AH=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u,v;p=0;q=$subslice(n,0,m.$length);r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);u=((s<0||s>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+s]);v=(t-u>>>0)-p>>>0;((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]=v);p=(((((u&~t)>>>0)|(((((u|(~t>>>0))>>>0))&v)>>>0))>>>0))>>>31>>>0;r++;}return p;};AI=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u;p=0;p=o;q=$subslice(n,0,m.$length);r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);u=t+p>>>0;((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]=u);p=((t&~u)>>>0)>>>31>>>0;r++;}return p;};AJ=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u;p=0;p=o;q=$subslice(n,0,m.$length);r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);u=t-p>>>0;((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]=u);p=(((u&~t)>>>0))>>>31>>>0;r++;}return p;};AK=function(m,n,o){var $ptr,aa,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=0;q=m.$length;if(q>0){r=32-o>>>0;t=(s=q-1>>0,((s<0||s>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+s]));p=(u=r,u<32?(t>>>u):0)>>>0;v=q-1>>0;while(true){if(!(v>0)){break;}w=t;t=(x=v-1>>0,((x<0||x>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+x]));((v<0||v>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+v]=((((y=o,y<32?(w<>>0)|((z=r,z<32?(t>>>z):0)>>>0))>>>0));v=v-(1)>>0;}(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]=((aa=o,aa<32?(t<>>0));}return p;};AL=function(m,n,o){var $ptr,aa,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=0;q=m.$length;if(q>0){r=32-o>>>0;s=(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]);p=(t=r,t<32?(s<>>0;u=0;while(true){if(!(u<(q-1>>0))){break;}v=s;s=(w=u+1>>0,((w<0||w>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+w]));((u<0||u>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+u]=((((x=o,x<32?(v>>>x):0)>>>0)|((y=r,y<32?(s<>>0))>>>0));u=u+(1)>>0;}(aa=q-1>>0,((aa<0||aa>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+aa]=((z=o,z<32?(s>>>z):0)>>>0)));}return p;};AM=function(m,n,o,p){var $ptr,m,n,o,p,q,r,s,t,u;q=0;q=p;r=m;s=0;while(true){if(!(s=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+t]),o,q);q=u[0];((t<0||t>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+t]=u[1]);s++;}return q;};AN=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u,v,w;p=0;q=m;r=0;while(true){if(!(r=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+s]),o,((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]));u=t[0];v=t[1];w=X(v,p,0);p=w[0];((s<0||s>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+s]=w[1]);p=p+(u)>>>0;r++;}return p;};AO=function(m,n,o,p){var $ptr,m,n,o,p,q,r,s;q=0;q=n;r=m.$length-1>>0;while(true){if(!(r>=0)){break;}s=AF(q,((r<0||r>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r]),p);((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r]=s[0]);q=s[1];r=r-(1)>>0;}return q;};BL.ptr.prototype.Sign=function(){var $ptr,m;m=this;if(m.abs.$length===0){return 0;}if(m.neg){return-1;}return 1;};BL.prototype.Sign=function(){return this.$val.Sign();};BL.ptr.prototype.SetInt64=function(m){var $ptr,m,n,o;n=this;o=false;if((m.$high<0||(m.$high===0&&m.$low<0))){o=true;m=new $Int64(-m.$high,-m.$low);}n.abs=n.abs.setUint64(new $Uint64(m.$high,m.$low));n.neg=o;return n;};BL.prototype.SetInt64=function(m){return this.$val.SetInt64(m);};BL.ptr.prototype.SetUint64=function(m){var $ptr,m,n;n=this;n.abs=n.abs.setUint64(m);n.neg=false;return n;};BL.prototype.SetUint64=function(m){return this.$val.SetUint64(m);};BL.ptr.prototype.Set=function(m){var $ptr,m,n;n=this;if(!(n===m)){n.abs=n.abs.set(m.abs);n.neg=m.neg;}return n;};BL.prototype.Set=function(m){return this.$val.Set(m);};BL.ptr.prototype.Bits=function(){var $ptr,m,n;m=this;return(n=m.abs,$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length));};BL.prototype.Bits=function(){return this.$val.Bits();};BL.ptr.prototype.SetBits=function(m){var $ptr,m,n;n=this;n.abs=$subslice(new BV(m.$array),m.$offset,m.$offset+m.$length).norm();n.neg=false;return n;};BL.prototype.SetBits=function(m){return this.$val.SetBits(m);};BL.ptr.prototype.Abs=function(m){var $ptr,m,n;n=this;n.Set(m);n.neg=false;return n;};BL.prototype.Abs=function(m){return this.$val.Abs(m);};BL.ptr.prototype.Neg=function(m){var $ptr,m,n;n=this;n.Set(m);n.neg=n.abs.$length>0&&!n.neg;return n;};BL.prototype.Neg=function(m){return this.$val.Neg(m);};BL.ptr.prototype.Add=function(m,n){var $ptr,m,n,o,p;o=this;p=m.neg;if(m.neg===n.neg){o.abs=o.abs.add(m.abs,n.abs);}else{if(m.abs.cmp(n.abs)>=0){o.abs=o.abs.sub(m.abs,n.abs);}else{p=!p;o.abs=o.abs.sub(n.abs,m.abs);}}o.neg=o.abs.$length>0&&p;return o;};BL.prototype.Add=function(m,n){return this.$val.Add(m,n);};BL.ptr.prototype.Sub=function(m,n){var $ptr,m,n,o,p;o=this;p=m.neg;if(!(m.neg===n.neg)){o.abs=o.abs.add(m.abs,n.abs);}else{if(m.abs.cmp(n.abs)>=0){o.abs=o.abs.sub(m.abs,n.abs);}else{p=!p;o.abs=o.abs.sub(n.abs,m.abs);}}o.neg=o.abs.$length>0&&p;return o;};BL.prototype.Sub=function(m,n){return this.$val.Sub(m,n);};BL.ptr.prototype.Mul=function(m,n){var $ptr,m,n,o;o=this;o.abs=o.abs.mul(m.abs,n.abs);o.neg=o.abs.$length>0&&!(m.neg===n.neg);return o;};BL.prototype.Mul=function(m,n){return this.$val.Mul(m,n);};BL.ptr.prototype.MulRange=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;if((m.$high>n.$high||(m.$high===n.$high&&m.$low>n.$low))){return o.SetInt64(new $Int64(0,1));}else if((m.$high<0||(m.$high===0&&m.$low<=0))&&(n.$high>0||(n.$high===0&&n.$low>=0))){return o.SetInt64(new $Int64(0,0));}p=false;if((m.$high<0||(m.$high===0&&m.$low<0))){p=(q=(r=new $Int64(n.$high-m.$high,n.$low-m.$low),new $Int64(r.$high&0,(r.$low&1)>>>0)),(q.$high===0&&q.$low===0));s=new $Int64(-n.$high,-n.$low);t=new $Int64(-m.$high,-m.$low);m=s;n=t;}o.abs=o.abs.mulRange(new $Uint64(m.$high,m.$low),new $Uint64(n.$high,n.$low));o.neg=p;return o;};BL.prototype.MulRange=function(m,n){return this.$val.MulRange(m,n);};BL.ptr.prototype.Binomial=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u;o=this;if((p=$div64(m,new $Int64(0,2),false),(p.$high0&&!(m.neg===n.neg);return o;};BL.prototype.Quo=function(m,n){return this.$val.Quo(m,n);};BL.ptr.prototype.Rem=function(m,n){var $ptr,m,n,o,p;o=this;p=BV.nil.div(o.abs,m.abs,n.abs);o.abs=p[1];o.neg=o.abs.$length>0&&m.neg;return o;};BL.prototype.Rem=function(m,n){return this.$val.Rem(m,n);};BL.ptr.prototype.QuoRem=function(m,n,o){var $ptr,m,n,o,p,q,r,s;p=this;q=p.abs.div(o.abs,m.abs,n.abs);p.abs=q[0];o.abs=q[1];r=p.abs.$length>0&&!(m.neg===n.neg);s=o.abs.$length>0&&m.neg;p.neg=r;o.neg=s;return[p,o];};BL.prototype.QuoRem=function(m,n,o){return this.$val.QuoRem(m,n,o);};BL.ptr.prototype.Div=function(m,n){var $ptr,m,n,o,p,q;o=this;p=n.neg;q=new BL.ptr(false,BV.nil);o.QuoRem(m,n,q);if(q.neg){if(p){o.Add(o,BM);}else{o.Sub(o,BM);}}return o;};BL.prototype.Div=function(m,n){return this.$val.Div(m,n);};BL.ptr.prototype.Mod=function(m,n){var $ptr,m,n,o,p,q;o=this;p=n;if(o===n||CE(o.abs,n.abs)){p=new BL.ptr(false,BV.nil).Set(n);}q=new BL.ptr(false,BV.nil);q.QuoRem(m,n,o);if(o.neg){if(p.neg){o.Sub(o,p);}else{o.Add(o,p);}}return o;};BL.prototype.Mod=function(m,n){return this.$val.Mod(m,n);};BL.ptr.prototype.DivMod=function(m,n,o){var $ptr,m,n,o,p,q;p=this;q=n;if(p===n||CE(p.abs,n.abs)){q=new BL.ptr(false,BV.nil).Set(n);}p.QuoRem(m,n,o);if(o.neg){if(q.neg){p.Add(p,BM);o.Sub(o,q);}else{p.Sub(p,BM);o.Add(o,q);}}return[p,o];};BL.prototype.DivMod=function(m,n,o){return this.$val.DivMod(m,n,o);};BL.ptr.prototype.Cmp=function(m){var $ptr,m,n,o;n=0;o=this;if(o.neg===m.neg){n=o.abs.cmp(m.abs);if(o.neg){n=-n;}}else if(o.neg){n=-1;}else{n=1;}return n;};BL.prototype.Cmp=function(m){return this.$val.Cmp(m);};BP=function(m){var $ptr,m,n,o,p,q;if(m.$length===0){return new $Uint64(0,0);}o=(n=(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]),new $Uint64(0,n.constructor===Number?n:1));if(true&&m.$length>1){o=(p=$shiftLeft64((q=(1>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+1]),new $Uint64(0,q.constructor===Number?q:1)),32),new $Uint64(o.$high|p.$high,(o.$low|p.$low)>>>0));}return o;};BL.ptr.prototype.Int64=function(){var $ptr,m,n,o;m=this;o=(n=BP(m.abs),new $Int64(n.$high,n.$low));if(m.neg){o=new $Int64(-o.$high,-o.$low);}return o;};BL.prototype.Int64=function(){return this.$val.Int64();};BL.ptr.prototype.Uint64=function(){var $ptr,m;m=this;return BP(m.abs);};BL.prototype.Uint64=function(){return this.$val.Uint64();};BL.ptr.prototype.SetString=function(m,n){var $ptr,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=this;p=D.NewReader(m);r=o.scan(p,n);$s=1;case 1:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;s=q[2];if(!($interfaceIsEqual(s,$ifaceNil))){return[DH.nil,false];}t=p.ReadByte();s=t[1];if(!($interfaceIsEqual(s,C.EOF))){return[DH.nil,false];}return[o,true];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.SetString};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.SetString=function(m,n){return this.$val.SetString(m,n);};BL.ptr.prototype.SetBytes=function(m){var $ptr,m,n;n=this;n.abs=n.abs.setBytes(m);n.neg=false;return n;};BL.prototype.SetBytes=function(m){return this.$val.SetBytes(m);};BL.ptr.prototype.Bytes=function(){var $ptr,m,n;m=this;n=$makeSlice(DD,(m.abs.$length*4>>0));return $subslice(n,m.abs.bytes(n));};BL.prototype.Bytes=function(){return this.$val.Bytes();};BL.ptr.prototype.BitLen=function(){var $ptr,m;m=this;return m.abs.bitLen();};BL.prototype.BitLen=function(){return this.$val.BitLen();};BL.ptr.prototype.Exp=function(m,n,o){var $ptr,m,n,o,p,q,r;p=this;q=BV.nil;if(!n.neg){q=n.abs;}r=BV.nil;if(!(o===DH.nil)){r=o.abs;}p.abs=p.abs.expNN(m.abs,q,r);p.neg=p.abs.$length>0&&m.neg&&q.$length>0&&((((0>=q.$length?$throwRuntimeError("index out of range"):q.$array[q.$offset+0])&1)>>>0)===1);if(p.neg&&r.$length>0){p.abs=p.abs.sub(r,p.abs);p.neg=false;}return p;};BL.prototype.Exp=function(m,n,o){return this.$val.Exp(m,n,o);};BL.ptr.prototype.GCD=function(m,n,o,p){var $ptr,aa,ab,ac,m,n,o,p,q,r,s,t,u,v,w,x,y,z;q=this;if(o.Sign()<=0||p.Sign()<=0){q.SetInt64(new $Int64(0,0));if(!(m===DH.nil)){m.SetInt64(new $Int64(0,0));}if(!(n===DH.nil)){n.SetInt64(new $Int64(0,0));}return q;}if(m===DH.nil&&n===DH.nil){return q.binaryGCD(o,p);}r=new BL.ptr(false,BV.nil).Set(o);s=new BL.ptr(false,BV.nil).Set(p);t=new BL.ptr(false,BV.nil);u=new BL.ptr(false,BV.nil).SetInt64(new $Int64(0,1));v=new BL.ptr(false,BV.nil).SetInt64(new $Int64(0,1));w=new BL.ptr(false,BV.nil);x=new BL.ptr(false,BV.nil);y=new BL.ptr(false,BV.nil);while(true){if(!(s.abs.$length>0)){break;}z=new BL.ptr(false,BV.nil);aa=x.QuoRem(r,s,z);x=aa[0];z=aa[1];ab=s;ac=z;r=ab;s=ac;y.Set(t);t.Mul(t,x);t.neg=!t.neg;t.Add(t,v);v.Set(y);y.Set(u);u.Mul(u,x);u.neg=!u.neg;u.Add(u,w);w.Set(y);}if(!(m===DH.nil)){BL.copy(m,v);}if(!(n===DH.nil)){BL.copy(n,w);}BL.copy(q,r);return q;};BL.prototype.GCD=function(m,n,o,p){return this.$val.GCD(m,n,o,p);};BL.ptr.prototype.binaryGCD=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u,v,w,x,y;o=this;p=o;q=new BL.ptr(false,BV.nil);if(m.abs.$length>n.abs.$length){q.Rem(m,n);p.Set(n);}else if(m.abs.$length=u.$length?$throwRuntimeError("index out of range"):u.$array[u.$offset+0]))&1)>>>0)===0))){t.Neg(q);}else{t.Set(p);}while(true){if(!(t.abs.$length>0)){break;}t.Rsh(t,t.abs.trailingZeroBits());if(t.neg){v=t;w=q;q=v;t=w;q.neg=q.abs.$length>0&&!q.neg;}else{x=t;y=p;p=x;t=y;}t.Sub(p,q);}return o.Lsh(p,r);};BL.prototype.binaryGCD=function(m,n){return this.$val.binaryGCD(m,n);};BL.ptr.prototype.ProbablyPrime=function(m){var $ptr,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=this;if(m<=0){$panic(new $String("non-positive n for ProbablyPrime"));}if(!(!n.neg)){o=false;$s=1;continue s;}p=n.abs.probablyPrime(m);$s=2;case 2:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;case 1:return o;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.ProbablyPrime};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.ProbablyPrime=function(m){return this.$val.ProbablyPrime(m);};BL.ptr.prototype.Rand=function(m,n){var $ptr,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=this;o.neg=false;if(n.neg||(n.abs.$length===0)){o.abs=BV.nil;return o;}p=o.abs.random(m,n.abs,n.abs.bitLen());$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o.abs=p;return o;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Rand};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Rand=function(m,n){return this.$val.Rand(m,n);};BL.ptr.prototype.ModInverse=function(m,n){var $ptr,m,n,o,p;o=this;p=new BL.ptr(false,BV.nil);p.GCD(o,DH.nil,m,n);if(o.neg){o.Add(o,n);}return o;};BL.prototype.ModInverse=function(m,n){return this.$val.ModInverse(m,n);};BQ=function(m,n){var $ptr,aa,ab,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=[o];p=[p];q=[q];if((n.abs.$length===0)||((((r=n.abs,(0>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+0]))&1)>>>0)===0)){$s=1;continue;}$s=2;continue;case 1:s=A.Sprintf("big: invalid 2nd argument to Int.Jacobi: need odd integer but got %s",new DE([n]));$s=3;case 3:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}$panic(new $String(s));case 2:t=new BL.ptr(false,BV.nil);u=new BL.ptr(false,BV.nil);v=new BL.ptr(false,BV.nil);o[0]=$clone(t,BL);p[0]=$clone(u,BL);q[0]=$clone(v,BL);o[0].Set(m);p[0].Set(n);w=1;if(p[0].neg){if(o[0].neg){w=-1;}p[0].neg=false;}while(true){if(p[0].Cmp(BM)===0){return w;}if(o[0].abs.$length===0){return 0;}o[0].Mod(o[0],p[0]);if(o[0].abs.$length===0){return 0;}x=o[0].abs.trailingZeroBits();if(!((((x&1)>>>0)===0))){z=((y=p[0].abs,(0>=y.$length?$throwRuntimeError("index out of range"):y.$array[y.$offset+0]))&7)>>>0;if((z===3)||(z===5)){w=-w;}}q[0].Rsh(o[0],x);if(((((aa=p[0].abs,(0>=aa.$length?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0]))&3)>>>0)===3)&&((((ab=q[0].abs,(0>=ab.$length?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+0]))&3)>>>0)===3)){w=-w;}o[0].Set(p[0]);p[0].Set(q[0]);}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BQ};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Jacobi=BQ;BL.ptr.prototype.ModSqrt=function(m,n){var $ptr,aa,ab,ac,ad,ae,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=[o];p=[p];q=[q];r=[r];s=[s];t=[t];u=this;w=BQ(m,n);$s=1;case 1:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}v=w;if(v===-1){$s=2;continue;}if(v===0){$s=3;continue;}if(v===1){$s=4;continue;}$s=5;continue;case 2:return DH.nil;case 3:return u.SetInt64(new $Int64(0,0));case 4:$s=5;continue;case 5:if(m.neg||m.Cmp(n)>=0){m=new BL.ptr(false,BV.nil).Mod(m,n);}t[0]=new BL.ptr(false,BV.nil);t[0].Sub(n,BM);x=t[0].abs.trailingZeroBits();t[0].Rsh(t[0],x);o[0]=new BL.ptr(false,BV.nil);o[0].SetInt64(new $Int64(0,2));case 6:y=BQ(o[0],n);$s=8;case 8:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}if(!(!((y===-1)))){$s=7;continue;}o[0].Add(o[0],BM);$s=6;continue;case 7:z=new BL.ptr(false,BV.nil);aa=new BL.ptr(false,BV.nil);ab=new BL.ptr(false,BV.nil);ac=new BL.ptr(false,BV.nil);p[0]=$clone(z,BL);q[0]=$clone(aa,BL);s[0]=$clone(ab,BL);r[0]=$clone(ac,BL);p[0].Add(t[0],BM);p[0].Rsh(p[0],1);p[0].Exp(m,p[0],n);q[0].Exp(m,t[0],n);s[0].Exp(o[0],t[0],n);ad=x;while(true){ae=0;r[0].Set(q[0]);while(true){if(!(!((r[0].Cmp(BM)===0)))){break;}r[0].Mul(r[0],r[0]).Mod(r[0],n);ae=ae+(1)>>>0;}if(ae===0){return u.Set(p[0]);}r[0].SetInt64(new $Int64(0,0)).SetBit(r[0],(((ad-ae>>>0)-1>>>0)>>0),1).Exp(s[0],r[0],n);s[0].Mul(r[0],r[0]).Mod(s[0],n);p[0].Mul(p[0],r[0]).Mod(p[0],n);q[0].Mul(q[0],s[0]).Mod(q[0],n);ad=ae;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.ModSqrt};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.ModSqrt=function(m,n){return this.$val.ModSqrt(m,n);};BL.ptr.prototype.Lsh=function(m,n){var $ptr,m,n,o;o=this;o.abs=o.abs.shl(m.abs,n);o.neg=m.neg;return o;};BL.prototype.Lsh=function(m,n){return this.$val.Lsh(m,n);};BL.ptr.prototype.Rsh=function(m,n){var $ptr,m,n,o,p;o=this;if(m.neg){p=o.abs.sub(m.abs,BW);p=p.shr(p,n);o.abs=p.add(p,BW);o.neg=true;return o;}o.abs=o.abs.shr(m.abs,n);o.neg=false;return o;};BL.prototype.Rsh=function(m,n){return this.$val.Rsh(m,n);};BL.ptr.prototype.Bit=function(m){var $ptr,m,n,o,p;n=this;if(m===0){if(n.abs.$length>0){return((((o=n.abs,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]))&1)>>>0)>>>0);}return 0;}if(m<0){$panic(new $String("negative bit index"));}if(n.neg){p=BV.nil.sub(n.abs,BW);return(p.bit((m>>>0))^1)>>>0;}return n.abs.bit((m>>>0));};BL.prototype.Bit=function(m){return this.$val.Bit(m);};BL.ptr.prototype.SetBit=function(m,n,o){var $ptr,m,n,o,p,q;p=this;if(n<0){$panic(new $String("negative bit index"));}if(m.neg){q=p.abs.sub(m.abs,BW);q=q.setBit(q,(n>>>0),(o^1)>>>0);p.abs=q.add(q,BW);p.neg=p.abs.$length>0;return p;}p.abs=p.abs.setBit(m.abs,(n>>>0),o);p.neg=false;return p;};BL.prototype.SetBit=function(m,n,o){return this.$val.SetBit(m,n,o);};BL.ptr.prototype.And=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;if(m.neg===n.neg){if(m.neg){p=BV.nil.sub(m.abs,BW);q=BV.nil.sub(n.abs,BW);o.abs=o.abs.add(o.abs.or(p,q),BW);o.neg=true;return o;}o.abs=o.abs.and(m.abs,n.abs);o.neg=false;return o;}if(m.neg){r=n;s=m;m=r;n=s;}t=BV.nil.sub(n.abs,BW);o.abs=o.abs.andNot(m.abs,t);o.neg=false;return o;};BL.prototype.And=function(m,n){return this.$val.And(m,n);};BL.ptr.prototype.AndNot=function(m,n){var $ptr,m,n,o,p,q,r,s;o=this;if(m.neg===n.neg){if(m.neg){p=BV.nil.sub(m.abs,BW);q=BV.nil.sub(n.abs,BW);o.abs=o.abs.andNot(q,p);o.neg=false;return o;}o.abs=o.abs.andNot(m.abs,n.abs);o.neg=false;return o;}if(m.neg){r=BV.nil.sub(m.abs,BW);o.abs=o.abs.add(o.abs.or(r,n.abs),BW);o.neg=true;return o;}s=BV.nil.sub(n.abs,BW);o.abs=o.abs.and(m.abs,s);o.neg=false;return o;};BL.prototype.AndNot=function(m,n){return this.$val.AndNot(m,n);};BL.ptr.prototype.Or=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;if(m.neg===n.neg){if(m.neg){p=BV.nil.sub(m.abs,BW);q=BV.nil.sub(n.abs,BW);o.abs=o.abs.add(o.abs.and(p,q),BW);o.neg=true;return o;}o.abs=o.abs.or(m.abs,n.abs);o.neg=false;return o;}if(m.neg){r=n;s=m;m=r;n=s;}t=BV.nil.sub(n.abs,BW);o.abs=o.abs.add(o.abs.andNot(t,m.abs),BW);o.neg=true;return o;};BL.prototype.Or=function(m,n){return this.$val.Or(m,n);};BL.ptr.prototype.Xor=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;if(m.neg===n.neg){if(m.neg){p=BV.nil.sub(m.abs,BW);q=BV.nil.sub(n.abs,BW);o.abs=o.abs.xor(p,q);o.neg=false;return o;}o.abs=o.abs.xor(m.abs,n.abs);o.neg=false;return o;}if(m.neg){r=n;s=m;m=r;n=s;}t=BV.nil.sub(n.abs,BW);o.abs=o.abs.add(o.abs.xor(m.abs,t),BW);o.neg=true;return o;};BL.prototype.Xor=function(m,n){return this.$val.Xor(m,n);};BL.ptr.prototype.Not=function(m){var $ptr,m,n;n=this;if(m.neg){n.abs=n.abs.sub(m.abs,BW);n.neg=false;return n;}n.abs=n.abs.add(m.abs,BW);n.neg=true;return n;};BL.prototype.Not=function(m){return this.$val.Not(m);};BL.ptr.prototype.GobEncode=function(){var $ptr,m,n,o,p;m=this;if(m===DH.nil){return[DD.nil,$ifaceNil];}n=$makeSlice(DD,(1+(m.abs.$length*4>>0)>>0));o=m.abs.bytes(n)-1>>0;p=2;if(m.neg){p=(p|(1))>>>0;}((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]=p);return[$subslice(n,o),$ifaceNil];};BL.prototype.GobEncode=function(){return this.$val.GobEncode();};BL.ptr.prototype.GobDecode=function(m){var $ptr,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=this;if(m.$length===0){BL.copy(n,new BL.ptr(false,BV.nil));return $ifaceNil;}o=(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]);if(!(((o>>>1<<24>>>24)===1))){$s=1;continue;}$s=2;continue;case 1:p=A.Errorf("Int.GobDecode: encoding version %d not supported",new DE([new $Uint8((o>>>1<<24>>>24))]));$s=3;case 3:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p;case 2:n.neg=!((((o&1)>>>0)===0));n.abs=n.abs.setBytes($subslice(m,1));return $ifaceNil;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.GobDecode};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.GobDecode=function(m){return this.$val.GobDecode(m);};BL.ptr.prototype.MarshalJSON=function(){var $ptr,m;m=this;return[new DD($stringToBytes(m.String())),$ifaceNil];};BL.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};BL.ptr.prototype.UnmarshalJSON=function(m){var $ptr,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=this;p=n.SetString($bytesToString(m),0);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;q=o[1];if(!q){$s=2;continue;}$s=3;continue;case 2:r=A.Errorf("math/big: cannot unmarshal %q into a *big.Int",new DE([m]));$s=4;case 4:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return r;case 3:return $ifaceNil;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.UnmarshalJSON};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.UnmarshalJSON=function(m){return this.$val.UnmarshalJSON(m);};BL.ptr.prototype.MarshalText=function(){var $ptr,m,n,o,p,q;m=DD.nil;n=$ifaceNil;o=this;p=new DD($stringToBytes(o.String()));q=$ifaceNil;m=p;n=q;return[m,n];};BL.prototype.MarshalText=function(){return this.$val.MarshalText();};BL.ptr.prototype.UnmarshalText=function(m){var $ptr,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=this;p=n.SetString($bytesToString(m),0);$s=1;case 1:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;q=o[1];if(!q){$s=2;continue;}$s=3;continue;case 2:r=A.Errorf("math/big: cannot unmarshal %q into a *big.Int",new DE([m]));$s=4;case 4:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return r;case 3:return $ifaceNil;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.UnmarshalText};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.UnmarshalText=function(m){return this.$val.UnmarshalText(m);};BL.ptr.prototype.String=function(){var $ptr,m;m=this;if(m===DH.nil){return"";}else if(m.neg){return"-"+m.abs.decimalString();}return m.abs.decimalString();};BL.prototype.String=function(){return this.$val.String();};BR=function(m){var $ptr,m,n;n=m;if(n===98){return"0123456789abcdefghijklmnopqrstuvwxyz".substring(0,2);}else if(n===111){return"0123456789abcdefghijklmnopqrstuvwxyz".substring(0,8);}else if(n===100||n===115||n===118){return"0123456789abcdefghijklmnopqrstuvwxyz".substring(0,10);}else if(n===120){return"0123456789abcdefghijklmnopqrstuvwxyz".substring(0,16);}else if(n===88){return"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substring(0,16);}return"";};BS=function(m,n,o){var $ptr,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(n.length>0){$s=1;continue;}$s=2;continue;case 1:p=new DD($stringToBytes(n));case 3:if(!(o>0)){$s=4;continue;}q=m.Write(p);$s=5;case 5:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}q;o=o-(1)>>0;$s=3;continue;case 4:case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BS};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};BL.ptr.prototype.Format=function(m,n){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=this;p=BR(n);if(p===""){$s=1;continue;}if(o===DH.nil){$s=2;continue;}$s=3;continue;case 1:q=A.Fprintf(m,"%%!%c(big.Int=%s)",new DE([new $Int32(n),new $String(o.String())]));$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}q;return;case 2:r=A.Fprint(m,new DE([new $String("")]));$s=5;case 5:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}r;return;case 3:s="";if(o.neg){$s=6;continue;}t=m.Flag(43);$s=10;case 10:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}if(t){$s=7;continue;}u=m.Flag(32);$s=11;case 11:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}if(u){$s=8;continue;}$s=9;continue;case 6:s="-";$s=9;continue;case 7:s="+";$s=9;continue;case 8:s=" ";case 9:v="";w=m.Flag(35);$s=14;case 14:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}if(w){$s=12;continue;}$s=13;continue;case 12:x=n;if(x===111){v="0";}else if(x===120){v="0x";}else if(x===88){v="0X";}case 13:y=o.abs.string(p);z=0;aa=0;ab=0;ad=m.Precision();$s=15;case 15:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ac=ad;ae=ac[0];af=ac[1];if(af){if(y.length>0;}else if(y==="0"&&(ae===0)){return;}}ag=((s.length+v.length>>0)+aa>>0)+y.length>>0;ai=m.Width();$s=16;case 16:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ah=ai;aj=ah[0];ak=ah[1];if(ak&&ag>0;am=m.Flag(45);$s=23;case 23:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}if(am){$s=19;continue;}an=m.Flag(48);$s=24;case 24:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}if(an&&!af){$s=20;continue;}$s=21;continue;case 19:ab=al;$s=22;continue;case 20:aa=al;$s=22;continue;case 21:z=al;case 22:case 18:$r=BS(m," ",z);$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=BS(m,s,1);$s=26;case 26:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=BS(m,v,1);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=BS(m,"0",aa);$s=28;case 28:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=BS(m,y,1);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=BS(m," ",ab);$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Format};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Format=function(m,n){return this.$val.Format(m,n);};BL.ptr.prototype.scan=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=this;q=BT(m);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p[0];s=p[1];if(!($interfaceIsEqual(s,$ifaceNil))){return[DH.nil,0,s];}u=o.abs.scan(m,n,false);$s=2;case 2:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;o.abs=t[0];n=t[1];s=t[3];if(!($interfaceIsEqual(s,$ifaceNil))){return[DH.nil,n,s];}o.neg=o.abs.$length>0&&r;return[o,n,$ifaceNil];}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.scan};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.scan=function(m,n){return this.$val.scan(m,n);};BT=function(m){var $ptr,m,n,o,p,q,r,s,t,u,v,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=false;o=$ifaceNil;p=0;r=m.ReadByte();$s=1;case 1:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;p=q[0];o=q[1];if(!($interfaceIsEqual(o,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:s=false;t=o;n=s;o=t;return[n,o];case 3:u=p;if(u===45){$s=4;continue;}if(u===43){$s=5;continue;}$s=6;continue;case 4:n=true;$s=7;continue;case 5:$s=7;continue;case 6:v=m.UnreadByte();$s=8;case 8:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}v;case 7:return[n,o];}return;}if($f===undefined){$f={$blk:BT};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.$s=$s;$f.$r=$r;return $f;};BU.ptr.prototype.ReadByte=function(){var $ptr,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:m=$clone(this,BU);o=m.ScanState.ReadRune();$s=1;case 1:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];r=n[2];if(!((q===1))&&$interfaceIsEqual(r,$ifaceNil)){$s=2;continue;}$s=3;continue;case 2:s=A.Errorf("invalid rune %#U",new DE([new $Int32(p)]));$s=4;case 4:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;case 3:return[(p<<24>>>24),r];}return;}if($f===undefined){$f={$blk:BU.ptr.prototype.ReadByte};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};BU.prototype.ReadByte=function(){return this.$val.ReadByte();};BU.ptr.prototype.UnreadByte=function(){var $ptr,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:m=$clone(this,BU);n=m.ScanState.UnreadRune();$s=1;case 1:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return n;}return;}if($f===undefined){$f={$blk:BU.ptr.prototype.UnreadByte};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BU.prototype.UnreadByte=function(){return this.$val.UnreadByte();};BL.ptr.prototype.Scan=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:o=this;$r=m.SkipSpace();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}p=0;q=n;if(q===98){p=2;}else if(q===111){p=8;}else if(q===100){p=10;}else if(q===120||q===88){p=16;}else if(q===115||q===118){}else{return G.New("Int.Scan: invalid verb");}t=o.scan((s=new BU.ptr(m),new s.constructor.elem(s)),p);$s=2;case 2:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}r=t;u=r[2];return u;}return;}if($f===undefined){$f={$blk:BL.ptr.prototype.Scan};}$f.$ptr=$ptr;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};BL.prototype.Scan=function(m,n){return this.$val.Scan(m,n);};BV.prototype.clear=function(){var $ptr,m,n,o,p;m=this;n=m;o=0;while(true){if(!(o=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+p]=0);o++;}};$ptrType(BV).prototype.clear=function(){return this.$get().clear();};BV.prototype.norm=function(){var $ptr,m,n,o;m=this;n=m.$length;while(true){if(!(n>0&&((o=n-1>>0,((o<0||o>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+o]))===0))){break;}n=n-(1)>>0;}return $subslice(m,0,n);};$ptrType(BV).prototype.norm=function(){return this.$get().norm();};BV.prototype.make=function(m){var $ptr,m,n;n=this;if(m<=n.$capacity){return $subslice(n,0,m);}return $makeSlice(BV,m,(m+4>>0));};$ptrType(BV).prototype.make=function(m){return this.$get().make(m);};BV.prototype.setWord=function(m){var $ptr,m,n;n=this;if(m===0){return $subslice(n,0,0);}n=n.make(1);(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]=m);return n;};$ptrType(BV).prototype.setWord=function(m){return this.$get().setWord(m);};BV.prototype.setUint64=function(m){var $ptr,m,n,o,p,q,r,s,t,u;n=this;o=(m.$low>>>0);if((p=new $Uint64(0,o.constructor===Number?o:1),(p.$high===m.$high&&p.$low===m.$low))){return n.setWord(o);}q=0;r=m;while(true){if(!((r.$high>0||(r.$high===0&&r.$low>0)))){break;}q=q+(1)>>0;r=$shiftRightUint64(r,(32));}n=n.make(q);s=n;t=0;while(true){if(!(t=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+u]=(new $Uint64(m.$high&0,(m.$low&4294967295)>>>0).$low>>>0));m=$shiftRightUint64(m,(32));t++;}return n;};$ptrType(BV).prototype.setUint64=function(m){return this.$get().setUint64(m);};BV.prototype.set=function(m){var $ptr,m,n;n=this;n=n.make(m.$length);$copySlice(n,m);return n;};$ptrType(BV).prototype.set=function(m){return this.$get().set(m);};BV.prototype.add=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u;o=this;p=m.$length;q=n.$length;if(p>0);s=L((r=$subslice(o,0,q),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length)),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length));if(p>q){s=N((t=$subslice(o,q,p),$subslice(new DG(t.$array),t.$offset,t.$offset+t.$length)),(u=$subslice(m,q),$subslice(new DG(u.$array),u.$offset,u.$offset+u.$length)),s);}((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]=s);return o.norm();};$ptrType(BV).prototype.add=function(m,n){return this.$get().add(m,n);};BV.prototype.sub=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u;o=this;p=m.$length;q=n.$length;if(pq){s=O((t=$subslice(o,q),$subslice(new DG(t.$array),t.$offset,t.$offset+t.$length)),(u=$subslice(m,q),$subslice(new DG(u.$array),u.$offset,u.$offset+u.$length)),s);}if(!((s===0))){$panic(new $String("underflow"));}return o.norm();};$ptrType(BV).prototype.sub=function(m,n){return this.$get().sub(m,n);};BV.prototype.cmp=function(m){var $ptr,m,n,o,p,q,r;n=0;o=this;p=o.$length;q=m.$length;if(!((p===q))||(p===0)){if(pq){n=1;}return n;}r=p-1>>0;while(true){if(!(r>0&&(((r<0||r>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r])===((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r])))){break;}r=r-(1)>>0;}if(((r<0||r>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r])<((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r])){n=-1;}else if(((r<0||r>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r])>((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r])){n=1;}return n;};$ptrType(BV).prototype.cmp=function(m){return this.$get().cmp(m);};BV.prototype.mulAddWW=function(m,n,o){var $ptr,m,n,o,p,q,r;p=this;q=m.$length;if((q===0)||(n===0)){return p.setWord(o);}p=p.make(q+1>>0);((q<0||q>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]=R((r=$subslice(p,0,q),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length)),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),n,o));return p.norm();};$ptrType(BV).prototype.mulAddWW=function(m,n,o){return this.$get().mulAddWW(m,n,o);};BZ=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u;$subslice(m,0,(n.$length+o.$length>>0)).clear();p=o;q=0;while(true){if(!(q=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]);if(!((s===0))){(u=n.$length+r>>0,((u<0||u>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+u]=S((t=$subslice(m,r,(r+n.$length>>0)),$subslice(new DG(t.$array),t.$offset,t.$offset+t.$length)),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length),s)));}q++;}};BV.prototype.montgomery=function(m,n,o,p,q){var $ptr,aa,ab,m,n,o,p,q,r,s,t,u,v,w,x,y,z;r=this;s=0;t=0;u=s;v=t;r=r.make(q);r.clear();w=0;while(true){if(!(w=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+w]);u=u+(S($subslice(new DG(r.$array),r.$offset,r.$offset+r.$length),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),x))>>>0;z=(y=(0>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+0]),(((y>>>16<<16)*p>>>0)+(y<<16>>>16)*p)>>>0);v=S($subslice(new DG(r.$array),r.$offset,r.$offset+r.$length),$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length),z);$copySlice(r,$subslice(r,1));(aa=q-1>>0,((aa<0||aa>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+aa]=(u+v>>>0)));if((ab=q-1>>0,((ab<0||ab>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+ab]))>0;}if(!((u===0))){M($subslice(new DG(r.$array),r.$offset,r.$offset+r.$length),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length),$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length));}return r;};$ptrType(BV).prototype.montgomery=function(m,n,o,p,q){return this.$get().montgomery(m,n,o,p,q);};CA=function(m,n,o){var $ptr,m,n,o,p,q,r,s;q=L((p=$subslice(m,0,o),$subslice(new DG(p.$array),p.$offset,p.$offset+p.$length)),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length));if(!((q===0))){N((r=$subslice(m,o,(o+(o>>1>>0)>>0)),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length)),(s=$subslice(m,o),$subslice(new DG(s.$array),s.$offset,s.$offset+s.$length)),q);}};CB=function(m,n,o){var $ptr,m,n,o,p,q,r,s;q=M((p=$subslice(m,0,o),$subslice(new DG(p.$array),p.$offset,p.$offset+p.$length)),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length));if(!((q===0))){O((r=$subslice(m,o,(o+(o>>1>>0)>>0)),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length)),(s=$subslice(m,o),$subslice(new DG(s.$array),s.$offset,s.$offset+s.$length)),q);}};CD=function(m,n,o){var $ptr,aa,ab,ac,ad,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=o.$length;if(!(((p&1)===0))||p>1>>0;r=$subslice(n,q);s=$subslice(n,0,q);t=r;u=s;v=$subslice(o,q);w=$subslice(o,0,q);x=v;y=w;CD(m,u,y);CD($subslice(m,p),t,x);z=1;aa=$subslice(m,(2*p>>0),((2*p>>0)+q>>0));if(!((M($subslice(new DG(aa.$array),aa.$offset,aa.$offset+aa.$length),$subslice(new DG(t.$array),t.$offset,t.$offset+t.$length),$subslice(new DG(u.$array),u.$offset,u.$offset+u.$length))===0))){z=-z;M($subslice(new DG(aa.$array),aa.$offset,aa.$offset+aa.$length),$subslice(new DG(u.$array),u.$offset,u.$offset+u.$length),$subslice(new DG(t.$array),t.$offset,t.$offset+t.$length));}ab=$subslice(m,((2*p>>0)+q>>0),(3*p>>0));if(!((M($subslice(new DG(ab.$array),ab.$offset,ab.$offset+ab.$length),$subslice(new DG(y.$array),y.$offset,y.$offset+y.$length),$subslice(new DG(x.$array),x.$offset,x.$offset+x.$length))===0))){z=-z;M($subslice(new DG(ab.$array),ab.$offset,ab.$offset+ab.$length),$subslice(new DG(x.$array),x.$offset,x.$offset+x.$length),$subslice(new DG(y.$array),y.$offset,y.$offset+y.$length));}ac=$subslice(m,(p*3>>0));CD(ac,aa,ab);ad=$subslice(m,(p*4>>0));$copySlice(ad,$subslice(m,0,(p*2>>0)));CA($subslice(m,q),ad,p);CA($subslice(m,q),$subslice(ad,p),p);if(z>0){CA($subslice(m,q),ac,p);}else{CB($subslice(m,q),ac,p);}};CE=function(m,n){var $ptr,m,n,o,p;return m.$capacity>0&&n.$capacity>0&&(o=$subslice(m,0,m.$capacity),$indexPtr(o.$array,o.$offset+(m.$capacity-1>>0),DJ))===(p=$subslice(n,0,n.$capacity),$indexPtr(p.$array,p.$offset+(n.$capacity-1>>0),DJ));};CF=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u,v;p=n.$length;if(p>0){s=L((q=$subslice(m,o,(o+p>>0)),$subslice(new DG(q.$array),q.$offset,q.$offset+q.$length)),(r=$subslice(m,o),$subslice(new DG(r.$array),r.$offset,r.$offset+r.$length)),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length));if(!((s===0))){t=o+p>>0;if(tn){return m;}return n;};CH=function(m){var $ptr,m,n,o;n=0;while(true){if(!(m>CC)){break;}m=(m>>$min((1),31))>>0;n=n+(1)>>>0;}return(o=n,o<32?(m<>0;};BV.prototype.mul=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u,v,w,x,y,z;o=this;p=m.$length;q=n.$length;if(p=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]),0);}if(CE(o,m)||CE(o,n)){o=BV.nil;}if(q>0);BZ(o,m,n);return o.norm();}r=CH(q);s=$subslice(m,0,r);t=$subslice(n,0,r);o=o.make(CG(6*r>>0,p+q>>0));CD(o,s,t);o=$subslice(o,0,(p+q>>0));$subslice(o,(2*r>>0)).clear();if(rr){z=$subslice(z,0,r);}z=z.norm();u=u.mul(z,x);CF(o,u,y);u=u.mul(z,w);CF(o,u,y+r>>0);y=y+(r)>>0;}}return o.norm();};$ptrType(BV).prototype.mul=function(m,n){return this.$get().mul(m,n);};BV.prototype.mulRange=function(m,n){var $ptr,m,n,o,p,q;o=this;if((m.$high===0&&m.$low===0)){return o.setUint64(new $Uint64(0,0));}else if((m.$high>n.$high||(m.$high===n.$high&&m.$low>n.$low))){return o.setUint64(new $Uint64(0,1));}else if((m.$high===n.$high&&m.$low===n.$low)){return o.setUint64(m);}else if((p=new $Uint64(m.$high+0,m.$low+1),(p.$high===n.$high&&p.$low===n.$low))){return o.mul(BV.nil.setUint64(m),BV.nil.setUint64(n));}q=$div64((new $Uint64(m.$high+n.$high,m.$low+n.$low)),new $Uint64(0,2),false);return o.mul(BV.nil.mulRange(m,q),BV.nil.mulRange(new $Uint64(q.$high+0,q.$low+1),n));};$ptrType(BV).prototype.mulRange=function(m,n){return this.$get().mulRange(m,n);};BV.prototype.divW=function(m,n){var $ptr,m,n,o,p,q,r;o=BV.nil;p=0;q=this;r=m.$length;if(n===0){$panic(new $String("division by zero"));}else if(n===1){o=q.set(m);return[o,p];}else if(r===0){o=$subslice(q,0,0);return[o,p];}q=q.make(r);p=T($subslice(new DG(q.$array),q.$offset,q.$offset+q.$length),0,$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),n);o=q.norm();return[o,p];};$ptrType(BV).prototype.divW=function(m,n){return this.$get().divW(m,n);};BV.prototype.div=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u;p=BV.nil;q=BV.nil;r=this;if(o.$length===0){$panic(new $String("division by zero"));}if(n.cmp(o)<0){p=$subslice(r,0,0);q=m.set(n);return[p,q];}if(o.$length===1){s=0;t=r.divW(n,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]));p=t[0];s=t[1];q=m.setWord(s);return[p,q];}u=r.divLarge(m,n,o);p=u[0];q=u[1];return[p,q];};$ptrType(BV).prototype.div=function(m,n,o){return this.$get().div(m,n,o);};BV.prototype.divLarge=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=BV.nil;q=BV.nil;r=this;s=o.$length;t=n.$length-s>>0;if(CE(r,n)||CE(r,o)){r=BV.nil;}p=r.make(t+1>>0);u=$makeSlice(BV,(s+1>>0));if(CE(m,n)||CE(m,o)){m=BV.nil;}m=m.make(n.$length+1>>0);m.clear();w=AD((v=s-1>>0,((v<0||v>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+v])));if(w>0){x=$makeSlice(BV,s);P($subslice(new DG(x.$array),x.$offset,x.$offset+x.$length),$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length),w);o=x;}(z=n.$length,((z<0||z>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+z]=P((y=$subslice(m,0,n.$length),$subslice(new DG(y.$array),y.$offset,y.$offset+y.$length)),$subslice(new DG(n.$array),n.$offset,n.$offset+n.$length),w)));aa=t;while(true){if(!(aa>=0)){break;}ab=4294967295;if(!(((ac=aa+s>>0,((ac<0||ac>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+ac]))===(ad=s-1>>0,((ad<0||ad>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+ad]))))){ae=0;af=K((ag=aa+s>>0,((ag<0||ag>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+ag])),(ah=(aa+s>>0)-1>>0,((ah<0||ah>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+ah])),(ai=s-1>>0,((ai<0||ai>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+ai])));ab=af[0];ae=af[1];aj=J(ab,(ak=s-2>>0,((ak<0||ak>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+ak])));al=aj[0];am=aj[1];while(true){if(!(CL(al,am,ae,(an=(aa+s>>0)-2>>0,((an<0||an>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+an]))))){break;}ab=ab-(1)>>>0;ao=ae;ae=ae+((ap=s-1>>0,((ap<0||ap>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+ap])))>>>0;if(ae>0,((ar<0||ar>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+ar])));al=aq[0];am=aq[1];}}((s<0||s>=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+s]=R((as=$subslice(u,0,s),$subslice(new DG(as.$array),as.$offset,as.$offset+as.$length)),$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length),ab,0));av=M((at=$subslice(m,aa,(aa+u.$length>>0)),$subslice(new DG(at.$array),at.$offset,at.$offset+at.$length)),(au=$subslice(m,aa),$subslice(new DG(au.$array),au.$offset,au.$offset+au.$length)),$subslice(new DG(u.$array),u.$offset,u.$offset+u.$length));if(!((av===0))){ay=L((aw=$subslice(m,aa,(aa+s>>0)),$subslice(new DG(aw.$array),aw.$offset,aw.$offset+aw.$length)),(ax=$subslice(m,aa),$subslice(new DG(ax.$array),ax.$offset,ax.$offset+ax.$length)),$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length));az=aa+s>>0;((az<0||az>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+az]=(((az<0||az>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+az])+(ay)>>>0));ab=ab-(1)>>>0;}((aa<0||aa>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+aa]=ab);aa=aa-(1)>>0;}p=p.norm();Q($subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),w);q=m.norm();ba=p;bb=q;p=ba;q=bb;return[p,q];};$ptrType(BV).prototype.divLarge=function(m,n,o){return this.$get().divLarge(m,n,o);};BV.prototype.bitLen=function(){var $ptr,m,n;m=this;n=m.$length-1>>0;if(n>=0){return(n*32>>0)+U(((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]))>>0;}return 0;};$ptrType(BV).prototype.bitLen=function(){return this.$get().bitLen();};CK=function(m){var $ptr,m,n,o,p,q;if(32===32){return((n=((o=((m&(-m>>>0))>>>0),(((o>>>16<<16)*125613361>>>0)+(o<<16>>>16)*125613361)>>>0))>>>27>>>0,((n<0||n>=CI.$length)?$throwRuntimeError("index out of range"):CI.$array[CI.$offset+n]))>>>0);}else if(32===64){return((p=((q=((m&(-m>>>0))>>>0),(((q>>>16<<16)*3033172745>>>0)+(q<<16>>>16)*3033172745)>>>0))>>>58>>>0,((p<0||p>=CJ.$length)?$throwRuntimeError("index out of range"):CJ.$array[CJ.$offset+p]))>>>0);}else{$panic(new $String("unknown word size"));}};BV.prototype.trailingZeroBits=function(){var $ptr,m,n;m=this;if(m.$length===0){return 0;}n=0;while(true){if(!(((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n])===0)){break;}n=n+(1)>>>0;}return(n*32>>>0)+CK(((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]))>>>0;};$ptrType(BV).prototype.trailingZeroBits=function(){return this.$get().trailingZeroBits();};BV.prototype.shl=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;p=m.$length;if(p===0){return $subslice(o,0,0);}r=p+((q=n/32,(q===q&&q!==1/0&&q!==-1/0)?q>>>0:$throwRuntimeError("integer divide by zero"))>>0)>>0;o=o.make(r+1>>0);((r<0||r>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r]=P((s=$subslice(o,(r-p>>0),r),$subslice(new DG(s.$array),s.$offset,s.$offset+s.$length)),$subslice(new DG(m.$array),m.$offset,m.$offset+m.$length),(t=n%32,t===t?t:$throwRuntimeError("integer divide by zero"))));$subslice(o,0,(r-p>>0)).clear();return o.norm();};$ptrType(BV).prototype.shl=function(m,n){return this.$get().shl(m,n);};BV.prototype.shr=function(m,n){var $ptr,m,n,o,p,q,r,s,t;o=this;p=m.$length;r=p-((q=n/32,(q===q&&q!==1/0&&q!==-1/0)?q>>>0:$throwRuntimeError("integer divide by zero"))>>0)>>0;if(r<=0){return $subslice(o,0,0);}o=o.make(r);Q($subslice(new DG(o.$array),o.$offset,o.$offset+o.$length),(s=$subslice(m,(p-r>>0)),$subslice(new DG(s.$array),s.$offset,s.$offset+s.$length)),(t=n%32,t===t?t:$throwRuntimeError("integer divide by zero")));return o.norm();};$ptrType(BV).prototype.shr=function(m,n){return this.$get().shr(m,n);};BV.prototype.setBit=function(m,n,o){var $ptr,m,n,o,p,q,r,s,t,u,v,w;p=this;r=((q=n/32,(q===q&&q!==1/0&&q!==-1/0)?q>>>0:$throwRuntimeError("integer divide by zero"))>>0);u=(s=((t=n%32,t===t?t:$throwRuntimeError("integer divide by zero"))),s<32?(1<>>0;v=m.$length;w=o;if(w===0){p=p.make(v);$copySlice(p,m);if(r>=v){return p;}((r<0||r>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+r]=((((r<0||r>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+r])&~(u))>>>0));return p.norm();}else if(w===1){if(r>=v){p=p.make(r+1>>0);$subslice(p,v).clear();}else{p=p.make(v);}$copySlice(p,m);((r<0||r>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+r]=((((r<0||r>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+r])|(u))>>>0));return p;}$panic(new $String("set bit is not 0 or 1"));};$ptrType(BV).prototype.setBit=function(m,n,o){return this.$get().setBit(m,n,o);};BV.prototype.bit=function(m){var $ptr,m,n,o,p,q,r;n=this;p=(o=m/32,(o===o&&o!==1/0&&o!==-1/0)?o>>>0:$throwRuntimeError("integer divide by zero"));if(p>=(n.$length>>>0)){return 0;}return(((((q=((r=m%32,r===r?r:$throwRuntimeError("integer divide by zero"))),q<32?(((p<0||p>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+p])>>>q):0)>>>0)&1)>>>0)>>>0);};$ptrType(BV).prototype.bit=function(m){return this.$get().bit(m);};BV.prototype.and=function(m,n){var $ptr,m,n,o,p,q,r;o=this;p=m.$length;q=n.$length;if(p>q){p=q;}o=o.make(p);r=0;while(true){if(!(r=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r]=((((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r])&((r<0||r>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+r]))>>>0));r=r+(1)>>0;}return o.norm();};$ptrType(BV).prototype.and=function(m,n){return this.$get().and(m,n);};BV.prototype.andNot=function(m,n){var $ptr,m,n,o,p,q,r;o=this;p=m.$length;q=n.$length;if(q>p){q=p;}o=o.make(p);r=0;while(true){if(!(r=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+r]=((((r<0||r>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+r])&~((r<0||r>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+r]))>>>0));r=r+(1)>>0;}$copySlice($subslice(o,q,p),$subslice(m,q,p));return o.norm();};$ptrType(BV).prototype.andNot=function(m,n){return this.$get().andNot(m,n);};BV.prototype.or=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u;o=this;p=m.$length;q=n.$length;r=m;if(p=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+u]=((((u<0||u>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+u])|((u<0||u>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+u]))>>>0));u=u+(1)>>0;}$copySlice($subslice(o,q,p),$subslice(r,q,p));return o.norm();};$ptrType(BV).prototype.or=function(m,n){return this.$get().or(m,n);};BV.prototype.xor=function(m,n){var $ptr,m,n,o,p,q,r,s,t,u;o=this;p=m.$length;q=n.$length;r=m;if(p=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+u]=((((u<0||u>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+u])^((u<0||u>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+u]))>>>0));u=u+(1)>>0;}$copySlice($subslice(o,q,p),$subslice(r,q,p));return o.norm();};$ptrType(BV).prototype.xor=function(m,n){return this.$get().xor(m,n);};CL=function(m,n,o,p){var $ptr,m,n,o,p;return m>o||(m===o)&&n>p;};BV.prototype.modW=function(m){var $ptr,m,n,o,p;n=0;o=this;p=BV.nil;p=p.make(o.$length);n=T($subslice(new DG(p.$array),p.$offset,p.$offset+p.$length),0,$subslice(new DG(o.$array),o.$offset,o.$offset+o.$length),m);return n;};$ptrType(BV).prototype.modW=function(m){return this.$get().modW(m);};BV.prototype.random=function(m,n,o){var $ptr,aa,ab,ac,ad,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:p=this;if(CE(p,n)){p=BV.nil;}p=p.make(n.$length);r=((q=o%32,q===q?q:$throwRuntimeError("integer divide by zero"))>>>0);if(r===0){r=32;}t=((((s=r,s<32?(1<>>0))-1>>>0);case 1:if(32===32){$s=3;continue;}if(32===64){$s=4;continue;}$s=5;continue;case 3:u=p;v=0;case 7:if(!(v=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+w]=(x>>>0));v++;$s=7;continue;case 8:$s=6;continue;case 4:y=p;z=0;case 10:if(!(z=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+aa]=(((ab>>>0)|((ac>>>0)<<32>>>0))>>>0));z++;$s=10;continue;case 11:$s=6;continue;case 5:$panic(new $String("unknown word size"));case 6:ad=n.$length-1>>0;((ad<0||ad>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+ad]=((((ad<0||ad>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+ad])&(t))>>>0));if(p.cmp(n)<0){$s=2;continue;}$s=1;continue;case 2:return p.norm();}return;}if($f===undefined){$f={$blk:BV.prototype.random};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(BV).prototype.random=function(m,n,o){return this.$get().random(m,n,o);};BV.prototype.expNN=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=this;if(CE(p,m)||CE(p,n)){p=BV.nil;}if((o.$length===1)&&((0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])===1)){return p.setWord(0);}if(n.$length===0){return p.setWord(1);}if((n.$length===1)&&((0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===1)&&!((o.$length===0))){q=p.div(p,m,o);p=q[1];return p;}if(!((o.$length===0))){p=p.make(o.$length);}p=p.set(m);if(m.$length>1&&n.$length>1&&o.$length>0){if((((0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])&1)>>>0)===1){return p.expNNMontgomery(m,n,o);}return p.expNNWindowed(m,n,o);}s=(r=n.$length-1>>0,((r<0||r>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+r]));t=AD(s)+1>>>0;s=(u=(t),u<32?(s<>>0;v=BV.nil;w=32-(t>>0)>>0;x=BV.nil;y=BV.nil;z=x;aa=y;ab=0;while(true){if(!(ab>>0)===0))){z=z.mul(p,m);ae=p;af=z;z=ae;p=af;}if(!((o.$length===0))){ag=z.div(aa,p,o);z=ag[0];aa=ag[1];ah=v;ai=p;aj=z;ak=aa;z=ah;aa=ai;v=aj;p=ak;}s=(al=(1),al<32?(s<>>0;ab=ab+(1)>>0;}am=n.$length-2>>0;while(true){if(!(am>=0)){break;}s=((am<0||am>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+am]);an=0;while(true){if(!(an<32)){break;}z=z.mul(p,p);ao=p;ap=z;z=ao;p=ap;if(!((((s&2147483648)>>>0)===0))){z=z.mul(p,m);aq=p;ar=z;z=aq;p=ar;}if(!((o.$length===0))){as=z.div(aa,p,o);z=as[0];aa=as[1];at=v;au=p;av=z;aw=aa;z=at;aa=au;v=av;p=aw;}s=(ax=(1),ax<32?(s<>>0;an=an+(1)>>0;}am=am-(1)>>0;}return p.norm();};$ptrType(BV).prototype.expNN=function(m,n,o){return this.$get().expNN(m,n,o);};BV.prototype.expNNWindowed=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=this;q=BV.nil;r=BV.nil;s=q;t=r;u=DK.zero();u[0]=BW;u[1]=m;v=2;while(true){if(!(v<16)){break;}w=$indexPtr(u,(x=v/2,(x===x&&x!==1/0&&x!==-1/0)?x>>0:$throwRuntimeError("integer divide by zero")),DL);y=$indexPtr(u,v,DL);z=$indexPtr(u,(v+1>>0),DL);aa=w;ab=y;ac=z;ab.$set(ab.mul(aa.$get(),aa.$get()));ad=s.div(t,ab.$get(),o);s=ad[0];t=ad[1];ae=t;af=ab.$get();ab.$set(ae);t=af;ac.$set(ac.mul(ab.$get(),m));ag=s.div(t,ac.$get(),o);s=ag[0];t=ag[1];ah=t;ai=ac.$get();ac.$set(ah);t=ai;v=v+(2)>>0;}p=p.setWord(1);aj=n.$length-1>>0;while(true){if(!(aj>=0)){break;}ak=((aj<0||aj>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+aj]);al=0;while(true){if(!(al<32)){break;}if(!((aj===(n.$length-1>>0)))||!((al===0))){s=s.mul(p,p);am=p;an=s;s=am;p=an;ao=s.div(t,p,o);s=ao[0];t=ao[1];ap=t;aq=p;p=ap;t=aq;s=s.mul(p,p);ar=p;as=s;s=ar;p=as;at=s.div(t,p,o);s=at[0];t=at[1];au=t;av=p;p=au;t=av;s=s.mul(p,p);aw=p;ax=s;s=aw;p=ax;ay=s.div(t,p,o);s=ay[0];t=ay[1];az=t;ba=p;p=az;t=ba;s=s.mul(p,p);bb=p;bc=s;s=bb;p=bc;bd=s.div(t,p,o);s=bd[0];t=bd[1];be=t;bf=p;p=be;t=bf;}s=s.mul(p,(bg=ak>>>28>>>0,((bg<0||bg>=u.length)?$throwRuntimeError("index out of range"):u[bg])));bh=p;bi=s;s=bh;p=bi;bj=s.div(t,p,o);s=bj[0];t=bj[1];bk=t;bl=p;p=bk;t=bl;ak=(bm=(4),bm<32?(ak<>>0;al=al+(4)>>0;}aj=aj-(1)>>0;}return p.norm();};$ptrType(BV).prototype.expNNWindowed=function(m,n,o){return this.$get().expNNWindowed(m,n,o);};BV.prototype.expNNMontgomery=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,m,n,o,p,q,r,s,t,u,v,w,x,y,z;p=this;q=BV.nil;r=BV.nil;s=BV.nil;t=BV.nil;u=q;v=r;w=s;x=t;y=o.$length;if(m.$length>y){z=w.div(w,m,o);w=z[1];}else if(m.$length=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+ac]=((ac<0||ac>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+ac]));ab++;}}else{w=m;}m=w;ad=2-(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])>>>0;ae=(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])-1>>>0;af=1;while(true){if(!(af<32)){break;}ae=(ag=ae,(((ae>>>16<<16)*ag>>>0)+(ae<<16>>>16)*ag)>>>0);ad=(ah=((ae+1>>>0)),(((ad>>>16<<16)*ah>>>0)+(ad<<16>>>16)*ah)>>>0);af=(ai=(1),ai<32?(af<>0;}ad=-ad>>>0;x=x.setWord(1);u=u.shl(x,(((2*y>>0)*32>>0)>>>0));aj=x.div(x,u,o);x=aj[1];if(x.$length=v.$length?$throwRuntimeError("index out of range"):v.$array[v.$offset+0]=1);ak=DK.zero();ak[0]=ak[0].montgomery(v,x,o,ad,y);ak[1]=ak[1].montgomery(m,x,o,ad,y);al=2;while(true){if(!(al<16)){break;}((al<0||al>=ak.length)?$throwRuntimeError("index out of range"):ak[al]=((al<0||al>=ak.length)?$throwRuntimeError("index out of range"):ak[al]).montgomery((am=al-1>>0,((am<0||am>=ak.length)?$throwRuntimeError("index out of range"):ak[am])),ak[1],o,ad,y));al=al+(1)>>0;}p=p.make(y);$copySlice(p,ak[0]);u=u.make(y);an=n.$length-1>>0;while(true){if(!(an>=0)){break;}ao=((an<0||an>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+an]);ap=0;while(true){if(!(ap<32)){break;}if(!((an===(n.$length-1>>0)))||!((ap===0))){u=u.montgomery(p,p,o,ad,y);p=p.montgomery(u,u,o,ad,y);u=u.montgomery(p,p,o,ad,y);p=p.montgomery(u,u,o,ad,y);}u=u.montgomery(p,(aq=ao>>>28>>>0,((aq<0||aq>=ak.length)?$throwRuntimeError("index out of range"):ak[aq])),o,ad,y);ar=u;as=p;p=ar;u=as;ao=(at=(4),at<32?(ao<>>0;ap=ap+(4)>>0;}an=an-(1)>>0;}u=u.montgomery(p,v,o,ad,y);return u.norm();};$ptrType(BV).prototype.expNNMontgomery=function(m,n,o){return this.$get().expNNMontgomery(m,n,o);};BV.prototype.probablyPrime=function(m){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:n=this;if(n.$length===0){return false;}if(n.$length===1){if((0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])<2){return false;}if((o=(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])%2,o===o?o:$throwRuntimeError("integer divide by zero"))===0){return(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===2;}p=(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]);if(p===3||p===5||p===7||p===11||p===13||p===17||p===19||p===23||p===29||p===31||p===37||p===41||p===43||p===47||p===53){return true;}}if((((0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])&1)>>>0)===0){return false;}q=0;if(32===32){q=n.modW(3234846615);}else if(32===64){q=n.modW(820596253);}else{$panic(new $String("Unknown word size"));}if(((r=q%3,r===r?r:$throwRuntimeError("integer divide by zero"))===0)||((s=q%5,s===s?s:$throwRuntimeError("integer divide by zero"))===0)||((t=q%7,t===t?t:$throwRuntimeError("integer divide by zero"))===0)||((u=q%11,u===u?u:$throwRuntimeError("integer divide by zero"))===0)||((v=q%13,v===v?v:$throwRuntimeError("integer divide by zero"))===0)||((w=q%17,w===w?w:$throwRuntimeError("integer divide by zero"))===0)||((x=q%19,x===x?x:$throwRuntimeError("integer divide by zero"))===0)||((y=q%23,y===y?y:$throwRuntimeError("integer divide by zero"))===0)||((z=q%29,z===z?z:$throwRuntimeError("integer divide by zero"))===0)){return false;}aa=BV.nil.sub(n,BW);ab=aa.trailingZeroBits();ac=BV.nil.shr(aa,ab);ad=BV.nil.sub(aa,BX);af=F.New(F.NewSource((ae=(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]),new $Int64(0,ae.constructor===Number?ae:1))));ag=BV.nil;ah=BV.nil;ai=BV.nil;aj=ag;ak=ah;al=ai;am=ad.bitLen();an=0;case 1:if(!(an>0;$s=1;continue;}ap=1;while(true){if(!(ap>0;$s=1;continue s;}if(ak.cmp(BW)===0){return false;}ap=ap+(1)>>>0;}return false;$s=1;continue;case 2:return true;}return;}if($f===undefined){$f={$blk:BV.prototype.probablyPrime};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(BV).prototype.probablyPrime=function(m){return this.$get().probablyPrime(m);};BV.prototype.bytes=function(m){var $ptr,m,n,o,p,q,r,s,t;n=0;o=this;n=m.$length;p=o;q=0;while(true){if(!(q=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]);s=0;while(true){if(!(s<4)){break;}n=n-(1)>>0;((n<0||n>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]=(r<<24>>>24));r=(t=(8),t<32?(r>>>t):0)>>>0;s=s+(1)>>0;}q++;}while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n])===0))){break;}n=n+(1)>>0;}return n;};$ptrType(BV).prototype.bytes=function(m){return this.$get().bytes(m);};BV.prototype.setBytes=function(m){var $ptr,m,n,o,p,q,r,s,t,u;n=this;n=n.make((o=(((m.$length+4>>0)-1>>0))/4,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero")));p=0;q=0;r=0;s=m.$length;while(true){if(!(s>0)){break;}r=(r|(((t=q,t<32?(((u=s-1>>0,((u<0||u>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+u]))>>>0)<>>0)))>>>0;q=q+(8)>>>0;if(q===32){((p<0||p>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+p]=r);p=p+(1)>>0;q=0;r=0;}s=s-(1)>>0;}if(p=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+p]=r);}return n.norm();};$ptrType(BV).prototype.setBytes=function(m){return this.$get().setBytes(m);};CM=function(m){var $ptr,m,n,o,p,q,r,s,t;n=0;o=0;p=m;q=1;n=p;o=q;s=(r=4294967295/m,(r===r&&r!==1/0&&r!==-1/0)?r>>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(n<=s)){break;}n=(t=m,(((n>>>16<<16)*t>>>0)+(n<<16>>>16)*t)>>>0);o=o+(1)>>0;}return[n,o];};CN=function(m,n){var $ptr,m,n,o,p,q;o=0;o=1;while(true){if(!(n>0)){break;}if(!(((n&1)===0))){o=(p=m,(((o>>>16<<16)*p>>>0)+(o<<16>>>16)*p)>>>0);}m=(q=m,(((m>>>16<<16)*q>>>0)+(m<<16>>>16)*q)>>>0);n=(n>>$min((1),31))>>0;}return o;};BV.prototype.scan=function(m,n,o){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:p=BV.nil;q=0;r=0;s=$ifaceNil;t=this;u=(n===0)||!o&&2<=n&&n<=36||o&&((n===2)||(n===10)||(n===16));if(!u){$s=1;continue;}$s=2;continue;case 1:v=A.Sprintf("illegal number base %d",new DE([new $Int(n)]));$s=3;case 3:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}$panic(new $String(v));case 2:x=m.ReadByte();$s=4;case 4:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;y=w[0];s=w[1];if(!($interfaceIsEqual(s,$ifaceNil))){return[p,q,r,s];}q=n;if(n===0){$s=5;continue;}$s=6;continue;case 5:q=10;if(y===48){$s=7;continue;}$s=8;continue;case 7:r=1;aa=m.ReadByte();$s=9;case 9:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}z=aa;y=z[0];s=z[1];ab=s;if($interfaceIsEqual(ab,$ifaceNil)){$s=10;continue;}if($interfaceIsEqual(ab,C.EOF)){$s=11;continue;}$s=12;continue;case 10:if(!o){q=8;}ac=y;if(ac===120||ac===88){q=16;}else if(ac===98||ac===66){q=2;}ad=q;if(ad===16||ad===2){$s=14;continue;}if(ad===8){$s=15;continue;}$s=16;continue;case 14:r=0;af=m.ReadByte();$s=17;case 17:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ae=af;y=ae[0];s=ae[1];if(!($interfaceIsEqual(s,$ifaceNil))){$s=18;continue;}$s=19;continue;case 18:return[p,q,r,s];case 19:$s=16;continue;case 15:r=0;case 16:$s=13;continue;case 11:p=$subslice(t,0,0);s=$ifaceNil;return[p,q,r,s];case 12:return[p,q,r,s];case 13:case 8:case 6:t=$subslice(t,0,0);ag=(q>>>0);ah=CM(ag);ai=ah[0];aj=ah[1];ak=0;al=0;am=-1;case 20:if(o&&(y===46)){$s=22;continue;}$s=23;continue;case 22:o=false;am=r;ao=m.ReadByte();$s=24;case 24:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}an=ao;y=an[0];s=an[1];if(!($interfaceIsEqual(s,$ifaceNil))){$s=25;continue;}$s=26;continue;case 25:if($interfaceIsEqual(s,C.EOF)){s=$ifaceNil;$s=21;continue;}return[p,q,r,s];case 26:case 23:ap=0;if(48<=y&&y<=57){ap=((y-48<<24>>>24)>>>0);}else if(97<=y&&y<=122){ap=(((y-97<<24>>>24)+10<<24>>>24)>>>0);}else if(65<=y&&y<=90){ap=(((y-65<<24>>>24)+10<<24>>>24)>>>0);}else{ap=37;}if(ap>=ag){$s=27;continue;}$s=28;continue;case 27:aq=m.UnreadByte();$s=29;case 29:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}aq;$s=21;continue;case 28:r=r+(1)>>0;ak=((((ak>>>16<<16)*ag>>>0)+(ak<<16>>>16)*ag)>>>0)+ap>>>0;al=al+(1)>>0;if(al===aj){t=t.mulAddWW(t,ai,ak);ak=0;al=0;}as=m.ReadByte();$s=30;case 30:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}ar=as;y=ar[0];s=ar[1];if(!($interfaceIsEqual(s,$ifaceNil))){$s=31;continue;}$s=32;continue;case 31:if($interfaceIsEqual(s,C.EOF)){s=$ifaceNil;$s=21;continue;}return[p,q,r,s];case 32:$s=20;continue;case 21:if(r===0){if((n===0)&&(q===8)){r=1;q=10;}else if(!((n===0))||!((q===8))){s=G.New("syntax error scanning number");}return[p,q,r,s];}if(al>0){t=t.mulAddWW(t,CN(ag,al),ak);}p=t.norm();if(am>=0){r=am-r>>0;}return[p,q,r,s];}return;}if($f===undefined){$f={$blk:BV.prototype.scan};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(BV).prototype.scan=function(m,n,o){return this.$get().scan(m,n,o);};BV.prototype.decimalString=function(){var $ptr,m;m=this;return m.string("0123456789abcdefghijklmnopqrstuvwxyz".substring(0,10));};$ptrType(BV).prototype.decimalString=function(){return this.$get().decimalString();};BV.prototype.string=function(m){var $ptr,aa,ab,ac,ad,ae,af,ag,m,n,o,p,q,r,s,t,u,v,w,x,y,z;n=this;o=(m.length>>>0);if(o<2||o>256){$panic(new $String("invalid character set length"));}else if(n.$length===0){return $encodeRune(m.charCodeAt(0));}p=(n.bitLen()/B.Log2(o)>>0)+1>>0;q=$makeSlice(DD,p);if(o===((o&(-o>>>0))>>>0)){r=CK(o);t=((s=r,s<32?(1<>>0)-1>>>0;u=(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]);v=32;w=1;while(true){if(!(w=r)){break;}p=p-(1)>>0;((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p]=m.charCodeAt(((u&t)>>>0)));u=(x=(r),x<32?(u>>>x):0)>>>0;v=v-(r)>>>0;}if(v===0){u=((w<0||w>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+w]);v=32;}else{u=(u|(((y=v,y<32?(((w<0||w>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+w])<>>0)))>>>0;p=p-(1)>>0;((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p]=m.charCodeAt(((u&t)>>>0)));u=(z=((r-v>>>0)),z<32?(((w<0||w>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+w])>>>z):0)>>>0;v=32-((r-v>>>0))>>>0;}w=w+(1)>>0;}while(true){if(!(v>=0&&!((u===0)))){break;}p=p-(1)>>0;((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p]=m.charCodeAt(((u&t)>>>0)));u=(aa=(r),aa<32?(u>>>aa):0)>>>0;v=v-(r)>>>0;}}else{ab=CM(o);ac=ab[0];ad=ab[1];ae=CR(n.$length,o,ad,ac);af=BV.nil.set(n);af.convertWords(q,m,o,ad,ac,ae);p=0;ag=m.charCodeAt(0);while(true){if(!(((p<0||p>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p])===ag)){break;}p=p+(1)>>0;}}return $bytesToString($subslice(q,p));};$ptrType(BV).prototype.string=function(m){return this.$get().string(m);};BV.prototype.convertWords=function(m,n,o,p,q,r){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,m,n,o,p,q,r,s,t,u,v,w,x,y,z;s=this;if(!(r===DM.nil)){t=BV.nil;u=r.$length-1>>0;while(true){if(!(s.$length>CO)){break;}v=s.bitLen();w=v>>1>>0;while(true){if(!(u>0&&(x=u-1>>0,((x<0||x>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+x])).nbits>w)){break;}u=u-(1)>>0;}if(((u<0||u>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+u]).nbits>=v&&((u<0||u>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+u]).bbb.cmp(s)>=0){u=u-(1)>>0;if(u<0){$panic(new $String("internal inconsistency"));}}y=s.div(t,s,((u<0||u>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+u]).bbb);s=y[0];t=y[1];z=m.$length-((u<0||u>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+u]).ndigits>>0;t.convertWords($subslice(m,z),n,o,p,q,$subslice(r,0,u));m=$subslice(m,0,z);}}aa=m.$length;ab=0;if(o===10){while(true){if(!(s.$length>0)){break;}ac=s.divW(s,q);s=ac[0];ab=ac[1];ad=0;while(true){if(!(ad0)){break;}aa=aa-(1)>>0;af=(ae=ab/10,(ae===ae&&ae!==1/0&&ae!==-1/0)?ae>>>0:$throwRuntimeError("integer divide by zero"));((aa<0||aa>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+aa]=n.charCodeAt((((ab-(af<<3>>>0)>>>0)-af>>>0)-af>>>0)));ab=af;ad=ad+(1)>>0;}}}else{while(true){if(!(s.$length>0)){break;}ag=s.divW(s,q);s=ag[0];ab=ag[1];ah=0;while(true){if(!(ah0)){break;}aa=aa-(1)>>0;((aa<0||aa>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+aa]=n.charCodeAt((ai=ab%o,ai===ai?ai:$throwRuntimeError("integer divide by zero"))));ab=(aj=ab/(o),(aj===aj&&aj!==1/0&&aj!==-1/0)?aj>>>0:$throwRuntimeError("integer divide by zero"));ah=ah+(1)>>0;}}}ak=n.charCodeAt(0);while(true){if(!(aa>0)){break;}aa=aa-(1)>>0;((aa<0||aa>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+aa]=ak);}};$ptrType(BV).prototype.convertWords=function(m,n,o,p,q,r){return this.$get().convertWords(m,n,o,p,q,r);};BV.prototype.expWW=function(m,n){var $ptr,m,n,o;o=this;return o.expNN(BV.nil.setWord(m),BV.nil.setWord(n),BV.nil);};$ptrType(BV).prototype.expWW=function(m,n){return this.$get().expWW(m,n);};CR=function(m,n,o,p){var $ptr,m,n,o,p,q,r,s,t,u,v,w,x,y,z;if((CO===0)||m<=CO){return DM.nil;}q=1;r=CO;while(true){if(!(r<(m>>1>>0)&&q<64)){break;}q=q+(1)>>0;r=(s=(1),s<32?(r<>0;}t=DM.nil;if(n===10){CQ.Mutex.Lock();t=$subslice(new DM(CQ.table),0,q);}else{t=$makeSlice(DM,q);}if((u=q-1>>0,((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u])).ndigits===0){v=BV.nil;w=0;while(true){if(!(w=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).ndigits===0){if(w===0){(0>=t.$length?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]).bbb=BV.nil.expWW(p,(CO>>>0));(0>=t.$length?$throwRuntimeError("index out of range"):t.$array[t.$offset+0]).ndigits=o*CO>>0;}else{((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).bbb=BV.nil.mul((x=w-1>>0,((x<0||x>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+x])).bbb,(y=w-1>>0,((y<0||y>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+y])).bbb);((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).ndigits=2*(z=w-1>>0,((z<0||z>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+z])).ndigits>>0;}v=BV.nil.set(((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).bbb);while(true){if(!(R($subslice(new DG(v.$array),v.$offset,v.$offset+v.$length),$subslice(new DG(v.$array),v.$offset,v.$offset+v.$length),n,0)===0)){break;}((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).bbb=((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).bbb.set(v);((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).ndigits=((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).ndigits+(1)>>0;}((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).nbits=((w<0||w>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+w]).bbb.bitLen();}w=w+(1)>>0;}}if(n===10){CQ.Mutex.Unlock();}return t;};DH.methods=[{prop:"Sign",name:"Sign",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SetInt64",name:"SetInt64",pkg:"",typ:$funcType([$Int64],[DH],false)},{prop:"SetUint64",name:"SetUint64",pkg:"",typ:$funcType([$Uint64],[DH],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([DH],[DH],false)},{prop:"Bits",name:"Bits",pkg:"",typ:$funcType([],[DG],false)},{prop:"SetBits",name:"SetBits",pkg:"",typ:$funcType([DG],[DH],false)},{prop:"Abs",name:"Abs",pkg:"",typ:$funcType([DH],[DH],false)},{prop:"Neg",name:"Neg",pkg:"",typ:$funcType([DH],[DH],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Sub",name:"Sub",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Mul",name:"Mul",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"MulRange",name:"MulRange",pkg:"",typ:$funcType([$Int64,$Int64],[DH],false)},{prop:"Binomial",name:"Binomial",pkg:"",typ:$funcType([$Int64,$Int64],[DH],false)},{prop:"Quo",name:"Quo",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Rem",name:"Rem",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"QuoRem",name:"QuoRem",pkg:"",typ:$funcType([DH,DH,DH],[DH,DH],false)},{prop:"Div",name:"Div",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Mod",name:"Mod",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"DivMod",name:"DivMod",pkg:"",typ:$funcType([DH,DH,DH],[DH,DH],false)},{prop:"Cmp",name:"Cmp",pkg:"",typ:$funcType([DH],[$Int],false)},{prop:"Int64",name:"Int64",pkg:"",typ:$funcType([],[$Int64],false)},{prop:"Uint64",name:"Uint64",pkg:"",typ:$funcType([],[$Uint64],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String,$Int],[DH,$Bool],false)},{prop:"SetBytes",name:"SetBytes",pkg:"",typ:$funcType([DD],[DH],false)},{prop:"Bytes",name:"Bytes",pkg:"",typ:$funcType([],[DD],false)},{prop:"BitLen",name:"BitLen",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Exp",name:"Exp",pkg:"",typ:$funcType([DH,DH,DH],[DH],false)},{prop:"GCD",name:"GCD",pkg:"",typ:$funcType([DH,DH,DH,DH],[DH],false)},{prop:"binaryGCD",name:"binaryGCD",pkg:"math/big",typ:$funcType([DH,DH],[DH],false)},{prop:"ProbablyPrime",name:"ProbablyPrime",pkg:"",typ:$funcType([$Int],[$Bool],false)},{prop:"Rand",name:"Rand",pkg:"",typ:$funcType([DO,DH],[DH],false)},{prop:"ModInverse",name:"ModInverse",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"ModSqrt",name:"ModSqrt",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Lsh",name:"Lsh",pkg:"",typ:$funcType([DH,$Uint],[DH],false)},{prop:"Rsh",name:"Rsh",pkg:"",typ:$funcType([DH,$Uint],[DH],false)},{prop:"Bit",name:"Bit",pkg:"",typ:$funcType([$Int],[$Uint],false)},{prop:"SetBit",name:"SetBit",pkg:"",typ:$funcType([DH,$Int,$Uint],[DH],false)},{prop:"And",name:"And",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"AndNot",name:"AndNot",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Or",name:"Or",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Xor",name:"Xor",pkg:"",typ:$funcType([DH,DH],[DH],false)},{prop:"Not",name:"Not",pkg:"",typ:$funcType([DH],[DH],false)},{prop:"GobEncode",name:"GobEncode",pkg:"",typ:$funcType([],[DD,$error],false)},{prop:"GobDecode",name:"GobDecode",pkg:"",typ:$funcType([DD],[$error],false)},{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[DD,$error],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([DD],[$error],false)},{prop:"MarshalText",name:"MarshalText",pkg:"",typ:$funcType([],[DD,$error],false)},{prop:"UnmarshalText",name:"UnmarshalText",pkg:"",typ:$funcType([DD],[$error],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Format",name:"Format",pkg:"",typ:$funcType([A.State,$Int32],[],false)},{prop:"scan",name:"scan",pkg:"math/big",typ:$funcType([C.ByteScanner,$Int],[DH,$Int,$error],false)},{prop:"Scan",name:"Scan",pkg:"",typ:$funcType([A.ScanState,$Int32],[$error],false)}];BU.methods=[{prop:"ReadByte",name:"ReadByte",pkg:"",typ:$funcType([],[$Uint8,$error],false)},{prop:"UnreadByte",name:"UnreadByte",pkg:"",typ:$funcType([],[$error],false)}];BV.methods=[{prop:"clear",name:"clear",pkg:"math/big",typ:$funcType([],[],false)},{prop:"norm",name:"norm",pkg:"math/big",typ:$funcType([],[BV],false)},{prop:"make",name:"make",pkg:"math/big",typ:$funcType([$Int],[BV],false)},{prop:"setWord",name:"setWord",pkg:"math/big",typ:$funcType([W],[BV],false)},{prop:"setUint64",name:"setUint64",pkg:"math/big",typ:$funcType([$Uint64],[BV],false)},{prop:"set",name:"set",pkg:"math/big",typ:$funcType([BV],[BV],false)},{prop:"add",name:"add",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"sub",name:"sub",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"cmp",name:"cmp",pkg:"math/big",typ:$funcType([BV],[$Int],false)},{prop:"mulAddWW",name:"mulAddWW",pkg:"math/big",typ:$funcType([BV,W,W],[BV],false)},{prop:"montgomery",name:"montgomery",pkg:"math/big",typ:$funcType([BV,BV,BV,W,$Int],[BV],false)},{prop:"mul",name:"mul",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"mulRange",name:"mulRange",pkg:"math/big",typ:$funcType([$Uint64,$Uint64],[BV],false)},{prop:"divW",name:"divW",pkg:"math/big",typ:$funcType([BV,W],[BV,W],false)},{prop:"div",name:"div",pkg:"math/big",typ:$funcType([BV,BV,BV],[BV,BV],false)},{prop:"divLarge",name:"divLarge",pkg:"math/big",typ:$funcType([BV,BV,BV],[BV,BV],false)},{prop:"bitLen",name:"bitLen",pkg:"math/big",typ:$funcType([],[$Int],false)},{prop:"trailingZeroBits",name:"trailingZeroBits",pkg:"math/big",typ:$funcType([],[$Uint],false)},{prop:"shl",name:"shl",pkg:"math/big",typ:$funcType([BV,$Uint],[BV],false)},{prop:"shr",name:"shr",pkg:"math/big",typ:$funcType([BV,$Uint],[BV],false)},{prop:"setBit",name:"setBit",pkg:"math/big",typ:$funcType([BV,$Uint,$Uint],[BV],false)},{prop:"bit",name:"bit",pkg:"math/big",typ:$funcType([$Uint],[$Uint],false)},{prop:"sticky",name:"sticky",pkg:"math/big",typ:$funcType([$Uint],[$Uint],false)},{prop:"and",name:"and",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"andNot",name:"andNot",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"or",name:"or",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"xor",name:"xor",pkg:"math/big",typ:$funcType([BV,BV],[BV],false)},{prop:"modW",name:"modW",pkg:"math/big",typ:$funcType([W],[W],false)},{prop:"random",name:"random",pkg:"math/big",typ:$funcType([DO,BV,$Int],[BV],false)},{prop:"expNN",name:"expNN",pkg:"math/big",typ:$funcType([BV,BV,BV],[BV],false)},{prop:"expNNWindowed",name:"expNNWindowed",pkg:"math/big",typ:$funcType([BV,BV,BV],[BV],false)},{prop:"expNNMontgomery",name:"expNNMontgomery",pkg:"math/big",typ:$funcType([BV,BV,BV],[BV],false)},{prop:"probablyPrime",name:"probablyPrime",pkg:"math/big",typ:$funcType([$Int],[$Bool],false)},{prop:"bytes",name:"bytes",pkg:"math/big",typ:$funcType([DD],[$Int],false)},{prop:"setBytes",name:"setBytes",pkg:"math/big",typ:$funcType([DD],[BV],false)},{prop:"scan",name:"scan",pkg:"math/big",typ:$funcType([C.ByteScanner,$Int,$Bool],[BV,$Int,$Int,$error],false)},{prop:"decimalString",name:"decimalString",pkg:"math/big",typ:$funcType([],[$String],false)},{prop:"hexString",name:"hexString",pkg:"math/big",typ:$funcType([],[$String],false)},{prop:"string",name:"string",pkg:"math/big",typ:$funcType([$String],[$String],false)},{prop:"convertWords",name:"convertWords",pkg:"math/big",typ:$funcType([DD,$String,W,$Int,W,DM],[],false)},{prop:"expWW",name:"expWW",pkg:"math/big",typ:$funcType([W,W],[BV],false)}];BL.init([{prop:"neg",name:"neg",pkg:"math/big",typ:$Bool,tag:""},{prop:"abs",name:"abs",pkg:"math/big",typ:BV,tag:""}]);BU.init([{prop:"ScanState",name:"",pkg:"",typ:A.ScanState,tag:""}]);BV.init(W);CP.init([{prop:"bbb",name:"bbb",pkg:"math/big",typ:BV,tag:""},{prop:"nbits",name:"nbits",pkg:"math/big",typ:$Int,tag:""},{prop:"ndigits",name:"ndigits",pkg:"math/big",typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=I.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}CQ=new DC.ptr(new H.Mutex.ptr(false),DB.zero());BW=new BV([1]);BM=new BL.ptr(false,BW);BX=new BV([2]);CC=40;CI=new DD([0,1,28,2,29,14,24,3,30,22,20,15,25,17,4,8,31,27,13,23,21,19,16,7,26,12,18,6,11,5,10,9]);CJ=new DD([0,1,56,2,57,49,28,3,61,58,42,50,38,29,17,4,62,47,59,36,45,43,51,22,53,39,33,30,24,18,12,5,63,55,48,27,60,41,37,16,46,35,44,21,52,32,23,11,54,26,40,15,34,20,31,10,25,14,19,9,13,8,7,6]);CO=8;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["crypto/rand"]=(function(){var $pkg={},$init,A,B,C,D,F,L,N,I,E;A=$packages["errors"];B=$packages["github.com/gopherjs/gopherjs/js"];C=$packages["io"];D=$packages["math/big"];F=$pkg.rngReader=$newType(0,$kindStruct,"rand.rngReader","rngReader","crypto/rand",function(){this.$val=this;if(arguments.length===0){return;}});L=$sliceType($Uint8);N=$ptrType(F);E=function(){var $ptr;$pkg.Reader=new F.ptr();};F.ptr.prototype.Read=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o;b=0;c=$ifaceNil;d=this;e=a.$array;f=$parseInt(a.$offset)>>0;g=$global.crypto;if(g===undefined){g=$global.msCrypto;}if(!(g===undefined)){if(!(g.getRandomValues===undefined)){b=a.$length;if(b>65536){b=65536;}g.getRandomValues(e.subarray(f,f+b>>0));h=b;i=$ifaceNil;b=h;c=i;return[b,c];}}j=$global.require;if(!(j===undefined)){k=j($externalize("crypto",$String)).randomBytes;if(!(k===undefined)){e.set(k(a.$length),f);l=a.$length;m=$ifaceNil;b=l;c=m;return[b,c];}}n=0;o=A.New("crypto/rand not available in this environment");b=n;c=o;return[b,c];};F.prototype.Read=function(a){return this.$val.Read(a);};N.methods=[{prop:"Read",name:"Read",pkg:"",typ:$funcType([L],[$Int,$error],false)}];F.init([]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.Reader=$ifaceNil;I=new D.Int.ptr(false,D.nat.nil).SetUint64(new $Uint64(3793877372,820596253));E();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/dchest/uniuri"]=(function(){var $pkg={},$init,A,B,F,C,E;A=$packages["crypto/rand"];B=$packages["io"];F=$sliceType($Uint8);C=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=E(16,$pkg.StdChars);$s=1;case 1:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}return a;}return;}if($f===undefined){$f={$blk:C};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};$pkg.New=C;E=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$makeSlice(F,a);e=$makeSlice(F,(a+((d=a/4,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero")))>>0));f=b.$length;if(f>256){$panic(new $String("uniuri: maximum length of charset for NewLenChars is 256"));}h=256-((g=256%f,g===g?g:$throwRuntimeError("integer divide by zero")))>>0;i=0;case 1:k=B.ReadFull(A.Reader,e);$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[1];if(!($interfaceIsEqual(l,$ifaceNil))){$s=4;continue;}$s=5;continue;case 4:m=l.Error();$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}$panic(new $String("error reading from random source: "+m));case 5:n=e;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);q=(p>>0);if(q>h){o++;continue;}((i<0||i>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+i]=(r=(s=q%f,s===s?s:$throwRuntimeError("integer divide by zero")),((r<0||r>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+r])));i=i+(1)>>0;if(i===a){return $bytesToString(c);}o++;}$s=1;continue;case 2:$panic(new $String("unreachable"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:E};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};$pkg.NewLenChars=E;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.StdChars=new F($stringToBytes("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["bufio"]=(function(){var $pkg={},$init,A,B,C,D,H,I;A=$packages["bytes"];B=$packages["errors"];C=$packages["io"];D=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrInvalidUnreadByte=B.New("bufio: invalid use of UnreadByte");$pkg.ErrInvalidUnreadRune=B.New("bufio: invalid use of UnreadRune");$pkg.ErrBufferFull=B.New("bufio: buffer full");$pkg.ErrNegativeCount=B.New("bufio: negative count");H=B.New("bufio: reader returned negative count from Read");I=B.New("bufio: writer returned negative count from Write");$pkg.ErrTooLong=B.New("bufio.Scanner: token too long");$pkg.ErrNegativeAdvance=B.New("bufio.Scanner: SplitFunc returns negative advance count");$pkg.ErrAdvanceTooFar=B.New("bufio.Scanner: SplitFunc returns advance count beyond input");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["encoding/gob"]=(function(){var $pkg={},$init,F,C,D,H,G,E,A,I,B,J,K,L,CE,EX,FB,FN,FQ,FV,GO,GQ,GS,GU,GW,GX,HG,HH,HN,HO,HW,HX,HY,HZ,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ,IK,IL,IM,IN,IO,IP,IQ,IR,IS,IT,IU,IV,IW,IX,IY,IZ,JA,JB,JC,JD,JE,JF,JG,JH,JI,JJ,JK,JL,JM,JN,JO,JP,JQ,JR,JS,JT,JU,JV,KA,KO,KQ,KR,KS,LA,LB,AU,AV,AW,CC,CF,CK,EV,FC,FD,FF,FG,FH,FI,FJ,FK,FO,FP,FR,FS,FT,FW,FX,FY,FZ,GA,GB,GC,GD,GE,GF,GG,GH,GI,GJ,GK,GL,GM,HI,HP,HQ,HR,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,BH,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BX,CG,EY,EZ,FE,FL,FM,FU,GN,GP,GR,GT,GV,GY,GZ,HA,HB,HC,HD,HE,HF,HJ,HK,HL,HM,HS,HT,HU;F=$packages["bufio"];C=$packages["encoding"];D=$packages["errors"];H=$packages["fmt"];G=$packages["github.com/gopherjs/gopherjs/nosync"];E=$packages["io"];A=$packages["math"];I=$packages["os"];B=$packages["reflect"];J=$packages["sync/atomic"];K=$packages["unicode"];L=$packages["unicode/utf8"];CE=$pkg.emptyStruct=$newType(0,$kindStruct,"gob.emptyStruct","emptyStruct","encoding/gob",function(){this.$val=this;if(arguments.length===0){return;}});EX=$pkg.gobError=$newType(0,$kindStruct,"gob.gobError","gobError","encoding/gob",function(err_){this.$val=this;if(arguments.length===0){this.err=$ifaceNil;return;}this.err=err_;});FB=$pkg.userTypeInfo=$newType(0,$kindStruct,"gob.userTypeInfo","userTypeInfo","encoding/gob",function(user_,base_,indir_,externalEnc_,externalDec_,encIndir_,decIndir_){this.$val=this;if(arguments.length===0){this.user=$ifaceNil;this.base=$ifaceNil;this.indir=0;this.externalEnc=0;this.externalDec=0;this.encIndir=0;this.decIndir=0;return;}this.user=user_;this.base=base_;this.indir=indir_;this.externalEnc=externalEnc_;this.externalDec=externalDec_;this.encIndir=encIndir_;this.decIndir=decIndir_;});FN=$pkg.typeId=$newType(4,$kindInt32,"gob.typeId","typeId","encoding/gob",null);FQ=$pkg.gobType=$newType(8,$kindInterface,"gob.gobType","gobType","encoding/gob",null);FV=$pkg.CommonType=$newType(0,$kindStruct,"gob.CommonType","CommonType","encoding/gob",function(Name_,Id_){this.$val=this;if(arguments.length===0){this.Name="";this.Id=0;return;}this.Name=Name_;this.Id=Id_;});GO=$pkg.arrayType=$newType(0,$kindStruct,"gob.arrayType","arrayType","encoding/gob",function(CommonType_,Elem_,Len_){this.$val=this;if(arguments.length===0){this.CommonType=new FV.ptr("",0);this.Elem=0;this.Len=0;return;}this.CommonType=CommonType_;this.Elem=Elem_;this.Len=Len_;});GQ=$pkg.gobEncoderType=$newType(0,$kindStruct,"gob.gobEncoderType","gobEncoderType","encoding/gob",function(CommonType_){this.$val=this;if(arguments.length===0){this.CommonType=new FV.ptr("",0);return;}this.CommonType=CommonType_;});GS=$pkg.mapType=$newType(0,$kindStruct,"gob.mapType","mapType","encoding/gob",function(CommonType_,Key_,Elem_){this.$val=this;if(arguments.length===0){this.CommonType=new FV.ptr("",0);this.Key=0;this.Elem=0;return;}this.CommonType=CommonType_;this.Key=Key_;this.Elem=Elem_;});GU=$pkg.sliceType=$newType(0,$kindStruct,"gob.sliceType","sliceType","encoding/gob",function(CommonType_,Elem_){this.$val=this;if(arguments.length===0){this.CommonType=new FV.ptr("",0);this.Elem=0;return;}this.CommonType=CommonType_;this.Elem=Elem_;});GW=$pkg.fieldType=$newType(0,$kindStruct,"gob.fieldType","fieldType","encoding/gob",function(Name_,Id_){this.$val=this;if(arguments.length===0){this.Name="";this.Id=0;return;}this.Name=Name_;this.Id=Id_;});GX=$pkg.structType=$newType(0,$kindStruct,"gob.structType","structType","encoding/gob",function(CommonType_,Field_){this.$val=this;if(arguments.length===0){this.CommonType=new FV.ptr("",0);this.Field=KR.nil;return;}this.CommonType=CommonType_;this.Field=Field_;});HG=$pkg.wireType=$newType(0,$kindStruct,"gob.wireType","wireType","encoding/gob",function(ArrayT_,SliceT_,StructT_,MapT_,GobEncoderT_,BinaryMarshalerT_,TextMarshalerT_){this.$val=this;if(arguments.length===0){this.ArrayT=JA.nil;this.SliceT=JB.nil;this.StructT=JC.nil;this.MapT=JD.nil;this.GobEncoderT=JE.nil;this.BinaryMarshalerT=JE.nil;this.TextMarshalerT=JE.nil;return;}this.ArrayT=ArrayT_;this.SliceT=SliceT_;this.StructT=StructT_;this.MapT=MapT_;this.GobEncoderT=GobEncoderT_;this.BinaryMarshalerT=BinaryMarshalerT_;this.TextMarshalerT=TextMarshalerT_;});HH=$pkg.typeInfo=$newType(0,$kindStruct,"gob.typeInfo","typeInfo","encoding/gob",function(id_,encInit_,encoder_,wire_){this.$val=this;if(arguments.length===0){this.id=0;this.encInit=new G.Mutex.ptr(false);this.encoder=new J.Value.ptr($ifaceNil);this.wire=KA.nil;return;}this.id=id_;this.encInit=encInit_;this.encoder=encoder_;this.wire=wire_;});HN=$pkg.GobEncoder=$newType(8,$kindInterface,"gob.GobEncoder","GobEncoder","encoding/gob",null);HO=$pkg.GobDecoder=$newType(8,$kindInterface,"gob.GobDecoder","GobDecoder","encoding/gob",null);HW=$ptrType(FB);HX=$sliceType($Uint8);HY=$ptrType(HN);HZ=$ptrType(HO);IA=$ptrType(C.BinaryMarshaler);IB=$ptrType(C.BinaryUnmarshaler);IC=$ptrType(C.TextMarshaler);ID=$ptrType(C.TextUnmarshaler);IE=$ptrType($Bool);IF=$ptrType($Int);IG=$ptrType($Uint);IH=$ptrType($Float64);II=$ptrType(HX);IJ=$ptrType($String);IK=$ptrType($Complex128);IL=$ptrType($emptyInterface);IM=$structType([{prop:"r7",name:"r7",pkg:"encoding/gob",typ:$Int,tag:""}]);IN=$ptrType(IM);IO=$structType([{prop:"r6",name:"r6",pkg:"encoding/gob",typ:$Int,tag:""}]);IP=$ptrType(IO);IQ=$structType([{prop:"r5",name:"r5",pkg:"encoding/gob",typ:$Int,tag:""}]);IR=$ptrType(IQ);IS=$structType([{prop:"r4",name:"r4",pkg:"encoding/gob",typ:$Int,tag:""}]);IT=$ptrType(IS);IU=$structType([{prop:"r3",name:"r3",pkg:"encoding/gob",typ:$Int,tag:""}]);IV=$ptrType(IU);IW=$structType([{prop:"r2",name:"r2",pkg:"encoding/gob",typ:$Int,tag:""}]);IX=$ptrType(IW);IY=$structType([{prop:"r1",name:"r1",pkg:"encoding/gob",typ:$Int,tag:""}]);IZ=$ptrType(IY);JA=$ptrType(GO);JB=$ptrType(GU);JC=$ptrType(GX);JD=$ptrType(GS);JE=$ptrType(GQ);JF=$sliceType($Bool);JG=$sliceType($emptyInterface);JH=$sliceType($Complex64);JI=$sliceType($Complex128);JJ=$sliceType($Float32);JK=$sliceType($Float64);JL=$sliceType($Int);JM=$sliceType($Int16);JN=$sliceType($Int32);JO=$sliceType($Int64);JP=$sliceType($Int8);JQ=$sliceType($String);JR=$sliceType($Uint);JS=$sliceType($Uint16);JT=$sliceType($Uint32);JU=$sliceType($Uint64);JV=$sliceType($Uintptr);KA=$ptrType(HG);KO=$ptrType(HH);KQ=$ptrType(GW);KR=$sliceType(KQ);KS=$mapType(B.Type,KO);LA=$mapType(FN,$Bool);LB=$ptrType(FV);BH=function(y,z,aa){var $ptr,aa,ab,y,z;aa=aa;aa.SetBool(!((ab=z.decodeUint(),(ab.$high===0&&ab.$low===0))));};BI=function(y,z,aa){var $ptr,aa,ab,y,z;aa=aa;ab=z.decodeInt();if((ab.$high<-1||(ab.$high===-1&&ab.$low<4294967168))||(0>>0),new $Uint64(z.$high|ab.$high,(z.$low|ab.$low)>>>0));y=$shiftRightUint64(y,(8));aa=aa+(1)>>0;}return A.Float64frombits(z);};BR=function(y,z){var $ptr,aa,ab,y,z;aa=BQ(y);ab=aa;if(ab<0){ab=-ab;}if(3.4028234663852886e+38>0;$s=1;continue;case 2:ao=FL(z.user,FF);$s=14;case 14:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}an=ao;ap=an[0];aq=an[1];if(ap){$s=15;continue;}$s=16;continue;case 15:ar=1;as=aq;z.externalEnc=ar;z.encIndir=as;$s=17;continue;case 16:au=FL(z.user,FH);$s=18;case 18:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}at=au;av=at[0];aw=at[1];if(av){$s=19;continue;}$s=20;continue;case 19:ax=2;ay=aw;z.externalEnc=ax;z.encIndir=ay;case 20:case 17:ba=FL(z.user,FG);$s=21;case 21:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}az=ba;bb=az[0];bc=az[1];if(bb){$s=22;continue;}$s=23;continue;case 22:bd=1;be=bc;z.externalDec=bd;z.decIndir=be;$s=24;continue;case 23:bg=FL(z.user,FI);$s=25;case 25:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}bf=bg;bh=bf[0];bi=bf[1];if(bh){$s=26;continue;}$s=27;continue;case 26:bj=2;bk=bi;z.externalDec=bj;z.decIndir=bk;case 27:case 24:bl=y;(FD||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(bl)]={k:bl,v:z};return[z,aa];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[z,aa];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:FE};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.y=y;$f.z=z;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};FL=function(y,z){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aa=false;ab=0;if($interfaceIsEqual(y,$ifaceNil)){return[aa,ab];}ac=y;case 1:ad=ac.Implements(z);$s=5;case 5:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}if(ad){$s=3;continue;}$s=4;continue;case 3:ae=true;af=ab;aa=ae;ab=af;return[aa,ab];case 4:ag=ac;ah=ag.Kind();$s=8;case 8:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}if(ah===22){$s=6;continue;}$s=7;continue;case 6:ab=ab+(1)<<24>>24;if(ab>100){ai=false;aj=0;aa=ai;ab=aj;return[aa,ab];}ak=ag.Elem();$s=9;case 9:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}ac=ak;$s=1;continue;case 7:$s=2;continue;$s=1;continue;case 2:al=y.Kind();$s=12;case 12:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}if(!((al===22))){$s=10;continue;}$s=11;continue;case 10:am=B.PtrTo(y).Implements(z);$s=15;case 15:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}if(am){$s=13;continue;}$s=14;continue;case 13:an=true;ao=-1;aa=an;ab=ao;return[aa,ab];case 14:case 11:ap=false;aq=0;aa=ap;ab=aq;return[aa,ab];}return;}if($f===undefined){$f={$blk:FL};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};FM=function(y){var $ptr,aa,ab,ac,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aa=FE(y);$s=1;case 1:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}z=aa;ab=z[0];ac=z[1];if(!($interfaceIsEqual(ac,$ifaceNil))){EZ(ac);}return ab;}return;}if($f===undefined){$f={$blk:FM};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};FU=function(y){var $ptr,aa,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=y.id();$s=3;case 3:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}if(!((z===0))){$s=1;continue;}$s=2;continue;case 1:return;case 2:FO=FO+(1)>>0;$r=y.setId(FO);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}aa=FO;(FS||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(aa)]={k:aa,v:y};$s=-1;case-1:}return;}if($f===undefined){$f={$blk:FU};}$f.$ptr=$ptr;$f.aa=aa;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};FN.prototype.gobType=function(){var $ptr,y,z;y=this.$val;if(y===0){return $ifaceNil;}return(z=FS[FN.keyFor(y)],z!==undefined?z.v:$ifaceNil);};$ptrType(FN).prototype.gobType=function(){return new FN(this.$get()).gobType();};FN.prototype.string=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this.$val;if($interfaceIsEqual(new FN(y).gobType(),$ifaceNil)){return"";}z=new FN(y).gobType().string();$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:FN.prototype.string};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(FN).prototype.string=function(){return new FN(this.$get()).string();};FN.prototype.name=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this.$val;if($interfaceIsEqual(new FN(y).gobType(),$ifaceNil)){return"";}z=new FN(y).gobType().name();$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:FN.prototype.name};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(FN).prototype.name=function(){return new FN(this.$get()).name();};FV.ptr.prototype.id=function(){var $ptr,y;y=this;return y.Id;};FV.prototype.id=function(){return this.$val.id();};FV.ptr.prototype.setId=function(y){var $ptr,y,z;z=this;z.Id=y;};FV.prototype.setId=function(y){return this.$val.setId(y);};FV.ptr.prototype.string=function(){var $ptr,y;y=this;return y.Name;};FV.prototype.string=function(){return this.$val.string();};FV.ptr.prototype.safeString=function(y){var $ptr,y,z;z=this;return z.Name;};FV.prototype.safeString=function(y){return this.$val.safeString(y);};FV.ptr.prototype.name=function(){var $ptr,y;y=this;return y.Name;};FV.prototype.name=function(){return this.$val.name();};GN=function(){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=HE(16,GL);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}z=HM(B.TypeOf((y=new GO.ptr(new FV.ptr("",0),0,0),new y.constructor.elem(y))));$s=2;case 2:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}aa=z.id;$r=HE(17,aa);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ac=HM(B.TypeOf((ab=new FV.ptr("",0),new ab.constructor.elem(ab))));$s=4;case 4:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac.id;$r=HE(18,ad);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}af=HM(B.TypeOf((ae=new GU.ptr(new FV.ptr("",0),0),new ae.constructor.elem(ae))));$s=6;case 6:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=af.id;$r=HE(19,ag);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ai=HM(B.TypeOf((ah=new GX.ptr(new FV.ptr("",0),KR.nil),new ah.constructor.elem(ah))));$s=8;case 8:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=ai.id;$r=HE(20,aj);$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}al=HM(B.TypeOf((ak=new GW.ptr("",0),new ak.constructor.elem(ak))));$s=10;case 10:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al.id;$r=HE(21,am);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ao=HM(B.TypeOf((an=new GS.ptr(new FV.ptr("",0),0,0),new an.constructor.elem(an))));$s=12;case 12:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}ap=ao.id;$r=HE(23,ap);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}FT={};aq=FS;ar=0;as=$keys(aq);while(true){if(!(ar64){$s=14;continue;}$s=15;continue;case 14:ax=H.Sprintln(new JG([new $String("nextId too large:"),new FN(FO)]));$s=16;case 16:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}$panic(new $String(ax));case 15:FO=64;$r=HU();$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ay=FM(B.TypeOf(KA.nil));$s=18;case 18:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}GM=ay;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:GN};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GP=function(y){var $ptr,y,z;z=new GO.ptr(new FV.ptr(y,0),0,0);return z;};GO.ptr.prototype.init=function(y,z){var $ptr,aa,ab,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aa=this;$r=FU(aa);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ab=y.id();$s=2;case 2:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa.Elem=ab;aa.Len=z;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:GO.ptr.prototype.init};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GO.prototype.init=function(y,z){return this.$val.init(y,z);};GO.ptr.prototype.safeString=function(y){var $ptr,aa,ab,ac,ad,ae,af,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=this;if((aa=y[FN.keyFor(z.CommonType.Id)],aa!==undefined?aa.v:false)){return z.CommonType.Name;}ab=z.CommonType.Id;(y||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(ab)]={k:ab,v:true};ac=new $Int(z.Len);ad=new FN(z.Elem).gobType().safeString(y);$s=1;case 1:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ae=new $String(ad);af=H.Sprintf("[%d]%s",new JG([ac,ae]));$s=2;case 2:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}return af;}return;}if($f===undefined){$f={$blk:GO.ptr.prototype.safeString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GO.prototype.safeString=function(y){return this.$val.safeString(y);};GO.ptr.prototype.string=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this;z=y.safeString({});$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GO.ptr.prototype.string};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GO.prototype.string=function(){return this.$val.string();};GR=function(y){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=new GQ.ptr(new FV.ptr(y,0));$r=FU(z);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GR};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GQ.ptr.prototype.safeString=function(y){var $ptr,y,z;z=this;return z.CommonType.Name;};GQ.prototype.safeString=function(y){return this.$val.safeString(y);};GQ.ptr.prototype.string=function(){var $ptr,y;y=this;return y.CommonType.Name;};GQ.prototype.string=function(){return this.$val.string();};GT=function(y){var $ptr,y,z;z=new GS.ptr(new FV.ptr(y,0),0,0);return z;};GS.ptr.prototype.init=function(y,z){var $ptr,aa,ab,ac,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aa=this;$r=FU(aa);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}ab=y.id();$s=2;case 2:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa.Key=ab;ac=z.id();$s=3;case 3:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}aa.Elem=ac;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:GS.ptr.prototype.init};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GS.prototype.init=function(y,z){return this.$val.init(y,z);};GS.ptr.prototype.safeString=function(y){var $ptr,aa,ab,ac,ad,ae,af,ag,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=this;if((aa=y[FN.keyFor(z.CommonType.Id)],aa!==undefined?aa.v:false)){return z.CommonType.Name;}ab=z.CommonType.Id;(y||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(ab)]={k:ab,v:true};ac=new FN(z.Key).gobType().safeString(y);$s=1;case 1:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac;ae=new FN(z.Elem).gobType().safeString(y);$s=2;case 2:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}af=ae;ag=H.Sprintf("map[%s]%s",new JG([new $String(ad),new $String(af)]));$s=3;case 3:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}return ag;}return;}if($f===undefined){$f={$blk:GS.ptr.prototype.safeString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GS.prototype.safeString=function(y){return this.$val.safeString(y);};GS.ptr.prototype.string=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this;z=y.safeString({});$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GS.ptr.prototype.string};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GS.prototype.string=function(){return this.$val.string();};GV=function(y){var $ptr,y,z;z=new GU.ptr(new FV.ptr(y,0),0);return z;};GU.ptr.prototype.init=function(y){var $ptr,aa,ab,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=this;$r=FU(z);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}aa=y.id();$s=4;case 4:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}if(aa===0){$s=2;continue;}$s=3;continue;case 2:$r=FU(y);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:ab=y.id();$s=6;case 6:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}z.Elem=ab;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:GU.ptr.prototype.init};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GU.prototype.init=function(y){return this.$val.init(y);};GU.ptr.prototype.safeString=function(y){var $ptr,aa,ab,ac,ad,ae,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=this;if((aa=y[FN.keyFor(z.CommonType.Id)],aa!==undefined?aa.v:false)){return z.CommonType.Name;}ab=z.CommonType.Id;(y||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(ab)]={k:ab,v:true};ac=new FN(z.Elem).gobType().safeString(y);$s=1;case 1:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=new $String(ac);ae=H.Sprintf("[]%s",new JG([ad]));$s=2;case 2:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}return ae;}return;}if($f===undefined){$f={$blk:GU.ptr.prototype.safeString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GU.prototype.safeString=function(y){return this.$val.safeString(y);};GU.ptr.prototype.string=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this;z=y.safeString({});$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GU.ptr.prototype.string};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GU.prototype.string=function(){return this.$val.string();};GX.ptr.prototype.safeString=function(y){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=this;if(z===JC.nil){return"";}aa=(ab=y[FN.keyFor(z.CommonType.Id)],ab!==undefined?[ab.v,true]:[false,false]);ac=aa[1];if(ac){return z.CommonType.Name;}ad=z.CommonType.Id;(y||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(ad)]={k:ad,v:true};ae=z.CommonType.Name+" = struct { ";af=z.Field;ag=0;case 1:if(!(ag=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]);ai=new $String(ah.Name);aj=new FN(ah.Id).gobType().safeString(y);$s=3;case 3:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=new $String(aj);al=H.Sprintf("%s %s; ",new JG([ai,ak]));$s=4;case 4:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}ae=ae+(al);ag++;$s=1;continue;case 2:ae=ae+("}");return ae;}return;}if($f===undefined){$f={$blk:GX.ptr.prototype.safeString};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GX.prototype.safeString=function(y){return this.$val.safeString(y);};GX.ptr.prototype.string=function(){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:y=this;z=y.safeString({});$s=1;case 1:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GX.ptr.prototype.string};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GX.prototype.string=function(){return this.$val.string();};GY=function(y){var $ptr,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=new GX.ptr(new FV.ptr(y,0),KR.nil);$r=FU(z);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return z;}return;}if($f===undefined){$f={$blk:GY};}$f.$ptr=$ptr;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};GZ=function(y,z,aa){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,bq,br,bs,bt,bu,bv,bw,bx,by,bz,ca,cb,cc,cd,ce,cf,cg,ch,ci,cj,ck,cl,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;bm=$f.bm;bn=$f.bn;bo=$f.bo;bp=$f.bp;bq=$f.bq;br=$f.br;bs=$f.bs;bt=$f.bt;bu=$f.bu;bv=$f.bv;bw=$f.bw;bx=$f.bx;by=$f.by;bz=$f.bz;ca=$f.ca;cb=$f.cb;cc=$f.cc;cd=$f.cd;ce=$f.ce;cf=$f.cf;cg=$f.cg;ch=$f.ch;ci=$f.ci;cj=$f.cj;ck=$f.ck;cl=$f.cl;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);aa=[aa];ab=[ab];if(!((z.externalEnc===0))){$s=1;continue;}$s=2;continue;case 1:ac=GR(y);$s=3;case 3:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}return[ac,$ifaceNil];case 2:ab[0]=$ifaceNil;ad=$ifaceNil;ae=$ifaceNil;af=ad;ag=ae;$deferred.push([(function(aa,ab){return function(){var $ptr;if(!($interfaceIsEqual(ab[0],$ifaceNil))){delete FR[B.Type.keyFor(aa[0])];}};})(aa,ab),[]]);ah=aa[0];aj=ah.Kind();$s=4;case 4:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ai=aj;if(ai===1){$s=5;continue;}if(ai===2||ai===3||ai===4||ai===5||ai===6){$s=6;continue;}if(ai===7||ai===8||ai===9||ai===10||ai===11||ai===12){$s=7;continue;}if(ai===13||ai===14){$s=8;continue;}if(ai===15||ai===16){$s=9;continue;}if(ai===24){$s=10;continue;}if(ai===20){$s=11;continue;}if(ai===17){$s=12;continue;}if(ai===21){$s=13;continue;}if(ai===23){$s=14;continue;}if(ai===25){$s=15;continue;}$s=16;continue;case 5:return[new FN(FW).gobType(),$ifaceNil];case 6:return[new FN(FX).gobType(),$ifaceNil];case 7:return[new FN(FY).gobType(),$ifaceNil];case 8:return[new FN(FZ).gobType(),$ifaceNil];case 9:return[new FN(GC).gobType(),$ifaceNil];case 10:return[new FN(GB).gobType(),$ifaceNil];case 11:return[new FN(GD).gobType(),$ifaceNil];case 12:ak=GP(y);al=aa[0];(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(al)]={k:al,v:ak};an=ah.Elem();$s=18;case 18:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ao=an;ap=HC("",ao);$s=19;case 19:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}am=ap;af=am[0];ab[0]=am[1];if(!($interfaceIsEqual(ab[0],$ifaceNil))){return[$ifaceNil,ab[0]];}aq=af;ar=ah.Len();$s=20;case 20:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}as=ar;$r=ak.init(aq,as);$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[ak,$ifaceNil];case 13:at=GT(y);au=aa[0];(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(au)]={k:au,v:at};aw=ah.Key();$s=22;case 22:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}ax=aw;ay=HC("",ax);$s=23;case 23:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}av=ay;af=av[0];ab[0]=av[1];if(!($interfaceIsEqual(ab[0],$ifaceNil))){return[$ifaceNil,ab[0]];}ba=ah.Elem();$s=24;case 24:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;bc=HC("",bb);$s=25;case 25:if($c){$c=false;bc=bc.$blk();}if(bc&&bc.$blk!==undefined){break s;}az=bc;ag=az[0];ab[0]=az[1];if(!($interfaceIsEqual(ab[0],$ifaceNil))){return[$ifaceNil,ab[0]];}$r=at.init(af,ag);$s=26;case 26:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[at,$ifaceNil];case 14:bd=ah.Elem();$s=29;case 29:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=bd.Kind();$s=30;case 30:if($c){$c=false;be=be.$blk();}if(be&&be.$blk!==undefined){break s;}if(be===8){$s=27;continue;}$s=28;continue;case 27:return[new FN(GA).gobType(),$ifaceNil];case 28:bf=GV(y);bg=aa[0];(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(bg)]={k:bg,v:bf};bi=ah.Elem();$s=31;case 31:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}bj=bi.Name();$s=32;case 32:if($c){$c=false;bj=bj.$blk();}if(bj&&bj.$blk!==undefined){break s;}bk=bj;bl=ah.Elem();$s=33;case 33:if($c){$c=false;bl=bl.$blk();}if(bl&&bl.$blk!==undefined){break s;}bm=bl;bn=HC(bk,bm);$s=34;case 34:if($c){$c=false;bn=bn.$blk();}if(bn&&bn.$blk!==undefined){break s;}bh=bn;af=bh[0];ab[0]=bh[1];if(!($interfaceIsEqual(ab[0],$ifaceNil))){return[$ifaceNil,ab[0]];}$r=bf.init(af);$s=35;case 35:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[bf,$ifaceNil];case 15:bo=GY(y);$s=36;case 36:if($c){$c=false;bo=bo.$blk();}if(bo&&bo.$blk!==undefined){break s;}bp=bo;bq=aa[0];(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(bq)]={k:bq,v:bp};br=bp.CommonType.id();(FS||$throwRuntimeError("assignment to entry in nil map"))[FN.keyFor(br)]={k:br,v:bp};bs=0;case 37:bt=ah.NumField();$s=39;case 39:if($c){$c=false;bt=bt.$blk();}if(bt&&bt.$blk!==undefined){break s;}if(!(bs>0;$s=37;continue;case 42:bx=FM(bu[0].Type);$s=44;case 44:if($c){$c=false;bx=bx.$blk();}if(bx&&bx.$blk!==undefined){break s;}by=bx.base;bz=by.Name();$s=45;case 45:if($c){$c=false;bz=bz.$blk();}if(bz&&bz.$blk!==undefined){break s;}ca=bz;if(ca===""){$s=46;continue;}$s=47;continue;case 46:cb=FM(bu[0].Type);$s=48;case 48:if($c){$c=false;cb=cb.$blk();}if(cb&&cb.$blk!==undefined){break s;}cc=cb.base;cd=cc.String();$s=49;case 49:if($c){$c=false;cd=cd.$blk();}if(cd&&cd.$blk!==undefined){break s;}ca=cd;case 47:cf=HC(ca,bu[0].Type);$s=50;case 50:if($c){$c=false;cf=cf.$blk();}if(cf&&cf.$blk!==undefined){break s;}ce=cf;cg=ce[0];ch=ce[1];if(!($interfaceIsEqual(ch,$ifaceNil))){return[$ifaceNil,ch];}ci=cg.id();$s=53;case 53:if($c){$c=false;ci=ci.$blk();}if(ci&&ci.$blk!==undefined){break s;}if(ci===0){$s=51;continue;}$s=52;continue;case 51:$r=FU(cg);$s=54;case 54:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 52:cj=cg.id();$s=55;case 55:if($c){$c=false;cj=cj.$blk();}if(cj&&cj.$blk!==undefined){break s;}bp.Field=$append(bp.Field,new GW.ptr(bu[0].Name,cj));bs=bs+(1)>>0;$s=37;continue;case 38:return[bp,$ifaceNil];case 16:ck=aa[0].String();$s=56;case 56:if($c){$c=false;ck=ck.$blk();}if(ck&&ck.$blk!==undefined){break s;}cl=D.New("gob NewTypeObject can't handle type: "+ck);$s=57;case 57:if($c){$c=false;cl=cl.$blk();}if(cl&&cl.$blk!==undefined){break s;}return[$ifaceNil,cl];case 17:$s=-1;case-1:}return;}}catch(err){$err=err;$s=-1;return[$ifaceNil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:GZ};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.bm=bm;$f.bn=bn;$f.bo=bo;$f.bp=bp;$f.bq=bq;$f.br=br;$f.bs=bs;$f.bt=bt;$f.bu=bu;$f.bv=bv;$f.bw=bw;$f.bx=bx;$f.by=by;$f.bz=bz;$f.ca=ca;$f.cb=cb;$f.cc=cc;$f.cd=cd;$f.ce=ce;$f.cf=cf;$f.cg=cg;$f.ch=ch;$f.ci=ci;$f.cj=cj;$f.ck=ck;$f.cl=cl;$f.y=y;$f.z=z;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};HA=function(y){var $ptr,aa,y,z;z=L.DecodeRuneInString(y);aa=z[0];return K.IsUpper(aa);};HB=function(y){var $ptr,aa,ab,ac,ad,ae,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(!HA(y.Name)){return false;}z=y.Type;case 1:aa=z.Kind();$s=3;case 3:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}if(!(aa===22)){$s=2;continue;}ab=z.Elem();$s=4;case 4:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}z=ab;$s=1;continue;case 2:ad=z.Kind();$s=8;case 8:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}if(ad===18){ac=true;$s=7;continue s;}ae=z.Kind();$s=9;case 9:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}ac=ae===19;case 7:if(ac){$s=5;continue;}$s=6;continue;case 5:return false;case 6:return true;}return;}if($f===undefined){$f={$blk:HB};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HC=function(y,z){var $ptr,aa,ab,ac,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:aa=FM(z);$s=1;case 1:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}ab=aa;ac=HD(y,ab,ab.base);$s=2;case 2:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}return ac;}return;}if($f===undefined){$f={$blk:HC};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HD=function(y,z,aa){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ab=(ac=FR[B.Type.keyFor(aa)],ac!==undefined?[ac.v,true]:[$ifaceNil,false]);ad=ab[0];ae=ab[1];if(ae){return[ad,$ifaceNil];}ag=GZ(y,z,aa);$s=1;case 1:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}af=ag;ad=af[0];ah=af[1];if($interfaceIsEqual(ah,$ifaceNil)){ai=aa;(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(ai)]={k:ai,v:ad};}return[ad,ah];}return;}if($f===undefined){$f={$blk:HD};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HE=function(y,z){var $ptr,aa,ab,ac,ad,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(!((y===z))){$s=1;continue;}$s=2;continue;case 1:aa=H.Fprintf(I.Stderr,"checkId: %d should be %d\n",new JG([new $Int((z>>0)),new $Int((y>>0))]));$s=3;case 3:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}aa;ab=new FN(z).name();$s=4;case 4:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=new FN(z).string();$s=5;case 5:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=new FN(y).string();$s=6;case 6:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}$panic(new $String("bootstrap type wrong id: "+ab+" "+ac+" not "+ad));case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:HE};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HF=function(y,z,aa){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:ab=B.TypeOf(z).Elem();$s=1;case 1:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;ad=(ae=FR[B.Type.keyFor(ac)],ae!==undefined?[ae.v,true]:[$ifaceNil,false]);af=ad[1];if(af){$s=2;continue;}$s=3;continue;case 2:ag=ac.String();$s=4;case 4:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}$panic(new $String("bootstrap type already present: "+y+", "+ag));case 3:ah=new FV.ptr(y,0);ai=ac;(FR||$throwRuntimeError("assignment to entry in nil map"))[B.Type.keyFor(ai)]={k:ai,v:ah};$r=FU(ah);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=HE(aa,FO);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}aj=FM(ac);$s=7;case 7:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}aj;return FO;}return;}if($f===undefined){$f={$blk:HF};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HG.ptr.prototype.string=function(){var $ptr,y;y=this;if(y===KA.nil){return"unknown type";}if(!(y.ArrayT===JA.nil)){return y.ArrayT.CommonType.Name;}else if(!(y.SliceT===JB.nil)){return y.SliceT.CommonType.Name;}else if(!(y.StructT===JC.nil)){return y.StructT.CommonType.Name;}else if(!(y.MapT===JD.nil)){return y.MapT.CommonType.Name;}else if(!(y.GobEncoderT===JE.nil)){return y.GobEncoderT.CommonType.Name;}else if(!(y.BinaryMarshalerT===JE.nil)){return y.BinaryMarshalerT.CommonType.Name;}else if(!(y.TextMarshalerT===JE.nil)){return y.TextMarshalerT.CommonType.Name;}return"unknown type";};HG.prototype.string=function(){return this.$val.string();};HJ=function(y){var $ptr,aa,ab,y,z;z=$assertType(HI.Load(),KS,true);aa=z[0];return(ab=aa[B.Type.keyFor(y)],ab!==undefined?ab.v:KO.nil);};HK=function(y){var $ptr,aa,ab,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:z=y.base;if(!((y.externalEnc===0))){z=y.user;}aa=HJ(z);if(!(aa===KO.nil)){return[aa,$ifaceNil];}ab=HL(y,z);$s=1;case 1:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}return ab;}return;}if($f===undefined){$f={$blk:HK};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};HL=function(y,z){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);FP.Lock();$deferred.push([$methodVal(FP,"Unlock"),[]]);aa=HJ(z);if(!(aa===KO.nil)){return[aa,$ifaceNil];}ac=z.Name();$s=1;case 1:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=HC(ac,z);$s=2;case 2:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ab=ad;ae=ab[0];af=ab[1];if(!($interfaceIsEqual(af,$ifaceNil))){return[KO.nil,af];}ag=ae.id();$s=3;case 3:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ah=new HH.ptr(ag,new G.Mutex.ptr(false),new J.Value.ptr($ifaceNil),KA.nil);if(!((y.externalEnc===0))){$s=4;continue;}$s=5;continue;case 4:aj=z.Name();$s=7;case 7:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ak=HD(aj,y,z);$s=8;case 8:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}ai=ak;al=ai[0];am=ai[1];if(!($interfaceIsEqual(am,$ifaceNil))){return[KO.nil,am];}an=al.id();$s=9;case 9:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ao=new FN(an).gobType();$s=10;case 10:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}ap=$assertType(ao,JE);aq=y.externalEnc;if(aq===1){ah.wire=new HG.ptr(JA.nil,JB.nil,JC.nil,JD.nil,ap,JE.nil,JE.nil);}else if(aq===2){ah.wire=new HG.ptr(JA.nil,JB.nil,JC.nil,JD.nil,JE.nil,ap,JE.nil);}else if(aq===3){ah.wire=new HG.ptr(JA.nil,JB.nil,JC.nil,JD.nil,JE.nil,JE.nil,ap);}z=y.user;$s=6;continue;case 5:ar=new FN(ah.id).gobType();as=z;au=as.Kind();$s=11;case 11:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}at=au;if(at===17){$s=12;continue;}if(at===21){$s=13;continue;}if(at===23){$s=14;continue;}if(at===25){$s=15;continue;}$s=16;continue;case 12:ah.wire=new HG.ptr($assertType(ar,JA),JB.nil,JC.nil,JD.nil,JE.nil,JE.nil,JE.nil);$s=16;continue;case 13:ah.wire=new HG.ptr(JA.nil,JB.nil,JC.nil,$assertType(ar,JD),JE.nil,JE.nil,JE.nil);$s=16;continue;case 14:av=as.Elem();$s=19;case 19:if($c){$c=false;av=av.$blk();}if(av&&av.$blk!==undefined){break s;}aw=av.Kind();$s=20;case 20:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}if(!((aw===8))){$s=17;continue;}$s=18;continue;case 17:ah.wire=new HG.ptr(JA.nil,$assertType(ar,JB),JC.nil,JD.nil,JE.nil,JE.nil,JE.nil);case 18:$s=16;continue;case 15:ah.wire=new HG.ptr(JA.nil,JB.nil,$assertType(ar,JC),JD.nil,JE.nil,JE.nil,JE.nil);case 16:case 6:ax={};ay=$assertType(HI.Load(),KS,true);az=ay[0];ba=az;bb=0;bc=$keys(ba);while(true){if(!(bb=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);g=a(f);$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(g){$s=3;continue;}$s=4;continue;case 3:c=$append(c,f);case 4:e++;$s=1;continue;case 2:return c;}return;}if($f===undefined){$f={$blk:K.ptr.prototype.Filter};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.Filter=function(a){return this.$val.Filter(a);};E=function(a){var $ptr,a;return(function $b(b){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=a(b);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!c;}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;});};F=function(a){var $ptr,a;return(function(b){var $ptr,b;return b.id===a;});};G=function(a){var $ptr,a;return E(F(a));};H.ptr.prototype.Toggle=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;a.completed=!a.completed;$r=a.list.changed();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H.ptr.prototype.Toggle};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.Toggle=function(){return this.$val.Toggle();};H.ptr.prototype.Remove=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;$r=a.list.DeleteById(a.id);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H.ptr.prototype.Remove};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.Remove=function(){return this.$val.Remove();};H.ptr.prototype.Completed=function(){var $ptr,a;a=this;return a.completed;};H.prototype.Completed=function(){return this.$val.Completed();};H.ptr.prototype.Remaining=function(){var $ptr,a;a=this;return!a.completed;};H.prototype.Remaining=function(){return this.$val.Remaining();};H.ptr.prototype.SetCompleted=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;b.completed=a;$r=b.list.changed();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H.ptr.prototype.SetCompleted};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.SetCompleted=function(a){return this.$val.SetCompleted(a);};H.ptr.prototype.Title=function(){var $ptr,a;a=this;return a.title;};H.prototype.Title=function(){return this.$val.Title();};H.ptr.prototype.SetTitle=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;b.title=a;$r=b.list.changed();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H.ptr.prototype.SetTitle};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.SetTitle=function(a){return this.$val.SetTitle(a);};H.ptr.prototype.Id=function(){var $ptr,a;a=this;return a.id;};H.prototype.Id=function(){return this.$val.Id();};H.ptr.prototype.MarshalJSON=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=$clone(this,H);c=A.Marshal((b=new I.ptr(a.id,a.completed,a.title),new b.constructor.elem(b)));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:H.ptr.prototype.MarshalJSON};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.MarshalJSON=function(){return this.$val.MarshalJSON();};H.ptr.prototype.UnmarshalJSON=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=[b];c=this;b[0]=new I.ptr("",false,"");d=A.Unmarshal(a,b[0]);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(!($interfaceIsEqual(e,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:return e;case 3:c.id=b[0].Id;c.completed=b[0].Completed;c.title=b[0].Title;return $ifaceNil;}return;}if($f===undefined){$f={$blk:H.ptr.prototype.UnmarshalJSON};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};H.prototype.UnmarshalJSON=function(a){return this.$val.UnmarshalJSON(a);};K.ptr.prototype.OnChange=function(a){var $ptr,a,b;b=this;b.changeListeners=$append(b.changeListeners,a);};K.prototype.OnChange=function(a){return this.$val.OnChange(a);};K.ptr.prototype.changed=function(){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.changeListeners;c=0;case 1:if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);$r=d();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c++;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.changed};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.changed=function(){return this.$val.changed();};K.ptr.prototype.Load=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=J.Find("todos",(a.$ptr_todos||(a.$ptr_todos=new O(function(){return this.$target.todos;},function($v){this.$target.todos=$v;},a))));$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(c,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:d=$assertType(c,C.ItemNotFoundError,true);e=d[1];if(e){$s=4;continue;}$s=5;continue;case 4:f=a.Save();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 5:return c;case 3:g=a.todos;h=0;while(true){if(!(h=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])).list=a;h++;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:K.ptr.prototype.Load};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.Load=function(){return this.$val.Load();};K.ptr.prototype.Save=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=$clone(this,K);b=J.Save("todos",a.todos);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;if(!($interfaceIsEqual(c,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:return c;case 3:return $ifaceNil;}return;}if($f===undefined){$f={$blk:K.ptr.prototype.Save};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.Save=function(){return this.$val.Save();};K.ptr.prototype.AddTodo=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=B.New();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b.todos=$append(b.todos,new H.ptr(c,false,a,b));$r=b.changed();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.AddTodo};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.AddTodo=function(a){return this.$val.AddTodo(a);};K.ptr.prototype.ClearCompleted=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Remaining();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}a.todos=b;$r=a.changed();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.ClearCompleted};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.ClearCompleted=function(){return this.$val.ClearCompleted();};K.ptr.prototype.CheckAll=function(){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.todos;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);d.completed=true;c++;}$r=a.changed();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.CheckAll};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.CheckAll=function(){return this.$val.CheckAll();};K.ptr.prototype.UncheckAll=function(){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.todos;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);d.completed=false;c++;}$r=a.changed();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.UncheckAll};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.UncheckAll=function(){return this.$val.UncheckAll();};K.ptr.prototype.DeleteById=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.Filter(G(a));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b.todos=c;$r=b.changed();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:K.ptr.prototype.DeleteById};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.DeleteById=function(a){return this.$val.DeleteById(a);};H.methods=[{prop:"MarshalJSON",name:"MarshalJSON",pkg:"",typ:$funcType([],[Q,$error],false)}];L.methods=[{prop:"Toggle",name:"Toggle",pkg:"",typ:$funcType([],[],false)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([],[],false)},{prop:"Completed",name:"Completed",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Remaining",name:"Remaining",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCompleted",name:"SetCompleted",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"Title",name:"Title",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetTitle",name:"SetTitle",pkg:"",typ:$funcType([$String],[],false)},{prop:"Id",name:"Id",pkg:"",typ:$funcType([],[$String],false)},{prop:"UnmarshalJSON",name:"UnmarshalJSON",pkg:"",typ:$funcType([Q],[$error],false)}];K.methods=[{prop:"All",name:"All",pkg:"",typ:$funcType([],[N],false)},{prop:"Completed",name:"Completed",pkg:"",typ:$funcType([],[N],false)},{prop:"Remaining",name:"Remaining",pkg:"",typ:$funcType([],[N],false)},{prop:"Filter",name:"Filter",pkg:"",typ:$funcType([D],[N],false)},{prop:"Save",name:"Save",pkg:"",typ:$funcType([],[$error],false)}];P.methods=[{prop:"OnChange",name:"OnChange",pkg:"",typ:$funcType([R],[],false)},{prop:"changed",name:"changed",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:$funcType([],[],false)},{prop:"Load",name:"Load",pkg:"",typ:$funcType([],[$error],false)},{prop:"AddTodo",name:"AddTodo",pkg:"",typ:$funcType([$String],[],false)},{prop:"ClearCompleted",name:"ClearCompleted",pkg:"",typ:$funcType([],[],false)},{prop:"CheckAll",name:"CheckAll",pkg:"",typ:$funcType([],[],false)},{prop:"UncheckAll",name:"UncheckAll",pkg:"",typ:$funcType([],[],false)},{prop:"DeleteById",name:"DeleteById",pkg:"",typ:$funcType([$String],[],false)}];D.init([L],[$Bool],false);H.init([{prop:"id",name:"id",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:$String,tag:""},{prop:"completed",name:"completed",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:$Bool,tag:""},{prop:"title",name:"title",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:$String,tag:""},{prop:"list",name:"list",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:P,tag:""}]);I.init([{prop:"Id",name:"Id",pkg:"",typ:$String,tag:""},{prop:"Completed",name:"Completed",pkg:"",typ:$Bool,tag:""},{prop:"Title",name:"Title",pkg:"",typ:$String,tag:""}]);K.init([{prop:"todos",name:"todos",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:N,tag:""},{prop:"changeListeners",name:"changeListeners",pkg:"github.com/go-humble/examples/todomvc/go/models",typ:S,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.Predicates=new M.ptr((function(a){var $ptr,a;return true;}),$methodExpr(L,"Completed"),$methodExpr(L,"Remaining"));J=C.NewDataStore(C.JSONEncoding);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["log"]=(function(){var $pkg={},$init,A,E,B,C,D,F,G,Z,AA,AB,AC,AD,I,H,J,K,P,Q,R,S,T,U,V,W,X;A=$packages["fmt"];E=$packages["github.com/gopherjs/gopherjs/nosync"];B=$packages["io"];C=$packages["os"];D=$packages["runtime"];F=$packages["time"];G=$pkg.Logger=$newType(0,$kindStruct,"log.Logger","Logger","log",function(mu_,prefix_,flag_,out_,buf_){this.$val=this;if(arguments.length===0){this.mu=new E.Mutex.ptr(false);this.prefix="";this.flag=0;this.out=$ifaceNil;this.buf=Z.nil;return;}this.mu=mu_;this.prefix=prefix_;this.flag=flag_;this.out=out_;this.buf=buf_;});Z=$sliceType($Uint8);AA=$arrayType($Uint8,20);AB=$ptrType(Z);AC=$sliceType($emptyInterface);AD=$ptrType(G);H=function(a,b,c){var $ptr,a,b,c;return new G.ptr(new E.Mutex.ptr(false),b,c,a,Z.nil);};$pkg.New=H;G.ptr.prototype.SetOutput=function(a){var $ptr,a,b,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);b=this;b.mu.Lock();$deferred.push([$methodVal(b.mu,"Unlock"),[]]);b.out=a;}catch(err){$err=err;}finally{$callDeferred($deferred,$err);}};G.prototype.SetOutput=function(a){return this.$val.SetOutput(a);};J=function(a,b,c){var $ptr,a,b,c,d,e,f,g;d=AA.zero();e=19;while(true){if(!(b>=10||c>1)){break;}c=c-(1)>>0;g=(f=b/10,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero"));((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=(((48+b>>0)-(g*10>>0)>>0)<<24>>>24));e=e-(1)>>0;b=g;}((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]=((48+b>>0)<<24>>>24));a.$set($appendSlice(a.$get(),$subslice(new Z(d),e)));};G.ptr.prototype.formatHeader=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(b,F.Time);e=this;a.$set($appendSlice(a.$get(),e.prefix));if(!(((e.flag&32)===0))){F.Time.copy(b,b.UTC());}if(!(((e.flag&7)===0))){$s=1;continue;}$s=2;continue;case 1:if(!(((e.flag&1)===0))){$s=3;continue;}$s=4;continue;case 3:g=b.Date();$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];j=f[2];J(a,h,4);a.$set($append(a.$get(),47));J(a,(i>>0),2);a.$set($append(a.$get(),47));J(a,j,2);a.$set($append(a.$get(),32));case 4:if(!(((e.flag&6)===0))){$s=6;continue;}$s=7;continue;case 6:l=b.Clock();$s=8;case 8:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[0];n=k[1];o=k[2];J(a,m,2);a.$set($append(a.$get(),58));J(a,n,2);a.$set($append(a.$get(),58));J(a,o,2);if(!(((e.flag&4)===0))){a.$set($append(a.$get(),46));J(a,(p=b.Nanosecond()/1000,(p===p&&p!==1/0&&p!==-1/0)?p>>0:$throwRuntimeError("integer divide by zero")),6);}a.$set($append(a.$get(),32));case 7:case 2:if(!(((e.flag&24)===0))){if(!(((e.flag&16)===0))){q=c;r=c.length-1>>0;while(true){if(!(r>0)){break;}if(c.charCodeAt(r)===47){q=c.substring((r+1>>0));break;}r=r-(1)>>0;}c=q;}a.$set($appendSlice(a.$get(),c));a.$set($append(a.$get(),58));J(a,d,-1);a.$set($appendSlice(a.$get(),": "));}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.formatHeader};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.formatHeader=function(a,b,c,d){return this.$val.formatHeader(a,b,c,d);};G.ptr.prototype.Output=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);c=this;d=$clone(F.Now(),F.Time);e="";f=0;c.mu.Lock();$deferred.push([$methodVal(c.mu,"Unlock"),[]]);if(!(((c.flag&24)===0))){c.mu.Unlock();g=false;h=D.Caller(a);e=h[1];f=h[2];g=h[3];if(!g){e="???";f=0;}c.mu.Lock();}c.buf=$subslice(c.buf,0,0);$r=c.formatHeader((c.$ptr_buf||(c.$ptr_buf=new AB(function(){return this.$target.buf;},function($v){this.$target.buf=$v;},c))),d,e,f);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c.buf=$appendSlice(c.buf,b);if((b.length===0)||!((b.charCodeAt((b.length-1>>0))===10))){c.buf=$append(c.buf,10);}j=c.out.Write(c.buf);$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[1];return k;}return;}}catch(err){$err=err;$s=-1;return $ifaceNil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:G.ptr.prototype.Output};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};G.prototype.Output=function(a,b){return this.$val.Output(a,b);};G.ptr.prototype.Printf=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=c.Output(2,e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Printf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Printf=function(a,b){return this.$val.Printf(a,b);};G.ptr.prototype.Print=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Print};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Print=function(a){return this.$val.Print(a);};G.ptr.prototype.Println=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprintln(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Println};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Println=function(a){return this.$val.Println(a);};G.ptr.prototype.Fatal=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Fatal};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Fatal=function(a){return this.$val.Fatal(a);};G.ptr.prototype.Fatalf=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=c.Output(2,e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Fatalf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Fatalf=function(a,b){return this.$val.Fatalf(a,b);};G.ptr.prototype.Fatalln=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprintln(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Fatalln};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Fatalln=function(a){return this.$val.Fatalln(a);};G.ptr.prototype.Panic=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$panic(new $String(d));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Panic};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Panic=function(a){return this.$val.Panic(a);};G.ptr.prototype.Panicf=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=c.Output(2,e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}f;$panic(new $String(e));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Panicf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Panicf=function(a,b){return this.$val.Panicf(a,b);};G.ptr.prototype.Panicln=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=A.Sprintln(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=b.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$panic(new $String(d));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:G.ptr.prototype.Panicln};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};G.prototype.Panicln=function(a){return this.$val.Panicln(a);};G.ptr.prototype.Flags=function(){var $ptr,a,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);a=this;a.mu.Lock();$deferred.push([$methodVal(a.mu,"Unlock"),[]]);return a.flag;}catch(err){$err=err;return 0;}finally{$callDeferred($deferred,$err);}};G.prototype.Flags=function(){return this.$val.Flags();};G.ptr.prototype.SetFlags=function(a){var $ptr,a,b,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);b=this;b.mu.Lock();$deferred.push([$methodVal(b.mu,"Unlock"),[]]);b.flag=a;}catch(err){$err=err;}finally{$callDeferred($deferred,$err);}};G.prototype.SetFlags=function(a){return this.$val.SetFlags(a);};G.ptr.prototype.Prefix=function(){var $ptr,a,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);a=this;a.mu.Lock();$deferred.push([$methodVal(a.mu,"Unlock"),[]]);return a.prefix;}catch(err){$err=err;return"";}finally{$callDeferred($deferred,$err);}};G.prototype.Prefix=function(){return this.$val.Prefix();};G.ptr.prototype.SetPrefix=function(a){var $ptr,a,b,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);b=this;b.mu.Lock();$deferred.push([$methodVal(b.mu,"Unlock"),[]]);b.prefix=a;}catch(err){$err=err;}finally{$callDeferred($deferred,$err);}};G.prototype.SetPrefix=function(a){return this.$val.SetPrefix(a);};K=function(a){var $ptr,a,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);I.mu.Lock();$deferred.push([$methodVal(I.mu,"Unlock"),[]]);I.out=a;}catch(err){$err=err;}finally{$callDeferred($deferred,$err);}};$pkg.SetOutput=K;P=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprint(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Print=P;Q=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=I.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:Q};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Printf=Q;R=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprintln(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:R};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Println=R;S=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprint(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:S};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fatal=S;T=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=I.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:T};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fatalf=T;U=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprintln(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;C.Exit(1);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:U};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Fatalln=U;V=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprint(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$panic(new $String(c));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:V};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Panic=V;W=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=I.Output(2,d);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}e;$panic(new $String(d));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:W};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Panicf=W;X=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=A.Sprintln(a);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=I.Output(2,c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;$panic(new $String(c));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:X};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Panicln=X;AD.methods=[{prop:"SetOutput",name:"SetOutput",pkg:"",typ:$funcType([B.Writer],[],false)},{prop:"formatHeader",name:"formatHeader",pkg:"log",typ:$funcType([AB,F.Time,$String,$Int],[],false)},{prop:"Output",name:"Output",pkg:"",typ:$funcType([$Int,$String],[$error],false)},{prop:"Printf",name:"Printf",pkg:"",typ:$funcType([$String,AC],[],true)},{prop:"Print",name:"Print",pkg:"",typ:$funcType([AC],[],true)},{prop:"Println",name:"Println",pkg:"",typ:$funcType([AC],[],true)},{prop:"Fatal",name:"Fatal",pkg:"",typ:$funcType([AC],[],true)},{prop:"Fatalf",name:"Fatalf",pkg:"",typ:$funcType([$String,AC],[],true)},{prop:"Fatalln",name:"Fatalln",pkg:"",typ:$funcType([AC],[],true)},{prop:"Panic",name:"Panic",pkg:"",typ:$funcType([AC],[],true)},{prop:"Panicf",name:"Panicf",pkg:"",typ:$funcType([$String,AC],[],true)},{prop:"Panicln",name:"Panicln",pkg:"",typ:$funcType([AC],[],true)},{prop:"Flags",name:"Flags",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SetFlags",name:"SetFlags",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Prefix",name:"Prefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetPrefix",name:"SetPrefix",pkg:"",typ:$funcType([$String],[],false)}];G.init([{prop:"mu",name:"mu",pkg:"log",typ:E.Mutex,tag:""},{prop:"prefix",name:"prefix",pkg:"log",typ:$String,tag:""},{prop:"flag",name:"flag",pkg:"log",typ:$Int,tag:""},{prop:"out",name:"out",pkg:"log",typ:B.Writer,tag:""},{prop:"buf",name:"buf",pkg:"log",typ:Z,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}I=H(C.Stderr,"",3);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/wsxiaoys/terminal/color"]=(function(){var $pkg={},$init,A,B,C,D,E,T,U,F,G,H,I,J,Q;A=$packages["bytes"];B=$packages["errors"];C=$packages["fmt"];D=$packages["io"];E=$packages["log"];T=$sliceType($emptyInterface);U=$ptrType(T);G=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=0;c=39;d=49;e=a;f=0;case 1:if(!(f>0))],j!==undefined?[j.v,true]:[0,false]);k=i[0];l=i[1];if(!l){$s=3;continue;}if(0<=k&&k<=8){$s=4;continue;}if(30<=k&&k<=37){$s=5;continue;}if(40<=k&&k<=47){$s=6;continue;}$s=7;continue;case 3:$r=E.Printf("Wrong color syntax: %c",new T([new $Int32(h)]));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=7;continue;case 4:b=k;$s=7;continue;case 5:c=k;$s=7;continue;case 6:d=k;case 7:f+=g[1];$s=1;continue;case 2:m=C.Sprintf("\x1B[%d;%d;%dm",new T([new $Int(b),new $Int(c),new $Int(d)]));$s=9;case 9:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}return m;}return;}if($f===undefined){$f={$blk:G};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Colorize=G;H=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=a.ReadRune();d=c[0];e=c[2];if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:$r=E.Print(new T([new $String("Parse failed on color syntax")]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 2:f=d;if(f===123){$s=4;continue;}if(f===64){$s=5;continue;}$s=6;continue;case 4:g=A.NewBufferString("");case 8:h=a.ReadRune();i=h[0];j=h[2];if(!($interfaceIsEqual(j,$ifaceNil))){$s=10;continue;}$s=11;continue;case 10:$r=E.Print(new T([new $String("Parse failed on color syntax")]));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=9;continue;case 11:if(i===125){$s=9;continue;}g.WriteRune(i);$s=8;continue;case 9:k=G(g.String());$s=13;case 13:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=b.WriteString(k);$s=14;case 14:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;$s=7;continue;case 5:b.WriteRune(64);$s=7;continue;case 6:m=G($encodeRune(d));$s=15;case 15:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=b.WriteString(m);$s=16;case 16:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;case 7:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:H};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};I=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(a===""){return"";}b=A.NewBufferString(a);c=A.NewBufferString("");case 1:d=b.ReadRune();e=d[0];f=d[2];if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}g=e;if(g===64){$s=3;continue;}$s=4;continue;case 3:$r=H(b,c);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 4:c.WriteRune(e);case 5:$s=1;continue;case 2:return c.String();}return;}if($f===undefined){$f={$blk:I};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};J=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=a.$get();c=0;case 1:if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);f=$assertType(e,$String,true);g=f[0];h=f[1];if(h){$s=3;continue;}$s=4;continue;case 3:i=I(g);$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}(j=a.$get(),((d<0||d>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+d]=new $String(i)));case 4:c++;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};Q=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];a[0]=$append(a[0],new $String("\x1B[0m"));$r=J((a.$ptr||(a.$ptr=new U(function(){return this.$target[0];},function($v){this.$target[0]=$v;},a))));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}b=C.Sprint(a[0]);$s=2;case 2:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:Q};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Sprint=Q;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}F=$makeMap($Int.keyFor,[{k:124,v:0},{k:33,v:1},{k:46,v:2},{k:47,v:3},{k:95,v:4},{k:94,v:5},{k:38,v:6},{k:63,v:7},{k:45,v:8},{k:107,v:30},{k:114,v:31},{k:103,v:32},{k:121,v:33},{k:98,v:34},{k:109,v:35},{k:99,v:36},{k:119,v:37},{k:100,v:39},{k:75,v:40},{k:82,v:41},{k:71,v:42},{k:89,v:43},{k:66,v:44},{k:77,v:45},{k:67,v:46},{k:87,v:47},{k:68,v:49}]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/albrow/prtty"]=(function(){var $pkg={},$init,A,B,C,D,E,F,G,J,K,L,H,I;A=$packages["fmt"];B=$packages["github.com/wsxiaoys/terminal/color"];C=$packages["io"];D=$packages["log"];E=$packages["os"];F=$pkg.Logger=$newType(0,$kindStruct,"prtty.Logger","Logger","github.com/albrow/prtty",function(Output_,Color_){this.$val=this;if(arguments.length===0){this.Output=$ifaceNil;this.Color="";return;}this.Output=Output_;this.Color=Color_;});G=$pkg.LoggerGroup=$newType(12,$kindSlice,"prtty.LoggerGroup","LoggerGroup","github.com/albrow/prtty",null);J=$ptrType(F);K=$sliceType(J);L=$sliceType($emptyInterface);H=function(){var $ptr;$pkg.DefaultLoggers=new G([$pkg.Default,$pkg.Info,$pkg.Warn,$pkg.Success,$pkg.Error]);$pkg.AllLoggers=$appendSlice(new G([]),$subslice(new K($pkg.DefaultLoggers.$array),$pkg.DefaultLoggers.$offset,$pkg.DefaultLoggers.$offset+$pkg.DefaultLoggers.$length));};I=function(a,b){var $ptr,a,b,c;c=new F.ptr(a,b);$pkg.AllLoggers=$append($pkg.AllLoggers,c);return c;};$pkg.NewLogger=I;G.prototype.SetOutput=function(a){var $ptr,a,b,c,d,e;b=this;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);e.Output=a;d++;}};$ptrType(G).prototype.SetOutput=function(a){return this.$get().SetOutput(a);};G.prototype.SetColor=function(a){var $ptr,a,b,c,d,e;b=this;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);e.Color=a;d++;}};$ptrType(G).prototype.SetColor=function(a){return this.$get().SetColor(a);};F.ptr.prototype.Print=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Print(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Print};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Print=function(a){return this.$val.Print(a);};F.ptr.prototype.Println=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Println(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Println};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Println=function(a){return this.$val.Println(a);};F.ptr.prototype.Printf=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;D.SetOutput(c.Output);d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=B.Sprint(new L([new $String(c.Color+d)]));$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$r=D.Printf(e,new L([]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Printf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Printf=function(a,b){return this.$val.Printf(a,b);};F.ptr.prototype.Panic=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Panic(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Panic};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Panic=function(a){return this.$val.Panic(a);};F.ptr.prototype.Panicln=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Panicln(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Panicln};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Panicln=function(a){return this.$val.Panicln(a);};F.ptr.prototype.Panicf=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;D.SetOutput(c.Output);d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=B.Sprint(new L([new $String(c.Color+d)]));$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$r=D.Panicf(e,new L([]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Panicf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Panicf=function(a,b){return this.$val.Panicf(a,b);};F.ptr.prototype.Fatal=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Fatal(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Fatal};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Fatal=function(a){return this.$val.Fatal(a);};F.ptr.prototype.Fatalln=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;D.SetOutput(b.Output);c=A.Sprint(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=B.Sprint(new L([new $String(b.Color+c)]));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=D.Fatalln(new L([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Fatalln};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Fatalln=function(a){return this.$val.Fatalln(a);};F.ptr.prototype.Fatalf=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;D.SetOutput(c.Output);d=A.Sprintf(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=B.Sprint(new L([new $String(c.Color+d)]));$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}$r=D.Fatalf(e,new L([]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:F.ptr.prototype.Fatalf};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};F.prototype.Fatalf=function(a,b){return this.$val.Fatalf(a,b);};J.methods=[{prop:"Print",name:"Print",pkg:"",typ:$funcType([L],[],true)},{prop:"Println",name:"Println",pkg:"",typ:$funcType([L],[],true)},{prop:"Printf",name:"Printf",pkg:"",typ:$funcType([$String,L],[],true)},{prop:"Panic",name:"Panic",pkg:"",typ:$funcType([L],[],true)},{prop:"Panicln",name:"Panicln",pkg:"",typ:$funcType([L],[],true)},{prop:"Panicf",name:"Panicf",pkg:"",typ:$funcType([$String,L],[],true)},{prop:"Fatal",name:"Fatal",pkg:"",typ:$funcType([L],[],true)},{prop:"Fatalln",name:"Fatalln",pkg:"",typ:$funcType([L],[],true)},{prop:"Fatalf",name:"Fatalf",pkg:"",typ:$funcType([$String,L],[],true)}];G.methods=[{prop:"SetOutput",name:"SetOutput",pkg:"",typ:$funcType([C.Writer],[],false)},{prop:"SetColor",name:"SetColor",pkg:"",typ:$funcType([$String],[],false)}];F.init([{prop:"Output",name:"Output",pkg:"",typ:C.Writer,tag:""},{prop:"Color",name:"Color",pkg:"",typ:$String,tag:""}]);G.init(J);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.DefaultLoggers=G.nil;$pkg.AllLoggers=G.nil;$pkg.Default=I(E.Stdout,"@w");$pkg.Info=I(E.Stdout,"@c");$pkg.Warn=I(E.Stdout,"@y");$pkg.Success=I(E.Stdout,"@g");$pkg.Error=I(E.Stderr,"@r");H();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["compress/flate"]=(function(){var $pkg={},$init,E,A,B,C,D,F,Y,Z,BN,BW,BX,BY,CC,AF,AG,AW,AC,AD,AE,AX,AY;E=$packages["bufio"];A=$packages["fmt"];B=$packages["io"];C=$packages["math"];D=$packages["sort"];F=$packages["strconv"];Y=$pkg.huffmanEncoder=$newType(0,$kindStruct,"flate.huffmanEncoder","huffmanEncoder","compress/flate",function(codeBits_,code_){this.$val=this;if(arguments.length===0){this.codeBits=BN.nil;this.code=BY.nil;return;}this.codeBits=codeBits_;this.code=code_;});Z=$pkg.literalNode=$newType(0,$kindStruct,"flate.literalNode","literalNode","compress/flate",function(literal_,freq_){this.$val=this;if(arguments.length===0){this.literal=0;this.freq=0;return;}this.literal=literal_;this.freq=freq_;});BN=$sliceType($Uint8);BW=$sliceType($Int32);BX=$ptrType(Y);BY=$sliceType($Uint16);CC=$sliceType(Z);AC=function(a){var $ptr,a;return new Y.ptr($makeSlice(BN,a),$makeSlice(BY,a));};AD=function(){var $ptr,a,b,c,d,e,f;a=AC(286);b=a.codeBits;c=a.code;d=0;d=0;while(true){if(!(d<286)){break;}e=0;f=0;switch(0){default:if(d<144){e=d+48<<16>>>16;f=8;break;}else if(d<256){e=(d+400<<16>>>16)-144<<16>>>16;f=9;break;}else if(d<280){e=d-256<<16>>>16;f=7;break;}else{e=(d+192<<16>>>16)-280<<16>>>16;f=8;}}((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=f);((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=AY(e,f));d=d+(1)<<16>>>16;}return a;};AE=function(){var $ptr,a,b,c,d;a=AC(30);b=a.codeBits;c=a.code;d=0;while(true){if(!(d<30)){break;}((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]=5);((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=AY(d,5));d=d+(1)<<16>>>16;}return a;};AX=function(a){var $ptr,a,b,c;return(((b=a>>>8<<16>>>16,((b<0||b>=AW.length)?$throwRuntimeError("index out of range"):AW[b]))<<16>>>16)|(((c=(a&255)>>>0,((c<0||c>=AW.length)?$throwRuntimeError("index out of range"):AW[c]))<<16>>>16)<<8<<16>>>16))>>>0;};AY=function(a,b){var $ptr,a,b,c;return AX((c=(16-b<<24>>>24),c<32?(a<>>16);};BX.methods=[{prop:"bitLength",name:"bitLength",pkg:"compress/flate",typ:$funcType([BW],[$Int64],false)},{prop:"bitCounts",name:"bitCounts",pkg:"compress/flate",typ:$funcType([CC,$Int32],[BW],false)},{prop:"assignEncodingAndSize",name:"assignEncodingAndSize",pkg:"compress/flate",typ:$funcType([BW,CC],[],false)},{prop:"generate",name:"generate",pkg:"compress/flate",typ:$funcType([BW,$Int32],[],false)}];Y.init([{prop:"codeBits",name:"codeBits",pkg:"compress/flate",typ:BN,tag:""},{prop:"code",name:"code",pkg:"compress/flate",typ:BY,tag:""}]);Z.init([{prop:"literal",name:"literal",pkg:"compress/flate",typ:$Uint16,tag:""},{prop:"freq",name:"freq",pkg:"compress/flate",typ:$Int32,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}AW=$toNativeArray($kindUint8,[0,128,64,192,32,160,96,224,16,144,80,208,48,176,112,240,8,136,72,200,40,168,104,232,24,152,88,216,56,184,120,248,4,132,68,196,36,164,100,228,20,148,84,212,52,180,116,244,12,140,76,204,44,172,108,236,28,156,92,220,60,188,124,252,2,130,66,194,34,162,98,226,18,146,82,210,50,178,114,242,10,138,74,202,42,170,106,234,26,154,90,218,58,186,122,250,6,134,70,198,38,166,102,230,22,150,86,214,54,182,118,246,14,142,78,206,46,174,110,238,30,158,94,222,62,190,126,254,1,129,65,193,33,161,97,225,17,145,81,209,49,177,113,241,9,137,73,201,41,169,105,233,25,153,89,217,57,185,121,249,5,133,69,197,37,165,101,229,21,149,85,213,53,181,117,245,13,141,77,205,45,173,109,237,29,157,93,221,61,189,125,253,3,131,67,195,35,163,99,227,19,147,83,211,51,179,115,243,11,139,75,203,43,171,107,235,27,155,91,219,59,187,123,251,7,135,71,199,39,167,103,231,23,151,87,215,55,183,119,247,15,143,79,207,47,175,111,239,31,159,95,223,63,191,127,255]);AF=AD();AG=AE();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["hash"]=(function(){var $pkg={},$init,A;A=$packages["io"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["hash/crc32"]=(function(){var $pkg={},$init,A,B,X,K;A=$packages["hash"];B=$packages["sync"];X=$arrayType($Uint32,256);K=function(a){var $ptr,a,b,c,d,e,f;b=X.zero();c=0;while(true){if(!(c<256)){break;}d=(c>>>0);e=0;while(true){if(!(e<8)){break;}if(((d&1)>>>0)===1){d=(((d>>>1>>>0))^a)>>>0;}else{d=(f=(1),f<32?(d>>>f):0)>>>0;}e=e+(1)>>0;}b.nilCheck,((c<0||c>=b.length)?$throwRuntimeError("index out of range"):b[c]=d);c=c+(1)>>0;}return b;};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.IEEETable=K(3988292384);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["compress/gzip"]=(function(){var $pkg={},$init,A,B,C,H,D,E,F,G;A=$packages["bufio"];B=$packages["compress/flate"];C=$packages["errors"];H=$packages["fmt"];D=$packages["hash"];E=$packages["hash/crc32"];F=$packages["io"];G=$packages["time"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrChecksum=C.New("gzip: invalid checksum");$pkg.ErrHeader=C.New("gzip: invalid header");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["path/filepath"]=(function(){var $pkg={},$init,G,A,B,C,D,E,F,O,AQ,AR,AU,AB,H,I,J,K,L,M,N,P,R,T,U,AC,AD,AE,AF,AH,AJ,AN;G=$packages["bytes"];A=$packages["errors"];B=$packages["os"];C=$packages["runtime"];D=$packages["sort"];E=$packages["strings"];F=$packages["unicode/utf8"];O=$pkg.lazybuf=$newType(0,$kindStruct,"filepath.lazybuf","lazybuf","path/filepath",function(path_,buf_,w_,volAndPath_,volLen_){this.$val=this;if(arguments.length===0){this.path="";this.buf=AR.nil;this.w=0;this.volAndPath="";this.volLen=0;return;}this.path=path_;this.buf=buf_;this.w=w_;this.volAndPath=volAndPath_;this.volLen=volLen_;});AQ=$sliceType($String);AR=$sliceType($Uint8);AU=$ptrType(O);H=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=false;d=$ifaceNil;Pattern:while(true){if(!(a.length>0)){break;}e=false;f="";g=I(a);e=g[0];f=g[1];a=g[2];if(e&&f===""){h=E.Index(b,"/")<0;i=$ifaceNil;c=h;d=i;return[c,d];}j=J(f,b);k=j[0];l=j[1];m=j[2];if(l&&((k.length===0)||a.length>0)){b=k;continue;}if(!($interfaceIsEqual(m,$ifaceNil))){n=false;o=m;c=n;d=o;return[c,d];}if(e){p=0;while(true){if(!(p>0)));r=q[0];s=q[1];t=q[2];if(s){if((a.length===0)&&r.length>0){p=p+(1)>>0;continue;}b=r;continue Pattern;}if(!($interfaceIsEqual(t,$ifaceNil))){u=false;v=t;c=u;d=v;return[c,d];}p=p+(1)>>0;}}w=false;x=$ifaceNil;c=w;d=x;return[c,d];}y=b.length===0;z=$ifaceNil;c=y;d=z;return[c,d];};$pkg.Match=H;I=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=false;c="";d="";while(true){if(!(a.length>0&&(a.charCodeAt(0)===42))){break;}a=a.substring(1);b=true;}e=false;f=0;f=0;Scan:while(true){if(!(f>0)>0;}}else if(g===91){e=true;}else if(g===93){e=false;}else if(g===42){if(!e){break Scan;}}f=f+(1)>>0;}h=b;i=a.substring(0,f);j=a.substring(f);b=h;c=i;d=j;return[b,c,d];};J=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c="";d=false;e=$ifaceNil;while(true){if(!(a.length>0)){break;}if(b.length===0){return[c,d,e];}f=a.charCodeAt(0);if(f===91){g=F.DecodeRuneInString(b);h=g[0];i=g[1];b=b.substring(i);a=a.substring(1);if(a.length===0){e=$pkg.ErrBadPattern;return[c,d,e];}j=a.charCodeAt(0)===94;if(j){a=a.substring(1);}k=false;l=0;while(true){if(a.length>0&&(a.charCodeAt(0)===93)&&l>0){a=a.substring(1);break;}m=0;n=0;o=m;p=n;q=K(a);o=q[0];a=q[1];e=q[2];if(!($interfaceIsEqual(e,$ifaceNil))){return[c,d,e];}p=o;if(a.charCodeAt(0)===45){r=K(a.substring(1));p=r[0];a=r[1];e=r[2];if(!($interfaceIsEqual(e,$ifaceNil))){return[c,d,e];}}if(o<=h&&h<=p){k=true;}l=l+(1)>>0;}if(k===j){return[c,d,e];}}else if(f===63){if(b.charCodeAt(0)===47){return[c,d,e];}s=F.DecodeRuneInString(b);t=s[1];b=b.substring(t);a=a.substring(1);}else if(f===92){a=a.substring(1);if(a.length===0){e=$pkg.ErrBadPattern;return[c,d,e];}if(!((a.charCodeAt(0)===b.charCodeAt(0)))){return[c,d,e];}b=b.substring(1);a=a.substring(1);}else{if(!((a.charCodeAt(0)===b.charCodeAt(0)))){return[c,d,e];}b=b.substring(1);a=a.substring(1);}}u=b;v=true;w=$ifaceNil;c=u;d=v;e=w;return[c,d,e];};K=function(a){var $ptr,a,b,c,d,e,f;b=0;c="";d=$ifaceNil;if((a.length===0)||(a.charCodeAt(0)===45)||(a.charCodeAt(0)===93)){d=$pkg.ErrBadPattern;return[b,c,d];}if((a.charCodeAt(0)===92)&&true){a=a.substring(1);if(a.length===0){d=$pkg.ErrBadPattern;return[b,c,d];}}e=F.DecodeRuneInString(a);b=e[0];f=e[1];if((b===65533)&&(f===1)){d=$pkg.ErrBadPattern;}c=a.substring(f);if(c.length===0){d=$pkg.ErrBadPattern;}return[b,c,d];};L=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=AQ.nil;c=$ifaceNil;if(!N(a)){d=B.Lstat(a);c=d[1];if(!($interfaceIsEqual(c,$ifaceNil))){e=AQ.nil;f=$ifaceNil;b=e;c=f;return[b,c];}g=new AQ([a]);h=$ifaceNil;b=g;c=h;return[b,c];}i=T(a);j=i[0];k=i[1];l=j;if(l===""){j=".";}else if(l==="/"){}else{j=j.substring(0,(j.length-1>>0));}if(!N(j)){$s=1;continue;}$s=2;continue;case 1:n=M(j,k,AQ.nil);$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;b=m[0];c=m[1];return[b,c];case 2:o=AQ.nil;q=L(j);$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;o=p[0];c=p[1];if(!($interfaceIsEqual(c,$ifaceNil))){return[b,c];}r=o;s=0;case 5:if(!(s=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]);v=M(t,k,b);$s=7;case 7:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;b=u[0];c=u[1];if(!($interfaceIsEqual(c,$ifaceNil))){return[b,c];}s++;$s=5;continue;case 6:return[b,c];}return;}if($f===undefined){$f={$blk:L};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Glob=L;M=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=AQ.nil;e=$ifaceNil;d=c;f=B.Stat(a);g=f[0];h=f[1];if(!($interfaceIsEqual(h,$ifaceNil))){return[d,e];}i=g.IsDir();$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!i){$s=1;continue;}$s=2;continue;case 1:return[d,e];case 2:j=B.Open(a);k=j[0];h=j[1];if(!($interfaceIsEqual(h,$ifaceNil))){return[d,e];}$deferred.push([$methodVal(k,"Close"),[]]);l=k.Readdirnames(-1);m=l[0];$r=D.Strings(m);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}n=m;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);q=H(b,p);r=q[0];s=q[1];if(!($interfaceIsEqual(s,$ifaceNil))){t=d;u=s;d=t;e=u;return[d,e];}if(r){d=$append(d,U(new AQ([a,p])));}o++;}return[d,e];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[d,e];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:M};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};N=function(a){var $ptr,a;return E.IndexAny(a,"*?[")>=0;};O.ptr.prototype.index=function(a){var $ptr,a,b,c;b=this;if(!(b.buf===AR.nil)){return(c=b.buf,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));}return b.path.charCodeAt(a);};O.prototype.index=function(a){return this.$val.index(a);};O.ptr.prototype.append=function(a){var $ptr,a,b,c,d;b=this;if(b.buf===AR.nil){if(b.w>0;return;}b.buf=$makeSlice(AR,b.path.length);$copyString(b.buf,b.path.substring(0,b.w));}(c=b.buf,d=b.w,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=a));b.w=b.w+(1)>>0;};O.prototype.append=function(a){return this.$val.append(a);};O.ptr.prototype.string=function(){var $ptr,a;a=this;if(a.buf===AR.nil){return a.volAndPath.substring(0,(a.volLen+a.w>>0));}return a.volAndPath.substring(0,a.volLen)+$bytesToString($subslice(a.buf,0,a.w));};O.prototype.string=function(){return this.$val.string();};P=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;b=a;c=AJ(a);a=a.substring(c);if(a===""){if(c>1&&!((b.charCodeAt(1)===58))){return R(b);}return b+".";}d=B.IsPathSeparator(a.charCodeAt(0));e=a.length;f=new O.ptr(a,AR.nil,0,b,c);g=0;h=0;i=g;j=h;if(d){f.append(47);k=1;l=1;i=k;j=l;}while(true){if(!(i>0;}else if((a.charCodeAt(i)===46)&&(((i+1>>0)===e)||B.IsPathSeparator(a.charCodeAt((i+1>>0))))){i=i+(1)>>0;}else if((a.charCodeAt(i)===46)&&(a.charCodeAt((i+1>>0))===46)&&(((i+2>>0)===e)||B.IsPathSeparator(a.charCodeAt((i+2>>0))))){i=i+(2)>>0;if(f.w>j){f.w=f.w-(1)>>0;while(true){if(!(f.w>j&&!B.IsPathSeparator(f.index(f.w)))){break;}f.w=f.w-(1)>>0;}}else if(!d){if(f.w>0){f.append(47);}f.append(46);f.append(46);j=f.w;}}else{if(d&&!((f.w===1))||!d&&!((f.w===0))){f.append(47);}while(true){if(!(i>0;}}}if(f.w===0){f.append(46);}return R(f.string());};$pkg.Clean=P;R=function(a){var $ptr,a;return a;return E.Replace(a,"/","/",-1);};$pkg.FromSlash=R;T=function(a){var $ptr,a,b,c,d,e,f,g;b="";c="";d=AH(a);e=a.length-1>>0;while(true){if(!(e>=d.length&&!B.IsPathSeparator(a.charCodeAt(e)))){break;}e=e-(1)>>0;}f=a.substring(0,(e+1>>0));g=a.substring((e+1>>0));b=f;c=g;return[b,c];};$pkg.Split=T;U=function(a){var $ptr,a;return AN(a);};$pkg.Join=U;AC=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c(a,b,$ifaceNil);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(!($interfaceIsEqual(e,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:f=b.IsDir();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f&&$interfaceIsEqual(e,$pkg.SkipDir)){$s=4;continue;}$s=5;continue;case 4:return $ifaceNil;case 5:return e;case 3:g=b.IsDir();$s=9;case 9:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(!g){$s=7;continue;}$s=8;continue;case 7:return $ifaceNil;case 8:i=AE(a);$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];e=h[1];if(!($interfaceIsEqual(e,$ifaceNil))){$s=11;continue;}$s=12;continue;case 11:k=c(a,b,e);$s=13;case 13:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;case 12:l=j;m=0;case 14:if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);o=U(new AQ([a,n]));q=AB(o);$s=16;case 16:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=p[0];s=p[1];if(!($interfaceIsEqual(s,$ifaceNil))){$s=17;continue;}$s=18;continue;case 17:t=c(o,r,s);$s=20;case 20:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t;if(!($interfaceIsEqual(u,$ifaceNil))&&!($interfaceIsEqual(u,$pkg.SkipDir))){$s=21;continue;}$s=22;continue;case 21:return u;case 22:$s=19;continue;case 18:v=AC(o,r,c);$s=23;case 23:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}s=v;if(!($interfaceIsEqual(s,$ifaceNil))){$s=24;continue;}$s=25;continue;case 24:w=r.IsDir();$s=28;case 28:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}if(!w||!($interfaceIsEqual(s,$pkg.SkipDir))){$s=26;continue;}$s=27;continue;case 26:return s;case 27:case 25:case 19:m++;$s=14;continue;case 15:return $ifaceNil;}return;}if($f===undefined){$f={$blk:AC};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};AD=function(a,b){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=B.Lstat(a);d=c[0];e=c[1];if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=b(a,$ifaceNil,e);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 2:g=AC(a,d,b);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AD};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Walk=AD;AE=function(a){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=B.Open(a);c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return[AQ.nil,d];}e=c.Readdirnames(-1);f=e[0];d=e[1];c.Close();if(!($interfaceIsEqual(d,$ifaceNil))){return[AQ.nil,d];}$r=D.Strings(f);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[f,$ifaceNil];}return;}if($f===undefined){$f={$blk:AE};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AF=function(a){var $ptr,a,b;if(a===""){return".";}while(true){if(!(a.length>0&&B.IsPathSeparator(a.charCodeAt((a.length-1>>0))))){break;}a=a.substring(0,(a.length-1>>0));}a=a.substring(AH(a).length);b=a.length-1>>0;while(true){if(!(b>=0&&!B.IsPathSeparator(a.charCodeAt(b)))){break;}b=b-(1)>>0;}if(b>=0){a=a.substring((b+1>>0));}if(a===""){return"/";}return a;};$pkg.Base=AF;AH=function(a){var $ptr,a;return a.substring(0,AJ(a));};$pkg.VolumeName=AH;AJ=function(a){var $ptr,a;return 0;};AN=function(a){var $ptr,a,b,c,d,e;b=a;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);if(!(e==="")){return P(E.Join($subslice(a,d),"/"));}c++;}return"";};AU.methods=[{prop:"index",name:"index",pkg:"path/filepath",typ:$funcType([$Int],[$Uint8],false)},{prop:"append",name:"append",pkg:"path/filepath",typ:$funcType([$Uint8],[],false)},{prop:"string",name:"string",pkg:"path/filepath",typ:$funcType([],[$String],false)}];O.init([{prop:"path",name:"path",pkg:"path/filepath",typ:$String,tag:""},{prop:"buf",name:"buf",pkg:"path/filepath",typ:AR,tag:""},{prop:"w",name:"w",pkg:"path/filepath",typ:$Int,tag:""},{prop:"volAndPath",name:"volAndPath",pkg:"path/filepath",typ:$String,tag:""},{prop:"volLen",name:"volLen",pkg:"path/filepath",typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=G.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrBadPattern=A.New("syntax error in pattern");$pkg.SkipDir=A.New("skip this directory");AB=B.Lstat;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["io/ioutil"]=(function(){var $pkg={},$init,A,B,C,F,D,G,E,H,Y,Z,AA,R,I,K;A=$packages["bytes"];B=$packages["io"];C=$packages["os"];F=$packages["path/filepath"];D=$packages["sort"];G=$packages["strconv"];E=$packages["sync"];H=$packages["time"];Y=$sliceType($emptyInterface);Z=$sliceType($Uint8);AA=$ptrType(Z);I=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);c=[c];d=Z.nil;c[0]=$ifaceNil;e=A.NewBuffer($makeSlice(Z,0,$flatten64(b)));$deferred.push([(function(c){return function(){var $ptr,f,g,h,i;f=$recover();if($interfaceIsEqual(f,$ifaceNil)){return;}g=$assertType(f,$error,true);h=g[0];i=g[1];if(i&&$interfaceIsEqual(h,A.ErrTooLarge)){c[0]=h;}else{$panic(f);}};})(c),[]]);g=e.ReadFrom(a);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;c[0]=f[1];h=e.Bytes();i=c[0];d=h;c[0]=i;return[d,c[0]];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[d,c[0]];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:I};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};K=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);b=C.Open(a);c=b[0];d=b[1];if(!($interfaceIsEqual(d,$ifaceNil))){return[Z.nil,d];}$deferred.push([$methodVal(c,"Close"),[]]);e=new $Int64(0,0);f=c.Stat();g=f[0];h=f[1];if($interfaceIsEqual(h,$ifaceNil)){$s=1;continue;}$s=2;continue;case 1:i=g.Size();$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if((j.$high<0||(j.$high===0&&j.$low<1000000000))){$s=4;continue;}$s=5;continue;case 4:e=j;case 5:case 2:k=I(c,new $Int64(e.$high+0,e.$low+512));$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}}catch(err){$err=err;$s=-1;return[Z.nil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:K};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};$pkg.ReadFile=K;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}R=new E.Pool.ptr(0,0,Y.nil,(function(){var $ptr,a,b;a=$makeSlice(Z,8192);return(b||(b=new AA(function(){return a;},function($v){a=$subslice(new Z($v.$array),$v.$offset,$v.$offset+$v.$length);})));}));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["path"]=(function(){var $pkg={},$init,A,B,C;A=$packages["errors"];B=$packages["strings"];C=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.ErrBadPattern=A.New("syntax error in pattern");}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/temple/temple/assets"]=(function(){var $pkg={},$init,A,B,C,D,H,F,I,J,E,G;A=$packages["bytes"];B=$packages["compress/gzip"];C=$packages["fmt"];D=$packages["io"];H=$packages["io/ioutil"];F=$packages["os"];I=$packages["path"];J=$packages["path/filepath"];E=$packages["strings"];G=$packages["time"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/token"]=(function(){var $pkg={},$init,A,C,B,D,F,P,Q,R,S;A=$packages["fmt"];C=$packages["github.com/gopherjs/gopherjs/nosync"];B=$packages["sort"];D=$packages["strconv"];F=$pkg.Pos=$newType(4,$kindInt,"token.Pos","Pos","go/token",null);P=$pkg.Token=$newType(4,$kindInt,"token.Token","Token","go/token",null);F.prototype.IsValid=function(){var $ptr,a;a=this.$val;return!((a===0));};$ptrType(F).prototype.IsValid=function(){return new F(this.$get()).IsValid();};P.prototype.String=function(){var $ptr,a,b;a=this.$val;b="";if(0<=a&&a<86){b=((a<0||a>=Q.length)?$throwRuntimeError("index out of range"):Q[a]);}if(b===""){b="token("+D.Itoa((a>>0))+")";}return b;};$ptrType(P).prototype.String=function(){return new P(this.$get()).String();};P.prototype.Precedence=function(){var $ptr,a,b;a=this.$val;b=a;if(b===35){return 1;}else if(b===34){return 2;}else if(b===39||b===44||b===40||b===45||b===41||b===46){return 3;}else if(b===12||b===13||b===18||b===19){return 4;}else if(b===14||b===15||b===16||b===20||b===21||b===17||b===22){return 5;}return 0;};$ptrType(P).prototype.Precedence=function(){return new P(this.$get()).Precedence();};S=function(){var $ptr,a,b;R={};a=61;while(true){if(!(a<86)){break;}b=((a<0||a>=Q.length)?$throwRuntimeError("index out of range"):Q[a]);(R||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(b)]={k:b,v:a};a=a+(1)>>0;}};P.prototype.IsLiteral=function(){var $ptr,a;a=this.$val;return 3>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(","[","{",",",".",")","]","}",";",":","","","break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"]);S();}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/scanner"]=(function(){var $pkg={},$init,E,A,B,C,F,D,G,H,I;E=$packages["bytes"];A=$packages["fmt"];B=$packages["go/token"];C=$packages["io"];F=$packages["path/filepath"];D=$packages["sort"];G=$packages["strconv"];H=$packages["unicode"];I=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/ast"]=(function(){var $pkg={},$init,E,F,L,A,I,J,K,G,H,B,C,D,N,O,Q,R,U,V,X,Z,AP,AY,BC,BH,BR,BS,BT,BW,DX,DZ,EB,EL,EM,EN,EO,EP,EQ,ER,ES,EV,EZ,FA,FB,FC,FI,FM,FN,FP,FQ,FS,FU,FX,FY,FZ,HF,HG,HH,HJ,EC,S,T,AU;E=$packages["bytes"];F=$packages["fmt"];L=$packages["go/scanner"];A=$packages["go/token"];I=$packages["io"];J=$packages["os"];K=$packages["reflect"];G=$packages["sort"];H=$packages["strconv"];B=$packages["strings"];C=$packages["unicode"];D=$packages["unicode/utf8"];N=$pkg.Expr=$newType(8,$kindInterface,"ast.Expr","Expr","go/ast",null);O=$pkg.Stmt=$newType(8,$kindInterface,"ast.Stmt","Stmt","go/ast",null);Q=$pkg.Comment=$newType(0,$kindStruct,"ast.Comment","Comment","go/ast",function(Slash_,Text_){this.$val=this;if(arguments.length===0){this.Slash=0;this.Text="";return;}this.Slash=Slash_;this.Text=Text_;});R=$pkg.CommentGroup=$newType(0,$kindStruct,"ast.CommentGroup","CommentGroup","go/ast",function(List_){this.$val=this;if(arguments.length===0){this.List=FQ.nil;return;}this.List=List_;});U=$pkg.Field=$newType(0,$kindStruct,"ast.Field","Field","go/ast",function(Doc_,Names_,Type_,Tag_,Comment_){this.$val=this;if(arguments.length===0){this.Doc=EM.nil;this.Names=FU.nil;this.Type=$ifaceNil;this.Tag=EO.nil;this.Comment=EM.nil;return;}this.Doc=Doc_;this.Names=Names_;this.Type=Type_;this.Tag=Tag_;this.Comment=Comment_;});V=$pkg.FieldList=$newType(0,$kindStruct,"ast.FieldList","FieldList","go/ast",function(Opening_,List_,Closing_){this.$val=this;if(arguments.length===0){this.Opening=0;this.List=HF.nil;this.Closing=0;return;}this.Opening=Opening_;this.List=List_;this.Closing=Closing_;});X=$pkg.Ident=$newType(0,$kindStruct,"ast.Ident","Ident","go/ast",function(NamePos_,Name_,Obj_){this.$val=this;if(arguments.length===0){this.NamePos=0;this.Name="";this.Obj=EQ.nil;return;}this.NamePos=NamePos_;this.Name=Name_;this.Obj=Obj_;});Z=$pkg.BasicLit=$newType(0,$kindStruct,"ast.BasicLit","BasicLit","go/ast",function(ValuePos_,Kind_,Value_){this.$val=this;if(arguments.length===0){this.ValuePos=0;this.Kind=0;this.Value="";return;}this.ValuePos=ValuePos_;this.Kind=Kind_;this.Value=Value_;});AP=$pkg.FuncType=$newType(0,$kindStruct,"ast.FuncType","FuncType","go/ast",function(Func_,Params_,Results_){this.$val=this;if(arguments.length===0){this.Func=0;this.Params=EP.nil;this.Results=EP.nil;return;}this.Func=Func_;this.Params=Params_;this.Results=Results_;});AY=$pkg.LabeledStmt=$newType(0,$kindStruct,"ast.LabeledStmt","LabeledStmt","go/ast",function(Label_,Colon_,Stmt_){this.$val=this;if(arguments.length===0){this.Label=ER.nil;this.Colon=0;this.Stmt=$ifaceNil;return;}this.Label=Label_;this.Colon=Colon_;this.Stmt=Stmt_;});BC=$pkg.AssignStmt=$newType(0,$kindStruct,"ast.AssignStmt","AssignStmt","go/ast",function(Lhs_,TokPos_,Tok_,Rhs_){this.$val=this;if(arguments.length===0){this.Lhs=HG.nil;this.TokPos=0;this.Tok=0;this.Rhs=HG.nil;return;}this.Lhs=Lhs_;this.TokPos=TokPos_;this.Tok=Tok_;this.Rhs=Rhs_;});BH=$pkg.BlockStmt=$newType(0,$kindStruct,"ast.BlockStmt","BlockStmt","go/ast",function(Lbrace_,List_,Rbrace_){this.$val=this;if(arguments.length===0){this.Lbrace=0;this.List=HH.nil;this.Rbrace=0;return;}this.Lbrace=Lbrace_;this.List=List_;this.Rbrace=Rbrace_;});BR=$pkg.ImportSpec=$newType(0,$kindStruct,"ast.ImportSpec","ImportSpec","go/ast",function(Doc_,Name_,Path_,Comment_,EndPos_){this.$val=this;if(arguments.length===0){this.Doc=EM.nil;this.Name=ER.nil;this.Path=EO.nil;this.Comment=EM.nil;this.EndPos=0;return;}this.Doc=Doc_;this.Name=Name_;this.Path=Path_;this.Comment=Comment_;this.EndPos=EndPos_;});BS=$pkg.ValueSpec=$newType(0,$kindStruct,"ast.ValueSpec","ValueSpec","go/ast",function(Doc_,Names_,Type_,Values_,Comment_){this.$val=this;if(arguments.length===0){this.Doc=EM.nil;this.Names=FU.nil;this.Type=$ifaceNil;this.Values=HG.nil;this.Comment=EM.nil;return;}this.Doc=Doc_;this.Names=Names_;this.Type=Type_;this.Values=Values_;this.Comment=Comment_;});BT=$pkg.TypeSpec=$newType(0,$kindStruct,"ast.TypeSpec","TypeSpec","go/ast",function(Doc_,Name_,Type_,Comment_){this.$val=this;if(arguments.length===0){this.Doc=EM.nil;this.Name=ER.nil;this.Type=$ifaceNil;this.Comment=EM.nil;return;}this.Doc=Doc_;this.Name=Name_;this.Type=Type_;this.Comment=Comment_;});BW=$pkg.FuncDecl=$newType(0,$kindStruct,"ast.FuncDecl","FuncDecl","go/ast",function(Doc_,Recv_,Name_,Type_,Body_){this.$val=this;if(arguments.length===0){this.Doc=EM.nil;this.Recv=EP.nil;this.Name=ER.nil;this.Type=FI.nil;this.Body=ES.nil;return;}this.Doc=Doc_;this.Recv=Recv_;this.Name=Name_;this.Type=Type_;this.Body=Body_;});DX=$pkg.Scope=$newType(0,$kindStruct,"ast.Scope","Scope","go/ast",function(Outer_,Objects_){this.$val=this;if(arguments.length===0){this.Outer=FX.nil;this.Objects=false;return;}this.Outer=Outer_;this.Objects=Objects_;});DZ=$pkg.Object=$newType(0,$kindStruct,"ast.Object","Object","go/ast",function(Kind_,Name_,Decl_,Data_,Type_){this.$val=this;if(arguments.length===0){this.Kind=0;this.Name="";this.Decl=$ifaceNil;this.Data=$ifaceNil;this.Type=$ifaceNil;return;}this.Kind=Kind_;this.Name=Name_;this.Decl=Decl_;this.Data=Data_;this.Type=Type_;});EB=$pkg.ObjKind=$newType(4,$kindInt,"ast.ObjKind","ObjKind","go/ast",null);EL=$sliceType($Uint8);EM=$ptrType(R);EN=$sliceType($String);EO=$ptrType(Z);EP=$ptrType(V);EQ=$ptrType(DZ);ER=$ptrType(X);ES=$ptrType(BH);EV=$ptrType(Q);EZ=$ptrType(U);FA=$arrayType($Uint8,4);FB=$arrayType($Uint8,64);FC=$sliceType($emptyInterface);FI=$ptrType(AP);FM=$ptrType(BS);FN=$ptrType(BT);FP=$ptrType(BW);FQ=$sliceType(EV);FS=$ptrType(BR);FU=$sliceType(ER);FX=$ptrType(DX);FY=$ptrType(AY);FZ=$ptrType(BC);HF=$sliceType(EZ);HG=$sliceType(N);HH=$sliceType(O);HJ=$mapType($String,EQ);Q.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.Slash;};Q.prototype.Pos=function(){return this.$val.Pos();};Q.ptr.prototype.End=function(){var $ptr,a;a=this;return(((a.Slash>>0)+a.Text.length>>0)>>0);};Q.prototype.End=function(){return this.$val.End();};R.ptr.prototype.Pos=function(){var $ptr,a,b;a=this;return(b=a.List,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();};R.prototype.Pos=function(){return this.$val.Pos();};R.ptr.prototype.End=function(){var $ptr,a,b,c;a=this;return(b=a.List,c=a.List.$length-1>>0,((c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c])).End();};R.prototype.End=function(){return this.$val.End();};S=function(a){var $ptr,a;return(a===32)||(a===9)||(a===10)||(a===13);};T=function(a){var $ptr,a,b;b=a.length;while(true){if(!(b>0&&S(a.charCodeAt((b-1>>0))))){break;}b=b-(1)>>0;}return a.substring(0,b);};R.ptr.prototype.Text=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a=this;if(a===EM.nil){return"";}b=$makeSlice(EN,a.List.$length);c=a.List;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);((e<0||e>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+e]=f.Text);d++;}g=$makeSlice(EN,0,10);h=b;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=j.charCodeAt(1);if(k===47){j=j.substring(2);if(j.length>0&&(j.charCodeAt(0)===32)){j=j.substring(1);}}else if(k===42){j=j.substring(2,(j.length-2>>0));}l=B.Split(j,"\n");m=l;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);g=$append(g,T(o));n++;}i++;}p=0;q=g;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);if(!(s==="")||p>0&&!((t=p-1>>0,((t<0||t>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+t]))==="")){((p<0||p>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+p]=s);p=p+(1)>>0;}r++;}g=$subslice(g,0,p);if(p>0&&!((u=p-1>>0,((u<0||u>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+u]))==="")){g=$append(g,"");}return B.Join(g,"\n");};R.prototype.Text=function(){return this.$val.Text();};U.ptr.prototype.Pos=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(a.Names.$length>0){return(b=a.Names,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();}c=a.Type.Pos();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:U.ptr.prototype.Pos};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};U.prototype.Pos=function(){return this.$val.Pos();};U.ptr.prototype.End=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(!(a.Tag===EO.nil)){return a.Tag.End();}b=a.Type.End();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:U.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};U.prototype.End=function(){return this.$val.End();};V.ptr.prototype.Pos=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(new A.Pos(a.Opening).IsValid()){return a.Opening;}if(a.List.$length>0){$s=1;continue;}$s=2;continue;case 1:c=(b=a.List,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;case 2:return 0;}return;}if($f===undefined){$f={$blk:V.ptr.prototype.Pos};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};V.prototype.Pos=function(){return this.$val.Pos();};V.ptr.prototype.End=function(){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(new A.Pos(a.Closing).IsValid()){return a.Closing+1>>0;}b=a.List.$length;if(b>0){$s=1;continue;}$s=2;continue;case 1:e=(c=a.List,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;case 2:return 0;}return;}if($f===undefined){$f={$blk:V.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};V.prototype.End=function(){return this.$val.End();};V.ptr.prototype.NumFields=function(){var $ptr,a,b,c,d,e,f;a=this;b=0;if(!(a===EP.nil)){c=a.List;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);f=e.Names.$length;if(f===0){f=1;}b=b+(f)>>0;d++;}}return b;};V.prototype.NumFields=function(){return this.$val.NumFields();};X.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.NamePos;};X.prototype.Pos=function(){return this.$val.Pos();};Z.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.ValuePos;};Z.prototype.Pos=function(){return this.$val.Pos();};AP.ptr.prototype.Pos=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(new A.Pos(a.Func).IsValid()||a.Params===EP.nil){return a.Func;}b=a.Params.Pos();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:AP.ptr.prototype.Pos};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};AP.prototype.Pos=function(){return this.$val.Pos();};X.ptr.prototype.End=function(){var $ptr,a;a=this;return(((a.NamePos>>0)+a.Name.length>>0)>>0);};X.prototype.End=function(){return this.$val.End();};Z.ptr.prototype.End=function(){var $ptr,a;a=this;return(((a.ValuePos>>0)+a.Value.length>>0)>>0);};Z.prototype.End=function(){return this.$val.End();};AP.ptr.prototype.End=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(!(a.Results===EP.nil)){$s=1;continue;}$s=2;continue;case 1:b=a.Results.End();$s=3;case 3:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;case 2:c=a.Params.End();$s=4;case 4:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:AP.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AP.prototype.End=function(){return this.$val.End();};AU=function(a){var $ptr,a,b,c;b=D.DecodeRuneInString(a);c=b[0];return C.IsUpper(c);};$pkg.IsExported=AU;X.ptr.prototype.IsExported=function(){var $ptr,a;a=this;return AU(a.Name);};X.prototype.IsExported=function(){return this.$val.IsExported();};X.ptr.prototype.String=function(){var $ptr,a;a=this;if(!(a===ER.nil)){return a.Name;}return"";};X.prototype.String=function(){return this.$val.String();};AY.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.Label.Pos();};AY.prototype.Pos=function(){return this.$val.Pos();};BC.ptr.prototype.Pos=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;c=(b=a.Lhs,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:BC.ptr.prototype.Pos};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BC.prototype.Pos=function(){return this.$val.Pos();};BH.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.Lbrace;};BH.prototype.Pos=function(){return this.$val.Pos();};AY.ptr.prototype.End=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Stmt.End();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:AY.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};AY.prototype.End=function(){return this.$val.End();};BC.ptr.prototype.End=function(){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;d=(b=a.Rhs,c=a.Rhs.$length-1>>0,((c<0||c>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c])).End();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:BC.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};BC.prototype.End=function(){return this.$val.End();};BH.ptr.prototype.End=function(){var $ptr,a;a=this;return a.Rbrace+1>>0;};BH.prototype.End=function(){return this.$val.End();};BR.ptr.prototype.Pos=function(){var $ptr,a;a=this;if(!(a.Name===ER.nil)){return a.Name.Pos();}return a.Path.Pos();};BR.prototype.Pos=function(){return this.$val.Pos();};BS.ptr.prototype.Pos=function(){var $ptr,a,b;a=this;return(b=a.Names,(0>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+0])).Pos();};BS.prototype.Pos=function(){return this.$val.Pos();};BT.ptr.prototype.Pos=function(){var $ptr,a;a=this;return a.Name.Pos();};BT.prototype.Pos=function(){return this.$val.Pos();};BR.ptr.prototype.End=function(){var $ptr,a;a=this;if(!((a.EndPos===0))){return a.EndPos;}return a.Path.End();};BR.prototype.End=function(){return this.$val.End();};BS.ptr.prototype.End=function(){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Values.$length;if(b>0){$s=1;continue;}$s=2;continue;case 1:e=(c=a.Values,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).End();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;case 2:if(!($interfaceIsEqual(a.Type,$ifaceNil))){$s=4;continue;}$s=5;continue;case 4:f=a.Type.End();$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 5:return(g=a.Names,h=a.Names.$length-1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])).End();}return;}if($f===undefined){$f={$blk:BS.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BS.prototype.End=function(){return this.$val.End();};BT.ptr.prototype.End=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Type.End();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:BT.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};BT.prototype.End=function(){return this.$val.End();};BW.ptr.prototype.Pos=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.Type.Pos();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:BW.ptr.prototype.Pos};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};BW.prototype.Pos=function(){return this.$val.Pos();};BW.ptr.prototype.End=function(){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(!(a.Body===ES.nil)){return a.Body.End();}b=a.Type.End();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:BW.ptr.prototype.End};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};BW.prototype.End=function(){return this.$val.End();};DX.ptr.prototype.Lookup=function(a){var $ptr,a,b,c;b=this;return(c=b.Objects[$String.keyFor(a)],c!==undefined?c.v:EQ.nil);};DX.prototype.Lookup=function(a){return this.$val.Lookup(a);};DX.ptr.prototype.Insert=function(a){var $ptr,a,b,c,d,e;b=EQ.nil;c=this;b=(d=c.Objects[$String.keyFor(a.Name)],d!==undefined?d.v:EQ.nil);if(b===EQ.nil){e=a.Name;(c.Objects||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(e)]={k:e,v:a};}return b;};DX.prototype.Insert=function(a){return this.$val.Insert(a);};DX.ptr.prototype.String=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=this;a[0]=new E.Buffer.ptr(EL.nil,0,FA.zero(),FB.zero(),0);c=F.Fprintf(a[0],"scope %p {",new FC([b]));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}c;if(!(b===FX.nil)&&$keys(b.Objects).length>0){$s=2;continue;}$s=3;continue;case 2:d=F.Fprintln(a[0],new FC([]));$s=4;case 4:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;e=b.Objects;f=0;g=$keys(e);case 5:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g.Name===b){return g.Pos();}f++;}}else if($assertType(c,FS,true)[1]){h=c.$val;if(!(h.Name===ER.nil)&&h.Name.Name===b){return h.Name.Pos();}return h.Path.Pos();}else if($assertType(c,FM,true)[1]){i=c.$val;j=i.Names;k=0;while(true){if(!(k=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]);if(l.Name===b){return l.Pos();}k++;}}else if($assertType(c,FN,true)[1]){m=c.$val;if(m.Name.Name===b){return m.Name.Pos();}}else if($assertType(c,FP,true)[1]){n=c.$val;if(n.Name.Name===b){return n.Name.Pos();}}else if($assertType(c,FY,true)[1]){o=c.$val;if(o.Label.Name===b){return o.Label.Pos();}}else if($assertType(c,FZ,true)[1]){p=c.$val;q=p.Lhs;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);t=$assertType(s,ER,true);u=t[0];v=t[1];if(v&&u.Name===b){return u.Pos();}r++;}}else if($assertType(c,FX,true)[1]){w=c.$val;}return 0;};DZ.prototype.Pos=function(){return this.$val.Pos();};EB.prototype.String=function(){var $ptr,a;a=this.$val;return((a<0||a>=EC.length)?$throwRuntimeError("index out of range"):EC[a]);};$ptrType(EB).prototype.String=function(){return new EB(this.$get()).String();};EV.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)}];EM.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"Text",name:"Text",pkg:"",typ:$funcType([],[$String],false)}];EZ.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)}];EP.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"NumFields",name:"NumFields",pkg:"",typ:$funcType([],[$Int],false)}];ER.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"exprNode",name:"exprNode",pkg:"go/ast",typ:$funcType([],[],false)},{prop:"IsExported",name:"IsExported",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];EO.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"exprNode",name:"exprNode",pkg:"go/ast",typ:$funcType([],[],false)}];FI.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"exprNode",name:"exprNode",pkg:"go/ast",typ:$funcType([],[],false)}];FY.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"stmtNode",name:"stmtNode",pkg:"go/ast",typ:$funcType([],[],false)}];FZ.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"stmtNode",name:"stmtNode",pkg:"go/ast",typ:$funcType([],[],false)}];ES.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"stmtNode",name:"stmtNode",pkg:"go/ast",typ:$funcType([],[],false)}];FS.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"specNode",name:"specNode",pkg:"go/ast",typ:$funcType([],[],false)}];FM.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"specNode",name:"specNode",pkg:"go/ast",typ:$funcType([],[],false)}];FN.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"specNode",name:"specNode",pkg:"go/ast",typ:$funcType([],[],false)}];FP.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"declNode",name:"declNode",pkg:"go/ast",typ:$funcType([],[],false)}];FX.methods=[{prop:"Lookup",name:"Lookup",pkg:"",typ:$funcType([$String],[EQ],false)},{prop:"Insert",name:"Insert",pkg:"",typ:$funcType([EQ],[EQ],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];EQ.methods=[{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)}];EB.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];N.init([{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"exprNode",name:"exprNode",pkg:"go/ast",typ:$funcType([],[],false)}]);O.init([{prop:"End",name:"End",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"Pos",name:"Pos",pkg:"",typ:$funcType([],[A.Pos],false)},{prop:"stmtNode",name:"stmtNode",pkg:"go/ast",typ:$funcType([],[],false)}]);Q.init([{prop:"Slash",name:"Slash",pkg:"",typ:A.Pos,tag:""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:""}]);R.init([{prop:"List",name:"List",pkg:"",typ:FQ,tag:""}]);U.init([{prop:"Doc",name:"Doc",pkg:"",typ:EM,tag:""},{prop:"Names",name:"Names",pkg:"",typ:FU,tag:""},{prop:"Type",name:"Type",pkg:"",typ:N,tag:""},{prop:"Tag",name:"Tag",pkg:"",typ:EO,tag:""},{prop:"Comment",name:"Comment",pkg:"",typ:EM,tag:""}]);V.init([{prop:"Opening",name:"Opening",pkg:"",typ:A.Pos,tag:""},{prop:"List",name:"List",pkg:"",typ:HF,tag:""},{prop:"Closing",name:"Closing",pkg:"",typ:A.Pos,tag:""}]);X.init([{prop:"NamePos",name:"NamePos",pkg:"",typ:A.Pos,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Obj",name:"Obj",pkg:"",typ:EQ,tag:""}]);Z.init([{prop:"ValuePos",name:"ValuePos",pkg:"",typ:A.Pos,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:A.Token,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:""}]);AP.init([{prop:"Func",name:"Func",pkg:"",typ:A.Pos,tag:""},{prop:"Params",name:"Params",pkg:"",typ:EP,tag:""},{prop:"Results",name:"Results",pkg:"",typ:EP,tag:""}]);AY.init([{prop:"Label",name:"Label",pkg:"",typ:ER,tag:""},{prop:"Colon",name:"Colon",pkg:"",typ:A.Pos,tag:""},{prop:"Stmt",name:"Stmt",pkg:"",typ:O,tag:""}]);BC.init([{prop:"Lhs",name:"Lhs",pkg:"",typ:HG,tag:""},{prop:"TokPos",name:"TokPos",pkg:"",typ:A.Pos,tag:""},{prop:"Tok",name:"Tok",pkg:"",typ:A.Token,tag:""},{prop:"Rhs",name:"Rhs",pkg:"",typ:HG,tag:""}]);BH.init([{prop:"Lbrace",name:"Lbrace",pkg:"",typ:A.Pos,tag:""},{prop:"List",name:"List",pkg:"",typ:HH,tag:""},{prop:"Rbrace",name:"Rbrace",pkg:"",typ:A.Pos,tag:""}]);BR.init([{prop:"Doc",name:"Doc",pkg:"",typ:EM,tag:""},{prop:"Name",name:"Name",pkg:"",typ:ER,tag:""},{prop:"Path",name:"Path",pkg:"",typ:EO,tag:""},{prop:"Comment",name:"Comment",pkg:"",typ:EM,tag:""},{prop:"EndPos",name:"EndPos",pkg:"",typ:A.Pos,tag:""}]);BS.init([{prop:"Doc",name:"Doc",pkg:"",typ:EM,tag:""},{prop:"Names",name:"Names",pkg:"",typ:FU,tag:""},{prop:"Type",name:"Type",pkg:"",typ:N,tag:""},{prop:"Values",name:"Values",pkg:"",typ:HG,tag:""},{prop:"Comment",name:"Comment",pkg:"",typ:EM,tag:""}]);BT.init([{prop:"Doc",name:"Doc",pkg:"",typ:EM,tag:""},{prop:"Name",name:"Name",pkg:"",typ:ER,tag:""},{prop:"Type",name:"Type",pkg:"",typ:N,tag:""},{prop:"Comment",name:"Comment",pkg:"",typ:EM,tag:""}]);BW.init([{prop:"Doc",name:"Doc",pkg:"",typ:EM,tag:""},{prop:"Recv",name:"Recv",pkg:"",typ:EP,tag:""},{prop:"Name",name:"Name",pkg:"",typ:ER,tag:""},{prop:"Type",name:"Type",pkg:"",typ:FI,tag:""},{prop:"Body",name:"Body",pkg:"",typ:ES,tag:""}]);DX.init([{prop:"Outer",name:"Outer",pkg:"",typ:FX,tag:""},{prop:"Objects",name:"Objects",pkg:"",typ:HJ,tag:""}]);DZ.init([{prop:"Kind",name:"Kind",pkg:"",typ:EB,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Decl",name:"Decl",pkg:"",typ:$emptyInterface,tag:""},{prop:"Data",name:"Data",pkg:"",typ:$emptyInterface,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$emptyInterface,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}EC=$toNativeArray($kindString,["bad","package","const","type","var","func","label"]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/parser"]=(function(){var $pkg={},$init,A,B,J,C,K,D,E,F,G,H,L,I,M,U;A=$packages["bytes"];B=$packages["errors"];J=$packages["fmt"];C=$packages["go/ast"];K=$packages["go/scanner"];D=$packages["go/token"];E=$packages["io"];F=$packages["io/ioutil"];G=$packages["os"];H=$packages["path/filepath"];L=$packages["strconv"];I=$packages["strings"];M=$packages["unicode"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}U=new C.Object.ptr(0,"",$ifaceNil,$ifaceNil,$ifaceNil);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["text/tabwriter"]=(function(){var $pkg={},$init,A,B,C;A=$packages["bytes"];B=$packages["io"];C=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/printer"]=(function(){var $pkg={},$init,A,H,B,C,I,J,D,E,K,F,G;A=$packages["bytes"];H=$packages["fmt"];B=$packages["go/ast"];C=$packages["go/token"];I=$packages["io"];J=$packages["os"];D=$packages["strconv"];E=$packages["strings"];K=$packages["text/tabwriter"];F=$packages["unicode"];G=$packages["unicode/utf8"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["internal/format"]=(function(){var $pkg={},$init,A,B,C,D,E,F;A=$packages["bytes"];B=$packages["go/ast"];C=$packages["go/parser"];D=$packages["go/printer"];E=$packages["go/token"];F=$packages["strings"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["go/format"]=(function(){var $pkg={},$init,A,B,C,D,E,F,G,H;A=$packages["bytes"];B=$packages["fmt"];C=$packages["go/ast"];D=$packages["go/parser"];E=$packages["go/printer"];F=$packages["go/token"];G=$packages["internal/format"];H=$packages["io"];$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["honnef.co/go/js/dom"]=(function(){var $pkg={},$init,C,A,B,V,W,X,Y,Z,AA,AB,AC,AD,AE,AH,AI,AK,AL,AM,AR,AS,AT,AU,AV,AW,AX,AZ,BA,BB,BD,BE,BF,BG,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,EG,EJ,EK,EL,EM,EN,EO,EP,EQ,ER,ES,ET,EU,EV,EW,EX,EY,EZ,FA,FB,FC,FD,FE,FF,FG,FH,FI,FJ,FK,FL,FM,FN,FO,FP,FQ,FR,FS,FT,FU,FV,FW,FX,FY,FZ,GA,GB,GC,GD,GF,GG,GH,GI,GJ,GK,GL,GM,GN,GO,GP,GQ,GR,GS,GT,GU,GV,GW,GX,GY,GZ,HA,HB,HC,HD,HE,HF,HG,HH,HI,HJ,HK,HL,HM,HN,HO,HP,HQ,HR,HS,HT,HU,HV,HW,HX,HY,HZ,IA,IB,IC,ID,IE,IF,IG,IH,II,IJ,IK,IL,IM,IN,IO,IP,IQ,IR,IS,IT,IU,IV,IW,IX,IY,IZ,JA,JB,JC,JD,JE,D,E,F,G,M,N,O,P,Q,R,S,T,U,AJ,EI;C=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["strings"];B=$packages["time"];V=$pkg.TokenList=$newType(0,$kindStruct,"dom.TokenList","TokenList","honnef.co/go/js/dom",function(dtl_,o_,sa_,Length_){this.$val=this;if(arguments.length===0){this.dtl=null;this.o=null;this.sa="";this.Length=0;return;}this.dtl=dtl_;this.o=o_;this.sa=sa_;this.Length=Length_;});W=$pkg.Document=$newType(8,$kindInterface,"dom.Document","Document","honnef.co/go/js/dom",null);X=$pkg.DocumentFragment=$newType(8,$kindInterface,"dom.DocumentFragment","DocumentFragment","honnef.co/go/js/dom",null);Y=$pkg.HTMLDocument=$newType(8,$kindInterface,"dom.HTMLDocument","HTMLDocument","honnef.co/go/js/dom",null);Z=$pkg.documentFragment=$newType(0,$kindStruct,"dom.documentFragment","documentFragment","honnef.co/go/js/dom",function(BasicNode_){this.$val=this;if(arguments.length===0){this.BasicNode=HU.nil;return;}this.BasicNode=BasicNode_;});AA=$pkg.document=$newType(0,$kindStruct,"dom.document","document","honnef.co/go/js/dom",function(BasicNode_){this.$val=this;if(arguments.length===0){this.BasicNode=HU.nil;return;}this.BasicNode=BasicNode_;});AB=$pkg.htmlDocument=$newType(0,$kindStruct,"dom.htmlDocument","htmlDocument","honnef.co/go/js/dom",function(document_){this.$val=this;if(arguments.length===0){this.document=HV.nil;return;}this.document=document_;});AC=$pkg.URLUtils=$newType(0,$kindStruct,"dom.URLUtils","URLUtils","honnef.co/go/js/dom",function(Object_,Href_,Protocol_,Host_,Hostname_,Port_,Pathname_,Search_,Hash_,Username_,Password_,Origin_){this.$val=this;if(arguments.length===0){this.Object=null;this.Href="";this.Protocol="";this.Host="";this.Hostname="";this.Port="";this.Pathname="";this.Search="";this.Hash="";this.Username="";this.Password="";this.Origin="";return;}this.Object=Object_;this.Href=Href_;this.Protocol=Protocol_;this.Host=Host_;this.Hostname=Hostname_;this.Port=Port_;this.Pathname=Pathname_;this.Search=Search_;this.Hash=Hash_;this.Username=Username_;this.Password=Password_;this.Origin=Origin_;});AD=$pkg.Location=$newType(0,$kindStruct,"dom.Location","Location","honnef.co/go/js/dom",function(Object_,URLUtils_){this.$val=this;if(arguments.length===0){this.Object=null;this.URLUtils=GK.nil;return;}this.Object=Object_;this.URLUtils=URLUtils_;});AE=$pkg.HTMLElement=$newType(8,$kindInterface,"dom.HTMLElement","HTMLElement","honnef.co/go/js/dom",null);AH=$pkg.Window=$newType(8,$kindInterface,"dom.Window","Window","honnef.co/go/js/dom",null);AI=$pkg.window=$newType(0,$kindStruct,"dom.window","window","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});AK=$pkg.Selection=$newType(8,$kindInterface,"dom.Selection","Selection","honnef.co/go/js/dom",null);AL=$pkg.Screen=$newType(0,$kindStruct,"dom.Screen","Screen","honnef.co/go/js/dom",function(Object_,AvailTop_,AvailLeft_,AvailHeight_,AvailWidth_,ColorDepth_,Height_,Left_,PixelDepth_,Top_,Width_){this.$val=this;if(arguments.length===0){this.Object=null;this.AvailTop=0;this.AvailLeft=0;this.AvailHeight=0;this.AvailWidth=0;this.ColorDepth=0;this.Height=0;this.Left=0;this.PixelDepth=0;this.Top=0;this.Width=0;return;}this.Object=Object_;this.AvailTop=AvailTop_;this.AvailLeft=AvailLeft_;this.AvailHeight=AvailHeight_;this.AvailWidth=AvailWidth_;this.ColorDepth=ColorDepth_;this.Height=Height_;this.Left=Left_;this.PixelDepth=PixelDepth_;this.Top=Top_;this.Width=Width_;});AM=$pkg.Navigator=$newType(8,$kindInterface,"dom.Navigator","Navigator","honnef.co/go/js/dom",null);AR=$pkg.Geolocation=$newType(8,$kindInterface,"dom.Geolocation","Geolocation","honnef.co/go/js/dom",null);AS=$pkg.PositionError=$newType(0,$kindStruct,"dom.PositionError","PositionError","honnef.co/go/js/dom",function(Object_,Code_){this.$val=this;if(arguments.length===0){this.Object=null;this.Code=0;return;}this.Object=Object_;this.Code=Code_;});AT=$pkg.PositionOptions=$newType(0,$kindStruct,"dom.PositionOptions","PositionOptions","honnef.co/go/js/dom",function(EnableHighAccuracy_,Timeout_,MaximumAge_){this.$val=this;if(arguments.length===0){this.EnableHighAccuracy=false;this.Timeout=new B.Duration(0,0);this.MaximumAge=new B.Duration(0,0);return;}this.EnableHighAccuracy=EnableHighAccuracy_;this.Timeout=Timeout_;this.MaximumAge=MaximumAge_;});AU=$pkg.Position=$newType(0,$kindStruct,"dom.Position","Position","honnef.co/go/js/dom",function(Coords_,Timestamp_){this.$val=this;if(arguments.length===0){this.Coords=IG.nil;this.Timestamp=new B.Time.ptr(new $Int64(0,0),0,GM.nil);return;}this.Coords=Coords_;this.Timestamp=Timestamp_;});AV=$pkg.Coordinates=$newType(0,$kindStruct,"dom.Coordinates","Coordinates","honnef.co/go/js/dom",function(Object_,Latitude_,Longitude_,Altitude_,Accuracy_,AltitudeAccuracy_,Heading_,Speed_){this.$val=this;if(arguments.length===0){this.Object=null;this.Latitude=0;this.Longitude=0;this.Altitude=0;this.Accuracy=0;this.AltitudeAccuracy=0;this.Heading=0;this.Speed=0;return;}this.Object=Object_;this.Latitude=Latitude_;this.Longitude=Longitude_;this.Altitude=Altitude_;this.Accuracy=Accuracy_;this.AltitudeAccuracy=AltitudeAccuracy_;this.Heading=Heading_;this.Speed=Speed_;});AW=$pkg.History=$newType(8,$kindInterface,"dom.History","History","honnef.co/go/js/dom",null);AX=$pkg.Console=$newType(0,$kindStruct,"dom.Console","Console","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});AZ=$pkg.DocumentType=$newType(8,$kindInterface,"dom.DocumentType","DocumentType","honnef.co/go/js/dom",null);BA=$pkg.DOMImplementation=$newType(8,$kindInterface,"dom.DOMImplementation","DOMImplementation","honnef.co/go/js/dom",null);BB=$pkg.StyleSheet=$newType(8,$kindInterface,"dom.StyleSheet","StyleSheet","honnef.co/go/js/dom",null);BD=$pkg.Node=$newType(8,$kindInterface,"dom.Node","Node","honnef.co/go/js/dom",null);BE=$pkg.BasicNode=$newType(0,$kindStruct,"dom.BasicNode","BasicNode","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});BF=$pkg.Element=$newType(8,$kindInterface,"dom.Element","Element","honnef.co/go/js/dom",null);BG=$pkg.ClientRect=$newType(0,$kindStruct,"dom.ClientRect","ClientRect","honnef.co/go/js/dom",function(Object_,Height_,Width_,Left_,Right_,Top_,Bottom_){this.$val=this;if(arguments.length===0){this.Object=null;this.Height=0;this.Width=0;this.Left=0;this.Right=0;this.Top=0;this.Bottom=0;return;}this.Object=Object_;this.Height=Height_;this.Width=Width_;this.Left=Left_;this.Right=Right_;this.Top=Top_;this.Bottom=Bottom_;});BJ=$pkg.BasicHTMLElement=$newType(0,$kindStruct,"dom.BasicHTMLElement","BasicHTMLElement","honnef.co/go/js/dom",function(BasicElement_){this.$val=this;if(arguments.length===0){this.BasicElement=IH.nil;return;}this.BasicElement=BasicElement_;});BK=$pkg.BasicElement=$newType(0,$kindStruct,"dom.BasicElement","BasicElement","honnef.co/go/js/dom",function(BasicNode_){this.$val=this;if(arguments.length===0){this.BasicNode=HU.nil;return;}this.BasicNode=BasicNode_;});BL=$pkg.HTMLAnchorElement=$newType(0,$kindStruct,"dom.HTMLAnchorElement","HTMLAnchorElement","honnef.co/go/js/dom",function(BasicHTMLElement_,URLUtils_,HrefLang_,Media_,TabIndex_,Target_,Text_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.URLUtils=GK.nil;this.HrefLang="";this.Media="";this.TabIndex=0;this.Target="";this.Text="";this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.URLUtils=URLUtils_;this.HrefLang=HrefLang_;this.Media=Media_;this.TabIndex=TabIndex_;this.Target=Target_;this.Text=Text_;this.Type=Type_;});BM=$pkg.HTMLAppletElement=$newType(0,$kindStruct,"dom.HTMLAppletElement","HTMLAppletElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Alt_,Coords_,HrefLang_,Media_,Search_,Shape_,TabIndex_,Target_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Alt="";this.Coords="";this.HrefLang="";this.Media="";this.Search="";this.Shape="";this.TabIndex=0;this.Target="";this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Alt=Alt_;this.Coords=Coords_;this.HrefLang=HrefLang_;this.Media=Media_;this.Search=Search_;this.Shape=Shape_;this.TabIndex=TabIndex_;this.Target=Target_;this.Type=Type_;});BN=$pkg.HTMLAreaElement=$newType(0,$kindStruct,"dom.HTMLAreaElement","HTMLAreaElement","honnef.co/go/js/dom",function(BasicHTMLElement_,URLUtils_,Alt_,Coords_,HrefLang_,Media_,Search_,Shape_,TabIndex_,Target_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.URLUtils=GK.nil;this.Alt="";this.Coords="";this.HrefLang="";this.Media="";this.Search="";this.Shape="";this.TabIndex=0;this.Target="";this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.URLUtils=URLUtils_;this.Alt=Alt_;this.Coords=Coords_;this.HrefLang=HrefLang_;this.Media=Media_;this.Search=Search_;this.Shape=Shape_;this.TabIndex=TabIndex_;this.Target=Target_;this.Type=Type_;});BO=$pkg.HTMLAudioElement=$newType(0,$kindStruct,"dom.HTMLAudioElement","HTMLAudioElement","honnef.co/go/js/dom",function(HTMLMediaElement_){this.$val=this;if(arguments.length===0){this.HTMLMediaElement=GL.nil;return;}this.HTMLMediaElement=HTMLMediaElement_;});BP=$pkg.HTMLBRElement=$newType(0,$kindStruct,"dom.HTMLBRElement","HTMLBRElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});BQ=$pkg.HTMLBaseElement=$newType(0,$kindStruct,"dom.HTMLBaseElement","HTMLBaseElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});BR=$pkg.HTMLBodyElement=$newType(0,$kindStruct,"dom.HTMLBodyElement","HTMLBodyElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});BS=$pkg.ValidityState=$newType(0,$kindStruct,"dom.ValidityState","ValidityState","honnef.co/go/js/dom",function(Object_,CustomError_,PatternMismatch_,RangeOverflow_,RangeUnderflow_,StepMismatch_,TooLong_,TypeMismatch_,Valid_,ValueMissing_){this.$val=this;if(arguments.length===0){this.Object=null;this.CustomError=false;this.PatternMismatch=false;this.RangeOverflow=false;this.RangeUnderflow=false;this.StepMismatch=false;this.TooLong=false;this.TypeMismatch=false;this.Valid=false;this.ValueMissing=false;return;}this.Object=Object_;this.CustomError=CustomError_;this.PatternMismatch=PatternMismatch_;this.RangeOverflow=RangeOverflow_;this.RangeUnderflow=RangeUnderflow_;this.StepMismatch=StepMismatch_;this.TooLong=TooLong_;this.TypeMismatch=TypeMismatch_;this.Valid=Valid_;this.ValueMissing=ValueMissing_;});BT=$pkg.HTMLButtonElement=$newType(0,$kindStruct,"dom.HTMLButtonElement","HTMLButtonElement","honnef.co/go/js/dom",function(BasicHTMLElement_,AutoFocus_,Disabled_,FormAction_,FormEncType_,FormMethod_,FormNoValidate_,FormTarget_,Name_,TabIndex_,Type_,ValidationMessage_,Value_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.AutoFocus=false;this.Disabled=false;this.FormAction="";this.FormEncType="";this.FormMethod="";this.FormNoValidate=false;this.FormTarget="";this.Name="";this.TabIndex=0;this.Type="";this.ValidationMessage="";this.Value="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.AutoFocus=AutoFocus_;this.Disabled=Disabled_;this.FormAction=FormAction_;this.FormEncType=FormEncType_;this.FormMethod=FormMethod_;this.FormNoValidate=FormNoValidate_;this.FormTarget=FormTarget_;this.Name=Name_;this.TabIndex=TabIndex_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.Value=Value_;this.WillValidate=WillValidate_;});BU=$pkg.HTMLCanvasElement=$newType(0,$kindStruct,"dom.HTMLCanvasElement","HTMLCanvasElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Height_,Width_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Height=0;this.Width=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Height=Height_;this.Width=Width_;});BV=$pkg.CanvasRenderingContext2D=$newType(0,$kindStruct,"dom.CanvasRenderingContext2D","CanvasRenderingContext2D","honnef.co/go/js/dom",function(Object_,FillStyle_,StrokeStyle_,ShadowColor_,ShadowBlur_,ShadowOffsetX_,ShadowOffsetY_,LineCap_,LineJoin_,LineWidth_,MiterLimit_,Font_,TextAlign_,TextBaseline_,GlobalAlpha_,GlobalCompositeOperation_){this.$val=this;if(arguments.length===0){this.Object=null;this.FillStyle="";this.StrokeStyle="";this.ShadowColor="";this.ShadowBlur=0;this.ShadowOffsetX=0;this.ShadowOffsetY=0;this.LineCap="";this.LineJoin="";this.LineWidth=0;this.MiterLimit=0;this.Font="";this.TextAlign="";this.TextBaseline="";this.GlobalAlpha=0;this.GlobalCompositeOperation="";return;}this.Object=Object_;this.FillStyle=FillStyle_;this.StrokeStyle=StrokeStyle_;this.ShadowColor=ShadowColor_;this.ShadowBlur=ShadowBlur_;this.ShadowOffsetX=ShadowOffsetX_;this.ShadowOffsetY=ShadowOffsetY_;this.LineCap=LineCap_;this.LineJoin=LineJoin_;this.LineWidth=LineWidth_;this.MiterLimit=MiterLimit_;this.Font=Font_;this.TextAlign=TextAlign_;this.TextBaseline=TextBaseline_;this.GlobalAlpha=GlobalAlpha_;this.GlobalCompositeOperation=GlobalCompositeOperation_;});BW=$pkg.HTMLDListElement=$newType(0,$kindStruct,"dom.HTMLDListElement","HTMLDListElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});BX=$pkg.HTMLDataElement=$newType(0,$kindStruct,"dom.HTMLDataElement","HTMLDataElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Value_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Value="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Value=Value_;});BY=$pkg.HTMLDataListElement=$newType(0,$kindStruct,"dom.HTMLDataListElement","HTMLDataListElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});BZ=$pkg.HTMLDirectoryElement=$newType(0,$kindStruct,"dom.HTMLDirectoryElement","HTMLDirectoryElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CA=$pkg.HTMLDivElement=$newType(0,$kindStruct,"dom.HTMLDivElement","HTMLDivElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CB=$pkg.HTMLEmbedElement=$newType(0,$kindStruct,"dom.HTMLEmbedElement","HTMLEmbedElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Src_,Type_,Width_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Src="";this.Type="";this.Width="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Src=Src_;this.Type=Type_;this.Width=Width_;});CC=$pkg.HTMLFieldSetElement=$newType(0,$kindStruct,"dom.HTMLFieldSetElement","HTMLFieldSetElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Disabled_,Name_,Type_,ValidationMessage_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Disabled=false;this.Name="";this.Type="";this.ValidationMessage="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Disabled=Disabled_;this.Name=Name_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.WillValidate=WillValidate_;});CD=$pkg.HTMLFontElement=$newType(0,$kindStruct,"dom.HTMLFontElement","HTMLFontElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CE=$pkg.HTMLFormElement=$newType(0,$kindStruct,"dom.HTMLFormElement","HTMLFormElement","honnef.co/go/js/dom",function(BasicHTMLElement_,AcceptCharset_,Action_,Autocomplete_,Encoding_,Enctype_,Length_,Method_,Name_,NoValidate_,Target_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.AcceptCharset="";this.Action="";this.Autocomplete="";this.Encoding="";this.Enctype="";this.Length=0;this.Method="";this.Name="";this.NoValidate=false;this.Target="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.AcceptCharset=AcceptCharset_;this.Action=Action_;this.Autocomplete=Autocomplete_;this.Encoding=Encoding_;this.Enctype=Enctype_;this.Length=Length_;this.Method=Method_;this.Name=Name_;this.NoValidate=NoValidate_;this.Target=Target_;});CF=$pkg.HTMLFrameElement=$newType(0,$kindStruct,"dom.HTMLFrameElement","HTMLFrameElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CG=$pkg.HTMLFrameSetElement=$newType(0,$kindStruct,"dom.HTMLFrameSetElement","HTMLFrameSetElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CH=$pkg.HTMLHRElement=$newType(0,$kindStruct,"dom.HTMLHRElement","HTMLHRElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CI=$pkg.HTMLHeadElement=$newType(0,$kindStruct,"dom.HTMLHeadElement","HTMLHeadElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CJ=$pkg.HTMLHeadingElement=$newType(0,$kindStruct,"dom.HTMLHeadingElement","HTMLHeadingElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CK=$pkg.HTMLHtmlElement=$newType(0,$kindStruct,"dom.HTMLHtmlElement","HTMLHtmlElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CL=$pkg.HTMLIFrameElement=$newType(0,$kindStruct,"dom.HTMLIFrameElement","HTMLIFrameElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Width_,Height_,Name_,Src_,SrcDoc_,Seamless_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Width="";this.Height="";this.Name="";this.Src="";this.SrcDoc="";this.Seamless=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Width=Width_;this.Height=Height_;this.Name=Name_;this.Src=Src_;this.SrcDoc=SrcDoc_;this.Seamless=Seamless_;});CM=$pkg.HTMLImageElement=$newType(0,$kindStruct,"dom.HTMLImageElement","HTMLImageElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Complete_,CrossOrigin_,Height_,IsMap_,NaturalHeight_,NaturalWidth_,Src_,UseMap_,Width_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Complete=false;this.CrossOrigin="";this.Height=0;this.IsMap=false;this.NaturalHeight=0;this.NaturalWidth=0;this.Src="";this.UseMap="";this.Width=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Complete=Complete_;this.CrossOrigin=CrossOrigin_;this.Height=Height_;this.IsMap=IsMap_;this.NaturalHeight=NaturalHeight_;this.NaturalWidth=NaturalWidth_;this.Src=Src_;this.UseMap=UseMap_;this.Width=Width_;});CN=$pkg.HTMLInputElement=$newType(0,$kindStruct,"dom.HTMLInputElement","HTMLInputElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Accept_,Alt_,Autocomplete_,Autofocus_,Checked_,DefaultChecked_,DefaultValue_,DirName_,Disabled_,FormAction_,FormEncType_,FormMethod_,FormNoValidate_,FormTarget_,Height_,Indeterminate_,Max_,MaxLength_,Min_,Multiple_,Name_,Pattern_,Placeholder_,ReadOnly_,Required_,SelectionDirection_,SelectionEnd_,SelectionStart_,Size_,Src_,Step_,TabIndex_,Type_,ValidationMessage_,Value_,ValueAsDate_,ValueAsNumber_,Width_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Accept="";this.Alt="";this.Autocomplete="";this.Autofocus=false;this.Checked=false;this.DefaultChecked=false;this.DefaultValue="";this.DirName="";this.Disabled=false;this.FormAction="";this.FormEncType="";this.FormMethod="";this.FormNoValidate=false;this.FormTarget="";this.Height="";this.Indeterminate=false;this.Max="";this.MaxLength=0;this.Min="";this.Multiple=false;this.Name="";this.Pattern="";this.Placeholder="";this.ReadOnly=false;this.Required=false;this.SelectionDirection="";this.SelectionEnd=0;this.SelectionStart=0;this.Size=0;this.Src="";this.Step="";this.TabIndex=0;this.Type="";this.ValidationMessage="";this.Value="";this.ValueAsDate=new B.Time.ptr(new $Int64(0,0),0,GM.nil);this.ValueAsNumber=0;this.Width="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Accept=Accept_;this.Alt=Alt_;this.Autocomplete=Autocomplete_;this.Autofocus=Autofocus_;this.Checked=Checked_;this.DefaultChecked=DefaultChecked_;this.DefaultValue=DefaultValue_;this.DirName=DirName_;this.Disabled=Disabled_;this.FormAction=FormAction_;this.FormEncType=FormEncType_;this.FormMethod=FormMethod_;this.FormNoValidate=FormNoValidate_;this.FormTarget=FormTarget_;this.Height=Height_;this.Indeterminate=Indeterminate_;this.Max=Max_;this.MaxLength=MaxLength_;this.Min=Min_;this.Multiple=Multiple_;this.Name=Name_;this.Pattern=Pattern_;this.Placeholder=Placeholder_;this.ReadOnly=ReadOnly_;this.Required=Required_;this.SelectionDirection=SelectionDirection_;this.SelectionEnd=SelectionEnd_;this.SelectionStart=SelectionStart_;this.Size=Size_;this.Src=Src_;this.Step=Step_;this.TabIndex=TabIndex_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.Value=Value_;this.ValueAsDate=ValueAsDate_;this.ValueAsNumber=ValueAsNumber_;this.Width=Width_;this.WillValidate=WillValidate_;});CO=$pkg.File=$newType(0,$kindStruct,"dom.File","File","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});CP=$pkg.HTMLKeygenElement=$newType(0,$kindStruct,"dom.HTMLKeygenElement","HTMLKeygenElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Autofocus_,Challenge_,Disabled_,Keytype_,Name_,Type_,ValidationMessage_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Autofocus=false;this.Challenge="";this.Disabled=false;this.Keytype="";this.Name="";this.Type="";this.ValidationMessage="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Autofocus=Autofocus_;this.Challenge=Challenge_;this.Disabled=Disabled_;this.Keytype=Keytype_;this.Name=Name_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.WillValidate=WillValidate_;});CQ=$pkg.HTMLLIElement=$newType(0,$kindStruct,"dom.HTMLLIElement","HTMLLIElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Value_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Value=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Value=Value_;});CR=$pkg.HTMLLabelElement=$newType(0,$kindStruct,"dom.HTMLLabelElement","HTMLLabelElement","honnef.co/go/js/dom",function(BasicHTMLElement_,For_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.For="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.For=For_;});CS=$pkg.HTMLLegendElement=$newType(0,$kindStruct,"dom.HTMLLegendElement","HTMLLegendElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CT=$pkg.HTMLLinkElement=$newType(0,$kindStruct,"dom.HTMLLinkElement","HTMLLinkElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Disabled_,Href_,HrefLang_,Media_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Disabled=false;this.Href="";this.HrefLang="";this.Media="";this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Disabled=Disabled_;this.Href=Href_;this.HrefLang=HrefLang_;this.Media=Media_;this.Type=Type_;});CU=$pkg.HTMLMapElement=$newType(0,$kindStruct,"dom.HTMLMapElement","HTMLMapElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Name_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Name="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Name=Name_;});CV=$pkg.HTMLMediaElement=$newType(0,$kindStruct,"dom.HTMLMediaElement","HTMLMediaElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CW=$pkg.HTMLMenuElement=$newType(0,$kindStruct,"dom.HTMLMenuElement","HTMLMenuElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});CX=$pkg.HTMLMetaElement=$newType(0,$kindStruct,"dom.HTMLMetaElement","HTMLMetaElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Content_,HTTPEquiv_,Name_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Content="";this.HTTPEquiv="";this.Name="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Content=Content_;this.HTTPEquiv=HTTPEquiv_;this.Name=Name_;});CY=$pkg.HTMLMeterElement=$newType(0,$kindStruct,"dom.HTMLMeterElement","HTMLMeterElement","honnef.co/go/js/dom",function(BasicHTMLElement_,High_,Low_,Max_,Min_,Optimum_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.High=0;this.Low=0;this.Max=0;this.Min=0;this.Optimum=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.High=High_;this.Low=Low_;this.Max=Max_;this.Min=Min_;this.Optimum=Optimum_;});CZ=$pkg.HTMLModElement=$newType(0,$kindStruct,"dom.HTMLModElement","HTMLModElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Cite_,DateTime_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Cite="";this.DateTime="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Cite=Cite_;this.DateTime=DateTime_;});DA=$pkg.HTMLOListElement=$newType(0,$kindStruct,"dom.HTMLOListElement","HTMLOListElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Reversed_,Start_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Reversed=false;this.Start=0;this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Reversed=Reversed_;this.Start=Start_;this.Type=Type_;});DB=$pkg.HTMLObjectElement=$newType(0,$kindStruct,"dom.HTMLObjectElement","HTMLObjectElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Data_,Height_,Name_,TabIndex_,Type_,TypeMustMatch_,UseMap_,ValidationMessage_,With_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Data="";this.Height="";this.Name="";this.TabIndex=0;this.Type="";this.TypeMustMatch=false;this.UseMap="";this.ValidationMessage="";this.With="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Data=Data_;this.Height=Height_;this.Name=Name_;this.TabIndex=TabIndex_;this.Type=Type_;this.TypeMustMatch=TypeMustMatch_;this.UseMap=UseMap_;this.ValidationMessage=ValidationMessage_;this.With=With_;this.WillValidate=WillValidate_;});DC=$pkg.HTMLOptGroupElement=$newType(0,$kindStruct,"dom.HTMLOptGroupElement","HTMLOptGroupElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Disabled_,Label_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Disabled=false;this.Label="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Disabled=Disabled_;this.Label=Label_;});DD=$pkg.HTMLOptionElement=$newType(0,$kindStruct,"dom.HTMLOptionElement","HTMLOptionElement","honnef.co/go/js/dom",function(BasicHTMLElement_,DefaultSelected_,Disabled_,Index_,Label_,Selected_,Text_,Value_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.DefaultSelected=false;this.Disabled=false;this.Index=0;this.Label="";this.Selected=false;this.Text="";this.Value="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.DefaultSelected=DefaultSelected_;this.Disabled=Disabled_;this.Index=Index_;this.Label=Label_;this.Selected=Selected_;this.Text=Text_;this.Value=Value_;});DE=$pkg.HTMLOutputElement=$newType(0,$kindStruct,"dom.HTMLOutputElement","HTMLOutputElement","honnef.co/go/js/dom",function(BasicHTMLElement_,DefaultValue_,Name_,Type_,ValidationMessage_,Value_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.DefaultValue="";this.Name="";this.Type="";this.ValidationMessage="";this.Value="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.DefaultValue=DefaultValue_;this.Name=Name_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.Value=Value_;this.WillValidate=WillValidate_;});DF=$pkg.HTMLParagraphElement=$newType(0,$kindStruct,"dom.HTMLParagraphElement","HTMLParagraphElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DG=$pkg.HTMLParamElement=$newType(0,$kindStruct,"dom.HTMLParamElement","HTMLParamElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Name_,Value_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Name="";this.Value="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Name=Name_;this.Value=Value_;});DH=$pkg.HTMLPreElement=$newType(0,$kindStruct,"dom.HTMLPreElement","HTMLPreElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DI=$pkg.HTMLProgressElement=$newType(0,$kindStruct,"dom.HTMLProgressElement","HTMLProgressElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Max_,Position_,Value_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Max=0;this.Position=0;this.Value=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Max=Max_;this.Position=Position_;this.Value=Value_;});DJ=$pkg.HTMLQuoteElement=$newType(0,$kindStruct,"dom.HTMLQuoteElement","HTMLQuoteElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Cite_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Cite="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Cite=Cite_;});DK=$pkg.HTMLScriptElement=$newType(0,$kindStruct,"dom.HTMLScriptElement","HTMLScriptElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Type_,Src_,Charset_,Async_,Defer_,Text_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Type="";this.Src="";this.Charset="";this.Async=false;this.Defer=false;this.Text="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Type=Type_;this.Src=Src_;this.Charset=Charset_;this.Async=Async_;this.Defer=Defer_;this.Text=Text_;});DL=$pkg.HTMLSelectElement=$newType(0,$kindStruct,"dom.HTMLSelectElement","HTMLSelectElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Autofocus_,Disabled_,Length_,Multiple_,Name_,Required_,SelectedIndex_,Size_,Type_,ValidationMessage_,Value_,WillValidate_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Autofocus=false;this.Disabled=false;this.Length=0;this.Multiple=false;this.Name="";this.Required=false;this.SelectedIndex=0;this.Size=0;this.Type="";this.ValidationMessage="";this.Value="";this.WillValidate=false;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Autofocus=Autofocus_;this.Disabled=Disabled_;this.Length=Length_;this.Multiple=Multiple_;this.Name=Name_;this.Required=Required_;this.SelectedIndex=SelectedIndex_;this.Size=Size_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.Value=Value_;this.WillValidate=WillValidate_;});DM=$pkg.HTMLSourceElement=$newType(0,$kindStruct,"dom.HTMLSourceElement","HTMLSourceElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Media_,Src_,Type_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Media="";this.Src="";this.Type="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Media=Media_;this.Src=Src_;this.Type=Type_;});DN=$pkg.HTMLSpanElement=$newType(0,$kindStruct,"dom.HTMLSpanElement","HTMLSpanElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DO=$pkg.HTMLStyleElement=$newType(0,$kindStruct,"dom.HTMLStyleElement","HTMLStyleElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DP=$pkg.HTMLTableCaptionElement=$newType(0,$kindStruct,"dom.HTMLTableCaptionElement","HTMLTableCaptionElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DQ=$pkg.HTMLTableCellElement=$newType(0,$kindStruct,"dom.HTMLTableCellElement","HTMLTableCellElement","honnef.co/go/js/dom",function(BasicHTMLElement_,ColSpan_,RowSpan_,CellIndex_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.ColSpan=0;this.RowSpan=0;this.CellIndex=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.ColSpan=ColSpan_;this.RowSpan=RowSpan_;this.CellIndex=CellIndex_;});DR=$pkg.HTMLTableColElement=$newType(0,$kindStruct,"dom.HTMLTableColElement","HTMLTableColElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Span_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Span=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Span=Span_;});DS=$pkg.HTMLTableDataCellElement=$newType(0,$kindStruct,"dom.HTMLTableDataCellElement","HTMLTableDataCellElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DT=$pkg.HTMLTableElement=$newType(0,$kindStruct,"dom.HTMLTableElement","HTMLTableElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DU=$pkg.HTMLTableHeaderCellElement=$newType(0,$kindStruct,"dom.HTMLTableHeaderCellElement","HTMLTableHeaderCellElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Abbr_,Scope_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Abbr="";this.Scope="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Abbr=Abbr_;this.Scope=Scope_;});DV=$pkg.HTMLTableRowElement=$newType(0,$kindStruct,"dom.HTMLTableRowElement","HTMLTableRowElement","honnef.co/go/js/dom",function(BasicHTMLElement_,RowIndex_,SectionRowIndex_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.RowIndex=0;this.SectionRowIndex=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.RowIndex=RowIndex_;this.SectionRowIndex=SectionRowIndex_;});DW=$pkg.HTMLTableSectionElement=$newType(0,$kindStruct,"dom.HTMLTableSectionElement","HTMLTableSectionElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});DX=$pkg.HTMLTextAreaElement=$newType(0,$kindStruct,"dom.HTMLTextAreaElement","HTMLTextAreaElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Autocomplete_,Autofocus_,Cols_,DefaultValue_,DirName_,Disabled_,MaxLength_,Name_,Placeholder_,ReadOnly_,Required_,Rows_,SelectionDirection_,SelectionStart_,SelectionEnd_,TabIndex_,TextLength_,Type_,ValidationMessage_,Value_,WillValidate_,Wrap_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Autocomplete="";this.Autofocus=false;this.Cols=0;this.DefaultValue="";this.DirName="";this.Disabled=false;this.MaxLength=0;this.Name="";this.Placeholder="";this.ReadOnly=false;this.Required=false;this.Rows=0;this.SelectionDirection="";this.SelectionStart=0;this.SelectionEnd=0;this.TabIndex=0;this.TextLength=0;this.Type="";this.ValidationMessage="";this.Value="";this.WillValidate=false;this.Wrap="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Autocomplete=Autocomplete_;this.Autofocus=Autofocus_;this.Cols=Cols_;this.DefaultValue=DefaultValue_;this.DirName=DirName_;this.Disabled=Disabled_;this.MaxLength=MaxLength_;this.Name=Name_;this.Placeholder=Placeholder_;this.ReadOnly=ReadOnly_;this.Required=Required_;this.Rows=Rows_;this.SelectionDirection=SelectionDirection_;this.SelectionStart=SelectionStart_;this.SelectionEnd=SelectionEnd_;this.TabIndex=TabIndex_;this.TextLength=TextLength_;this.Type=Type_;this.ValidationMessage=ValidationMessage_;this.Value=Value_;this.WillValidate=WillValidate_;this.Wrap=Wrap_;});DY=$pkg.HTMLTimeElement=$newType(0,$kindStruct,"dom.HTMLTimeElement","HTMLTimeElement","honnef.co/go/js/dom",function(BasicHTMLElement_,DateTime_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.DateTime="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.DateTime=DateTime_;});DZ=$pkg.HTMLTitleElement=$newType(0,$kindStruct,"dom.HTMLTitleElement","HTMLTitleElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Text_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Text="";return;}this.BasicHTMLElement=BasicHTMLElement_;this.Text=Text_;});EA=$pkg.TextTrack=$newType(0,$kindStruct,"dom.TextTrack","TextTrack","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});EB=$pkg.HTMLTrackElement=$newType(0,$kindStruct,"dom.HTMLTrackElement","HTMLTrackElement","honnef.co/go/js/dom",function(BasicHTMLElement_,Kind_,Src_,Srclang_,Label_,Default_,ReadyState_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;this.Kind="";this.Src="";this.Srclang="";this.Label="";this.Default=false;this.ReadyState=0;return;}this.BasicHTMLElement=BasicHTMLElement_;this.Kind=Kind_;this.Src=Src_;this.Srclang=Srclang_;this.Label=Label_;this.Default=Default_;this.ReadyState=ReadyState_;});EC=$pkg.HTMLUListElement=$newType(0,$kindStruct,"dom.HTMLUListElement","HTMLUListElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});ED=$pkg.HTMLUnknownElement=$newType(0,$kindStruct,"dom.HTMLUnknownElement","HTMLUnknownElement","honnef.co/go/js/dom",function(BasicHTMLElement_){this.$val=this;if(arguments.length===0){this.BasicHTMLElement=GJ.nil;return;}this.BasicHTMLElement=BasicHTMLElement_;});EE=$pkg.HTMLVideoElement=$newType(0,$kindStruct,"dom.HTMLVideoElement","HTMLVideoElement","honnef.co/go/js/dom",function(HTMLMediaElement_){this.$val=this;if(arguments.length===0){this.HTMLMediaElement=GL.nil;return;}this.HTMLMediaElement=HTMLMediaElement_;});EF=$pkg.CSSStyleDeclaration=$newType(0,$kindStruct,"dom.CSSStyleDeclaration","CSSStyleDeclaration","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});EG=$pkg.Text=$newType(0,$kindStruct,"dom.Text","Text","honnef.co/go/js/dom",function(BasicNode_){this.$val=this;if(arguments.length===0){this.BasicNode=HU.nil;return;}this.BasicNode=BasicNode_;});EJ=$pkg.Event=$newType(8,$kindInterface,"dom.Event","Event","honnef.co/go/js/dom",null);EK=$pkg.BasicEvent=$newType(0,$kindStruct,"dom.BasicEvent","BasicEvent","honnef.co/go/js/dom",function(Object_){this.$val=this;if(arguments.length===0){this.Object=null;return;}this.Object=Object_;});EL=$pkg.AnimationEvent=$newType(0,$kindStruct,"dom.AnimationEvent","AnimationEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EM=$pkg.AudioProcessingEvent=$newType(0,$kindStruct,"dom.AudioProcessingEvent","AudioProcessingEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EN=$pkg.BeforeInputEvent=$newType(0,$kindStruct,"dom.BeforeInputEvent","BeforeInputEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EO=$pkg.BeforeUnloadEvent=$newType(0,$kindStruct,"dom.BeforeUnloadEvent","BeforeUnloadEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EP=$pkg.BlobEvent=$newType(0,$kindStruct,"dom.BlobEvent","BlobEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EQ=$pkg.ClipboardEvent=$newType(0,$kindStruct,"dom.ClipboardEvent","ClipboardEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});ER=$pkg.CloseEvent=$newType(0,$kindStruct,"dom.CloseEvent","CloseEvent","honnef.co/go/js/dom",function(BasicEvent_,Code_,Reason_,WasClean_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;this.Code=0;this.Reason="";this.WasClean=false;return;}this.BasicEvent=BasicEvent_;this.Code=Code_;this.Reason=Reason_;this.WasClean=WasClean_;});ES=$pkg.CompositionEvent=$newType(0,$kindStruct,"dom.CompositionEvent","CompositionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});ET=$pkg.CSSFontFaceLoadEvent=$newType(0,$kindStruct,"dom.CSSFontFaceLoadEvent","CSSFontFaceLoadEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EU=$pkg.CustomEvent=$newType(0,$kindStruct,"dom.CustomEvent","CustomEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EV=$pkg.DeviceLightEvent=$newType(0,$kindStruct,"dom.DeviceLightEvent","DeviceLightEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EW=$pkg.DeviceMotionEvent=$newType(0,$kindStruct,"dom.DeviceMotionEvent","DeviceMotionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EX=$pkg.DeviceOrientationEvent=$newType(0,$kindStruct,"dom.DeviceOrientationEvent","DeviceOrientationEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EY=$pkg.DeviceProximityEvent=$newType(0,$kindStruct,"dom.DeviceProximityEvent","DeviceProximityEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});EZ=$pkg.DOMTransactionEvent=$newType(0,$kindStruct,"dom.DOMTransactionEvent","DOMTransactionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FA=$pkg.DragEvent=$newType(0,$kindStruct,"dom.DragEvent","DragEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FB=$pkg.EditingBeforeInputEvent=$newType(0,$kindStruct,"dom.EditingBeforeInputEvent","EditingBeforeInputEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FC=$pkg.ErrorEvent=$newType(0,$kindStruct,"dom.ErrorEvent","ErrorEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FD=$pkg.FocusEvent=$newType(0,$kindStruct,"dom.FocusEvent","FocusEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FE=$pkg.GamepadEvent=$newType(0,$kindStruct,"dom.GamepadEvent","GamepadEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FF=$pkg.HashChangeEvent=$newType(0,$kindStruct,"dom.HashChangeEvent","HashChangeEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FG=$pkg.IDBVersionChangeEvent=$newType(0,$kindStruct,"dom.IDBVersionChangeEvent","IDBVersionChangeEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FH=$pkg.KeyboardEvent=$newType(0,$kindStruct,"dom.KeyboardEvent","KeyboardEvent","honnef.co/go/js/dom",function(BasicEvent_,AltKey_,CharCode_,CtrlKey_,Key_,KeyIdentifier_,KeyCode_,Locale_,Location_,KeyLocation_,MetaKey_,Repeat_,ShiftKey_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;this.AltKey=false;this.CharCode=0;this.CtrlKey=false;this.Key="";this.KeyIdentifier="";this.KeyCode=0;this.Locale="";this.Location=0;this.KeyLocation=0;this.MetaKey=false;this.Repeat=false;this.ShiftKey=false;return;}this.BasicEvent=BasicEvent_;this.AltKey=AltKey_;this.CharCode=CharCode_;this.CtrlKey=CtrlKey_;this.Key=Key_;this.KeyIdentifier=KeyIdentifier_;this.KeyCode=KeyCode_;this.Locale=Locale_;this.Location=Location_;this.KeyLocation=KeyLocation_;this.MetaKey=MetaKey_;this.Repeat=Repeat_;this.ShiftKey=ShiftKey_;});FI=$pkg.MediaStreamEvent=$newType(0,$kindStruct,"dom.MediaStreamEvent","MediaStreamEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FJ=$pkg.MessageEvent=$newType(0,$kindStruct,"dom.MessageEvent","MessageEvent","honnef.co/go/js/dom",function(BasicEvent_,Data_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;this.Data=null;return;}this.BasicEvent=BasicEvent_;this.Data=Data_;});FK=$pkg.MouseEvent=$newType(0,$kindStruct,"dom.MouseEvent","MouseEvent","honnef.co/go/js/dom",function(UIEvent_,AltKey_,Button_,ClientX_,ClientY_,CtrlKey_,MetaKey_,MovementX_,MovementY_,ScreenX_,ScreenY_,ShiftKey_){this.$val=this;if(arguments.length===0){this.UIEvent=HP.nil;this.AltKey=false;this.Button=0;this.ClientX=0;this.ClientY=0;this.CtrlKey=false;this.MetaKey=false;this.MovementX=0;this.MovementY=0;this.ScreenX=0;this.ScreenY=0;this.ShiftKey=false;return;}this.UIEvent=UIEvent_;this.AltKey=AltKey_;this.Button=Button_;this.ClientX=ClientX_;this.ClientY=ClientY_;this.CtrlKey=CtrlKey_;this.MetaKey=MetaKey_;this.MovementX=MovementX_;this.MovementY=MovementY_;this.ScreenX=ScreenX_;this.ScreenY=ScreenY_;this.ShiftKey=ShiftKey_;});FL=$pkg.MutationEvent=$newType(0,$kindStruct,"dom.MutationEvent","MutationEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FM=$pkg.OfflineAudioCompletionEvent=$newType(0,$kindStruct,"dom.OfflineAudioCompletionEvent","OfflineAudioCompletionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FN=$pkg.PageTransitionEvent=$newType(0,$kindStruct,"dom.PageTransitionEvent","PageTransitionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FO=$pkg.PointerEvent=$newType(0,$kindStruct,"dom.PointerEvent","PointerEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FP=$pkg.PopStateEvent=$newType(0,$kindStruct,"dom.PopStateEvent","PopStateEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FQ=$pkg.ProgressEvent=$newType(0,$kindStruct,"dom.ProgressEvent","ProgressEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FR=$pkg.RelatedEvent=$newType(0,$kindStruct,"dom.RelatedEvent","RelatedEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FS=$pkg.RTCPeerConnectionIceEvent=$newType(0,$kindStruct,"dom.RTCPeerConnectionIceEvent","RTCPeerConnectionIceEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FT=$pkg.SensorEvent=$newType(0,$kindStruct,"dom.SensorEvent","SensorEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FU=$pkg.StorageEvent=$newType(0,$kindStruct,"dom.StorageEvent","StorageEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FV=$pkg.SVGEvent=$newType(0,$kindStruct,"dom.SVGEvent","SVGEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FW=$pkg.SVGZoomEvent=$newType(0,$kindStruct,"dom.SVGZoomEvent","SVGZoomEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FX=$pkg.TimeEvent=$newType(0,$kindStruct,"dom.TimeEvent","TimeEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FY=$pkg.TouchEvent=$newType(0,$kindStruct,"dom.TouchEvent","TouchEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});FZ=$pkg.TrackEvent=$newType(0,$kindStruct,"dom.TrackEvent","TrackEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});GA=$pkg.TransitionEvent=$newType(0,$kindStruct,"dom.TransitionEvent","TransitionEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});GB=$pkg.UIEvent=$newType(0,$kindStruct,"dom.UIEvent","UIEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});GC=$pkg.UserProximityEvent=$newType(0,$kindStruct,"dom.UserProximityEvent","UserProximityEvent","honnef.co/go/js/dom",function(BasicEvent_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;return;}this.BasicEvent=BasicEvent_;});GD=$pkg.WheelEvent=$newType(0,$kindStruct,"dom.WheelEvent","WheelEvent","honnef.co/go/js/dom",function(BasicEvent_,DeltaX_,DeltaY_,DeltaZ_,DeltaMode_){this.$val=this;if(arguments.length===0){this.BasicEvent=HO.nil;this.DeltaX=0;this.DeltaY=0;this.DeltaZ=0;this.DeltaMode=0;return;}this.BasicEvent=BasicEvent_;this.DeltaX=DeltaX_;this.DeltaY=DeltaY_;this.DeltaZ=DeltaZ_;this.DeltaMode=DeltaMode_;});GF=$sliceType($emptyInterface);GG=$sliceType(BD);GH=$sliceType(BF);GI=$sliceType(AE);GJ=$ptrType(BJ);GK=$ptrType(AC);GL=$ptrType(CV);GM=$ptrType(B.Location);GN=$ptrType(CE);GO=$ptrType(CR);GP=$sliceType(GO);GQ=$ptrType(DD);GR=$sliceType(GQ);GS=$sliceType($String);GT=$sliceType(GN);GU=$ptrType(CI);GV=$ptrType(CM);GW=$sliceType(GV);GX=$ptrType(CB);GY=$sliceType(GX);GZ=$ptrType(DK);HA=$sliceType(GZ);HB=$ptrType(EG);HC=$funcType([],[],false);HD=$ptrType(C.Object);HE=$funcType([HD],[],false);HF=$ptrType(CO);HG=$sliceType(HF);HH=$ptrType(BY);HI=$ptrType(BN);HJ=$sliceType(HI);HK=$ptrType(DQ);HL=$sliceType(HK);HM=$ptrType(DV);HN=$sliceType(HM);HO=$ptrType(EK);HP=$ptrType(GB);HQ=$ptrType(V);HR=$funcType([EJ],[],false);HS=$sliceType(BB);HT=$ptrType(AD);HU=$ptrType(BE);HV=$ptrType(AA);HW=$ptrType(AB);HX=$mapType($String,$String);HY=$ptrType(EF);HZ=$ptrType(AX);IA=$funcType([B.Duration],[],false);IB=$ptrType(AL);IC=$ptrType(AI);ID=$funcType([AU],[],false);IE=$funcType([AS],[],false);IF=$ptrType(AS);IG=$ptrType(AV);IH=$ptrType(BK);II=$ptrType(BL);IJ=$ptrType(BM);IK=$ptrType(BQ);IL=$ptrType(BS);IM=$ptrType(BT);IN=$ptrType(BV);IO=$ptrType(BU);IP=$ptrType(CC);IQ=$ptrType(CL);IR=$ptrType(CN);IS=$ptrType(CP);IT=$ptrType(CS);IU=$ptrType(CT);IV=$ptrType(CU);IW=$ptrType(DB);IX=$ptrType(DE);IY=$ptrType(DL);IZ=$ptrType(DW);JA=$ptrType(DX);JB=$ptrType(EA);JC=$ptrType(EB);JD=$ptrType(FH);JE=$ptrType(FK);D=function(a,b,c){var $ptr,a,b,c,d,e,$deferred;var $err=null;try{$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=$ifaceNil;$deferred.push([(function(){var $ptr,e,f,g,h;e=$recover();if($interfaceIsEqual(e,$ifaceNil)){return;}f=$assertType(e,$error,true);g=f[0];h=f[1];if(h&&!($interfaceIsEqual(g,$ifaceNil))){d=g;}else{$panic(e);}}),[]]);(e=a,e[$externalize(b,$String)].apply(e,$externalize(c,GF)));d=$ifaceNil;return d;}catch(err){$err=err;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return d;}}};E=function(a){var $ptr,a,b,c,d;b=GG.nil;c=$parseInt(a.length)>>0;d=0;while(true){if(!(d>0;}return b;};F=function(a){var $ptr,a,b,c,d;b=GH.nil;c=$parseInt(a.length)>>0;d=0;while(true){if(!(d>0;}return b;};G=function(a){var $ptr,a,b,c,d;b=GI.nil;c=$parseInt(a.length)>>0;d=0;while(true){if(!(d>0;}return b;};M=function(a){var $ptr,a,b;b=a.constructor;if(b===$global.HTMLDocument){return new AB.ptr(new AA.ptr(new BE.ptr(a)));}else{return new AA.ptr(new BE.ptr(a));}};N=function(a){var $ptr,a,b;b=a.constructor;return new Z.ptr(new BE.ptr(a));};O=function(a){var $ptr,a,b;if(a===null||a===undefined){return $ifaceNil;}b=a.constructor;if(b===$global.Text){return new EG.ptr(new BE.ptr(a));}else{return P(a);}};P=function(a){var $ptr,a,b;if(a===null||a===undefined){return $ifaceNil;}b=a.constructor;return Q(a);};Q=function(a){var $ptr,a,b,c,d;if(a===null||a===undefined){return $ifaceNil;}b=new BJ.ptr(new BK.ptr(new BE.ptr(a)));c=a.constructor;d=c;if(d===$global.HTMLAnchorElement){return new BL.ptr(b,new AC.ptr(a,"","","","","","","","","","",""),"","",0,"","","");}else if(d===$global.HTMLAppletElement){return new BM.ptr(b,"","","","","","",0,"","");}else if(d===$global.HTMLAreaElement){return new BN.ptr(b,new AC.ptr(a,"","","","","","","","","","",""),"","","","","","",0,"","");}else if(d===$global.HTMLAudioElement){return new BO.ptr(new CV.ptr(b));}else if(d===$global.HTMLBaseElement){return new BQ.ptr(b);}else if(d===$global.HTMLBodyElement){return new BR.ptr(b);}else if(d===$global.HTMLBRElement){return new BP.ptr(b);}else if(d===$global.HTMLButtonElement){return new BT.ptr(b,false,false,"","","",false,"","",0,"","","",false);}else if(d===$global.HTMLCanvasElement){return new BU.ptr(b,0,0);}else if(d===$global.HTMLDataElement){return new BX.ptr(b,"");}else if(d===$global.HTMLDataListElement){return new BY.ptr(b);}else if(d===$global.HTMLDirectoryElement){return new BZ.ptr(b);}else if(d===$global.HTMLDivElement){return new CA.ptr(b);}else if(d===$global.HTMLDListElement){return new BW.ptr(b);}else if(d===$global.HTMLEmbedElement){return new CB.ptr(b,"","","");}else if(d===$global.HTMLFieldSetElement){return new CC.ptr(b,false,"","","",false);}else if(d===$global.HTMLFontElement){return new CD.ptr(b);}else if(d===$global.HTMLFormElement){return new CE.ptr(b,"","","","","",0,"","",false,"");}else if(d===$global.HTMLFrameElement){return new CF.ptr(b);}else if(d===$global.HTMLFrameSetElement){return new CG.ptr(b);}else if(d===$global.HTMLHeadElement){return new CI.ptr(b);}else if(d===$global.HTMLHeadingElement){return new CJ.ptr(b);}else if(d===$global.HTMLHtmlElement){return new CK.ptr(b);}else if(d===$global.HTMLHRElement){return new CH.ptr(b);}else if(d===$global.HTMLIFrameElement){return new CL.ptr(b,"","","","","",false);}else if(d===$global.HTMLImageElement){return new CM.ptr(b,false,"",0,false,0,0,"","",0);}else if(d===$global.HTMLInputElement){return new CN.ptr(b,"","","",false,false,false,"","",false,"","","",false,"","",false,"",0,"",false,"","","",false,false,"",0,0,0,"","",0,"","","",new B.Time.ptr(new $Int64(0,0),0,GM.nil),0,"",false);}else if(d===$global.HTMLKeygenElement){return new CP.ptr(b,false,"",false,"","","","",false);}else if(d===$global.HTMLLabelElement){return new CR.ptr(b,"");}else if(d===$global.HTMLLegendElement){return new CS.ptr(b);}else if(d===$global.HTMLLIElement){return new CQ.ptr(b,0);}else if(d===$global.HTMLLinkElement){return new CT.ptr(b,false,"","","","");}else if(d===$global.HTMLMapElement){return new CU.ptr(b,"");}else if(d===$global.HTMLMediaElement){return new CV.ptr(b);}else if(d===$global.HTMLMenuElement){return new CW.ptr(b);}else if(d===$global.HTMLMetaElement){return new CX.ptr(b,"","","");}else if(d===$global.HTMLMeterElement){return new CY.ptr(b,0,0,0,0,0);}else if(d===$global.HTMLModElement){return new CZ.ptr(b,"","");}else if(d===$global.HTMLObjectElement){return new DB.ptr(b,"","","",0,"",false,"","","",false);}else if(d===$global.HTMLOListElement){return new DA.ptr(b,false,0,"");}else if(d===$global.HTMLOptGroupElement){return new DC.ptr(b,false,"");}else if(d===$global.HTMLOptionElement){return new DD.ptr(b,false,false,0,"",false,"","");}else if(d===$global.HTMLOutputElement){return new DE.ptr(b,"","","","","",false);}else if(d===$global.HTMLParagraphElement){return new DF.ptr(b);}else if(d===$global.HTMLParamElement){return new DG.ptr(b,"","");}else if(d===$global.HTMLPreElement){return new DH.ptr(b);}else if(d===$global.HTMLProgressElement){return new DI.ptr(b,0,0,0);}else if(d===$global.HTMLQuoteElement){return new DJ.ptr(b,"");}else if(d===$global.HTMLScriptElement){return new DK.ptr(b,"","","",false,false,"");}else if(d===$global.HTMLSelectElement){return new DL.ptr(b,false,false,0,false,"",false,0,0,"","","",false);}else if(d===$global.HTMLSourceElement){return new DM.ptr(b,"","","");}else if(d===$global.HTMLSpanElement){return new DN.ptr(b);}else if(d===$global.HTMLStyleElement){return new DO.ptr(b);}else if(d===$global.HTMLTableElement){return new DT.ptr(b);}else if(d===$global.HTMLTableCaptionElement){return new DP.ptr(b);}else if(d===$global.HTMLTableCellElement){return new DQ.ptr(b,0,0,0);}else if(d===$global.HTMLTableDataCellElement){return new DS.ptr(b);}else if(d===$global.HTMLTableHeaderCellElement){return new DU.ptr(b,"","");}else if(d===$global.HTMLTableColElement){return new DR.ptr(b,0);}else if(d===$global.HTMLTableRowElement){return new DV.ptr(b,0,0);}else if(d===$global.HTMLTableSectionElement){return new DW.ptr(b);}else if(d===$global.HTMLTextAreaElement){return new DX.ptr(b,"",false,0,"","",false,0,"","",false,false,0,"",0,0,0,0,"","","",false,"");}else if(d===$global.HTMLTimeElement){return new DY.ptr(b,"");}else if(d===$global.HTMLTitleElement){return new DZ.ptr(b,"");}else if(d===$global.HTMLTrackElement){return new EB.ptr(b,"","","","",false,0);}else if(d===$global.HTMLUListElement){return new EC.ptr(b);}else if(d===$global.HTMLUnknownElement){return new ED.ptr(b);}else if(d===$global.HTMLVideoElement){return new EE.ptr(new CV.ptr(b));}else if(d===$global.HTMLElement){return b;}else{return b;}};R=function(a){var $ptr,a,b;b=Q(a.form);if($interfaceIsEqual(b,$ifaceNil)){return GN.nil;}return $assertType(b,GN);};S=function(a){var $ptr,a,b,c,d,e,f,g;b=F(a.labels);c=$makeSlice(GP,b.$length);d=b;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=$assertType(g,GO));e++;}return c;};T=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=F(a[$externalize(b,$String)]);d=$makeSlice(GR,c.$length);e=c;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]=$assertType(h,GQ));f++;}return d;};U=function(){var $ptr;return new AI.ptr($global);};$pkg.GetWindow=U;V.ptr.prototype.Item=function(a){var $ptr,a,b,c;b=this;c=b.dtl.item(a);if(c===null||c===undefined){return"";}return $internalize(c,$String);};V.prototype.Item=function(a){return this.$val.Item(a);};V.ptr.prototype.Contains=function(a){var $ptr,a,b;b=this;return!!(b.dtl.contains($externalize(a,$String)));};V.prototype.Contains=function(a){return this.$val.Contains(a);};V.ptr.prototype.Add=function(a){var $ptr,a,b;b=this;b.dtl.add($externalize(a,$String));};V.prototype.Add=function(a){return this.$val.Add(a);};V.ptr.prototype.Remove=function(a){var $ptr,a,b;b=this;b.dtl.remove($externalize(a,$String));};V.prototype.Remove=function(a){return this.$val.Remove(a);};V.ptr.prototype.Toggle=function(a){var $ptr,a,b;b=this;b.dtl.toggle($externalize(a,$String));};V.prototype.Toggle=function(a){return this.$val.Toggle(a);};V.ptr.prototype.String=function(){var $ptr,a;a=this;if(!(a.sa==="")){return $internalize(a.o[$externalize(a.sa,$String)],$String);}if(a.dtl.constructor===$global.DOMSettableTokenList){return $internalize(a.dtl.value,$String);}return"";};V.prototype.String=function(){return this.$val.String();};V.ptr.prototype.Slice=function(){var $ptr,a,b,c,d;a=this;b=GS.nil;c=$parseInt(a.dtl.length)>>0;d=0;while(true){if(!(d>0;}return b;};V.prototype.Slice=function(){return this.$val.Slice();};V.ptr.prototype.SetString=function(a){var $ptr,a,b;b=this;if(!(b.sa==="")){b.o[$externalize(b.sa,$String)]=$externalize(a,$String);return;}if(b.dtl.constructor===$global.DOMSettableTokenList){b.dtl.value=$externalize(a,$String);return;}$panic(new $String("no way to SetString on this TokenList"));};V.prototype.SetString=function(a){return this.$val.SetString(a);};V.ptr.prototype.Set=function(a){var $ptr,a,b;b=this;b.SetString(A.Join(a," "));};V.prototype.Set=function(a){return this.$val.Set(a);};Z.ptr.prototype.GetElementByID=function(a){var $ptr,a,b;b=$clone(this,Z);return P(b.BasicNode.Object.getElementById($externalize(a,$String)));};Z.prototype.GetElementByID=function(a){return this.$val.GetElementByID(a);};Z.ptr.prototype.QuerySelector=function(a){var $ptr,a,b;b=$clone(this,Z);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).QuerySelector(a);};Z.prototype.QuerySelector=function(a){return this.$val.QuerySelector(a);};Z.ptr.prototype.QuerySelectorAll=function(a){var $ptr,a,b;b=$clone(this,Z);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).QuerySelectorAll(a);};Z.prototype.QuerySelectorAll=function(a){return this.$val.QuerySelectorAll(a);};AB.ptr.prototype.ActiveElement=function(){var $ptr,a;a=this;return Q(a.document.BasicNode.Object.activeElement);};AB.prototype.ActiveElement=function(){return this.$val.ActiveElement();};AB.ptr.prototype.Body=function(){var $ptr,a;a=this;return Q(a.document.BasicNode.Object.body);};AB.prototype.Body=function(){return this.$val.Body();};AB.ptr.prototype.Cookie=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.cookie,$String);};AB.prototype.Cookie=function(){return this.$val.Cookie();};AB.ptr.prototype.SetCookie=function(a){var $ptr,a,b;b=this;b.document.BasicNode.Object.cookie=$externalize(a,$String);};AB.prototype.SetCookie=function(a){return this.$val.SetCookie(a);};AB.ptr.prototype.DefaultView=function(){var $ptr,a;a=this;return new AI.ptr(a.document.BasicNode.Object.defaultView);};AB.prototype.DefaultView=function(){return this.$val.DefaultView();};AB.ptr.prototype.DesignMode=function(){var $ptr,a,b;a=this;b=$internalize(a.document.BasicNode.Object.designMode,$String);if(b==="off"){return false;}return true;};AB.prototype.DesignMode=function(){return this.$val.DesignMode();};AB.ptr.prototype.SetDesignMode=function(a){var $ptr,a,b,c;b=this;c="off";if(a){c="on";}b.document.BasicNode.Object.designMode=$externalize(c,$String);};AB.prototype.SetDesignMode=function(a){return this.$val.SetDesignMode(a);};AB.ptr.prototype.Domain=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.domain,$String);};AB.prototype.Domain=function(){return this.$val.Domain();};AB.ptr.prototype.SetDomain=function(a){var $ptr,a,b;b=this;b.document.BasicNode.Object.domain=$externalize(a,$String);};AB.prototype.SetDomain=function(a){return this.$val.SetDomain(a);};AB.ptr.prototype.Forms=function(){var $ptr,a,b,c,d,e;a=this;b=GT.nil;c=a.document.BasicNode.Object.forms;d=$parseInt(c.length)>>0;e=0;while(true){if(!(e>0;}return b;};AB.prototype.Forms=function(){return this.$val.Forms();};AB.ptr.prototype.Head=function(){var $ptr,a,b;a=this;b=P(a.document.BasicNode.Object.head);if($interfaceIsEqual(b,$ifaceNil)){return GU.nil;}return $assertType(b,GU);};AB.prototype.Head=function(){return this.$val.Head();};AB.ptr.prototype.Images=function(){var $ptr,a,b,c,d,e;a=this;b=GW.nil;c=a.document.BasicNode.Object.images;d=$parseInt(c.length)>>0;e=0;while(true){if(!(e>0;}return b;};AB.prototype.Images=function(){return this.$val.Images();};AB.ptr.prototype.LastModified=function(){var $ptr,a;a=this;return $assertType($internalize(a.document.BasicNode.Object.lastModified,$emptyInterface),B.Time);};AB.prototype.LastModified=function(){return this.$val.LastModified();};AB.ptr.prototype.Links=function(){var $ptr,a,b,c,d,e;a=this;b=GI.nil;c=a.document.BasicNode.Object.links;d=$parseInt(c.length)>>0;e=0;while(true){if(!(e>0;}return b;};AB.prototype.Links=function(){return this.$val.Links();};AB.ptr.prototype.Location=function(){var $ptr,a,b;a=this;b=a.document.BasicNode.Object.location;return new AD.ptr(b,new AC.ptr(b,"","","","","","","","","","",""));};AB.prototype.Location=function(){return this.$val.Location();};AB.ptr.prototype.Plugins=function(){var $ptr,a,b,c,d,e;a=this;b=GY.nil;c=a.document.BasicNode.Object.plugins;d=$parseInt(c.length)>>0;e=0;while(true){if(!(e>0;}return b;};AB.prototype.Plugins=function(){return this.$val.Plugins();};AB.ptr.prototype.ReadyState=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.readyState,$String);};AB.prototype.ReadyState=function(){return this.$val.ReadyState();};AB.ptr.prototype.Referrer=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.referrer,$String);};AB.prototype.Referrer=function(){return this.$val.Referrer();};AB.ptr.prototype.Scripts=function(){var $ptr,a,b,c,d,e;a=this;b=HA.nil;c=a.document.BasicNode.Object.scripts;d=$parseInt(c.length)>>0;e=0;while(true){if(!(e>0;}return b;};AB.prototype.Scripts=function(){return this.$val.Scripts();};AB.ptr.prototype.Title=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.title,$String);};AB.prototype.Title=function(){return this.$val.Title();};AB.ptr.prototype.SetTitle=function(a){var $ptr,a,b;b=this;b.document.BasicNode.Object.title=$externalize(a,$String);};AB.prototype.SetTitle=function(a){return this.$val.SetTitle(a);};AB.ptr.prototype.URL=function(){var $ptr,a;a=this;return $internalize(a.document.BasicNode.Object.url,$String);};AB.prototype.URL=function(){return this.$val.URL();};AA.ptr.prototype.Async=function(){var $ptr,a;a=$clone(this,AA);return!!(a.BasicNode.Object.async);};AA.prototype.Async=function(){return this.$val.Async();};AA.ptr.prototype.SetAsync=function(a){var $ptr,a,b;b=$clone(this,AA);b.BasicNode.Object.async=$externalize(a,$Bool);};AA.prototype.SetAsync=function(a){return this.$val.SetAsync(a);};AA.ptr.prototype.Doctype=function(){var $ptr,a;a=$clone(this,AA);$panic(new $String("not implemented"));};AA.prototype.Doctype=function(){return this.$val.Doctype();};AA.ptr.prototype.DocumentElement=function(){var $ptr,a;a=$clone(this,AA);return P(a.BasicNode.Object.documentElement);};AA.prototype.DocumentElement=function(){return this.$val.DocumentElement();};AA.ptr.prototype.DocumentURI=function(){var $ptr,a;a=$clone(this,AA);return $internalize(a.BasicNode.Object.documentURI,$String);};AA.prototype.DocumentURI=function(){return this.$val.DocumentURI();};AA.ptr.prototype.Implementation=function(){var $ptr,a;a=$clone(this,AA);$panic(new $String("not implemented"));};AA.prototype.Implementation=function(){return this.$val.Implementation();};AA.ptr.prototype.LastStyleSheetSet=function(){var $ptr,a;a=$clone(this,AA);return $internalize(a.BasicNode.Object.lastStyleSheetSet,$String);};AA.prototype.LastStyleSheetSet=function(){return this.$val.LastStyleSheetSet();};AA.ptr.prototype.PreferredStyleSheetSet=function(){var $ptr,a;a=$clone(this,AA);return $internalize(a.BasicNode.Object.preferredStyleSheetSet,$String);};AA.prototype.PreferredStyleSheetSet=function(){return this.$val.PreferredStyleSheetSet();};AA.ptr.prototype.SelectedStyleSheetSet=function(){var $ptr,a;a=$clone(this,AA);return $internalize(a.BasicNode.Object.selectedStyleSheetSet,$String);};AA.prototype.SelectedStyleSheetSet=function(){return this.$val.SelectedStyleSheetSet();};AA.ptr.prototype.StyleSheets=function(){var $ptr,a;a=$clone(this,AA);$panic(new $String("not implemented"));};AA.prototype.StyleSheets=function(){return this.$val.StyleSheets();};AA.ptr.prototype.StyleSheetSets=function(){var $ptr,a;a=$clone(this,AA);$panic(new $String("not implemented"));};AA.prototype.StyleSheetSets=function(){return this.$val.StyleSheetSets();};AA.ptr.prototype.AdoptNode=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(this,AA);c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=O(b.BasicNode.Object.adoptNode(c));$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AdoptNode};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AdoptNode=function(a){return this.$val.AdoptNode(a);};AA.ptr.prototype.ImportNode=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$clone(this,AA);d=a.Underlying();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=O(c.BasicNode.Object.importNode(d,$externalize(b,$Bool)));$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.ImportNode};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.ImportNode=function(a,b){return this.$val.ImportNode(a,b);};AA.ptr.prototype.CreateDocumentFragment=function(){var $ptr,a;a=$clone(this,AA);return N(a.BasicNode.Object.createDocumentFragment());};AA.prototype.CreateDocumentFragment=function(){return this.$val.CreateDocumentFragment();};AA.ptr.prototype.CreateElement=function(a){var $ptr,a,b;b=$clone(this,AA);return P(b.BasicNode.Object.createElement($externalize(a,$String)));};AA.prototype.CreateElement=function(a){return this.$val.CreateElement(a);};AA.ptr.prototype.CreateElementNS=function(a,b){var $ptr,a,b,c;c=$clone(this,AA);return P(c.BasicNode.Object.createElement($externalize(a,$String),$externalize(b,$String)));};AA.prototype.CreateElementNS=function(a,b){return this.$val.CreateElementNS(a,b);};AA.ptr.prototype.CreateTextNode=function(a){var $ptr,a,b;b=$clone(this,AA);return $assertType(O(b.BasicNode.Object.createTextNode($externalize(a,$String))),HB);};AA.prototype.CreateTextNode=function(a){return this.$val.CreateTextNode(a);};AA.ptr.prototype.ElementFromPoint=function(a,b){var $ptr,a,b,c;c=$clone(this,AA);return P(c.BasicNode.Object.elementFromPoint(a,b));};AA.prototype.ElementFromPoint=function(a,b){return this.$val.ElementFromPoint(a,b);};AA.ptr.prototype.EnableStyleSheetsForSet=function(a){var $ptr,a,b;b=$clone(this,AA);b.BasicNode.Object.enableStyleSheetsForSet($externalize(a,$String));};AA.prototype.EnableStyleSheetsForSet=function(a){return this.$val.EnableStyleSheetsForSet(a);};AA.ptr.prototype.GetElementsByClassName=function(a){var $ptr,a,b;b=$clone(this,AA);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).GetElementsByClassName(a);};AA.prototype.GetElementsByClassName=function(a){return this.$val.GetElementsByClassName(a);};AA.ptr.prototype.GetElementsByTagName=function(a){var $ptr,a,b;b=$clone(this,AA);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).GetElementsByTagName(a);};AA.prototype.GetElementsByTagName=function(a){return this.$val.GetElementsByTagName(a);};AA.ptr.prototype.GetElementsByTagNameNS=function(a,b){var $ptr,a,b,c;c=$clone(this,AA);return(new BK.ptr(new BE.ptr(c.BasicNode.Object))).GetElementsByTagNameNS(a,b);};AA.prototype.GetElementsByTagNameNS=function(a,b){return this.$val.GetElementsByTagNameNS(a,b);};AA.ptr.prototype.GetElementByID=function(a){var $ptr,a,b;b=$clone(this,AA);return P(b.BasicNode.Object.getElementById($externalize(a,$String)));};AA.prototype.GetElementByID=function(a){return this.$val.GetElementByID(a);};AA.ptr.prototype.QuerySelector=function(a){var $ptr,a,b;b=$clone(this,AA);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).QuerySelector(a);};AA.prototype.QuerySelector=function(a){return this.$val.QuerySelector(a);};AA.ptr.prototype.QuerySelectorAll=function(a){var $ptr,a,b;b=$clone(this,AA);return(new BK.ptr(new BE.ptr(b.BasicNode.Object))).QuerySelectorAll(a);};AA.prototype.QuerySelectorAll=function(a){return this.$val.QuerySelectorAll(a);};AI.ptr.prototype.Console=function(){var $ptr,a;a=this;return new AX.ptr(a.Object.console);};AI.prototype.Console=function(){return this.$val.Console();};AI.ptr.prototype.Document=function(){var $ptr,a;a=this;return M(a.Object.document);};AI.prototype.Document=function(){return this.$val.Document();};AI.ptr.prototype.FrameElement=function(){var $ptr,a;a=this;return P(a.Object.frameElement);};AI.prototype.FrameElement=function(){return this.$val.FrameElement();};AI.ptr.prototype.Location=function(){var $ptr,a,b;a=this;b=a.Object.location;return new AD.ptr(b,new AC.ptr(b,"","","","","","","","","","",""));};AI.prototype.Location=function(){return this.$val.Location();};AI.ptr.prototype.Name=function(){var $ptr,a;a=this;return $internalize(a.Object.name,$String);};AI.prototype.Name=function(){return this.$val.Name();};AI.ptr.prototype.SetName=function(a){var $ptr,a,b;b=this;b.Object.name=$externalize(a,$String);};AI.prototype.SetName=function(a){return this.$val.SetName(a);};AI.ptr.prototype.InnerHeight=function(){var $ptr,a;a=this;return $parseInt(a.Object.innerHeight)>>0;};AI.prototype.InnerHeight=function(){return this.$val.InnerHeight();};AI.ptr.prototype.InnerWidth=function(){var $ptr,a;a=this;return $parseInt(a.Object.innerWidth)>>0;};AI.prototype.InnerWidth=function(){return this.$val.InnerWidth();};AI.ptr.prototype.Length=function(){var $ptr,a;a=this;return $parseInt(a.Object.length)>>0;};AI.prototype.Length=function(){return this.$val.Length();};AI.ptr.prototype.Opener=function(){var $ptr,a;a=this;return new AI.ptr(a.Object.opener);};AI.prototype.Opener=function(){return this.$val.Opener();};AI.ptr.prototype.OuterHeight=function(){var $ptr,a;a=this;return $parseInt(a.Object.outerHeight)>>0;};AI.prototype.OuterHeight=function(){return this.$val.OuterHeight();};AI.ptr.prototype.OuterWidth=function(){var $ptr,a;a=this;return $parseInt(a.Object.outerWidth)>>0;};AI.prototype.OuterWidth=function(){return this.$val.OuterWidth();};AI.ptr.prototype.ScrollX=function(){var $ptr,a;a=this;return $parseInt(a.Object.scrollX)>>0;};AI.prototype.ScrollX=function(){return this.$val.ScrollX();};AI.ptr.prototype.ScrollY=function(){var $ptr,a;a=this;return $parseInt(a.Object.scrollY)>>0;};AI.prototype.ScrollY=function(){return this.$val.ScrollY();};AI.ptr.prototype.Parent=function(){var $ptr,a;a=this;return new AI.ptr(a.Object.parent);};AI.prototype.Parent=function(){return this.$val.Parent();};AI.ptr.prototype.ScreenX=function(){var $ptr,a;a=this;return $parseInt(a.Object.screenX)>>0;};AI.prototype.ScreenX=function(){return this.$val.ScreenX();};AI.ptr.prototype.ScreenY=function(){var $ptr,a;a=this;return $parseInt(a.Object.screenY)>>0;};AI.prototype.ScreenY=function(){return this.$val.ScreenY();};AI.ptr.prototype.ScrollMaxX=function(){var $ptr,a;a=this;return $parseInt(a.Object.scrollMaxX)>>0;};AI.prototype.ScrollMaxX=function(){return this.$val.ScrollMaxX();};AI.ptr.prototype.ScrollMaxY=function(){var $ptr,a;a=this;return $parseInt(a.Object.scrollMaxY)>>0;};AI.prototype.ScrollMaxY=function(){return this.$val.ScrollMaxY();};AI.ptr.prototype.Top=function(){var $ptr,a;a=this;return new AI.ptr(a.Object.top);};AI.prototype.Top=function(){return this.$val.Top();};AI.ptr.prototype.History=function(){var $ptr,a;a=this;return $ifaceNil;};AI.prototype.History=function(){return this.$val.History();};AI.ptr.prototype.Navigator=function(){var $ptr,a;a=this;$panic(new $String("not implemented"));};AI.prototype.Navigator=function(){return this.$val.Navigator();};AI.ptr.prototype.Screen=function(){var $ptr,a;a=this;return new AL.ptr(a.Object.screen,0,0,0,0,0,0,0,0,0,0);};AI.prototype.Screen=function(){return this.$val.Screen();};AI.ptr.prototype.Alert=function(a){var $ptr,a,b;b=this;b.Object.alert($externalize(a,$String));};AI.prototype.Alert=function(a){return this.$val.Alert(a);};AI.ptr.prototype.Back=function(){var $ptr,a;a=this;a.Object.back();};AI.prototype.Back=function(){return this.$val.Back();};AI.ptr.prototype.Blur=function(){var $ptr,a;a=this;a.Object.blur();};AI.prototype.Blur=function(){return this.$val.Blur();};AI.ptr.prototype.ClearInterval=function(a){var $ptr,a,b;b=this;b.Object.clearInterval(a);};AI.prototype.ClearInterval=function(a){return this.$val.ClearInterval(a);};AI.ptr.prototype.ClearTimeout=function(a){var $ptr,a,b;b=this;b.Object.clearTimeout(a);};AI.prototype.ClearTimeout=function(a){return this.$val.ClearTimeout(a);};AI.ptr.prototype.Close=function(){var $ptr,a;a=this;a.Object.close();};AI.prototype.Close=function(){return this.$val.Close();};AI.ptr.prototype.Confirm=function(a){var $ptr,a,b;b=this;return!!(b.Object.confirm($externalize(a,$String)));};AI.prototype.Confirm=function(a){return this.$val.Confirm(a);};AI.ptr.prototype.Focus=function(){var $ptr,a;a=this;a.Object.focus();};AI.prototype.Focus=function(){return this.$val.Focus();};AI.ptr.prototype.Forward=function(){var $ptr,a;a=this;a.Object.forward();};AI.prototype.Forward=function(){return this.$val.Forward();};AI.ptr.prototype.GetComputedStyle=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=$ifaceNil;if(!(b==="")){d=new $String(b);}e=a.Underlying();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return new EF.ptr(c.Object.getComputedStyle(e,$externalize(d,$emptyInterface)));}return;}if($f===undefined){$f={$blk:AI.ptr.prototype.GetComputedStyle};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AI.prototype.GetComputedStyle=function(a,b){return this.$val.GetComputedStyle(a,b);};AI.ptr.prototype.GetSelection=function(){var $ptr,a;a=this;$panic(new $String("not implemented"));};AI.prototype.GetSelection=function(){return this.$val.GetSelection();};AI.ptr.prototype.Home=function(){var $ptr,a;a=this;a.Object.home();};AI.prototype.Home=function(){return this.$val.Home();};AI.ptr.prototype.MoveBy=function(a,b){var $ptr,a,b,c;c=this;c.Object.moveBy(a,b);};AI.prototype.MoveBy=function(a,b){return this.$val.MoveBy(a,b);};AI.ptr.prototype.MoveTo=function(a,b){var $ptr,a,b,c;c=this;c.Object.moveTo(a,b);};AI.prototype.MoveTo=function(a,b){return this.$val.MoveTo(a,b);};AI.ptr.prototype.Open=function(a,b,c){var $ptr,a,b,c,d;d=this;return new AI.ptr(d.Object.open($externalize(a,$String),$externalize(b,$String),$externalize(c,$String)));};AI.prototype.Open=function(a,b,c){return this.$val.Open(a,b,c);};AI.ptr.prototype.OpenDialog=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;return new AI.ptr(e.Object.openDialog($externalize(a,$String),$externalize(b,$String),$externalize(c,$String),$externalize(d,GF)));};AI.prototype.OpenDialog=function(a,b,c,d){return this.$val.OpenDialog(a,b,c,d);};AI.ptr.prototype.PostMessage=function(a,b,c){var $ptr,a,b,c,d;d=this;d.Object.postMessage($externalize(a,$String),$externalize(b,$String),$externalize(c,GF));};AI.prototype.PostMessage=function(a,b,c){return this.$val.PostMessage(a,b,c);};AI.ptr.prototype.Print=function(){var $ptr,a;a=this;a.Object.print();};AI.prototype.Print=function(){return this.$val.Print();};AI.ptr.prototype.Prompt=function(a,b){var $ptr,a,b,c;c=this;return $internalize(c.Object.prompt($externalize(a,$String),$externalize(b,$String)),$String);};AI.prototype.Prompt=function(a,b){return this.$val.Prompt(a,b);};AI.ptr.prototype.ResizeBy=function(a,b){var $ptr,a,b,c;c=this;c.Object.resizeBy(a,b);};AI.prototype.ResizeBy=function(a,b){return this.$val.ResizeBy(a,b);};AI.ptr.prototype.ResizeTo=function(a,b){var $ptr,a,b,c;c=this;c.Object.resizeTo(a,b);};AI.prototype.ResizeTo=function(a,b){return this.$val.ResizeTo(a,b);};AI.ptr.prototype.Scroll=function(a,b){var $ptr,a,b,c;c=this;c.Object.scroll(a,b);};AI.prototype.Scroll=function(a,b){return this.$val.Scroll(a,b);};AI.ptr.prototype.ScrollBy=function(a,b){var $ptr,a,b,c;c=this;c.Object.scrollBy(a,b);};AI.prototype.ScrollBy=function(a,b){return this.$val.ScrollBy(a,b);};AI.ptr.prototype.ScrollByLines=function(a){var $ptr,a,b;b=this;b.Object.scrollByLines(a);};AI.prototype.ScrollByLines=function(a){return this.$val.ScrollByLines(a);};AI.ptr.prototype.ScrollTo=function(a,b){var $ptr,a,b,c;c=this;c.Object.scrollTo(a,b);};AI.prototype.ScrollTo=function(a,b){return this.$val.ScrollTo(a,b);};AI.ptr.prototype.SetCursor=function(a){var $ptr,a,b;b=this;b.Object.setCursor($externalize(a,$String));};AI.prototype.SetCursor=function(a){return this.$val.SetCursor(a);};AI.ptr.prototype.SetInterval=function(a,b){var $ptr,a,b,c;c=this;return $parseInt(c.Object.setInterval($externalize(a,HC),b))>>0;};AI.prototype.SetInterval=function(a,b){return this.$val.SetInterval(a,b);};AI.ptr.prototype.SetTimeout=function(a,b){var $ptr,a,b,c;c=this;return $parseInt(c.Object.setTimeout($externalize(a,HC),b))>>0;};AI.prototype.SetTimeout=function(a,b){return this.$val.SetTimeout(a,b);};AI.ptr.prototype.Stop=function(){var $ptr,a;a=this;a.Object.stop();};AI.prototype.Stop=function(){return this.$val.Stop();};AI.ptr.prototype.AddEventListener=function(a,b,c){var $ptr,a,b,c,d,e;d=this;e=(function $b(e){var $ptr,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=c(EI(e));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;});d.Object.addEventListener($externalize(a,$String),$externalize(e,HE),$externalize(b,$Bool));return e;};AI.prototype.AddEventListener=function(a,b,c){return this.$val.AddEventListener(a,b,c);};AI.ptr.prototype.RemoveEventListener=function(a,b,c){var $ptr,a,b,c,d;d=this;d.Object.removeEventListener($externalize(a,$String),$externalize(c,HE),$externalize(b,$Bool));};AI.prototype.RemoveEventListener=function(a,b,c){return this.$val.RemoveEventListener(a,b,c);};AJ=function(a){var $ptr,a;return new B.Duration(0,$parseFloat(a)*1e+06);};AI.ptr.prototype.RequestAnimationFrame=function(a){var $ptr,a,b,c;b=this;c=(function $b(c){var $ptr,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=a(AJ(c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;});return $parseInt(b.Object.requestAnimationFrame($externalize(c,HE)))>>0;};AI.prototype.RequestAnimationFrame=function(a){return this.$val.RequestAnimationFrame(a);};AI.ptr.prototype.CancelAnimationFrame=function(a){var $ptr,a,b;b=this;b.Object.cancelAnimationFrame(a);};AI.prototype.CancelAnimationFrame=function(a){return this.$val.CancelAnimationFrame(a);};AS.ptr.prototype.Error=function(){var $ptr,a;a=this;return $internalize(a.Object.message(),$String);};AS.prototype.Error=function(){return this.$val.Error();};BE.ptr.prototype.Underlying=function(){var $ptr,a;a=this;return a.Object;};BE.prototype.Underlying=function(){return this.$val.Underlying();};BE.ptr.prototype.AddEventListener=function(a,b,c){var $ptr,a,b,c,d,e;d=this;e=(function $b(e){var $ptr,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=c(EI(e));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;});d.Object.addEventListener($externalize(a,$String),$externalize(e,HE),$externalize(b,$Bool));return e;};BE.prototype.AddEventListener=function(a,b,c){return this.$val.AddEventListener(a,b,c);};BE.ptr.prototype.RemoveEventListener=function(a,b,c){var $ptr,a,b,c,d;d=this;d.Object.removeEventListener($externalize(a,$String),$externalize(c,HE),$externalize(b,$Bool));};BE.prototype.RemoveEventListener=function(a,b,c){return this.$val.RemoveEventListener(a,b,c);};BE.ptr.prototype.BaseURI=function(){var $ptr,a;a=this;return $internalize(a.Object.baseURI,$String);};BE.prototype.BaseURI=function(){return this.$val.BaseURI();};BE.ptr.prototype.ChildNodes=function(){var $ptr,a;a=this;return E(a.Object.childNodes);};BE.prototype.ChildNodes=function(){return this.$val.ChildNodes();};BE.ptr.prototype.FirstChild=function(){var $ptr,a;a=this;return O(a.Object.firstChild);};BE.prototype.FirstChild=function(){return this.$val.FirstChild();};BE.ptr.prototype.LastChild=function(){var $ptr,a;a=this;return O(a.Object.lastChild);};BE.prototype.LastChild=function(){return this.$val.LastChild();};BE.ptr.prototype.NextSibling=function(){var $ptr,a;a=this;return O(a.Object.nextSibling);};BE.prototype.NextSibling=function(){return this.$val.NextSibling();};BE.ptr.prototype.NodeName=function(){var $ptr,a;a=this;return $internalize(a.Object.nodeName,$String);};BE.prototype.NodeName=function(){return this.$val.NodeName();};BE.ptr.prototype.NodeType=function(){var $ptr,a;a=this;return $parseInt(a.Object.nodeType)>>0;};BE.prototype.NodeType=function(){return this.$val.NodeType();};BE.ptr.prototype.NodeValue=function(){var $ptr,a;a=this;return $internalize(a.Object.nodeValue,$String);};BE.prototype.NodeValue=function(){return this.$val.NodeValue();};BE.ptr.prototype.SetNodeValue=function(a){var $ptr,a,b;b=this;b.Object.nodeValue=$externalize(a,$String);};BE.prototype.SetNodeValue=function(a){return this.$val.SetNodeValue(a);};BE.ptr.prototype.OwnerDocument=function(){var $ptr,a;a=this;$panic(new $String("not implemented"));};BE.prototype.OwnerDocument=function(){return this.$val.OwnerDocument();};BE.ptr.prototype.ParentNode=function(){var $ptr,a;a=this;return O(a.Object.parentNode);};BE.prototype.ParentNode=function(){return this.$val.ParentNode();};BE.ptr.prototype.ParentElement=function(){var $ptr,a;a=this;return P(a.Object.parentElement);};BE.prototype.ParentElement=function(){return this.$val.ParentElement();};BE.ptr.prototype.PreviousSibling=function(){var $ptr,a;a=this;return O(a.Object.previousSibling);};BE.prototype.PreviousSibling=function(){return this.$val.PreviousSibling();};BE.ptr.prototype.TextContent=function(){var $ptr,a;a=this;return $internalize(a.Object.textContent,$String);};BE.prototype.TextContent=function(){return this.$val.TextContent();};BE.ptr.prototype.SetTextContent=function(a){var $ptr,a,b;b=this;b.Object.textContent=$externalize(a,$String);};BE.prototype.SetTextContent=function(a){return this.$val.SetTextContent(a);};BE.ptr.prototype.AppendChild=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b.Object.appendChild(c);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.AppendChild};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.AppendChild=function(a){return this.$val.AppendChild(a);};BE.ptr.prototype.CloneNode=function(a){var $ptr,a,b;b=this;return O(b.Object.cloneNode($externalize(a,$Bool)));};BE.prototype.CloneNode=function(a){return this.$val.CloneNode(a);};BE.ptr.prototype.CompareDocumentPosition=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return $parseInt(b.Object.compareDocumentPosition(c))>>0;}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.CompareDocumentPosition};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.CompareDocumentPosition=function(a){return this.$val.CompareDocumentPosition(a);};BE.ptr.prototype.Contains=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!!(b.Object.contains(c));}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.Contains};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.Contains=function(a){return this.$val.Contains(a);};BE.ptr.prototype.HasChildNodes=function(){var $ptr,a;a=this;return!!(a.Object.hasChildNodes());};BE.prototype.HasChildNodes=function(){return this.$val.HasChildNodes();};BE.ptr.prototype.InsertBefore=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=$ifaceNil;if(!($interfaceIsEqual(b,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:e=b.Underlying();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=new $jsObjectPtr(e);case 2:f=a.Underlying();$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}c.Object.insertBefore(f,$externalize(d,$emptyInterface));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.InsertBefore};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.InsertBefore=function(a,b){return this.$val.InsertBefore(a,b);};BE.ptr.prototype.IsDefaultNamespace=function(a){var $ptr,a,b;b=this;return!!(b.Object.isDefaultNamespace($externalize(a,$String)));};BE.prototype.IsDefaultNamespace=function(a){return this.$val.IsDefaultNamespace(a);};BE.ptr.prototype.IsEqualNode=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!!(b.Object.isEqualNode(c));}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.IsEqualNode};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.IsEqualNode=function(a){return this.$val.IsEqualNode(a);};BE.ptr.prototype.LookupPrefix=function(){var $ptr,a;a=this;return $internalize(a.Object.lookupPrefix(),$String);};BE.prototype.LookupPrefix=function(){return this.$val.LookupPrefix();};BE.ptr.prototype.LookupNamespaceURI=function(a){var $ptr,a,b;b=this;return $internalize(b.Object.lookupNamespaceURI($externalize(a,$String)),$String);};BE.prototype.LookupNamespaceURI=function(a){return this.$val.LookupNamespaceURI(a);};BE.ptr.prototype.Normalize=function(){var $ptr,a;a=this;a.Object.normalize();};BE.prototype.Normalize=function(){return this.$val.Normalize();};BE.ptr.prototype.RemoveChild=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.Underlying();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b.Object.removeChild(c);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.RemoveChild};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.RemoveChild=function(a){return this.$val.RemoveChild(a);};BE.ptr.prototype.ReplaceChild=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=a.Underlying();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=b.Underlying();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}c.Object.replaceChild(d,e);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.ReplaceChild};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.ReplaceChild=function(a,b){return this.$val.ReplaceChild(a,b);};BJ.ptr.prototype.AccessKey=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.accessKey,$String);};BJ.prototype.AccessKey=function(){return this.$val.AccessKey();};BJ.ptr.prototype.Dataset=function(){var $ptr,a,b,c,d,e,f,g,h;a=this;b=a.BasicElement.BasicNode.Object.dataset;c=$makeMap($String.keyFor,[]);d=C.Keys(b);e=d;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=g;(c||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(h)]={k:h,v:$internalize(b[$externalize(g,$String)],$String)};f++;}return c;};BJ.prototype.Dataset=function(){return this.$val.Dataset();};BJ.ptr.prototype.SetAccessKey=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.accessKey=$externalize(a,$String);};BJ.prototype.SetAccessKey=function(a){return this.$val.SetAccessKey(a);};BJ.ptr.prototype.AccessKeyLabel=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.accessKeyLabel,$String);};BJ.prototype.AccessKeyLabel=function(){return this.$val.AccessKeyLabel();};BJ.ptr.prototype.SetAccessKeyLabel=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.accessKeyLabel=$externalize(a,$String);};BJ.prototype.SetAccessKeyLabel=function(a){return this.$val.SetAccessKeyLabel(a);};BJ.ptr.prototype.ContentEditable=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.contentEditable,$String);};BJ.prototype.ContentEditable=function(){return this.$val.ContentEditable();};BJ.ptr.prototype.SetContentEditable=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.contentEditable=$externalize(a,$String);};BJ.prototype.SetContentEditable=function(a){return this.$val.SetContentEditable(a);};BJ.ptr.prototype.IsContentEditable=function(){var $ptr,a;a=this;return!!(a.BasicElement.BasicNode.Object.isContentEditable);};BJ.prototype.IsContentEditable=function(){return this.$val.IsContentEditable();};BJ.ptr.prototype.Dir=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.dir,$String);};BJ.prototype.Dir=function(){return this.$val.Dir();};BJ.ptr.prototype.SetDir=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.dir=$externalize(a,$String);};BJ.prototype.SetDir=function(a){return this.$val.SetDir(a);};BJ.ptr.prototype.Draggable=function(){var $ptr,a;a=this;return!!(a.BasicElement.BasicNode.Object.draggable);};BJ.prototype.Draggable=function(){return this.$val.Draggable();};BJ.ptr.prototype.SetDraggable=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.draggable=$externalize(a,$Bool);};BJ.prototype.SetDraggable=function(a){return this.$val.SetDraggable(a);};BJ.ptr.prototype.Lang=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.lang,$String);};BJ.prototype.Lang=function(){return this.$val.Lang();};BJ.ptr.prototype.SetLang=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.lang=$externalize(a,$String);};BJ.prototype.SetLang=function(a){return this.$val.SetLang(a);};BJ.ptr.prototype.OffsetHeight=function(){var $ptr,a;a=this;return $parseFloat(a.BasicElement.BasicNode.Object.offsetHeight);};BJ.prototype.OffsetHeight=function(){return this.$val.OffsetHeight();};BJ.ptr.prototype.OffsetLeft=function(){var $ptr,a;a=this;return $parseFloat(a.BasicElement.BasicNode.Object.offsetLeft);};BJ.prototype.OffsetLeft=function(){return this.$val.OffsetLeft();};BJ.ptr.prototype.OffsetParent=function(){var $ptr,a;a=this;return Q(a.BasicElement.BasicNode.Object.offsetParent);};BJ.prototype.OffsetParent=function(){return this.$val.OffsetParent();};BJ.ptr.prototype.OffsetTop=function(){var $ptr,a;a=this;return $parseFloat(a.BasicElement.BasicNode.Object.offsetTop);};BJ.prototype.OffsetTop=function(){return this.$val.OffsetTop();};BJ.ptr.prototype.OffsetWidth=function(){var $ptr,a;a=this;return $parseFloat(a.BasicElement.BasicNode.Object.offsetWidth);};BJ.prototype.OffsetWidth=function(){return this.$val.OffsetWidth();};BJ.ptr.prototype.Style=function(){var $ptr,a;a=this;return new EF.ptr(a.BasicElement.BasicNode.Object.style);};BJ.prototype.Style=function(){return this.$val.Style();};BJ.ptr.prototype.TabIndex=function(){var $ptr,a;a=this;return $parseInt(a.BasicElement.BasicNode.Object.tabIndex)>>0;};BJ.prototype.TabIndex=function(){return this.$val.TabIndex();};BJ.ptr.prototype.SetTabIndex=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.tabIndex=a;};BJ.prototype.SetTabIndex=function(a){return this.$val.SetTabIndex(a);};BJ.ptr.prototype.Title=function(){var $ptr,a;a=this;return $internalize(a.BasicElement.BasicNode.Object.title,$String);};BJ.prototype.Title=function(){return this.$val.Title();};BJ.ptr.prototype.SetTitle=function(a){var $ptr,a,b;b=this;b.BasicElement.BasicNode.Object.title=$externalize(a,$String);};BJ.prototype.SetTitle=function(a){return this.$val.SetTitle(a);};BJ.ptr.prototype.Blur=function(){var $ptr,a;a=this;a.BasicElement.BasicNode.Object.blur();};BJ.prototype.Blur=function(){return this.$val.Blur();};BJ.ptr.prototype.Click=function(){var $ptr,a;a=this;a.BasicElement.BasicNode.Object.click();};BJ.prototype.Click=function(){return this.$val.Click();};BJ.ptr.prototype.Focus=function(){var $ptr,a;a=this;a.BasicElement.BasicNode.Object.focus();};BJ.prototype.Focus=function(){return this.$val.Focus();};BK.ptr.prototype.Attributes=function(){var $ptr,a,b,c,d,e,f,g;a=this;b=a.BasicNode.Object.attributes;c=$makeMap($String.keyFor,[]);d=$parseInt(b.length)>>0;e=0;while(true){if(!(e>0;}return c;};BK.prototype.Attributes=function(){return this.$val.Attributes();};BK.ptr.prototype.GetBoundingClientRect=function(){var $ptr,a,b;a=this;b=a.BasicNode.Object.getBoundingClientRect();return new BG.ptr(b,0,0,0,0,0,0);};BK.prototype.GetBoundingClientRect=function(){return this.$val.GetBoundingClientRect();};BK.ptr.prototype.PreviousElementSibling=function(){var $ptr,a;a=this;return P(a.BasicNode.Object.previousElementSibling);};BK.prototype.PreviousElementSibling=function(){return this.$val.PreviousElementSibling();};BK.ptr.prototype.NextElementSibling=function(){var $ptr,a;a=this;return P(a.BasicNode.Object.nextElementSibling);};BK.prototype.NextElementSibling=function(){return this.$val.NextElementSibling();};BK.ptr.prototype.Class=function(){var $ptr,a;a=this;return new V.ptr(a.BasicNode.Object.classList,a.BasicNode.Object,"className",0);};BK.prototype.Class=function(){return this.$val.Class();};BK.ptr.prototype.SetClass=function(a){var $ptr,a,b;b=this;b.BasicNode.Object.className=$externalize(a,$String);};BK.prototype.SetClass=function(a){return this.$val.SetClass(a);};BK.ptr.prototype.ID=function(){var $ptr,a;a=this;return $internalize(a.BasicNode.Object.id,$String);};BK.prototype.ID=function(){return this.$val.ID();};BK.ptr.prototype.SetID=function(a){var $ptr,a,b;b=this;b.BasicNode.Object.id=$externalize(a,$String);};BK.prototype.SetID=function(a){return this.$val.SetID(a);};BK.ptr.prototype.TagName=function(){var $ptr,a;a=this;return $internalize(a.BasicNode.Object.tagName,$String);};BK.prototype.TagName=function(){return this.$val.TagName();};BK.ptr.prototype.GetAttribute=function(a){var $ptr,a,b;b=this;return $internalize(b.BasicNode.Object.getAttribute($externalize(a,$String)),$String);};BK.prototype.GetAttribute=function(a){return this.$val.GetAttribute(a);};BK.ptr.prototype.GetAttributeNS=function(a,b){var $ptr,a,b,c;c=this;return $internalize(c.BasicNode.Object.getAttributeNS($externalize(a,$String),$externalize(b,$String)),$String);};BK.prototype.GetAttributeNS=function(a,b){return this.$val.GetAttributeNS(a,b);};BK.ptr.prototype.GetElementsByClassName=function(a){var $ptr,a,b;b=this;return F(b.BasicNode.Object.getElementsByClassName($externalize(a,$String)));};BK.prototype.GetElementsByClassName=function(a){return this.$val.GetElementsByClassName(a);};BK.ptr.prototype.GetElementsByTagName=function(a){var $ptr,a,b;b=this;return F(b.BasicNode.Object.getElementsByTagName($externalize(a,$String)));};BK.prototype.GetElementsByTagName=function(a){return this.$val.GetElementsByTagName(a);};BK.ptr.prototype.GetElementsByTagNameNS=function(a,b){var $ptr,a,b,c;c=this;return F(c.BasicNode.Object.getElementsByTagNameNS($externalize(a,$String),$externalize(b,$String)));};BK.prototype.GetElementsByTagNameNS=function(a,b){return this.$val.GetElementsByTagNameNS(a,b);};BK.ptr.prototype.HasAttribute=function(a){var $ptr,a,b;b=this;return!!(b.BasicNode.Object.hasAttribute($externalize(a,$String)));};BK.prototype.HasAttribute=function(a){return this.$val.HasAttribute(a);};BK.ptr.prototype.HasAttributeNS=function(a,b){var $ptr,a,b,c;c=this;return!!(c.BasicNode.Object.hasAttributeNS($externalize(a,$String),$externalize(b,$String)));};BK.prototype.HasAttributeNS=function(a,b){return this.$val.HasAttributeNS(a,b);};BK.ptr.prototype.QuerySelector=function(a){var $ptr,a,b;b=this;return P(b.BasicNode.Object.querySelector($externalize(a,$String)));};BK.prototype.QuerySelector=function(a){return this.$val.QuerySelector(a);};BK.ptr.prototype.QuerySelectorAll=function(a){var $ptr,a,b;b=this;return F(b.BasicNode.Object.querySelectorAll($externalize(a,$String)));};BK.prototype.QuerySelectorAll=function(a){return this.$val.QuerySelectorAll(a);};BK.ptr.prototype.RemoveAttribute=function(a){var $ptr,a,b;b=this;b.BasicNode.Object.removeAttribute($externalize(a,$String));};BK.prototype.RemoveAttribute=function(a){return this.$val.RemoveAttribute(a);};BK.ptr.prototype.RemoveAttributeNS=function(a,b){var $ptr,a,b,c;c=this;c.BasicNode.Object.removeAttributeNS($externalize(a,$String),$externalize(b,$String));};BK.prototype.RemoveAttributeNS=function(a,b){return this.$val.RemoveAttributeNS(a,b);};BK.ptr.prototype.SetAttribute=function(a,b){var $ptr,a,b,c;c=this;c.BasicNode.Object.setAttribute($externalize(a,$String),$externalize(b,$String));};BK.prototype.SetAttribute=function(a,b){return this.$val.SetAttribute(a,b);};BK.ptr.prototype.SetAttributeNS=function(a,b,c){var $ptr,a,b,c,d;d=this;d.BasicNode.Object.setAttributeNS($externalize(a,$String),$externalize(b,$String),$externalize(c,$String));};BK.prototype.SetAttributeNS=function(a,b,c){return this.$val.SetAttributeNS(a,b,c);};BK.ptr.prototype.InnerHTML=function(){var $ptr,a;a=this;return $internalize(a.BasicNode.Object.innerHTML,$String);};BK.prototype.InnerHTML=function(){return this.$val.InnerHTML();};BK.ptr.prototype.SetInnerHTML=function(a){var $ptr,a,b;b=this;b.BasicNode.Object.innerHTML=$externalize(a,$String);};BK.prototype.SetInnerHTML=function(a){return this.$val.SetInnerHTML(a);};BL.ptr.prototype.Rel=function(){var $ptr,a;a=this;return new V.ptr(a.URLUtils.Object.relList,a.URLUtils.Object,"rel",0);};BL.prototype.Rel=function(){return this.$val.Rel();};BM.ptr.prototype.Rel=function(){var $ptr,a;a=this;return new V.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.relList,a.BasicHTMLElement.BasicElement.BasicNode.Object,"rel",0);};BM.prototype.Rel=function(){return this.$val.Rel();};BN.ptr.prototype.Rel=function(){var $ptr,a;a=this;return new V.ptr(a.URLUtils.Object.relList,a.URLUtils.Object,"rel",0);};BN.prototype.Rel=function(){return this.$val.Rel();};BT.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};BT.prototype.Form=function(){return this.$val.Form();};BT.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};BT.prototype.Labels=function(){return this.$val.Labels();};BT.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};BT.prototype.Validity=function(){return this.$val.Validity();};BT.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};BT.prototype.CheckValidity=function(){return this.$val.CheckValidity();};BT.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};BT.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};BU.ptr.prototype.GetContext2d=function(){var $ptr,a,b;a=this;b=a.GetContext("2d");return new BV.ptr(b,"","","",0,0,0,"","",0,0,"","","",0,"");};BU.prototype.GetContext2d=function(){return this.$val.GetContext2d();};BU.ptr.prototype.GetContext=function(a){var $ptr,a,b;b=this;return b.BasicHTMLElement.BasicElement.BasicNode.Object.getContext($externalize(a,$String));};BU.prototype.GetContext=function(a){return this.$val.GetContext(a);};BV.ptr.prototype.CreateLinearGradient=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.createLinearGradient(a,b,c,d);};BV.prototype.CreateLinearGradient=function(a,b,c,d){return this.$val.CreateLinearGradient(a,b,c,d);};BV.ptr.prototype.Rect=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.rect(a,b,c,d);};BV.prototype.Rect=function(a,b,c,d){return this.$val.Rect(a,b,c,d);};BV.ptr.prototype.FillRect=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.fillRect(a,b,c,d);};BV.prototype.FillRect=function(a,b,c,d){return this.$val.FillRect(a,b,c,d);};BV.ptr.prototype.StrokeRect=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.strokeRect(a,b,c,d);};BV.prototype.StrokeRect=function(a,b,c,d){return this.$val.StrokeRect(a,b,c,d);};BV.ptr.prototype.ClearRect=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.clearRect(a,b,c,d);};BV.prototype.ClearRect=function(a,b,c,d){return this.$val.ClearRect(a,b,c,d);};BV.ptr.prototype.Fill=function(){var $ptr,a;a=this;a.Object.fill();};BV.prototype.Fill=function(){return this.$val.Fill();};BV.ptr.prototype.Stroke=function(){var $ptr,a;a=this;a.Object.stroke();};BV.prototype.Stroke=function(){return this.$val.Stroke();};BV.ptr.prototype.BeginPath=function(){var $ptr,a;a=this;a.Object.beginPath();};BV.prototype.BeginPath=function(){return this.$val.BeginPath();};BV.ptr.prototype.MoveTo=function(a,b){var $ptr,a,b,c;c=this;c.Object.moveTo(a,b);};BV.prototype.MoveTo=function(a,b){return this.$val.MoveTo(a,b);};BV.ptr.prototype.ClosePath=function(){var $ptr,a;a=this;a.Object.closePath();};BV.prototype.ClosePath=function(){return this.$val.ClosePath();};BV.ptr.prototype.LineTo=function(a,b){var $ptr,a,b,c;c=this;c.Object.lineTo(a,b);};BV.prototype.LineTo=function(a,b){return this.$val.LineTo(a,b);};BV.ptr.prototype.Clip=function(){var $ptr,a;a=this;a.Object.clip();};BV.prototype.Clip=function(){return this.$val.Clip();};BV.ptr.prototype.QuadraticCurveTo=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;e.Object.quadraticCurveTo(a,b,c,d);};BV.prototype.QuadraticCurveTo=function(a,b,c,d){return this.$val.QuadraticCurveTo(a,b,c,d);};BV.ptr.prototype.BezierCurveTo=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g;g=this;g.Object.bezierCurveTo(a,b,c,d,e,f);};BV.prototype.BezierCurveTo=function(a,b,c,d,e,f){return this.$val.BezierCurveTo(a,b,c,d,e,f);};BV.ptr.prototype.Arc=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g;g=this;g.Object.arc(a,b,c,d,e,$externalize(f,$Bool));};BV.prototype.Arc=function(a,b,c,d,e,f){return this.$val.Arc(a,b,c,d,e,f);};BV.ptr.prototype.ArcTo=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f;f=this;f.Object.arcTo(a,b,c,d,e);};BV.prototype.ArcTo=function(a,b,c,d,e){return this.$val.ArcTo(a,b,c,d,e);};BV.ptr.prototype.IsPointInPath=function(a,b){var $ptr,a,b,c;c=this;return!!(c.Object.isPointInPath(a,b));};BV.prototype.IsPointInPath=function(a,b){return this.$val.IsPointInPath(a,b);};BV.ptr.prototype.Scale=function(a,b){var $ptr,a,b,c;c=this;c.Object.scale(a,b);};BV.prototype.Scale=function(a,b){return this.$val.Scale(a,b);};BV.ptr.prototype.Rotate=function(a){var $ptr,a,b;b=this;b.Object.rotate(a);};BV.prototype.Rotate=function(a){return this.$val.Rotate(a);};BV.ptr.prototype.Translate=function(a,b){var $ptr,a,b,c;c=this;c.Object.translate(a,b);};BV.prototype.Translate=function(a,b){return this.$val.Translate(a,b);};BV.ptr.prototype.Transform=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g;g=this;g.Object.transform(a,b,c,d,e,f);};BV.prototype.Transform=function(a,b,c,d,e,f){return this.$val.Transform(a,b,c,d,e,f);};BV.ptr.prototype.SetTransform=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g;g=this;g.Object.setTransform(a,b,c,d,e,f);};BV.prototype.SetTransform=function(a,b,c,d,e,f){return this.$val.SetTransform(a,b,c,d,e,f);};BV.ptr.prototype.FillText=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;if(d===-1){e.Object.fillText($externalize(a,$String),b,c);return;}e.Object.fillText($externalize(a,$String),b,c,d);};BV.prototype.FillText=function(a,b,c,d){return this.$val.FillText(a,b,c,d);};BV.ptr.prototype.StrokeText=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;if(d===-1){e.Object.strokeText($externalize(a,$String),b,c);return;}e.Object.strokeText($externalize(a,$String),b,c,d);};BV.prototype.StrokeText=function(a,b,c,d){return this.$val.StrokeText(a,b,c,d);};BY.ptr.prototype.Options=function(){var $ptr,a;a=this;return T(a.BasicHTMLElement.BasicElement.BasicNode.Object,"options");};BY.prototype.Options=function(){return this.$val.Options();};CC.ptr.prototype.Elements=function(){var $ptr,a;a=this;return G(a.BasicHTMLElement.BasicElement.BasicNode.Object.elements);};CC.prototype.Elements=function(){return this.$val.Elements();};CC.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CC.prototype.Form=function(){return this.$val.Form();};CC.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};CC.prototype.Validity=function(){return this.$val.Validity();};CC.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};CC.prototype.CheckValidity=function(){return this.$val.CheckValidity();};CC.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};CC.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};CE.ptr.prototype.Elements=function(){var $ptr,a;a=this;return G(a.BasicHTMLElement.BasicElement.BasicNode.Object.elements);};CE.prototype.Elements=function(){return this.$val.Elements();};CE.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};CE.prototype.CheckValidity=function(){return this.$val.CheckValidity();};CE.ptr.prototype.Submit=function(){var $ptr,a;a=this;a.BasicHTMLElement.BasicElement.BasicNode.Object.submit();};CE.prototype.Submit=function(){return this.$val.Submit();};CE.ptr.prototype.Reset=function(){var $ptr,a;a=this;a.BasicHTMLElement.BasicElement.BasicNode.Object.reset();};CE.prototype.Reset=function(){return this.$val.Reset();};CE.ptr.prototype.Item=function(a){var $ptr,a,b;b=this;return Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.item(a));};CE.prototype.Item=function(a){return this.$val.Item(a);};CE.ptr.prototype.NamedItem=function(a){var $ptr,a,b;b=this;return Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.namedItem($externalize(a,$String)));};CE.prototype.NamedItem=function(a){return this.$val.NamedItem(a);};CL.ptr.prototype.ContentDocument=function(){var $ptr,a;a=this;return M(a.BasicHTMLElement.BasicElement.BasicNode.Object.contentDocument);};CL.prototype.ContentDocument=function(){return this.$val.ContentDocument();};CL.ptr.prototype.ContentWindow=function(){var $ptr,a;a=this;return new AI.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.contentWindow);};CL.prototype.ContentWindow=function(){return this.$val.ContentWindow();};CN.ptr.prototype.Files=function(){var $ptr,a,b,c,d,e,f;a=this;b=a.BasicHTMLElement.BasicElement.BasicNode.Object.files;c=$makeSlice(HG,($parseInt(b.length)>>0));d=c;e=0;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=new CO.ptr(b.item(f)));e++;}return c;};CN.prototype.Files=function(){return this.$val.Files();};CN.ptr.prototype.List=function(){var $ptr,a,b;a=this;b=Q(a.BasicHTMLElement.BasicElement.BasicNode.Object.list);if($interfaceIsEqual(b,$ifaceNil)){return HH.nil;}return $assertType(b,HH);};CN.prototype.List=function(){return this.$val.List();};CN.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CN.prototype.Labels=function(){return this.$val.Labels();};CN.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CN.prototype.Form=function(){return this.$val.Form();};CN.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};CN.prototype.Validity=function(){return this.$val.Validity();};CN.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};CN.prototype.CheckValidity=function(){return this.$val.CheckValidity();};CN.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};CN.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};CN.ptr.prototype.Select=function(){var $ptr,a;a=this;a.BasicHTMLElement.BasicElement.BasicNode.Object.select();};CN.prototype.Select=function(){return this.$val.Select();};CN.ptr.prototype.SetSelectionRange=function(a,b,c){var $ptr,a,b,c,d;d=this;d.BasicHTMLElement.BasicElement.BasicNode.Object.setSelectionRange(a,b,$externalize(c,$String));};CN.prototype.SetSelectionRange=function(a,b,c){return this.$val.SetSelectionRange(a,b,c);};CN.ptr.prototype.StepDown=function(a){var $ptr,a,b;b=this;return D(b.BasicHTMLElement.BasicElement.BasicNode.Object,"stepDown",new GF([new $Int(a)]));};CN.prototype.StepDown=function(a){return this.$val.StepDown(a);};CN.ptr.prototype.StepUp=function(a){var $ptr,a,b;b=this;return D(b.BasicHTMLElement.BasicElement.BasicNode.Object,"stepUp",new GF([new $Int(a)]));};CN.prototype.StepUp=function(a){return this.$val.StepUp(a);};CP.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CP.prototype.Form=function(){return this.$val.Form();};CP.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CP.prototype.Labels=function(){return this.$val.Labels();};CP.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};CP.prototype.Validity=function(){return this.$val.Validity();};CP.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};CP.prototype.CheckValidity=function(){return this.$val.CheckValidity();};CP.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};CP.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};CR.ptr.prototype.Control=function(){var $ptr,a;a=this;return Q(a.BasicHTMLElement.BasicElement.BasicNode.Object.control);};CR.prototype.Control=function(){return this.$val.Control();};CR.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CR.prototype.Form=function(){return this.$val.Form();};CS.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CS.prototype.Form=function(){return this.$val.Form();};CT.ptr.prototype.Rel=function(){var $ptr,a;a=this;return new V.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.relList,a.BasicHTMLElement.BasicElement.BasicNode.Object,"rel",0);};CT.prototype.Rel=function(){return this.$val.Rel();};CT.ptr.prototype.Sizes=function(){var $ptr,a;a=this;return new V.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.sizes,a.BasicHTMLElement.BasicElement.BasicNode.Object,"",0);};CT.prototype.Sizes=function(){return this.$val.Sizes();};CT.ptr.prototype.Sheet=function(){var $ptr,a;a=this;$panic(new $String("not implemented"));};CT.prototype.Sheet=function(){return this.$val.Sheet();};CU.ptr.prototype.Areas=function(){var $ptr,a,b,c,d,e,f,g;a=this;b=F(a.BasicHTMLElement.BasicElement.BasicNode.Object.areas);c=$makeSlice(HJ,b.$length);d=b;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=$assertType(g,HI));e++;}return c;};CU.prototype.Areas=function(){return this.$val.Areas();};CU.ptr.prototype.Images=function(){var $ptr,a;a=this;return G(a.BasicHTMLElement.BasicElement.BasicNode.Object.areas);};CU.prototype.Images=function(){return this.$val.Images();};CY.ptr.prototype.Labels=function(){var $ptr,a;a=$clone(this,CY);return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};CY.prototype.Labels=function(){return this.$val.Labels();};DB.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DB.prototype.Form=function(){return this.$val.Form();};DB.ptr.prototype.ContentDocument=function(){var $ptr,a;a=this;return M(a.BasicHTMLElement.BasicElement.BasicNode.Object.contentDocument);};DB.prototype.ContentDocument=function(){return this.$val.ContentDocument();};DB.ptr.prototype.ContentWindow=function(){var $ptr,a;a=this;return new AI.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.contentWindow);};DB.prototype.ContentWindow=function(){return this.$val.ContentWindow();};DB.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};DB.prototype.Validity=function(){return this.$val.Validity();};DB.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};DB.prototype.CheckValidity=function(){return this.$val.CheckValidity();};DB.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};DB.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};DD.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DD.prototype.Form=function(){return this.$val.Form();};DE.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DE.prototype.Form=function(){return this.$val.Form();};DE.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DE.prototype.Labels=function(){return this.$val.Labels();};DE.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};DE.prototype.Validity=function(){return this.$val.Validity();};DE.ptr.prototype.For=function(){var $ptr,a;a=this;return new V.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.htmlFor,a.BasicHTMLElement.BasicElement.BasicNode.Object,"",0);};DE.prototype.For=function(){return this.$val.For();};DE.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};DE.prototype.CheckValidity=function(){return this.$val.CheckValidity();};DE.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};DE.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};DI.ptr.prototype.Labels=function(){var $ptr,a;a=$clone(this,DI);return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DI.prototype.Labels=function(){return this.$val.Labels();};DL.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DL.prototype.Labels=function(){return this.$val.Labels();};DL.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DL.prototype.Form=function(){return this.$val.Form();};DL.ptr.prototype.Options=function(){var $ptr,a;a=this;return T(a.BasicHTMLElement.BasicElement.BasicNode.Object,"options");};DL.prototype.Options=function(){return this.$val.Options();};DL.ptr.prototype.SelectedOptions=function(){var $ptr,a;a=this;return T(a.BasicHTMLElement.BasicElement.BasicNode.Object,"selectedOptions");};DL.prototype.SelectedOptions=function(){return this.$val.SelectedOptions();};DL.ptr.prototype.Item=function(a){var $ptr,a,b,c;b=this;c=Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.item(a));if($interfaceIsEqual(c,$ifaceNil)){return GQ.nil;}return $assertType(c,GQ);};DL.prototype.Item=function(a){return this.$val.Item(a);};DL.ptr.prototype.NamedItem=function(a){var $ptr,a,b,c;b=this;c=Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.namedItem($externalize(a,$String)));if($interfaceIsEqual(c,$ifaceNil)){return GQ.nil;}return $assertType(c,GQ);};DL.prototype.NamedItem=function(a){return this.$val.NamedItem(a);};DL.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};DL.prototype.Validity=function(){return this.$val.Validity();};DL.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};DL.prototype.CheckValidity=function(){return this.$val.CheckValidity();};DL.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};DL.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};DV.ptr.prototype.Cells=function(){var $ptr,a,b,c,d,e,f,g;a=this;b=F(a.BasicHTMLElement.BasicElement.BasicNode.Object.cells);c=$makeSlice(HL,b.$length);d=b;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=$assertType(g,HK));e++;}return c;};DV.prototype.Cells=function(){return this.$val.Cells();};DV.ptr.prototype.InsertCell=function(a){var $ptr,a,b;b=this;return $assertType(Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.insertCell(a)),HK);};DV.prototype.InsertCell=function(a){return this.$val.InsertCell(a);};DV.ptr.prototype.DeleteCell=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.deleteCell(a);};DV.prototype.DeleteCell=function(a){return this.$val.DeleteCell(a);};DW.ptr.prototype.Rows=function(){var $ptr,a,b,c,d,e,f,g;a=this;b=F(a.BasicHTMLElement.BasicElement.BasicNode.Object.rows);c=$makeSlice(HN,b.$length);d=b;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);((f<0||f>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f]=$assertType(g,HM));e++;}return c;};DW.prototype.Rows=function(){return this.$val.Rows();};DW.ptr.prototype.DeleteRow=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.deleteRow(a);};DW.prototype.DeleteRow=function(a){return this.$val.DeleteRow(a);};DW.ptr.prototype.InsertRow=function(a){var $ptr,a,b;b=this;return $assertType(Q(b.BasicHTMLElement.BasicElement.BasicNode.Object.insertRow(a)),HM);};DW.prototype.InsertRow=function(a){return this.$val.InsertRow(a);};DX.ptr.prototype.Form=function(){var $ptr,a;a=this;return R(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DX.prototype.Form=function(){return this.$val.Form();};DX.ptr.prototype.Labels=function(){var $ptr,a;a=this;return S(a.BasicHTMLElement.BasicElement.BasicNode.Object);};DX.prototype.Labels=function(){return this.$val.Labels();};DX.ptr.prototype.Validity=function(){var $ptr,a;a=this;return new BS.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.validity,false,false,false,false,false,false,false,false,false);};DX.prototype.Validity=function(){return this.$val.Validity();};DX.ptr.prototype.CheckValidity=function(){var $ptr,a;a=this;return!!(a.BasicHTMLElement.BasicElement.BasicNode.Object.checkValidity());};DX.prototype.CheckValidity=function(){return this.$val.CheckValidity();};DX.ptr.prototype.SetCustomValidity=function(a){var $ptr,a,b;b=this;b.BasicHTMLElement.BasicElement.BasicNode.Object.setCustomValidity($externalize(a,$String));};DX.prototype.SetCustomValidity=function(a){return this.$val.SetCustomValidity(a);};DX.ptr.prototype.Select=function(){var $ptr,a;a=this;a.BasicHTMLElement.BasicElement.BasicNode.Object.select();};DX.prototype.Select=function(){return this.$val.Select();};DX.ptr.prototype.SetSelectionRange=function(a,b,c){var $ptr,a,b,c,d;d=this;d.BasicHTMLElement.BasicElement.BasicNode.Object.setSelectionRange(a,b,$externalize(c,$String));};DX.prototype.SetSelectionRange=function(a,b,c){return this.$val.SetSelectionRange(a,b,c);};EB.ptr.prototype.Track=function(){var $ptr,a;a=this;return new EA.ptr(a.BasicHTMLElement.BasicElement.BasicNode.Object.track);};EB.prototype.Track=function(){return this.$val.Track();};BQ.ptr.prototype.Href=function(){var $ptr,a;a=this;return $internalize(a.BasicHTMLElement.BasicElement.BasicNode.Object.href,$String);};BQ.prototype.Href=function(){return this.$val.Href();};BQ.ptr.prototype.Target=function(){var $ptr,a;a=this;return $internalize(a.BasicHTMLElement.BasicElement.BasicNode.Object.target,$String);};BQ.prototype.Target=function(){return this.$val.Target();};EF.ptr.prototype.ToMap=function(){var $ptr,a,b,c,d,e,f,g;a=this;b={};c=$parseInt(a.Object.length)>>0;d=0;while(true){if(!(d>0;}return b;};EF.prototype.ToMap=function(){return this.$val.ToMap();};EF.ptr.prototype.RemoveProperty=function(a){var $ptr,a,b;b=this;b.Object.removeProperty($externalize(a,$String));};EF.prototype.RemoveProperty=function(a){return this.$val.RemoveProperty(a);};EF.ptr.prototype.GetPropertyValue=function(a){var $ptr,a,b;b=this;return $internalize(b.Object.getPropertyValue($externalize(a,$String)),$String);};EF.prototype.GetPropertyValue=function(a){return this.$val.GetPropertyValue(a);};EF.ptr.prototype.GetPropertyPriority=function(a){var $ptr,a,b;b=this;return $internalize(b.Object.getPropertyPriority($externalize(a,$String)),$String);};EF.prototype.GetPropertyPriority=function(a){return this.$val.GetPropertyPriority(a);};EF.ptr.prototype.SetProperty=function(a,b,c){var $ptr,a,b,c,d;d=this;d.Object.setProperty($externalize(a,$String),$externalize(b,$String),$externalize(c,$String));};EF.prototype.SetProperty=function(a,b,c){return this.$val.SetProperty(a,b,c);};EF.ptr.prototype.Index=function(a){var $ptr,a,b;b=this;return $internalize(b.Object.index(a),$String);};EF.prototype.Index=function(a){return this.$val.Index(a);};EF.ptr.prototype.Length=function(){var $ptr,a;a=this;return $parseInt(a.Object.length)>>0;};EF.prototype.Length=function(){return this.$val.Length();};EI=function(a){var $ptr,a,b,c,d;if(a===null||a===undefined){return $ifaceNil;}b=new EK.ptr(a);c=a.constructor;d=c;if(d===$global.AnimationEvent){return new EL.ptr(b);}else if(d===$global.AudioProcessingEvent){return new EM.ptr(b);}else if(d===$global.BeforeInputEvent){return new EN.ptr(b);}else if(d===$global.BeforeUnloadEvent){return new EO.ptr(b);}else if(d===$global.BlobEvent){return new EP.ptr(b);}else if(d===$global.ClipboardEvent){return new EQ.ptr(b);}else if(d===$global.CloseEvent){return new ER.ptr(b,0,"",false);}else if(d===$global.CompositionEvent){return new ES.ptr(b);}else if(d===$global.CSSFontFaceLoadEvent){return new ET.ptr(b);}else if(d===$global.CustomEvent){return new EU.ptr(b);}else if(d===$global.DeviceLightEvent){return new EV.ptr(b);}else if(d===$global.DeviceMotionEvent){return new EW.ptr(b);}else if(d===$global.DeviceOrientationEvent){return new EX.ptr(b);}else if(d===$global.DeviceProximityEvent){return new EY.ptr(b);}else if(d===$global.DOMTransactionEvent){return new EZ.ptr(b);}else if(d===$global.DragEvent){return new FA.ptr(b);}else if(d===$global.EditingBeforeInputEvent){return new FB.ptr(b);}else if(d===$global.ErrorEvent){return new FC.ptr(b);}else if(d===$global.FocusEvent){return new FD.ptr(b);}else if(d===$global.GamepadEvent){return new FE.ptr(b);}else if(d===$global.HashChangeEvent){return new FF.ptr(b);}else if(d===$global.IDBVersionChangeEvent){return new FG.ptr(b);}else if(d===$global.KeyboardEvent){return new FH.ptr(b,false,0,false,"","",0,"",0,0,false,false,false);}else if(d===$global.MediaStreamEvent){return new FI.ptr(b);}else if(d===$global.MessageEvent){return new FJ.ptr(b,null);}else if(d===$global.MouseEvent){return new FK.ptr(new GB.ptr(b),false,0,0,0,false,false,0,0,0,0,false);}else if(d===$global.MutationEvent){return new FL.ptr(b);}else if(d===$global.OfflineAudioCompletionEvent){return new FM.ptr(b);}else if(d===$global.PageTransitionEvent){return new FN.ptr(b);}else if(d===$global.PointerEvent){return new FO.ptr(b);}else if(d===$global.PopStateEvent){return new FP.ptr(b);}else if(d===$global.ProgressEvent){return new FQ.ptr(b);}else if(d===$global.RelatedEvent){return new FR.ptr(b);}else if(d===$global.RTCPeerConnectionIceEvent){return new FS.ptr(b);}else if(d===$global.SensorEvent){return new FT.ptr(b);}else if(d===$global.StorageEvent){return new FU.ptr(b);}else if(d===$global.SVGEvent){return new FV.ptr(b);}else if(d===$global.SVGZoomEvent){return new FW.ptr(b);}else if(d===$global.TimeEvent){return new FX.ptr(b);}else if(d===$global.TouchEvent){return new FY.ptr(b);}else if(d===$global.TrackEvent){return new FZ.ptr(b);}else if(d===$global.TransitionEvent){return new GA.ptr(b);}else if(d===$global.UIEvent){return new GB.ptr(b);}else if(d===$global.UserProximityEvent){return new GC.ptr(b);}else if(d===$global.WheelEvent){return new GD.ptr(b,0,0,0,0);}else{return b;}};EK.ptr.prototype.Bubbles=function(){var $ptr,a;a=this;return!!(a.Object.bubbles);};EK.prototype.Bubbles=function(){return this.$val.Bubbles();};EK.ptr.prototype.Cancelable=function(){var $ptr,a;a=this;return!!(a.Object.cancelable);};EK.prototype.Cancelable=function(){return this.$val.Cancelable();};EK.ptr.prototype.CurrentTarget=function(){var $ptr,a;a=this;return P(a.Object.currentTarget);};EK.prototype.CurrentTarget=function(){return this.$val.CurrentTarget();};EK.ptr.prototype.DefaultPrevented=function(){var $ptr,a;a=this;return!!(a.Object.defaultPrevented);};EK.prototype.DefaultPrevented=function(){return this.$val.DefaultPrevented();};EK.ptr.prototype.EventPhase=function(){var $ptr,a;a=this;return $parseInt(a.Object.eventPhase)>>0;};EK.prototype.EventPhase=function(){return this.$val.EventPhase();};EK.ptr.prototype.Target=function(){var $ptr,a;a=this;return P(a.Object.target);};EK.prototype.Target=function(){return this.$val.Target();};EK.ptr.prototype.Timestamp=function(){var $ptr,a,b,c,d,e,f;a=this;b=$parseInt(a.Object.timeStamp)>>0;d=(c=b/1000,(c===c&&c!==1/0&&c!==-1/0)?c>>0:$throwRuntimeError("integer divide by zero"));f=((e=b%1000,e===e?e:$throwRuntimeError("integer divide by zero"))*1000000>>0);return B.Unix(new $Int64(0,d),new $Int64(0,f));};EK.prototype.Timestamp=function(){return this.$val.Timestamp();};EK.ptr.prototype.Type=function(){var $ptr,a;a=this;return $internalize(a.Object.type,$String);};EK.prototype.Type=function(){return this.$val.Type();};EK.ptr.prototype.PreventDefault=function(){var $ptr,a;a=this;a.Object.preventDefault();};EK.prototype.PreventDefault=function(){return this.$val.PreventDefault();};EK.ptr.prototype.StopImmediatePropagation=function(){var $ptr,a;a=this;a.Object.stopImmediatePropagation();};EK.prototype.StopImmediatePropagation=function(){return this.$val.StopImmediatePropagation();};EK.ptr.prototype.StopPropagation=function(){var $ptr,a;a=this;a.Object.stopPropagation();};EK.prototype.StopPropagation=function(){return this.$val.StopPropagation();};FH.ptr.prototype.ModifierState=function(a){var $ptr,a,b;b=this;return!!(b.BasicEvent.Object.getModifierState($externalize(a,$String)));};FH.prototype.ModifierState=function(a){return this.$val.ModifierState(a);};FK.ptr.prototype.RelatedTarget=function(){var $ptr,a;a=this;return P(a.UIEvent.BasicEvent.Object.target);};FK.prototype.RelatedTarget=function(){return this.$val.RelatedTarget();};FK.ptr.prototype.ModifierState=function(a){var $ptr,a,b;b=this;return!!(b.UIEvent.BasicEvent.Object.getModifierState($externalize(a,$String)));};FK.prototype.ModifierState=function(a){return this.$val.ModifierState(a);};HQ.methods=[{prop:"Item",name:"Item",pkg:"",typ:$funcType([$Int],[$String],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"Add",name:"Add",pkg:"",typ:$funcType([$String],[],false)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([$String],[],false)},{prop:"Toggle",name:"Toggle",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Slice",name:"Slice",pkg:"",typ:$funcType([],[GS],false)},{prop:"SetString",name:"SetString",pkg:"",typ:$funcType([$String],[],false)},{prop:"Set",name:"Set",pkg:"",typ:$funcType([GS],[],false)}];Z.methods=[{prop:"GetElementByID",name:"GetElementByID",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)}];AA.methods=[{prop:"Async",name:"Async",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetAsync",name:"SetAsync",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"Doctype",name:"Doctype",pkg:"",typ:$funcType([],[AZ],false)},{prop:"DocumentElement",name:"DocumentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"DocumentURI",name:"DocumentURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"Implementation",name:"Implementation",pkg:"",typ:$funcType([],[BA],false)},{prop:"LastStyleSheetSet",name:"LastStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"PreferredStyleSheetSet",name:"PreferredStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"SelectedStyleSheetSet",name:"SelectedStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"StyleSheets",name:"StyleSheets",pkg:"",typ:$funcType([],[HS],false)},{prop:"StyleSheetSets",name:"StyleSheetSets",pkg:"",typ:$funcType([],[HS],false)},{prop:"AdoptNode",name:"AdoptNode",pkg:"",typ:$funcType([BD],[BD],false)},{prop:"ImportNode",name:"ImportNode",pkg:"",typ:$funcType([BD,$Bool],[BD],false)},{prop:"CreateDocumentFragment",name:"CreateDocumentFragment",pkg:"",typ:$funcType([],[X],false)},{prop:"CreateElement",name:"CreateElement",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"CreateElementNS",name:"CreateElementNS",pkg:"",typ:$funcType([$String,$String],[BF],false)},{prop:"CreateTextNode",name:"CreateTextNode",pkg:"",typ:$funcType([$String],[HB],false)},{prop:"ElementFromPoint",name:"ElementFromPoint",pkg:"",typ:$funcType([$Int,$Int],[BF],false)},{prop:"EnableStyleSheetsForSet",name:"EnableStyleSheetsForSet",pkg:"",typ:$funcType([$String],[],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"GetElementByID",name:"GetElementByID",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)}];HW.methods=[{prop:"ActiveElement",name:"ActiveElement",pkg:"",typ:$funcType([],[AE],false)},{prop:"Body",name:"Body",pkg:"",typ:$funcType([],[AE],false)},{prop:"Cookie",name:"Cookie",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetCookie",name:"SetCookie",pkg:"",typ:$funcType([$String],[],false)},{prop:"DefaultView",name:"DefaultView",pkg:"",typ:$funcType([],[AH],false)},{prop:"DesignMode",name:"DesignMode",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetDesignMode",name:"SetDesignMode",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"Domain",name:"Domain",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetDomain",name:"SetDomain",pkg:"",typ:$funcType([$String],[],false)},{prop:"Forms",name:"Forms",pkg:"",typ:$funcType([],[GT],false)},{prop:"Head",name:"Head",pkg:"",typ:$funcType([],[GU],false)},{prop:"Images",name:"Images",pkg:"",typ:$funcType([],[GW],false)},{prop:"LastModified",name:"LastModified",pkg:"",typ:$funcType([],[B.Time],false)},{prop:"Links",name:"Links",pkg:"",typ:$funcType([],[GI],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[HT],false)},{prop:"Plugins",name:"Plugins",pkg:"",typ:$funcType([],[GY],false)},{prop:"ReadyState",name:"ReadyState",pkg:"",typ:$funcType([],[$String],false)},{prop:"Referrer",name:"Referrer",pkg:"",typ:$funcType([],[$String],false)},{prop:"Scripts",name:"Scripts",pkg:"",typ:$funcType([],[HA],false)},{prop:"Title",name:"Title",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetTitle",name:"SetTitle",pkg:"",typ:$funcType([$String],[],false)},{prop:"URL",name:"URL",pkg:"",typ:$funcType([],[$String],false)}];IC.methods=[{prop:"Console",name:"Console",pkg:"",typ:$funcType([],[HZ],false)},{prop:"Document",name:"Document",pkg:"",typ:$funcType([],[W],false)},{prop:"FrameElement",name:"FrameElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[HT],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetName",name:"SetName",pkg:"",typ:$funcType([$String],[],false)},{prop:"InnerHeight",name:"InnerHeight",pkg:"",typ:$funcType([],[$Int],false)},{prop:"InnerWidth",name:"InnerWidth",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Opener",name:"Opener",pkg:"",typ:$funcType([],[AH],false)},{prop:"OuterHeight",name:"OuterHeight",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OuterWidth",name:"OuterWidth",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollX",name:"ScrollX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollY",name:"ScrollY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Parent",name:"Parent",pkg:"",typ:$funcType([],[AH],false)},{prop:"ScreenX",name:"ScreenX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScreenY",name:"ScreenY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollMaxX",name:"ScrollMaxX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollMaxY",name:"ScrollMaxY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Top",name:"Top",pkg:"",typ:$funcType([],[AH],false)},{prop:"History",name:"History",pkg:"",typ:$funcType([],[AW],false)},{prop:"Navigator",name:"Navigator",pkg:"",typ:$funcType([],[AM],false)},{prop:"Screen",name:"Screen",pkg:"",typ:$funcType([],[IB],false)},{prop:"Alert",name:"Alert",pkg:"",typ:$funcType([$String],[],false)},{prop:"Back",name:"Back",pkg:"",typ:$funcType([],[],false)},{prop:"Blur",name:"Blur",pkg:"",typ:$funcType([],[],false)},{prop:"ClearInterval",name:"ClearInterval",pkg:"",typ:$funcType([$Int],[],false)},{prop:"ClearTimeout",name:"ClearTimeout",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"Confirm",name:"Confirm",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"Focus",name:"Focus",pkg:"",typ:$funcType([],[],false)},{prop:"Forward",name:"Forward",pkg:"",typ:$funcType([],[],false)},{prop:"GetComputedStyle",name:"GetComputedStyle",pkg:"",typ:$funcType([BF,$String],[HY],false)},{prop:"GetSelection",name:"GetSelection",pkg:"",typ:$funcType([],[AK],false)},{prop:"Home",name:"Home",pkg:"",typ:$funcType([],[],false)},{prop:"MoveBy",name:"MoveBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"MoveTo",name:"MoveTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Open",name:"Open",pkg:"",typ:$funcType([$String,$String,$String],[AH],false)},{prop:"OpenDialog",name:"OpenDialog",pkg:"",typ:$funcType([$String,$String,$String,GF],[AH],false)},{prop:"PostMessage",name:"PostMessage",pkg:"",typ:$funcType([$String,$String,GF],[],false)},{prop:"Print",name:"Print",pkg:"",typ:$funcType([],[],false)},{prop:"Prompt",name:"Prompt",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"ResizeBy",name:"ResizeBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ResizeTo",name:"ResizeTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Scroll",name:"Scroll",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ScrollBy",name:"ScrollBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ScrollByLines",name:"ScrollByLines",pkg:"",typ:$funcType([$Int],[],false)},{prop:"ScrollTo",name:"ScrollTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"SetCursor",name:"SetCursor",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetInterval",name:"SetInterval",pkg:"",typ:$funcType([HC,$Int],[$Int],false)},{prop:"SetTimeout",name:"SetTimeout",pkg:"",typ:$funcType([HC,$Int],[$Int],false)},{prop:"Stop",name:"Stop",pkg:"",typ:$funcType([],[],false)},{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"RequestAnimationFrame",name:"RequestAnimationFrame",pkg:"",typ:$funcType([IA],[$Int],false)},{prop:"CancelAnimationFrame",name:"CancelAnimationFrame",pkg:"",typ:$funcType([$Int],[],false)}];IF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];HU.methods=[{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)},{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)}];GJ.methods=[{prop:"AccessKey",name:"AccessKey",pkg:"",typ:$funcType([],[$String],false)},{prop:"Dataset",name:"Dataset",pkg:"",typ:$funcType([],[HX],false)},{prop:"SetAccessKey",name:"SetAccessKey",pkg:"",typ:$funcType([$String],[],false)},{prop:"AccessKeyLabel",name:"AccessKeyLabel",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetAccessKeyLabel",name:"SetAccessKeyLabel",pkg:"",typ:$funcType([$String],[],false)},{prop:"ContentEditable",name:"ContentEditable",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetContentEditable",name:"SetContentEditable",pkg:"",typ:$funcType([$String],[],false)},{prop:"IsContentEditable",name:"IsContentEditable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Dir",name:"Dir",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetDir",name:"SetDir",pkg:"",typ:$funcType([$String],[],false)},{prop:"Draggable",name:"Draggable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetDraggable",name:"SetDraggable",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"Lang",name:"Lang",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetLang",name:"SetLang",pkg:"",typ:$funcType([$String],[],false)},{prop:"OffsetHeight",name:"OffsetHeight",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetLeft",name:"OffsetLeft",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetParent",name:"OffsetParent",pkg:"",typ:$funcType([],[AE],false)},{prop:"OffsetTop",name:"OffsetTop",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetWidth",name:"OffsetWidth",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"Style",name:"Style",pkg:"",typ:$funcType([],[HY],false)},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SetTabIndex",name:"SetTabIndex",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Title",name:"Title",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetTitle",name:"SetTitle",pkg:"",typ:$funcType([$String],[],false)},{prop:"Blur",name:"Blur",pkg:"",typ:$funcType([],[],false)},{prop:"Click",name:"Click",pkg:"",typ:$funcType([],[],false)},{prop:"Focus",name:"Focus",pkg:"",typ:$funcType([],[],false)}];IH.methods=[{prop:"Attributes",name:"Attributes",pkg:"",typ:$funcType([],[HX],false)},{prop:"GetBoundingClientRect",name:"GetBoundingClientRect",pkg:"",typ:$funcType([],[BG],false)},{prop:"PreviousElementSibling",name:"PreviousElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"NextElementSibling",name:"NextElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"Class",name:"Class",pkg:"",typ:$funcType([],[HQ],false)},{prop:"SetClass",name:"SetClass",pkg:"",typ:$funcType([$String],[],false)},{prop:"ID",name:"ID",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetID",name:"SetID",pkg:"",typ:$funcType([$String],[],false)},{prop:"TagName",name:"TagName",pkg:"",typ:$funcType([],[$String],false)},{prop:"GetAttribute",name:"GetAttribute",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"GetAttributeNS",name:"GetAttributeNS",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"HasAttribute",name:"HasAttribute",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"HasAttributeNS",name:"HasAttributeNS",pkg:"",typ:$funcType([$String,$String],[$Bool],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"RemoveAttribute",name:"RemoveAttribute",pkg:"",typ:$funcType([$String],[],false)},{prop:"RemoveAttributeNS",name:"RemoveAttributeNS",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"SetAttribute",name:"SetAttribute",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"SetAttributeNS",name:"SetAttributeNS",pkg:"",typ:$funcType([$String,$String,$String],[],false)},{prop:"InnerHTML",name:"InnerHTML",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetInnerHTML",name:"SetInnerHTML",pkg:"",typ:$funcType([$String],[],false)}];II.methods=[{prop:"Rel",name:"Rel",pkg:"",typ:$funcType([],[HQ],false)}];IJ.methods=[{prop:"Rel",name:"Rel",pkg:"",typ:$funcType([],[HQ],false)}];HI.methods=[{prop:"Rel",name:"Rel",pkg:"",typ:$funcType([],[HQ],false)}];IK.methods=[{prop:"Href",name:"Href",pkg:"",typ:$funcType([],[$String],false)},{prop:"Target",name:"Target",pkg:"",typ:$funcType([],[$String],false)}];IM.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];IO.methods=[{prop:"GetContext2d",name:"GetContext2d",pkg:"",typ:$funcType([],[IN],false)},{prop:"GetContext",name:"GetContext",pkg:"",typ:$funcType([$String],[HD],false)}];IN.methods=[{prop:"CreateLinearGradient",name:"CreateLinearGradient",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"Rect",name:"Rect",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"FillRect",name:"FillRect",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"StrokeRect",name:"StrokeRect",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"ClearRect",name:"ClearRect",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"Fill",name:"Fill",pkg:"",typ:$funcType([],[],false)},{prop:"Stroke",name:"Stroke",pkg:"",typ:$funcType([],[],false)},{prop:"BeginPath",name:"BeginPath",pkg:"",typ:$funcType([],[],false)},{prop:"MoveTo",name:"MoveTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ClosePath",name:"ClosePath",pkg:"",typ:$funcType([],[],false)},{prop:"LineTo",name:"LineTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Clip",name:"Clip",pkg:"",typ:$funcType([],[],false)},{prop:"QuadraticCurveTo",name:"QuadraticCurveTo",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int],[],false)},{prop:"BezierCurveTo",name:"BezierCurveTo",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,$Int,$Int],[],false)},{prop:"Arc",name:"Arc",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,$Int,$Bool],[],false)},{prop:"ArcTo",name:"ArcTo",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,$Int],[],false)},{prop:"IsPointInPath",name:"IsPointInPath",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Scale",name:"Scale",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Rotate",name:"Rotate",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Translate",name:"Translate",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Transform",name:"Transform",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,$Int,$Int],[],false)},{prop:"SetTransform",name:"SetTransform",pkg:"",typ:$funcType([$Int,$Int,$Int,$Int,$Int,$Int],[],false)},{prop:"FillText",name:"FillText",pkg:"",typ:$funcType([$String,$Int,$Int,$Int],[],false)},{prop:"StrokeText",name:"StrokeText",pkg:"",typ:$funcType([$String,$Int,$Int,$Int],[],false)}];HH.methods=[{prop:"Options",name:"Options",pkg:"",typ:$funcType([],[GR],false)}];IP.methods=[{prop:"Elements",name:"Elements",pkg:"",typ:$funcType([],[GI],false)},{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];GN.methods=[{prop:"Elements",name:"Elements",pkg:"",typ:$funcType([],[GI],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Submit",name:"Submit",pkg:"",typ:$funcType([],[],false)},{prop:"Reset",name:"Reset",pkg:"",typ:$funcType([],[],false)},{prop:"Item",name:"Item",pkg:"",typ:$funcType([$Int],[AE],false)},{prop:"NamedItem",name:"NamedItem",pkg:"",typ:$funcType([$String],[AE],false)}];IQ.methods=[{prop:"ContentDocument",name:"ContentDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ContentWindow",name:"ContentWindow",pkg:"",typ:$funcType([],[AH],false)}];IR.methods=[{prop:"Files",name:"Files",pkg:"",typ:$funcType([],[HG],false)},{prop:"List",name:"List",pkg:"",typ:$funcType([],[HH],false)},{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)},{prop:"Select",name:"Select",pkg:"",typ:$funcType([],[],false)},{prop:"SetSelectionRange",name:"SetSelectionRange",pkg:"",typ:$funcType([$Int,$Int,$String],[],false)},{prop:"StepDown",name:"StepDown",pkg:"",typ:$funcType([$Int],[$error],false)},{prop:"StepUp",name:"StepUp",pkg:"",typ:$funcType([$Int],[$error],false)}];IS.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];GO.methods=[{prop:"Control",name:"Control",pkg:"",typ:$funcType([],[AE],false)},{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)}];IT.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)}];IU.methods=[{prop:"Rel",name:"Rel",pkg:"",typ:$funcType([],[HQ],false)},{prop:"Sizes",name:"Sizes",pkg:"",typ:$funcType([],[HQ],false)},{prop:"Sheet",name:"Sheet",pkg:"",typ:$funcType([],[BB],false)}];IV.methods=[{prop:"Areas",name:"Areas",pkg:"",typ:$funcType([],[HJ],false)},{prop:"Images",name:"Images",pkg:"",typ:$funcType([],[GI],false)}];CY.methods=[{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)}];IW.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"ContentDocument",name:"ContentDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ContentWindow",name:"ContentWindow",pkg:"",typ:$funcType([],[AH],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];GQ.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)}];IX.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"For",name:"For",pkg:"",typ:$funcType([],[HQ],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];DI.methods=[{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)}];IY.methods=[{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Options",name:"Options",pkg:"",typ:$funcType([],[GR],false)},{prop:"SelectedOptions",name:"SelectedOptions",pkg:"",typ:$funcType([],[GR],false)},{prop:"Item",name:"Item",pkg:"",typ:$funcType([$Int],[GQ],false)},{prop:"NamedItem",name:"NamedItem",pkg:"",typ:$funcType([$String],[GQ],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)}];HM.methods=[{prop:"Cells",name:"Cells",pkg:"",typ:$funcType([],[HL],false)},{prop:"InsertCell",name:"InsertCell",pkg:"",typ:$funcType([$Int],[HK],false)},{prop:"DeleteCell",name:"DeleteCell",pkg:"",typ:$funcType([$Int],[],false)}];IZ.methods=[{prop:"Rows",name:"Rows",pkg:"",typ:$funcType([],[HN],false)},{prop:"DeleteRow",name:"DeleteRow",pkg:"",typ:$funcType([$Int],[],false)},{prop:"InsertRow",name:"InsertRow",pkg:"",typ:$funcType([$Int],[HM],false)}];JA.methods=[{prop:"Form",name:"Form",pkg:"",typ:$funcType([],[GN],false)},{prop:"Labels",name:"Labels",pkg:"",typ:$funcType([],[GP],false)},{prop:"Validity",name:"Validity",pkg:"",typ:$funcType([],[IL],false)},{prop:"CheckValidity",name:"CheckValidity",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"SetCustomValidity",name:"SetCustomValidity",pkg:"",typ:$funcType([$String],[],false)},{prop:"Select",name:"Select",pkg:"",typ:$funcType([],[],false)},{prop:"SetSelectionRange",name:"SetSelectionRange",pkg:"",typ:$funcType([$Int,$Int,$String],[],false)}];JC.methods=[{prop:"Track",name:"Track",pkg:"",typ:$funcType([],[JB],false)}];HY.methods=[{prop:"ToMap",name:"ToMap",pkg:"",typ:$funcType([],[HX],false)},{prop:"RemoveProperty",name:"RemoveProperty",pkg:"",typ:$funcType([$String],[],false)},{prop:"GetPropertyValue",name:"GetPropertyValue",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"GetPropertyPriority",name:"GetPropertyPriority",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"SetProperty",name:"SetProperty",pkg:"",typ:$funcType([$String,$String,$String],[],false)},{prop:"Index",name:"Index",pkg:"",typ:$funcType([$Int],[$String],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)}];HO.methods=[{prop:"Bubbles",name:"Bubbles",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Cancelable",name:"Cancelable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CurrentTarget",name:"CurrentTarget",pkg:"",typ:$funcType([],[BF],false)},{prop:"DefaultPrevented",name:"DefaultPrevented",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"EventPhase",name:"EventPhase",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Target",name:"Target",pkg:"",typ:$funcType([],[BF],false)},{prop:"Timestamp",name:"Timestamp",pkg:"",typ:$funcType([],[B.Time],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[$String],false)},{prop:"PreventDefault",name:"PreventDefault",pkg:"",typ:$funcType([],[],false)},{prop:"StopImmediatePropagation",name:"StopImmediatePropagation",pkg:"",typ:$funcType([],[],false)},{prop:"StopPropagation",name:"StopPropagation",pkg:"",typ:$funcType([],[],false)}];JD.methods=[{prop:"ModifierState",name:"ModifierState",pkg:"",typ:$funcType([$String],[$Bool],false)}];JE.methods=[{prop:"RelatedTarget",name:"RelatedTarget",pkg:"",typ:$funcType([],[BF],false)},{prop:"ModifierState",name:"ModifierState",pkg:"",typ:$funcType([$String],[$Bool],false)}];V.init([{prop:"dtl",name:"dtl",pkg:"honnef.co/go/js/dom",typ:HD,tag:""},{prop:"o",name:"o",pkg:"honnef.co/go/js/dom",typ:HD,tag:""},{prop:"sa",name:"sa",pkg:"honnef.co/go/js/dom",typ:$String,tag:""},{prop:"Length",name:"Length",pkg:"",typ:$Int,tag:"js:\"length\""}]);W.init([{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AdoptNode",name:"AdoptNode",pkg:"",typ:$funcType([BD],[BD],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"Async",name:"Async",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"CreateDocumentFragment",name:"CreateDocumentFragment",pkg:"",typ:$funcType([],[X],false)},{prop:"CreateElement",name:"CreateElement",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"CreateElementNS",name:"CreateElementNS",pkg:"",typ:$funcType([$String,$String],[BF],false)},{prop:"CreateTextNode",name:"CreateTextNode",pkg:"",typ:$funcType([$String],[HB],false)},{prop:"Doctype",name:"Doctype",pkg:"",typ:$funcType([],[AZ],false)},{prop:"DocumentElement",name:"DocumentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"DocumentURI",name:"DocumentURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ElementFromPoint",name:"ElementFromPoint",pkg:"",typ:$funcType([$Int,$Int],[BF],false)},{prop:"EnableStyleSheetsForSet",name:"EnableStyleSheetsForSet",pkg:"",typ:$funcType([$String],[],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"GetElementByID",name:"GetElementByID",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Implementation",name:"Implementation",pkg:"",typ:$funcType([],[BA],false)},{prop:"ImportNode",name:"ImportNode",pkg:"",typ:$funcType([BD,$Bool],[BD],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LastStyleSheetSet",name:"LastStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"PreferredStyleSheetSet",name:"PreferredStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"SelectedStyleSheetSet",name:"SelectedStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetAsync",name:"SetAsync",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"StyleSheetSets",name:"StyleSheetSets",pkg:"",typ:$funcType([],[HS],false)},{prop:"StyleSheets",name:"StyleSheets",pkg:"",typ:$funcType([],[HS],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);X.init([{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"GetElementByID",name:"GetElementByID",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);Y.init([{prop:"ActiveElement",name:"ActiveElement",pkg:"",typ:$funcType([],[AE],false)},{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AdoptNode",name:"AdoptNode",pkg:"",typ:$funcType([BD],[BD],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"Async",name:"Async",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"Body",name:"Body",pkg:"",typ:$funcType([],[AE],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"Cookie",name:"Cookie",pkg:"",typ:$funcType([],[$String],false)},{prop:"CreateDocumentFragment",name:"CreateDocumentFragment",pkg:"",typ:$funcType([],[X],false)},{prop:"CreateElement",name:"CreateElement",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"CreateElementNS",name:"CreateElementNS",pkg:"",typ:$funcType([$String,$String],[BF],false)},{prop:"CreateTextNode",name:"CreateTextNode",pkg:"",typ:$funcType([$String],[HB],false)},{prop:"DefaultView",name:"DefaultView",pkg:"",typ:$funcType([],[AH],false)},{prop:"DesignMode",name:"DesignMode",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Doctype",name:"Doctype",pkg:"",typ:$funcType([],[AZ],false)},{prop:"DocumentElement",name:"DocumentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"DocumentURI",name:"DocumentURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"Domain",name:"Domain",pkg:"",typ:$funcType([],[$String],false)},{prop:"ElementFromPoint",name:"ElementFromPoint",pkg:"",typ:$funcType([$Int,$Int],[BF],false)},{prop:"EnableStyleSheetsForSet",name:"EnableStyleSheetsForSet",pkg:"",typ:$funcType([$String],[],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"Forms",name:"Forms",pkg:"",typ:$funcType([],[GT],false)},{prop:"GetElementByID",name:"GetElementByID",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Head",name:"Head",pkg:"",typ:$funcType([],[GU],false)},{prop:"Images",name:"Images",pkg:"",typ:$funcType([],[GW],false)},{prop:"Implementation",name:"Implementation",pkg:"",typ:$funcType([],[BA],false)},{prop:"ImportNode",name:"ImportNode",pkg:"",typ:$funcType([BD,$Bool],[BD],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LastModified",name:"LastModified",pkg:"",typ:$funcType([],[B.Time],false)},{prop:"LastStyleSheetSet",name:"LastStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"Links",name:"Links",pkg:"",typ:$funcType([],[GI],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[HT],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"Plugins",name:"Plugins",pkg:"",typ:$funcType([],[GY],false)},{prop:"PreferredStyleSheetSet",name:"PreferredStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"ReadyState",name:"ReadyState",pkg:"",typ:$funcType([],[$String],false)},{prop:"Referrer",name:"Referrer",pkg:"",typ:$funcType([],[$String],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"Scripts",name:"Scripts",pkg:"",typ:$funcType([],[HA],false)},{prop:"SelectedStyleSheetSet",name:"SelectedStyleSheetSet",pkg:"",typ:$funcType([],[$String],false)},{prop:"SetAsync",name:"SetAsync",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetCookie",name:"SetCookie",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetDesignMode",name:"SetDesignMode",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetDomain",name:"SetDomain",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTitle",name:"SetTitle",pkg:"",typ:$funcType([$String],[],false)},{prop:"StyleSheetSets",name:"StyleSheetSets",pkg:"",typ:$funcType([],[HS],false)},{prop:"StyleSheets",name:"StyleSheets",pkg:"",typ:$funcType([],[HS],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Title",name:"Title",pkg:"",typ:$funcType([],[$String],false)},{prop:"URL",name:"URL",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);Z.init([{prop:"BasicNode",name:"",pkg:"",typ:HU,tag:""}]);AA.init([{prop:"BasicNode",name:"",pkg:"",typ:HU,tag:""}]);AB.init([{prop:"document",name:"",pkg:"honnef.co/go/js/dom",typ:HV,tag:""}]);AC.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"Href",name:"Href",pkg:"",typ:$String,tag:"js:\"href\""},{prop:"Protocol",name:"Protocol",pkg:"",typ:$String,tag:"js:\"protocol\""},{prop:"Host",name:"Host",pkg:"",typ:$String,tag:"js:\"host\""},{prop:"Hostname",name:"Hostname",pkg:"",typ:$String,tag:"js:\"hostname\""},{prop:"Port",name:"Port",pkg:"",typ:$String,tag:"js:\"port\""},{prop:"Pathname",name:"Pathname",pkg:"",typ:$String,tag:"js:\"pathname\""},{prop:"Search",name:"Search",pkg:"",typ:$String,tag:"js:\"search\""},{prop:"Hash",name:"Hash",pkg:"",typ:$String,tag:"js:\"hash\""},{prop:"Username",name:"Username",pkg:"",typ:$String,tag:"js:\"username\""},{prop:"Password",name:"Password",pkg:"",typ:$String,tag:"js:\"password\""},{prop:"Origin",name:"Origin",pkg:"",typ:$String,tag:"js:\"origin\""}]);AD.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"URLUtils",name:"",pkg:"",typ:GK,tag:""}]);AE.init([{prop:"AccessKey",name:"AccessKey",pkg:"",typ:$funcType([],[$String],false)},{prop:"AccessKeyLabel",name:"AccessKeyLabel",pkg:"",typ:$funcType([],[$String],false)},{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"Attributes",name:"Attributes",pkg:"",typ:$funcType([],[HX],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"Blur",name:"Blur",pkg:"",typ:$funcType([],[],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"Class",name:"Class",pkg:"",typ:$funcType([],[HQ],false)},{prop:"Click",name:"Click",pkg:"",typ:$funcType([],[],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"ContentEditable",name:"ContentEditable",pkg:"",typ:$funcType([],[$String],false)},{prop:"Dataset",name:"Dataset",pkg:"",typ:$funcType([],[HX],false)},{prop:"Dir",name:"Dir",pkg:"",typ:$funcType([],[$String],false)},{prop:"Draggable",name:"Draggable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"Focus",name:"Focus",pkg:"",typ:$funcType([],[],false)},{prop:"GetAttribute",name:"GetAttribute",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"GetAttributeNS",name:"GetAttributeNS",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"GetBoundingClientRect",name:"GetBoundingClientRect",pkg:"",typ:$funcType([],[BG],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"HasAttribute",name:"HasAttribute",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"HasAttributeNS",name:"HasAttributeNS",pkg:"",typ:$funcType([$String,$String],[$Bool],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ID",name:"ID",pkg:"",typ:$funcType([],[$String],false)},{prop:"InnerHTML",name:"InnerHTML",pkg:"",typ:$funcType([],[$String],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsContentEditable",name:"IsContentEditable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"Lang",name:"Lang",pkg:"",typ:$funcType([],[$String],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextElementSibling",name:"NextElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OffsetHeight",name:"OffsetHeight",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetLeft",name:"OffsetLeft",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetParent",name:"OffsetParent",pkg:"",typ:$funcType([],[AE],false)},{prop:"OffsetTop",name:"OffsetTop",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OffsetWidth",name:"OffsetWidth",pkg:"",typ:$funcType([],[$Float64],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"PreviousElementSibling",name:"PreviousElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"RemoveAttribute",name:"RemoveAttribute",pkg:"",typ:$funcType([$String],[],false)},{prop:"RemoveAttributeNS",name:"RemoveAttributeNS",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"SetAccessKey",name:"SetAccessKey",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetAccessKeyLabel",name:"SetAccessKeyLabel",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetAttribute",name:"SetAttribute",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"SetAttributeNS",name:"SetAttributeNS",pkg:"",typ:$funcType([$String,$String,$String],[],false)},{prop:"SetContentEditable",name:"SetContentEditable",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetDir",name:"SetDir",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetDraggable",name:"SetDraggable",pkg:"",typ:$funcType([$Bool],[],false)},{prop:"SetID",name:"SetID",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetInnerHTML",name:"SetInnerHTML",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetLang",name:"SetLang",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTitle",name:"SetTitle",pkg:"",typ:$funcType([$String],[],false)},{prop:"Style",name:"Style",pkg:"",typ:$funcType([],[HY],false)},{prop:"TagName",name:"TagName",pkg:"",typ:$funcType([],[$String],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Title",name:"Title",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);AH.init([{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"Alert",name:"Alert",pkg:"",typ:$funcType([$String],[],false)},{prop:"Back",name:"Back",pkg:"",typ:$funcType([],[],false)},{prop:"Blur",name:"Blur",pkg:"",typ:$funcType([],[],false)},{prop:"CancelAnimationFrame",name:"CancelAnimationFrame",pkg:"",typ:$funcType([$Int],[],false)},{prop:"ClearInterval",name:"ClearInterval",pkg:"",typ:$funcType([$Int],[],false)},{prop:"ClearTimeout",name:"ClearTimeout",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Close",name:"Close",pkg:"",typ:$funcType([],[],false)},{prop:"Confirm",name:"Confirm",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"Console",name:"Console",pkg:"",typ:$funcType([],[HZ],false)},{prop:"Document",name:"Document",pkg:"",typ:$funcType([],[W],false)},{prop:"Focus",name:"Focus",pkg:"",typ:$funcType([],[],false)},{prop:"Forward",name:"Forward",pkg:"",typ:$funcType([],[],false)},{prop:"FrameElement",name:"FrameElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"GetComputedStyle",name:"GetComputedStyle",pkg:"",typ:$funcType([BF,$String],[HY],false)},{prop:"GetSelection",name:"GetSelection",pkg:"",typ:$funcType([],[AK],false)},{prop:"History",name:"History",pkg:"",typ:$funcType([],[AW],false)},{prop:"Home",name:"Home",pkg:"",typ:$funcType([],[],false)},{prop:"InnerHeight",name:"InnerHeight",pkg:"",typ:$funcType([],[$Int],false)},{prop:"InnerWidth",name:"InnerWidth",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Location",name:"Location",pkg:"",typ:$funcType([],[HT],false)},{prop:"MoveBy",name:"MoveBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"MoveTo",name:"MoveTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Navigator",name:"Navigator",pkg:"",typ:$funcType([],[AM],false)},{prop:"Open",name:"Open",pkg:"",typ:$funcType([$String,$String,$String],[AH],false)},{prop:"OpenDialog",name:"OpenDialog",pkg:"",typ:$funcType([$String,$String,$String,GF],[AH],false)},{prop:"Opener",name:"Opener",pkg:"",typ:$funcType([],[AH],false)},{prop:"OuterHeight",name:"OuterHeight",pkg:"",typ:$funcType([],[$Int],false)},{prop:"OuterWidth",name:"OuterWidth",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Parent",name:"Parent",pkg:"",typ:$funcType([],[AH],false)},{prop:"PostMessage",name:"PostMessage",pkg:"",typ:$funcType([$String,$String,GF],[],false)},{prop:"Print",name:"Print",pkg:"",typ:$funcType([],[],false)},{prop:"Prompt",name:"Prompt",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"RequestAnimationFrame",name:"RequestAnimationFrame",pkg:"",typ:$funcType([IA],[$Int],false)},{prop:"ResizeBy",name:"ResizeBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ResizeTo",name:"ResizeTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Screen",name:"Screen",pkg:"",typ:$funcType([],[IB],false)},{prop:"ScreenX",name:"ScreenX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScreenY",name:"ScreenY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Scroll",name:"Scroll",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ScrollBy",name:"ScrollBy",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ScrollByLines",name:"ScrollByLines",pkg:"",typ:$funcType([$Int],[],false)},{prop:"ScrollMaxX",name:"ScrollMaxX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollMaxY",name:"ScrollMaxY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollTo",name:"ScrollTo",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"ScrollX",name:"ScrollX",pkg:"",typ:$funcType([],[$Int],false)},{prop:"ScrollY",name:"ScrollY",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SetCursor",name:"SetCursor",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetInterval",name:"SetInterval",pkg:"",typ:$funcType([HC,$Int],[$Int],false)},{prop:"SetName",name:"SetName",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTimeout",name:"SetTimeout",pkg:"",typ:$funcType([HC,$Int],[$Int],false)},{prop:"Stop",name:"Stop",pkg:"",typ:$funcType([],[],false)},{prop:"Top",name:"Top",pkg:"",typ:$funcType([],[AH],false)}]);AI.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);AK.init([]);AL.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"AvailTop",name:"AvailTop",pkg:"",typ:$Int,tag:"js:\"availTop\""},{prop:"AvailLeft",name:"AvailLeft",pkg:"",typ:$Int,tag:"js:\"availLeft\""},{prop:"AvailHeight",name:"AvailHeight",pkg:"",typ:$Int,tag:"js:\"availHeight\""},{prop:"AvailWidth",name:"AvailWidth",pkg:"",typ:$Int,tag:"js:\"availWidth\""},{prop:"ColorDepth",name:"ColorDepth",pkg:"",typ:$Int,tag:"js:\"colorDepth\""},{prop:"Height",name:"Height",pkg:"",typ:$Int,tag:"js:\"height\""},{prop:"Left",name:"Left",pkg:"",typ:$Int,tag:"js:\"left\""},{prop:"PixelDepth",name:"PixelDepth",pkg:"",typ:$Int,tag:"js:\"pixelDepth\""},{prop:"Top",name:"Top",pkg:"",typ:$Int,tag:"js:\"top\""},{prop:"Width",name:"Width",pkg:"",typ:$Int,tag:"js:\"width\""}]);AM.init([{prop:"AppName",name:"AppName",pkg:"",typ:$funcType([],[$String],false)},{prop:"AppVersion",name:"AppVersion",pkg:"",typ:$funcType([],[$String],false)},{prop:"CookieEnabled",name:"CookieEnabled",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"DoNotTrack",name:"DoNotTrack",pkg:"",typ:$funcType([],[$String],false)},{prop:"Geolocation",name:"Geolocation",pkg:"",typ:$funcType([],[AR],false)},{prop:"Language",name:"Language",pkg:"",typ:$funcType([],[$String],false)},{prop:"Online",name:"Online",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Platform",name:"Platform",pkg:"",typ:$funcType([],[$String],false)},{prop:"Product",name:"Product",pkg:"",typ:$funcType([],[$String],false)},{prop:"RegisterProtocolHandler",name:"RegisterProtocolHandler",pkg:"",typ:$funcType([$String,$String,$String],[],false)},{prop:"UserAgent",name:"UserAgent",pkg:"",typ:$funcType([],[$String],false)}]);AR.init([{prop:"ClearWatch",name:"ClearWatch",pkg:"",typ:$funcType([$Int],[],false)},{prop:"CurrentPosition",name:"CurrentPosition",pkg:"",typ:$funcType([ID,IE,AT],[AU],false)},{prop:"WatchPosition",name:"WatchPosition",pkg:"",typ:$funcType([ID,IE,AT],[$Int],false)}]);AS.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"Code",name:"Code",pkg:"",typ:$Int,tag:"js:\"code\""}]);AT.init([{prop:"EnableHighAccuracy",name:"EnableHighAccuracy",pkg:"",typ:$Bool,tag:""},{prop:"Timeout",name:"Timeout",pkg:"",typ:B.Duration,tag:""},{prop:"MaximumAge",name:"MaximumAge",pkg:"",typ:B.Duration,tag:""}]);AU.init([{prop:"Coords",name:"Coords",pkg:"",typ:IG,tag:""},{prop:"Timestamp",name:"Timestamp",pkg:"",typ:B.Time,tag:""}]);AV.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"Latitude",name:"Latitude",pkg:"",typ:$Float64,tag:"js:\"latitude\""},{prop:"Longitude",name:"Longitude",pkg:"",typ:$Float64,tag:"js:\"longitude\""},{prop:"Altitude",name:"Altitude",pkg:"",typ:$Float64,tag:"js:\"altitude\""},{prop:"Accuracy",name:"Accuracy",pkg:"",typ:$Float64,tag:"js:\"accuracy\""},{prop:"AltitudeAccuracy",name:"AltitudeAccuracy",pkg:"",typ:$Float64,tag:"js:\"altitudeAccuracy\""},{prop:"Heading",name:"Heading",pkg:"",typ:$Float64,tag:"js:\"heading\""},{prop:"Speed",name:"Speed",pkg:"",typ:$Float64,tag:"js:\"speed\""}]);AW.init([{prop:"Back",name:"Back",pkg:"",typ:$funcType([],[],false)},{prop:"Forward",name:"Forward",pkg:"",typ:$funcType([],[],false)},{prop:"Go",name:"Go",pkg:"",typ:$funcType([$Int],[],false)},{prop:"Length",name:"Length",pkg:"",typ:$funcType([],[$Int],false)},{prop:"PushState",name:"PushState",pkg:"",typ:$funcType([$emptyInterface,$String,$String],[],false)},{prop:"ReplaceState",name:"ReplaceState",pkg:"",typ:$funcType([$emptyInterface,$String,$String],[],false)},{prop:"State",name:"State",pkg:"",typ:$funcType([],[$emptyInterface],false)}]);AX.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);AZ.init([]);BA.init([]);BB.init([]);BD.init([{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);BE.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);BF.init([{prop:"AddEventListener",name:"AddEventListener",pkg:"",typ:$funcType([$String,$Bool,HR],[HE],false)},{prop:"AppendChild",name:"AppendChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"Attributes",name:"Attributes",pkg:"",typ:$funcType([],[HX],false)},{prop:"BaseURI",name:"BaseURI",pkg:"",typ:$funcType([],[$String],false)},{prop:"ChildNodes",name:"ChildNodes",pkg:"",typ:$funcType([],[GG],false)},{prop:"Class",name:"Class",pkg:"",typ:$funcType([],[HQ],false)},{prop:"CloneNode",name:"CloneNode",pkg:"",typ:$funcType([$Bool],[BD],false)},{prop:"CompareDocumentPosition",name:"CompareDocumentPosition",pkg:"",typ:$funcType([BD],[$Int],false)},{prop:"Contains",name:"Contains",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"FirstChild",name:"FirstChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"GetAttribute",name:"GetAttribute",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"GetAttributeNS",name:"GetAttributeNS",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"GetBoundingClientRect",name:"GetBoundingClientRect",pkg:"",typ:$funcType([],[BG],false)},{prop:"GetElementsByClassName",name:"GetElementsByClassName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagName",name:"GetElementsByTagName",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"GetElementsByTagNameNS",name:"GetElementsByTagNameNS",pkg:"",typ:$funcType([$String,$String],[GH],false)},{prop:"HasAttribute",name:"HasAttribute",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"HasAttributeNS",name:"HasAttributeNS",pkg:"",typ:$funcType([$String,$String],[$Bool],false)},{prop:"HasChildNodes",name:"HasChildNodes",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"ID",name:"ID",pkg:"",typ:$funcType([],[$String],false)},{prop:"InnerHTML",name:"InnerHTML",pkg:"",typ:$funcType([],[$String],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"IsDefaultNamespace",name:"IsDefaultNamespace",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"IsEqualNode",name:"IsEqualNode",pkg:"",typ:$funcType([BD],[$Bool],false)},{prop:"LastChild",name:"LastChild",pkg:"",typ:$funcType([],[BD],false)},{prop:"LookupNamespaceURI",name:"LookupNamespaceURI",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"LookupPrefix",name:"LookupPrefix",pkg:"",typ:$funcType([],[$String],false)},{prop:"NextElementSibling",name:"NextElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"NextSibling",name:"NextSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"NodeName",name:"NodeName",pkg:"",typ:$funcType([],[$String],false)},{prop:"NodeType",name:"NodeType",pkg:"",typ:$funcType([],[$Int],false)},{prop:"NodeValue",name:"NodeValue",pkg:"",typ:$funcType([],[$String],false)},{prop:"Normalize",name:"Normalize",pkg:"",typ:$funcType([],[],false)},{prop:"OwnerDocument",name:"OwnerDocument",pkg:"",typ:$funcType([],[W],false)},{prop:"ParentElement",name:"ParentElement",pkg:"",typ:$funcType([],[BF],false)},{prop:"ParentNode",name:"ParentNode",pkg:"",typ:$funcType([],[BD],false)},{prop:"PreviousElementSibling",name:"PreviousElementSibling",pkg:"",typ:$funcType([],[BF],false)},{prop:"PreviousSibling",name:"PreviousSibling",pkg:"",typ:$funcType([],[BD],false)},{prop:"QuerySelector",name:"QuerySelector",pkg:"",typ:$funcType([$String],[BF],false)},{prop:"QuerySelectorAll",name:"QuerySelectorAll",pkg:"",typ:$funcType([$String],[GH],false)},{prop:"RemoveAttribute",name:"RemoveAttribute",pkg:"",typ:$funcType([$String],[],false)},{prop:"RemoveAttributeNS",name:"RemoveAttributeNS",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"RemoveChild",name:"RemoveChild",pkg:"",typ:$funcType([BD],[],false)},{prop:"RemoveEventListener",name:"RemoveEventListener",pkg:"",typ:$funcType([$String,$Bool,HE],[],false)},{prop:"ReplaceChild",name:"ReplaceChild",pkg:"",typ:$funcType([BD,BD],[],false)},{prop:"SetAttribute",name:"SetAttribute",pkg:"",typ:$funcType([$String,$String],[],false)},{prop:"SetAttributeNS",name:"SetAttributeNS",pkg:"",typ:$funcType([$String,$String,$String],[],false)},{prop:"SetID",name:"SetID",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetInnerHTML",name:"SetInnerHTML",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetNodeValue",name:"SetNodeValue",pkg:"",typ:$funcType([$String],[],false)},{prop:"SetTextContent",name:"SetTextContent",pkg:"",typ:$funcType([$String],[],false)},{prop:"TagName",name:"TagName",pkg:"",typ:$funcType([],[$String],false)},{prop:"TextContent",name:"TextContent",pkg:"",typ:$funcType([],[$String],false)},{prop:"Underlying",name:"Underlying",pkg:"",typ:$funcType([],[HD],false)}]);BG.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"Height",name:"Height",pkg:"",typ:$Float64,tag:"js:\"height\""},{prop:"Width",name:"Width",pkg:"",typ:$Float64,tag:"js:\"width\""},{prop:"Left",name:"Left",pkg:"",typ:$Float64,tag:"js:\"left\""},{prop:"Right",name:"Right",pkg:"",typ:$Float64,tag:"js:\"right\""},{prop:"Top",name:"Top",pkg:"",typ:$Float64,tag:"js:\"top\""},{prop:"Bottom",name:"Bottom",pkg:"",typ:$Float64,tag:"js:\"bottom\""}]);BJ.init([{prop:"BasicElement",name:"",pkg:"",typ:IH,tag:""}]);BK.init([{prop:"BasicNode",name:"",pkg:"",typ:HU,tag:""}]);BL.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"URLUtils",name:"",pkg:"",typ:GK,tag:""},{prop:"HrefLang",name:"HrefLang",pkg:"",typ:$String,tag:"js:\"hreflang\""},{prop:"Media",name:"Media",pkg:"",typ:$String,tag:"js:\"media\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Target",name:"Target",pkg:"",typ:$String,tag:"js:\"target\""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:"js:\"text\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);BM.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Alt",name:"Alt",pkg:"",typ:$String,tag:"js:\"alt\""},{prop:"Coords",name:"Coords",pkg:"",typ:$String,tag:"js:\"coords\""},{prop:"HrefLang",name:"HrefLang",pkg:"",typ:$String,tag:"js:\"hreflang\""},{prop:"Media",name:"Media",pkg:"",typ:$String,tag:"js:\"media\""},{prop:"Search",name:"Search",pkg:"",typ:$String,tag:"js:\"search\""},{prop:"Shape",name:"Shape",pkg:"",typ:$String,tag:"js:\"shape\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Target",name:"Target",pkg:"",typ:$String,tag:"js:\"target\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);BN.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"URLUtils",name:"",pkg:"",typ:GK,tag:""},{prop:"Alt",name:"Alt",pkg:"",typ:$String,tag:"js:\"alt\""},{prop:"Coords",name:"Coords",pkg:"",typ:$String,tag:"js:\"coords\""},{prop:"HrefLang",name:"HrefLang",pkg:"",typ:$String,tag:"js:\"hreflang\""},{prop:"Media",name:"Media",pkg:"",typ:$String,tag:"js:\"media\""},{prop:"Search",name:"Search",pkg:"",typ:$String,tag:"js:\"search\""},{prop:"Shape",name:"Shape",pkg:"",typ:$String,tag:"js:\"shape\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Target",name:"Target",pkg:"",typ:$String,tag:"js:\"target\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);BO.init([{prop:"HTMLMediaElement",name:"",pkg:"",typ:GL,tag:""}]);BP.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);BQ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);BR.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);BS.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"CustomError",name:"CustomError",pkg:"",typ:$Bool,tag:"js:\"customError\""},{prop:"PatternMismatch",name:"PatternMismatch",pkg:"",typ:$Bool,tag:"js:\"patternMismatch\""},{prop:"RangeOverflow",name:"RangeOverflow",pkg:"",typ:$Bool,tag:"js:\"rangeOverflow\""},{prop:"RangeUnderflow",name:"RangeUnderflow",pkg:"",typ:$Bool,tag:"js:\"rangeUnderflow\""},{prop:"StepMismatch",name:"StepMismatch",pkg:"",typ:$Bool,tag:"js:\"stepMismatch\""},{prop:"TooLong",name:"TooLong",pkg:"",typ:$Bool,tag:"js:\"tooLong\""},{prop:"TypeMismatch",name:"TypeMismatch",pkg:"",typ:$Bool,tag:"js:\"typeMismatch\""},{prop:"Valid",name:"Valid",pkg:"",typ:$Bool,tag:"js:\"valid\""},{prop:"ValueMissing",name:"ValueMissing",pkg:"",typ:$Bool,tag:"js:\"valueMissing\""}]);BT.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"AutoFocus",name:"AutoFocus",pkg:"",typ:$Bool,tag:"js:\"autofocus\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"FormAction",name:"FormAction",pkg:"",typ:$String,tag:"js:\"formAction\""},{prop:"FormEncType",name:"FormEncType",pkg:"",typ:$String,tag:"js:\"formEncType\""},{prop:"FormMethod",name:"FormMethod",pkg:"",typ:$String,tag:"js:\"formMethod\""},{prop:"FormNoValidate",name:"FormNoValidate",pkg:"",typ:$Bool,tag:"js:\"formNoValidate\""},{prop:"FormTarget",name:"FormTarget",pkg:"",typ:$String,tag:"js:\"formTarget\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);BU.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Height",name:"Height",pkg:"",typ:$Int,tag:"js:\"height\""},{prop:"Width",name:"Width",pkg:"",typ:$Int,tag:"js:\"width\""}]);BV.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""},{prop:"FillStyle",name:"FillStyle",pkg:"",typ:$String,tag:"js:\"fillStyle\""},{prop:"StrokeStyle",name:"StrokeStyle",pkg:"",typ:$String,tag:"js:\"strokeStyle\""},{prop:"ShadowColor",name:"ShadowColor",pkg:"",typ:$String,tag:"js:\"shadowColor\""},{prop:"ShadowBlur",name:"ShadowBlur",pkg:"",typ:$Int,tag:"js:\"shadowBlur\""},{prop:"ShadowOffsetX",name:"ShadowOffsetX",pkg:"",typ:$Int,tag:"js:\"shadowOffsetX\""},{prop:"ShadowOffsetY",name:"ShadowOffsetY",pkg:"",typ:$Int,tag:"js:\"shadowOffsetY\""},{prop:"LineCap",name:"LineCap",pkg:"",typ:$String,tag:"js:\"lineCap\""},{prop:"LineJoin",name:"LineJoin",pkg:"",typ:$String,tag:"js:\"lineJoin\""},{prop:"LineWidth",name:"LineWidth",pkg:"",typ:$Int,tag:"js:\"lineWidth\""},{prop:"MiterLimit",name:"MiterLimit",pkg:"",typ:$Int,tag:"js:\"miterLimit\""},{prop:"Font",name:"Font",pkg:"",typ:$String,tag:"js:\"font\""},{prop:"TextAlign",name:"TextAlign",pkg:"",typ:$String,tag:"js:\"textAlign\""},{prop:"TextBaseline",name:"TextBaseline",pkg:"",typ:$String,tag:"js:\"textBaseline\""},{prop:"GlobalAlpha",name:"GlobalAlpha",pkg:"",typ:$Float64,tag:"js:\"globalAlpha\""},{prop:"GlobalCompositeOperation",name:"GlobalCompositeOperation",pkg:"",typ:$String,tag:"js:\"globalCompositeOperation\""}]);BW.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);BX.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""}]);BY.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);BZ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CA.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CB.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"Width",name:"Width",pkg:"",typ:$String,tag:"js:\"width\""}]);CC.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);CD.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CE.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"AcceptCharset",name:"AcceptCharset",pkg:"",typ:$String,tag:"js:\"acceptCharset\""},{prop:"Action",name:"Action",pkg:"",typ:$String,tag:"js:\"action\""},{prop:"Autocomplete",name:"Autocomplete",pkg:"",typ:$String,tag:"js:\"autocomplete\""},{prop:"Encoding",name:"Encoding",pkg:"",typ:$String,tag:"js:\"encoding\""},{prop:"Enctype",name:"Enctype",pkg:"",typ:$String,tag:"js:\"enctype\""},{prop:"Length",name:"Length",pkg:"",typ:$Int,tag:"js:\"length\""},{prop:"Method",name:"Method",pkg:"",typ:$String,tag:"js:\"method\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"NoValidate",name:"NoValidate",pkg:"",typ:$Bool,tag:"js:\"noValidate\""},{prop:"Target",name:"Target",pkg:"",typ:$String,tag:"js:\"target\""}]);CF.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CG.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CH.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CI.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CJ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CK.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CL.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Width",name:"Width",pkg:"",typ:$String,tag:"js:\"width\""},{prop:"Height",name:"Height",pkg:"",typ:$String,tag:"js:\"height\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"SrcDoc",name:"SrcDoc",pkg:"",typ:$String,tag:"js:\"srcdoc\""},{prop:"Seamless",name:"Seamless",pkg:"",typ:$Bool,tag:"js:\"seamless\""}]);CM.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Complete",name:"Complete",pkg:"",typ:$Bool,tag:"js:\"complete\""},{prop:"CrossOrigin",name:"CrossOrigin",pkg:"",typ:$String,tag:"js:\"crossOrigin\""},{prop:"Height",name:"Height",pkg:"",typ:$Int,tag:"js:\"height\""},{prop:"IsMap",name:"IsMap",pkg:"",typ:$Bool,tag:"js:\"isMap\""},{prop:"NaturalHeight",name:"NaturalHeight",pkg:"",typ:$Int,tag:"js:\"naturalHeight\""},{prop:"NaturalWidth",name:"NaturalWidth",pkg:"",typ:$Int,tag:"js:\"naturalWidth\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"UseMap",name:"UseMap",pkg:"",typ:$String,tag:"js:\"useMap\""},{prop:"Width",name:"Width",pkg:"",typ:$Int,tag:"js:\"width\""}]);CN.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Accept",name:"Accept",pkg:"",typ:$String,tag:"js:\"accept\""},{prop:"Alt",name:"Alt",pkg:"",typ:$String,tag:"js:\"alt\""},{prop:"Autocomplete",name:"Autocomplete",pkg:"",typ:$String,tag:"js:\"autocomplete\""},{prop:"Autofocus",name:"Autofocus",pkg:"",typ:$Bool,tag:"js:\"autofocus\""},{prop:"Checked",name:"Checked",pkg:"",typ:$Bool,tag:"js:\"checked\""},{prop:"DefaultChecked",name:"DefaultChecked",pkg:"",typ:$Bool,tag:"js:\"defaultChecked\""},{prop:"DefaultValue",name:"DefaultValue",pkg:"",typ:$String,tag:"js:\"defaultValue\""},{prop:"DirName",name:"DirName",pkg:"",typ:$String,tag:"js:\"dirName\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"FormAction",name:"FormAction",pkg:"",typ:$String,tag:"js:\"formAction\""},{prop:"FormEncType",name:"FormEncType",pkg:"",typ:$String,tag:"js:\"formEncType\""},{prop:"FormMethod",name:"FormMethod",pkg:"",typ:$String,tag:"js:\"formMethod\""},{prop:"FormNoValidate",name:"FormNoValidate",pkg:"",typ:$Bool,tag:"js:\"formNoValidate\""},{prop:"FormTarget",name:"FormTarget",pkg:"",typ:$String,tag:"js:\"formTarget\""},{prop:"Height",name:"Height",pkg:"",typ:$String,tag:"js:\"height\""},{prop:"Indeterminate",name:"Indeterminate",pkg:"",typ:$Bool,tag:"js:\"indeterminate\""},{prop:"Max",name:"Max",pkg:"",typ:$String,tag:"js:\"max\""},{prop:"MaxLength",name:"MaxLength",pkg:"",typ:$Int,tag:"js:\"maxLength\""},{prop:"Min",name:"Min",pkg:"",typ:$String,tag:"js:\"min\""},{prop:"Multiple",name:"Multiple",pkg:"",typ:$Bool,tag:"js:\"multiple\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Pattern",name:"Pattern",pkg:"",typ:$String,tag:"js:\"pattern\""},{prop:"Placeholder",name:"Placeholder",pkg:"",typ:$String,tag:"js:\"placeholder\""},{prop:"ReadOnly",name:"ReadOnly",pkg:"",typ:$Bool,tag:"js:\"readOnly\""},{prop:"Required",name:"Required",pkg:"",typ:$Bool,tag:"js:\"required\""},{prop:"SelectionDirection",name:"SelectionDirection",pkg:"",typ:$String,tag:"js:\"selectionDirection\""},{prop:"SelectionEnd",name:"SelectionEnd",pkg:"",typ:$Int,tag:"js:\"selectionEnd\""},{prop:"SelectionStart",name:"SelectionStart",pkg:"",typ:$Int,tag:"js:\"selectionStart\""},{prop:"Size",name:"Size",pkg:"",typ:$Int,tag:"js:\"size\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"Step",name:"Step",pkg:"",typ:$String,tag:"js:\"step\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""},{prop:"ValueAsDate",name:"ValueAsDate",pkg:"",typ:B.Time,tag:"js:\"valueAsDate\""},{prop:"ValueAsNumber",name:"ValueAsNumber",pkg:"",typ:$Float64,tag:"js:\"valueAsNumber\""},{prop:"Width",name:"Width",pkg:"",typ:$String,tag:"js:\"width\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);CO.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);CP.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Autofocus",name:"Autofocus",pkg:"",typ:$Bool,tag:"js:\"autofocus\""},{prop:"Challenge",name:"Challenge",pkg:"",typ:$String,tag:"js:\"challenge\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Keytype",name:"Keytype",pkg:"",typ:$String,tag:"js:\"keytype\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);CQ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$Int,tag:"js:\"value\""}]);CR.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"For",name:"For",pkg:"",typ:$String,tag:"js:\"htmlFor\""}]);CS.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CT.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Href",name:"Href",pkg:"",typ:$String,tag:"js:\"href\""},{prop:"HrefLang",name:"HrefLang",pkg:"",typ:$String,tag:"js:\"hrefLang\""},{prop:"Media",name:"Media",pkg:"",typ:$String,tag:"js:\"media\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);CU.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""}]);CV.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CW.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);CX.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Content",name:"Content",pkg:"",typ:$String,tag:"js:\"content\""},{prop:"HTTPEquiv",name:"HTTPEquiv",pkg:"",typ:$String,tag:"js:\"httpEquiv\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""}]);CY.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"High",name:"High",pkg:"",typ:$Float64,tag:"js:\"high\""},{prop:"Low",name:"Low",pkg:"",typ:$Float64,tag:"js:\"low\""},{prop:"Max",name:"Max",pkg:"",typ:$Float64,tag:"js:\"max\""},{prop:"Min",name:"Min",pkg:"",typ:$Float64,tag:"js:\"min\""},{prop:"Optimum",name:"Optimum",pkg:"",typ:$Float64,tag:"js:\"optimum\""}]);CZ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Cite",name:"Cite",pkg:"",typ:$String,tag:"js:\"cite\""},{prop:"DateTime",name:"DateTime",pkg:"",typ:$String,tag:"js:\"dateTime\""}]);DA.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Reversed",name:"Reversed",pkg:"",typ:$Bool,tag:"js:\"reversed\""},{prop:"Start",name:"Start",pkg:"",typ:$Int,tag:"js:\"start\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);DB.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Data",name:"Data",pkg:"",typ:$String,tag:"js:\"data\""},{prop:"Height",name:"Height",pkg:"",typ:$String,tag:"js:\"height\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"TypeMustMatch",name:"TypeMustMatch",pkg:"",typ:$Bool,tag:"js:\"typeMustMatch\""},{prop:"UseMap",name:"UseMap",pkg:"",typ:$String,tag:"js:\"useMap\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"With",name:"With",pkg:"",typ:$String,tag:"js:\"with\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);DC.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Label",name:"Label",pkg:"",typ:$String,tag:"js:\"label\""}]);DD.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"DefaultSelected",name:"DefaultSelected",pkg:"",typ:$Bool,tag:"js:\"defaultSelected\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Index",name:"Index",pkg:"",typ:$Int,tag:"js:\"index\""},{prop:"Label",name:"Label",pkg:"",typ:$String,tag:"js:\"label\""},{prop:"Selected",name:"Selected",pkg:"",typ:$Bool,tag:"js:\"selected\""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:"js:\"text\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""}]);DE.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"DefaultValue",name:"DefaultValue",pkg:"",typ:$String,tag:"js:\"defaultValue\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);DF.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DG.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""}]);DH.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DI.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Max",name:"Max",pkg:"",typ:$Float64,tag:"js:\"max\""},{prop:"Position",name:"Position",pkg:"",typ:$Float64,tag:"js:\"position\""},{prop:"Value",name:"Value",pkg:"",typ:$Float64,tag:"js:\"value\""}]);DJ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Cite",name:"Cite",pkg:"",typ:$String,tag:"js:\"cite\""}]);DK.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"Charset",name:"Charset",pkg:"",typ:$String,tag:"js:\"charset\""},{prop:"Async",name:"Async",pkg:"",typ:$Bool,tag:"js:\"async\""},{prop:"Defer",name:"Defer",pkg:"",typ:$Bool,tag:"js:\"defer\""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:"js:\"text\""}]);DL.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Autofocus",name:"Autofocus",pkg:"",typ:$Bool,tag:"js:\"autofocus\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"Length",name:"Length",pkg:"",typ:$Int,tag:"js:\"length\""},{prop:"Multiple",name:"Multiple",pkg:"",typ:$Bool,tag:"js:\"multiple\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Required",name:"Required",pkg:"",typ:$Bool,tag:"js:\"required\""},{prop:"SelectedIndex",name:"SelectedIndex",pkg:"",typ:$Int,tag:"js:\"selectedIndex\""},{prop:"Size",name:"Size",pkg:"",typ:$Int,tag:"js:\"size\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""}]);DM.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Media",name:"Media",pkg:"",typ:$String,tag:"js:\"media\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""}]);DN.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DO.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DP.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DQ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"ColSpan",name:"ColSpan",pkg:"",typ:$Int,tag:"js:\"colSpan\""},{prop:"RowSpan",name:"RowSpan",pkg:"",typ:$Int,tag:"js:\"rowSpan\""},{prop:"CellIndex",name:"CellIndex",pkg:"",typ:$Int,tag:"js:\"cellIndex\""}]);DR.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Span",name:"Span",pkg:"",typ:$Int,tag:"js:\"span\""}]);DS.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DT.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DU.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Abbr",name:"Abbr",pkg:"",typ:$String,tag:"js:\"abbr\""},{prop:"Scope",name:"Scope",pkg:"",typ:$String,tag:"js:\"scope\""}]);DV.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"RowIndex",name:"RowIndex",pkg:"",typ:$Int,tag:"js:\"rowIndex\""},{prop:"SectionRowIndex",name:"SectionRowIndex",pkg:"",typ:$Int,tag:"js:\"sectionRowIndex\""}]);DW.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);DX.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Autocomplete",name:"Autocomplete",pkg:"",typ:$String,tag:"js:\"autocomplete\""},{prop:"Autofocus",name:"Autofocus",pkg:"",typ:$Bool,tag:"js:\"autofocus\""},{prop:"Cols",name:"Cols",pkg:"",typ:$Int,tag:"js:\"cols\""},{prop:"DefaultValue",name:"DefaultValue",pkg:"",typ:$String,tag:"js:\"defaultValue\""},{prop:"DirName",name:"DirName",pkg:"",typ:$String,tag:"js:\"dirName\""},{prop:"Disabled",name:"Disabled",pkg:"",typ:$Bool,tag:"js:\"disabled\""},{prop:"MaxLength",name:"MaxLength",pkg:"",typ:$Int,tag:"js:\"maxLength\""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:"js:\"name\""},{prop:"Placeholder",name:"Placeholder",pkg:"",typ:$String,tag:"js:\"placeholder\""},{prop:"ReadOnly",name:"ReadOnly",pkg:"",typ:$Bool,tag:"js:\"readOnly\""},{prop:"Required",name:"Required",pkg:"",typ:$Bool,tag:"js:\"required\""},{prop:"Rows",name:"Rows",pkg:"",typ:$Int,tag:"js:\"rows\""},{prop:"SelectionDirection",name:"SelectionDirection",pkg:"",typ:$String,tag:"js:\"selectionDirection\""},{prop:"SelectionStart",name:"SelectionStart",pkg:"",typ:$Int,tag:"js:\"selectionStart\""},{prop:"SelectionEnd",name:"SelectionEnd",pkg:"",typ:$Int,tag:"js:\"selectionEnd\""},{prop:"TabIndex",name:"TabIndex",pkg:"",typ:$Int,tag:"js:\"tabIndex\""},{prop:"TextLength",name:"TextLength",pkg:"",typ:$Int,tag:"js:\"textLength\""},{prop:"Type",name:"Type",pkg:"",typ:$String,tag:"js:\"type\""},{prop:"ValidationMessage",name:"ValidationMessage",pkg:"",typ:$String,tag:"js:\"validationMessage\""},{prop:"Value",name:"Value",pkg:"",typ:$String,tag:"js:\"value\""},{prop:"WillValidate",name:"WillValidate",pkg:"",typ:$Bool,tag:"js:\"willValidate\""},{prop:"Wrap",name:"Wrap",pkg:"",typ:$String,tag:"js:\"wrap\""}]);DY.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"DateTime",name:"DateTime",pkg:"",typ:$String,tag:"js:\"dateTime\""}]);DZ.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:"js:\"text\""}]);EA.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);EB.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""},{prop:"Kind",name:"Kind",pkg:"",typ:$String,tag:"js:\"kind\""},{prop:"Src",name:"Src",pkg:"",typ:$String,tag:"js:\"src\""},{prop:"Srclang",name:"Srclang",pkg:"",typ:$String,tag:"js:\"srclang\""},{prop:"Label",name:"Label",pkg:"",typ:$String,tag:"js:\"label\""},{prop:"Default",name:"Default",pkg:"",typ:$Bool,tag:"js:\"default\""},{prop:"ReadyState",name:"ReadyState",pkg:"",typ:$Int,tag:"js:\"readyState\""}]);EC.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);ED.init([{prop:"BasicHTMLElement",name:"",pkg:"",typ:GJ,tag:""}]);EE.init([{prop:"HTMLMediaElement",name:"",pkg:"",typ:GL,tag:""}]);EF.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);EG.init([{prop:"BasicNode",name:"",pkg:"",typ:HU,tag:""}]);EJ.init([{prop:"Bubbles",name:"Bubbles",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"Cancelable",name:"Cancelable",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"CurrentTarget",name:"CurrentTarget",pkg:"",typ:$funcType([],[BF],false)},{prop:"DefaultPrevented",name:"DefaultPrevented",pkg:"",typ:$funcType([],[$Bool],false)},{prop:"EventPhase",name:"EventPhase",pkg:"",typ:$funcType([],[$Int],false)},{prop:"PreventDefault",name:"PreventDefault",pkg:"",typ:$funcType([],[],false)},{prop:"StopImmediatePropagation",name:"StopImmediatePropagation",pkg:"",typ:$funcType([],[],false)},{prop:"StopPropagation",name:"StopPropagation",pkg:"",typ:$funcType([],[],false)},{prop:"Target",name:"Target",pkg:"",typ:$funcType([],[BF],false)},{prop:"Timestamp",name:"Timestamp",pkg:"",typ:$funcType([],[B.Time],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[$String],false)}]);EK.init([{prop:"Object",name:"",pkg:"",typ:HD,tag:""}]);EL.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EM.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EN.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EO.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EP.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EQ.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);ER.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""},{prop:"Code",name:"Code",pkg:"",typ:$Int,tag:"js:\"code\""},{prop:"Reason",name:"Reason",pkg:"",typ:$String,tag:"js:\"reason\""},{prop:"WasClean",name:"WasClean",pkg:"",typ:$Bool,tag:"js:\"wasClean\""}]);ES.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);ET.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EU.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EV.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EW.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EX.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EY.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);EZ.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FA.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FB.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FC.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FD.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FE.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FF.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FG.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FH.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""},{prop:"AltKey",name:"AltKey",pkg:"",typ:$Bool,tag:"js:\"altKey\""},{prop:"CharCode",name:"CharCode",pkg:"",typ:$Int,tag:"js:\"charCode\""},{prop:"CtrlKey",name:"CtrlKey",pkg:"",typ:$Bool,tag:"js:\"ctrlKey\""},{prop:"Key",name:"Key",pkg:"",typ:$String,tag:"js:\"key\""},{prop:"KeyIdentifier",name:"KeyIdentifier",pkg:"",typ:$String,tag:"js:\"keyIdentifier\""},{prop:"KeyCode",name:"KeyCode",pkg:"",typ:$Int,tag:"js:\"keyCode\""},{prop:"Locale",name:"Locale",pkg:"",typ:$String,tag:"js:\"locale\""},{prop:"Location",name:"Location",pkg:"",typ:$Int,tag:"js:\"location\""},{prop:"KeyLocation",name:"KeyLocation",pkg:"",typ:$Int,tag:"js:\"keyLocation\""},{prop:"MetaKey",name:"MetaKey",pkg:"",typ:$Bool,tag:"js:\"metaKey\""},{prop:"Repeat",name:"Repeat",pkg:"",typ:$Bool,tag:"js:\"repeat\""},{prop:"ShiftKey",name:"ShiftKey",pkg:"",typ:$Bool,tag:"js:\"shiftKey\""}]);FI.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FJ.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""},{prop:"Data",name:"Data",pkg:"",typ:HD,tag:"js:\"data\""}]);FK.init([{prop:"UIEvent",name:"",pkg:"",typ:HP,tag:""},{prop:"AltKey",name:"AltKey",pkg:"",typ:$Bool,tag:"js:\"altKey\""},{prop:"Button",name:"Button",pkg:"",typ:$Int,tag:"js:\"button\""},{prop:"ClientX",name:"ClientX",pkg:"",typ:$Int,tag:"js:\"clientX\""},{prop:"ClientY",name:"ClientY",pkg:"",typ:$Int,tag:"js:\"clientY\""},{prop:"CtrlKey",name:"CtrlKey",pkg:"",typ:$Bool,tag:"js:\"ctrlKey\""},{prop:"MetaKey",name:"MetaKey",pkg:"",typ:$Bool,tag:"js:\"metaKey\""},{prop:"MovementX",name:"MovementX",pkg:"",typ:$Int,tag:"js:\"movementX\""},{prop:"MovementY",name:"MovementY",pkg:"",typ:$Int,tag:"js:\"movementY\""},{prop:"ScreenX",name:"ScreenX",pkg:"",typ:$Int,tag:"js:\"screenX\""},{prop:"ScreenY",name:"ScreenY",pkg:"",typ:$Int,tag:"js:\"screenY\""},{prop:"ShiftKey",name:"ShiftKey",pkg:"",typ:$Bool,tag:"js:\"shiftKey\""}]);FL.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FM.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FN.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FO.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FP.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FQ.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FR.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FS.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FT.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FU.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FV.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FW.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FX.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FY.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);FZ.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);GA.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);GB.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);GC.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""}]);GD.init([{prop:"BasicEvent",name:"",pkg:"",typ:HO,tag:""},{prop:"DeltaX",name:"DeltaX",pkg:"",typ:$Float64,tag:"js:\"deltaX\""},{prop:"DeltaY",name:"DeltaY",pkg:"",typ:$Float64,tag:"js:\"deltaY\""},{prop:"DeltaZ",name:"DeltaZ",pkg:"",typ:$Float64,tag:"js:\"deltaZ\""},{prop:"DeltaMode",name:"DeltaMode",pkg:"",typ:$Int,tag:"js:\"deltaMode\""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["html"]=(function(){var $pkg={},$init,A,B,L,M,N,C,D,F,I,G,H,K;A=$packages["strings"];B=$packages["unicode/utf8"];L=$sliceType($String);M=$arrayType($Int32,2);N=$sliceType($Uint8);G=function(a,b,c,d){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;e=0;f=0;g=1;h=$subslice(a,c);i=g;j=h;if(j.$length<=1){((b<0||b>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b]=((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]));k=b+1>>0;l=c+1>>0;e=k;f=l;return[e,f];}if(((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])===35){if(j.$length<=3){((b<0||b>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b]=((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]));m=b+1>>0;n=c+1>>0;e=m;f=n;return[e,f];}i=i+(1)>>0;o=((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]);p=false;if((o===120)||(o===88)){p=true;i=i+(1)>>0;}q=0;while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]);i=i+(1)>>0;if(p){if(48<=o&&o<=57){q=(((((16>>>16<<16)*q>>0)+(16<<16>>>16)*q)>>0)+(o>>0)>>0)-48>>0;continue;}else if(97<=o&&o<=102){q=((((((16>>>16<<16)*q>>0)+(16<<16>>>16)*q)>>0)+(o>>0)>>0)-97>>0)+10>>0;continue;}else if(65<=o&&o<=70){q=((((((16>>>16<<16)*q>>0)+(16<<16>>>16)*q)>>0)+(o>>0)>>0)-65>>0)+10>>0;continue;}}else if(48<=o&&o<=57){q=(((((10>>>16<<16)*q>>0)+(10<<16>>>16)*q)>>0)+(o>>0)>>0)-48>>0;continue;}if(!((o===59))){i=i-(1)>>0;}break;}if(i<=3){((b<0||b>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+b]=((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]));r=b+1>>0;s=c+1>>0;e=r;f=s;return[e,f];}if(128<=q&&q<=159){q=(t=q-128>>0,((t<0||t>=F.length)?$throwRuntimeError("index out of range"):F[t]));}else if((q===0)||(55296<=q&&q<=57343)||q>1114111){q=65533;}u=b+B.EncodeRune($subslice(a,b),q)>>0;v=c+i>>0;e=u;f=v;return[e,f];}while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]);i=i+(1)>>0;if(97<=w&&w<=122||65<=w&&w<=90||48<=w&&w<=57){continue;}if(!((w===59))){i=i-(1)>>0;}break;}x=$bytesToString($subslice(j,1,i));if(x===""){}else if(d&&!((x.charCodeAt((x.length-1>>0))===59))&&j.$length>i&&(((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])===61)){}else{z=(y=C[$String.keyFor(x)],y!==undefined?y.v:0);if(!((z===0))){aa=b+B.EncodeRune($subslice(a,b),z)>>0;ab=c+i>>0;e=aa;f=ab;return[e,f];}else{ad=$clone((ac=D[$String.keyFor(x)],ac!==undefined?ac.v:M.zero()),M);if(!((ad[0]===0))){ae=b+B.EncodeRune($subslice(a,b),ad[0])>>0;af=ae+B.EncodeRune($subslice(a,ae),ad[1])>>0;ag=c+i>>0;e=af;f=ag;return[e,f];}else if(!d){ah=x.length-1>>0;if(ah>6){ah=6;}ai=ah;while(true){if(!(ai>1)){break;}ak=(aj=C[$String.keyFor(x.substring(0,ai))],aj!==undefined?aj.v:0);if(!((ak===0))){al=b+B.EncodeRune($subslice(a,b),ak)>>0;am=(c+ai>>0)+1>>0;e=al;f=am;return[e,f];}ai=ai-(1)>>0;}}}}an=b+i>>0;ao=c+i>>0;e=an;f=ao;$copySlice($subslice(a,b,e),$subslice(a,c,f));ap=e;aq=f;e=ap;f=aq;return[e,f];};H=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;b=a;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]);if(e===38){f=G(a,d,d,false);g=f[0];h=f[1];while(true){if(!(h=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h]);if(i===38){j=G(a,g,h,false);g=j[0];h=j[1];}else{((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]=i);k=g+1>>0;l=h+1>>0;g=k;h=l;}}return $subslice(a,0,g);}c++;}return a;};K=function(a){var $ptr,a;if(!A.Contains(a,"&")){return a;}return $bytesToString(H(new N($stringToBytes(a))));};$pkg.UnescapeString=K;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}C=$makeMap($String.keyFor,[{k:"AElig;",v:198},{k:"AMP;",v:38},{k:"Aacute;",v:193},{k:"Abreve;",v:258},{k:"Acirc;",v:194},{k:"Acy;",v:1040},{k:"Afr;",v:120068},{k:"Agrave;",v:192},{k:"Alpha;",v:913},{k:"Amacr;",v:256},{k:"And;",v:10835},{k:"Aogon;",v:260},{k:"Aopf;",v:120120},{k:"ApplyFunction;",v:8289},{k:"Aring;",v:197},{k:"Ascr;",v:119964},{k:"Assign;",v:8788},{k:"Atilde;",v:195},{k:"Auml;",v:196},{k:"Backslash;",v:8726},{k:"Barv;",v:10983},{k:"Barwed;",v:8966},{k:"Bcy;",v:1041},{k:"Because;",v:8757},{k:"Bernoullis;",v:8492},{k:"Beta;",v:914},{k:"Bfr;",v:120069},{k:"Bopf;",v:120121},{k:"Breve;",v:728},{k:"Bscr;",v:8492},{k:"Bumpeq;",v:8782},{k:"CHcy;",v:1063},{k:"COPY;",v:169},{k:"Cacute;",v:262},{k:"Cap;",v:8914},{k:"CapitalDifferentialD;",v:8517},{k:"Cayleys;",v:8493},{k:"Ccaron;",v:268},{k:"Ccedil;",v:199},{k:"Ccirc;",v:264},{k:"Cconint;",v:8752},{k:"Cdot;",v:266},{k:"Cedilla;",v:184},{k:"CenterDot;",v:183},{k:"Cfr;",v:8493},{k:"Chi;",v:935},{k:"CircleDot;",v:8857},{k:"CircleMinus;",v:8854},{k:"CirclePlus;",v:8853},{k:"CircleTimes;",v:8855},{k:"ClockwiseContourIntegral;",v:8754},{k:"CloseCurlyDoubleQuote;",v:8221},{k:"CloseCurlyQuote;",v:8217},{k:"Colon;",v:8759},{k:"Colone;",v:10868},{k:"Congruent;",v:8801},{k:"Conint;",v:8751},{k:"ContourIntegral;",v:8750},{k:"Copf;",v:8450},{k:"Coproduct;",v:8720},{k:"CounterClockwiseContourIntegral;",v:8755},{k:"Cross;",v:10799},{k:"Cscr;",v:119966},{k:"Cup;",v:8915},{k:"CupCap;",v:8781},{k:"DD;",v:8517},{k:"DDotrahd;",v:10513},{k:"DJcy;",v:1026},{k:"DScy;",v:1029},{k:"DZcy;",v:1039},{k:"Dagger;",v:8225},{k:"Darr;",v:8609},{k:"Dashv;",v:10980},{k:"Dcaron;",v:270},{k:"Dcy;",v:1044},{k:"Del;",v:8711},{k:"Delta;",v:916},{k:"Dfr;",v:120071},{k:"DiacriticalAcute;",v:180},{k:"DiacriticalDot;",v:729},{k:"DiacriticalDoubleAcute;",v:733},{k:"DiacriticalGrave;",v:96},{k:"DiacriticalTilde;",v:732},{k:"Diamond;",v:8900},{k:"DifferentialD;",v:8518},{k:"Dopf;",v:120123},{k:"Dot;",v:168},{k:"DotDot;",v:8412},{k:"DotEqual;",v:8784},{k:"DoubleContourIntegral;",v:8751},{k:"DoubleDot;",v:168},{k:"DoubleDownArrow;",v:8659},{k:"DoubleLeftArrow;",v:8656},{k:"DoubleLeftRightArrow;",v:8660},{k:"DoubleLeftTee;",v:10980},{k:"DoubleLongLeftArrow;",v:10232},{k:"DoubleLongLeftRightArrow;",v:10234},{k:"DoubleLongRightArrow;",v:10233},{k:"DoubleRightArrow;",v:8658},{k:"DoubleRightTee;",v:8872},{k:"DoubleUpArrow;",v:8657},{k:"DoubleUpDownArrow;",v:8661},{k:"DoubleVerticalBar;",v:8741},{k:"DownArrow;",v:8595},{k:"DownArrowBar;",v:10515},{k:"DownArrowUpArrow;",v:8693},{k:"DownBreve;",v:785},{k:"DownLeftRightVector;",v:10576},{k:"DownLeftTeeVector;",v:10590},{k:"DownLeftVector;",v:8637},{k:"DownLeftVectorBar;",v:10582},{k:"DownRightTeeVector;",v:10591},{k:"DownRightVector;",v:8641},{k:"DownRightVectorBar;",v:10583},{k:"DownTee;",v:8868},{k:"DownTeeArrow;",v:8615},{k:"Downarrow;",v:8659},{k:"Dscr;",v:119967},{k:"Dstrok;",v:272},{k:"ENG;",v:330},{k:"ETH;",v:208},{k:"Eacute;",v:201},{k:"Ecaron;",v:282},{k:"Ecirc;",v:202},{k:"Ecy;",v:1069},{k:"Edot;",v:278},{k:"Efr;",v:120072},{k:"Egrave;",v:200},{k:"Element;",v:8712},{k:"Emacr;",v:274},{k:"EmptySmallSquare;",v:9723},{k:"EmptyVerySmallSquare;",v:9643},{k:"Eogon;",v:280},{k:"Eopf;",v:120124},{k:"Epsilon;",v:917},{k:"Equal;",v:10869},{k:"EqualTilde;",v:8770},{k:"Equilibrium;",v:8652},{k:"Escr;",v:8496},{k:"Esim;",v:10867},{k:"Eta;",v:919},{k:"Euml;",v:203},{k:"Exists;",v:8707},{k:"ExponentialE;",v:8519},{k:"Fcy;",v:1060},{k:"Ffr;",v:120073},{k:"FilledSmallSquare;",v:9724},{k:"FilledVerySmallSquare;",v:9642},{k:"Fopf;",v:120125},{k:"ForAll;",v:8704},{k:"Fouriertrf;",v:8497},{k:"Fscr;",v:8497},{k:"GJcy;",v:1027},{k:"GT;",v:62},{k:"Gamma;",v:915},{k:"Gammad;",v:988},{k:"Gbreve;",v:286},{k:"Gcedil;",v:290},{k:"Gcirc;",v:284},{k:"Gcy;",v:1043},{k:"Gdot;",v:288},{k:"Gfr;",v:120074},{k:"Gg;",v:8921},{k:"Gopf;",v:120126},{k:"GreaterEqual;",v:8805},{k:"GreaterEqualLess;",v:8923},{k:"GreaterFullEqual;",v:8807},{k:"GreaterGreater;",v:10914},{k:"GreaterLess;",v:8823},{k:"GreaterSlantEqual;",v:10878},{k:"GreaterTilde;",v:8819},{k:"Gscr;",v:119970},{k:"Gt;",v:8811},{k:"HARDcy;",v:1066},{k:"Hacek;",v:711},{k:"Hat;",v:94},{k:"Hcirc;",v:292},{k:"Hfr;",v:8460},{k:"HilbertSpace;",v:8459},{k:"Hopf;",v:8461},{k:"HorizontalLine;",v:9472},{k:"Hscr;",v:8459},{k:"Hstrok;",v:294},{k:"HumpDownHump;",v:8782},{k:"HumpEqual;",v:8783},{k:"IEcy;",v:1045},{k:"IJlig;",v:306},{k:"IOcy;",v:1025},{k:"Iacute;",v:205},{k:"Icirc;",v:206},{k:"Icy;",v:1048},{k:"Idot;",v:304},{k:"Ifr;",v:8465},{k:"Igrave;",v:204},{k:"Im;",v:8465},{k:"Imacr;",v:298},{k:"ImaginaryI;",v:8520},{k:"Implies;",v:8658},{k:"Int;",v:8748},{k:"Integral;",v:8747},{k:"Intersection;",v:8898},{k:"InvisibleComma;",v:8291},{k:"InvisibleTimes;",v:8290},{k:"Iogon;",v:302},{k:"Iopf;",v:120128},{k:"Iota;",v:921},{k:"Iscr;",v:8464},{k:"Itilde;",v:296},{k:"Iukcy;",v:1030},{k:"Iuml;",v:207},{k:"Jcirc;",v:308},{k:"Jcy;",v:1049},{k:"Jfr;",v:120077},{k:"Jopf;",v:120129},{k:"Jscr;",v:119973},{k:"Jsercy;",v:1032},{k:"Jukcy;",v:1028},{k:"KHcy;",v:1061},{k:"KJcy;",v:1036},{k:"Kappa;",v:922},{k:"Kcedil;",v:310},{k:"Kcy;",v:1050},{k:"Kfr;",v:120078},{k:"Kopf;",v:120130},{k:"Kscr;",v:119974},{k:"LJcy;",v:1033},{k:"LT;",v:60},{k:"Lacute;",v:313},{k:"Lambda;",v:923},{k:"Lang;",v:10218},{k:"Laplacetrf;",v:8466},{k:"Larr;",v:8606},{k:"Lcaron;",v:317},{k:"Lcedil;",v:315},{k:"Lcy;",v:1051},{k:"LeftAngleBracket;",v:10216},{k:"LeftArrow;",v:8592},{k:"LeftArrowBar;",v:8676},{k:"LeftArrowRightArrow;",v:8646},{k:"LeftCeiling;",v:8968},{k:"LeftDoubleBracket;",v:10214},{k:"LeftDownTeeVector;",v:10593},{k:"LeftDownVector;",v:8643},{k:"LeftDownVectorBar;",v:10585},{k:"LeftFloor;",v:8970},{k:"LeftRightArrow;",v:8596},{k:"LeftRightVector;",v:10574},{k:"LeftTee;",v:8867},{k:"LeftTeeArrow;",v:8612},{k:"LeftTeeVector;",v:10586},{k:"LeftTriangle;",v:8882},{k:"LeftTriangleBar;",v:10703},{k:"LeftTriangleEqual;",v:8884},{k:"LeftUpDownVector;",v:10577},{k:"LeftUpTeeVector;",v:10592},{k:"LeftUpVector;",v:8639},{k:"LeftUpVectorBar;",v:10584},{k:"LeftVector;",v:8636},{k:"LeftVectorBar;",v:10578},{k:"Leftarrow;",v:8656},{k:"Leftrightarrow;",v:8660},{k:"LessEqualGreater;",v:8922},{k:"LessFullEqual;",v:8806},{k:"LessGreater;",v:8822},{k:"LessLess;",v:10913},{k:"LessSlantEqual;",v:10877},{k:"LessTilde;",v:8818},{k:"Lfr;",v:120079},{k:"Ll;",v:8920},{k:"Lleftarrow;",v:8666},{k:"Lmidot;",v:319},{k:"LongLeftArrow;",v:10229},{k:"LongLeftRightArrow;",v:10231},{k:"LongRightArrow;",v:10230},{k:"Longleftarrow;",v:10232},{k:"Longleftrightarrow;",v:10234},{k:"Longrightarrow;",v:10233},{k:"Lopf;",v:120131},{k:"LowerLeftArrow;",v:8601},{k:"LowerRightArrow;",v:8600},{k:"Lscr;",v:8466},{k:"Lsh;",v:8624},{k:"Lstrok;",v:321},{k:"Lt;",v:8810},{k:"Map;",v:10501},{k:"Mcy;",v:1052},{k:"MediumSpace;",v:8287},{k:"Mellintrf;",v:8499},{k:"Mfr;",v:120080},{k:"MinusPlus;",v:8723},{k:"Mopf;",v:120132},{k:"Mscr;",v:8499},{k:"Mu;",v:924},{k:"NJcy;",v:1034},{k:"Nacute;",v:323},{k:"Ncaron;",v:327},{k:"Ncedil;",v:325},{k:"Ncy;",v:1053},{k:"NegativeMediumSpace;",v:8203},{k:"NegativeThickSpace;",v:8203},{k:"NegativeThinSpace;",v:8203},{k:"NegativeVeryThinSpace;",v:8203},{k:"NestedGreaterGreater;",v:8811},{k:"NestedLessLess;",v:8810},{k:"NewLine;",v:10},{k:"Nfr;",v:120081},{k:"NoBreak;",v:8288},{k:"NonBreakingSpace;",v:160},{k:"Nopf;",v:8469},{k:"Not;",v:10988},{k:"NotCongruent;",v:8802},{k:"NotCupCap;",v:8813},{k:"NotDoubleVerticalBar;",v:8742},{k:"NotElement;",v:8713},{k:"NotEqual;",v:8800},{k:"NotExists;",v:8708},{k:"NotGreater;",v:8815},{k:"NotGreaterEqual;",v:8817},{k:"NotGreaterLess;",v:8825},{k:"NotGreaterTilde;",v:8821},{k:"NotLeftTriangle;",v:8938},{k:"NotLeftTriangleEqual;",v:8940},{k:"NotLess;",v:8814},{k:"NotLessEqual;",v:8816},{k:"NotLessGreater;",v:8824},{k:"NotLessTilde;",v:8820},{k:"NotPrecedes;",v:8832},{k:"NotPrecedesSlantEqual;",v:8928},{k:"NotReverseElement;",v:8716},{k:"NotRightTriangle;",v:8939},{k:"NotRightTriangleEqual;",v:8941},{k:"NotSquareSubsetEqual;",v:8930},{k:"NotSquareSupersetEqual;",v:8931},{k:"NotSubsetEqual;",v:8840},{k:"NotSucceeds;",v:8833},{k:"NotSucceedsSlantEqual;",v:8929},{k:"NotSupersetEqual;",v:8841},{k:"NotTilde;",v:8769},{k:"NotTildeEqual;",v:8772},{k:"NotTildeFullEqual;",v:8775},{k:"NotTildeTilde;",v:8777},{k:"NotVerticalBar;",v:8740},{k:"Nscr;",v:119977},{k:"Ntilde;",v:209},{k:"Nu;",v:925},{k:"OElig;",v:338},{k:"Oacute;",v:211},{k:"Ocirc;",v:212},{k:"Ocy;",v:1054},{k:"Odblac;",v:336},{k:"Ofr;",v:120082},{k:"Ograve;",v:210},{k:"Omacr;",v:332},{k:"Omega;",v:937},{k:"Omicron;",v:927},{k:"Oopf;",v:120134},{k:"OpenCurlyDoubleQuote;",v:8220},{k:"OpenCurlyQuote;",v:8216},{k:"Or;",v:10836},{k:"Oscr;",v:119978},{k:"Oslash;",v:216},{k:"Otilde;",v:213},{k:"Otimes;",v:10807},{k:"Ouml;",v:214},{k:"OverBar;",v:8254},{k:"OverBrace;",v:9182},{k:"OverBracket;",v:9140},{k:"OverParenthesis;",v:9180},{k:"PartialD;",v:8706},{k:"Pcy;",v:1055},{k:"Pfr;",v:120083},{k:"Phi;",v:934},{k:"Pi;",v:928},{k:"PlusMinus;",v:177},{k:"Poincareplane;",v:8460},{k:"Popf;",v:8473},{k:"Pr;",v:10939},{k:"Precedes;",v:8826},{k:"PrecedesEqual;",v:10927},{k:"PrecedesSlantEqual;",v:8828},{k:"PrecedesTilde;",v:8830},{k:"Prime;",v:8243},{k:"Product;",v:8719},{k:"Proportion;",v:8759},{k:"Proportional;",v:8733},{k:"Pscr;",v:119979},{k:"Psi;",v:936},{k:"QUOT;",v:34},{k:"Qfr;",v:120084},{k:"Qopf;",v:8474},{k:"Qscr;",v:119980},{k:"RBarr;",v:10512},{k:"REG;",v:174},{k:"Racute;",v:340},{k:"Rang;",v:10219},{k:"Rarr;",v:8608},{k:"Rarrtl;",v:10518},{k:"Rcaron;",v:344},{k:"Rcedil;",v:342},{k:"Rcy;",v:1056},{k:"Re;",v:8476},{k:"ReverseElement;",v:8715},{k:"ReverseEquilibrium;",v:8651},{k:"ReverseUpEquilibrium;",v:10607},{k:"Rfr;",v:8476},{k:"Rho;",v:929},{k:"RightAngleBracket;",v:10217},{k:"RightArrow;",v:8594},{k:"RightArrowBar;",v:8677},{k:"RightArrowLeftArrow;",v:8644},{k:"RightCeiling;",v:8969},{k:"RightDoubleBracket;",v:10215},{k:"RightDownTeeVector;",v:10589},{k:"RightDownVector;",v:8642},{k:"RightDownVectorBar;",v:10581},{k:"RightFloor;",v:8971},{k:"RightTee;",v:8866},{k:"RightTeeArrow;",v:8614},{k:"RightTeeVector;",v:10587},{k:"RightTriangle;",v:8883},{k:"RightTriangleBar;",v:10704},{k:"RightTriangleEqual;",v:8885},{k:"RightUpDownVector;",v:10575},{k:"RightUpTeeVector;",v:10588},{k:"RightUpVector;",v:8638},{k:"RightUpVectorBar;",v:10580},{k:"RightVector;",v:8640},{k:"RightVectorBar;",v:10579},{k:"Rightarrow;",v:8658},{k:"Ropf;",v:8477},{k:"RoundImplies;",v:10608},{k:"Rrightarrow;",v:8667},{k:"Rscr;",v:8475},{k:"Rsh;",v:8625},{k:"RuleDelayed;",v:10740},{k:"SHCHcy;",v:1065},{k:"SHcy;",v:1064},{k:"SOFTcy;",v:1068},{k:"Sacute;",v:346},{k:"Sc;",v:10940},{k:"Scaron;",v:352},{k:"Scedil;",v:350},{k:"Scirc;",v:348},{k:"Scy;",v:1057},{k:"Sfr;",v:120086},{k:"ShortDownArrow;",v:8595},{k:"ShortLeftArrow;",v:8592},{k:"ShortRightArrow;",v:8594},{k:"ShortUpArrow;",v:8593},{k:"Sigma;",v:931},{k:"SmallCircle;",v:8728},{k:"Sopf;",v:120138},{k:"Sqrt;",v:8730},{k:"Square;",v:9633},{k:"SquareIntersection;",v:8851},{k:"SquareSubset;",v:8847},{k:"SquareSubsetEqual;",v:8849},{k:"SquareSuperset;",v:8848},{k:"SquareSupersetEqual;",v:8850},{k:"SquareUnion;",v:8852},{k:"Sscr;",v:119982},{k:"Star;",v:8902},{k:"Sub;",v:8912},{k:"Subset;",v:8912},{k:"SubsetEqual;",v:8838},{k:"Succeeds;",v:8827},{k:"SucceedsEqual;",v:10928},{k:"SucceedsSlantEqual;",v:8829},{k:"SucceedsTilde;",v:8831},{k:"SuchThat;",v:8715},{k:"Sum;",v:8721},{k:"Sup;",v:8913},{k:"Superset;",v:8835},{k:"SupersetEqual;",v:8839},{k:"Supset;",v:8913},{k:"THORN;",v:222},{k:"TRADE;",v:8482},{k:"TSHcy;",v:1035},{k:"TScy;",v:1062},{k:"Tab;",v:9},{k:"Tau;",v:932},{k:"Tcaron;",v:356},{k:"Tcedil;",v:354},{k:"Tcy;",v:1058},{k:"Tfr;",v:120087},{k:"Therefore;",v:8756},{k:"Theta;",v:920},{k:"ThinSpace;",v:8201},{k:"Tilde;",v:8764},{k:"TildeEqual;",v:8771},{k:"TildeFullEqual;",v:8773},{k:"TildeTilde;",v:8776},{k:"Topf;",v:120139},{k:"TripleDot;",v:8411},{k:"Tscr;",v:119983},{k:"Tstrok;",v:358},{k:"Uacute;",v:218},{k:"Uarr;",v:8607},{k:"Uarrocir;",v:10569},{k:"Ubrcy;",v:1038},{k:"Ubreve;",v:364},{k:"Ucirc;",v:219},{k:"Ucy;",v:1059},{k:"Udblac;",v:368},{k:"Ufr;",v:120088},{k:"Ugrave;",v:217},{k:"Umacr;",v:362},{k:"UnderBar;",v:95},{k:"UnderBrace;",v:9183},{k:"UnderBracket;",v:9141},{k:"UnderParenthesis;",v:9181},{k:"Union;",v:8899},{k:"UnionPlus;",v:8846},{k:"Uogon;",v:370},{k:"Uopf;",v:120140},{k:"UpArrow;",v:8593},{k:"UpArrowBar;",v:10514},{k:"UpArrowDownArrow;",v:8645},{k:"UpDownArrow;",v:8597},{k:"UpEquilibrium;",v:10606},{k:"UpTee;",v:8869},{k:"UpTeeArrow;",v:8613},{k:"Uparrow;",v:8657},{k:"Updownarrow;",v:8661},{k:"UpperLeftArrow;",v:8598},{k:"UpperRightArrow;",v:8599},{k:"Upsi;",v:978},{k:"Upsilon;",v:933},{k:"Uring;",v:366},{k:"Uscr;",v:119984},{k:"Utilde;",v:360},{k:"Uuml;",v:220},{k:"VDash;",v:8875},{k:"Vbar;",v:10987},{k:"Vcy;",v:1042},{k:"Vdash;",v:8873},{k:"Vdashl;",v:10982},{k:"Vee;",v:8897},{k:"Verbar;",v:8214},{k:"Vert;",v:8214},{k:"VerticalBar;",v:8739},{k:"VerticalLine;",v:124},{k:"VerticalSeparator;",v:10072},{k:"VerticalTilde;",v:8768},{k:"VeryThinSpace;",v:8202},{k:"Vfr;",v:120089},{k:"Vopf;",v:120141},{k:"Vscr;",v:119985},{k:"Vvdash;",v:8874},{k:"Wcirc;",v:372},{k:"Wedge;",v:8896},{k:"Wfr;",v:120090},{k:"Wopf;",v:120142},{k:"Wscr;",v:119986},{k:"Xfr;",v:120091},{k:"Xi;",v:926},{k:"Xopf;",v:120143},{k:"Xscr;",v:119987},{k:"YAcy;",v:1071},{k:"YIcy;",v:1031},{k:"YUcy;",v:1070},{k:"Yacute;",v:221},{k:"Ycirc;",v:374},{k:"Ycy;",v:1067},{k:"Yfr;",v:120092},{k:"Yopf;",v:120144},{k:"Yscr;",v:119988},{k:"Yuml;",v:376},{k:"ZHcy;",v:1046},{k:"Zacute;",v:377},{k:"Zcaron;",v:381},{k:"Zcy;",v:1047},{k:"Zdot;",v:379},{k:"ZeroWidthSpace;",v:8203},{k:"Zeta;",v:918},{k:"Zfr;",v:8488},{k:"Zopf;",v:8484},{k:"Zscr;",v:119989},{k:"aacute;",v:225},{k:"abreve;",v:259},{k:"ac;",v:8766},{k:"acd;",v:8767},{k:"acirc;",v:226},{k:"acute;",v:180},{k:"acy;",v:1072},{k:"aelig;",v:230},{k:"af;",v:8289},{k:"afr;",v:120094},{k:"agrave;",v:224},{k:"alefsym;",v:8501},{k:"aleph;",v:8501},{k:"alpha;",v:945},{k:"amacr;",v:257},{k:"amalg;",v:10815},{k:"amp;",v:38},{k:"and;",v:8743},{k:"andand;",v:10837},{k:"andd;",v:10844},{k:"andslope;",v:10840},{k:"andv;",v:10842},{k:"ang;",v:8736},{k:"ange;",v:10660},{k:"angle;",v:8736},{k:"angmsd;",v:8737},{k:"angmsdaa;",v:10664},{k:"angmsdab;",v:10665},{k:"angmsdac;",v:10666},{k:"angmsdad;",v:10667},{k:"angmsdae;",v:10668},{k:"angmsdaf;",v:10669},{k:"angmsdag;",v:10670},{k:"angmsdah;",v:10671},{k:"angrt;",v:8735},{k:"angrtvb;",v:8894},{k:"angrtvbd;",v:10653},{k:"angsph;",v:8738},{k:"angst;",v:197},{k:"angzarr;",v:9084},{k:"aogon;",v:261},{k:"aopf;",v:120146},{k:"ap;",v:8776},{k:"apE;",v:10864},{k:"apacir;",v:10863},{k:"ape;",v:8778},{k:"apid;",v:8779},{k:"apos;",v:39},{k:"approx;",v:8776},{k:"approxeq;",v:8778},{k:"aring;",v:229},{k:"ascr;",v:119990},{k:"ast;",v:42},{k:"asymp;",v:8776},{k:"asympeq;",v:8781},{k:"atilde;",v:227},{k:"auml;",v:228},{k:"awconint;",v:8755},{k:"awint;",v:10769},{k:"bNot;",v:10989},{k:"backcong;",v:8780},{k:"backepsilon;",v:1014},{k:"backprime;",v:8245},{k:"backsim;",v:8765},{k:"backsimeq;",v:8909},{k:"barvee;",v:8893},{k:"barwed;",v:8965},{k:"barwedge;",v:8965},{k:"bbrk;",v:9141},{k:"bbrktbrk;",v:9142},{k:"bcong;",v:8780},{k:"bcy;",v:1073},{k:"bdquo;",v:8222},{k:"becaus;",v:8757},{k:"because;",v:8757},{k:"bemptyv;",v:10672},{k:"bepsi;",v:1014},{k:"bernou;",v:8492},{k:"beta;",v:946},{k:"beth;",v:8502},{k:"between;",v:8812},{k:"bfr;",v:120095},{k:"bigcap;",v:8898},{k:"bigcirc;",v:9711},{k:"bigcup;",v:8899},{k:"bigodot;",v:10752},{k:"bigoplus;",v:10753},{k:"bigotimes;",v:10754},{k:"bigsqcup;",v:10758},{k:"bigstar;",v:9733},{k:"bigtriangledown;",v:9661},{k:"bigtriangleup;",v:9651},{k:"biguplus;",v:10756},{k:"bigvee;",v:8897},{k:"bigwedge;",v:8896},{k:"bkarow;",v:10509},{k:"blacklozenge;",v:10731},{k:"blacksquare;",v:9642},{k:"blacktriangle;",v:9652},{k:"blacktriangledown;",v:9662},{k:"blacktriangleleft;",v:9666},{k:"blacktriangleright;",v:9656},{k:"blank;",v:9251},{k:"blk12;",v:9618},{k:"blk14;",v:9617},{k:"blk34;",v:9619},{k:"block;",v:9608},{k:"bnot;",v:8976},{k:"bopf;",v:120147},{k:"bot;",v:8869},{k:"bottom;",v:8869},{k:"bowtie;",v:8904},{k:"boxDL;",v:9559},{k:"boxDR;",v:9556},{k:"boxDl;",v:9558},{k:"boxDr;",v:9555},{k:"boxH;",v:9552},{k:"boxHD;",v:9574},{k:"boxHU;",v:9577},{k:"boxHd;",v:9572},{k:"boxHu;",v:9575},{k:"boxUL;",v:9565},{k:"boxUR;",v:9562},{k:"boxUl;",v:9564},{k:"boxUr;",v:9561},{k:"boxV;",v:9553},{k:"boxVH;",v:9580},{k:"boxVL;",v:9571},{k:"boxVR;",v:9568},{k:"boxVh;",v:9579},{k:"boxVl;",v:9570},{k:"boxVr;",v:9567},{k:"boxbox;",v:10697},{k:"boxdL;",v:9557},{k:"boxdR;",v:9554},{k:"boxdl;",v:9488},{k:"boxdr;",v:9484},{k:"boxh;",v:9472},{k:"boxhD;",v:9573},{k:"boxhU;",v:9576},{k:"boxhd;",v:9516},{k:"boxhu;",v:9524},{k:"boxminus;",v:8863},{k:"boxplus;",v:8862},{k:"boxtimes;",v:8864},{k:"boxuL;",v:9563},{k:"boxuR;",v:9560},{k:"boxul;",v:9496},{k:"boxur;",v:9492},{k:"boxv;",v:9474},{k:"boxvH;",v:9578},{k:"boxvL;",v:9569},{k:"boxvR;",v:9566},{k:"boxvh;",v:9532},{k:"boxvl;",v:9508},{k:"boxvr;",v:9500},{k:"bprime;",v:8245},{k:"breve;",v:728},{k:"brvbar;",v:166},{k:"bscr;",v:119991},{k:"bsemi;",v:8271},{k:"bsim;",v:8765},{k:"bsime;",v:8909},{k:"bsol;",v:92},{k:"bsolb;",v:10693},{k:"bsolhsub;",v:10184},{k:"bull;",v:8226},{k:"bullet;",v:8226},{k:"bump;",v:8782},{k:"bumpE;",v:10926},{k:"bumpe;",v:8783},{k:"bumpeq;",v:8783},{k:"cacute;",v:263},{k:"cap;",v:8745},{k:"capand;",v:10820},{k:"capbrcup;",v:10825},{k:"capcap;",v:10827},{k:"capcup;",v:10823},{k:"capdot;",v:10816},{k:"caret;",v:8257},{k:"caron;",v:711},{k:"ccaps;",v:10829},{k:"ccaron;",v:269},{k:"ccedil;",v:231},{k:"ccirc;",v:265},{k:"ccups;",v:10828},{k:"ccupssm;",v:10832},{k:"cdot;",v:267},{k:"cedil;",v:184},{k:"cemptyv;",v:10674},{k:"cent;",v:162},{k:"centerdot;",v:183},{k:"cfr;",v:120096},{k:"chcy;",v:1095},{k:"check;",v:10003},{k:"checkmark;",v:10003},{k:"chi;",v:967},{k:"cir;",v:9675},{k:"cirE;",v:10691},{k:"circ;",v:710},{k:"circeq;",v:8791},{k:"circlearrowleft;",v:8634},{k:"circlearrowright;",v:8635},{k:"circledR;",v:174},{k:"circledS;",v:9416},{k:"circledast;",v:8859},{k:"circledcirc;",v:8858},{k:"circleddash;",v:8861},{k:"cire;",v:8791},{k:"cirfnint;",v:10768},{k:"cirmid;",v:10991},{k:"cirscir;",v:10690},{k:"clubs;",v:9827},{k:"clubsuit;",v:9827},{k:"colon;",v:58},{k:"colone;",v:8788},{k:"coloneq;",v:8788},{k:"comma;",v:44},{k:"commat;",v:64},{k:"comp;",v:8705},{k:"compfn;",v:8728},{k:"complement;",v:8705},{k:"complexes;",v:8450},{k:"cong;",v:8773},{k:"congdot;",v:10861},{k:"conint;",v:8750},{k:"copf;",v:120148},{k:"coprod;",v:8720},{k:"copy;",v:169},{k:"copysr;",v:8471},{k:"crarr;",v:8629},{k:"cross;",v:10007},{k:"cscr;",v:119992},{k:"csub;",v:10959},{k:"csube;",v:10961},{k:"csup;",v:10960},{k:"csupe;",v:10962},{k:"ctdot;",v:8943},{k:"cudarrl;",v:10552},{k:"cudarrr;",v:10549},{k:"cuepr;",v:8926},{k:"cuesc;",v:8927},{k:"cularr;",v:8630},{k:"cularrp;",v:10557},{k:"cup;",v:8746},{k:"cupbrcap;",v:10824},{k:"cupcap;",v:10822},{k:"cupcup;",v:10826},{k:"cupdot;",v:8845},{k:"cupor;",v:10821},{k:"curarr;",v:8631},{k:"curarrm;",v:10556},{k:"curlyeqprec;",v:8926},{k:"curlyeqsucc;",v:8927},{k:"curlyvee;",v:8910},{k:"curlywedge;",v:8911},{k:"curren;",v:164},{k:"curvearrowleft;",v:8630},{k:"curvearrowright;",v:8631},{k:"cuvee;",v:8910},{k:"cuwed;",v:8911},{k:"cwconint;",v:8754},{k:"cwint;",v:8753},{k:"cylcty;",v:9005},{k:"dArr;",v:8659},{k:"dHar;",v:10597},{k:"dagger;",v:8224},{k:"daleth;",v:8504},{k:"darr;",v:8595},{k:"dash;",v:8208},{k:"dashv;",v:8867},{k:"dbkarow;",v:10511},{k:"dblac;",v:733},{k:"dcaron;",v:271},{k:"dcy;",v:1076},{k:"dd;",v:8518},{k:"ddagger;",v:8225},{k:"ddarr;",v:8650},{k:"ddotseq;",v:10871},{k:"deg;",v:176},{k:"delta;",v:948},{k:"demptyv;",v:10673},{k:"dfisht;",v:10623},{k:"dfr;",v:120097},{k:"dharl;",v:8643},{k:"dharr;",v:8642},{k:"diam;",v:8900},{k:"diamond;",v:8900},{k:"diamondsuit;",v:9830},{k:"diams;",v:9830},{k:"die;",v:168},{k:"digamma;",v:989},{k:"disin;",v:8946},{k:"div;",v:247},{k:"divide;",v:247},{k:"divideontimes;",v:8903},{k:"divonx;",v:8903},{k:"djcy;",v:1106},{k:"dlcorn;",v:8990},{k:"dlcrop;",v:8973},{k:"dollar;",v:36},{k:"dopf;",v:120149},{k:"dot;",v:729},{k:"doteq;",v:8784},{k:"doteqdot;",v:8785},{k:"dotminus;",v:8760},{k:"dotplus;",v:8724},{k:"dotsquare;",v:8865},{k:"doublebarwedge;",v:8966},{k:"downarrow;",v:8595},{k:"downdownarrows;",v:8650},{k:"downharpoonleft;",v:8643},{k:"downharpoonright;",v:8642},{k:"drbkarow;",v:10512},{k:"drcorn;",v:8991},{k:"drcrop;",v:8972},{k:"dscr;",v:119993},{k:"dscy;",v:1109},{k:"dsol;",v:10742},{k:"dstrok;",v:273},{k:"dtdot;",v:8945},{k:"dtri;",v:9663},{k:"dtrif;",v:9662},{k:"duarr;",v:8693},{k:"duhar;",v:10607},{k:"dwangle;",v:10662},{k:"dzcy;",v:1119},{k:"dzigrarr;",v:10239},{k:"eDDot;",v:10871},{k:"eDot;",v:8785},{k:"eacute;",v:233},{k:"easter;",v:10862},{k:"ecaron;",v:283},{k:"ecir;",v:8790},{k:"ecirc;",v:234},{k:"ecolon;",v:8789},{k:"ecy;",v:1101},{k:"edot;",v:279},{k:"ee;",v:8519},{k:"efDot;",v:8786},{k:"efr;",v:120098},{k:"eg;",v:10906},{k:"egrave;",v:232},{k:"egs;",v:10902},{k:"egsdot;",v:10904},{k:"el;",v:10905},{k:"elinters;",v:9191},{k:"ell;",v:8467},{k:"els;",v:10901},{k:"elsdot;",v:10903},{k:"emacr;",v:275},{k:"empty;",v:8709},{k:"emptyset;",v:8709},{k:"emptyv;",v:8709},{k:"emsp;",v:8195},{k:"emsp13;",v:8196},{k:"emsp14;",v:8197},{k:"eng;",v:331},{k:"ensp;",v:8194},{k:"eogon;",v:281},{k:"eopf;",v:120150},{k:"epar;",v:8917},{k:"eparsl;",v:10723},{k:"eplus;",v:10865},{k:"epsi;",v:949},{k:"epsilon;",v:949},{k:"epsiv;",v:1013},{k:"eqcirc;",v:8790},{k:"eqcolon;",v:8789},{k:"eqsim;",v:8770},{k:"eqslantgtr;",v:10902},{k:"eqslantless;",v:10901},{k:"equals;",v:61},{k:"equest;",v:8799},{k:"equiv;",v:8801},{k:"equivDD;",v:10872},{k:"eqvparsl;",v:10725},{k:"erDot;",v:8787},{k:"erarr;",v:10609},{k:"escr;",v:8495},{k:"esdot;",v:8784},{k:"esim;",v:8770},{k:"eta;",v:951},{k:"eth;",v:240},{k:"euml;",v:235},{k:"euro;",v:8364},{k:"excl;",v:33},{k:"exist;",v:8707},{k:"expectation;",v:8496},{k:"exponentiale;",v:8519},{k:"fallingdotseq;",v:8786},{k:"fcy;",v:1092},{k:"female;",v:9792},{k:"ffilig;",v:64259},{k:"fflig;",v:64256},{k:"ffllig;",v:64260},{k:"ffr;",v:120099},{k:"filig;",v:64257},{k:"flat;",v:9837},{k:"fllig;",v:64258},{k:"fltns;",v:9649},{k:"fnof;",v:402},{k:"fopf;",v:120151},{k:"forall;",v:8704},{k:"fork;",v:8916},{k:"forkv;",v:10969},{k:"fpartint;",v:10765},{k:"frac12;",v:189},{k:"frac13;",v:8531},{k:"frac14;",v:188},{k:"frac15;",v:8533},{k:"frac16;",v:8537},{k:"frac18;",v:8539},{k:"frac23;",v:8532},{k:"frac25;",v:8534},{k:"frac34;",v:190},{k:"frac35;",v:8535},{k:"frac38;",v:8540},{k:"frac45;",v:8536},{k:"frac56;",v:8538},{k:"frac58;",v:8541},{k:"frac78;",v:8542},{k:"frasl;",v:8260},{k:"frown;",v:8994},{k:"fscr;",v:119995},{k:"gE;",v:8807},{k:"gEl;",v:10892},{k:"gacute;",v:501},{k:"gamma;",v:947},{k:"gammad;",v:989},{k:"gap;",v:10886},{k:"gbreve;",v:287},{k:"gcirc;",v:285},{k:"gcy;",v:1075},{k:"gdot;",v:289},{k:"ge;",v:8805},{k:"gel;",v:8923},{k:"geq;",v:8805},{k:"geqq;",v:8807},{k:"geqslant;",v:10878},{k:"ges;",v:10878},{k:"gescc;",v:10921},{k:"gesdot;",v:10880},{k:"gesdoto;",v:10882},{k:"gesdotol;",v:10884},{k:"gesles;",v:10900},{k:"gfr;",v:120100},{k:"gg;",v:8811},{k:"ggg;",v:8921},{k:"gimel;",v:8503},{k:"gjcy;",v:1107},{k:"gl;",v:8823},{k:"glE;",v:10898},{k:"gla;",v:10917},{k:"glj;",v:10916},{k:"gnE;",v:8809},{k:"gnap;",v:10890},{k:"gnapprox;",v:10890},{k:"gne;",v:10888},{k:"gneq;",v:10888},{k:"gneqq;",v:8809},{k:"gnsim;",v:8935},{k:"gopf;",v:120152},{k:"grave;",v:96},{k:"gscr;",v:8458},{k:"gsim;",v:8819},{k:"gsime;",v:10894},{k:"gsiml;",v:10896},{k:"gt;",v:62},{k:"gtcc;",v:10919},{k:"gtcir;",v:10874},{k:"gtdot;",v:8919},{k:"gtlPar;",v:10645},{k:"gtquest;",v:10876},{k:"gtrapprox;",v:10886},{k:"gtrarr;",v:10616},{k:"gtrdot;",v:8919},{k:"gtreqless;",v:8923},{k:"gtreqqless;",v:10892},{k:"gtrless;",v:8823},{k:"gtrsim;",v:8819},{k:"hArr;",v:8660},{k:"hairsp;",v:8202},{k:"half;",v:189},{k:"hamilt;",v:8459},{k:"hardcy;",v:1098},{k:"harr;",v:8596},{k:"harrcir;",v:10568},{k:"harrw;",v:8621},{k:"hbar;",v:8463},{k:"hcirc;",v:293},{k:"hearts;",v:9829},{k:"heartsuit;",v:9829},{k:"hellip;",v:8230},{k:"hercon;",v:8889},{k:"hfr;",v:120101},{k:"hksearow;",v:10533},{k:"hkswarow;",v:10534},{k:"hoarr;",v:8703},{k:"homtht;",v:8763},{k:"hookleftarrow;",v:8617},{k:"hookrightarrow;",v:8618},{k:"hopf;",v:120153},{k:"horbar;",v:8213},{k:"hscr;",v:119997},{k:"hslash;",v:8463},{k:"hstrok;",v:295},{k:"hybull;",v:8259},{k:"hyphen;",v:8208},{k:"iacute;",v:237},{k:"ic;",v:8291},{k:"icirc;",v:238},{k:"icy;",v:1080},{k:"iecy;",v:1077},{k:"iexcl;",v:161},{k:"iff;",v:8660},{k:"ifr;",v:120102},{k:"igrave;",v:236},{k:"ii;",v:8520},{k:"iiiint;",v:10764},{k:"iiint;",v:8749},{k:"iinfin;",v:10716},{k:"iiota;",v:8489},{k:"ijlig;",v:307},{k:"imacr;",v:299},{k:"image;",v:8465},{k:"imagline;",v:8464},{k:"imagpart;",v:8465},{k:"imath;",v:305},{k:"imof;",v:8887},{k:"imped;",v:437},{k:"in;",v:8712},{k:"incare;",v:8453},{k:"infin;",v:8734},{k:"infintie;",v:10717},{k:"inodot;",v:305},{k:"int;",v:8747},{k:"intcal;",v:8890},{k:"integers;",v:8484},{k:"intercal;",v:8890},{k:"intlarhk;",v:10775},{k:"intprod;",v:10812},{k:"iocy;",v:1105},{k:"iogon;",v:303},{k:"iopf;",v:120154},{k:"iota;",v:953},{k:"iprod;",v:10812},{k:"iquest;",v:191},{k:"iscr;",v:119998},{k:"isin;",v:8712},{k:"isinE;",v:8953},{k:"isindot;",v:8949},{k:"isins;",v:8948},{k:"isinsv;",v:8947},{k:"isinv;",v:8712},{k:"it;",v:8290},{k:"itilde;",v:297},{k:"iukcy;",v:1110},{k:"iuml;",v:239},{k:"jcirc;",v:309},{k:"jcy;",v:1081},{k:"jfr;",v:120103},{k:"jmath;",v:567},{k:"jopf;",v:120155},{k:"jscr;",v:119999},{k:"jsercy;",v:1112},{k:"jukcy;",v:1108},{k:"kappa;",v:954},{k:"kappav;",v:1008},{k:"kcedil;",v:311},{k:"kcy;",v:1082},{k:"kfr;",v:120104},{k:"kgreen;",v:312},{k:"khcy;",v:1093},{k:"kjcy;",v:1116},{k:"kopf;",v:120156},{k:"kscr;",v:120000},{k:"lAarr;",v:8666},{k:"lArr;",v:8656},{k:"lAtail;",v:10523},{k:"lBarr;",v:10510},{k:"lE;",v:8806},{k:"lEg;",v:10891},{k:"lHar;",v:10594},{k:"lacute;",v:314},{k:"laemptyv;",v:10676},{k:"lagran;",v:8466},{k:"lambda;",v:955},{k:"lang;",v:10216},{k:"langd;",v:10641},{k:"langle;",v:10216},{k:"lap;",v:10885},{k:"laquo;",v:171},{k:"larr;",v:8592},{k:"larrb;",v:8676},{k:"larrbfs;",v:10527},{k:"larrfs;",v:10525},{k:"larrhk;",v:8617},{k:"larrlp;",v:8619},{k:"larrpl;",v:10553},{k:"larrsim;",v:10611},{k:"larrtl;",v:8610},{k:"lat;",v:10923},{k:"latail;",v:10521},{k:"late;",v:10925},{k:"lbarr;",v:10508},{k:"lbbrk;",v:10098},{k:"lbrace;",v:123},{k:"lbrack;",v:91},{k:"lbrke;",v:10635},{k:"lbrksld;",v:10639},{k:"lbrkslu;",v:10637},{k:"lcaron;",v:318},{k:"lcedil;",v:316},{k:"lceil;",v:8968},{k:"lcub;",v:123},{k:"lcy;",v:1083},{k:"ldca;",v:10550},{k:"ldquo;",v:8220},{k:"ldquor;",v:8222},{k:"ldrdhar;",v:10599},{k:"ldrushar;",v:10571},{k:"ldsh;",v:8626},{k:"le;",v:8804},{k:"leftarrow;",v:8592},{k:"leftarrowtail;",v:8610},{k:"leftharpoondown;",v:8637},{k:"leftharpoonup;",v:8636},{k:"leftleftarrows;",v:8647},{k:"leftrightarrow;",v:8596},{k:"leftrightarrows;",v:8646},{k:"leftrightharpoons;",v:8651},{k:"leftrightsquigarrow;",v:8621},{k:"leftthreetimes;",v:8907},{k:"leg;",v:8922},{k:"leq;",v:8804},{k:"leqq;",v:8806},{k:"leqslant;",v:10877},{k:"les;",v:10877},{k:"lescc;",v:10920},{k:"lesdot;",v:10879},{k:"lesdoto;",v:10881},{k:"lesdotor;",v:10883},{k:"lesges;",v:10899},{k:"lessapprox;",v:10885},{k:"lessdot;",v:8918},{k:"lesseqgtr;",v:8922},{k:"lesseqqgtr;",v:10891},{k:"lessgtr;",v:8822},{k:"lesssim;",v:8818},{k:"lfisht;",v:10620},{k:"lfloor;",v:8970},{k:"lfr;",v:120105},{k:"lg;",v:8822},{k:"lgE;",v:10897},{k:"lhard;",v:8637},{k:"lharu;",v:8636},{k:"lharul;",v:10602},{k:"lhblk;",v:9604},{k:"ljcy;",v:1113},{k:"ll;",v:8810},{k:"llarr;",v:8647},{k:"llcorner;",v:8990},{k:"llhard;",v:10603},{k:"lltri;",v:9722},{k:"lmidot;",v:320},{k:"lmoust;",v:9136},{k:"lmoustache;",v:9136},{k:"lnE;",v:8808},{k:"lnap;",v:10889},{k:"lnapprox;",v:10889},{k:"lne;",v:10887},{k:"lneq;",v:10887},{k:"lneqq;",v:8808},{k:"lnsim;",v:8934},{k:"loang;",v:10220},{k:"loarr;",v:8701},{k:"lobrk;",v:10214},{k:"longleftarrow;",v:10229},{k:"longleftrightarrow;",v:10231},{k:"longmapsto;",v:10236},{k:"longrightarrow;",v:10230},{k:"looparrowleft;",v:8619},{k:"looparrowright;",v:8620},{k:"lopar;",v:10629},{k:"lopf;",v:120157},{k:"loplus;",v:10797},{k:"lotimes;",v:10804},{k:"lowast;",v:8727},{k:"lowbar;",v:95},{k:"loz;",v:9674},{k:"lozenge;",v:9674},{k:"lozf;",v:10731},{k:"lpar;",v:40},{k:"lparlt;",v:10643},{k:"lrarr;",v:8646},{k:"lrcorner;",v:8991},{k:"lrhar;",v:8651},{k:"lrhard;",v:10605},{k:"lrm;",v:8206},{k:"lrtri;",v:8895},{k:"lsaquo;",v:8249},{k:"lscr;",v:120001},{k:"lsh;",v:8624},{k:"lsim;",v:8818},{k:"lsime;",v:10893},{k:"lsimg;",v:10895},{k:"lsqb;",v:91},{k:"lsquo;",v:8216},{k:"lsquor;",v:8218},{k:"lstrok;",v:322},{k:"lt;",v:60},{k:"ltcc;",v:10918},{k:"ltcir;",v:10873},{k:"ltdot;",v:8918},{k:"lthree;",v:8907},{k:"ltimes;",v:8905},{k:"ltlarr;",v:10614},{k:"ltquest;",v:10875},{k:"ltrPar;",v:10646},{k:"ltri;",v:9667},{k:"ltrie;",v:8884},{k:"ltrif;",v:9666},{k:"lurdshar;",v:10570},{k:"luruhar;",v:10598},{k:"mDDot;",v:8762},{k:"macr;",v:175},{k:"male;",v:9794},{k:"malt;",v:10016},{k:"maltese;",v:10016},{k:"map;",v:8614},{k:"mapsto;",v:8614},{k:"mapstodown;",v:8615},{k:"mapstoleft;",v:8612},{k:"mapstoup;",v:8613},{k:"marker;",v:9646},{k:"mcomma;",v:10793},{k:"mcy;",v:1084},{k:"mdash;",v:8212},{k:"measuredangle;",v:8737},{k:"mfr;",v:120106},{k:"mho;",v:8487},{k:"micro;",v:181},{k:"mid;",v:8739},{k:"midast;",v:42},{k:"midcir;",v:10992},{k:"middot;",v:183},{k:"minus;",v:8722},{k:"minusb;",v:8863},{k:"minusd;",v:8760},{k:"minusdu;",v:10794},{k:"mlcp;",v:10971},{k:"mldr;",v:8230},{k:"mnplus;",v:8723},{k:"models;",v:8871},{k:"mopf;",v:120158},{k:"mp;",v:8723},{k:"mscr;",v:120002},{k:"mstpos;",v:8766},{k:"mu;",v:956},{k:"multimap;",v:8888},{k:"mumap;",v:8888},{k:"nLeftarrow;",v:8653},{k:"nLeftrightarrow;",v:8654},{k:"nRightarrow;",v:8655},{k:"nVDash;",v:8879},{k:"nVdash;",v:8878},{k:"nabla;",v:8711},{k:"nacute;",v:324},{k:"nap;",v:8777},{k:"napos;",v:329},{k:"napprox;",v:8777},{k:"natur;",v:9838},{k:"natural;",v:9838},{k:"naturals;",v:8469},{k:"nbsp;",v:160},{k:"ncap;",v:10819},{k:"ncaron;",v:328},{k:"ncedil;",v:326},{k:"ncong;",v:8775},{k:"ncup;",v:10818},{k:"ncy;",v:1085},{k:"ndash;",v:8211},{k:"ne;",v:8800},{k:"neArr;",v:8663},{k:"nearhk;",v:10532},{k:"nearr;",v:8599},{k:"nearrow;",v:8599},{k:"nequiv;",v:8802},{k:"nesear;",v:10536},{k:"nexist;",v:8708},{k:"nexists;",v:8708},{k:"nfr;",v:120107},{k:"nge;",v:8817},{k:"ngeq;",v:8817},{k:"ngsim;",v:8821},{k:"ngt;",v:8815},{k:"ngtr;",v:8815},{k:"nhArr;",v:8654},{k:"nharr;",v:8622},{k:"nhpar;",v:10994},{k:"ni;",v:8715},{k:"nis;",v:8956},{k:"nisd;",v:8954},{k:"niv;",v:8715},{k:"njcy;",v:1114},{k:"nlArr;",v:8653},{k:"nlarr;",v:8602},{k:"nldr;",v:8229},{k:"nle;",v:8816},{k:"nleftarrow;",v:8602},{k:"nleftrightarrow;",v:8622},{k:"nleq;",v:8816},{k:"nless;",v:8814},{k:"nlsim;",v:8820},{k:"nlt;",v:8814},{k:"nltri;",v:8938},{k:"nltrie;",v:8940},{k:"nmid;",v:8740},{k:"nopf;",v:120159},{k:"not;",v:172},{k:"notin;",v:8713},{k:"notinva;",v:8713},{k:"notinvb;",v:8951},{k:"notinvc;",v:8950},{k:"notni;",v:8716},{k:"notniva;",v:8716},{k:"notnivb;",v:8958},{k:"notnivc;",v:8957},{k:"npar;",v:8742},{k:"nparallel;",v:8742},{k:"npolint;",v:10772},{k:"npr;",v:8832},{k:"nprcue;",v:8928},{k:"nprec;",v:8832},{k:"nrArr;",v:8655},{k:"nrarr;",v:8603},{k:"nrightarrow;",v:8603},{k:"nrtri;",v:8939},{k:"nrtrie;",v:8941},{k:"nsc;",v:8833},{k:"nsccue;",v:8929},{k:"nscr;",v:120003},{k:"nshortmid;",v:8740},{k:"nshortparallel;",v:8742},{k:"nsim;",v:8769},{k:"nsime;",v:8772},{k:"nsimeq;",v:8772},{k:"nsmid;",v:8740},{k:"nspar;",v:8742},{k:"nsqsube;",v:8930},{k:"nsqsupe;",v:8931},{k:"nsub;",v:8836},{k:"nsube;",v:8840},{k:"nsubseteq;",v:8840},{k:"nsucc;",v:8833},{k:"nsup;",v:8837},{k:"nsupe;",v:8841},{k:"nsupseteq;",v:8841},{k:"ntgl;",v:8825},{k:"ntilde;",v:241},{k:"ntlg;",v:8824},{k:"ntriangleleft;",v:8938},{k:"ntrianglelefteq;",v:8940},{k:"ntriangleright;",v:8939},{k:"ntrianglerighteq;",v:8941},{k:"nu;",v:957},{k:"num;",v:35},{k:"numero;",v:8470},{k:"numsp;",v:8199},{k:"nvDash;",v:8877},{k:"nvHarr;",v:10500},{k:"nvdash;",v:8876},{k:"nvinfin;",v:10718},{k:"nvlArr;",v:10498},{k:"nvrArr;",v:10499},{k:"nwArr;",v:8662},{k:"nwarhk;",v:10531},{k:"nwarr;",v:8598},{k:"nwarrow;",v:8598},{k:"nwnear;",v:10535},{k:"oS;",v:9416},{k:"oacute;",v:243},{k:"oast;",v:8859},{k:"ocir;",v:8858},{k:"ocirc;",v:244},{k:"ocy;",v:1086},{k:"odash;",v:8861},{k:"odblac;",v:337},{k:"odiv;",v:10808},{k:"odot;",v:8857},{k:"odsold;",v:10684},{k:"oelig;",v:339},{k:"ofcir;",v:10687},{k:"ofr;",v:120108},{k:"ogon;",v:731},{k:"ograve;",v:242},{k:"ogt;",v:10689},{k:"ohbar;",v:10677},{k:"ohm;",v:937},{k:"oint;",v:8750},{k:"olarr;",v:8634},{k:"olcir;",v:10686},{k:"olcross;",v:10683},{k:"oline;",v:8254},{k:"olt;",v:10688},{k:"omacr;",v:333},{k:"omega;",v:969},{k:"omicron;",v:959},{k:"omid;",v:10678},{k:"ominus;",v:8854},{k:"oopf;",v:120160},{k:"opar;",v:10679},{k:"operp;",v:10681},{k:"oplus;",v:8853},{k:"or;",v:8744},{k:"orarr;",v:8635},{k:"ord;",v:10845},{k:"order;",v:8500},{k:"orderof;",v:8500},{k:"ordf;",v:170},{k:"ordm;",v:186},{k:"origof;",v:8886},{k:"oror;",v:10838},{k:"orslope;",v:10839},{k:"orv;",v:10843},{k:"oscr;",v:8500},{k:"oslash;",v:248},{k:"osol;",v:8856},{k:"otilde;",v:245},{k:"otimes;",v:8855},{k:"otimesas;",v:10806},{k:"ouml;",v:246},{k:"ovbar;",v:9021},{k:"par;",v:8741},{k:"para;",v:182},{k:"parallel;",v:8741},{k:"parsim;",v:10995},{k:"parsl;",v:11005},{k:"part;",v:8706},{k:"pcy;",v:1087},{k:"percnt;",v:37},{k:"period;",v:46},{k:"permil;",v:8240},{k:"perp;",v:8869},{k:"pertenk;",v:8241},{k:"pfr;",v:120109},{k:"phi;",v:966},{k:"phiv;",v:981},{k:"phmmat;",v:8499},{k:"phone;",v:9742},{k:"pi;",v:960},{k:"pitchfork;",v:8916},{k:"piv;",v:982},{k:"planck;",v:8463},{k:"planckh;",v:8462},{k:"plankv;",v:8463},{k:"plus;",v:43},{k:"plusacir;",v:10787},{k:"plusb;",v:8862},{k:"pluscir;",v:10786},{k:"plusdo;",v:8724},{k:"plusdu;",v:10789},{k:"pluse;",v:10866},{k:"plusmn;",v:177},{k:"plussim;",v:10790},{k:"plustwo;",v:10791},{k:"pm;",v:177},{k:"pointint;",v:10773},{k:"popf;",v:120161},{k:"pound;",v:163},{k:"pr;",v:8826},{k:"prE;",v:10931},{k:"prap;",v:10935},{k:"prcue;",v:8828},{k:"pre;",v:10927},{k:"prec;",v:8826},{k:"precapprox;",v:10935},{k:"preccurlyeq;",v:8828},{k:"preceq;",v:10927},{k:"precnapprox;",v:10937},{k:"precneqq;",v:10933},{k:"precnsim;",v:8936},{k:"precsim;",v:8830},{k:"prime;",v:8242},{k:"primes;",v:8473},{k:"prnE;",v:10933},{k:"prnap;",v:10937},{k:"prnsim;",v:8936},{k:"prod;",v:8719},{k:"profalar;",v:9006},{k:"profline;",v:8978},{k:"profsurf;",v:8979},{k:"prop;",v:8733},{k:"propto;",v:8733},{k:"prsim;",v:8830},{k:"prurel;",v:8880},{k:"pscr;",v:120005},{k:"psi;",v:968},{k:"puncsp;",v:8200},{k:"qfr;",v:120110},{k:"qint;",v:10764},{k:"qopf;",v:120162},{k:"qprime;",v:8279},{k:"qscr;",v:120006},{k:"quaternions;",v:8461},{k:"quatint;",v:10774},{k:"quest;",v:63},{k:"questeq;",v:8799},{k:"quot;",v:34},{k:"rAarr;",v:8667},{k:"rArr;",v:8658},{k:"rAtail;",v:10524},{k:"rBarr;",v:10511},{k:"rHar;",v:10596},{k:"racute;",v:341},{k:"radic;",v:8730},{k:"raemptyv;",v:10675},{k:"rang;",v:10217},{k:"rangd;",v:10642},{k:"range;",v:10661},{k:"rangle;",v:10217},{k:"raquo;",v:187},{k:"rarr;",v:8594},{k:"rarrap;",v:10613},{k:"rarrb;",v:8677},{k:"rarrbfs;",v:10528},{k:"rarrc;",v:10547},{k:"rarrfs;",v:10526},{k:"rarrhk;",v:8618},{k:"rarrlp;",v:8620},{k:"rarrpl;",v:10565},{k:"rarrsim;",v:10612},{k:"rarrtl;",v:8611},{k:"rarrw;",v:8605},{k:"ratail;",v:10522},{k:"ratio;",v:8758},{k:"rationals;",v:8474},{k:"rbarr;",v:10509},{k:"rbbrk;",v:10099},{k:"rbrace;",v:125},{k:"rbrack;",v:93},{k:"rbrke;",v:10636},{k:"rbrksld;",v:10638},{k:"rbrkslu;",v:10640},{k:"rcaron;",v:345},{k:"rcedil;",v:343},{k:"rceil;",v:8969},{k:"rcub;",v:125},{k:"rcy;",v:1088},{k:"rdca;",v:10551},{k:"rdldhar;",v:10601},{k:"rdquo;",v:8221},{k:"rdquor;",v:8221},{k:"rdsh;",v:8627},{k:"real;",v:8476},{k:"realine;",v:8475},{k:"realpart;",v:8476},{k:"reals;",v:8477},{k:"rect;",v:9645},{k:"reg;",v:174},{k:"rfisht;",v:10621},{k:"rfloor;",v:8971},{k:"rfr;",v:120111},{k:"rhard;",v:8641},{k:"rharu;",v:8640},{k:"rharul;",v:10604},{k:"rho;",v:961},{k:"rhov;",v:1009},{k:"rightarrow;",v:8594},{k:"rightarrowtail;",v:8611},{k:"rightharpoondown;",v:8641},{k:"rightharpoonup;",v:8640},{k:"rightleftarrows;",v:8644},{k:"rightleftharpoons;",v:8652},{k:"rightrightarrows;",v:8649},{k:"rightsquigarrow;",v:8605},{k:"rightthreetimes;",v:8908},{k:"ring;",v:730},{k:"risingdotseq;",v:8787},{k:"rlarr;",v:8644},{k:"rlhar;",v:8652},{k:"rlm;",v:8207},{k:"rmoust;",v:9137},{k:"rmoustache;",v:9137},{k:"rnmid;",v:10990},{k:"roang;",v:10221},{k:"roarr;",v:8702},{k:"robrk;",v:10215},{k:"ropar;",v:10630},{k:"ropf;",v:120163},{k:"roplus;",v:10798},{k:"rotimes;",v:10805},{k:"rpar;",v:41},{k:"rpargt;",v:10644},{k:"rppolint;",v:10770},{k:"rrarr;",v:8649},{k:"rsaquo;",v:8250},{k:"rscr;",v:120007},{k:"rsh;",v:8625},{k:"rsqb;",v:93},{k:"rsquo;",v:8217},{k:"rsquor;",v:8217},{k:"rthree;",v:8908},{k:"rtimes;",v:8906},{k:"rtri;",v:9657},{k:"rtrie;",v:8885},{k:"rtrif;",v:9656},{k:"rtriltri;",v:10702},{k:"ruluhar;",v:10600},{k:"rx;",v:8478},{k:"sacute;",v:347},{k:"sbquo;",v:8218},{k:"sc;",v:8827},{k:"scE;",v:10932},{k:"scap;",v:10936},{k:"scaron;",v:353},{k:"sccue;",v:8829},{k:"sce;",v:10928},{k:"scedil;",v:351},{k:"scirc;",v:349},{k:"scnE;",v:10934},{k:"scnap;",v:10938},{k:"scnsim;",v:8937},{k:"scpolint;",v:10771},{k:"scsim;",v:8831},{k:"scy;",v:1089},{k:"sdot;",v:8901},{k:"sdotb;",v:8865},{k:"sdote;",v:10854},{k:"seArr;",v:8664},{k:"searhk;",v:10533},{k:"searr;",v:8600},{k:"searrow;",v:8600},{k:"sect;",v:167},{k:"semi;",v:59},{k:"seswar;",v:10537},{k:"setminus;",v:8726},{k:"setmn;",v:8726},{k:"sext;",v:10038},{k:"sfr;",v:120112},{k:"sfrown;",v:8994},{k:"sharp;",v:9839},{k:"shchcy;",v:1097},{k:"shcy;",v:1096},{k:"shortmid;",v:8739},{k:"shortparallel;",v:8741},{k:"shy;",v:173},{k:"sigma;",v:963},{k:"sigmaf;",v:962},{k:"sigmav;",v:962},{k:"sim;",v:8764},{k:"simdot;",v:10858},{k:"sime;",v:8771},{k:"simeq;",v:8771},{k:"simg;",v:10910},{k:"simgE;",v:10912},{k:"siml;",v:10909},{k:"simlE;",v:10911},{k:"simne;",v:8774},{k:"simplus;",v:10788},{k:"simrarr;",v:10610},{k:"slarr;",v:8592},{k:"smallsetminus;",v:8726},{k:"smashp;",v:10803},{k:"smeparsl;",v:10724},{k:"smid;",v:8739},{k:"smile;",v:8995},{k:"smt;",v:10922},{k:"smte;",v:10924},{k:"softcy;",v:1100},{k:"sol;",v:47},{k:"solb;",v:10692},{k:"solbar;",v:9023},{k:"sopf;",v:120164},{k:"spades;",v:9824},{k:"spadesuit;",v:9824},{k:"spar;",v:8741},{k:"sqcap;",v:8851},{k:"sqcup;",v:8852},{k:"sqsub;",v:8847},{k:"sqsube;",v:8849},{k:"sqsubset;",v:8847},{k:"sqsubseteq;",v:8849},{k:"sqsup;",v:8848},{k:"sqsupe;",v:8850},{k:"sqsupset;",v:8848},{k:"sqsupseteq;",v:8850},{k:"squ;",v:9633},{k:"square;",v:9633},{k:"squarf;",v:9642},{k:"squf;",v:9642},{k:"srarr;",v:8594},{k:"sscr;",v:120008},{k:"ssetmn;",v:8726},{k:"ssmile;",v:8995},{k:"sstarf;",v:8902},{k:"star;",v:9734},{k:"starf;",v:9733},{k:"straightepsilon;",v:1013},{k:"straightphi;",v:981},{k:"strns;",v:175},{k:"sub;",v:8834},{k:"subE;",v:10949},{k:"subdot;",v:10941},{k:"sube;",v:8838},{k:"subedot;",v:10947},{k:"submult;",v:10945},{k:"subnE;",v:10955},{k:"subne;",v:8842},{k:"subplus;",v:10943},{k:"subrarr;",v:10617},{k:"subset;",v:8834},{k:"subseteq;",v:8838},{k:"subseteqq;",v:10949},{k:"subsetneq;",v:8842},{k:"subsetneqq;",v:10955},{k:"subsim;",v:10951},{k:"subsub;",v:10965},{k:"subsup;",v:10963},{k:"succ;",v:8827},{k:"succapprox;",v:10936},{k:"succcurlyeq;",v:8829},{k:"succeq;",v:10928},{k:"succnapprox;",v:10938},{k:"succneqq;",v:10934},{k:"succnsim;",v:8937},{k:"succsim;",v:8831},{k:"sum;",v:8721},{k:"sung;",v:9834},{k:"sup;",v:8835},{k:"sup1;",v:185},{k:"sup2;",v:178},{k:"sup3;",v:179},{k:"supE;",v:10950},{k:"supdot;",v:10942},{k:"supdsub;",v:10968},{k:"supe;",v:8839},{k:"supedot;",v:10948},{k:"suphsol;",v:10185},{k:"suphsub;",v:10967},{k:"suplarr;",v:10619},{k:"supmult;",v:10946},{k:"supnE;",v:10956},{k:"supne;",v:8843},{k:"supplus;",v:10944},{k:"supset;",v:8835},{k:"supseteq;",v:8839},{k:"supseteqq;",v:10950},{k:"supsetneq;",v:8843},{k:"supsetneqq;",v:10956},{k:"supsim;",v:10952},{k:"supsub;",v:10964},{k:"supsup;",v:10966},{k:"swArr;",v:8665},{k:"swarhk;",v:10534},{k:"swarr;",v:8601},{k:"swarrow;",v:8601},{k:"swnwar;",v:10538},{k:"szlig;",v:223},{k:"target;",v:8982},{k:"tau;",v:964},{k:"tbrk;",v:9140},{k:"tcaron;",v:357},{k:"tcedil;",v:355},{k:"tcy;",v:1090},{k:"tdot;",v:8411},{k:"telrec;",v:8981},{k:"tfr;",v:120113},{k:"there4;",v:8756},{k:"therefore;",v:8756},{k:"theta;",v:952},{k:"thetasym;",v:977},{k:"thetav;",v:977},{k:"thickapprox;",v:8776},{k:"thicksim;",v:8764},{k:"thinsp;",v:8201},{k:"thkap;",v:8776},{k:"thksim;",v:8764},{k:"thorn;",v:254},{k:"tilde;",v:732},{k:"times;",v:215},{k:"timesb;",v:8864},{k:"timesbar;",v:10801},{k:"timesd;",v:10800},{k:"tint;",v:8749},{k:"toea;",v:10536},{k:"top;",v:8868},{k:"topbot;",v:9014},{k:"topcir;",v:10993},{k:"topf;",v:120165},{k:"topfork;",v:10970},{k:"tosa;",v:10537},{k:"tprime;",v:8244},{k:"trade;",v:8482},{k:"triangle;",v:9653},{k:"triangledown;",v:9663},{k:"triangleleft;",v:9667},{k:"trianglelefteq;",v:8884},{k:"triangleq;",v:8796},{k:"triangleright;",v:9657},{k:"trianglerighteq;",v:8885},{k:"tridot;",v:9708},{k:"trie;",v:8796},{k:"triminus;",v:10810},{k:"triplus;",v:10809},{k:"trisb;",v:10701},{k:"tritime;",v:10811},{k:"trpezium;",v:9186},{k:"tscr;",v:120009},{k:"tscy;",v:1094},{k:"tshcy;",v:1115},{k:"tstrok;",v:359},{k:"twixt;",v:8812},{k:"twoheadleftarrow;",v:8606},{k:"twoheadrightarrow;",v:8608},{k:"uArr;",v:8657},{k:"uHar;",v:10595},{k:"uacute;",v:250},{k:"uarr;",v:8593},{k:"ubrcy;",v:1118},{k:"ubreve;",v:365},{k:"ucirc;",v:251},{k:"ucy;",v:1091},{k:"udarr;",v:8645},{k:"udblac;",v:369},{k:"udhar;",v:10606},{k:"ufisht;",v:10622},{k:"ufr;",v:120114},{k:"ugrave;",v:249},{k:"uharl;",v:8639},{k:"uharr;",v:8638},{k:"uhblk;",v:9600},{k:"ulcorn;",v:8988},{k:"ulcorner;",v:8988},{k:"ulcrop;",v:8975},{k:"ultri;",v:9720},{k:"umacr;",v:363},{k:"uml;",v:168},{k:"uogon;",v:371},{k:"uopf;",v:120166},{k:"uparrow;",v:8593},{k:"updownarrow;",v:8597},{k:"upharpoonleft;",v:8639},{k:"upharpoonright;",v:8638},{k:"uplus;",v:8846},{k:"upsi;",v:965},{k:"upsih;",v:978},{k:"upsilon;",v:965},{k:"upuparrows;",v:8648},{k:"urcorn;",v:8989},{k:"urcorner;",v:8989},{k:"urcrop;",v:8974},{k:"uring;",v:367},{k:"urtri;",v:9721},{k:"uscr;",v:120010},{k:"utdot;",v:8944},{k:"utilde;",v:361},{k:"utri;",v:9653},{k:"utrif;",v:9652},{k:"uuarr;",v:8648},{k:"uuml;",v:252},{k:"uwangle;",v:10663},{k:"vArr;",v:8661},{k:"vBar;",v:10984},{k:"vBarv;",v:10985},{k:"vDash;",v:8872},{k:"vangrt;",v:10652},{k:"varepsilon;",v:1013},{k:"varkappa;",v:1008},{k:"varnothing;",v:8709},{k:"varphi;",v:981},{k:"varpi;",v:982},{k:"varpropto;",v:8733},{k:"varr;",v:8597},{k:"varrho;",v:1009},{k:"varsigma;",v:962},{k:"vartheta;",v:977},{k:"vartriangleleft;",v:8882},{k:"vartriangleright;",v:8883},{k:"vcy;",v:1074},{k:"vdash;",v:8866},{k:"vee;",v:8744},{k:"veebar;",v:8891},{k:"veeeq;",v:8794},{k:"vellip;",v:8942},{k:"verbar;",v:124},{k:"vert;",v:124},{k:"vfr;",v:120115},{k:"vltri;",v:8882},{k:"vopf;",v:120167},{k:"vprop;",v:8733},{k:"vrtri;",v:8883},{k:"vscr;",v:120011},{k:"vzigzag;",v:10650},{k:"wcirc;",v:373},{k:"wedbar;",v:10847},{k:"wedge;",v:8743},{k:"wedgeq;",v:8793},{k:"weierp;",v:8472},{k:"wfr;",v:120116},{k:"wopf;",v:120168},{k:"wp;",v:8472},{k:"wr;",v:8768},{k:"wreath;",v:8768},{k:"wscr;",v:120012},{k:"xcap;",v:8898},{k:"xcirc;",v:9711},{k:"xcup;",v:8899},{k:"xdtri;",v:9661},{k:"xfr;",v:120117},{k:"xhArr;",v:10234},{k:"xharr;",v:10231},{k:"xi;",v:958},{k:"xlArr;",v:10232},{k:"xlarr;",v:10229},{k:"xmap;",v:10236},{k:"xnis;",v:8955},{k:"xodot;",v:10752},{k:"xopf;",v:120169},{k:"xoplus;",v:10753},{k:"xotime;",v:10754},{k:"xrArr;",v:10233},{k:"xrarr;",v:10230},{k:"xscr;",v:120013},{k:"xsqcup;",v:10758},{k:"xuplus;",v:10756},{k:"xutri;",v:9651},{k:"xvee;",v:8897},{k:"xwedge;",v:8896},{k:"yacute;",v:253},{k:"yacy;",v:1103},{k:"ycirc;",v:375},{k:"ycy;",v:1099},{k:"yen;",v:165},{k:"yfr;",v:120118},{k:"yicy;",v:1111},{k:"yopf;",v:120170},{k:"yscr;",v:120014},{k:"yucy;",v:1102},{k:"yuml;",v:255},{k:"zacute;",v:378},{k:"zcaron;",v:382},{k:"zcy;",v:1079},{k:"zdot;",v:380},{k:"zeetrf;",v:8488},{k:"zeta;",v:950},{k:"zfr;",v:120119},{k:"zhcy;",v:1078},{k:"zigrarr;",v:8669},{k:"zopf;",v:120171},{k:"zscr;",v:120015},{k:"zwj;",v:8205},{k:"zwnj;",v:8204},{k:"AElig",v:198},{k:"AMP",v:38},{k:"Aacute",v:193},{k:"Acirc",v:194},{k:"Agrave",v:192},{k:"Aring",v:197},{k:"Atilde",v:195},{k:"Auml",v:196},{k:"COPY",v:169},{k:"Ccedil",v:199},{k:"ETH",v:208},{k:"Eacute",v:201},{k:"Ecirc",v:202},{k:"Egrave",v:200},{k:"Euml",v:203},{k:"GT",v:62},{k:"Iacute",v:205},{k:"Icirc",v:206},{k:"Igrave",v:204},{k:"Iuml",v:207},{k:"LT",v:60},{k:"Ntilde",v:209},{k:"Oacute",v:211},{k:"Ocirc",v:212},{k:"Ograve",v:210},{k:"Oslash",v:216},{k:"Otilde",v:213},{k:"Ouml",v:214},{k:"QUOT",v:34},{k:"REG",v:174},{k:"THORN",v:222},{k:"Uacute",v:218},{k:"Ucirc",v:219},{k:"Ugrave",v:217},{k:"Uuml",v:220},{k:"Yacute",v:221},{k:"aacute",v:225},{k:"acirc",v:226},{k:"acute",v:180},{k:"aelig",v:230},{k:"agrave",v:224},{k:"amp",v:38},{k:"aring",v:229},{k:"atilde",v:227},{k:"auml",v:228},{k:"brvbar",v:166},{k:"ccedil",v:231},{k:"cedil",v:184},{k:"cent",v:162},{k:"copy",v:169},{k:"curren",v:164},{k:"deg",v:176},{k:"divide",v:247},{k:"eacute",v:233},{k:"ecirc",v:234},{k:"egrave",v:232},{k:"eth",v:240},{k:"euml",v:235},{k:"frac12",v:189},{k:"frac14",v:188},{k:"frac34",v:190},{k:"gt",v:62},{k:"iacute",v:237},{k:"icirc",v:238},{k:"iexcl",v:161},{k:"igrave",v:236},{k:"iquest",v:191},{k:"iuml",v:239},{k:"laquo",v:171},{k:"lt",v:60},{k:"macr",v:175},{k:"micro",v:181},{k:"middot",v:183},{k:"nbsp",v:160},{k:"not",v:172},{k:"ntilde",v:241},{k:"oacute",v:243},{k:"ocirc",v:244},{k:"ograve",v:242},{k:"ordf",v:170},{k:"ordm",v:186},{k:"oslash",v:248},{k:"otilde",v:245},{k:"ouml",v:246},{k:"para",v:182},{k:"plusmn",v:177},{k:"pound",v:163},{k:"quot",v:34},{k:"raquo",v:187},{k:"reg",v:174},{k:"sect",v:167},{k:"shy",v:173},{k:"sup1",v:185},{k:"sup2",v:178},{k:"sup3",v:179},{k:"szlig",v:223},{k:"thorn",v:254},{k:"times",v:215},{k:"uacute",v:250},{k:"ucirc",v:251},{k:"ugrave",v:249},{k:"uml",v:168},{k:"uuml",v:252},{k:"yacute",v:253},{k:"yen",v:165},{k:"yuml",v:255}]);D=$makeMap($String.keyFor,[{k:"NotEqualTilde;",v:$toNativeArray($kindInt32,[8770,824])},{k:"NotGreaterFullEqual;",v:$toNativeArray($kindInt32,[8807,824])},{k:"NotGreaterGreater;",v:$toNativeArray($kindInt32,[8811,824])},{k:"NotGreaterSlantEqual;",v:$toNativeArray($kindInt32,[10878,824])},{k:"NotHumpDownHump;",v:$toNativeArray($kindInt32,[8782,824])},{k:"NotHumpEqual;",v:$toNativeArray($kindInt32,[8783,824])},{k:"NotLeftTriangleBar;",v:$toNativeArray($kindInt32,[10703,824])},{k:"NotLessLess;",v:$toNativeArray($kindInt32,[8810,824])},{k:"NotLessSlantEqual;",v:$toNativeArray($kindInt32,[10877,824])},{k:"NotNestedGreaterGreater;",v:$toNativeArray($kindInt32,[10914,824])},{k:"NotNestedLessLess;",v:$toNativeArray($kindInt32,[10913,824])},{k:"NotPrecedesEqual;",v:$toNativeArray($kindInt32,[10927,824])},{k:"NotRightTriangleBar;",v:$toNativeArray($kindInt32,[10704,824])},{k:"NotSquareSubset;",v:$toNativeArray($kindInt32,[8847,824])},{k:"NotSquareSuperset;",v:$toNativeArray($kindInt32,[8848,824])},{k:"NotSubset;",v:$toNativeArray($kindInt32,[8834,8402])},{k:"NotSucceedsEqual;",v:$toNativeArray($kindInt32,[10928,824])},{k:"NotSucceedsTilde;",v:$toNativeArray($kindInt32,[8831,824])},{k:"NotSuperset;",v:$toNativeArray($kindInt32,[8835,8402])},{k:"ThickSpace;",v:$toNativeArray($kindInt32,[8287,8202])},{k:"acE;",v:$toNativeArray($kindInt32,[8766,819])},{k:"bne;",v:$toNativeArray($kindInt32,[61,8421])},{k:"bnequiv;",v:$toNativeArray($kindInt32,[8801,8421])},{k:"caps;",v:$toNativeArray($kindInt32,[8745,65024])},{k:"cups;",v:$toNativeArray($kindInt32,[8746,65024])},{k:"fjlig;",v:$toNativeArray($kindInt32,[102,106])},{k:"gesl;",v:$toNativeArray($kindInt32,[8923,65024])},{k:"gvertneqq;",v:$toNativeArray($kindInt32,[8809,65024])},{k:"gvnE;",v:$toNativeArray($kindInt32,[8809,65024])},{k:"lates;",v:$toNativeArray($kindInt32,[10925,65024])},{k:"lesg;",v:$toNativeArray($kindInt32,[8922,65024])},{k:"lvertneqq;",v:$toNativeArray($kindInt32,[8808,65024])},{k:"lvnE;",v:$toNativeArray($kindInt32,[8808,65024])},{k:"nGg;",v:$toNativeArray($kindInt32,[8921,824])},{k:"nGtv;",v:$toNativeArray($kindInt32,[8811,824])},{k:"nLl;",v:$toNativeArray($kindInt32,[8920,824])},{k:"nLtv;",v:$toNativeArray($kindInt32,[8810,824])},{k:"nang;",v:$toNativeArray($kindInt32,[8736,8402])},{k:"napE;",v:$toNativeArray($kindInt32,[10864,824])},{k:"napid;",v:$toNativeArray($kindInt32,[8779,824])},{k:"nbump;",v:$toNativeArray($kindInt32,[8782,824])},{k:"nbumpe;",v:$toNativeArray($kindInt32,[8783,824])},{k:"ncongdot;",v:$toNativeArray($kindInt32,[10861,824])},{k:"nedot;",v:$toNativeArray($kindInt32,[8784,824])},{k:"nesim;",v:$toNativeArray($kindInt32,[8770,824])},{k:"ngE;",v:$toNativeArray($kindInt32,[8807,824])},{k:"ngeqq;",v:$toNativeArray($kindInt32,[8807,824])},{k:"ngeqslant;",v:$toNativeArray($kindInt32,[10878,824])},{k:"nges;",v:$toNativeArray($kindInt32,[10878,824])},{k:"nlE;",v:$toNativeArray($kindInt32,[8806,824])},{k:"nleqq;",v:$toNativeArray($kindInt32,[8806,824])},{k:"nleqslant;",v:$toNativeArray($kindInt32,[10877,824])},{k:"nles;",v:$toNativeArray($kindInt32,[10877,824])},{k:"notinE;",v:$toNativeArray($kindInt32,[8953,824])},{k:"notindot;",v:$toNativeArray($kindInt32,[8949,824])},{k:"nparsl;",v:$toNativeArray($kindInt32,[11005,8421])},{k:"npart;",v:$toNativeArray($kindInt32,[8706,824])},{k:"npre;",v:$toNativeArray($kindInt32,[10927,824])},{k:"npreceq;",v:$toNativeArray($kindInt32,[10927,824])},{k:"nrarrc;",v:$toNativeArray($kindInt32,[10547,824])},{k:"nrarrw;",v:$toNativeArray($kindInt32,[8605,824])},{k:"nsce;",v:$toNativeArray($kindInt32,[10928,824])},{k:"nsubE;",v:$toNativeArray($kindInt32,[10949,824])},{k:"nsubset;",v:$toNativeArray($kindInt32,[8834,8402])},{k:"nsubseteqq;",v:$toNativeArray($kindInt32,[10949,824])},{k:"nsucceq;",v:$toNativeArray($kindInt32,[10928,824])},{k:"nsupE;",v:$toNativeArray($kindInt32,[10950,824])},{k:"nsupset;",v:$toNativeArray($kindInt32,[8835,8402])},{k:"nsupseteqq;",v:$toNativeArray($kindInt32,[10950,824])},{k:"nvap;",v:$toNativeArray($kindInt32,[8781,8402])},{k:"nvge;",v:$toNativeArray($kindInt32,[8805,8402])},{k:"nvgt;",v:$toNativeArray($kindInt32,[62,8402])},{k:"nvle;",v:$toNativeArray($kindInt32,[8804,8402])},{k:"nvlt;",v:$toNativeArray($kindInt32,[60,8402])},{k:"nvltrie;",v:$toNativeArray($kindInt32,[8884,8402])},{k:"nvrtrie;",v:$toNativeArray($kindInt32,[8885,8402])},{k:"nvsim;",v:$toNativeArray($kindInt32,[8764,8402])},{k:"race;",v:$toNativeArray($kindInt32,[8765,817])},{k:"smtes;",v:$toNativeArray($kindInt32,[10924,65024])},{k:"sqcaps;",v:$toNativeArray($kindInt32,[8851,65024])},{k:"sqcups;",v:$toNativeArray($kindInt32,[8852,65024])},{k:"varsubsetneq;",v:$toNativeArray($kindInt32,[8842,65024])},{k:"varsubsetneqq;",v:$toNativeArray($kindInt32,[10955,65024])},{k:"varsupsetneq;",v:$toNativeArray($kindInt32,[8843,65024])},{k:"varsupsetneqq;",v:$toNativeArray($kindInt32,[10956,65024])},{k:"vnsub;",v:$toNativeArray($kindInt32,[8834,8402])},{k:"vnsup;",v:$toNativeArray($kindInt32,[8835,8402])},{k:"vsubnE;",v:$toNativeArray($kindInt32,[10955,65024])},{k:"vsubne;",v:$toNativeArray($kindInt32,[8842,65024])},{k:"vsupnE;",v:$toNativeArray($kindInt32,[10956,65024])},{k:"vsupne;",v:$toNativeArray($kindInt32,[8843,65024])}]);F=$toNativeArray($kindInt32,[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376]);I=A.NewReplacer(new L(["&","&","'","'","<","<",">",">","\"","""]));}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["net/url"]=(function(){var $pkg={},$init,A,B,C,D,E,F,AH,L,O,P;A=$packages["bytes"];B=$packages["errors"];C=$packages["fmt"];D=$packages["sort"];E=$packages["strconv"];F=$packages["strings"];AH=$sliceType($Uint8);L=function(a,b){var $ptr,a,b,c,d,e;if(65<=a&&a<=90||97<=a&&a<=122||48<=a&&a<=57){return false;}if(b===2){c=a;if(c===33||c===36||c===38||c===39||c===40||c===41||c===42||c===43||c===44||c===59||c===61||c===58||c===91||c===93){return false;}}d=a;if(d===45||d===95||d===46||d===126){return false;}else if(d===36||d===38||d===43||d===44||d===47||d===58||d===59||d===61||d===63||d===64){e=b;if(e===1){return a===63;}else if(e===3){return(a===64)||(a===47)||(a===63)||(a===58);}else if(e===4){return true;}else if(e===5){return false;}}return true;};O=function(a){var $ptr,a;return P(a,4);};$pkg.QueryEscape=O;P=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n;c=0;d=0;e=c;f=d;g=0;while(true){if(!(g>0;}else{f=f+(1)>>0;}}g=g+(1)>>0;}if((e===0)&&(f===0)){return a;}i=$makeSlice(AH,(a.length+(2*f>>0)>>0));j=0;k=0;while(true){if(!(k=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]=43);j=j+(1)>>0;}else if(L(l,b)){((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]=37);(m=j+1>>0,((m<0||m>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+m]="0123456789ABCDEF".charCodeAt((l>>>4<<24>>>24))));(n=j+2>>0,((n<0||n>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+n]="0123456789ABCDEF".charCodeAt(((l&15)>>>0))));j=j+(3)>>0;}else{((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]=a.charCodeAt(k));j=j+(1)>>0;}k=k+(1)>>0;}return $bytesToString(i);};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["container/list"]=(function(){var $pkg={},$init,A,B,D,E,C;A=$pkg.Element=$newType(0,$kindStruct,"list.Element","Element","container/list",function(next_,prev_,list_,Value_){this.$val=this;if(arguments.length===0){this.next=E.nil;this.prev=E.nil;this.list=D.nil;this.Value=$ifaceNil;return;}this.next=next_;this.prev=prev_;this.list=list_;this.Value=Value_;});B=$pkg.List=$newType(0,$kindStruct,"list.List","List","container/list",function(root_,len_){this.$val=this;if(arguments.length===0){this.root=new A.ptr(E.nil,E.nil,D.nil,$ifaceNil);this.len=0;return;}this.root=root_;this.len=len_;});D=$ptrType(B);E=$ptrType(A);A.ptr.prototype.Next=function(){var $ptr,a,b;a=this;b=a.next;if(!(a.list===D.nil)&&!(b===a.list.root)){return b;}return E.nil;};A.prototype.Next=function(){return this.$val.Next();};A.ptr.prototype.Prev=function(){var $ptr,a,b;a=this;b=a.prev;if(!(a.list===D.nil)&&!(b===a.list.root)){return b;}return E.nil;};A.prototype.Prev=function(){return this.$val.Prev();};B.ptr.prototype.Init=function(){var $ptr,a;a=this;a.root.next=a.root;a.root.prev=a.root;a.len=0;return a;};B.prototype.Init=function(){return this.$val.Init();};C=function(){var $ptr;return new B.ptr(new A.ptr(E.nil,E.nil,D.nil,$ifaceNil),0).Init();};$pkg.New=C;B.ptr.prototype.Len=function(){var $ptr,a;a=this;return a.len;};B.prototype.Len=function(){return this.$val.Len();};B.ptr.prototype.Front=function(){var $ptr,a;a=this;if(a.len===0){return E.nil;}return a.root.next;};B.prototype.Front=function(){return this.$val.Front();};B.ptr.prototype.Back=function(){var $ptr,a;a=this;if(a.len===0){return E.nil;}return a.root.prev;};B.prototype.Back=function(){return this.$val.Back();};B.ptr.prototype.lazyInit=function(){var $ptr,a;a=this;if(a.root.next===E.nil){a.Init();}};B.prototype.lazyInit=function(){return this.$val.lazyInit();};B.ptr.prototype.insert=function(a,b){var $ptr,a,b,c,d;c=this;d=b.next;b.next=a;a.prev=b;a.next=d;d.prev=a;a.list=c;c.len=c.len+(1)>>0;return a;};B.prototype.insert=function(a,b){return this.$val.insert(a,b);};B.ptr.prototype.insertValue=function(a,b){var $ptr,a,b,c;c=this;return c.insert(new A.ptr(E.nil,E.nil,D.nil,a),b);};B.prototype.insertValue=function(a,b){return this.$val.insertValue(a,b);};B.ptr.prototype.remove=function(a){var $ptr,a,b;b=this;a.prev.next=a.next;a.next.prev=a.prev;a.next=E.nil;a.prev=E.nil;a.list=D.nil;b.len=b.len-(1)>>0;return a;};B.prototype.remove=function(a){return this.$val.remove(a);};B.ptr.prototype.Remove=function(a){var $ptr,a,b;b=this;if(a.list===b){b.remove(a);}return a.Value;};B.prototype.Remove=function(a){return this.$val.Remove(a);};B.ptr.prototype.PushFront=function(a){var $ptr,a,b;b=this;b.lazyInit();return b.insertValue(a,b.root);};B.prototype.PushFront=function(a){return this.$val.PushFront(a);};B.ptr.prototype.PushBack=function(a){var $ptr,a,b;b=this;b.lazyInit();return b.insertValue(a,b.root.prev);};B.prototype.PushBack=function(a){return this.$val.PushBack(a);};B.ptr.prototype.InsertBefore=function(a,b){var $ptr,a,b,c;c=this;if(!(b.list===c)){return E.nil;}return c.insertValue(a,b.prev);};B.prototype.InsertBefore=function(a,b){return this.$val.InsertBefore(a,b);};B.ptr.prototype.InsertAfter=function(a,b){var $ptr,a,b,c;c=this;if(!(b.list===c)){return E.nil;}return c.insertValue(a,b);};B.prototype.InsertAfter=function(a,b){return this.$val.InsertAfter(a,b);};B.ptr.prototype.MoveToFront=function(a){var $ptr,a,b;b=this;if(!(a.list===b)||b.root.next===a){return;}b.insert(b.remove(a),b.root);};B.prototype.MoveToFront=function(a){return this.$val.MoveToFront(a);};B.ptr.prototype.MoveToBack=function(a){var $ptr,a,b;b=this;if(!(a.list===b)||b.root.prev===a){return;}b.insert(b.remove(a),b.root.prev);};B.prototype.MoveToBack=function(a){return this.$val.MoveToBack(a);};B.ptr.prototype.MoveBefore=function(a,b){var $ptr,a,b,c;c=this;if(!(a.list===c)||a===b||!(b.list===c)){return;}c.insert(c.remove(a),b.prev);};B.prototype.MoveBefore=function(a,b){return this.$val.MoveBefore(a,b);};B.ptr.prototype.MoveAfter=function(a,b){var $ptr,a,b,c;c=this;if(!(a.list===c)||a===b||!(b.list===c)){return;}c.insert(c.remove(a),b);};B.prototype.MoveAfter=function(a,b){return this.$val.MoveAfter(a,b);};B.ptr.prototype.PushBackList=function(a){var $ptr,a,b,c,d,e,f,g,h;b=this;b.lazyInit();c=a.Len();d=a.Front();e=c;f=d;while(true){if(!(e>0)){break;}b.insertValue(f.Value,b.root.prev);g=e-1>>0;h=f.Next();e=g;f=h;}};B.prototype.PushBackList=function(a){return this.$val.PushBackList(a);};B.ptr.prototype.PushFrontList=function(a){var $ptr,a,b,c,d,e,f,g,h;b=this;b.lazyInit();c=a.Len();d=a.Back();e=c;f=d;while(true){if(!(e>0)){break;}b.insertValue(f.Value,b.root);g=e-1>>0;h=f.Prev();e=g;f=h;}};B.prototype.PushFrontList=function(a){return this.$val.PushFrontList(a);};E.methods=[{prop:"Next",name:"Next",pkg:"",typ:$funcType([],[E],false)},{prop:"Prev",name:"Prev",pkg:"",typ:$funcType([],[E],false)}];D.methods=[{prop:"Init",name:"Init",pkg:"",typ:$funcType([],[D],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Front",name:"Front",pkg:"",typ:$funcType([],[E],false)},{prop:"Back",name:"Back",pkg:"",typ:$funcType([],[E],false)},{prop:"lazyInit",name:"lazyInit",pkg:"container/list",typ:$funcType([],[],false)},{prop:"insert",name:"insert",pkg:"container/list",typ:$funcType([E,E],[E],false)},{prop:"insertValue",name:"insertValue",pkg:"container/list",typ:$funcType([$emptyInterface,E],[E],false)},{prop:"remove",name:"remove",pkg:"container/list",typ:$funcType([E],[E],false)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([E],[$emptyInterface],false)},{prop:"PushFront",name:"PushFront",pkg:"",typ:$funcType([$emptyInterface],[E],false)},{prop:"PushBack",name:"PushBack",pkg:"",typ:$funcType([$emptyInterface],[E],false)},{prop:"InsertBefore",name:"InsertBefore",pkg:"",typ:$funcType([$emptyInterface,E],[E],false)},{prop:"InsertAfter",name:"InsertAfter",pkg:"",typ:$funcType([$emptyInterface,E],[E],false)},{prop:"MoveToFront",name:"MoveToFront",pkg:"",typ:$funcType([E],[],false)},{prop:"MoveToBack",name:"MoveToBack",pkg:"",typ:$funcType([E],[],false)},{prop:"MoveBefore",name:"MoveBefore",pkg:"",typ:$funcType([E,E],[],false)},{prop:"MoveAfter",name:"MoveAfter",pkg:"",typ:$funcType([E,E],[],false)},{prop:"PushBackList",name:"PushBackList",pkg:"",typ:$funcType([D],[],false)},{prop:"PushFrontList",name:"PushFrontList",pkg:"",typ:$funcType([D],[],false)}];A.init([{prop:"next",name:"next",pkg:"container/list",typ:E,tag:""},{prop:"prev",name:"prev",pkg:"container/list",typ:E,tag:""},{prop:"list",name:"list",pkg:"container/list",typ:D,tag:""},{prop:"Value",name:"Value",pkg:"",typ:$emptyInterface,tag:""}]);B.init([{prop:"root",name:"root",pkg:"container/list",typ:A,tag:""},{prop:"len",name:"len",pkg:"container/list",typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["text/template/parse"]=(function(){var $pkg={},$init,F,A,B,H,G,C,D,E,I,K,L,N,AG,AH,AI,AJ,AK,AL,AM,AN,AO,AQ,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,M,AF,J,O,P,Q,R,S,T,U,V,W,X,Y,Z,AA,AB,AC,AD,AE,AP,BG,BH,BI;F=$packages["bytes"];A=$packages["container/list"];B=$packages["fmt"];H=$packages["runtime"];G=$packages["strconv"];C=$packages["strings"];D=$packages["unicode"];E=$packages["unicode/utf8"];I=$pkg.lexer=$newType(0,$kindStruct,"parse.lexer","lexer","text/template/parse",function(name_,input_,leftDelim_,rightDelim_,state_,pos_,start_,width_,lastPos_,items_,parenDepth_,itemsList_){this.$val=this;if(arguments.length===0){this.name="";this.input="";this.leftDelim="";this.rightDelim="";this.state=$throwNilPointerError;this.pos=0;this.start=0;this.width=0;this.lastPos=0;this.items=$chanNil;this.parenDepth=0;this.itemsList=BK.nil;return;}this.name=name_;this.input=input_;this.leftDelim=leftDelim_;this.rightDelim=rightDelim_;this.state=state_;this.pos=pos_;this.start=start_;this.width=width_;this.lastPos=lastPos_;this.items=items_;this.parenDepth=parenDepth_;this.itemsList=itemsList_;});K=$pkg.item=$newType(0,$kindStruct,"parse.item","item","text/template/parse",function(typ_,pos_,val_){this.$val=this;if(arguments.length===0){this.typ=0;this.pos=0;this.val="";return;}this.typ=typ_;this.pos=pos_;this.val=val_;});L=$pkg.itemType=$newType(4,$kindInt,"parse.itemType","itemType","text/template/parse",null);N=$pkg.stateFn=$newType(4,$kindFunc,"parse.stateFn","stateFn","text/template/parse",null);AG=$pkg.Node=$newType(8,$kindInterface,"parse.Node","Node","text/template/parse",null);AH=$pkg.NodeType=$newType(4,$kindInt,"parse.NodeType","NodeType","text/template/parse",null);AI=$pkg.Pos=$newType(4,$kindInt,"parse.Pos","Pos","text/template/parse",null);AJ=$pkg.ListNode=$newType(0,$kindStruct,"parse.ListNode","ListNode","text/template/parse",function(NodeType_,Pos_,tr_,Nodes_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Nodes=BN.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Nodes=Nodes_;});AK=$pkg.TextNode=$newType(0,$kindStruct,"parse.TextNode","TextNode","text/template/parse",function(NodeType_,Pos_,tr_,Text_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Text=BO.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Text=Text_;});AL=$pkg.PipeNode=$newType(0,$kindStruct,"parse.PipeNode","PipeNode","text/template/parse",function(NodeType_,Pos_,tr_,Line_,Decl_,Cmds_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Line=0;this.Decl=BT.nil;this.Cmds=BV.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Line=Line_;this.Decl=Decl_;this.Cmds=Cmds_;});AM=$pkg.ActionNode=$newType(0,$kindStruct,"parse.ActionNode","ActionNode","text/template/parse",function(NodeType_,Pos_,tr_,Line_,Pipe_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Line=0;this.Pipe=BW.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Line=Line_;this.Pipe=Pipe_;});AN=$pkg.CommandNode=$newType(0,$kindStruct,"parse.CommandNode","CommandNode","text/template/parse",function(NodeType_,Pos_,tr_,Args_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Args=BN.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Args=Args_;});AO=$pkg.IdentifierNode=$newType(0,$kindStruct,"parse.IdentifierNode","IdentifierNode","text/template/parse",function(NodeType_,Pos_,tr_,Ident_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Ident="";return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Ident=Ident_;});AQ=$pkg.VariableNode=$newType(0,$kindStruct,"parse.VariableNode","VariableNode","text/template/parse",function(NodeType_,Pos_,tr_,Ident_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Ident=BX.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Ident=Ident_;});AR=$pkg.DotNode=$newType(0,$kindStruct,"parse.DotNode","DotNode","text/template/parse",function(NodeType_,Pos_,tr_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;});AS=$pkg.NilNode=$newType(0,$kindStruct,"parse.NilNode","NilNode","text/template/parse",function(NodeType_,Pos_,tr_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;});AT=$pkg.FieldNode=$newType(0,$kindStruct,"parse.FieldNode","FieldNode","text/template/parse",function(NodeType_,Pos_,tr_,Ident_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Ident=BX.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Ident=Ident_;});AU=$pkg.ChainNode=$newType(0,$kindStruct,"parse.ChainNode","ChainNode","text/template/parse",function(NodeType_,Pos_,tr_,Node_,Field_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Node=$ifaceNil;this.Field=BX.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Node=Node_;this.Field=Field_;});AV=$pkg.BoolNode=$newType(0,$kindStruct,"parse.BoolNode","BoolNode","text/template/parse",function(NodeType_,Pos_,tr_,True_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.True=false;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.True=True_;});AW=$pkg.NumberNode=$newType(0,$kindStruct,"parse.NumberNode","NumberNode","text/template/parse",function(NodeType_,Pos_,tr_,IsInt_,IsUint_,IsFloat_,IsComplex_,Int64_,Uint64_,Float64_,Complex128_,Text_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.IsInt=false;this.IsUint=false;this.IsFloat=false;this.IsComplex=false;this.Int64=new $Int64(0,0);this.Uint64=new $Uint64(0,0);this.Float64=0;this.Complex128=new $Complex128(0,0);this.Text="";return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.IsInt=IsInt_;this.IsUint=IsUint_;this.IsFloat=IsFloat_;this.IsComplex=IsComplex_;this.Int64=Int64_;this.Uint64=Uint64_;this.Float64=Float64_;this.Complex128=Complex128_;this.Text=Text_;});AX=$pkg.StringNode=$newType(0,$kindStruct,"parse.StringNode","StringNode","text/template/parse",function(NodeType_,Pos_,tr_,Quoted_,Text_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Quoted="";this.Text="";return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Quoted=Quoted_;this.Text=Text_;});AY=$pkg.endNode=$newType(0,$kindStruct,"parse.endNode","endNode","text/template/parse",function(NodeType_,Pos_,tr_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;});AZ=$pkg.elseNode=$newType(0,$kindStruct,"parse.elseNode","elseNode","text/template/parse",function(NodeType_,Pos_,tr_,Line_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Line=0;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Line=Line_;});BA=$pkg.BranchNode=$newType(0,$kindStruct,"parse.BranchNode","BranchNode","text/template/parse",function(NodeType_,Pos_,tr_,Line_,Pipe_,List_,ElseList_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Line=0;this.Pipe=BW.nil;this.List=BR.nil;this.ElseList=BR.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Line=Line_;this.Pipe=Pipe_;this.List=List_;this.ElseList=ElseList_;});BB=$pkg.IfNode=$newType(0,$kindStruct,"parse.IfNode","IfNode","text/template/parse",function(BranchNode_){this.$val=this;if(arguments.length===0){this.BranchNode=new BA.ptr(0,0,BM.nil,0,BW.nil,BR.nil,BR.nil);return;}this.BranchNode=BranchNode_;});BC=$pkg.RangeNode=$newType(0,$kindStruct,"parse.RangeNode","RangeNode","text/template/parse",function(BranchNode_){this.$val=this;if(arguments.length===0){this.BranchNode=new BA.ptr(0,0,BM.nil,0,BW.nil,BR.nil,BR.nil);return;}this.BranchNode=BranchNode_;});BD=$pkg.WithNode=$newType(0,$kindStruct,"parse.WithNode","WithNode","text/template/parse",function(BranchNode_){this.$val=this;if(arguments.length===0){this.BranchNode=new BA.ptr(0,0,BM.nil,0,BW.nil,BR.nil,BR.nil);return;}this.BranchNode=BranchNode_;});BE=$pkg.TemplateNode=$newType(0,$kindStruct,"parse.TemplateNode","TemplateNode","text/template/parse",function(NodeType_,Pos_,tr_,Line_,Name_,Pipe_){this.$val=this;if(arguments.length===0){this.NodeType=0;this.Pos=0;this.tr=BM.nil;this.Line=0;this.Name="";this.Pipe=BW.nil;return;}this.NodeType=NodeType_;this.Pos=Pos_;this.tr=tr_;this.Line=Line_;this.Name=Name_;this.Pipe=Pipe_;});BF=$pkg.Tree=$newType(0,$kindStruct,"parse.Tree","Tree","text/template/parse",function(Name_,ParseName_,Root_,text_,funcs_,lex_,token_,peekCount_,vars_){this.$val=this;if(arguments.length===0){this.Name="";this.ParseName="";this.Root=BR.nil;this.text="";this.funcs=CB.nil;this.lex=CC.nil;this.token=CD.zero();this.peekCount=0;this.vars=BX.nil;return;}this.Name=Name_;this.ParseName=ParseName_;this.Root=Root_;this.text=text_;this.funcs=funcs_;this.lex=lex_;this.token=token_;this.peekCount=peekCount_;this.vars=vars_;});BJ=$ptrType(A.Element);BK=$ptrType(A.List);BL=$sliceType($emptyInterface);BM=$ptrType(BF);BN=$sliceType(AG);BO=$sliceType($Uint8);BP=$arrayType($Uint8,4);BQ=$arrayType($Uint8,64);BR=$ptrType(AJ);BS=$ptrType(AQ);BT=$sliceType(BS);BU=$ptrType(AN);BV=$sliceType(BU);BW=$ptrType(AL);BX=$sliceType($String);BY=$ptrType(AW);BZ=$ptrType($Complex128);CA=$mapType($String,$emptyInterface);CB=$sliceType(CA);CC=$ptrType(I);CD=$arrayType(K,3);CE=$ptrType($error);CF=$ptrType(AM);CG=$ptrType(BB);CH=$ptrType(BC);CI=$ptrType(BE);CJ=$ptrType(AK);CK=$ptrType(BD);CL=$chanType(K,false,false);CM=$ptrType(AO);CN=$ptrType(AR);CO=$ptrType(AS);CP=$ptrType(AT);CQ=$ptrType(AU);CR=$ptrType(AV);CS=$ptrType(AX);CT=$ptrType(AY);CU=$ptrType(AZ);CV=$ptrType(BA);CW=$mapType($String,BM);I.ptr.prototype.emit=function(c){var $ptr,c,d,e;d=this;d.itemsList.PushBack((e=new K.ptr(c,d.start,d.input.substring(d.start,d.pos)),new e.constructor.elem(e)));d.start=d.pos;};I.prototype.emit=function(c){return this.$val.emit(c);};I.ptr.prototype.errorf=function(c,d){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;g=B.Sprintf(c,d);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=e.itemsList.PushBack((f=new K.ptr(0,e.start,g),new f.constructor.elem(f)));$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;return $throwNilPointerError;}return;}if($f===undefined){$f={$blk:I.ptr.prototype.errorf};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.errorf=function(c,d){return this.$val.errorf(c,d);};I.ptr.prototype.nextItem=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.itemsList.Front();case 1:if(!(d===BJ.nil)){$s=2;continue;}e=c.state(c);$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}c.state=e;d=c.itemsList.Front();$s=1;continue;case 2:c.itemsList.Remove(d);f=$clone($assertType(d.Value,K),K);c.lastPos=f.pos;return f;}return;}if($f===undefined){$f={$blk:I.ptr.prototype.nextItem};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.nextItem=function(){return this.$val.nextItem();};J=function(c,d,e,f){var $ptr,c,d,e,f,g;if(e===""){e="{{";}if(f===""){f="}}";}g=new I.ptr(c,d,e,f,$throwNilPointerError,0,0,0,0,$chanNil,0,A.New());g.state=O;return g;};K.ptr.prototype.String=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$clone(this,K);if(c.typ===6){$s=1;continue;}if(c.typ===0){$s=2;continue;}if(c.typ>20){$s=3;continue;}if(c.val.length>10){$s=4;continue;}$s=5;continue;case 1:return"EOF";case 2:return c.val;case 3:d=B.Sprintf("<%s>",new BL([new $String(c.val)]));$s=6;case 6:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;case 4:e=B.Sprintf("%.10q...",new BL([new $String(c.val)]));$s=7;case 7:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;case 5:f=B.Sprintf("%q",new BL([new $String(c.val)]));$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:K.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};K.prototype.String=function(){return this.$val.String();};I.ptr.prototype.next=function(){var $ptr,c,d,e,f;c=this;if((c.pos>>0)>=c.input.length){c.width=0;return-1;}d=E.DecodeRuneInString(c.input.substring(c.pos));e=d[0];f=d[1];c.width=(f>>0);c.pos=c.pos+(c.width)>>0;return e;};I.prototype.next=function(){return this.$val.next();};I.ptr.prototype.peek=function(){var $ptr,c,d;c=this;d=c.next();c.backup();return d;};I.prototype.peek=function(){return this.$val.peek();};I.ptr.prototype.backup=function(){var $ptr,c;c=this;c.pos=c.pos-(c.width)>>0;};I.prototype.backup=function(){return this.$val.backup();};I.ptr.prototype.ignore=function(){var $ptr,c;c=this;c.start=c.pos;};I.prototype.ignore=function(){return this.$val.ignore();};I.ptr.prototype.accept=function(c){var $ptr,c,d;d=this;if(C.IndexRune(c,d.next())>=0){return true;}d.backup();return false;};I.prototype.accept=function(c){return this.$val.accept(c);};I.ptr.prototype.acceptRun=function(c){var $ptr,c,d;d=this;while(true){if(!(C.IndexRune(c,d.next())>=0)){break;}}d.backup();};I.prototype.acceptRun=function(c){return this.$val.acceptRun(c);};I.ptr.prototype.lineNumber=function(){var $ptr,c;c=this;return 1+C.Count(c.input.substring(0,c.lastPos),"\n")>>0;};I.prototype.lineNumber=function(){return this.$val.lineNumber();};I.ptr.prototype.drain=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.items;case 1:g=$recv(d);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;e=f[1];if(!e){$s=2;continue;}$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I.ptr.prototype.drain};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.drain=function(){return this.$val.drain();};O=function(c){var $ptr,c;while(true){if(C.HasPrefix(c.input.substring(c.pos),c.leftDelim)){if(c.pos>c.start){c.emit(18);}return P;}if(c.next()===-1){break;}}if(c.pos>c.start){c.emit(18);}c.emit(6);return $throwNilPointerError;};P=function(c){var $ptr,c;c.pos=c.pos+((c.leftDelim.length>>0))>>0;if(C.HasPrefix(c.input.substring(c.pos),"/*")){return Q;}c.emit(9);c.parenDepth=0;return S;};Q=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c.pos=c.pos+(2)>>0;d=C.Index(c.input.substring(c.pos),"*/");if(d<0){$s=1;continue;}$s=2;continue;case 1:e=c.errorf("unclosed comment",new BL([]));$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;case 2:c.pos=c.pos+(((d+2>>0)>>0))>>0;if(!C.HasPrefix(c.input.substring(c.pos),c.rightDelim)){$s=4;continue;}$s=5;continue;case 4:f=c.errorf("comment ends before closing delimiter",new BL([]));$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 5:c.pos=c.pos+((c.rightDelim.length>>0))>>0;c.ignore();return O;}return;}if($f===undefined){$f={$blk:Q};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};R=function(c){var $ptr,c;c.pos=c.pos+((c.rightDelim.length>>0))>>0;c.emit(14);return O;};S=function(c){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(C.HasPrefix(c.input.substring(c.pos),c.rightDelim)){$s=1;continue;}$s=2;continue;case 1:if(c.parenDepth===0){return R;}d=c.errorf("unclosed left paren",new BL([]));$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;case 2:e=c.next();if((e===-1)||AD(e)){$s=4;continue;}if(AC(e)){$s=5;continue;}if(e===58){$s=6;continue;}if(e===124){$s=7;continue;}if(e===34){$s=8;continue;}if(e===96){$s=9;continue;}if(e===36){$s=10;continue;}if(e===39){$s=11;continue;}if(e===46){$s=12;continue;}if((e===43)||(e===45)||(48<=e&&e<=57)){$s=13;continue;}if(AE(e)){$s=14;continue;}if(e===40){$s=15;continue;}if(e===41){$s=16;continue;}if(e<=127&&D.IsPrint(e)){$s=17;continue;}$s=18;continue;case 4:f=c.errorf("unclosed action",new BL([]));$s=20;case 20:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 5:return T;case 6:if(!((c.next()===61))){$s=21;continue;}$s=22;continue;case 21:g=c.errorf("expected :=",new BL([]));$s=23;case 23:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 22:c.emit(5);$s=19;continue;case 7:c.emit(12);$s=19;continue;case 8:return AA;case 9:return AB;case 10:return W;case 11:return Y;case 12:if(c.pos<(c.input.length>>0)){h=c.input.charCodeAt(c.pos);if(h<48||57>0;$s=19;continue;case 16:c.emit(15);c.parenDepth=c.parenDepth-(1)>>0;if(c.parenDepth<0){$s=24;continue;}$s=25;continue;case 24:i=c.errorf("unexpected right paren %#U",new BL([new $Int32(e)]));$s=26;case 26:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;case 25:$s=19;continue;case 17:c.emit(2);return S;case 18:j=c.errorf("unrecognized character in action: %#U",new BL([new $Int32(e)]));$s=27;case 27:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 19:return S;}return;}if($f===undefined){$f={$blk:S};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};T=function(c){var $ptr,c;while(true){if(!(AC(c.peek()))){break;}c.next();}c.emit(16);return S;};U=function(c){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:case 1:d=c.next();if(AE(d)){$s=3;continue;}$s=4;continue;case 3:$s=5;continue;case 4:c.backup();e=c.input.substring(c.start,c.pos);if(!c.atTerminator()){$s=6;continue;}$s=7;continue;case 6:f=c.errorf("bad character %#U",new BL([new $Int32(d)]));$s=8;case 8:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 7:if((g=M[$String.keyFor(e)],g!==undefined?g.v:0)>20){c.emit((h=M[$String.keyFor(e)],h!==undefined?h.v:0));}else if(e.charCodeAt(0)===46){c.emit(7);}else if(e==="true"||e==="false"){c.emit(1);}else{c.emit(8);}$s=2;continue s;case 5:$s=1;continue;case 2:return S;}return;}if($f===undefined){$f={$blk:U};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};V=function(c){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=X(c,7);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:V};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};W=function(c){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(c.atTerminator()){c.emit(19);return S;}d=X(c,19);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:W};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};X=function(c,d){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(c.atTerminator()){if(d===19){c.emit(19);}else{c.emit(21);}return S;}e=0;while(true){e=c.next();if(!AE(e)){c.backup();break;}}if(!c.atTerminator()){$s=1;continue;}$s=2;continue;case 1:f=c.errorf("bad character %#U",new BL([new $Int32(e)]));$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 2:c.emit(d);return S;}return;}if($f===undefined){$f={$blk:X};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};I.ptr.prototype.atTerminator=function(){var $ptr,c,d,e,f,g;c=this;d=c.peek();if(AC(d)||AD(d)){return true;}e=d;if(e===-1||e===46||e===44||e===124||e===58||e===41||e===40){return true;}f=E.DecodeRuneInString(c.rightDelim);g=f[0];if(g===d){return true;}return false;};I.prototype.atTerminator=function(){return this.$val.atTerminator();};Y=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:case 1:d=c.next();if(d===92){$s=3;continue;}if(d===-1||d===10){$s=4;continue;}if(d===39){$s=5;continue;}$s=6;continue;case 3:e=c.next();if(!((e===-1))&&!((e===10))){$s=6;continue;}f=c.errorf("unterminated character constant",new BL([]));$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 4:g=c.errorf("unterminated character constant",new BL([]));$s=8;case 8:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 5:$s=2;continue s;case 6:$s=1;continue;case 2:c.emit(3);return S;}return;}if($f===undefined){$f={$blk:Y};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};Z=function(c){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(!c.scanNumber()){$s=1;continue;}$s=2;continue;case 1:d=c.errorf("bad number syntax: %q",new BL([new $String(c.input.substring(c.start,c.pos))]));$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;case 2:e=c.peek();if((e===43)||(e===45)){$s=4;continue;}$s=5;continue;case 4:if(!c.scanNumber()||!((c.input.charCodeAt((c.pos-1>>0))===105))){$s=7;continue;}$s=8;continue;case 7:f=c.errorf("bad number syntax: %q",new BL([new $String(c.input.substring(c.start,c.pos))]));$s=9;case 9:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 8:c.emit(4);$s=6;continue;case 5:c.emit(11);case 6:return S;}return;}if($f===undefined){$f={$blk:Z};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};I.ptr.prototype.scanNumber=function(){var $ptr,c,d;c=this;c.accept("+-");d="0123456789";if(c.accept("0")&&c.accept("xX")){d="0123456789abcdefABCDEF";}c.acceptRun(d);if(c.accept(".")){c.acceptRun(d);}if(c.accept("eE")){c.accept("+-");c.acceptRun("0123456789");}c.accept("i");if(AE(c.peek())){c.next();return false;}return true;};I.prototype.scanNumber=function(){return this.$val.scanNumber();};AA=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:case 1:d=c.next();if(d===92){$s=3;continue;}if(d===-1||d===10){$s=4;continue;}if(d===34){$s=5;continue;}$s=6;continue;case 3:e=c.next();if(!((e===-1))&&!((e===10))){$s=6;continue;}f=c.errorf("unterminated quoted string",new BL([]));$s=7;case 7:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 4:g=c.errorf("unterminated quoted string",new BL([]));$s=8;case 8:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 5:$s=2;continue s;case 6:$s=1;continue;case 2:c.emit(17);return S;}return;}if($f===undefined){$f={$blk:AA};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AB=function(c){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:case 1:d=c.next();if(d===-1){$s=3;continue;}if(d===96){$s=4;continue;}$s=5;continue;case 3:e=c.errorf("unterminated raw quoted string",new BL([]));$s=6;case 6:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;case 4:$s=2;continue s;case 5:$s=1;continue;case 2:c.emit(13);return S;}return;}if($f===undefined){$f={$blk:AB};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AC=function(c){var $ptr,c;return(c===32)||(c===9);};AD=function(c){var $ptr,c;return(c===13)||(c===10);};AE=function(c){var $ptr,c;return(c===95)||D.IsLetter(c)||D.IsDigit(c);};AI.prototype.Position=function(){var $ptr,c;c=this.$val;return c;};$ptrType(AI).prototype.Position=function(){return new AI(this.$get()).Position();};AH.prototype.Type=function(){var $ptr,c;c=this.$val;return c;};$ptrType(AH).prototype.Type=function(){return new AH(this.$get()).Type();};BF.ptr.prototype.newList=function(c){var $ptr,c,d;d=this;return new AJ.ptr(11,c,d,BN.nil);};BF.prototype.newList=function(c){return this.$val.newList(c);};AJ.ptr.prototype.append=function(c){var $ptr,c,d;d=this;d.Nodes=$append(d.Nodes,c);};AJ.prototype.append=function(c){return this.$val.append(c);};AJ.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AJ.prototype.tree=function(){return this.$val.tree();};AJ.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=new F.Buffer.ptr(BO.nil,0,BP.zero(),BQ.zero(),0);e=c.Nodes;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=B.Fprint(d,new BL([g]));$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}h;f++;$s=1;continue;case 2:return d.String();}return;}if($f===undefined){$f={$blk:AJ.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AJ.prototype.String=function(){return this.$val.String();};AJ.ptr.prototype.CopyList=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c===BR.nil){return c;}d=c.tr.newList(c.Pos);e=c.Nodes;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=g.Copy();$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}$r=d.append(h);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:AJ.ptr.prototype.CopyList};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AJ.prototype.CopyList=function(){return this.$val.CopyList();};AJ.ptr.prototype.Copy=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.CopyList();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AJ.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AJ.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newText=function(c,d){var $ptr,c,d,e;e=this;return new AK.ptr(0,c,e,new BO($stringToBytes(d)));};BF.prototype.newText=function(c,d){return this.$val.newText(c,d);};AK.ptr.prototype.String=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=B.Sprintf(AF,new BL([c.Text]));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AK.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AK.prototype.String=function(){return this.$val.String();};AK.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AK.prototype.tree=function(){return this.$val.tree();};AK.ptr.prototype.Copy=function(){var $ptr,c;c=this;return new AK.ptr(0,c.Pos,c.tr,$appendSlice(new BO([]),c.Text));};AK.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newPipeline=function(c,d,e){var $ptr,c,d,e,f;f=this;return new AL.ptr(14,c,f,d,e,BV.nil);};BF.prototype.newPipeline=function(c,d,e){return this.$val.newPipeline(c,d,e);};AL.ptr.prototype.append=function(c){var $ptr,c,d;d=this;d.Cmds=$append(d.Cmds,c);};AL.prototype.append=function(c){return this.$val.append(c);};AL.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d="";if(c.Decl.$length>0){e=c.Decl;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g>0){d=d+(", ");}d=d+(h.String());f++;}d=d+(" := ");}i=c.Cmds;j=0;case 1:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(k>0){d=d+(" | ");}m=l.String();$s=3;case 3:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}d=d+(m);j++;$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.String=function(){return this.$val.String();};AL.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AL.prototype.tree=function(){return this.$val.tree();};AL.ptr.prototype.CopyPipe=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c===BW.nil){return c;}d=BT.nil;e=c.Decl;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);d=$append(d,$assertType(g.Copy(),BS));f++;}h=c.tr.newPipeline(c.Pos,c.Line,d);i=c.Cmds;j=0;case 1:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=k.Copy();$s=3;case 3:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}$r=h.append($assertType(l,BU));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j++;$s=1;continue;case 2:return h;}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.CopyPipe};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.CopyPipe=function(){return this.$val.CopyPipe();};AL.ptr.prototype.Copy=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.CopyPipe();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AL.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AL.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newAction=function(c,d,e){var $ptr,c,d,e,f;f=this;return new AM.ptr(1,c,f,d,e);};BF.prototype.newAction=function(c,d,e){return this.$val.newAction(c,d,e);};AM.ptr.prototype.String=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=B.Sprintf("{{%s}}",new BL([c.Pipe]));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AM.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AM.prototype.String=function(){return this.$val.String();};AM.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AM.prototype.tree=function(){return this.$val.tree();};AM.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Pos;e=c.Line;f=c.Pipe.CopyPipe();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=c.tr.newAction(d,e,g);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;}return;}if($f===undefined){$f={$blk:AM.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AM.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newCommand=function(c){var $ptr,c,d;d=this;return new AN.ptr(4,c,d,BN.nil);};BF.prototype.newCommand=function(c){return this.$val.newCommand(c);};AN.ptr.prototype.append=function(c){var $ptr,c,d;d=this;d.Args=$append(d.Args,c);};AN.prototype.append=function(c){return this.$val.append(c);};AN.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d="";e=c.Args;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g>0){d=d+(" ");}i=$assertType(h,BW,true);j=i[0];k=i[1];if(k){$s=3;continue;}$s=4;continue;case 3:l=j.String();$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}d=d+("("+l+")");f++;$s=1;continue;case 4:m=h.String();$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}d=d+(m);f++;$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:AN.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};AN.prototype.String=function(){return this.$val.String();};AN.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AN.prototype.tree=function(){return this.$val.tree();};AN.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c===BU.nil){return c;}d=c.tr.newCommand(c.Pos);e=c.Args;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);h=g.Copy();$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}$r=d.append(h);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=1;continue;case 2:return d;}return;}if($f===undefined){$f={$blk:AN.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AN.prototype.Copy=function(){return this.$val.Copy();};AP=function(c){var $ptr,c;return new AO.ptr(9,0,BM.nil,c);};$pkg.NewIdentifier=AP;AO.ptr.prototype.SetPos=function(c){var $ptr,c,d;d=this;d.Pos=c;return d;};AO.prototype.SetPos=function(c){return this.$val.SetPos(c);};AO.ptr.prototype.SetTree=function(c){var $ptr,c,d;d=this;d.tr=c;return d;};AO.prototype.SetTree=function(c){return this.$val.SetTree(c);};AO.ptr.prototype.String=function(){var $ptr,c;c=this;return c.Ident;};AO.prototype.String=function(){return this.$val.String();};AO.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AO.prototype.tree=function(){return this.$val.tree();};AO.ptr.prototype.Copy=function(){var $ptr,c;c=this;return AP(c.Ident).SetTree(c.tr).SetPos(c.Pos);};AO.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newVariable=function(c,d){var $ptr,c,d,e;e=this;return new AQ.ptr(18,c,e,C.Split(d,"."));};BF.prototype.newVariable=function(c,d){return this.$val.newVariable(c,d);};AQ.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,h;c=this;d="";e=c.Ident;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g>0){d=d+(".");}d=d+(h);f++;}return d;};AQ.prototype.String=function(){return this.$val.String();};AQ.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AQ.prototype.tree=function(){return this.$val.tree();};AQ.ptr.prototype.Copy=function(){var $ptr,c;c=this;return new AQ.ptr(18,c.Pos,c.tr,$appendSlice(new BX([]),c.Ident));};AQ.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newDot=function(c){var $ptr,c,d;d=this;return new AR.ptr(5,c,d);};BF.prototype.newDot=function(c){return this.$val.newDot(c);};AR.ptr.prototype.Type=function(){var $ptr,c;c=this;return 5;};AR.prototype.Type=function(){return this.$val.Type();};AR.ptr.prototype.String=function(){var $ptr,c;c=this;return".";};AR.prototype.String=function(){return this.$val.String();};AR.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AR.prototype.tree=function(){return this.$val.tree();};AR.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newDot(c.Pos);};AR.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newNil=function(c){var $ptr,c,d;d=this;return new AS.ptr(12,c,d);};BF.prototype.newNil=function(c){return this.$val.newNil(c);};AS.ptr.prototype.Type=function(){var $ptr,c;c=this;return 12;};AS.prototype.Type=function(){return this.$val.Type();};AS.ptr.prototype.String=function(){var $ptr,c;c=this;return"nil";};AS.prototype.String=function(){return this.$val.String();};AS.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AS.prototype.tree=function(){return this.$val.tree();};AS.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newNil(c.Pos);};AS.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newField=function(c,d){var $ptr,c,d,e;e=this;return new AT.ptr(8,c,e,C.Split(d.substring(1),"."));};BF.prototype.newField=function(c,d){return this.$val.newField(c,d);};AT.ptr.prototype.String=function(){var $ptr,c,d,e,f,g;c=this;d="";e=c.Ident;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);d=d+("."+g);f++;}return d;};AT.prototype.String=function(){return this.$val.String();};AT.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AT.prototype.tree=function(){return this.$val.tree();};AT.ptr.prototype.Copy=function(){var $ptr,c;c=this;return new AT.ptr(8,c.Pos,c.tr,$appendSlice(new BX([]),c.Ident));};AT.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newChain=function(c,d){var $ptr,c,d,e;e=this;return new AU.ptr(3,c,e,d,BX.nil);};BF.prototype.newChain=function(c,d){return this.$val.newChain(c,d);};AU.ptr.prototype.Add=function(c){var $ptr,c,d;d=this;if((c.length===0)||!((c.charCodeAt(0)===46))){$panic(new $String("no dot in field"));}c=c.substring(1);if(c===""){$panic(new $String("empty field"));}d.Field=$append(d.Field,c);};AU.prototype.Add=function(c){return this.$val.Add(c);};AU.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Node.String();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=$assertType(c.Node,BW,true);g=f[1];if(g){e="("+e+")";}h=c.Field;i=0;while(true){if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);e=e+("."+j);i++;}return e;}return;}if($f===undefined){$f={$blk:AU.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AU.prototype.String=function(){return this.$val.String();};AU.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AU.prototype.tree=function(){return this.$val.tree();};AU.ptr.prototype.Copy=function(){var $ptr,c;c=this;return new AU.ptr(3,c.Pos,c.tr,c.Node,$appendSlice(new BX([]),c.Field));};AU.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newBool=function(c,d){var $ptr,c,d,e;e=this;return new AV.ptr(2,c,e,d);};BF.prototype.newBool=function(c,d){return this.$val.newBool(c,d);};AV.ptr.prototype.String=function(){var $ptr,c;c=this;if(c.True){return"true";}return"false";};AV.prototype.String=function(){return this.$val.String();};AV.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AV.prototype.tree=function(){return this.$val.tree();};AV.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newBool(c.Pos,c.True);};AV.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newNumber=function(c,d,e){var $ptr,aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=new AW.ptr(13,c,f,false,false,false,false,new $Int64(0,0),new $Uint64(0,0),0,new $Complex128(0,0),d);h=e;if(h===3){$s=1;continue;}if(h===4){$s=2;continue;}$s=3;continue;case 1:i=G.UnquoteChar(d.substring(1),d.charCodeAt(0));j=i[0];k=i[2];l=i[3];if(!($interfaceIsEqual(l,$ifaceNil))){return[BY.nil,l];}if(!(k==="'")){$s=4;continue;}$s=5;continue;case 4:m=B.Errorf("malformed character constant: %s",new BL([new $String(d)]));$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}return[BY.nil,m];case 5:g.Int64=new $Int64(0,j);g.IsInt=true;g.Uint64=new $Uint64(0,j);g.IsUint=true;g.Float64=j;g.IsFloat=true;return[g,$ifaceNil];case 2:o=B.Sscan(d,new BL([(g.$ptr_Complex128||(g.$ptr_Complex128=new BZ(function(){return this.$target.Complex128;},function($v){this.$target.Complex128=$v;},g)))]));$s=7;case 7:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[1];if(!($interfaceIsEqual(p,$ifaceNil))){$s=8;continue;}$s=9;continue;case 8:return[BY.nil,p];case 9:g.IsComplex=true;g.simplifyComplex();return[g,$ifaceNil];case 3:if(d.length>0&&(d.charCodeAt((d.length-1>>0))===105)){q=G.ParseFloat(d.substring(0,(d.length-1>>0)),64);r=q[0];s=q[1];if($interfaceIsEqual(s,$ifaceNil)){g.IsComplex=true;g.Complex128=new $Complex128(0,r);g.simplifyComplex();return[g,$ifaceNil];}}t=G.ParseUint(d,0,64);u=t[0];v=t[1];if($interfaceIsEqual(v,$ifaceNil)){g.IsUint=true;g.Uint64=u;}w=G.ParseInt(d,0,64);x=w[0];v=w[1];if($interfaceIsEqual(v,$ifaceNil)){g.IsInt=true;g.Int64=x;if((x.$high===0&&x.$low===0)){g.IsUint=true;g.Uint64=u;}}if(g.IsInt){$s=10;continue;}if(g.IsUint){$s=11;continue;}$s=12;continue;case 10:g.IsFloat=true;g.Float64=$flatten64(g.Int64);$s=13;continue;case 11:g.IsFloat=true;g.Float64=$flatten64(g.Uint64);$s=13;continue;case 12:y=G.ParseFloat(d,64);z=y[0];aa=y[1];if($interfaceIsEqual(aa,$ifaceNil)){$s=14;continue;}$s=15;continue;case 14:if(!C.ContainsAny(d,".eE")){$s=16;continue;}$s=17;continue;case 16:ab=B.Errorf("integer overflow: %q",new BL([new $String(d)]));$s=18;case 18:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}return[BY.nil,ab];case 17:g.IsFloat=true;g.Float64=z;if(!g.IsInt&&($flatten64(new $Int64(0,z))===z)){g.IsInt=true;g.Int64=new $Int64(0,z);}if(!g.IsUint&&($flatten64(new $Uint64(0,z))===z)){g.IsUint=true;g.Uint64=new $Uint64(0,z);}case 15:case 13:if(!g.IsInt&&!g.IsUint&&!g.IsFloat){$s=19;continue;}$s=20;continue;case 19:ac=B.Errorf("illegal number syntax: %q",new BL([new $String(d)]));$s=21;case 21:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}return[BY.nil,ac];case 20:return[g,$ifaceNil];}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.newNumber};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.newNumber=function(c,d,e){return this.$val.newNumber(c,d,e);};AW.ptr.prototype.simplifyComplex=function(){var $ptr,c;c=this;c.IsFloat=c.Complex128.$imag===0;if(c.IsFloat){c.Float64=c.Complex128.$real;c.IsInt=$flatten64(new $Int64(0,c.Float64))===c.Float64;if(c.IsInt){c.Int64=new $Int64(0,c.Float64);}c.IsUint=$flatten64(new $Uint64(0,c.Float64))===c.Float64;if(c.IsUint){c.Uint64=new $Uint64(0,c.Float64);}}};AW.prototype.simplifyComplex=function(){return this.$val.simplifyComplex();};AW.ptr.prototype.String=function(){var $ptr,c;c=this;return c.Text;};AW.prototype.String=function(){return this.$val.String();};AW.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AW.prototype.tree=function(){return this.$val.tree();};AW.ptr.prototype.Copy=function(){var $ptr,c,d;c=this;d=new AW.ptr(0,0,BM.nil,false,false,false,false,new $Int64(0,0),new $Uint64(0,0),0,new $Complex128(0,0),"");AW.copy(d,c);return d;};AW.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newString=function(c,d,e){var $ptr,c,d,e,f;f=this;return new AX.ptr(16,c,f,d,e);};BF.prototype.newString=function(c,d,e){return this.$val.newString(c,d,e);};AX.ptr.prototype.String=function(){var $ptr,c;c=this;return c.Quoted;};AX.prototype.String=function(){return this.$val.String();};AX.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AX.prototype.tree=function(){return this.$val.tree();};AX.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newString(c.Pos,c.Quoted,c.Text);};AX.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newEnd=function(c){var $ptr,c,d;d=this;return new AY.ptr(7,c,d);};BF.prototype.newEnd=function(c){return this.$val.newEnd(c);};AY.ptr.prototype.String=function(){var $ptr,c;c=this;return"{{end}}";};AY.prototype.String=function(){return this.$val.String();};AY.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AY.prototype.tree=function(){return this.$val.tree();};AY.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newEnd(c.Pos);};AY.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newElse=function(c,d){var $ptr,c,d,e;e=this;return new AZ.ptr(6,c,e,d);};BF.prototype.newElse=function(c,d){return this.$val.newElse(c,d);};AZ.ptr.prototype.Type=function(){var $ptr,c;c=this;return 6;};AZ.prototype.Type=function(){return this.$val.Type();};AZ.ptr.prototype.String=function(){var $ptr,c;c=this;return"{{else}}";};AZ.prototype.String=function(){return this.$val.String();};AZ.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};AZ.prototype.tree=function(){return this.$val.tree();};AZ.ptr.prototype.Copy=function(){var $ptr,c;c=this;return c.tr.newElse(c.Pos,c.Line);};AZ.prototype.Copy=function(){return this.$val.Copy();};BA.ptr.prototype.String=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d="";e=c.NodeType;if(e===10){d="if";}else if(e===15){d="range";}else if(e===19){d="with";}else{$panic(new $String("unknown branch type"));}if(!(c.ElseList===BR.nil)){$s=1;continue;}$s=2;continue;case 1:f=B.Sprintf("{{%s %s}}%s{{else}}%s{{end}}",new BL([new $String(d),c.Pipe,c.List,c.ElseList]));$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 2:g=B.Sprintf("{{%s %s}}%s{{end}}",new BL([new $String(d),c.Pipe,c.List]));$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:BA.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BA.prototype.String=function(){return this.$val.String();};BA.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};BA.prototype.tree=function(){return this.$val.tree();};BA.ptr.prototype.Copy=function(){var $ptr,c,d;c=this;d=c.NodeType;if(d===10){return c.tr.newIf(c.Pos,c.Line,c.Pipe,c.List,c.ElseList);}else if(d===15){return c.tr.newRange(c.Pos,c.Line,c.Pipe,c.List,c.ElseList);}else if(d===19){return c.tr.newWith(c.Pos,c.Line,c.Pipe,c.List,c.ElseList);}else{$panic(new $String("unknown branch type"));}};BA.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newIf=function(c,d,e,f,g){var $ptr,c,d,e,f,g,h;h=this;return new BB.ptr(new BA.ptr(10,c,h,d,e,f,g));};BF.prototype.newIf=function(c,d,e,f,g){return this.$val.newIf(c,d,e,f,g);};BB.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.BranchNode.Pos;e=c.BranchNode.Line;f=c.BranchNode.Pipe.CopyPipe();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=c.BranchNode.List.CopyList();$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=c.BranchNode.ElseList.CopyList();$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=c.BranchNode.tr.newIf(d,e,g,i,k);$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:BB.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BB.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newRange=function(c,d,e,f,g){var $ptr,c,d,e,f,g,h;h=this;return new BC.ptr(new BA.ptr(15,c,h,d,e,f,g));};BF.prototype.newRange=function(c,d,e,f,g){return this.$val.newRange(c,d,e,f,g);};BC.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.BranchNode.Pos;e=c.BranchNode.Line;f=c.BranchNode.Pipe.CopyPipe();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=c.BranchNode.List.CopyList();$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=c.BranchNode.ElseList.CopyList();$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=c.BranchNode.tr.newRange(d,e,g,i,k);$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:BC.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BC.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newWith=function(c,d,e,f,g){var $ptr,c,d,e,f,g,h;h=this;return new BD.ptr(new BA.ptr(19,c,h,d,e,f,g));};BF.prototype.newWith=function(c,d,e,f,g){return this.$val.newWith(c,d,e,f,g);};BD.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.BranchNode.Pos;e=c.BranchNode.Line;f=c.BranchNode.Pipe.CopyPipe();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=c.BranchNode.List.CopyList();$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=c.BranchNode.ElseList.CopyList();$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=c.BranchNode.tr.newWith(d,e,g,i,k);$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:BD.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BD.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.newTemplate=function(c,d,e,f){var $ptr,c,d,e,f,g;g=this;return new BE.ptr(17,c,g,d,e,f);};BF.prototype.newTemplate=function(c,d,e,f){return this.$val.newTemplate(c,d,e,f);};BE.ptr.prototype.String=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c.Pipe===BW.nil){$s=1;continue;}$s=2;continue;case 1:d=B.Sprintf("{{template %q}}",new BL([new $String(c.Name)]));$s=3;case 3:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;case 2:e=B.Sprintf("{{template %q %s}}",new BL([new $String(c.Name),c.Pipe]));$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.String};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.String=function(){return this.$val.String();};BE.ptr.prototype.tree=function(){var $ptr,c;c=this;return c.tr;};BE.prototype.tree=function(){return this.$val.tree();};BE.ptr.prototype.Copy=function(){var $ptr,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.Pos;e=c.Line;f=c.Name;g=c.Pipe.CopyPipe();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;i=c.tr.newTemplate(d,e,f,h);$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;}return;}if($f===undefined){$f={$blk:BE.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};BE.prototype.Copy=function(){return this.$val.Copy();};BF.ptr.prototype.Copy=function(){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c===BM.nil){return BM.nil;}d=c.Root.CopyList();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return new BF.ptr(c.Name,c.ParseName,d,c.text,CB.nil,CC.nil,CD.zero(),0,BX.nil);}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.Copy};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.Copy=function(){return this.$val.Copy();};BG=function(c,d,e,f,g){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=false;i=$ifaceNil;h={};j=BH(c,new CB([]));j.text=d;l=j.Parse(d,e,f,h,g);$s=1;case 1:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;i=k[1];return[h,i];}return;}if($f===undefined){$f={$blk:BG};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Parse=BG;BF.ptr.prototype.next=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c.peekCount>0){$s=1;continue;}$s=2;continue;case 1:c.peekCount=c.peekCount-(1)>>0;$s=3;continue;case 2:d=c.lex.nextItem();$s=4;case 4:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}K.copy(c.token[0],d);case 3:return(e=c.token,f=c.peekCount,((f<0||f>=e.length)?$throwRuntimeError("index out of range"):e[f]));}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.next};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.next=function(){return this.$val.next();};BF.ptr.prototype.backup=function(){var $ptr,c;c=this;c.peekCount=c.peekCount+(1)>>0;};BF.prototype.backup=function(){return this.$val.backup();};BF.ptr.prototype.backup2=function(c){var $ptr,c,d;c=$clone(c,K);d=this;K.copy(d.token[1],c);d.peekCount=2;};BF.prototype.backup2=function(c){return this.$val.backup2(c);};BF.ptr.prototype.backup3=function(c,d){var $ptr,c,d,e;d=$clone(d,K);c=$clone(c,K);e=this;K.copy(e.token[1],d);K.copy(e.token[2],c);e.peekCount=3;};BF.prototype.backup3=function(c,d){return this.$val.backup3(c,d);};BF.ptr.prototype.peek=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(c.peekCount>0){return(d=c.token,e=c.peekCount-1>>0,((e<0||e>=d.length)?$throwRuntimeError("index out of range"):d[e]));}c.peekCount=1;f=c.lex.nextItem();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}K.copy(c.token[0],f);return c.token[0];}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.peek};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.peek=function(){return this.$val.peek();};BF.ptr.prototype.nextNonSpace=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=new K.ptr(0,0,"");d=this;case 1:e=d.next();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}K.copy(c,e);if(!((c.typ===16))){$s=2;continue;}$s=1;continue;case 2:K.copy(c,c);return c;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.nextNonSpace};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.nextNonSpace=function(){return this.$val.nextNonSpace();};BF.ptr.prototype.peekNonSpace=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=new K.ptr(0,0,"");d=this;case 1:e=d.next();$s=3;case 3:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}K.copy(c,e);if(!((c.typ===16))){$s=2;continue;}$s=1;continue;case 2:d.backup();K.copy(c,c);return c;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.peekNonSpace};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.peekNonSpace=function(){return this.$val.peekNonSpace();};BH=function(c,d){var $ptr,c,d;return new BF.ptr(c,"",BR.nil,"",d,CC.nil,CD.zero(),0,BX.nil);};$pkg.New=BH;BF.ptr.prototype.ErrorContext=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d="";e="";f=this;g=c.Position();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=(g>>0);i=c.tree();$s=2;case 2:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(j===BM.nil){j=f;}k=j.text.substring(0,h);l=C.LastIndex(k,"\n");if(l===-1){l=h;}else{l=l+(1)>>0;l=h-l>>0;}m=1+C.Count(k,"\n")>>0;n=c.String();$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}e=n;if(e.length>20){$s=4;continue;}$s=5;continue;case 4:o=B.Sprintf("%.20s...",new BL([new $String(e)]));$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}e=o;case 5:q=B.Sprintf("%s:%d:%d",new BL([new $String(j.ParseName),new $Int(m),new $Int(l)]));$s=7;case 7:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=e;d=p;e=r;return[d,e];}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.ErrorContext};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.ErrorContext=function(c){return this.$val.ErrorContext(c);};BF.ptr.prototype.errorf=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;e.Root=BR.nil;f=B.Sprintf("template: %s:%d: %s",new BL([new $String(e.ParseName),new $Int(e.lex.lineNumber()),new $String(c)]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}c=f;g=B.Errorf(c,d);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}$panic(g);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.errorf};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.errorf=function(c,d){return this.$val.errorf(c,d);};BF.ptr.prototype.error=function(c){var $ptr,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;$r=d.errorf("%s",new BL([c]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.error};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.error=function(c){return this.$val.error(c);};BF.ptr.prototype.expect=function(c,d){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.nextNonSpace();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$clone(f,K);if(!((g.typ===c))){$s=2;continue;}$s=3;continue;case 2:$r=e.unexpected(g,d);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:return g;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.expect};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.expect=function(c,d){return this.$val.expect(c,d);};BF.ptr.prototype.expectOneOf=function(c,d,e){var $ptr,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=f.nextNonSpace();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$clone(g,K);if(!((h.typ===c))&&!((h.typ===d))){$s=2;continue;}$s=3;continue;case 2:$r=f.unexpected(h,e);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:return h;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.expectOneOf};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.expectOneOf=function(c,d,e){return this.$val.expectOneOf(c,d,e);};BF.ptr.prototype.unexpected=function(c,d){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$clone(c,K);e=this;$r=e.errorf("unexpected %s in %s",new BL([new c.constructor.elem(c),new $String(d)]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.unexpected};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.unexpected=function(c,d){return this.$val.unexpected(c,d);};BF.ptr.prototype.recover=function(c){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=$recover();if(!($interfaceIsEqual(e,$ifaceNil))){$s=1;continue;}$s=2;continue;case 1:f=$assertType(e,H.Error,true);g=f[1];if(g){$panic(e);}if(!(d===BM.nil)){$s=3;continue;}$s=4;continue;case 3:$r=d.lex.drain();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d.stopParse();case 4:c.$set($assertType(e,$error));case 2:return;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.recover};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.recover=function(c){return this.$val.recover(c);};BF.ptr.prototype.startParse=function(c,d){var $ptr,c,d,e;e=this;e.Root=BR.nil;e.lex=d;e.vars=new BX(["$"]);e.funcs=c;};BF.prototype.startParse=function(c,d){return this.$val.startParse(c,d);};BF.ptr.prototype.stopParse=function(){var $ptr,c;c=this;c.lex=CC.nil;c.vars=BX.nil;c.funcs=CB.nil;};BF.prototype.stopParse=function(){return this.$val.stopParse();};BF.ptr.prototype.Parse=function(c,d,e,f,g){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);h=[h];i=BM.nil;h[0]=$ifaceNil;j=this;$deferred.push([$methodVal(j,"recover"),[(h.$ptr||(h.$ptr=new CE(function(){return this.$target[0];},function($v){this.$target[0]=$v;},h)))]]);j.ParseName=j.Name;j.startParse(g,J(j.Name,c,d,e));j.text=c;k=j.parse(f);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;$r=j.add(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}j.stopParse();l=j;m=$ifaceNil;i=l;h[0]=m;return[i,h[0]];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[i,h[0]];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:BF.ptr.prototype.Parse};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};BF.prototype.Parse=function(c,d,e,f,g){return this.$val.Parse(c,d,e,f,g);};BF.ptr.prototype.add=function(c){var $ptr,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;f=(e=c[$String.keyFor(d.Name)],e!==undefined?e.v:BM.nil);if(f===BM.nil){g=true;$s=3;continue s;}h=BI(f.Root);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 3:if(g){$s=1;continue;}$s=2;continue;case 1:i=d.Name;(c||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(i)]={k:i,v:d};return;case 2:j=BI(d.Root);$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(!j){$s=5;continue;}$s=6;continue;case 5:$r=d.errorf("template: multiple definition of template %q",new BL([new $String(d.Name)]));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.add};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.add=function(c){return this.$val.add(c);};BI=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c;if(d===$ifaceNil){$s=1;continue;}if($assertType(d,CF,true)[1]){$s=2;continue;}if($assertType(d,CG,true)[1]){$s=3;continue;}if($assertType(d,BR,true)[1]){$s=4;continue;}if($assertType(d,CH,true)[1]){$s=5;continue;}if($assertType(d,CI,true)[1]){$s=6;continue;}if($assertType(d,CJ,true)[1]){$s=7;continue;}if($assertType(d,CK,true)[1]){$s=8;continue;}$s=9;continue;case 1:e=d;return true;case 2:f=d.$val;$s=10;continue;case 3:g=d.$val;$s=10;continue;case 4:h=d.$val;i=h.Nodes;j=0;case 11:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=BI(k);$s=15;case 15:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!l){$s=13;continue;}$s=14;continue;case 13:return false;case 14:j++;$s=11;continue;case 12:return true;case 5:m=d.$val;$s=10;continue;case 6:n=d.$val;$s=10;continue;case 7:o=d.$val;p=F.TrimSpace(o.Text);$s=16;case 16:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p.$length===0;case 8:q=d.$val;$s=10;continue;case 9:r=d;s=r.String();$s=17;case 17:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}$panic(new $String("unknown node: "+s));case 10:return false;}return;}if($f===undefined){$f={$blk:BI};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};$pkg.IsEmptyTree=BI;BF.ptr.prototype.parse=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=$ifaceNil;e=this;f=e.peek();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=e.newList(f.pos);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e.Root=g;case 3:h=e.peek();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(!(!((h.typ===6)))){$s=4;continue;}i=e.peek();$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(i.typ===9){$s=6;continue;}$s=7;continue;case 6:j=e.next();$s=9;case 9:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=$clone(j,K);l=e.nextNonSpace();$s=12;case 12:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l.typ===22){$s=10;continue;}$s=11;continue;case 10:m=BH("definition",new CB([]));m.text=e.text;m.ParseName=e.ParseName;m.startParse(e.funcs,e.lex);$r=m.parseDefinition(c);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=3;continue;case 11:e.backup2(k);case 7:n=e.textOrAction();$s=14;case 14:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;q=o.Type();$s=15;case 15:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;if(p===7||p===6){$s=16;continue;}$s=17;continue;case 16:$r=e.errorf("unexpected %s",new BL([o]));$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=18;continue;case 17:e.Root.append(o);case 18:$s=3;continue;case 4:d=$ifaceNil;return d;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.parse};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.parse=function(c){return this.$val.parse(c);};BF.ptr.prototype.parseDefinition=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=d.expectOneOf(17,13,"define clause");$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=$clone(e,K);g=$ifaceNil;h=G.Unquote(f.val);d.Name=h[0];g=h[1];if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$r=d.error(g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:i=d.expect(14,"define clause");$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;j=$ifaceNil;l=d.itemList();$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;d.Root=k[0];j=k[1];m=j.Type();$s=9;case 9:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(!((m===7))){$s=7;continue;}$s=8;continue;case 7:$r=d.errorf("unexpected %s in %s",new BL([j,new $String("define clause")]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:$r=d.add(c);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d.stopParse();$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.parseDefinition};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.parseDefinition=function(c){return this.$val.parseDefinition(c);};BF.ptr.prototype.itemList=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=BR.nil;d=$ifaceNil;e=this;f=e.peekNonSpace();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=e.newList(f.pos);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}c=g;case 3:h=e.peekNonSpace();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(!(!((h.typ===6)))){$s=4;continue;}i=e.textOrAction();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;l=j.Type();$s=7;case 7:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;if(k===7||k===6){$s=8;continue;}$s=9;continue;case 8:m=c;n=j;c=m;d=n;return[c,d];case 9:c.append(j);$s=3;continue;case 4:$r=e.errorf("unexpected EOF",new BL([]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return[c,d];}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.itemList};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.itemList=function(){return this.$val.itemList();};BF.ptr.prototype.textOrAction=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.nextNonSpace();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=$clone(d,K);f=e.typ;if(f===18){$s=2;continue;}if(f===9){$s=3;continue;}$s=4;continue;case 2:return c.newText(e.pos,e.val);case 3:g=c.action();$s=6;case 6:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 4:$r=c.unexpected(e,"input");$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:return $ifaceNil;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.textOrAction};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.textOrAction=function(){return this.$val.textOrAction();};BF.ptr.prototype.action=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=$ifaceNil;d=this;e=d.nextNonSpace();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=$clone(e,K);g=f.typ;if(g===23){$s=2;continue;}if(g===24){$s=3;continue;}if(g===25){$s=4;continue;}if(g===27){$s=5;continue;}if(g===28){$s=6;continue;}if(g===29){$s=7;continue;}$s=8;continue;case 2:h=d.elseControl();$s=9;case 9:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}c=h;return c;case 3:i=d.endControl();$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c=i;return c;case 4:j=d.ifControl();$s=11;case 11:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}c=j;return c;case 5:k=d.rangeControl();$s=12;case 12:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}c=k;return c;case 6:l=d.templateControl();$s=13;case 13:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}c=l;return c;case 7:m=d.withControl();$s=14;case 14:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}c=m;return c;case 8:d.backup();n=d.peek();$s=15;case 15:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n.pos;p=d.lex.lineNumber();q=d.pipeline("command");$s=16;case 16:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;s=d.newAction(o,p,r);$s=17;case 17:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}c=s;return c;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.action};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.action=function(){return this.$val.action();};BF.ptr.prototype.pipeline=function(c){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=BW.nil;e=this;f=BT.nil;g=e.peekNonSpace();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g.pos;case 2:i=e.peekNonSpace();$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=$clone(i,K);if(j.typ===19){$s=5;continue;}$s=6;continue;case 5:k=e.next();$s=7;case 7:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;l=e.peek();$s=8;case 8:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=$clone(l,K);n=e.peekNonSpace();$s=9;case 9:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=$clone(n,K);if((o.typ===5)||((o.typ===2)&&o.val===",")){$s=10;continue;}if(m.typ===16){$s=11;continue;}$s=12;continue;case 10:p=e.nextNonSpace();$s=14;case 14:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}p;q=e.newVariable(j.pos,j.val);f=$append(f,q);e.vars=$append(e.vars,j.val);if((o.typ===2)&&o.val===","){$s=15;continue;}$s=16;continue;case 15:if(c==="range"&&f.$length<2){$s=17;continue;}$s=18;continue;case 17:$s=2;continue;case 18:$r=e.errorf("too many declarations in %s",new BL([new $String(c)]));$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 16:$s=13;continue;case 11:e.backup3(j,m);$s=13;continue;case 12:e.backup2(j);case 13:case 6:$s=3;continue;$s=2;continue;case 3:d=e.newPipeline(h,e.lex.lineNumber(),f);case 20:r=e.nextNonSpace();$s=22;case 22:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=$clone(r,K);t=s.typ;if(t===14||t===15){$s=23;continue;}if(t===1||t===3||t===4||t===21||t===7||t===8||t===11||t===26||t===13||t===17||t===19||t===10){$s=24;continue;}$s=25;continue;case 23:$r=e.checkPipeline(d,c);$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(s.typ===15){e.backup();}return d;case 24:e.backup();u=e.command();$s=28;case 28:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}$r=d.append(u);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=26;continue;case 25:$r=e.unexpected(s,c);$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 26:$s=20;continue;case 21:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.pipeline};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.pipeline=function(c){return this.$val.pipeline(c);};BF.ptr.prototype.checkPipeline=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(c.Cmds.$length===0){$s=1;continue;}$s=2;continue;case 1:$r=e.errorf("missing value for %s",new BL([new $String(d)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:f=$subslice(c.Cmds,1);g=0;case 4:if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);l=(k=i.Args,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])).Type();$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}j=l;if(j===2||j===5||j===12||j===13||j===16){$s=7;continue;}$s=8;continue;case 7:$r=e.errorf("non executable command in pipeline stage %d",new BL([new $Int((h+2>>0))]));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:g++;$s=4;continue;case 5:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.checkPipeline};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.checkPipeline=function(c,d){return this.$val.checkPipeline(c,d);};BF.ptr.prototype.parseControl=function(c,d){var $ptr,aa,ab,ac,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=0;f=0;g=BW.nil;h=BR.nil;i=BR.nil;j=this;$deferred.push([$methodVal(j,"popVars"),[j.vars.$length]]);f=j.lex.lineNumber();k=j.pipeline(d);$s=1;case 1:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}g=k;l=$ifaceNil;n=j.itemList();$s=2;case 2:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}m=n;h=m[0];l=m[1];p=l.Type();$s=3;case 3:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}o=p;if(o===7){$s=4;continue;}if(o===6){$s=5;continue;}$s=6;continue;case 4:$s=6;continue;case 5:if(c){$s=7;continue;}$s=8;continue;case 7:q=j.peek();$s=11;case 11:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}if(q.typ===25){$s=9;continue;}$s=10;continue;case 9:r=j.next();$s=12;case 12:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}r;s=l.Position();$s=13;case 13:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=j.newList(s);$s=14;case 14:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}i=t;u=j.ifControl();$s=15;case 15:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}$r=i.append(u);$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=6;continue;case 10:case 8:w=j.itemList();$s=17;case 17:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}v=w;i=v[0];l=v[1];x=l.Type();$s=20;case 20:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}if(!((x===7))){$s=18;continue;}$s=19;continue;case 18:$r=j.errorf("expected end; found %s",new BL([l]));$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 19:case 6:y=new AI(g.Pos).Position();z=f;aa=g;ab=h;ac=i;e=y;f=z;g=aa;h=ab;i=ac;return[e,f,g,h,i];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return[e,f,g,h,i];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:BF.ptr.prototype.parseControl};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};BF.prototype.parseControl=function(c,d){return this.$val.parseControl(c,d);};BF.ptr.prototype.ifControl=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=c.parseControl(true,"if");$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=c.newIf(d[0],d[1],d[2],d[3],d[4]);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.ifControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.ifControl=function(){return this.$val.ifControl();};BF.ptr.prototype.rangeControl=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=c.parseControl(false,"range");$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=c.newRange(d[0],d[1],d[2],d[3],d[4]);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.rangeControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.rangeControl=function(){return this.$val.rangeControl();};BF.ptr.prototype.withControl=function(){var $ptr,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=c.parseControl(false,"with");$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=c.newWith(d[0],d[1],d[2],d[3],d[4]);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.withControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.withControl=function(){return this.$val.withControl();};BF.ptr.prototype.endControl=function(){var $ptr,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.expect(14,"end");$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=c.newEnd(d.pos);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.endControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.endControl=function(){return this.$val.endControl();};BF.ptr.prototype.elseControl=function(){var $ptr,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.peekNonSpace();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=$clone(d,K);if(e.typ===25){return c.newElse(e.pos,c.lex.lineNumber());}f=c.expect(14,"else");$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=c.newElse(f.pos,c.lex.lineNumber());$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.elseControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.elseControl=function(){return this.$val.elseControl();};BF.ptr.prototype.templateControl=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d="";e=c.nextNonSpace();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=$clone(e,K);g=f.typ;if(g===17||g===13){$s=2;continue;}$s=3;continue;case 2:h=G.Unquote(f.val);i=h[0];j=h[1];if(!($interfaceIsEqual(j,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:$r=c.error(j);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:d=i;$s=4;continue;case 3:$r=c.unexpected(f,"template invocation");$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:k=BW.nil;l=c.nextNonSpace();$s=11;case 11:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!((l.typ===14))){$s=9;continue;}$s=10;continue;case 9:c.backup();m=c.pipeline("template");$s=12;case 12:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;case 10:return c.newTemplate(f.pos,c.lex.lineNumber(),d,k);}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.templateControl};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.templateControl=function(){return this.$val.templateControl();};BF.ptr.prototype.command=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.peekNonSpace();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=c.newCommand(d.pos);$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;case 3:g=c.peekNonSpace();$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;h=c.operand();$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){f.append(i);}j=c.next();$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=$clone(j,K);l=k.typ;if(l===16){$s=8;continue;}if(l===0){$s=9;continue;}if(l===14||l===15){$s=10;continue;}if(l===12){$s=11;continue;}$s=12;continue;case 8:$s=3;continue;$s=13;continue;case 9:$r=c.errorf("%s",new BL([new $String(k.val)]));$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=13;continue;case 10:c.backup();$s=13;continue;case 11:$s=13;continue;case 12:$r=c.errorf("unexpected %s in operand",new BL([new k.constructor.elem(k)]));$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 13:$s=4;continue;$s=3;continue;case 4:if(f.Args.$length===0){$s=16;continue;}$s=17;continue;case 16:$r=c.errorf("empty command",new BL([]));$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 17:return f;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.command};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.command=function(){return this.$val.command();};BF.ptr.prototype.operand=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.term();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if($interfaceIsEqual(e,$ifaceNil)){return $ifaceNil;}f=c.peek();$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f.typ===7){$s=2;continue;}$s=3;continue;case 2:g=c.peek();$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=c.newChain(g.pos,e);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;case 7:j=c.peek();$s=9;case 9:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(!(j.typ===7)){$s=8;continue;}k=c.next();$s=10;case 10:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$r=i.Add(k.val);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=7;continue;case 8:m=e.Type();$s=12;case 12:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;if(l===8){$s=13;continue;}if(l===18){$s=14;continue;}if(l===2||l===16||l===13||l===12||l===5){$s=15;continue;}$s=16;continue;case 13:n=new AI(i.Pos).Position();o=i.String();$s=18;case 18:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=c.newField(n,p);$s=19;case 19:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}e=q;$s=17;continue;case 14:r=new AI(i.Pos).Position();s=i.String();$s=20;case 20:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}t=s;u=c.newVariable(r,t);$s=21;case 21:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}e=u;$s=17;continue;case 15:v=e.String();$s=22;case 22:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=new $String(v);$r=c.errorf("unexpected . after term %q",new BL([w]));$s=23;case 23:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=17;continue;case 16:e=i;case 17:case 3:return e;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.operand};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.operand=function(){return this.$val.operand();};BF.ptr.prototype.term=function(){var $ptr,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.nextNonSpace();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=$clone(d,K);f=e.typ;if(f===0){$s=2;continue;}if(f===8){$s=3;continue;}if(f===21){$s=4;continue;}if(f===26){$s=5;continue;}if(f===19){$s=6;continue;}if(f===7){$s=7;continue;}if(f===1){$s=8;continue;}if(f===3||f===4||f===11){$s=9;continue;}if(f===10){$s=10;continue;}if(f===17||f===13){$s=11;continue;}$s=12;continue;case 2:$r=c.errorf("%s",new BL([new $String(e.val)]));$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=12;continue;case 3:if(!c.hasFunction(e.val)){$s=14;continue;}$s=15;continue;case 14:$r=c.errorf("function %q not defined",new BL([new $String(e.val)]));$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 15:return AP(e.val).SetTree(c).SetPos(e.pos);case 4:return c.newDot(e.pos);case 5:return c.newNil(e.pos);case 6:g=c.useVar(e.pos,e.val);$s=17;case 17:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 7:return c.newField(e.pos,e.val);case 8:return c.newBool(e.pos,e.val==="true");case 9:i=c.newNumber(e.pos,e.val,e.typ);$s=18;case 18:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if(!($interfaceIsEqual(k,$ifaceNil))){$s=19;continue;}$s=20;continue;case 19:$r=c.error(k);$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 20:return j;case 10:l=c.pipeline("parenthesized pipeline");$s=22;case 22:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;n=c.next();$s=23;case 23:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=$clone(n,K);if(!((o.typ===15))){$s=24;continue;}$s=25;continue;case 24:$r=c.errorf("unclosed right paren: unexpected %s",new BL([new o.constructor.elem(o)]));$s=26;case 26:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 25:return m;case 11:p=G.Unquote(e.val);q=p[0];r=p[1];if(!($interfaceIsEqual(r,$ifaceNil))){$s=27;continue;}$s=28;continue;case 27:$r=c.error(r);$s=29;case 29:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 28:return c.newString(e.pos,e.val,q);case 12:c.backup();return $ifaceNil;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.term};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.term=function(){return this.$val.term();};BF.ptr.prototype.hasFunction=function(c){var $ptr,c,d,e,f,g,h;d=this;e=d.funcs;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g===false){f++;continue;}if(!($interfaceIsEqual((h=g[$String.keyFor(c)],h!==undefined?h.v:$ifaceNil),$ifaceNil))){return true;}f++;}return false;};BF.prototype.hasFunction=function(c){return this.$val.hasFunction(c);};BF.ptr.prototype.popVars=function(c){var $ptr,c,d;d=this;d.vars=$subslice(d.vars,0,c);};BF.prototype.popVars=function(c){return this.$val.popVars(c);};BF.ptr.prototype.useVar=function(c,d){var $ptr,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.newVariable(c,d);g=e.vars;h=0;while(true){if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);if(i===(j=f.Ident,(0>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]))){return f;}h++;}$r=e.errorf("undefined variable %q",new BL([new $String((k=f.Ident,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])))]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:BF.ptr.prototype.useVar};}$f.$ptr=$ptr;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BF.prototype.useVar=function(c,d){return this.$val.useVar(c,d);};CC.methods=[{prop:"emit",name:"emit",pkg:"text/template/parse",typ:$funcType([L],[],false)},{prop:"errorf",name:"errorf",pkg:"text/template/parse",typ:$funcType([$String,BL],[N],true)},{prop:"nextItem",name:"nextItem",pkg:"text/template/parse",typ:$funcType([],[K],false)},{prop:"next",name:"next",pkg:"text/template/parse",typ:$funcType([],[$Int32],false)},{prop:"peek",name:"peek",pkg:"text/template/parse",typ:$funcType([],[$Int32],false)},{prop:"backup",name:"backup",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"ignore",name:"ignore",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"accept",name:"accept",pkg:"text/template/parse",typ:$funcType([$String],[$Bool],false)},{prop:"acceptRun",name:"acceptRun",pkg:"text/template/parse",typ:$funcType([$String],[],false)},{prop:"lineNumber",name:"lineNumber",pkg:"text/template/parse",typ:$funcType([],[$Int],false)},{prop:"drain",name:"drain",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"run",name:"run",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"atTerminator",name:"atTerminator",pkg:"text/template/parse",typ:$funcType([],[$Bool],false)},{prop:"scanNumber",name:"scanNumber",pkg:"text/template/parse",typ:$funcType([],[$Bool],false)}];K.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AH.methods=[{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AH],false)}];AI.methods=[{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[AI],false)}];BR.methods=[{prop:"append",name:"append",pkg:"text/template/parse",typ:$funcType([AG],[],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"CopyList",name:"CopyList",pkg:"",typ:$funcType([],[BR],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CJ.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];BW.methods=[{prop:"append",name:"append",pkg:"text/template/parse",typ:$funcType([BU],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"CopyPipe",name:"CopyPipe",pkg:"",typ:$funcType([],[BW],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CF.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];BU.methods=[{prop:"append",name:"append",pkg:"text/template/parse",typ:$funcType([AG],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CM.methods=[{prop:"SetPos",name:"SetPos",pkg:"",typ:$funcType([AI],[CM],false)},{prop:"SetTree",name:"SetTree",pkg:"",typ:$funcType([BM],[CM],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];BS.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CN.methods=[{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CO.methods=[{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CP.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CQ.methods=[{prop:"Add",name:"Add",pkg:"",typ:$funcType([$String],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CR.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];BY.methods=[{prop:"simplifyComplex",name:"simplifyComplex",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CS.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CT.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CU.methods=[{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AH],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CV.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CG.methods=[{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CH.methods=[{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CK.methods=[{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];CI.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)}];BM.methods=[{prop:"newList",name:"newList",pkg:"text/template/parse",typ:$funcType([AI],[BR],false)},{prop:"newText",name:"newText",pkg:"text/template/parse",typ:$funcType([AI,$String],[CJ],false)},{prop:"newPipeline",name:"newPipeline",pkg:"text/template/parse",typ:$funcType([AI,$Int,BT],[BW],false)},{prop:"newAction",name:"newAction",pkg:"text/template/parse",typ:$funcType([AI,$Int,BW],[CF],false)},{prop:"newCommand",name:"newCommand",pkg:"text/template/parse",typ:$funcType([AI],[BU],false)},{prop:"newVariable",name:"newVariable",pkg:"text/template/parse",typ:$funcType([AI,$String],[BS],false)},{prop:"newDot",name:"newDot",pkg:"text/template/parse",typ:$funcType([AI],[CN],false)},{prop:"newNil",name:"newNil",pkg:"text/template/parse",typ:$funcType([AI],[CO],false)},{prop:"newField",name:"newField",pkg:"text/template/parse",typ:$funcType([AI,$String],[CP],false)},{prop:"newChain",name:"newChain",pkg:"text/template/parse",typ:$funcType([AI,AG],[CQ],false)},{prop:"newBool",name:"newBool",pkg:"text/template/parse",typ:$funcType([AI,$Bool],[CR],false)},{prop:"newNumber",name:"newNumber",pkg:"text/template/parse",typ:$funcType([AI,$String,L],[BY,$error],false)},{prop:"newString",name:"newString",pkg:"text/template/parse",typ:$funcType([AI,$String,$String],[CS],false)},{prop:"newEnd",name:"newEnd",pkg:"text/template/parse",typ:$funcType([AI],[CT],false)},{prop:"newElse",name:"newElse",pkg:"text/template/parse",typ:$funcType([AI,$Int],[CU],false)},{prop:"newIf",name:"newIf",pkg:"text/template/parse",typ:$funcType([AI,$Int,BW,BR,BR],[CG],false)},{prop:"newRange",name:"newRange",pkg:"text/template/parse",typ:$funcType([AI,$Int,BW,BR,BR],[CH],false)},{prop:"newWith",name:"newWith",pkg:"text/template/parse",typ:$funcType([AI,$Int,BW,BR,BR],[CK],false)},{prop:"newTemplate",name:"newTemplate",pkg:"text/template/parse",typ:$funcType([AI,$Int,$String,BW],[CI],false)},{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[BM],false)},{prop:"next",name:"next",pkg:"text/template/parse",typ:$funcType([],[K],false)},{prop:"backup",name:"backup",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"backup2",name:"backup2",pkg:"text/template/parse",typ:$funcType([K],[],false)},{prop:"backup3",name:"backup3",pkg:"text/template/parse",typ:$funcType([K,K],[],false)},{prop:"peek",name:"peek",pkg:"text/template/parse",typ:$funcType([],[K],false)},{prop:"nextNonSpace",name:"nextNonSpace",pkg:"text/template/parse",typ:$funcType([],[K],false)},{prop:"peekNonSpace",name:"peekNonSpace",pkg:"text/template/parse",typ:$funcType([],[K],false)},{prop:"ErrorContext",name:"ErrorContext",pkg:"",typ:$funcType([AG],[$String,$String],false)},{prop:"errorf",name:"errorf",pkg:"text/template/parse",typ:$funcType([$String,BL],[],true)},{prop:"error",name:"error",pkg:"text/template/parse",typ:$funcType([$error],[],false)},{prop:"expect",name:"expect",pkg:"text/template/parse",typ:$funcType([L,$String],[K],false)},{prop:"expectOneOf",name:"expectOneOf",pkg:"text/template/parse",typ:$funcType([L,L,$String],[K],false)},{prop:"unexpected",name:"unexpected",pkg:"text/template/parse",typ:$funcType([K,$String],[],false)},{prop:"recover",name:"recover",pkg:"text/template/parse",typ:$funcType([CE],[],false)},{prop:"startParse",name:"startParse",pkg:"text/template/parse",typ:$funcType([CB,CC],[],false)},{prop:"stopParse",name:"stopParse",pkg:"text/template/parse",typ:$funcType([],[],false)},{prop:"Parse",name:"Parse",pkg:"",typ:$funcType([$String,$String,$String,CW,CB],[BM,$error],true)},{prop:"add",name:"add",pkg:"text/template/parse",typ:$funcType([CW],[],false)},{prop:"parse",name:"parse",pkg:"text/template/parse",typ:$funcType([CW],[AG],false)},{prop:"parseDefinition",name:"parseDefinition",pkg:"text/template/parse",typ:$funcType([CW],[],false)},{prop:"itemList",name:"itemList",pkg:"text/template/parse",typ:$funcType([],[BR,AG],false)},{prop:"textOrAction",name:"textOrAction",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"action",name:"action",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"pipeline",name:"pipeline",pkg:"text/template/parse",typ:$funcType([$String],[BW],false)},{prop:"checkPipeline",name:"checkPipeline",pkg:"text/template/parse",typ:$funcType([BW,$String],[],false)},{prop:"parseControl",name:"parseControl",pkg:"text/template/parse",typ:$funcType([$Bool,$String],[AI,$Int,BW,BR,BR],false)},{prop:"ifControl",name:"ifControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"rangeControl",name:"rangeControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"withControl",name:"withControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"endControl",name:"endControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"elseControl",name:"elseControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"templateControl",name:"templateControl",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"command",name:"command",pkg:"text/template/parse",typ:$funcType([],[BU],false)},{prop:"operand",name:"operand",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"term",name:"term",pkg:"text/template/parse",typ:$funcType([],[AG],false)},{prop:"hasFunction",name:"hasFunction",pkg:"text/template/parse",typ:$funcType([$String],[$Bool],false)},{prop:"popVars",name:"popVars",pkg:"text/template/parse",typ:$funcType([$Int],[],false)},{prop:"useVar",name:"useVar",pkg:"text/template/parse",typ:$funcType([AI,$String],[AG],false)}];I.init([{prop:"name",name:"name",pkg:"text/template/parse",typ:$String,tag:""},{prop:"input",name:"input",pkg:"text/template/parse",typ:$String,tag:""},{prop:"leftDelim",name:"leftDelim",pkg:"text/template/parse",typ:$String,tag:""},{prop:"rightDelim",name:"rightDelim",pkg:"text/template/parse",typ:$String,tag:""},{prop:"state",name:"state",pkg:"text/template/parse",typ:N,tag:""},{prop:"pos",name:"pos",pkg:"text/template/parse",typ:AI,tag:""},{prop:"start",name:"start",pkg:"text/template/parse",typ:AI,tag:""},{prop:"width",name:"width",pkg:"text/template/parse",typ:AI,tag:""},{prop:"lastPos",name:"lastPos",pkg:"text/template/parse",typ:AI,tag:""},{prop:"items",name:"items",pkg:"text/template/parse",typ:CL,tag:""},{prop:"parenDepth",name:"parenDepth",pkg:"text/template/parse",typ:$Int,tag:""},{prop:"itemsList",name:"itemsList",pkg:"text/template/parse",typ:BK,tag:""}]);K.init([{prop:"typ",name:"typ",pkg:"text/template/parse",typ:L,tag:""},{prop:"pos",name:"pos",pkg:"text/template/parse",typ:AI,tag:""},{prop:"val",name:"val",pkg:"text/template/parse",typ:$String,tag:""}]);N.init([CC],[N],false);AG.init([{prop:"Copy",name:"Copy",pkg:"",typ:$funcType([],[AG],false)},{prop:"Position",name:"Position",pkg:"",typ:$funcType([],[AI],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Type",name:"Type",pkg:"",typ:$funcType([],[AH],false)},{prop:"tree",name:"tree",pkg:"text/template/parse",typ:$funcType([],[BM],false)}]);AJ.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Nodes",name:"Nodes",pkg:"",typ:BN,tag:""}]);AK.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Text",name:"Text",pkg:"",typ:BO,tag:""}]);AL.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""},{prop:"Decl",name:"Decl",pkg:"",typ:BT,tag:""},{prop:"Cmds",name:"Cmds",pkg:"",typ:BV,tag:""}]);AM.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""},{prop:"Pipe",name:"Pipe",pkg:"",typ:BW,tag:""}]);AN.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Args",name:"Args",pkg:"",typ:BN,tag:""}]);AO.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Ident",name:"Ident",pkg:"",typ:$String,tag:""}]);AQ.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Ident",name:"Ident",pkg:"",typ:BX,tag:""}]);AR.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""}]);AS.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""}]);AT.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Ident",name:"Ident",pkg:"",typ:BX,tag:""}]);AU.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Node",name:"Node",pkg:"",typ:AG,tag:""},{prop:"Field",name:"Field",pkg:"",typ:BX,tag:""}]);AV.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"True",name:"True",pkg:"",typ:$Bool,tag:""}]);AW.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"IsInt",name:"IsInt",pkg:"",typ:$Bool,tag:""},{prop:"IsUint",name:"IsUint",pkg:"",typ:$Bool,tag:""},{prop:"IsFloat",name:"IsFloat",pkg:"",typ:$Bool,tag:""},{prop:"IsComplex",name:"IsComplex",pkg:"",typ:$Bool,tag:""},{prop:"Int64",name:"Int64",pkg:"",typ:$Int64,tag:""},{prop:"Uint64",name:"Uint64",pkg:"",typ:$Uint64,tag:""},{prop:"Float64",name:"Float64",pkg:"",typ:$Float64,tag:""},{prop:"Complex128",name:"Complex128",pkg:"",typ:$Complex128,tag:""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:""}]);AX.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Quoted",name:"Quoted",pkg:"",typ:$String,tag:""},{prop:"Text",name:"Text",pkg:"",typ:$String,tag:""}]);AY.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""}]);AZ.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""}]);BA.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""},{prop:"Pipe",name:"Pipe",pkg:"",typ:BW,tag:""},{prop:"List",name:"List",pkg:"",typ:BR,tag:""},{prop:"ElseList",name:"ElseList",pkg:"",typ:BR,tag:""}]);BB.init([{prop:"BranchNode",name:"",pkg:"",typ:BA,tag:""}]);BC.init([{prop:"BranchNode",name:"",pkg:"",typ:BA,tag:""}]);BD.init([{prop:"BranchNode",name:"",pkg:"",typ:BA,tag:""}]);BE.init([{prop:"NodeType",name:"",pkg:"",typ:AH,tag:""},{prop:"Pos",name:"",pkg:"",typ:AI,tag:""},{prop:"tr",name:"tr",pkg:"text/template/parse",typ:BM,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Pipe",name:"Pipe",pkg:"",typ:BW,tag:""}]);BF.init([{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"ParseName",name:"ParseName",pkg:"",typ:$String,tag:""},{prop:"Root",name:"Root",pkg:"",typ:BR,tag:""},{prop:"text",name:"text",pkg:"text/template/parse",typ:$String,tag:""},{prop:"funcs",name:"funcs",pkg:"text/template/parse",typ:CB,tag:""},{prop:"lex",name:"lex",pkg:"text/template/parse",typ:CC,tag:""},{prop:"token",name:"token",pkg:"text/template/parse",typ:CD,tag:""},{prop:"peekCount",name:"peekCount",pkg:"text/template/parse",typ:$Int,tag:""},{prop:"vars",name:"vars",pkg:"text/template/parse",typ:BX,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=F.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}M=$makeMap($String.keyFor,[{k:".",v:21},{k:"define",v:22},{k:"else",v:23},{k:"end",v:24},{k:"if",v:25},{k:"range",v:27},{k:"nil",v:26},{k:"template",v:28},{k:"with",v:29}]);AF="%s";}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["text/template"]=(function(){var $pkg={},$init,A,I,B,C,M,J,N,D,E,F,G,O,H,K,L,P,Q,AB,AC,AD,AE,AF,AH,CH,CI,CJ,CK,CM,CN,CO,CP,CQ,CR,CS,CT,CU,CV,CW,CX,CY,CZ,DA,DB,DC,DD,DE,DF,DG,DH,DI,DJ,DK,DL,DM,DN,DO,DP,DQ,DR,DS,DT,DU,DV,DW,DX,DY,DZ,EA,EB,EC,ED,EE,EF,R,W,X,AI,AJ,AW,AX,AY,BH,BI,BJ,BK,BL,BP,BQ,BR,BS,BT,BU,BV,a,b,c,S,T,U,V,Y,Z,AA,AG,AK,AL,AM,AN,AO,AP,AQ,AR,AS,AT,AU,AV,BA,BB,BC,BD,BE,BF,BG,BM,BN,BO,BW,BX,BY,BZ,CA,CB,CE,CG,CL;A=$packages["bytes"];I=$packages["errors"];B=$packages["fmt"];C=$packages["io"];M=$packages["io/ioutil"];J=$packages["net/url"];N=$packages["path/filepath"];D=$packages["reflect"];E=$packages["runtime"];F=$packages["sort"];G=$packages["strings"];O=$packages["sync"];H=$packages["text/template/parse"];K=$packages["unicode"];L=$packages["unicode/utf8"];P=$pkg.state=$newType(0,$kindStruct,"template.state","state","text/template",function(tmpl_,wr_,node_,vars_){this.$val=this;if(arguments.length===0){this.tmpl=CZ.nil;this.wr=$ifaceNil;this.node=$ifaceNil;this.vars=DB.nil;return;}this.tmpl=tmpl_;this.wr=wr_;this.node=node_;this.vars=vars_;});Q=$pkg.variable=$newType(0,$kindStruct,"template.variable","variable","text/template",function(name_,value_){this.$val=this;if(arguments.length===0){this.name="";this.value=new D.Value.ptr(CM.nil,0,0);return;}this.name=name_;this.value=value_;});AB=$pkg.rvs=$newType(12,$kindSlice,"template.rvs","rvs","text/template",null);AC=$pkg.rvInts=$newType(0,$kindStruct,"template.rvInts","rvInts","text/template",function(rvs_){this.$val=this;if(arguments.length===0){this.rvs=AB.nil;return;}this.rvs=rvs_;});AD=$pkg.rvUints=$newType(0,$kindStruct,"template.rvUints","rvUints","text/template",function(rvs_){this.$val=this;if(arguments.length===0){this.rvs=AB.nil;return;}this.rvs=rvs_;});AE=$pkg.rvFloats=$newType(0,$kindStruct,"template.rvFloats","rvFloats","text/template",function(rvs_){this.$val=this;if(arguments.length===0){this.rvs=AB.nil;return;}this.rvs=rvs_;});AF=$pkg.rvStrings=$newType(0,$kindStruct,"template.rvStrings","rvStrings","text/template",function(rvs_){this.$val=this;if(arguments.length===0){this.rvs=AB.nil;return;}this.rvs=rvs_;});AH=$pkg.FuncMap=$newType(4,$kindMap,"template.FuncMap","FuncMap","text/template",null);CH=$pkg.missingKeyAction=$newType(4,$kindInt,"template.missingKeyAction","missingKeyAction","text/template",null);CI=$pkg.option=$newType(0,$kindStruct,"template.option","option","text/template",function(missingKey_){this.$val=this;if(arguments.length===0){this.missingKey=0;return;}this.missingKey=missingKey_;});CJ=$pkg.common=$newType(0,$kindStruct,"template.common","common","text/template",function(tmpl_,option_,muFuncs_,parseFuncs_,execFuncs_){this.$val=this;if(arguments.length===0){this.tmpl=false;this.option=new CI.ptr(0);this.muFuncs=new O.RWMutex.ptr(new O.Mutex.ptr(0,0),0,0,0,0);this.parseFuncs=false;this.execFuncs=false;return;}this.tmpl=tmpl_;this.option=option_;this.muFuncs=muFuncs_;this.parseFuncs=parseFuncs_;this.execFuncs=execFuncs_;});CK=$pkg.Template=$newType(0,$kindStruct,"template.Template","Template","text/template",function(name_,Tree_,common_,leftDelim_,rightDelim_){this.$val=this;if(arguments.length===0){this.name="";this.Tree=DC.nil;this.common=DA.nil;this.leftDelim="";this.rightDelim="";return;}this.name=name_;this.Tree=Tree_;this.common=common_;this.leftDelim=leftDelim_;this.rightDelim=rightDelim_;});CM=$ptrType(D.rtype);CN=$ptrType($error);CO=$ptrType(B.Stringer);CP=$sliceType($Uint8);CQ=$sliceType($emptyInterface);CR=$funcType([$emptyInterface,CQ],[$emptyInterface],true);CS=$funcType([$emptyInterface,CQ],[$emptyInterface,$error],true);CT=$funcType([CQ],[$String],true);CU=$funcType([$emptyInterface],[$Int,$error],false);CV=$funcType([$emptyInterface],[$Bool],false);CW=$funcType([$String,CQ],[$String],true);CX=$funcType([$emptyInterface,CQ],[$Bool,$error],true);CY=$funcType([$emptyInterface,$emptyInterface],[$Bool,$error],false);CZ=$ptrType(CK);DA=$ptrType(CJ);DB=$sliceType(Q);DC=$ptrType(H.Tree);DD=$ptrType(H.ListNode);DE=$arrayType($Uint8,4);DF=$arrayType($Uint8,64);DG=$ptrType(H.ActionNode);DH=$ptrType(H.IfNode);DI=$ptrType(H.RangeNode);DJ=$ptrType(H.TemplateNode);DK=$ptrType(H.TextNode);DL=$ptrType(H.WithNode);DM=$ptrType(H.PipeNode);DN=$ptrType(H.FieldNode);DO=$ptrType(H.ChainNode);DP=$ptrType(H.IdentifierNode);DQ=$ptrType(H.VariableNode);DR=$ptrType(H.BoolNode);DS=$ptrType(H.DotNode);DT=$ptrType(H.NilNode);DU=$ptrType(H.NumberNode);DV=$ptrType(H.StringNode);DW=$sliceType(H.Node);DX=$sliceType(D.Value);DY=$sliceType(CZ);DZ=$mapType($String,$emptyInterface);EA=$sliceType(DZ);EB=$ptrType(H.CommandNode);EC=$sliceType($String);ED=$ptrType(P);EE=$mapType($String,CZ);EF=$mapType($String,D.Value);P.ptr.prototype.push=function(d,e){var $ptr,d,e,f;e=e;f=this;f.vars=$append(f.vars,new Q.ptr(d,$clone(e,D.Value)));};P.prototype.push=function(d,e){return this.$val.push(d,e);};P.ptr.prototype.mark=function(){var $ptr,d;d=this;return d.vars.$length;};P.prototype.mark=function(){return this.$val.mark();};P.ptr.prototype.pop=function(d){var $ptr,d,e;e=this;e.vars=$subslice(e.vars,0,d);};P.prototype.pop=function(d){return this.$val.pop(d);};P.ptr.prototype.setVar=function(d,e){var $ptr,d,e,f,g,h;e=e;f=this;(g=f.vars,h=f.vars.$length-d>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])).value=e;};P.prototype.setVar=function(d,e){return this.$val.setVar(d,e);};P.ptr.prototype.varValue=function(d){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.mark()-1>>0;while(true){if(!(f>=0)){break;}if((g=e.vars,((f<0||f>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+f])).name===d){return(h=e.vars,((f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f])).value;}f=f-(1)>>0;}$r=e.errorf("undefined variable: %s",new CQ([new $String(d)]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return R;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.varValue};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.varValue=function(d){return this.$val.varValue(d);};P.ptr.prototype.at=function(d){var $ptr,d,e;e=this;e.node=d;};P.prototype.at=function(d){return this.$val.at(d);};S=function(d){var $ptr,d;if(G.Contains(d,"%")){d=G.Replace(d,"%","%%",-1);}return d;};P.ptr.prototype.errorf=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=S(f.tmpl.Name());if($interfaceIsEqual(f.node,$ifaceNil)){$s=1;continue;}$s=2;continue;case 1:h=B.Sprintf("template: %s: %s",new CQ([new $String(g),new $String(d)]));$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d=h;$s=3;continue;case 2:j=f.tmpl.Tree.ErrorContext(f.node);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];m=B.Sprintf("template: %s: executing %q at <%s>: %s",new CQ([new $String(k),new $String(g),new $String(S(l)),new $String(d)]));$s=6;case 6:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}d=m;case 3:n=B.Errorf(d,e);$s=7;case 7:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$panic(n);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.errorf};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.errorf=function(d,e){return this.$val.errorf(d,e);};T=function(d){var $ptr,d,e,f,g,h,i;e=$recover();if(!($interfaceIsEqual(e,$ifaceNil))){f=e;if($assertType(f,E.Error,true)[1]){g=f;$panic(e);}else if($assertType(f,$error,true)[1]){h=f;d.$set(h);}else{i=f;$panic(e);}}};CK.ptr.prototype.ExecuteTemplate=function(d,e,f){var $ptr,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=this;h=CZ.nil;if(!(g.common===DA.nil)){h=(i=g.common.tmpl[$String.keyFor(e)],i!==undefined?i.v:CZ.nil);}if(h===CZ.nil){$s=1;continue;}$s=2;continue;case 1:j=B.Errorf("template: no template %q associated with template %q",new CQ([new $String(e),new $String(g.name)]));$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 2:k=h.Execute(d,f);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:CK.ptr.prototype.ExecuteTemplate};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};CK.prototype.ExecuteTemplate=function(d,e,f){return this.$val.ExecuteTemplate(d,e,f);};CK.ptr.prototype.Execute=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);f=[f];f[0]=$ifaceNil;g=this;$deferred.push([T,[(f.$ptr||(f.$ptr=new CN(function(){return this.$target[0];},function($v){this.$target[0]=$v;},f)))]]);h=D.ValueOf(e);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=new P.ptr(g,d,$ifaceNil,new DB([new Q.ptr("$",$clone(i,D.Value))]));if(g.Tree===DC.nil||g.Tree.Root===DD.nil){$s=2;continue;}$s=3;continue;case 2:k=new $String(g.Name());l=g.DefinedTemplates();$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=new $String(l);$r=j.errorf("%q is an incomplete or empty template%s",new CQ([k,m]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$r=j.walk(i,g.Tree.Root);$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return f[0];}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if(!$curGoroutine.asleep){return f[0];}if($curGoroutine.asleep){if($f===undefined){$f={$blk:CK.ptr.prototype.Execute};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};CK.prototype.Execute=function(d,e){return this.$val.Execute(d,e);};CK.ptr.prototype.DefinedTemplates=function(){var $ptr,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=[d];e=this;if(e.common===DA.nil){return"";}d[0]=new A.Buffer.ptr(CP.nil,0,DE.zero(),DF.zero(),0);f=e.common.tmpl;g=0;h=$keys(f);case 1:if(!(g0){d[0].WriteString(", ");}l=B.Fprintf(d[0],"%q",new CQ([new $String(j)]));$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;g++;$s=1;continue;case 2:m="";if(d[0].Len()>0){m="; defined templates are: "+d[0].String();}return m;}return;}if($f===undefined){$f={$blk:CK.ptr.prototype.DefinedTemplates};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};CK.prototype.DefinedTemplates=function(){return this.$val.DefinedTemplates();};P.ptr.prototype.walk=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;f.at(e);g=e;if($assertType(g,DG,true)[1]){$s=1;continue;}if($assertType(g,DH,true)[1]){$s=2;continue;}if($assertType(g,DD,true)[1]){$s=3;continue;}if($assertType(g,DI,true)[1]){$s=4;continue;}if($assertType(g,DJ,true)[1]){$s=5;continue;}if($assertType(g,DK,true)[1]){$s=6;continue;}if($assertType(g,DL,true)[1]){$s=7;continue;}$s=8;continue;case 1:h=g.$val;i=f.evalPipeline(d,h.Pipe);$s=10;case 10:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(h.Pipe.Decl.$length===0){$s=11;continue;}$s=12;continue;case 11:$r=f.printValue(h,j);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 12:$s=9;continue;case 2:k=g.$val;$r=f.walkIfOrWith(10,d,k.BranchNode.Pipe,k.BranchNode.List,k.BranchNode.ElseList);$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=9;continue;case 3:l=g.$val;m=l.Nodes;n=0;case 15:if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]);$r=f.walk(d,o);$s=17;case 17:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}n++;$s=15;continue;case 16:$s=9;continue;case 4:p=g.$val;$r=f.walkRange(d,p);$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=9;continue;case 5:q=g.$val;$r=f.walkTemplate(d,q);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=9;continue;case 6:r=g.$val;t=f.wr.Write(r.Text);$s=20;case 20:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=t;u=s[1];if(!($interfaceIsEqual(u,$ifaceNil))){$s=21;continue;}$s=22;continue;case 21:$r=f.errorf("%s",new CQ([u]));$s=23;case 23:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 22:$s=9;continue;case 7:v=g.$val;$r=f.walkIfOrWith(19,d,v.BranchNode.Pipe,v.BranchNode.List,v.BranchNode.ElseList);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=9;continue;case 8:w=g;$r=f.errorf("unknown node: %s",new CQ([w]));$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 9:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.walk};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.walk=function(d,e){return this.$val.walk(d,e);};P.ptr.prototype.walkIfOrWith=function(d,e,f,g,h){var $ptr,d,e,f,g,h,i,j,k,l,m,n,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=e;i=this;$deferred.push([$methodVal(i,"pop"),[i.mark()]]);j=i.evalPipeline(e,f);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=U(k);m=l[0];n=l[1];if(!n){$s=2;continue;}$s=3;continue;case 2:$r=i.errorf("if/with can't use %v",new CQ([new k.constructor.elem(k)]));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:if(m){$s=5;continue;}if(!(h===DD.nil)){$s=6;continue;}$s=7;continue;case 5:if(d===19){$s=8;continue;}$s=9;continue;case 8:$r=i.walk(k,g);$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=10;continue;case 9:$r=i.walk(e,g);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 10:$s=7;continue;case 6:$r=i.walk(e,h);$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 7:$s=-1;case-1:}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:P.ptr.prototype.walkIfOrWith};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};P.prototype.walkIfOrWith=function(d,e,f,g,h){return this.$val.walkIfOrWith(d,e,f,g,h);};U=function(d){var $ptr,d,e,f,g,h,i,j,k,l,m,n;e=false;f=false;d=d;if(!d.IsValid()){g=false;h=true;e=g;f=h;return[e,f];}i=d.Kind();if(i===17||i===21||i===23||i===24){e=d.Len()>0;}else if(i===1){e=d.Bool();}else if(i===15||i===16){e=!((j=d.Complex(),(j.$real===0&&j.$imag===0)));}else if(i===18||i===19||i===22||i===20){e=!d.IsNil();}else if(i===2||i===3||i===4||i===5||i===6){e=!((k=d.Int(),(k.$high===0&&k.$low===0)));}else if(i===13||i===14){e=!((d.Float()===0));}else if(i===7||i===8||i===9||i===10||i===11||i===12){e=!((l=d.Uint(),(l.$high===0&&l.$low===0)));}else if(i===25){e=true;}else{return[e,f];}m=e;n=true;e=m;f=n;return[e,f];};P.ptr.prototype.walkRange=function(d,e){var $ptr,aa,ab,ac,ad,ae,af,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=[e];f=[f];g=[g];d=d;f[0]=this;f[0].at(e[0]);$deferred.push([$methodVal(f[0],"pop"),[f[0].mark()]]);i=f[0].evalPipeline(d,e[0].BranchNode.Pipe);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=Z(i);$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=j;k=h[0];g[0]=f[0].mark();l=(function(e,f,g){return function $b(l,m){var $ptr,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:m=m;l=l;if(e[0].BranchNode.Pipe.Decl.$length>0){f[0].setVar(1,m);}if(e[0].BranchNode.Pipe.Decl.$length>1){f[0].setVar(2,l);}$r=f[0].walk(m,e[0].BranchNode.List);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f[0].pop(g[0]);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};})(e,f,g);m=k.Kind();if(m===17||m===23){$s=3;continue;}if(m===21){$s=4;continue;}if(m===18){$s=5;continue;}if(m===0){$s=6;continue;}$s=7;continue;case 3:if(k.Len()===0){$s=8;continue;}n=0;case 9:if(!(n>0;$s=9;continue;case 10:return;case 4:if(k.Len()===0){$s=8;continue;}t=k.MapKeys();$s=14;case 14:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=AG(t);$s=15;case 15:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}s=u;v=0;case 16:if(!(v=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+v]);x=w;y=k.MapIndex(w);$s=18;case 18:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=y;$r=l(x,z);$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}v++;$s=16;continue;case 17:return;case 5:if(k.IsNil()){$s=8;continue;}aa=0;case 20:ac=k.Recv();$s=22;case 22:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ab=ac;ad=ab[0];ae=ab[1];if(!ae){$s=21;continue;}af=D.ValueOf(new $Int(aa));$s=23;case 23:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}$r=l(af,ad);$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}aa=aa+(1)>>0;$s=20;continue;case 21:if(aa===0){$s=8;continue;}return;case 6:$s=8;continue;$s=8;continue;case 7:$r=f[0].errorf("range can't iterate over %v",new CQ([new k.constructor.elem(k)]));$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:if(!(e[0].BranchNode.ElseList===DD.nil)){$s=26;continue;}$s=27;continue;case 26:$r=f[0].walk(d,e[0].BranchNode.ElseList);$s=28;case 28:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 27:$s=-1;case-1:}return;}}catch(err){$err=err;$s=-1;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:P.ptr.prototype.walkRange};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};P.prototype.walkRange=function(d,e){return this.$val.walkRange(d,e);};P.ptr.prototype.walkTemplate=function(d,e){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;f.at(e);h=(g=f.tmpl.common.tmpl[$String.keyFor(e.Name)],g!==undefined?g.v:CZ.nil);if(h===CZ.nil){$s=1;continue;}$s=2;continue;case 1:$r=f.errorf("template %q not defined",new CQ([new $String(e.Name)]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:i=f.evalPipeline(d,e.Pipe);$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}d=i;j=$clone(f,P);j.tmpl=h;j.vars=new DB([new Q.ptr("$",$clone(d,D.Value))]);$r=j.walk(d,h.Tree.Root);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.walkTemplate};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.walkTemplate=function(d,e){return this.$val.walkTemplate(d,e);};P.ptr.prototype.evalPipeline=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=new D.Value.ptr(CM.nil,0,0);d=d;g=this;if(e===DM.nil){return f;}g.at(e);h=e.Cmds;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=g.evalCommand(d,j,f);$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}f=k;if(!(f.Kind()===20)){l=false;$s=6;continue s;}m=f.Type().NumMethod();$s=7;case 7:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m===0;case 6:if(l){$s=4;continue;}$s=5;continue;case 4:n=f.Interface();$s=8;case 8:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=D.ValueOf(n);$s=9;case 9:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}f=o;case 5:i++;$s=1;continue;case 2:p=e.Decl;q=0;while(true){if(!(q=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]);g.push((s=r.Ident,(0>=s.$length?$throwRuntimeError("index out of range"):s.$array[s.$offset+0])),f);q++;}f=f;return f;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalPipeline};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalPipeline=function(d,e){return this.$val.evalPipeline(d,e);};P.ptr.prototype.notAFunction=function(d,e){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=e;f=this;if(d.$length>1||e.IsValid()){$s=1;continue;}$s=2;continue;case 1:$r=f.errorf("can't give argument to non-function %s",new CQ([(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.notAFunction};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.notAFunction=function(d,e){return this.$val.notAFunction(d,e);};P.ptr.prototype.evalCommand=function(d,e,f){var $ptr,aa,ab,ac,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=f;d=d;g=this;i=(h=e.Args,(0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]));j=i;if($assertType(j,DN,true)[1]){$s=1;continue;}if($assertType(j,DO,true)[1]){$s=2;continue;}if($assertType(j,DP,true)[1]){$s=3;continue;}if($assertType(j,DM,true)[1]){$s=4;continue;}if($assertType(j,DQ,true)[1]){$s=5;continue;}$s=6;continue;case 1:k=j.$val;l=g.evalFieldNode(d,k,e.Args,f);$s=7;case 7:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;case 2:m=j.$val;n=g.evalChainNode(d,m,e.Args,f);$s=8;case 8:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return n;case 3:o=j.$val;p=g.evalFunction(d,o,e,e.Args,f);$s=9;case 9:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p;case 4:q=j.$val;r=g.evalPipeline(d,q);$s=10;case 10:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return r;case 5:s=j.$val;t=g.evalVariableNode(d,s,e.Args,f);$s=11;case 11:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}return t;case 6:g.at(i);$r=g.notAFunction(e.Args,f);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}u=i;if($assertType(u,DR,true)[1]){$s=13;continue;}if($assertType(u,DS,true)[1]){$s=14;continue;}if($assertType(u,DT,true)[1]){$s=15;continue;}if($assertType(u,DU,true)[1]){$s=16;continue;}if($assertType(u,DV,true)[1]){$s=17;continue;}$s=18;continue;case 13:v=u.$val;w=D.ValueOf(new $Bool(v.True));$s=19;case 19:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}return w;case 14:x=u.$val;return d;case 15:y=u.$val;$r=g.errorf("nil is not a command",new CQ([]));$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=18;continue;case 16:z=u.$val;aa=g.idealConstant(z);$s=21;case 21:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}return aa;case 17:ab=u.$val;ac=D.ValueOf(new $String(ab.Text));$s=22;case 22:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}return ac;case 18:$r=g.errorf("can't evaluate command %q",new CQ([i]));$s=23;case 23:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalCommand};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalCommand=function(d,e,f){return this.$val.evalCommand(d,e,f);};P.ptr.prototype.idealConstant=function(d){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;e.at(d);if(d.IsComplex){$s=1;continue;}if(d.IsFloat&&!V(d.Text)&&G.IndexAny(d.Text,".eE")>=0){$s=2;continue;}if(d.IsInt){$s=3;continue;}if(d.IsUint){$s=4;continue;}$s=5;continue;case 1:f=D.ValueOf(d.Complex128);$s=6;case 6:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;case 2:g=D.ValueOf(new $Float64(d.Float64));$s=7;case 7:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;case 3:i=((h=d.Int64,h.$low+((h.$high>>31)*4294967296))>>0);if(!((j=new $Int64(0,i),k=d.Int64,(j.$high===k.$high&&j.$low===k.$low)))){$s=8;continue;}$s=9;continue;case 8:$r=e.errorf("%s overflows int",new CQ([new $String(d.Text)]));$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 9:l=D.ValueOf(new $Int(i));$s=11;case 11:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;case 4:$r=e.errorf("%s overflows int",new CQ([new $String(d.Text)]));$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:return R;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.idealConstant};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.idealConstant=function(d){return this.$val.idealConstant(d);};V=function(d){var $ptr,d;return d.length>2&&(d.charCodeAt(0)===48)&&((d.charCodeAt(1)===120)||(d.charCodeAt(1)===88));};P.ptr.prototype.evalFieldNode=function(d,e,f,g){var $ptr,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=g;d=d;h=this;h.at(e);i=h.evalFieldChain(d,d,e,e.Ident,f,g);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalFieldNode};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalFieldNode=function(d,e,f,g){return this.$val.evalFieldNode(d,e,f,g);};P.ptr.prototype.evalChainNode=function(d,e,f,g){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=g;d=d;h=this;h.at(e);if(e.Field.$length===0){$s=1;continue;}$s=2;continue;case 1:$r=h.errorf("internal error: no fields in evalChainNode",new CQ([]));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:i=e.Node.Type();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(i===12){$s=4;continue;}$s=5;continue;case 4:$r=h.errorf("indirection through explicit nil in %s",new CQ([e]));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:j=h.evalArg(d,$ifaceNil,e.Node);$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=h.evalFieldChain(d,k,e,e.Field,f,g);$s=9;case 9:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalChainNode};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalChainNode=function(d,e,f,g){return this.$val.evalChainNode(d,e,f,g);};P.ptr.prototype.evalVariableNode=function(d,e,f,g){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=g;d=d;h=this;h.at(e);j=h.varValue((i=e.Ident,(0>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+0])));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(e.Ident.$length===1){$s=2;continue;}$s=3;continue;case 2:$r=h.notAFunction(f,g);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return k;case 3:l=h.evalFieldChain(d,k,e,$subslice(e.Ident,1),f,g);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalVariableNode};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalVariableNode=function(d,e,f,g){return this.$val.evalVariableNode(d,e,f,g);};P.ptr.prototype.evalFieldChain=function(d,e,f,g,h,i){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=i;e=e;d=d;j=this;k=g.$length;l=0;case 1:if(!(l<(k-1>>0))){$s=2;continue;}m=j.evalField(d,((l<0||l>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+l]),f,DW.nil,R,e);$s=3;case 3:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}e=m;l=l+(1)>>0;$s=1;continue;case 2:o=j.evalField(d,(n=k-1>>0,((n<0||n>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+n])),f,h,i,e);$s=4;case 4:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}return o;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalFieldChain};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalFieldChain=function(d,e,f,g,h,i){return this.$val.evalFieldChain(d,e,f,g,h,i);};P.ptr.prototype.evalFunction=function(d,e,f,g,h){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=h;d=d;i=this;i.at(e);j=e.Ident;l=AO(j,i.tmpl);$s=1;case 1:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[0];n=k[1];if(!n){$s=2;continue;}$s=3;continue;case 2:$r=i.errorf("%q is not a defined function",new CQ([new $String(j)]));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:o=i.evalCall(d,m,f,j,g,h);$s=5;case 5:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}return o;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalFunction};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalFunction=function(d,e,f,g,h){return this.$val.evalFunction(d,e,f,g,h);};P.ptr.prototype.evalField=function(d,e,f,g,h,i){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=i;h=h;d=d;j=this;if(!i.IsValid()){return R;}k=i.Type();m=Z(i);$s=1;case 1:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;i=l[0];n=i;if(!((n.Kind()===20))&&n.CanAddr()){n=n.Addr();}o=n.MethodByName(e);if(o.IsValid()){$s=2;continue;}$s=3;continue;case 2:p=j.evalCall(d,o,f,e,g,h);$s=4;case 4:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p;case 3:q=g.$length>1||h.IsValid();s=Z(i);$s=5;case 5:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;i=r[0];t=r[1];if(t){$s=6;continue;}$s=7;continue;case 6:$r=j.errorf("nil pointer evaluating %s.%s",new CQ([k,new $String(e)]));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 7:u=i.Kind();if(u===25){$s=9;continue;}if(u===21){$s=10;continue;}$s=11;continue;case 9:w=i.Type().FieldByName(e);$s=12;case 12:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}v=w;x=$clone(v[0],D.StructField);y=v[1];if(y){$s=13;continue;}$s=14;continue;case 13:z=i.FieldByIndex(x.Index);$s=15;case 15:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}aa=z;if(!(x.PkgPath==="")){$s=16;continue;}$s=17;continue;case 16:$r=j.errorf("%s is an unexported field of struct type %s",new CQ([new $String(e),k]));$s=18;case 18:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 17:if(q){$s=19;continue;}$s=20;continue;case 19:$r=j.errorf("%s has arguments but cannot be invoked as function",new CQ([new $String(e)]));$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 20:return aa;case 14:$r=j.errorf("%s is not a field of struct type %s",new CQ([new $String(e),k]));$s=22;case 22:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=11;continue;case 10:ab=D.ValueOf(new $String(e));$s=23;case 23:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;ad=i.Type().Key();$s=26;case 26:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ae=ac.Type().AssignableTo(ad);$s=27;case 27:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(ae){$s=24;continue;}$s=25;continue;case 24:if(q){$s=28;continue;}$s=29;continue;case 28:$r=j.errorf("%s is not a method but has arguments",new CQ([new $String(e)]));$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 29:af=i.MapIndex(ac);$s=31;case 31:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=af;if(!ag.IsValid()){$s=32;continue;}$s=33;continue;case 32:ah=j.tmpl.common.option.missingKey;if(ah===0){$s=34;continue;}if(ah===1){$s=35;continue;}if(ah===2){$s=36;continue;}$s=37;continue;case 34:$s=37;continue;case 35:ai=i.Type().Elem();$s=38;case 38:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}aj=D.Zero(ai);$s=39;case 39:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}ag=aj;$s=37;continue;case 36:$r=j.errorf("map has no entry for key %q",new CQ([new $String(e)]));$s=40;case 40:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 37:case 33:return ag;case 25:case 11:$r=j.errorf("can't evaluate field %s in type %s",new CQ([new $String(e),k]));$s=41;case 41:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalField};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalField=function(d,e,f,g,h,i){return this.$val.evalField(d,e,f,g,h,i);};P.ptr.prototype.evalCall=function(d,e,f,g,h,i){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=i;e=e;d=d;j=this;if(!(h===DW.nil)){h=$subslice(h,1);}k=e.Type();l=h.$length;if(i.IsValid()){l=l+(1)>>0;}m=h.$length;n=k.IsVariadic();$s=4;case 4:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(n){$s=1;continue;}p=k.NumIn();$s=6;case 6:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}if(l<(p-1>>0)){o=true;$s=5;continue s;}r=k.IsVariadic();$s=8;case 8:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(!(!r)){q=false;$s=7;continue s;}s=k.NumIn();$s=9;case 9:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}q=!((l===s));case 7:o=q;case 5:if(o){$s=2;continue;}$s=3;continue;case 1:t=k.NumIn();$s=10;case 10:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}m=t-1>>0;if(l>0));x=new $Int(h.$length);$r=j.errorf("wrong number of args for %s: want at least %d got %d",new CQ([u,w,x]));$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 12:$s=3;continue;case 2:y=new $String(g);z=k.NumIn();$s=15;case 15:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}aa=new $Int(z);ab=new $Int(h.$length);$r=j.errorf("wrong number of args for %s: want %d got %d",new CQ([y,aa,ab]));$s=16;case 16:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:ac=AN(k);$s=19;case 19:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}if(!ac){$s=17;continue;}$s=18;continue;case 17:ad=new $String(g);ae=k.NumOut();$s=20;case 20:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}af=new $Int(ae);$r=j.errorf("can't call method/function %q with %d results",new CQ([ad,af]));$s=21;case 21:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 18:ag=$makeSlice(DX,l);ah=0;case 22:if(!(ah=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+ah]);am=j.evalArg(ai,ak,al);$s=25;case 25:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}((ah<0||ah>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]=am);ah=ah+(1)>>0;$s=22;continue;case 23:an=k.IsVariadic();$s=28;case 28:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}if(an){$s=26;continue;}$s=27;continue;case 26:ao=k.NumIn();$s=29;case 29:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}ap=k.In(ao-1>>0);$s=30;case 30:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}aq=ap.Elem();$s=31;case 31:if($c){$c=false;aq=aq.$blk();}if(aq&&aq.$blk!==undefined){break s;}ar=aq;case 32:if(!(ah=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+ah]));$s=34;case 34:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}((ah<0||ah>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]=as);ah=ah+(1)>>0;$s=32;continue;case 33:case 27:if(i.IsValid()){$s=35;continue;}$s=36;continue;case 35:at=k.NumIn();$s=37;case 37:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}au=k.In(at-1>>0);$s=38;case 38:if($c){$c=false;au=au.$blk();}if(au&&au.$blk!==undefined){break s;}av=au;aw=k.IsVariadic();$s=41;case 41:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}if(aw){$s=39;continue;}$s=40;continue;case 39:if((l-1>>0)>0);$s=45;case 45:if($c){$c=false;ax=ax.$blk();}if(ax&&ax.$blk!==undefined){break s;}av=ax;$s=44;continue;case 43:ay=av.Elem();$s=46;case 46:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}av=ay;case 44:case 40:az=j.validateType(i,av);$s=47;case 47:if($c){$c=false;az=az.$blk();}if(az&&az.$blk!==undefined){break s;}((ah<0||ah>=ag.$length)?$throwRuntimeError("index out of range"):ag.$array[ag.$offset+ah]=az);case 36:ba=e.Call(ag);$s=48;case 48:if($c){$c=false;ba=ba.$blk();}if(ba&&ba.$blk!==undefined){break s;}bb=ba;if((bb.$length===2)&&!(1>=bb.$length?$throwRuntimeError("index out of range"):bb.$array[bb.$offset+1]).IsNil()){$s=49;continue;}$s=50;continue;case 49:j.at(f);bc=new $String(g);bd=(1>=bb.$length?$throwRuntimeError("index out of range"):bb.$array[bb.$offset+1]).Interface();$s=51;case 51:if($c){$c=false;bd=bd.$blk();}if(bd&&bd.$blk!==undefined){break s;}be=$assertType(bd,$error);$r=j.errorf("error calling %s: %s",new CQ([bc,be]));$s=52;case 52:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 50:return(0>=bb.$length?$throwRuntimeError("index out of range"):bb.$array[bb.$offset+0]);}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalCall};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalCall=function(d,e,f,g,h,i){return this.$val.evalCall(d,e,f,g,h,i);};Y=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=d.Kind();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;if(e===18||e===19||e===20||e===21||e===22||e===23){$s=2;continue;}$s=3;continue;case 2:return true;case 3:return false;}return;}if($f===undefined){$f={$blk:Y};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};P.ptr.prototype.validateType=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;if(!d.IsValid()){$s=1;continue;}$s=2;continue;case 1:if($interfaceIsEqual(e,$ifaceNil)){g=true;$s=5;continue s;}h=Y(e);$s=6;case 6:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;case 5:if(g){$s=3;continue;}$s=4;continue;case 3:i=D.Zero(e);$s=7;case 7:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;case 4:$r=f.errorf("invalid value; expected %s",new CQ([e]));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:if(!(!($interfaceIsEqual(e,$ifaceNil)))){j=false;$s=11;continue s;}k=d.Type().AssignableTo(e);$s=12;case 12:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=!k;case 11:if(j){$s=9;continue;}$s=10;continue;case 9:if((d.Kind()===20)&&!d.IsNil()){$s=13;continue;}$s=14;continue;case 13:l=d.Elem();$s=15;case 15:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}d=l;m=d.Type().AssignableTo(e);$s=18;case 18:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}if(m){$s=16;continue;}$s=17;continue;case 16:return d;case 17:case 14:if(!(d.Kind()===22)){n=false;$s=23;continue s;}o=d.Type().Elem();$s=24;case 24:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o.AssignableTo(e);$s=25;case 25:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}n=p;case 23:if(n){$s=19;continue;}q=D.PtrTo(d.Type()).AssignableTo(e);$s=26;case 26:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}if(q&&d.CanAddr()){$s=20;continue;}$s=21;continue;case 19:r=d.Elem();$s=27;case 27:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}d=r;if(!d.IsValid()){$s=28;continue;}$s=29;continue;case 28:$r=f.errorf("dereference of nil pointer of type %s",new CQ([e]));$s=30;case 30:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 29:$s=22;continue;case 20:d=d.Addr();$s=22;continue;case 21:$r=f.errorf("wrong type for value; expected %s; got %s",new CQ([e,d.Type()]));$s=31;case 31:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 22:case 10:return d;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.validateType};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.validateType=function(d,e){return this.$val.validateType(d,e);};P.ptr.prototype.evalArg=function(d,e,f){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;g=this;g.at(f);h=f;if($assertType(h,DS,true)[1]){$s=1;continue;}if($assertType(h,DT,true)[1]){$s=2;continue;}if($assertType(h,DN,true)[1]){$s=3;continue;}if($assertType(h,DQ,true)[1]){$s=4;continue;}if($assertType(h,DM,true)[1]){$s=5;continue;}if($assertType(h,DP,true)[1]){$s=6;continue;}if($assertType(h,DO,true)[1]){$s=7;continue;}$s=8;continue;case 1:i=h.$val;j=g.validateType(d,e);$s=9;case 9:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 2:k=h.$val;l=Y(e);$s=12;case 12:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){$s=10;continue;}$s=11;continue;case 10:m=D.Zero(e);$s=13;case 13:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}return m;case 11:$r=g.errorf("cannot assign nil to %s",new CQ([e]));$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=8;continue;case 3:n=h.$val;o=g.evalFieldNode(d,n,new DW([f]),R);$s=15;case 15:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=g.validateType(o,e);$s=16;case 16:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p;case 4:q=h.$val;r=g.evalVariableNode(d,q,DW.nil,R);$s=17;case 17:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}s=g.validateType(r,e);$s=18;case 18:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}return s;case 5:t=h.$val;u=g.evalPipeline(d,t);$s=19;case 19:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}v=g.validateType(u,e);$s=20;case 20:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}return v;case 6:w=h.$val;x=g.evalFunction(d,w,w,DW.nil,R);$s=21;case 21:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=g.validateType(x,e);$s=22;case 22:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}return y;case 7:z=h.$val;aa=g.evalChainNode(d,z,DW.nil,R);$s=23;case 23:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}ab=g.validateType(aa,e);$s=24;case 24:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}return ab;case 8:ad=e.Kind();$s=25;case 25:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ac=ad;if(ac===1){$s=26;continue;}if(ac===15||ac===16){$s=27;continue;}if(ac===13||ac===14){$s=28;continue;}if(ac===2||ac===3||ac===4||ac===5||ac===6){$s=29;continue;}if(ac===20){$s=30;continue;}if(ac===24){$s=31;continue;}if(ac===7||ac===8||ac===9||ac===10||ac===11||ac===12){$s=32;continue;}$s=33;continue;case 26:ae=g.evalBool(e,f);$s=34;case 34:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}return ae;case 27:af=g.evalComplex(e,f);$s=35;case 35:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}return af;case 28:ag=g.evalFloat(e,f);$s=36;case 36:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}return ag;case 29:ah=g.evalInteger(e,f);$s=37;case 37:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}return ah;case 30:ai=e.NumMethod();$s=40;case 40:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}if(ai===0){$s=38;continue;}$s=39;continue;case 38:aj=g.evalEmptyInterface(d,f);$s=41;case 41:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}return aj;case 39:$s=33;continue;case 31:ak=g.evalString(e,f);$s=42;case 42:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}return ak;case 32:al=g.evalUnsignedInteger(e,f);$s=43;case 43:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}return al;case 33:$r=g.errorf("can't handle %s for arg of type %s",new CQ([f,e]));$s=44;case 44:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalArg};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalArg=function(d,e,f){return this.$val.evalArg(d,e,f);};P.ptr.prototype.evalBool=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;f.at(e);g=$assertType(e,DR,true);h=g[0];i=g[1];if(i){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetBool(h.True);return l;case 2:$r=f.errorf("expected bool; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalBool};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalBool=function(d,e){return this.$val.evalBool(d,e);};P.ptr.prototype.evalString=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;f.at(e);g=$assertType(e,DV,true);h=g[0];i=g[1];if(i){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetString(h.Text);return l;case 2:$r=f.errorf("expected string; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalString};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalString=function(d,e){return this.$val.evalString(d,e);};P.ptr.prototype.evalInteger=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;f.at(e);g=$assertType(e,DU,true);h=g[0];i=g[1];if(i&&h.IsInt){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetInt(h.Int64);return l;case 2:$r=f.errorf("expected integer; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalInteger};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalInteger=function(d,e){return this.$val.evalInteger(d,e);};P.ptr.prototype.evalUnsignedInteger=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;f.at(e);g=$assertType(e,DU,true);h=g[0];i=g[1];if(i&&h.IsUint){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetUint(h.Uint64);return l;case 2:$r=f.errorf("expected unsigned integer; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalUnsignedInteger};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalUnsignedInteger=function(d,e){return this.$val.evalUnsignedInteger(d,e);};P.ptr.prototype.evalFloat=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;f.at(e);g=$assertType(e,DU,true);h=g[0];i=g[1];if(i&&h.IsFloat){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetFloat(h.Float64);return l;case 2:$r=f.errorf("expected float; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalFloat};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalFloat=function(d,e){return this.$val.evalFloat(d,e);};P.ptr.prototype.evalComplex=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=$assertType(e,DU,true);h=g[0];i=g[1];if(i&&h.IsComplex){$s=1;continue;}$s=2;continue;case 1:j=D.New(d);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j.Elem();$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;l.SetComplex(h.Complex128);return l;case 2:$r=f.errorf("expected complex; found %s",new CQ([e]));$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalComplex};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalComplex=function(d,e){return this.$val.evalComplex(d,e);};P.ptr.prototype.evalEmptyInterface=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;f=this;f.at(e);g=e;if($assertType(g,DR,true)[1]){$s=1;continue;}if($assertType(g,DS,true)[1]){$s=2;continue;}if($assertType(g,DN,true)[1]){$s=3;continue;}if($assertType(g,DP,true)[1]){$s=4;continue;}if($assertType(g,DT,true)[1]){$s=5;continue;}if($assertType(g,DU,true)[1]){$s=6;continue;}if($assertType(g,DV,true)[1]){$s=7;continue;}if($assertType(g,DQ,true)[1]){$s=8;continue;}if($assertType(g,DM,true)[1]){$s=9;continue;}$s=10;continue;case 1:h=g.$val;i=D.ValueOf(new $Bool(h.True));$s=11;case 11:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;case 2:j=g.$val;return d;case 3:k=g.$val;l=f.evalFieldNode(d,k,DW.nil,R);$s=12;case 12:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;case 4:m=g.$val;n=f.evalFunction(d,m,m,DW.nil,R);$s=13;case 13:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return n;case 5:o=g.$val;$r=f.errorf("evalEmptyInterface: nil (can't happen)",new CQ([]));$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=10;continue;case 6:p=g.$val;q=f.idealConstant(p);$s=15;case 15:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}return q;case 7:r=g.$val;s=D.ValueOf(new $String(r.Text));$s=16;case 16:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}return s;case 8:t=g.$val;u=f.evalVariableNode(d,t,DW.nil,R);$s=17;case 17:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}return u;case 9:v=g.$val;w=f.evalPipeline(d,v);$s=18;case 18:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}return w;case 10:$r=f.errorf("can't handle assignment of %s to empty interface argument",new CQ([e]));$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$panic(new $String("not reached"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.evalEmptyInterface};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.evalEmptyInterface=function(d,e){return this.$val.evalEmptyInterface(d,e);};Z=function(d){var $ptr,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=new D.Value.ptr(CM.nil,0,0);f=false;d=d;case 1:if(!((d.Kind()===22)||(d.Kind()===20))){$s=2;continue;}if(d.IsNil()){g=d;h=true;e=g;f=h;return[e,f];}if((d.Kind()===20)&&d.NumMethod()>0){$s=2;continue;}i=d.Elem();$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}d=i;$s=1;continue;case 2:j=d;k=false;e=j;f=k;return[e,f];}return;}if($f===undefined){$f={$blk:Z};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};P.ptr.prototype.printValue=function(d,e){var $ptr,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=e;f=this;f.at(d);h=AA(e);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];if(!j){$s=2;continue;}$s=3;continue;case 2:$r=f.errorf("can't print %s of type %s",new CQ([d,e.Type()]));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:k=B.Fprint(f.wr,new CQ([i]));$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:P.ptr.prototype.printValue};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.printValue=function(d,e){return this.$val.printValue(d,e);};AA=function(d){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=d;if(d.Kind()===22){$s=1;continue;}$s=2;continue;case 1:f=Z(d);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}e=f;d=e[0];case 2:if(!d.IsValid()){return[new $String(""),true];}h=d.Type().Implements(W);$s=7;case 7:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(!(!h)){g=false;$s=6;continue s;}i=d.Type().Implements(X);$s=8;case 8:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}g=!i;case 6:if(g){$s=4;continue;}$s=5;continue;case 4:if(!(d.CanAddr())){j=false;$s=12;continue s;}l=D.PtrTo(d.Type()).Implements(W);$s=14;case 14:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){k=true;$s=13;continue s;}m=D.PtrTo(d.Type()).Implements(X);$s=15;case 15:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}k=m;case 13:j=k;case 12:if(j){$s=9;continue;}$s=10;continue;case 9:d=d.Addr();$s=11;continue;case 10:n=d.Kind();if(n===18||n===19){return[$ifaceNil,false];}case 11:case 5:o=d.Interface();$s=16;case 16:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}return[o,true];}return;}if($f===undefined){$f={$blk:AA};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};AB.prototype.Len=function(){var $ptr,d;d=this;return d.$length;};$ptrType(AB).prototype.Len=function(){return this.$get().Len();};AB.prototype.Swap=function(d,e){var $ptr,d,e,f,g,h;f=this;g=((e<0||e>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e]);h=((d<0||d>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+d]);((d<0||d>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+d]=g);((e<0||e>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e]=h);};$ptrType(AB).prototype.Swap=function(d,e){return this.$get().Swap(d,e);};AC.ptr.prototype.Less=function(d,e){var $ptr,d,e,f,g,h,i,j;f=$clone(this,AC);return(g=(h=f.rvs,((d<0||d>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+d])).Int(),i=(j=f.rvs,((e<0||e>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+e])).Int(),(g.$high=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+d])).Uint(),i=(j=f.rvs,((e<0||e>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+e])).Uint(),(g.$high=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+d])).Float()<(h=f.rvs,((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e])).Float();};AE.prototype.Less=function(d,e){return this.$val.Less(d,e);};AF.ptr.prototype.Less=function(d,e){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=$clone(this,AF);h=(g=f.rvs,((d<0||d>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+d])).String();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}j=(i=f.rvs,((e<0||e>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+e])).String();$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return h=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]).Kind();if(e===13||e===14){$s=1;continue;}if(e===2||e===3||e===4||e===5||e===6){$s=2;continue;}if(e===24){$s=3;continue;}if(e===7||e===8||e===9||e===10||e===11||e===12){$s=4;continue;}$s=5;continue;case 1:$r=F.Sort((f=new AE.ptr($subslice(new AB(d.$array),d.$offset,d.$offset+d.$length)),new f.constructor.elem(f)));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 2:$r=F.Sort((g=new AC.ptr($subslice(new AB(d.$array),d.$offset,d.$offset+d.$length)),new g.constructor.elem(g)));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 3:$r=F.Sort((h=new AF.ptr($subslice(new AB(d.$array),d.$offset,d.$offset+d.$length)),new h.constructor.elem(h)));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=5;continue;case 4:$r=F.Sort((i=new AD.ptr($subslice(new AB(d.$array),d.$offset,d.$offset+d.$length)),new i.constructor.elem(i)));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 5:return d;}return;}if($f===undefined){$f={$blk:AG};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};AK=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e={};$r=AL(e,d);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:AK};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AL=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=e;g=0;h=$keys(f);case 1:if(!(g=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=D.ValueOf(j);$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;m=false;o=Z(g);$s=5;case 5:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;g=n[0];m=n[1];if(m){$s=6;continue;}$s=7;continue;case 6:p=B.Errorf("index of nil pointer",new CQ([]));$s=8;case 8:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return[$ifaceNil,p];case 7:q=g.Kind();if(q===17||q===23||q===24){$s=9;continue;}if(q===21){$s=10;continue;}$s=11;continue;case 9:r=new $Int64(0,0);s=l.Kind();if(s===2||s===3||s===4||s===5||s===6){$s=13;continue;}if(s===7||s===8||s===9||s===10||s===11||s===12){$s=14;continue;}$s=15;continue;case 13:r=l.Int();$s=16;continue;case 14:r=(t=l.Uint(),new $Int64(t.$high,t.$low));$s=16;continue;case 15:u=B.Errorf("cannot index slice/array with type %s",new CQ([l.Type()]));$s=17;case 17:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}return[$ifaceNil,u];case 16:if((r.$high<0||(r.$high===0&&r.$low<0))||(v=new $Int64(0,g.Len()),(r.$high>v.$high||(r.$high===v.$high&&r.$low>=v.$low)))){$s=18;continue;}$s=19;continue;case 18:w=B.Errorf("index out of range: %d",new CQ([r]));$s=20;case 20:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}return[$ifaceNil,w];case 19:x=g.Index(((r.$low+((r.$high>>31)*4294967296))>>0));$s=21;case 21:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}g=x;$s=12;continue;case 10:if(!l.IsValid()){$s=22;continue;}$s=23;continue;case 22:y=g.Type().Key();$s=24;case 24:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=D.Zero(y);$s=25;case 25:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}l=z;case 23:aa=g.Type().Key();$s=28;case 28:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}ab=l.Type().AssignableTo(aa);$s=29;case 29:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}if(!ab){$s=26;continue;}$s=27;continue;case 26:ac=B.Errorf("%s is not index type for %s",new CQ([l.Type(),g.Type()]));$s=30;case 30:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}return[$ifaceNil,ac];case 27:ad=g.MapIndex(l);$s=31;case 31:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ae=ad;if(ae.IsValid()){$s=32;continue;}$s=33;continue;case 32:g=ae;$s=34;continue;case 33:af=g.Type().Elem();$s=35;case 35:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ag=D.Zero(af);$s=36;case 36:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}g=ag;case 34:$s=12;continue;case 11:ah=B.Errorf("can't index item of type %s",new CQ([g.Type()]));$s=37;case 37:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}return[$ifaceNil,ah];case 12:i++;$s=2;continue;case 3:ai=g.Interface();$s=38;case 38:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}return[ai,$ifaceNil];}return;}if($f===undefined){$f={$blk:AP};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AQ=function(d){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.ValueOf(d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=Z(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=g;h=e[0];i=e[1];if(i){$s=3;continue;}$s=4;continue;case 3:j=B.Errorf("len of nil pointer",new CQ([]));$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return[0,j];case 4:k=h.Kind();if(k===17||k===18||k===21||k===23||k===24){return[h.Len(),$ifaceNil];}l=B.Errorf("len of type %s",new CQ([h.Type()]));$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return[0,l];}return;}if($f===undefined){$f={$blk:AQ};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};AR=function(d,e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.ValueOf(d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=g.Type();i=h.Kind();$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!((i===19))){$s=2;continue;}$s=3;continue;case 2:j=B.Errorf("non-function of type %s",new CQ([h]));$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return[$ifaceNil,j];case 3:k=AN(h);$s=8;case 8:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}if(!k){$s=6;continue;}$s=7;continue;case 6:l=h.NumOut();$s=9;case 9:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=new $Int(l);n=B.Errorf("function called with %d args; should be 1 or 2",new CQ([m]));$s=10;case 10:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return[$ifaceNil,n];case 7:o=h.NumIn();$s=11;case 11:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=$ifaceNil;r=h.IsVariadic();$s=15;case 15:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}if(r){$s=12;continue;}$s=13;continue;case 12:if(e.$length<(p-1>>0)){$s=16;continue;}$s=17;continue;case 16:s=B.Errorf("wrong number of args: got %d want at least %d",new CQ([new $Int(e.$length),new $Int((p-1>>0))]));$s=18;case 18:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}return[$ifaceNil,s];case 17:t=h.In(p-1>>0);$s=19;case 19:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}u=t.Elem();$s=20;case 20:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}q=u;$s=14;continue;case 13:if(!((e.$length===p))){$s=21;continue;}$s=22;continue;case 21:v=B.Errorf("wrong number of args: got %d want %d",new CQ([new $Int(e.$length),new $Int(p)]));$s=23;case 23:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}return[$ifaceNil,v];case 22:case 14:w=$makeSlice(DX,e.$length);x=e;y=0;case 24:if(!(y=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]);ab=D.ValueOf(aa);$s=26;case 26:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;ad=$ifaceNil;ae=h.IsVariadic();$s=30;case 30:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}if(!ae||z<(p-1>>0)){$s=27;continue;}$s=28;continue;case 27:af=h.In(z);$s=31;case 31:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ad=af;$s=29;continue;case 28:ad=q;case 29:if(!(!ac.IsValid())){ag=false;$s=34;continue s;}ah=Y(ad);$s=35;case 35:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ag=ah;case 34:if(ag){$s=32;continue;}$s=33;continue;case 32:ai=D.Zero(ad);$s=36;case 36:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ac=ai;case 33:aj=ac.Type().AssignableTo(ad);$s=39;case 39:if($c){$c=false;aj=aj.$blk();}if(aj&&aj.$blk!==undefined){break s;}if(!aj){$s=37;continue;}$s=38;continue;case 37:ak=B.Errorf("arg %d has type %s; should be %s",new CQ([new $Int(z),ac.Type(),ad]));$s=40;case 40:if($c){$c=false;ak=ak.$blk();}if(ak&&ak.$blk!==undefined){break s;}return[$ifaceNil,ak];case 38:((z<0||z>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+z]=ac);y++;$s=24;continue;case 25:al=g.Call(w);$s=41;case 41:if($c){$c=false;al=al.$blk();}if(al&&al.$blk!==undefined){break s;}am=al;if((am.$length===2)&&!(1>=am.$length?$throwRuntimeError("index out of range"):am.$array[am.$offset+1]).IsNil()){$s=42;continue;}$s=43;continue;case 42:an=(0>=am.$length?$throwRuntimeError("index out of range"):am.$array[am.$offset+0]).Interface();$s=44;case 44:if($c){$c=false;an=an.$blk();}if(an&&an.$blk!==undefined){break s;}ao=(1>=am.$length?$throwRuntimeError("index out of range"):am.$array[am.$offset+1]).Interface();$s=45;case 45:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}return[an,$assertType(ao,$error)];case 43:ap=(0>=am.$length?$throwRuntimeError("index out of range"):am.$array[am.$offset+0]).Interface();$s=46;case 46:if($c){$c=false;ap=ap.$blk();}if(ap&&ap.$blk!==undefined){break s;}return[ap,$ifaceNil];}return;}if($f===undefined){$f={$blk:AR};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};AS=function(d){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.ValueOf(d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=U(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=g;h=e[0];return h;}return;}if($f===undefined){$f={$blk:AS};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AT=function(d,e){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AS(d);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!f){$s=1;continue;}$s=2;continue;case 1:return d;case 2:g=e;h=0;case 4:if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i]);j=AS(d);$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(!j){$s=6;continue;}$s=7;continue;case 6:$s=5;continue;case 7:h++;$s=4;continue;case 5:return d;}return;}if($f===undefined){$f={$blk:AT};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AU=function(d,e){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=AS(d);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f){$s=1;continue;}$s=2;continue;case 1:return d;case 2:g=e;h=0;case 4:if(!(h=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i]);j=AS(d);$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}if(j){$s=6;continue;}$s=7;continue;case 6:$s=5;continue;case 7:h++;$s=4;continue;case 5:return d;}return;}if($f===undefined){$f={$blk:AU};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AV=function(d){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=false;g=D.ValueOf(d);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=U(g);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}f=h;e=f[0];e=!e;return e;}return;}if($f===undefined){$f={$blk:AV};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};BA=function(d){var $ptr,d,e;d=d;e=d.Kind();if(e===1){return[1,$ifaceNil];}else if(e===2||e===3||e===4||e===5||e===6){return[3,$ifaceNil];}else if(e===7||e===8||e===9||e===10||e===11||e===12){return[7,$ifaceNil];}else if(e===13||e===14){return[4,$ifaceNil];}else if(e===15||e===16){return[2,$ifaceNil];}else if(e===24){return[6,$ifaceNil];}return[0,AW];};BB=function(d,e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.ValueOf(d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=BA(g);i=h[0];j=h[1];if(!($interfaceIsEqual(j,$ifaceNil))){return[false,j];}if(e.$length===0){return[false,AY];}k=e;l=0;case 2:if(!(l=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);n=D.ValueOf(m);$s=4;case 4:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n;p=BA(o);q=p[0];r=p[1];if(!($interfaceIsEqual(r,$ifaceNil))){return[false,r];}s=false;if(!((i===q))){$s=5;continue;}$s=6;continue;case 5:if((i===3)&&(q===7)){s=(t=g.Int(),(t.$high>0||(t.$high===0&&t.$low>=0)))&&(u=(v=g.Int(),new $Uint64(v.$high,v.$low)),w=o.Uint(),(u.$high===w.$high&&u.$low===w.$low));}else if((i===7)&&(q===3)){s=(x=o.Int(),(x.$high>0||(x.$high===0&&x.$low>=0)))&&(y=g.Uint(),z=(aa=o.Int(),new $Uint64(aa.$high,aa.$low)),(y.$high===z.$high&&y.$low===z.$low));}else{return[false,AX];}$s=7;continue;case 6:ab=i;if(ab===1){$s=8;continue;}if(ab===2){$s=9;continue;}if(ab===4){$s=10;continue;}if(ab===3){$s=11;continue;}if(ab===6){$s=12;continue;}if(ab===7){$s=13;continue;}$s=14;continue;case 8:s=g.Bool()===o.Bool();$s=15;continue;case 9:s=(ac=g.Complex(),ad=o.Complex(),(ac.$real===ad.$real&&ac.$imag===ad.$imag));$s=15;continue;case 10:s=g.Float()===o.Float();$s=15;continue;case 11:s=(ae=g.Int(),af=o.Int(),(ae.$high===af.$high&&ae.$low===af.$low));$s=15;continue;case 12:ag=g.String();$s=16;case 16:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}ah=o.String();$s=17;case 17:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}s=ag===ah;$s=15;continue;case 13:s=(ai=g.Uint(),aj=o.Uint(),(ai.$high===aj.$high&&ai.$low===aj.$low));$s=15;continue;case 14:$panic(new $String("invalid kind"));case 15:case 7:if(s){return[true,$ifaceNil];}l++;$s=2;continue;case 3:return[false,$ifaceNil];}return;}if($f===undefined){$f={$blk:BB};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BC=function(d,e){var $ptr,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=BB(d,new CQ([e]));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];return[!h,i];}return;}if($f===undefined){$f={$blk:BC};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};BD=function(d,e){var $ptr,aa,ab,ac,ad,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.ValueOf(d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;h=BA(g);i=h[0];j=h[1];if(!($interfaceIsEqual(j,$ifaceNil))){return[false,j];}k=D.ValueOf(e);$s=2;case 2:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;m=BA(l);n=m[0];j=m[1];if(!($interfaceIsEqual(j,$ifaceNil))){return[false,j];}o=false;if(!((i===n))){$s=3;continue;}$s=4;continue;case 3:if((i===3)&&(n===7)){o=(p=g.Int(),(p.$high<0||(p.$high===0&&p.$low<0)))||(q=(r=g.Int(),new $Uint64(r.$high,r.$low)),s=l.Uint(),(q.$high0||(t.$high===0&&t.$low>=0)))&&(u=g.Uint(),v=(w=l.Int(),new $Uint64(w.$high,w.$low)),(u.$high=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);k=CP.nil;l=j;if(l===34){$s=3;continue;}if(l===39){$s=4;continue;}if(l===38){$s=5;continue;}if(l===60){$s=6;continue;}if(l===62){$s=7;continue;}$s=8;continue;case 3:k=BH;$s=9;continue;case 4:k=BI;$s=9;continue;case 5:k=BJ;$s=9;continue;case 6:k=BK;$s=9;continue;case 7:k=BL;$s=9;continue;case 8:h++;$s=1;continue;case 9:m=d.Write($subslice(e,f,i));$s=10;case 10:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;n=d.Write(k);$s=11;case 11:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;f=i+1>>0;h++;$s=1;continue;case 2:o=d.Write($subslice(e,f));$s=12;case 12:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BM};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};$pkg.HTMLEscape=BM;BN=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=[e];if(G.IndexAny(d,"'\"&<>")<0){return d;}e[0]=new A.Buffer.ptr(CP.nil,0,DE.zero(),DF.zero(),0);$r=BM(e[0],new CP($stringToBytes(d)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e[0].String();}return;}if($f===undefined){$f={$blk:BN};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$pkg.HTMLEscapeString=BN;BO=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=CB(d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=BN(e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BO};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.HTMLEscaper=BO;BW=function(d,e){var $ptr,aa,ab,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=0;g=0;case 1:if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]);if(!BY((h>>0))){$s=3;continue;}$s=4;continue;case 3:g=g+(1)>>0;$s=1;continue;case 4:i=d.Write($subslice(e,f,g));$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}i;if(h<128){$s=6;continue;}$s=7;continue;case 6:j=h;if(j===92){$s=9;continue;}if(j===39){$s=10;continue;}if(j===34){$s=11;continue;}if(j===60){$s=12;continue;}if(j===62){$s=13;continue;}$s=14;continue;case 9:k=d.Write(BR);$s=16;case 16:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}k;$s=15;continue;case 10:l=d.Write(BS);$s=17;case 17:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}l;$s=15;continue;case 11:m=d.Write(BT);$s=18;case 18:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}m;$s=15;continue;case 12:n=d.Write(BU);$s=19;case 19:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}n;$s=15;continue;case 13:o=d.Write(BV);$s=20;case 20:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}o;$s=15;continue;case 14:p=d.Write(BP);$s=21;case 21:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}p;q=h>>>4<<24>>>24;r=(h&15)>>>0;s=q;t=r;u=d.Write($subslice(BQ,s,(s+1<<24>>>24)));$s=22;case 22:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}u;v=d.Write($subslice(BQ,t,(t+1<<24>>>24)));$s=23;case 23:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}v;case 15:$s=8;continue;case 7:w=L.DecodeRune($subslice(e,g));x=w[0];y=w[1];if(K.IsPrint(x)){$s=24;continue;}$s=25;continue;case 24:z=d.Write($subslice(e,g,(g+y>>0)));$s=27;case 27:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}z;$s=26;continue;case 25:aa=B.Fprintf(d,"\\u%04X",new CQ([new $Int32(x)]));$s=28;case 28:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}aa;case 26:g=g+((y-1>>0))>>0;case 8:f=g+1>>0;g=g+(1)>>0;$s=1;continue;case 2:ab=d.Write($subslice(e,f));$s=29;case 29:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ab;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BW};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$pkg.JSEscape=BW;BX=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=[e];f=G.IndexFunc(d,BY);$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(f<0){$s=1;continue;}$s=2;continue;case 1:return d;case 2:e[0]=new A.Buffer.ptr(CP.nil,0,DE.zero(),DF.zero(),0);$r=BW(e[0],new CP($stringToBytes(d)));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e[0].String();}return;}if($f===undefined){$f={$blk:BX};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.JSEscapeString=BX;BY=function(d){var $ptr,d,e;e=d;if(e===92||e===39||e===34||e===60||e===62){return true;}return d<32||128<=d;};BZ=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=CB(d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=BX(e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:BZ};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.JSEscaper=BZ;CA=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=CB(d);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=J.QueryEscape(e);$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:CA};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.URLQueryEscaper=CA;CB=function(d){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=false;f="";if(d.$length===1){g=$assertType((0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),$String,true);f=g[0];e=g[1];}if(!e){$s=1;continue;}$s=2;continue;case 1:h=d;i=0;case 3:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);m=D.ValueOf(k);$s=5;case 5:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=AA(m);$s=6;case 6:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}l=n;o=l[0];p=l[1];if(p){((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j]=o);}i++;$s=3;continue;case 4:q=B.Sprint(d);$s=7;case 7:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}f=q;case 2:return f;}return;}if($f===undefined){$f={$blk:CB};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};CK.ptr.prototype.ParseFiles=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;e.init();f=CE(e,d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:CK.ptr.prototype.ParseFiles};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};CK.prototype.ParseFiles=function(d){return this.$val.ParseFiles(d);};CE=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(e.$length===0){$s=1;continue;}$s=2;continue;case 1:f=B.Errorf("template: no files named in call to ParseFiles",new CQ([]));$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return[CZ.nil,f];case 2:g=e;h=0;case 4:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);k=M.ReadFile(i);$s=6;case 6:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=j[0];m=j[1];if(!($interfaceIsEqual(m,$ifaceNil))){return[CZ.nil,m];}n=$bytesToString(l);o=N.Base(i);p=CZ.nil;if(d===CZ.nil){d=CL(o);}if(o===d.Name()){p=d;}else{p=d.New(o);}r=p.Parse(n);$s=7;case 7:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;m=q[1];if(!($interfaceIsEqual(m,$ifaceNil))){return[CZ.nil,m];}h++;$s=4;continue;case 5:return[d,$ifaceNil];}return;}if($f===undefined){$f={$blk:CE};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};CK.ptr.prototype.ParseGlob=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;e.init();f=CG(e,d);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:CK.ptr.prototype.ParseGlob};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};CK.prototype.ParseGlob=function(d){return this.$val.ParseGlob(d);};CG=function(d,e){var $ptr,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=N.Glob(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(!($interfaceIsEqual(i,$ifaceNil))){return[CZ.nil,i];}if(h.$length===0){$s=2;continue;}$s=3;continue;case 2:j=B.Errorf("template: pattern matches no files: %#q",new CQ([new $String(e)]));$s=4;case 4:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return[CZ.nil,j];case 3:k=CE(d,h);$s=5;case 5:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:CG};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};CK.ptr.prototype.Option=function(d){var $ptr,d,e,f,g,h;e=this;e.init();f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);e.setOption(h);g++;}return e;};CK.prototype.Option=function(d){return this.$val.Option(d);};CK.ptr.prototype.setOption=function(d){var $ptr,d,e,f,g,h,i;e=this;if(d===""){$panic(new $String("empty option string"));}f=G.Split(d,"=");g=f.$length;if(g===2){h=(0>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]);if(h==="missingkey"){i=(1>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+1]);if(i==="invalid"||i==="default"){e.common.option.missingKey=0;return;}else if(i==="zero"){e.common.option.missingKey=1;return;}else if(i==="error"){e.common.option.missingKey=2;return;}}}$panic(new $String("unrecognized option: "+d));};CK.prototype.setOption=function(d){return this.$val.setOption(d);};CL=function(d){var $ptr,d,e;e=new CK.ptr(d,DC.nil,DA.nil,"","");e.init();return e;};$pkg.New=CL;CK.ptr.prototype.Name=function(){var $ptr,d;d=this;return d.name;};CK.prototype.Name=function(){return this.$val.Name();};CK.ptr.prototype.New=function(d){var $ptr,d,e,f;e=this;e.init();f=new CK.ptr(d,DC.nil,e.common,e.leftDelim,e.rightDelim);return f;};CK.prototype.New=function(d){return this.$val.New(d);};CK.ptr.prototype.init=function(){var $ptr,d,e;d=this;if(d.common===DA.nil){e=new CJ.ptr(false,new CI.ptr(0),new O.RWMutex.ptr(new O.Mutex.ptr(0,0),0,0,0,0),false,false);e.tmpl={};e.parseFuncs={};e.execFuncs={};d.common=e;}};CK.prototype.init=function(){return this.$val.init();};CK.ptr.prototype.Clone=function(){var $ptr,aa,ab,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);d=this;e=d.copy(DA.nil);e.init();if(d.common===DA.nil){return[e,$ifaceNil];}f=d.common.tmpl;g=0;h=$keys(f);case 1:if(!(g>0));}}h=(i=O[$String.keyFor(e)],i!==undefined?[i.v,true]:[0,false]);j=h[0];k=h[1];if(k){return j;}if(A.HasPrefix(e,"on")){return 4;}if(A.Contains(e,"src")||A.Contains(e,"uri")||A.Contains(e,"url")){return 6;}return 0;}return;}if($f===undefined){$f={$blk:P};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};X=function(e){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if($interfaceIsEqual(e,$ifaceNil)){return $ifaceNil;}f=C.TypeOf(e);g=f.Kind();$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}if(!((g===22))){$s=1;continue;}$s=2;continue;case 1:return e;case 2:h=C.ValueOf(e);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;case 5:if(!((i.Kind()===22)&&!i.IsNil())){$s=6;continue;}j=i.Elem();$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;$s=5;continue;case 6:k=i.Interface();$s=8;case 8:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:X};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AA=function(e){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if($interfaceIsEqual(e,$ifaceNil)){return $ifaceNil;}f=C.ValueOf(e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;case 2:i=g.Type().Implements(Z);$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}if(!(!i)){h=false;$s=4;continue s;}j=g.Type().Implements(Y);$s=6;case 6:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=!j;case 4:if(!(h&&(g.Kind()===22)&&!g.IsNil())){$s=3;continue;}k=g.Elem();$s=7;case 7:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}g=k;$s=2;continue;case 3:l=g.Interface();$s=8;case 8:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:AA};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};AB=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(e.$length===1){$s=1;continue;}$s=2;continue;case 1:g=X((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;if($assertType(f,$String,true)[1]){$s=4;continue;}if($assertType(f,Q,true)[1]){$s=5;continue;}if($assertType(f,R,true)[1]){$s=6;continue;}if($assertType(f,S,true)[1]){$s=7;continue;}if($assertType(f,T,true)[1]){$s=8;continue;}if($assertType(f,U,true)[1]){$s=9;continue;}if($assertType(f,V,true)[1]){$s=10;continue;}$s=11;continue;case 4:h=f.$val;return[h,0];case 5:i=f.$val;return[i,1];case 6:j=f.$val;return[j,2];case 7:k=f.$val;return[k,3];case 8:l=f.$val;return[l,4];case 9:m=f.$val;return[m,5];case 10:n=f.$val;return[n,6];case 11:case 2:o=e;p=0;case 12:if(!(p=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]);s=AA(r);$s=14;case 14:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}((q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]=s);p++;$s=12;continue;case 13:t=B.Sprint(e);$s=15;case 15:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}return[t,0];}return;}if($f===undefined){$f={$blk:AB};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};AC.ptr.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(this,AC);f=B.Sprintf("{%v %v %v %v %v %v %v}",new FA([new AD(e.state),new AH(e.delim),new AJ(e.urlPart),new AL(e.jsCtx),new AO(e.attr),new AM(e.element),e.err]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AC.ptr.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AC.prototype.String=function(){return this.$val.String();};AC.ptr.prototype.eq=function(e){var $ptr,e,f;e=$clone(e,AC);f=$clone(this,AC);return(f.state===e.state)&&(f.delim===e.delim)&&(f.urlPart===e.urlPart)&&(f.jsCtx===e.jsCtx)&&(f.attr===e.attr)&&(f.element===e.element)&&f.err===e.err;};AC.prototype.eq=function(e){return this.$val.eq(e);};AC.ptr.prototype.mangle=function(e){var $ptr,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=$clone(this,AC);if(f.state===0){return e;}g=new AD(f.state).String();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=e+"$htmltemplate_"+g;if(!((f.delim===0))){$s=2;continue;}$s=3;continue;case 2:i=new AH(f.delim).String();$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=h+("_"+i);case 3:if(!((f.urlPart===0))){$s=5;continue;}$s=6;continue;case 5:j=new AJ(f.urlPart).String();$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=h+("_"+j);case 6:if(!((f.jsCtx===0))){$s=8;continue;}$s=9;continue;case 8:k=new AL(f.jsCtx).String();$s=10;case 10:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}h=h+("_"+k);case 9:if(!((f.attr===0))){$s=11;continue;}$s=12;continue;case 11:l=new AO(f.attr).String();$s=13;case 13:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}h=h+("_"+l);case 12:if(!((f.element===0))){$s=14;continue;}$s=15;continue;case 14:m=new AM(f.element).String();$s=16;case 16:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}h=h+("_"+m);case 15:return h;}return;}if($f===undefined){$f={$blk:AC.ptr.prototype.mangle};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};AC.prototype.mangle=function(e){return this.$val.mangle(e);};AD.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;if((e>>0)<24){return((e<0||e>=AE.length)?$throwRuntimeError("index out of range"):AE[e]);}f=B.Sprintf("illegal state %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AD.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AD).prototype.String=function(){return new AD(this.$get()).String();};AF=function(e){var $ptr,e,f;f=e;if(f===5||f===13||f===14||f===21||f===22){return true;}return false;};AG=function(e){var $ptr,e,f;f=e;if(f===1||f===2||f===3||f===4||f===7){return true;}return false;};AH.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;if((e>>0)<4){return((e<0||e>=AI.length)?$throwRuntimeError("index out of range"):AI[e]);}f=B.Sprintf("illegal delim %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AH.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AH).prototype.String=function(){return new AH(this.$get()).String();};AJ.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;if((e>>0)<4){return((e<0||e>=AK.length)?$throwRuntimeError("index out of range"):AK[e]);}f=B.Sprintf("illegal urlPart %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AJ.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AJ).prototype.String=function(){return new AJ(this.$get()).String();};AL.prototype.String=function(){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;f=e;if(f===0){return"jsCtxRegexp";}else if(f===1){return"jsCtxDivOp";}else if(f===2){return"jsCtxUnknown";}g=B.Sprintf("illegal jsCtx %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AL.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AL).prototype.String=function(){return new AL(this.$get()).String();};AM.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;if((e>>0)<5){return((e<0||e>=AN.length)?$throwRuntimeError("index out of range"):AN[e]);}f=B.Sprintf("illegal element %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AM.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AM).prototype.String=function(){return new AM(this.$get()).String();};AO.prototype.String=function(){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this.$val;if((e>>0)<4){return((e<0||e>=AP.length)?$throwRuntimeError("index out of range"):AP[e]);}f=B.Sprintf("illegal attr %d",new FA([new $Int((e>>0))]));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:AO.prototype.String};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AO).prototype.String=function(){return new AO(this.$get()).String();};AQ=function(e,f){var $ptr,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=e.$length-f.length>>0;if(g<0){return false;}if(!((g===0))){h=F.DecodeLastRune($subslice(e,0,g));i=h[0];if(AR(i)){return false;}}j=D.ToLower($subslice(e,g));$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return $bytesToString(j)===f;}return;}if($f===undefined){$f={$blk:AQ};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};AR=function(e){var $ptr,e;return 97<=e&&e<=122||65<=e&&e<=90||48<=e&&e<=57||(e===45)||(e===95)||128<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111;};AS=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=D.IndexByte(e,92);if(f===-1){return e;}g=$makeSlice(EY,0,e.$length);case 1:if(!(!((e.$length===0)))){$s=2;continue;}h=D.IndexByte(e,92);if(h===-1){h=e.$length;}i=$appendSlice(g,$subslice(e,0,h));j=$subslice(e,h);g=i;e=j;if(e.$length<2){$s=2;continue;}if(AT((1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))){$s=3;continue;}$s=4;continue;case 3:k=2;while(true){if(!(k=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k])))){break;}k=k+(1)>>0;}l=AU($subslice(e,1,k));$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(m>1114111){n=(o=m/16,(o===o&&o!==1/0&&o!==-1/0)?o>>0:$throwRuntimeError("integer divide by zero"));p=k-1>>0;m=n;k=p;}q=F.EncodeRune($subslice(g,g.$length,g.$capacity),m);r=$subslice(g,0,(g.$length+q>>0));s=AV($subslice(e,k));g=r;e=s;$s=5;continue;case 4:t=F.DecodeRune($subslice(e,1));u=t[1];v=$appendSlice(g,$subslice(e,1,(1+u>>0)));w=$subslice(e,(1+u>>0));g=v;e=w;case 5:$s=1;continue;case 2:return g;}return;}if($f===undefined){$f={$blk:AS};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};AT=function(e){var $ptr,e;return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70;};AU=function(e){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=0;g=e;h=0;case 1:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]);f=(j=(4),j<32?(f<>0;if(48<=i&&i<=57){$s=3;continue;}if(97<=i&&i<=102){$s=4;continue;}if(65<=i&&i<=70){$s=5;continue;}$s=6;continue;case 3:f=f|(((i-48<<24>>>24)>>0));$s=7;continue;case 4:f=f|((((i-97<<24>>>24)>>0)+10>>0));$s=7;continue;case 5:f=f|((((i-65<<24>>>24)>>0)+10>>0));$s=7;continue;case 6:k=B.Sprintf("Bad hex digit in %q",new FA([e]));$s=8;case 8:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$panic(new $String(k));case 7:h++;$s=1;continue;case 2:return f;}return;}if($f===undefined){$f={$blk:AU};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AV=function(e){var $ptr,e,f;if(e.$length===0){return e;}f=(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]);if(f===9||f===10||f===12||f===32){return $subslice(e,1);}else if(f===13){if(e.$length>=2&&((1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])===10)){return $subslice(e,2);}return $subslice(e,1);}return e;};AW=function(e){var $ptr,e,f;f=e;if(f===9||f===10||f===12||f===13||f===32){return true;}return false;};AX=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=new D.Buffer.ptr(EY.nil,0,FC.zero(),FD.zero(),0);j=0;k=0;l=0;m=j;n=k;o=l;p=0;while(true){if(!(p>0)=AY.$length)?$throwRuntimeError("index out of range"):AY.$array[AY.$offset+m])==="")){r=((m<0||m>=AY.$length)?$throwRuntimeError("index out of range"):AY.$array[AY.$offset+m]);}else{p=p+(n)>>0;continue;}i.WriteString(h.substring(o,p));i.WriteString(r);o=p+n>>0;if(!(r==="\\\\")&&((o===h.length)||AT(h.charCodeAt(o))||AW(h.charCodeAt(o)))){i.WriteByte(32);}p=p+(n)>>0;}if(o===0){return h;}i.WriteString(h.substring(o));return i.String();}return;}if($f===undefined){$f={$blk:AX};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};BB=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(i===1){return h;}k=AS(new EY($stringToBytes(h)));$s=2;case 2:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}j=k;l=$makeSlice(EY,0,64);m=j;n=l;o=m;p=0;while(true){if(!(p=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]);s=r;if(s===0||s===34||s===39||s===40||s===41||s===47||s===59||s===64||s===91||s===92||s===93||s===96||s===123||s===125){return"ZgotmplZ";}else if(s===45){if(!((q===0))&&((t=q-1>>0,((t<0||t>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+t]))===45)){return"ZgotmplZ";}}else{if(r<128&&AR((r>>0))){n=$append(n,r);}}p++;}u=D.ToLower(n);$s=3;case 3:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}n=u;if(!((D.Index(n,AZ)===-1))||!((D.Index(n,BA)===-1))){return"ZgotmplZ";}return $bytesToString(m);}return;}if($f===undefined){$f={$blk:BB};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};BC.ptr.prototype.Error=function(){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;if(!($interfaceIsEqual(e.Node,$ifaceNil))){$s=1;continue;}if(!((e.Line===0))){$s=2;continue;}if(!(e.Name==="")){$s=3;continue;}$s=4;continue;case 1:g=FE.nil.ErrorContext(e.Node);$s=5;case 5:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=B.Sprintf("html/template:%s: %s",new FA([new $String(h),new $String(e.Description)]));$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return i;case 2:j=B.Sprintf("html/template:%s:%d: %s",new FA([new $String(e.Name),new $Int(e.Line),new $String(e.Description)]));$s=7;case 7:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 3:k=B.Sprintf("html/template:%s: %s",new FA([new $String(e.Name),new $String(e.Description)]));$s=8;case 8:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;case 4:return"html/template: "+e.Description;}return;}if($f===undefined){$f={$blk:BC.ptr.prototype.Error};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BC.prototype.Error=function(){return this.$val.Error();};BE=function(e,f,g,h,i){var $ptr,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:j=B.Sprintf(h,i);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return new BC.ptr(e,f,"",g,j);}return;}if($f===undefined){$f={$blk:BE};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};BF=function(e,f,g){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=BJ(e);j=h.escapeTree(new AC.ptr(0,0,0,0,0,0,FF.nil),f,g,0);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=$clone(i[0],AC);l=$ifaceNil;if(!(k.err===FF.nil)){$s=2;continue;}if(!((k.state===0))){$s=3;continue;}$s=4;continue;case 2:m=k.err;n=g;l=m;k.err.Name=n;$s=4;continue;case 3:o=B.Sprintf("ends in a non-text context: %v",new FA([new k.constructor.elem(k)]));$s=5;case 5:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}l=new BC.ptr(4,$ifaceNil,g,0,o);case 4:if(!($interfaceIsEqual(l,$ifaceNil))){q=(p=e.nameSpace.set[$String.keyFor(g)],p!==undefined?p.v:FG.nil);if(!(q===FG.nil)){q.escapeErr=l;q.text.Tree=FE.nil;q.Tree=FE.nil;}return l;}$r=h.commit();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}s=(r=e.nameSpace.set[$String.keyFor(g)],r!==undefined?r.v:FG.nil);if(!(s===FG.nil)){s.escapeErr=DC;s.Tree=s.text.Tree;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:BF};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};BJ=function(e){var $ptr,e;return new BI.ptr(e,$makeMap($String.keyFor,[]),$makeMap($String.keyFor,[]),$makeMap($String.keyFor,[]),$makeMap(FH.keyFor,[]),$makeMap(FI.keyFor,[]),$makeMap(FJ.keyFor,[]));};BI.ptr.prototype.escape=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=this;h=f;if($assertType(h,FH,true)[1]){$s=1;continue;}if($assertType(h,FK,true)[1]){$s=2;continue;}if($assertType(h,FL,true)[1]){$s=3;continue;}if($assertType(h,FM,true)[1]){$s=4;continue;}if($assertType(h,FI,true)[1]){$s=5;continue;}if($assertType(h,FJ,true)[1]){$s=6;continue;}if($assertType(h,FN,true)[1]){$s=7;continue;}$s=8;continue;case 1:i=h.$val;j=g.escapeAction(e,i);$s=9;case 9:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;case 2:k=h.$val;l=g.escapeBranch(e,k.BranchNode,"if");$s=10;case 10:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;case 3:m=h.$val;n=g.escapeList(e,m);$s=11;case 11:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return n;case 4:o=h.$val;p=g.escapeBranch(e,o.BranchNode,"range");$s=12;case 12:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return p;case 5:q=h.$val;r=g.escapeTemplate(e,q);$s=13;case 13:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return r;case 6:s=h.$val;t=g.escapeText(e,s);$s=14;case 14:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}return t;case 7:u=h.$val;v=g.escapeBranch(e,u.BranchNode,"with");$s=15;case 15:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}return v;case 8:w=f.String();$s=16;case 16:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}$panic(new $String("escaping "+w+" is unimplemented"));$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.escape};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.escape=function(e,f){return this.$val.escape(e,f);};BI.ptr.prototype.escapeAction=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=this;if(!((f.Pipe.Decl.$length===0))){return e;}AC.copy(e,BR(e));h=$makeSlice(EX,0,3);i=e.state;if(i===23){$s=1;continue;}if(i===8||i===16||i===17||i===18||i===19||i===20){$s=2;continue;}if(i===9){$s=3;continue;}if(i===10||i===11){$s=4;continue;}if(i===12){$s=5;continue;}if(i===15){$s=6;continue;}if(i===0){$s=7;continue;}if(i===6){$s=8;continue;}if(i===7){$s=9;continue;}if(i===2||i===1){$s=10;continue;}$s=11;continue;case 1:return e;case 2:j=e.urlPart;if(j===0){$s=13;continue;}if(j===1){$s=14;continue;}if(j===2){$s=15;continue;}if(j===3){$s=16;continue;}$s=17;continue;case 13:h=$append(h,"html_template_urlfilter");k=e.state;if(k===16||k===17){h=$append(h,"html_template_cssescaper");}else{h=$append(h,"html_template_urlnormalizer");}$s=18;continue;case 14:l=e.state;if(l===16||l===17){h=$append(h,"html_template_cssescaper");}else{h=$append(h,"html_template_urlnormalizer");}$s=18;continue;case 15:h=$append(h,"html_template_urlescaper");$s=18;continue;case 16:m=BE(1,f,f.Line,"%s appears in an ambiguous URL context",new FA([f]));$s=19;case 19:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}return new AC.ptr(23,0,0,0,0,0,m);case 17:n=new AJ(e.urlPart).String();$s=20;case 20:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$panic(new $String(n));case 18:$s=12;continue;case 3:h=$append(h,"html_template_jsvalescaper");e.jsCtx=1;$s=12;continue;case 4:h=$append(h,"html_template_jsstrescaper");$s=12;continue;case 5:h=$append(h,"html_template_jsregexpescaper");$s=12;continue;case 6:h=$append(h,"html_template_cssvaluefilter");$s=12;continue;case 7:h=$append(h,"html_template_htmlescaper");$s=12;continue;case 8:h=$append(h,"html_template_rcdataescaper");$s=12;continue;case 9:$s=12;continue;case 10:e.state=2;h=$append(h,"html_template_htmlnamefilter");$s=12;continue;case 11:if(AF(e.state)){$s=21;continue;}$s=22;continue;case 21:h=$append(h,"html_template_commentescaper");$s=23;continue;case 22:o=new AD(e.state).String();$s=24;case 24:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}$panic(new $String("unexpected state "+o));case 23:case 12:p=e.delim;if(p===0){}else if(p===3){h=$append(h,"html_template_nospaceescaper");}else{h=$append(h,"html_template_attrescaper");}$r=g.editActionNode(f,h);$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.escapeAction};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.escapeAction=function(e,f){return this.$val.escapeAction(e,f);};BK=function(e){var $ptr,e,f,g,h,i;f=e;if($assertType(f,FO,true)[1]){g=f.$val;return new EX([g.Ident]);}else if($assertType(f,FP,true)[1]){h=f.$val;return h.Ident;}else if($assertType(f,FQ,true)[1]){i=f.$val;return i.Field;}return EX.nil;};BL=function(e,f){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(f.$length===0){return;}g=e.Cmds.$length;h=e.Cmds;i=g-1>>0;case 1:if(!(i>=0)){$s=2;continue;}k=(j=e.Cmds,((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));if(!((k.Args.$length===0))){l=$assertType((m=k.Args,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0])),FO,true);n=l[1];if(n){i=i-(1)>>0;$s=1;continue;}}h=$subslice(e.Cmds,(i+1>>0));i=i-(1)>>0;$s=1;continue;case 2:o=0;p=h;q=0;while(true){if(!(q=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+q]);s=BK((t=r.Args,(0>=t.$length?$throwRuntimeError("index out of range"):t.$array[t.$offset+0])));u=0;while(true){if(!(u=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+u]);if(BP(((o<0||o>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+o]),v)){o=o+(1)>>0;if(o===f.$length){return;}}u++;}q++;}w=$makeSlice(FS,(g-h.$length>>0),((g+f.$length>>0)-o>>0));$copySlice(w,e.Cmds);x=h;y=0;case 3:if(!(y=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y]);ab=(aa=z.Args,(0>=aa.$length?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0])).Position();$s=5;case 5:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}ac=ab;ad=BK((ae=z.Args,(0>=ae.$length?$throwRuntimeError("index out of range"):ae.$array[ae.$offset+0])));af=0;case 6:if(!(af=ad.$length)?$throwRuntimeError("index out of range"):ad.$array[ad.$offset+af]);ah=BO(ag,f,BP);$s=8;case 8:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ai=ah;if(!((ai===-1))){aj=$subslice(f,0,ai);ak=0;while(true){if(!(ak=aj.$length)?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+ak]);w=BN(w,BQ(al,ac));ak++;}f=$subslice(f,(ai+1>>0));}af++;$s=6;continue;case 7:w=BN(w,z);y++;$s=3;continue;case 4:am=f;an=0;while(true){if(!(an=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]);w=BN(w,BQ(ao,new G.Pos(e.Pos).Position()));an++;}e.Cmds=w;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BL};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BN=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r;g=e.$length;if(!((g===0))){h=$assertType((i=(j=g-1>>0,((j<0||j>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+j])).Args,(0>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+0])),FO,true);k=h[0];l=h[1];m=$assertType((n=f.Args,(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])),FO,true);o=m[0];p=m[1];if(l&&p&&(q=(r=BM[$String.keyFor(k.Ident)],r!==undefined?r.v:false)[$String.keyFor(o.Ident)],q!==undefined?q.v:false)){return e;}}return $append(e,f);};BO=function(e,f,g){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=f;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);l=g(e,k);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){$s=3;continue;}$s=4;continue;case 3:return j;case 4:i++;$s=1;continue;case 2:return-1;}return;}if($f===undefined){$f={$blk:BO};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BP=function(e,f){var $ptr,e,f,g,h,i,j;h=(g=BH[$String.keyFor(e)],g!==undefined?g.v:"");if(!(h==="")){e=h;}j=(i=BH[$String.keyFor(f)],i!==undefined?i.v:"");if(!(j==="")){f=j;}return e===f;};BQ=function(e,f){var $ptr,e,f;return new G.CommandNode.ptr(4,0,FE.nil,new FT([G.NewIdentifier(e).SetTree(FE.nil).SetPos(f)]));};BR=function(e){var $ptr,e,f,g,h,i,j,k,l;e=$clone(e,AC);f=e.state;if(f===1){e.state=2;}else if(f===4){g=(h=e.attr,((h<0||h>=DT.length)?$throwRuntimeError("index out of range"):DT[h]));i=3;j=0;e.state=g;e.delim=i;e.attr=j;}else if(f===3){k=2;l=0;e.state=k;e.attr=l;}return e;};BS=function(e,f,g,h){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=$clone(f,AC);e=$clone(e,AC);if(e.state===23){return e;}if(f.state===23){return f;}if(e.eq(f)){return e;}i=$clone(e,AC);i.urlPart=f.urlPart;if(i.eq(f)){i.urlPart=3;return i;}AC.copy(i,e);i.jsCtx=f.jsCtx;if(i.eq(f)){i.jsCtx=2;return i;}j=$clone(BR(e),AC);k=$clone(BR(f),AC);l=$clone(j,AC);m=$clone(k,AC);if(!(l.eq(e)&&m.eq(f))){$s=1;continue;}$s=2;continue;case 1:n=BS(l,m,g,h);$s=3;case 3:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=$clone(n,AC);if(!((o.state===23))){$s=4;continue;}$s=5;continue;case 4:return o;case 5:case 2:p=BE(3,g,0,"{{%s}} branches end in different contexts: %v, %v",new FA([new $String(h),new e.constructor.elem(e),new f.constructor.elem(f)]));$s=6;case 6:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}return new AC.ptr(23,0,0,0,0,0,p);}return;}if($f===undefined){$f={$blk:BS};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};BI.ptr.prototype.escapeBranch=function(e,f,g){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);h=this;i=h.escapeList(e,f.List);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=$clone(i,AC);if(g==="range"&&!((j.state===23))){$s=2;continue;}$s=3;continue;case 2:l=h.escapeListConditionally(j,f.List,$throwNilPointerError);$s=4;case 4:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=$clone(k[0],AC);n=BS(j,m,f,g);$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}AC.copy(j,n);if(j.state===23){j.err.Line=f.Line;j.err.Description="on range loop re-entry: "+j.err.Description;return j;}case 3:o=h.escapeList(e,f.ElseList);$s=6;case 6:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=$clone(o,AC);q=BS(j,p,f,g);$s=7;case 7:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}return q;}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.escapeBranch};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.escapeBranch=function(e,f,g){return this.$val.escapeBranch(e,f,g);};BI.ptr.prototype.escapeList=function(e,f){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=this;if(f===FL.nil){return e;}h=f.Nodes;i=0;case 1:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);k=g.escape(e,j);$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}AC.copy(e,k);i++;$s=1;continue;case 2:return e;}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.escapeList};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.escapeList=function(e,f){return this.$val.escapeList(e,f);};BI.ptr.prototype.escapeListConditionally=function(e,f,g){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);h=this;i=BJ(h.tmpl);j=h.output;k=0;l=$keys(j);while(true){if(!(k>0;if((e.state===0)||(e.state===6)){$s=4;continue;}if(AF(e.state)&&(e.delim===0)){$s=5;continue;}$s=6;continue;case 4:u=t;if(!((r.state===e.state))){v=u-1>>0;while(true){if(!(v>=n)){break;}if(((v<0||v>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+v])===60){u=v;break;}v=v-(1)>>0;}}w=n;case 7:if(!(w=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+w])===60)){x=false;$s=11;continue s;}y=D.ToUpper($subslice(l,w));$s=12;case 12:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=D.HasPrefix(y,BU);$s=13;case 13:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}x=!z;case 11:if(x){$s=9;continue;}$s=10;continue;case 9:o.Write($subslice(l,m,w));o.WriteString("<");m=w+1>>0;case 10:w=w+(1)>>0;$s=7;continue;case 8:$s=6;continue;case 5:aa=e.state;if(aa===13){if(!((D.IndexAny($subslice(l,m,t),"\n\r\xE2\x80\xA8\xE2\x80\xA9")===-1))){o.WriteByte(10);}else{o.WriteByte(32);}}else if(aa===21){o.WriteByte(32);}m=t;case 6:if(!((e.state===r.state))&&AF(r.state)&&(r.delim===0)){ab=t-2>>0;if(r.state===5){ab=ab-(2)>>0;}o.Write($subslice(l,m,ab));m=t;}if((n===t)&&(e.state===r.state)){$s=14;continue;}$s=15;continue;case 14:ac=B.Sprintf("infinite loop from %v to %v on %q..%q",new FA([new e.constructor.elem(e),new r.constructor.elem(r),$subslice(l,0,n),$subslice(l,n)]));$s=16;case 16:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}$panic(new $String(ac));case 15:ad=$clone(r,AC);ae=t;AC.copy(e,ad);n=ae;$s=1;continue;case 2:if(!((m===0))&&!((e.state===23))){$s=17;continue;}$s=18;continue;case 17:if(!AF(e.state)||!((e.delim===0))){o.Write($subslice(f.Text,m));}$r=g.editTextNode(f,o.Bytes());$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 18:return e;}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.escapeText};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.escapeText=function(e,f){return this.$val.escapeText(e,f);};BV=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);if(e.delim===0){$s=1;continue;}$s=2;continue;case 1:g=DZ(e,f);h=$clone(g[0],AC);i=g[1];if(i===0){return[h,0];}k=(j=e.state,((j<0||j>=DL.length)?$throwRuntimeError("index out of range"):DL[j]))(e,$subslice(f,0,i));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;case 2:m=D.IndexAny(f,(l=e.delim,((l<0||l>=BT.length)?$throwRuntimeError("index out of range"):BT[l])));if(m===-1){m=f.$length;}if(e.delim===3){$s=4;continue;}$s=5;continue;case 4:n=D.IndexAny($subslice(f,0,m),"\"'<=`");if(n>=0){$s=6;continue;}$s=7;continue;case 6:o=BE(2,$ifaceNil,0,"%q in unquoted attr: %q",new FA([$subslice(f,n,(n+1>>0)),$subslice(f,0,m)]));$s=8;case 8:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,o),f.$length];case 7:case 5:if(m===f.$length){$s=9;continue;}$s=10;continue;case 9:p=new EY($stringToBytes(H.UnescapeString($bytesToString(f))));case 11:if(!(!((p.$length===0)))){$s=12;continue;}s=(r=e.state,((r<0||r>=DL.length)?$throwRuntimeError("index out of range"):DL[r]))(e,p);$s=13;case 13:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}q=s;t=$clone(q[0],AC);u=q[1];v=$clone(t,AC);w=$subslice(p,u);AC.copy(e,v);p=w;$s=11;continue;case 12:return[e,f.$length];case 10:if(!((e.delim===3))){m=m+(1)>>0;}return[new AC.ptr(1,0,0,0,0,e.element,FF.nil),m];}return;}if($f===undefined){$f={$blk:BV};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.$s=$s;$f.$r=$r;return $f;};BI.ptr.prototype.editActionNode=function(e,f){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=this;h=(i=g.actionNodeEdits[FH.keyFor(e)],i!==undefined?[i.v,true]:[EX.nil,false]);j=h[1];if(j){$s=1;continue;}$s=2;continue;case 1:k=B.Sprintf("node %s shared between templates",new FA([e]));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$panic(new $String(k));case 2:l=e;(g.actionNodeEdits||$throwRuntimeError("assignment to entry in nil map"))[FH.keyFor(l)]={k:l,v:f};$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.editActionNode};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.editActionNode=function(e,f){return this.$val.editActionNode(e,f);};BI.ptr.prototype.editTemplateNode=function(e,f){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=this;h=(i=g.templateNodeEdits[FI.keyFor(e)],i!==undefined?[i.v,true]:["",false]);j=h[1];if(j){$s=1;continue;}$s=2;continue;case 1:k=B.Sprintf("node %s shared between templates",new FA([e]));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$panic(new $String(k));case 2:l=e;(g.templateNodeEdits||$throwRuntimeError("assignment to entry in nil map"))[FI.keyFor(l)]={k:l,v:f};$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.editTemplateNode};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.editTemplateNode=function(e,f){return this.$val.editTemplateNode(e,f);};BI.ptr.prototype.editTextNode=function(e,f){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=this;h=(i=g.textNodeEdits[FJ.keyFor(e)],i!==undefined?[i.v,true]:[EY.nil,false]);j=h[1];if(j){$s=1;continue;}$s=2;continue;case 1:k=B.Sprintf("node %s shared between templates",new FA([e]));$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}$panic(new $String(k));case 2:l=e;(g.textNodeEdits||$throwRuntimeError("assignment to entry in nil map"))[FJ.keyFor(l)]={k:l,v:f};$s=-1;case-1:}return;}if($f===undefined){$f={$blk:BI.ptr.prototype.editTextNode};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};BI.prototype.editTextNode=function(e,f){return this.$val.editTextNode(e,f);};BI.ptr.prototype.commit=function(){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.output;g=0;h=$keys(f);case 1:if(!(g>0)=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+n]);if(!((r.length===0))){k.WriteString(e.substring(j,p));k.WriteString(r);j=p+o>>0;}$s=6;continue;case 4:$s=6;continue;case 5:s=B.Fprintf(k,"%s&#x%x;",new FA([new $String(e.substring(j,p)),new $Int32(n)]));$s=7;case 7:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}s;j=p+o>>0;case 6:p=p+(o)>>0;$s=1;continue;case 2:if(j===0){return e;}k.WriteString(e.substring(j));return k.String();}return;}if($f===undefined){$f={$blk:CL};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};CM=function(e){var $ptr,aa,ab,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=new D.Buffer.ptr(EY.nil,0,FC.zero(),FD.zero(),0);g=new EY($stringToBytes(e));h=new AC.ptr(0,0,0,0,0,0,FF.nil);i=0;j=true;k=g;l=$clone(h,AC);m=i;n=j;case 1:if(!(!((m===k.$length)))){$s=2;continue;}if(l.delim===0){$s=3;continue;}$s=4;continue;case 3:o=l.state;if(!((l.element===0))&&!AG(o)){o=6;}q=((o<0||o>=DL.length)?$throwRuntimeError("index out of range"):DL[o])(l,$subslice(k,m));$s=5;case 5:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=$clone(p[0],AC);s=p[1];t=m+s>>0;if((l.state===0)||(l.state===6)){u=t;if(!((r.state===l.state))){v=u-1>>0;while(true){if(!(v>=m)){break;}if(((v<0||v>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+v])===60){u=v;break;}v=v-(1)>>0;}}f.Write($subslice(k,m,u));}else{n=false;}w=$clone(r,AC);x=t;AC.copy(l,w);m=x;$s=1;continue;case 4:z=m+D.IndexAny($subslice(k,m),(y=l.delim,((y<0||y>=BT.length)?$throwRuntimeError("index out of range"):BT[y])))>>0;if(z>0;}aa=new AC.ptr(1,0,0,0,0,l.element,FF.nil);ab=z;AC.copy(l,aa);m=ab;$s=1;continue;case 2:if(n){return e;}else if((l.state===0)||(l.state===6)){f.Write($subslice(k,m));}return f.String();}return;}if($f===undefined){$f={$blk:CM};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CN=function(e){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(i===3){return h;}if(h.length===0){return"ZgotmplZ";}j=A.ToLower(h);$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}h=j;k=P(h);$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!((l===0))){$s=4;continue;}$s=5;continue;case 4:return"ZgotmplZ";case 5:m=h;n=0;while(true){if(!(n>0,((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i]));j=e.$length;k=h;l=j;m=k;if(m===43||m===45){n=l-1>>0;while(true){if(!(n>0&&((o=n-1>>0,((o<0||o>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o]))===k))){break;}n=n-(1)>>0;}if((((l-n>>0))&1)===1){return 0;}return 1;}else if(m===46){if(!((l===1))&&48<=(p=l-2>>0,((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p]))&&(q=l-2>>0,((q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]))<=57){return 1;}return 0;}else if(m===44||m===60||m===62||m===61||m===42||m===37||m===38||m===124||m===94||m===63){return 0;}else if(m===33||m===126){return 0;}else if(m===40||m===91){return 0;}else if(m===58||m===59||m===123){return 0;}else if(m===125){return 0;}else{r=l;while(true){if(!(r>0&&DA(((s=r-1>>0,((s<0||s>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+s]))>>0)))){break;}r=r-(1)>>0;}if((t=CQ[$String.keyFor($bytesToString($subslice(e,r)))],t!==undefined?t.v:false)){return 0;}}return 1;}return;}if($f===undefined){$f={$blk:CP};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};CS=function(e){var $ptr,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=C.ValueOf(e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;case 2:h=g.Type().Implements(CR);$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}if(!(!h&&(g.Kind()===22)&&!g.IsNil())){$s=3;continue;}i=g.Elem();$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}g=i;$s=2;continue;case 3:j=g.Interface();$s=6;case 6:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return j;}return;}if($f===undefined){$f={$blk:CS};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};CT=function(e){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=$ifaceNil;if(e.$length===1){$s=1;continue;}$s=2;continue;case 1:g=CS((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]));$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f;if($assertType(h,T,true)[1]){$s=5;continue;}if($assertType(h,U,true)[1]){$s=6;continue;}if($assertType(h,K.Marshaler,true)[1]){$s=7;continue;}if($assertType(h,B.Stringer,true)[1]){$s=8;continue;}$s=9;continue;case 5:i=h.$val;return i;case 6:j=h.$val;return"\""+j+"\"";case 7:k=h;$s=9;continue;case 8:l=h;m=l.String();$s=10;case 10:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}f=new $String(m);case 9:$s=3;continue;case 2:n=e;o=0;case 11:if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]);r=CS(q);$s=13;case 13:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p]=r);o++;$s=11;continue;case 12:s=B.Sprint(e);$s=14;case 14:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}f=new $String(s);case 3:u=K.Marshal(f);$s=15;case 15:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;v=t[0];w=t[1];if(!($interfaceIsEqual(w,$ifaceNil))){$s=16;continue;}$s=17;continue;case 16:x=w.Error();$s=18;case 18:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=A.Replace(x,"*/","* /",-1);$s=19;case 19:if($c){$c=false;y=y.$blk();}if(y&&y.$blk!==undefined){break s;}z=new $String(y);aa=B.Sprintf(" /* %s */null ",new FA([z]));$s=20;case 20:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}return aa;case 17:if(v.$length===0){return" null ";}ab=F.DecodeRune(v);ac=ab[0];ad=F.DecodeLastRune(v);ae=ad[0];af=new D.Buffer.ptr(EY.nil,0,FC.zero(),FD.zero(),0);ag=DA(ac)||DA(ae);if(ag){af.WriteByte(32);}ah=0;ai=0;while(true){if(!(ai>0;}ai=ai+(al)>>0;}if(!((af.Len()===0))){af.Write($subslice(v,ah));if(ag){af.WriteByte(32);}v=af.Bytes();}return $bytesToString(v);}return;}if($f===undefined){$f={$blk:CT};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};CU=function(e){var $ptr,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(i===5){return CW(h,CY);}return CW(h,CX);}return;}if($f===undefined){$f={$blk:CU};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};CV=function(e){var $ptr,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];h=CW(h,CZ);if(h===""){return"(?:)";}return h;}return;}if($f===undefined){$f={$blk:CV};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};CW=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p;g=new D.Buffer.ptr(EY.nil,0,FC.zero(),FD.zero(),0);h=0;i=0;j=0;k=h;l=i;m=j;n=0;while(true){if(!(n>0)=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+k])==="")){p=((k<0||k>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+k]);}else if(k===8232){p="\\u2028";}else if(k===8233){p="\\u2029";}else{n=n+(l)>>0;continue;}g.WriteString(e.substring(m,n));g.WriteString(p);m=n+l>>0;n=n+(l)>>0;}if(m===0){return e;}g.WriteString(e.substring(m));return g.String();};DA=function(e){var $ptr,e;if(e===36){return true;}else if(48<=e&&e<=57){return true;}else if(65<=e&&e<=90){return true;}else if(e===95){return true;}else if(97<=e&&e<=122){return true;}return false;};DB.ptr.prototype.Templates=function(){var $ptr,e,f,g,h,i,j,k,l,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=this;f=e.nameSpace;$r=f.mu.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(f.mu,"Unlock"),[]]);g=$makeSlice(FZ,0,$keys(f.set).length);h=f.set;i=0;j=$keys(h);while(true){if(!(i=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+l]);n=m.Name();p=(o=f.nameSpace.set[$String.keyFor(n)],o!==undefined?o.v:FG.nil);if(p===FG.nil){p=f.new$(n);}p.escapeErr=$ifaceNil;p.text=m;p.Tree=m.Tree;l++;}return[f,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[FG.nil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:DB.ptr.prototype.Parse};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};DB.prototype.Parse=function(e){return this.$val.Parse(e);};DB.ptr.prototype.AddParseTree=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);g=this;$r=g.nameSpace.mu.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(g.nameSpace.mu,"Unlock"),[]]);if(!($interfaceIsEqual(g.escapeErr,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:h=B.Errorf("html/template: cannot AddParseTree to %q after it has executed",new FA([new $String(g.Name())]));$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return[FG.nil,h];case 3:j=g.text.AddParseTree(e,f);$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if(!($interfaceIsEqual(l,$ifaceNil))){return[FG.nil,l];}m=new DB.ptr($ifaceNil,k,k.Tree,g.nameSpace);n=e;(g.nameSpace.set||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(n)]={k:n,v:m};return[m,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[FG.nil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:DB.ptr.prototype.AddParseTree};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};DB.prototype.AddParseTree=function(e,f){return this.$val.AddParseTree(e,f);};DB.ptr.prototype.Clone=function(){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=this;$r=e.nameSpace.mu.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(e.nameSpace.mu,"Unlock"),[]]);if(!($interfaceIsEqual(e.escapeErr,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:f=B.Errorf("html/template: cannot Clone %q after it has executed",new FA([new $String(e.Name())]));$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return[FG.nil,f];case 3:h=e.text.Clone();$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];if(!($interfaceIsEqual(j,$ifaceNil))){return[FG.nil,j];}k=new DB.ptr($ifaceNil,i,i.Tree,new DD.ptr(new N.Mutex.ptr(0,0),{}));l=i.Templates();m=0;case 6:if(!(m=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]);o=n.Name();q=(p=e.nameSpace.set[$String.keyFor(o)],p!==undefined?p.v:FG.nil);if(q===FG.nil||!($interfaceIsEqual(q.escapeErr,$ifaceNil))){$s=8;continue;}$s=9;continue;case 8:r=B.Errorf("html/template: cannot Clone %q after it has executed",new FA([new $String(e.Name())]));$s=10;case 10:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return[FG.nil,r];case 9:s=n.Tree.Copy();$s=11;case 11:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}n.Tree=s;t=o;(k.nameSpace.set||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(t)]={k:t,v:new DB.ptr($ifaceNil,n,n.Tree,k.nameSpace)};m++;$s=6;continue;case 7:return[k,$ifaceNil];}return;}}catch(err){$err=err;$s=-1;return[FG.nil,$ifaceNil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:DB.ptr.prototype.Clone};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};DB.prototype.Clone=function(){return this.$val.Clone();};DE=function(e){var $ptr,e,f,g;f=new DB.ptr($ifaceNil,J.New(e),FE.nil,new DD.ptr(new N.Mutex.ptr(0,0),{}));g=e;(f.nameSpace.set||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(g)]={k:g,v:f};return f;};$pkg.New=DE;DB.ptr.prototype.New=function(e){var $ptr,e,f,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);f=this;$r=f.nameSpace.mu.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(f.nameSpace.mu,"Unlock"),[]]);return f.new$(e);}return;}}catch(err){$err=err;$s=-1;return FG.nil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:DB.ptr.prototype.New};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};DB.prototype.New=function(e){return this.$val.New(e);};DB.ptr.prototype.new$=function(e){var $ptr,e,f,g,h;f=this;g=new DB.ptr($ifaceNil,f.text.New(e),FE.nil,f.nameSpace);h=e;(g.nameSpace.set||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(h)]={k:h,v:g};return g;};DB.prototype.new$=function(e){return this.$val.new$(e);};DB.ptr.prototype.Name=function(){var $ptr,e;e=this;return e.text.Name();};DB.prototype.Name=function(){return this.$val.Name();};DB.ptr.prototype.Funcs=function(e){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=f.text.Funcs(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}g;return f;}return;}if($f===undefined){$f={$blk:DB.ptr.prototype.Funcs};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};DB.prototype.Funcs=function(e){return this.$val.Funcs(e);};DB.ptr.prototype.Delims=function(e,f){var $ptr,e,f,g;g=this;g.text.Delims(e,f);return g;};DB.prototype.Delims=function(e,f){return this.$val.Delims(e,f);};DB.ptr.prototype.Lookup=function(e){var $ptr,e,f,g,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);f=this;$r=f.nameSpace.mu.Lock();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$deferred.push([$methodVal(f.nameSpace.mu,"Unlock"),[]]);return(g=f.nameSpace.set[$String.keyFor(e)],g!==undefined?g.v:FG.nil);}return;}}catch(err){$err=err;$s=-1;return FG.nil;}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:DB.ptr.prototype.Lookup};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};DB.prototype.Lookup=function(e){return this.$val.Lookup(e);};DB.ptr.prototype.ParseFiles=function(e){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=DI(f,e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:DB.ptr.prototype.ParseFiles};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};DB.prototype.ParseFiles=function(e){return this.$val.ParseFiles(e);};DI=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(f.$length===0){$s=1;continue;}$s=2;continue;case 1:g=B.Errorf("html/template: no files named in call to ParseFiles",new FA([]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return[FG.nil,g];case 2:h=f;i=0;case 4:if(!(i=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]);l=L.ReadFile(j);$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}k=l;m=k[0];n=k[1];if(!($interfaceIsEqual(n,$ifaceNil))){return[FG.nil,n];}o=$bytesToString(m);p=M.Base(j);q=FG.nil;if(e===FG.nil){e=DE(p);}if(p===e.Name()){$s=7;continue;}$s=8;continue;case 7:q=e;$s=9;continue;case 8:r=e.New(p);$s=10;case 10:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;case 9:t=q.Parse(o);$s=11;case 11:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}s=t;n=s[1];if(!($interfaceIsEqual(n,$ifaceNil))){return[FG.nil,n];}i++;$s=4;continue;case 5:return[e,$ifaceNil];}return;}if($f===undefined){$f={$blk:DI};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};DB.ptr.prototype.ParseGlob=function(e){var $ptr,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=DK(f,e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:DB.ptr.prototype.ParseGlob};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};DB.prototype.ParseGlob=function(e){return this.$val.ParseGlob(e);};DK=function(e,f){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:h=M.Glob(f);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];if(!($interfaceIsEqual(j,$ifaceNil))){return[FG.nil,j];}if(i.$length===0){$s=2;continue;}$s=3;continue;case 2:k=B.Errorf("html/template: pattern matches no files: %#q",new FA([new $String(f)]));$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return[FG.nil,k];case 3:l=DI(e,i);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}return l;}return;}if($f===undefined){$f={$blk:DK};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};DO=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=0;case 1:h=g+D.IndexByte($subslice(f,g),60)>>0;if(h>0)===f.$length)){return[e,f.$length];}else if((h+4>>0)<=f.$length&&D.Equal(DM,$subslice(f,h,(h+4>>0)))){return[new AC.ptr(5,0,0,0,0,0,FF.nil),h+4>>0];}h=h+(1)>>0;i=false;if(((h<0||h>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h])===47){if((h+1>>0)===f.$length){return[e,f.$length];}j=true;k=h+1>>0;i=j;h=k;}m=EP(f,h);$s=3;case 3:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}l=m;n=l[0];o=l[1];if(!((n===h))){if(i){o=0;}return[new AC.ptr(1,0,0,0,0,o,FF.nil),n];}g=n;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:DO};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};DQ=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=EQ(f,0);if(g===f.$length){return[e,f.$length];}if(((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g])===62){return[new AC.ptr((h=e.element,((h<0||h>=DP.length)?$throwRuntimeError("index out of range"):DP[h])),0,0,0,0,e.element,FF.nil),g+1>>0];}j=EL(f,g);$s=1;case 1:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;k=i[0];l=i[1];if(!(l===FF.nil)){return[new AC.ptr(23,0,0,0,0,0,l),f.$length];}m=1;n=0;o=m;p=n;if(g===k){$s=2;continue;}$s=3;continue;case 2:q=BE(2,$ifaceNil,0,"expected space, attr name, or end of tag, but got %q",new FA([$subslice(f,g)]));$s=4;case 4:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,q),f.$length];case 3:s=P($bytesToString($subslice(f,g,k)));$s=5;case 5:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;if(r===6){$s=6;continue;}if(r===1){$s=7;continue;}if(r===4){$s=8;continue;}$s=9;continue;case 6:p=3;$s=9;continue;case 7:p=2;$s=9;continue;case 8:p=1;case 9:if(k===f.$length){o=2;}else{o=3;}return[new AC.ptr(o,0,0,0,p,e.element,FF.nil),k];}return;}if($f===undefined){$f={$blk:DQ};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};DR=function(e,f){var $ptr,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);h=EL(f,0);$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}g=h;i=g[0];j=g[1];if(!(j===FF.nil)){return[new AC.ptr(23,0,0,0,0,0,j),f.$length];}else if(!((i===f.$length))){e.state=3;}return[e,i];}return;}if($f===undefined){$f={$blk:DR};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};DS=function(e,f){var $ptr,e,f,g;e=$clone(e,AC);g=EQ(f,0);if(g===f.$length){return[e,f.$length];}else if(!((((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g])===61))){e.state=1;return[e,g];}e.state=4;return[e,g+1>>0];};DU=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q;e=$clone(e,AC);g=EQ(f,0);if(g===f.$length){return[e,f.$length];}h=3;i=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(i===39){j=2;k=g+1>>0;h=j;g=k;}else if(i===34){l=1;m=g+1>>0;h=l;g=m;}n=(o=e.attr,((o<0||o>=DT.length)?$throwRuntimeError("index out of range"):DT[o]));p=h;q=0;e.state=n;e.delim=p;e.attr=q;return[e,g];};DV=function(e,f){var $ptr,e,f,g;e=$clone(e,AC);g=D.Index(f,DN);if(!((g===-1))){return[new AC.ptr(0,0,0,0,0,0,FF.nil),g+3>>0];}return[e,f.$length];};DZ=function(e,f){var $ptr,e,f,g,h;e=$clone(e,AC);if(!((e.element===0))){h=EA(f,(g=e.element,((g<0||g>=DW.length)?$throwRuntimeError("index out of range"):DW[g])));if(!((h===-1))){return[new AC.ptr(0,0,0,0,0,0,FF.nil),h];}}return[e,f.$length];};EA=function(e,f){var $ptr,e,f,g,h,i;g=0;h=DX.$length;while(true){if(!(e.$length>0)){break;}i=D.Index(e,DX);if(i===-1){return i;}e=$subslice(e,(i+h>>0));if(f.$length<=e.$length&&D.EqualFold(f,$subslice(e,0,f.$length))){e=$subslice(e,f.$length);if(e.$length>0&&!((D.IndexByte(DY,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))===-1))){return g+i>>0;}g=g+(f.$length)>>0;}g=g+((i+h>>0))>>0;}return-1;};EB=function(e,f){var $ptr,e,f;e=$clone(e,AC);return[e,f.$length];};EC=function(e,f){var $ptr,e,f;e=$clone(e,AC);if(D.IndexAny(f,"#?")>=0){e.urlPart=2;}else if(!((f.$length===EQ(f,0)))&&(e.urlPart===0)){e.urlPart=1;}return[e,f.$length];};ED=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=D.IndexAny(f,"\"'/");if(g===-1){$s=1;continue;}$s=2;continue;case 1:h=CP(f,e.jsCtx);$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}e.jsCtx=h;return[e,f.$length];case 2:i=CP($subslice(f,0,g),e.jsCtx);$s=4;case 4:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}e.jsCtx=i;j=((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if(j===34){$s=5;continue;}if(j===39){$s=6;continue;}if(j===47){$s=7;continue;}$s=8;continue;case 5:k=10;l=0;e.state=k;e.jsCtx=l;$s=9;continue;case 6:m=11;n=0;e.state=m;e.jsCtx=n;$s=9;continue;case 7:if((g+1>>0)>0,((o<0||o>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+o]))===47)){$s=10;continue;}if((g+1>>0)>0,((p<0||p>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+p]))===42)){$s=11;continue;}if(e.jsCtx===0){$s=12;continue;}if(e.jsCtx===1){$s=13;continue;}$s=14;continue;case 10:q=14;r=g+1>>0;e.state=q;g=r;$s=15;continue;case 11:s=13;t=g+1>>0;e.state=s;g=t;$s=15;continue;case 12:e.state=12;$s=15;continue;case 13:e.jsCtx=0;$s=15;continue;case 14:u=BE(10,$ifaceNil,0,"'/' could start a division or regexp: %.32q",new FA([$subslice(f,g)]));$s=16;case 16:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,u),f.$length];case 15:$s=9;continue;case 8:$panic(new $String("unreachable"));case 9:return[e,g+1>>0];}return;}if($f===undefined){$f={$blk:ED};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};EE=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g="\\\"";h=e.state;if(h===11){g="\\'";}else if(h===12){g="\\/[]";}i=0;j=false;k=i;l=j;case 1:m=k+D.IndexAny($subslice(f,k),g)>>0;if(m=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+m]);if(n===92){$s=3;continue;}if(n===91){$s=4;continue;}if(n===93){$s=5;continue;}$s=6;continue;case 3:m=m+(1)>>0;if(m===f.$length){$s=8;continue;}$s=9;continue;case 8:o=BE(8,$ifaceNil,0,"unfinished escape sequence in JS string: %q",new FA([f]));$s=10;case 10:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,o),f.$length];case 9:$s=7;continue;case 4:l=true;$s=7;continue;case 5:l=false;$s=7;continue;case 6:if(!l){p=9;q=1;e.state=p;e.jsCtx=q;return[e,m+1>>0];}case 7:k=m+1>>0;$s=1;continue;case 2:if(l){$s=11;continue;}$s=12;continue;case 11:r=BE(7,$ifaceNil,0,"unfinished JS regexp charset: %q",new FA([f]));$s=13;case 13:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,r),f.$length];case 12:return[e,f.$length];}return;}if($f===undefined){$f={$blk:EE};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};EG=function(e,f){var $ptr,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=D.Index(f,EF);if(g===-1){return[e,f.$length];}h=e.state;if(h===13){$s=1;continue;}if(h===21){$s=2;continue;}$s=3;continue;case 1:e.state=9;$s=4;continue;case 2:e.state=15;$s=4;continue;case 3:i=new AD(e.state).String();$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}$panic(new $String(i));case 4:return[e,g+2>>0];}return;}if($f===undefined){$f={$blk:EG};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};EH=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g="";h=0;i=e.state;if(i===14){$s=1;continue;}if(i===22){$s=2;continue;}$s=3;continue;case 1:j="\n\r\xE2\x80\xA8\xE2\x80\xA9";k=9;g=j;h=k;$s=4;continue;case 2:l="\n\f\r";m=15;g=l;h=m;$s=4;continue;case 3:n=new AD(e.state).String();$s=5;case 5:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}$panic(new $String(n));case 4:o=D.IndexAny(f,g);if(o===-1){return[e,f.$length];}e.state=h;return[e,o];}return;}if($f===undefined){$f={$blk:EH};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};EI=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g=0;case 1:h=g+D.IndexAny($subslice(f,g),"(\"'/")>>0;if(h=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+h]);if(i===40){$s=3;continue;}if(i===47){$s=4;continue;}if(i===34){$s=5;continue;}if(i===39){$s=6;continue;}$s=7;continue;case 3:j=D.TrimRight($subslice(f,0,h),"\t\n\f\r ");$s=8;case 8:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;l=AQ(k,"url");$s=11;case 11:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(l){$s=9;continue;}$s=10;continue;case 9:m=D.TrimLeft($subslice(f,(h+1>>0)),"\t\n\f\r ");$s=12;case 12:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=f.$length-m.$length>>0;if(!((n===f.$length))&&(((n<0||n>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+n])===34)){o=18;p=n+1>>0;e.state=o;n=p;}else if(!((n===f.$length))&&(((n<0||n>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+n])===39)){q=19;r=n+1>>0;e.state=q;n=r;}else{e.state=20;}return[e,n];case 10:$s=7;continue;case 4:if((h+1>>0)>0,((t<0||t>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+t]));if(s===47){e.state=22;return[e,h+2>>0];}else if(s===42){e.state=21;return[e,h+2>>0];}}$s=7;continue;case 5:e.state=16;return[e,h+1>>0];case 6:e.state=17;return[e,h+1>>0];case 7:g=h+1>>0;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:EI};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.$s=$s;$f.$r=$r;return $f;};EJ=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=$clone(e,AC);g="";h=e.state;if(h===16||h===18){$s=1;continue;}if(h===17||h===19){$s=2;continue;}if(h===20){$s=3;continue;}$s=4;continue;case 1:g="\\\"";$s=5;continue;case 2:g="\\'";$s=5;continue;case 3:g="\\\t\n\f\r )";$s=5;continue;case 4:i=new AD(e.state).String();$s=6;case 6:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}$panic(new $String(i));case 5:j=0;case 7:k=j+D.IndexAny($subslice(f,j),g)>>0;if(k>0];case 10:if(((k<0||k>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+k])===92){$s=13;continue;}$s=14;continue;case 13:k=k+(1)>>0;if(k===f.$length){$s=16;continue;}$s=17;continue;case 16:s=BE(8,$ifaceNil,0,"unfinished escape sequence in CSS string: %q",new FA([f]));$s=18;case 18:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}return[new AC.ptr(23,0,0,0,0,0,s),f.$length];case 17:$s=15;continue;case 14:e.state=15;return[e,k+1>>0];case 15:u=e;v=AS($subslice(f,0,(k+1>>0)));$s=19;case 19:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}w=v;x=EC(u,w);$s=20;case 20:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}t=x;AC.copy(e,t[0]);j=k+1>>0;$s=7;continue;case 8:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:EJ};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.$s=$s;$f.$r=$r;return $f;};EK=function(e,f){var $ptr,e,f;e=$clone(e,AC);return[e,f.$length];};EL=function(e,f){var $ptr,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=f;case 1:if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]);if(h===32||h===9||h===10||h===12||h===13||h===61||h===62){$s=3;continue;}if(h===39||h===34||h===60){$s=4;continue;}$s=5;continue;case 3:return[g,FF.nil];case 4:i=BE(2,$ifaceNil,0,"%q in attribute name: %.32q",new FA([$subslice(e,g,(g+1>>0)),e]));$s=7;case 7:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}return[-1,i];case 5:case 6:g=g+(1)>>0;$s=1;continue;case 2:return[e.$length,FF.nil];}return;}if($f===undefined){$f={$blk:EL};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};EN=function(e){var $ptr,e;return 65<=e&&e<=90||97<=e&&e<=122;};EO=function(e){var $ptr,e;return EN(e)||48<=e&&e<=57;};EP=function(e,f){var $ptr,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if((f===e.$length)||!EN(((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]))){return[f,0];}g=f+1>>0;case 1:if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]);if(EO(h)){g=g+(1)>>0;$s=1;continue;}if(((h===58)||(h===45))&&(g+1>>0)>0,((i<0||i>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+i])))){g=g+(2)>>0;$s=1;continue;}$s=2;continue;$s=1;continue;case 2:j=A.ToLower($bytesToString($subslice(e,f,g)));$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}return[g,(k=EM[$String.keyFor(j)],k!==undefined?k.v:0)];}return;}if($f===undefined){$f={$blk:EP};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};EQ=function(e,f){var $ptr,e,f,g,h;g=f;while(true){if(!(g=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+g]);if(h===32||h===9||h===10||h===12||h===13){}else{return g;}g=g+(1)>>0;}return e.$length;};ER=function(e){var $ptr,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=AB(e);$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];i=f[1];if(i===6){return h;}j=A.IndexRune(h,58);if(j>=0&&A.IndexRune(h.substring(0,j),47)<0){$s=2;continue;}$s=3;continue;case 2:k=A.ToLower(h.substring(0,j));$s=4;case 4:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!(l==="http")&&!(l==="https")&&!(l==="mailto")){return"#ZgotmplZ";}case 3:return h;}return;}if($f===undefined){$f={$blk:ER};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};ES=function(e){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=EU(false,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:ES};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};ET=function(e){var $ptr,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=EU(true,e);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}return f;}return;}if($f===undefined){$f={$blk:ET};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};EU=function(e,f){var $ptr,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=[g];i=AB(f);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=h[0];k=h[1];if(k===6){e=true;}g[0]=new D.Buffer.ptr(EY.nil,0,FC.zero(),FD.zero(),0);l=0;m=0;n=j.length;o=m;p=n;case 2:if(!(o>0;$s=2;continue;}$s=8;continue;case 5:o=o+(1)>>0;$s=2;continue;$s=8;continue;case 6:if(e&&(o+2>>0)>0)))&&AT(j.charCodeAt((o+2>>0)))){o=o+(1)>>0;$s=2;continue;}$s=8;continue;case 7:if(97<=q&&q<=122){o=o+(1)>>0;$s=2;continue;}if(65<=q&&q<=90){o=o+(1)>>0;$s=2;continue;}if(48<=q&&q<=57){o=o+(1)>>0;$s=2;continue;}case 8:g[0].WriteString(j.substring(l,o));s=B.Fprintf(g[0],"%%%02x",new FA([new $Uint8(q)]));$s=9;case 9:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}s;l=o+1>>0;o=o+(1)>>0;$s=2;continue;case 3:if(l===0){return j;}g[0].WriteString(j.substring(l));return g[0].String();}return;}if($f===undefined){$f={$blk:EU};}$f.$ptr=$ptr;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};AC.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"eq",name:"eq",pkg:"html/template",typ:$funcType([AC],[$Bool],false)},{prop:"mangle",name:"mangle",pkg:"html/template",typ:$funcType([$String],[$String],false)}];AD.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AH.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AJ.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AM.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];AO.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];FF.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];GB.methods=[{prop:"escape",name:"escape",pkg:"html/template",typ:$funcType([AC,G.Node],[AC],false)},{prop:"escapeAction",name:"escapeAction",pkg:"html/template",typ:$funcType([AC,FH],[AC],false)},{prop:"escapeBranch",name:"escapeBranch",pkg:"html/template",typ:$funcType([AC,GA,$String],[AC],false)},{prop:"escapeList",name:"escapeList",pkg:"html/template",typ:$funcType([AC,FL],[AC],false)},{prop:"escapeListConditionally",name:"escapeListConditionally",pkg:"html/template",typ:$funcType([AC,FL,GC],[AC,$Bool],false)},{prop:"escapeTemplate",name:"escapeTemplate",pkg:"html/template",typ:$funcType([AC,FI],[AC],false)},{prop:"escapeTree",name:"escapeTree",pkg:"html/template",typ:$funcType([AC,G.Node,$String,$Int],[AC,$String],false)},{prop:"computeOutCtx",name:"computeOutCtx",pkg:"html/template",typ:$funcType([AC,FU],[AC],false)},{prop:"escapeTemplateBody",name:"escapeTemplateBody",pkg:"html/template",typ:$funcType([AC,FU],[AC,$Bool],false)},{prop:"escapeText",name:"escapeText",pkg:"html/template",typ:$funcType([AC,FJ],[AC],false)},{prop:"editActionNode",name:"editActionNode",pkg:"html/template",typ:$funcType([FH,EX],[],false)},{prop:"editTemplateNode",name:"editTemplateNode",pkg:"html/template",typ:$funcType([FI,$String],[],false)},{prop:"editTextNode",name:"editTextNode",pkg:"html/template",typ:$funcType([FJ,EY],[],false)},{prop:"commit",name:"commit",pkg:"html/template",typ:$funcType([],[],false)},{prop:"template",name:"template",pkg:"html/template",typ:$funcType([$String],[FU],false)}];FG.methods=[{prop:"Templates",name:"Templates",pkg:"",typ:$funcType([],[FZ],false)},{prop:"Option",name:"Option",pkg:"",typ:$funcType([EX],[FG],true)},{prop:"escape",name:"escape",pkg:"html/template",typ:$funcType([],[$error],false)},{prop:"Execute",name:"Execute",pkg:"",typ:$funcType([I.Writer,$emptyInterface],[$error],false)},{prop:"ExecuteTemplate",name:"ExecuteTemplate",pkg:"",typ:$funcType([I.Writer,$String,$emptyInterface],[$error],false)},{prop:"lookupAndEscapeTemplate",name:"lookupAndEscapeTemplate",pkg:"html/template",typ:$funcType([$String],[FG,$error],false)},{prop:"Parse",name:"Parse",pkg:"",typ:$funcType([$String],[FG,$error],false)},{prop:"AddParseTree",name:"AddParseTree",pkg:"",typ:$funcType([$String,FE],[FG,$error],false)},{prop:"Clone",name:"Clone",pkg:"",typ:$funcType([],[FG,$error],false)},{prop:"New",name:"New",pkg:"",typ:$funcType([$String],[FG],false)},{prop:"new$",name:"new",pkg:"html/template",typ:$funcType([$String],[FG],false)},{prop:"Name",name:"Name",pkg:"",typ:$funcType([],[$String],false)},{prop:"Funcs",name:"Funcs",pkg:"",typ:$funcType([DF],[FG],false)},{prop:"Delims",name:"Delims",pkg:"",typ:$funcType([$String,$String],[FG],false)},{prop:"Lookup",name:"Lookup",pkg:"",typ:$funcType([$String],[FG],false)},{prop:"ParseFiles",name:"ParseFiles",pkg:"",typ:$funcType([EX],[FG,$error],true)},{prop:"ParseGlob",name:"ParseGlob",pkg:"",typ:$funcType([$String],[FG,$error],false)}];AC.init([{prop:"state",name:"state",pkg:"html/template",typ:AD,tag:""},{prop:"delim",name:"delim",pkg:"html/template",typ:AH,tag:""},{prop:"urlPart",name:"urlPart",pkg:"html/template",typ:AJ,tag:""},{prop:"jsCtx",name:"jsCtx",pkg:"html/template",typ:AL,tag:""},{prop:"attr",name:"attr",pkg:"html/template",typ:AO,tag:""},{prop:"element",name:"element",pkg:"html/template",typ:AM,tag:""},{prop:"err",name:"err",pkg:"html/template",typ:FF,tag:""}]);BC.init([{prop:"ErrorCode",name:"ErrorCode",pkg:"",typ:BD,tag:""},{prop:"Node",name:"Node",pkg:"",typ:G.Node,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""},{prop:"Line",name:"Line",pkg:"",typ:$Int,tag:""},{prop:"Description",name:"Description",pkg:"",typ:$String,tag:""}]);BI.init([{prop:"tmpl",name:"tmpl",pkg:"html/template",typ:FG,tag:""},{prop:"output",name:"output",pkg:"html/template",typ:GD,tag:""},{prop:"derived",name:"derived",pkg:"html/template",typ:GE,tag:""},{prop:"called",name:"called",pkg:"html/template",typ:GF,tag:""},{prop:"actionNodeEdits",name:"actionNodeEdits",pkg:"html/template",typ:GG,tag:""},{prop:"templateNodeEdits",name:"templateNodeEdits",pkg:"html/template",typ:GH,tag:""},{prop:"textNodeEdits",name:"textNodeEdits",pkg:"html/template",typ:GI,tag:""}]);DB.init([{prop:"escapeErr",name:"escapeErr",pkg:"html/template",typ:$error,tag:""},{prop:"text",name:"text",pkg:"html/template",typ:FU,tag:""},{prop:"Tree",name:"Tree",pkg:"",typ:FE,tag:""},{prop:"nameSpace",name:"",pkg:"html/template",typ:GJ,tag:""}]);DD.init([{prop:"mu",name:"mu",pkg:"html/template",typ:N.Mutex,tag:""},{prop:"set",name:"set",pkg:"html/template",typ:GK,tag:""}]);DF.init($String,$emptyInterface);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=K.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=L.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=M.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=N.$init();$s=10;case 10:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=J.$init();$s=11;case 11:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=13;case 13:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=14;case 14:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}O=$makeMap($String.keyFor,[{k:"accept",v:0},{k:"accept-charset",v:7},{k:"action",v:6},{k:"alt",v:0},{k:"archive",v:6},{k:"async",v:7},{k:"autocomplete",v:0},{k:"autofocus",v:0},{k:"autoplay",v:0},{k:"background",v:6},{k:"border",v:0},{k:"checked",v:0},{k:"cite",v:6},{k:"challenge",v:7},{k:"charset",v:7},{k:"class",v:0},{k:"classid",v:6},{k:"codebase",v:6},{k:"cols",v:0},{k:"colspan",v:0},{k:"content",v:7},{k:"contenteditable",v:0},{k:"contextmenu",v:0},{k:"controls",v:0},{k:"coords",v:0},{k:"crossorigin",v:7},{k:"data",v:6},{k:"datetime",v:0},{k:"default",v:0},{k:"defer",v:7},{k:"dir",v:0},{k:"dirname",v:0},{k:"disabled",v:0},{k:"draggable",v:0},{k:"dropzone",v:0},{k:"enctype",v:7},{k:"for",v:0},{k:"form",v:7},{k:"formaction",v:6},{k:"formenctype",v:7},{k:"formmethod",v:7},{k:"formnovalidate",v:7},{k:"formtarget",v:0},{k:"headers",v:0},{k:"height",v:0},{k:"hidden",v:0},{k:"high",v:0},{k:"href",v:6},{k:"hreflang",v:0},{k:"http-equiv",v:7},{k:"icon",v:6},{k:"id",v:0},{k:"ismap",v:0},{k:"keytype",v:7},{k:"kind",v:0},{k:"label",v:0},{k:"lang",v:0},{k:"language",v:7},{k:"list",v:0},{k:"longdesc",v:6},{k:"loop",v:0},{k:"low",v:0},{k:"manifest",v:6},{k:"max",v:0},{k:"maxlength",v:0},{k:"media",v:0},{k:"mediagroup",v:0},{k:"method",v:7},{k:"min",v:0},{k:"multiple",v:0},{k:"name",v:0},{k:"novalidate",v:7},{k:"open",v:0},{k:"optimum",v:0},{k:"pattern",v:7},{k:"placeholder",v:0},{k:"poster",v:6},{k:"profile",v:6},{k:"preload",v:0},{k:"pubdate",v:0},{k:"radiogroup",v:0},{k:"readonly",v:0},{k:"rel",v:7},{k:"required",v:0},{k:"reversed",v:0},{k:"rows",v:0},{k:"rowspan",v:0},{k:"sandbox",v:7},{k:"spellcheck",v:0},{k:"scope",v:0},{k:"scoped",v:0},{k:"seamless",v:0},{k:"selected",v:0},{k:"shape",v:0},{k:"size",v:0},{k:"sizes",v:0},{k:"span",v:0},{k:"src",v:6},{k:"srcdoc",v:2},{k:"srclang",v:0},{k:"start",v:0},{k:"step",v:0},{k:"style",v:1},{k:"tabindex",v:0},{k:"target",v:0},{k:"title",v:0},{k:"type",v:7},{k:"usemap",v:6},{k:"value",v:7},{k:"width",v:0},{k:"wrap",v:0},{k:"xmlns",v:6}]);a=C.TypeOf(EV.nil).Elem();$s=15;case 15:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}Y=a;b=C.TypeOf(EW.nil).Elem();$s=16;case 16:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}Z=b;AE=$toNativeArray($kindString,["stateText","stateTag","stateAttrName","stateAfterName","stateBeforeValue","stateHTMLCmt","stateRCDATA","stateAttr","stateURL","stateJS","stateJSDqStr","stateJSSqStr","stateJSRegexp","stateJSBlockCmt","stateJSLineCmt","stateCSS","stateCSSDqStr","stateCSSSqStr","stateCSSDqURL","stateCSSSqURL","stateCSSURL","stateCSSBlockCmt","stateCSSLineCmt","stateError"]);AI=$toNativeArray($kindString,["delimNone","delimDoubleQuote","delimSingleQuote","delimSpaceOrTagEnd"]);AK=$toNativeArray($kindString,["urlPartNone","urlPartPreQuery","urlPartQueryOrFrag","urlPartUnknown"]);AN=$toNativeArray($kindString,["elementNone","elementScript","elementStyle","elementTextarea","elementTitle"]);AP=$toNativeArray($kindString,["attrNone","attrScript","attrStyle","attrURL"]);AY=new EX(["\\0","","","","","","","","","\\9","\\a","","\\c","\\d","","","","","","","","","","","","","","","","","","","","","\\22","","","","\\26","\\27","\\28","\\29","","\\2b","","","","\\2f","","","","","","","","","","","\\3a","\\3b","\\3c","","\\3e","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\7b","","\\7d"]);AZ=new EY($stringToBytes("expression"));BA=new EY($stringToBytes("mozbinding"));BH=$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:"html"},{k:"html_template_htmlescaper",v:"html"},{k:"html_template_nospaceescaper",v:"html"},{k:"html_template_rcdataescaper",v:"html"},{k:"html_template_urlescaper",v:"urlquery"},{k:"html_template_urlnormalizer",v:"urlquery"}]);BM=$makeMap($String.keyFor,[{k:"html_template_commentescaper",v:$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:true},{k:"html_template_nospaceescaper",v:true},{k:"html_template_htmlescaper",v:true}])},{k:"html_template_cssescaper",v:$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:true}])},{k:"html_template_jsregexpescaper",v:$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:true}])},{k:"html_template_jsstrescaper",v:$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:true}])},{k:"html_template_urlescaper",v:$makeMap($String.keyFor,[{k:"html_template_urlnormalizer",v:true}])}]);BT=$toNativeArray($kindString,["","\"","'"," \t\n\f\r>"]);BU=new EY($stringToBytes(""));DP=$toNativeArray($kindUint8,[0,9,15,6,6]);DT=$toNativeArray($kindUint8,[7,9,15,8]);DW=$toNativeArray($kindSlice,[EY.nil,new EY($stringToBytes("script")),new EY($stringToBytes("style")),new EY($stringToBytes("textarea")),new EY($stringToBytes("title"))]);DX=new EY($stringToBytes(" \t\n\f/"));EF=new EY($stringToBytes("*/"));EM=$makeMap($String.keyFor,[{k:"script",v:1},{k:"style",v:2},{k:"textarea",v:3},{k:"title",v:4}]);DL=$toNativeArray($kindFunc,[DO,DQ,DR,DS,DU,DV,DZ,EB,EC,ED,EE,EE,EE,EG,EH,EI,EJ,EJ,EJ,EJ,EJ,EG,EH,EK]);BG=$makeMap($String.keyFor,[{k:"html_template_attrescaper",v:new FB(CE)},{k:"html_template_commentescaper",v:new FB(CO)},{k:"html_template_cssescaper",v:new FB(AX)},{k:"html_template_cssvaluefilter",v:new FB(BB)},{k:"html_template_htmlnamefilter",v:new FB(CN)},{k:"html_template_htmlescaper",v:new FB(CG)},{k:"html_template_jsregexpescaper",v:new FB(CV)},{k:"html_template_jsstrescaper",v:new FB(CU)},{k:"html_template_jsvalescaper",v:new FB(CT)},{k:"html_template_nospaceescaper",v:new FB(CD)},{k:"html_template_rcdataescaper",v:new FB(CF)},{k:"html_template_urlescaper",v:new FB(ES)},{k:"html_template_urlfilter",v:new FB(ER)},{k:"html_template_urlnormalizer",v:new FB(ET)}]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/temple/temple"]=(function(){var $pkg={},$init,A,B,K,C,D,E,J,L,M,F,G,H,N,O,I,X,Y,Z,AA,AF,AH,AI,AJ,AK,AL,AN,AO,AP,AQ,W,AB,AD;A=$packages["bytes"];B=$packages["errors"];K=$packages["fmt"];C=$packages["github.com/albrow/prtty"];D=$packages["github.com/go-humble/temple/temple/assets"];E=$packages["go/format"];J=$packages["honnef.co/go/js/dom"];L=$packages["html/template"];M=$packages["io"];F=$packages["io/ioutil"];G=$packages["os"];H=$packages["path/filepath"];N=$packages["strings"];O=$packages["testing"];I=$packages["text/template"];X=$pkg.Template=$newType(0,$kindStruct,"temple.Template","Template","github.com/go-humble/temple/temple",function(Template_){this.$val=this;if(arguments.length===0){this.Template=AL.nil;return;}this.Template=Template_;});Y=$pkg.Partial=$newType(0,$kindStruct,"temple.Partial","Partial","github.com/go-humble/temple/temple",function(Template_){this.$val=this;if(arguments.length===0){this.Template=AL.nil;return;}this.Template=Template_;});Z=$pkg.Layout=$newType(0,$kindStruct,"temple.Layout","Layout","github.com/go-humble/temple/temple",function(Template_){this.$val=this;if(arguments.length===0){this.Template=AL.nil;return;}this.Template=Template_;});AA=$pkg.Group=$newType(0,$kindStruct,"temple.Group","Group","github.com/go-humble/temple/temple",function(templates_,partials_,layouts_,Funcs_){this.$val=this;if(arguments.length===0){this.templates=false;this.partials=false;this.layouts=false;this.Funcs=false;return;}this.templates=templates_;this.partials=partials_;this.layouts=layouts_;this.Funcs=Funcs_;});AF=$sliceType($emptyInterface);AH=$sliceType($Uint8);AI=$ptrType(X);AJ=$ptrType(Y);AK=$ptrType(Z);AL=$ptrType(L.Template);AN=$ptrType(AA);AO=$mapType($String,AI);AP=$mapType($String,AJ);AQ=$mapType($String,AK);W=function(a,b,c){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=A.NewBuffer(new AH([]));e=a.Execute(d,c);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;if(!($interfaceIsEqual(f,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:return f;case 3:$r=b.SetInnerHTML(d.String());$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:W};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.ExecuteEl=W;X.ptr.prototype.ExecuteEl=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=W(c,a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:X.ptr.prototype.ExecuteEl};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};X.prototype.ExecuteEl=function(a,b){return this.$val.ExecuteEl(a,b);};Y.ptr.prototype.ExecuteEl=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=W(c,a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:Y.ptr.prototype.ExecuteEl};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};Y.prototype.ExecuteEl=function(a,b){return this.$val.ExecuteEl(a,b);};Z.ptr.prototype.ExecuteEl=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=W(c,a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:Z.ptr.prototype.ExecuteEl};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};Z.prototype.ExecuteEl=function(a,b){return this.$val.ExecuteEl(a,b);};AA.ptr.prototype.AddAllInline=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=J.GetWindow().Document();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}c=b;d=c.QuerySelectorAll("script[type=\"text/template\"]");$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=e;g=0;case 3:if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);j=h.GetAttribute("data-kind");$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}i=j;if(i==="template"){$s=6;continue;}if(i==="partial"){$s=7;continue;}if(i==="layout"){$s=8;continue;}$s=9;continue;case 6:k=a.AddInlineTemplate(h);$s=11;case 11:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}l=k;if(!($interfaceIsEqual(l,$ifaceNil))){$s=12;continue;}$s=13;continue;case 12:return l;case 13:$s=10;continue;case 7:m=a.AddInlinePartial(h);$s=14;case 14:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}n=m;if(!($interfaceIsEqual(n,$ifaceNil))){$s=15;continue;}$s=16;continue;case 15:return n;case 16:$s=10;continue;case 8:o=a.AddInlineLayout(h);$s=17;case 17:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;if(!($interfaceIsEqual(p,$ifaceNil))){$s=18;continue;}$s=19;continue;case 18:return p;case 19:$s=10;continue;case 9:q=a.AddInlineTemplate(h);$s=20;case 20:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}r=q;if(!($interfaceIsEqual(r,$ifaceNil))){$s=21;continue;}$s=22;continue;case 21:return r;case 22:case 10:g++;$s=3;continue;case 4:return $ifaceNil;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddAllInline};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddAllInline=function(){return this.$val.AddAllInline();};AA.ptr.prototype.AddInlineTemplate=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.ID();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=a.InnerHTML();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=b.AddTemplate(d,f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddInlineTemplate};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddInlineTemplate=function(a){return this.$val.AddInlineTemplate(a);};AA.ptr.prototype.AddInlinePartial=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.ID();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=a.InnerHTML();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=b.AddPartial(d,f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddInlinePartial};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddInlinePartial=function(a){return this.$val.AddInlinePartial(a);};AA.ptr.prototype.AddInlineLayout=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.ID();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;e=a.InnerHTML();$s=2;case 2:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;g=b.AddLayout(d,f);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddInlineLayout};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddInlineLayout=function(a){return this.$val.AddInlineLayout(a);};AA.ptr.prototype.GetTemplate=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(this,AA);c=(d=b.templates[$String.keyFor(a)],d!==undefined?[d.v,true]:[AI.nil,false]);e=c[0];f=c[1];if(!f){$s=1;continue;}$s=2;continue;case 1:g=K.Errorf("Could not find template named %s",new AF([new $String(a)]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return[AI.nil,g];case 2:return[e,$ifaceNil];}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.GetTemplate};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.GetTemplate=function(a){return this.$val.GetTemplate(a);};AA.ptr.prototype.GetPartial=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(this,AA);c=(d=b.partials[$String.keyFor(a)],d!==undefined?[d.v,true]:[AJ.nil,false]);e=c[0];f=c[1];if(!f){$s=1;continue;}$s=2;continue;case 1:g=K.Errorf("Could not find partial named %s",new AF([new $String(a)]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return[AJ.nil,g];case 2:return[e,$ifaceNil];}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.GetPartial};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.GetPartial=function(a){return this.$val.GetPartial(a);};AA.ptr.prototype.GetLayout=function(a){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(this,AA);c=(d=b.layouts[$String.keyFor(a)],d!==undefined?[d.v,true]:[AK.nil,false]);e=c[0];f=c[1];if(!f){$s=1;continue;}$s=2;continue;case 1:g=K.Errorf("Could not find layout named %s",new AF([new $String(a)]));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return[AK.nil,g];case 2:return[e,$ifaceNil];}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.GetLayout};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.GetLayout=function(a){return this.$val.GetLayout(a);};AA.ptr.prototype.MustGetTemplate=function(a){var $ptr,a,b,c,d,e,f;b=$clone(this,AA);c=(d=b.templates[$String.keyFor(a)],d!==undefined?[d.v,true]:[AI.nil,false]);e=c[0];f=c[1];if(!f){$panic(new $String("Could not find template named "+a));}return e;};AA.prototype.MustGetTemplate=function(a){return this.$val.MustGetTemplate(a);};AA.ptr.prototype.MustGetPartial=function(a){var $ptr,a,b,c,d,e,f;b=$clone(this,AA);c=(d=b.partials[$String.keyFor(a)],d!==undefined?[d.v,true]:[AJ.nil,false]);e=c[0];f=c[1];if(!f){$panic(new $String("Could not find partial named "+a));}return e;};AA.prototype.MustGetPartial=function(a){return this.$val.MustGetPartial(a);};AA.ptr.prototype.MustGetLayout=function(a){var $ptr,a,b,c,d,e,f;b=$clone(this,AA);c=(d=b.layouts[$String.keyFor(a)],d!==undefined?[d.v,true]:[AK.nil,false]);e=c[0];f=c[1];if(!f){$panic(new $String("Could not find layout named "+a));}return e;};AA.prototype.MustGetLayout=function(a){return this.$val.MustGetLayout(a);};AB=function(){var $ptr;return new AA.ptr($makeMap($String.keyFor,[]),$makeMap($String.keyFor,[]),$makeMap($String.keyFor,[]),$makeMap($String.keyFor,[]));};$pkg.NewGroup=AB;AA.ptr.prototype.AddFunc=function(a,b){var $ptr,a,b,c,d;c=this;d=a;(c.Funcs||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(d)]={k:d,v:b};};AA.prototype.AddFunc=function(a,b){return this.$val.AddFunc(a,b);};Y.ptr.prototype.PrefixedName=function(){var $ptr,a;a=$clone(this,Y);if(N.HasPrefix(a.Template.Name(),$pkg.PartialPrefix)){return a.Template.Name();}else{return $pkg.PartialPrefix+a.Template.Name();}};Y.prototype.PrefixedName=function(){return this.$val.PrefixedName();};Z.ptr.prototype.PrefixedName=function(){var $ptr,a;a=$clone(this,Z);if(N.HasPrefix(a.Template.Name(),$pkg.LayoutPrefix)){return a.Template.Name();}else{return $pkg.LayoutPrefix+a.Template.Name();}};Z.prototype.PrefixedName=function(){return this.$val.PrefixedName();};AA.ptr.prototype.AddTemplate=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;f=L.New(a).Funcs(d.Funcs);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f.Parse(b);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}e=g;h=e[0];i=e[1];if(!($interfaceIsEqual(i,$ifaceNil))){return i;}c[0]=new X.ptr(h);j=h.Name();(d.templates||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(j)]={k:j,v:c[0]};k=d.associateTemplate(c[0]);$s=3;case 3:if($c){$c=false;k=k.$blk();}if(k&&k.$blk!==undefined){break s;}return k;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddTemplate};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddTemplate=function(a,b){return this.$val.AddTemplate(a,b);};AA.ptr.prototype.AddTemplateFile=function(a,b){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=F.ReadFile(b);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(!($interfaceIsEqual(g,$ifaceNil))){return g;}h=c.AddTemplate(a,$bytesToString(f));$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddTemplateFile};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddTemplateFile=function(a,b){return this.$val.AddTemplateFile(a,b);};AA.ptr.prototype.AddTemplateFiles=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=AD(a,$methodVal(b,"AddTemplateFile"));$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return c;}return;}if($f===undefined){$f={$blk:AA.ptr.prototype.AddTemplateFiles};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AA.prototype.AddTemplateFiles=function(a){return this.$val.AddTemplateFiles(a);};AA.ptr.prototype.associateTemplate=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=$clone(a,X);b=this;c=b.partials;d=0;e=$keys(c);case 1:if(!(d\n\t{{ len .Todos.Remaining }}\n\titem{{ if ne (len .Todos.Remaining) 1}}s{{end}} left\n\n\n\n\n");$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}a=c;if(!($interfaceIsEqual(a,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(a);case 3:d=b.AddPartial("todo","\n\t
            \n\t\t\n\t\t\n\t\t\n\t
            \n\t\n\n");$s=4;case 4:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}a=d;if(!($interfaceIsEqual(a,$ifaceNil))){$s=5;continue;}$s=6;continue;case 5:$panic(a);case 6:e=b.AddTemplate("app","
            \n\t

            todos

            \n\t\n
            \n{{ if gt (len .Todos.All) 0 }}\n
            \n\t\n\t\n\t
              \n\t
            \n
            \n{{ end }}\n{{ if gt (len .Todos.All) 0 }}\n
            \n\t{{ template \"partials/footer\" . }}\n
            \n{{ end }}\n");$s=7;case 7:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}a=e;if(!($interfaceIsEqual(a,$ifaceNil))){$s=8;continue;}$s=9;continue;case 8:$panic(a);case 9:$pkg.GetTemplate=$methodVal(b,"GetTemplate");$pkg.GetPartial=$methodVal(b,"GetPartial");$pkg.GetLayout=$methodVal(b,"GetLayout");$pkg.MustGetTemplate=$methodVal(b,"MustGetTemplate");$pkg.MustGetPartial=$methodVal(b,"MustGetPartial");$pkg.MustGetLayout=$methodVal(b,"MustGetLayout");$s=-1;case-1:}return;}if($f===undefined){$f={$blk:B};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$pkg.GetTemplate=$throwNilPointerError;$pkg.GetPartial=$throwNilPointerError;$pkg.GetLayout=$throwNilPointerError;$pkg.MustGetTemplate=$throwNilPointerError;$pkg.MustGetPartial=$throwNilPointerError;$pkg.MustGetLayout=$throwNilPointerError;$r=B();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/view"]=(function(){var $pkg={},$init,B,A,C,D,E,R,S,T,U,V,W,X,G,a,F,J;B=$packages["github.com/gopherjs/gopherjs/js"];A=$packages["honnef.co/go/js/dom"];C=$packages["strings"];D=$pkg.DefaultView=$newType(0,$kindStruct,"view.DefaultView","DefaultView","github.com/go-humble/view",function(el_){this.$val=this;if(arguments.length===0){this.el=$ifaceNil;return;}this.el=el_;});E=$pkg.EventListener=$newType(0,$kindStruct,"view.EventListener","EventListener","github.com/go-humble/view",function(typ_,elements_,listener_,jsListeners_){this.$val=this;if(arguments.length===0){this.typ="";this.elements=R.nil;this.listener=$throwNilPointerError;this.jsListeners=U.nil;return;}this.typ=typ_;this.elements=elements_;this.listener=listener_;this.jsListeners=jsListeners_;});R=$sliceType(A.Element);S=$ptrType(B.Object);T=$funcType([S],[],false);U=$sliceType(T);V=$ptrType(D);W=$ptrType(E);X=$funcType([A.Event],[],false);D.ptr.prototype.Element=function(){var $ptr,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if($interfaceIsEqual(b.el,$ifaceNil)){$s=1;continue;}$s=2;continue;case 1:c=G.CreateElement("div");$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b.el=c;case 2:return b.el;}return;}if($f===undefined){$f={$blk:D.ptr.prototype.Element};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};D.prototype.Element=function(){return this.$val.Element();};D.ptr.prototype.SetElement=function(b){var $ptr,b,c;c=this;c.el=b;};D.prototype.SetElement=function(b){return this.$val.SetElement(b);};F=function(b,c,d,e){var $ptr,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=new E.ptr(c,R.nil,e,U.nil);g=b.Element();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g.QuerySelectorAll(d);$s=2;case 2:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}f.elements=h;i=f.elements;j=0;case 3:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);l=k.AddEventListener(c,true,e);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;f.jsListeners=$append(f.jsListeners,m);j++;$s=3;continue;case 4:return f;}return;}if($f===undefined){$f={$blk:F};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};$pkg.AddEventListener=F;E.ptr.prototype.Remove=function(){var $ptr,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.elements;d=0;case 1:if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);$r=f.RemoveEventListener(b.typ,true,(g=b.jsListeners,((e<0||e>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+e])));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}d++;$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:E.ptr.prototype.Remove};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};E.prototype.Remove=function(){return this.$val.Remove();};E.ptr.prototype.Elements=function(){var $ptr,b;b=this;return b.Elements();};E.prototype.Elements=function(){return this.$val.Elements();};J=function(b,c){var $ptr,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=c.Element();$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}$r=b.AppendChild(d);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J};}$f.$ptr=$ptr;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};$pkg.AppendToEl=J;V.methods=[{prop:"Element",name:"Element",pkg:"",typ:$funcType([],[A.Element],false)},{prop:"SetElement",name:"SetElement",pkg:"",typ:$funcType([A.Element],[],false)}];W.methods=[{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([],[],false)},{prop:"Elements",name:"Elements",pkg:"",typ:$funcType([],[R],false)}];D.init([{prop:"el",name:"el",pkg:"github.com/go-humble/view",typ:A.Element,tag:""}]);E.init([{prop:"typ",name:"typ",pkg:"github.com/go-humble/view",typ:$String,tag:""},{prop:"elements",name:"elements",pkg:"github.com/go-humble/view",typ:R,tag:""},{prop:"listener",name:"listener",pkg:"github.com/go-humble/view",typ:X,tag:""},{prop:"jsListeners",name:"jsListeners",pkg:"github.com/go-humble/view",typ:U,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a=A.GetWindow().Document();$s=4;case 4:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}G=a;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/examples/todomvc/go/views"]=(function(){var $pkg={},$init,B,C,D,E,F,A,I,O,Q,R,S,T,U,V,W,X,Y,Z,AA,G,H,N,a,b,c,J,K,L,M,P;B=$packages["github.com/go-humble/examples/todomvc/go/models"];C=$packages["github.com/go-humble/examples/todomvc/go/templates"];D=$packages["github.com/go-humble/temple/temple"];E=$packages["github.com/go-humble/view"];F=$packages["honnef.co/go/js/dom"];A=$packages["strings"];I=$pkg.App=$newType(0,$kindStruct,"views.App","App","github.com/go-humble/examples/todomvc/go/views",function(Todos_,tmpl_,predicate_,DefaultView_,events_){this.$val=this;if(arguments.length===0){this.Todos=Q.nil;this.tmpl=R.nil;this.predicate=$throwNilPointerError;this.DefaultView=new E.DefaultView.ptr($ifaceNil);this.events=T.nil;return;}this.Todos=Todos_;this.tmpl=tmpl_;this.predicate=predicate_;this.DefaultView=DefaultView_;this.events=events_;});O=$pkg.Todo=$newType(0,$kindStruct,"views.Todo","Todo","github.com/go-humble/examples/todomvc/go/views",function(Model_,tmpl_,DefaultView_,events_){this.$val=this;if(arguments.length===0){this.Model=X.nil;this.tmpl=Y.nil;this.DefaultView=new E.DefaultView.ptr($ifaceNil);this.events=T.nil;return;}this.Model=Model_;this.tmpl=tmpl_;this.DefaultView=DefaultView_;this.events=events_;});Q=$ptrType(B.TodoList);R=$ptrType(D.Template);S=$ptrType(E.EventListener);T=$sliceType(S);U=$mapType($String,$emptyInterface);V=$ptrType(F.HTMLInputElement);W=$ptrType(F.KeyboardEvent);X=$ptrType(B.Todo);Y=$ptrType(D.Partial);Z=$ptrType(I);AA=$ptrType(O);I.ptr.prototype.UseFilter=function(d){var $ptr,d,e;e=this;e.predicate=d;};I.prototype.UseFilter=function(d){return this.$val.UseFilter(d);};J=function(d){var $ptr,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=new I.ptr(d,G,$throwNilPointerError,new E.DefaultView.ptr($ifaceNil),T.nil);f=H.QuerySelector(".todoapp");$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=e.DefaultView.SetElement(f);$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return e;}return;}if($f===undefined){$f={$blk:J};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.NewApp=J;I.ptr.prototype.tmplData=function(){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=F.GetWindow().Location();$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}return $makeMap($String.keyFor,[{k:"Todos",v:d.Todos},{k:"Path",v:new $String($internalize(e.URLUtils.Object.hash,$String))}]);}return;}if($f===undefined){$f={$blk:I.ptr.prototype.tmplData};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.tmplData=function(){return this.$val.tmplData();};I.ptr.prototype.Render=function(){var $ptr,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=d.events;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);$r=g.Remove();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=1;continue;case 2:d.events=new T([]);h=d.DefaultView.Element();$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;j=d.tmplData();$s=5;case 5:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=new U(j);l=d.tmpl.ExecuteEl(i,k);$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=l;if(!($interfaceIsEqual(m,$ifaceNil))){$s=7;continue;}$s=8;continue;case 7:return m;case 8:n=d.DefaultView.Element();$s=9;case 9:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}o=n.QuerySelector(".todo-list");$s=10;case 10:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;r=d.Todos.Filter(d.predicate);$s=11;case 11:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}q=r;s=0;case 12:if(!(s=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+s]);u=P(t);v=H.CreateElement("li");$s=14;case 14:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}$r=u.DefaultView.SetElement(v);$s=15;case 15:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(t.Completed()){$s=16;continue;}$s=17;continue;case 16:w=u.DefaultView.Element();$s=18;case 18:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}$r=L(w,"completed");$s=19;case 19:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 17:$r=E.AppendToEl(p,u);$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}x=u.Render();$s=21;case 21:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;if(!($interfaceIsEqual(y,$ifaceNil))){$s=22;continue;}$s=23;continue;case 22:return y;case 23:s++;$s=12;continue;case 13:$r=d.delegateEvents();$s=24;case 24:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:I.ptr.prototype.Render};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.Render=function(){return this.$val.Render();};I.ptr.prototype.delegateEvents=function(){var $ptr,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=E.AddEventListener(d,"keypress",".new-todo",K(13,$methodVal(d,"CreateTodo")));$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d.events=$append(d.events,e);f=E.AddEventListener(d,"click",".clear-completed",$methodVal(d,"ClearCompleted"));$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d.events=$append(d.events,f);g=E.AddEventListener(d,"click",".toggle-all",$methodVal(d,"ToggleAll"));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}d.events=$append(d.events,g);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I.ptr.prototype.delegateEvents};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.delegateEvents=function(){return this.$val.delegateEvents();};I.ptr.prototype.CreateTodo=function(d){var $ptr,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;g=d.Target();$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=$assertType(g,V,true);h=f[0];i=f[1];if(!i){$panic(new $String("Could not convert event target to dom.HTMLInputElement"));}j=A.TrimSpace($internalize(h.BasicHTMLElement.BasicElement.BasicNode.Object.value,$String));$s=2;case 2:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(!(k==="")){$s=3;continue;}$s=4;continue;case 3:$r=e.Todos.AddTodo(k);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}l=H.QuerySelector(".new-todo");$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}$r=$assertType(l,F.HTMLElement).Focus();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I.ptr.prototype.CreateTodo};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.CreateTodo=function(d){return this.$val.CreateTodo(d);};I.ptr.prototype.ClearCompleted=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;$r=e.Todos.ClearCompleted();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I.ptr.prototype.ClearCompleted};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.ClearCompleted=function(d){return this.$val.ClearCompleted(d);};I.ptr.prototype.ToggleAll=function(d){var $ptr,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=d.Target();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=$assertType(f,V);if(!!!(g.BasicHTMLElement.BasicElement.BasicNode.Object.checked)){$s=2;continue;}$s=3;continue;case 2:$r=e.Todos.UncheckAll();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=4;continue;case 3:$r=e.Todos.CheckAll();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 4:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I.ptr.prototype.ToggleAll};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};I.prototype.ToggleAll=function(d){return this.$val.ToggleAll(d);};K=function(d,e){var $ptr,d,e;return(function $b(f){var $ptr,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:g=$assertType(f,W,true);h=g[0];i=g[1];if(i&&(($parseInt(h.BasicEvent.Object.keyCode)>>0)===d)){$s=1;continue;}$s=2;continue;case 1:$r=e(f);$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;});};L=function(d,e){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=e;g=d.GetAttribute("class");$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;if(!(h==="")){$s=2;continue;}$s=3;continue;case 2:f=h+" "+e;case 3:$r=d.SetAttribute("class",f);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:L};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};M=function(d,e){var $ptr,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=d.GetAttribute("class");$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===e){$s=2;continue;}$s=3;continue;case 2:$r=d.RemoveAttribute("class");$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:h=A.Split(g," ");i=h;j=0;case 5:if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(l===e){$s=7;continue;}$s=8;continue;case 7:m=$appendSlice($subslice(h,0,k),$subslice(h,(k+1>>0)));$r=d.SetAttribute("class",A.Join(m," "));$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 8:j++;$s=5;continue;case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:M};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.$s=$s;$f.$r=$r;return $f;};P=function(d){var $ptr,d;return new O.ptr(d,N,new E.DefaultView.ptr($ifaceNil),T.nil);};$pkg.NewTodo=P;O.ptr.prototype.Render=function(){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=d.events;f=0;case 1:if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);$r=g.Remove();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}f++;$s=1;continue;case 2:d.events=new T([]);h=d.DefaultView.Element();$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=d.tmpl.ExecuteEl(h,d.Model);$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(!($interfaceIsEqual(j,$ifaceNil))){$s=6;continue;}$s=7;continue;case 6:return j;case 7:$r=d.delegateEvents();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return $ifaceNil;}return;}if($f===undefined){$f={$blk:O.ptr.prototype.Render};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.Render=function(){return this.$val.Render();};O.ptr.prototype.delegateEvents=function(){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:d=this;e=E.AddEventListener(d,"click",".toggle",$methodVal(d,"Toggle"));$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d.events=$append(d.events,e);f=E.AddEventListener(d,"click",".destroy",$methodVal(d,"Remove"));$s=2;case 2:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}d.events=$append(d.events,f);g=E.AddEventListener(d,"dblclick","label",$methodVal(d,"Edit"));$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}d.events=$append(d.events,g);h=E.AddEventListener(d,"blur",".edit",$methodVal(d,"CommitEdit"));$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d.events=$append(d.events,h);i=E.AddEventListener(d,"keypress",".edit",K(13,$methodVal(d,"CommitEdit")));$s=5;case 5:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}d.events=$append(d.events,i);j=E.AddEventListener(d,"keydown",".edit",K(27,$methodVal(d,"CancelEdit")));$s=6;case 6:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}d.events=$append(d.events,j);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.delegateEvents};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.delegateEvents=function(){return this.$val.delegateEvents();};O.ptr.prototype.Toggle=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;$r=e.Model.Toggle();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.Toggle};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.Toggle=function(d){return this.$val.Toggle(d);};O.ptr.prototype.Remove=function(d){var $ptr,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;$r=e.Model.Remove();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.Remove};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.Remove=function(d){return this.$val.Remove(d);};O.ptr.prototype.Edit=function(d){var $ptr,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.DefaultView.Element();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=L(f,"editing");$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=e.DefaultView.Element();$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g.QuerySelector(".edit");$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=$assertType(h,V);i.BasicHTMLElement.Focus();i.BasicHTMLElement.BasicElement.BasicNode.Object.selectionStart=($parseInt(i.BasicHTMLElement.BasicElement.BasicNode.Object.selectionEnd)>>0)+$internalize(i.BasicHTMLElement.BasicElement.BasicNode.Object.value,$String).length>>0;$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.Edit};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.Edit=function(d){return this.$val.Edit(d);};O.ptr.prototype.CommitEdit=function(d){var $ptr,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.DefaultView.Element();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f.QuerySelector(".edit");$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=$assertType(g,V);i=A.TrimSpace($internalize(h.BasicHTMLElement.BasicElement.BasicNode.Object.value,$String));$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(!(j==="")){$s=4;continue;}$s=5;continue;case 4:$r=e.Model.SetTitle(j);$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=6;continue;case 5:$r=e.Model.Remove();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.CommitEdit};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.CommitEdit=function(d){return this.$val.CommitEdit(d);};O.ptr.prototype.CancelEdit=function(d){var $ptr,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.DefaultView.Element();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$r=M(f,"editing");$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=e.DefaultView.Element();$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g.QuerySelector(".edit");$s=4;case 4:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=$assertType(h,V);i.BasicHTMLElement.BasicElement.BasicNode.Object.value=$externalize(e.Model.Title(),$String);i.BasicHTMLElement.Blur();$s=-1;case-1:}return;}if($f===undefined){$f={$blk:O.ptr.prototype.CancelEdit};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};O.prototype.CancelEdit=function(d){return this.$val.CancelEdit(d);};Z.methods=[{prop:"UseFilter",name:"UseFilter",pkg:"",typ:$funcType([B.Predicate],[],false)},{prop:"tmplData",name:"tmplData",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:$funcType([],[U],false)},{prop:"Render",name:"Render",pkg:"",typ:$funcType([],[$error],false)},{prop:"delegateEvents",name:"delegateEvents",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:$funcType([],[],false)},{prop:"CreateTodo",name:"CreateTodo",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"ClearCompleted",name:"ClearCompleted",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"ToggleAll",name:"ToggleAll",pkg:"",typ:$funcType([F.Event],[],false)}];AA.methods=[{prop:"Render",name:"Render",pkg:"",typ:$funcType([],[$error],false)},{prop:"delegateEvents",name:"delegateEvents",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:$funcType([],[],false)},{prop:"Toggle",name:"Toggle",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"Remove",name:"Remove",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"Edit",name:"Edit",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"CommitEdit",name:"CommitEdit",pkg:"",typ:$funcType([F.Event],[],false)},{prop:"CancelEdit",name:"CancelEdit",pkg:"",typ:$funcType([F.Event],[],false)}];I.init([{prop:"Todos",name:"Todos",pkg:"",typ:Q,tag:""},{prop:"tmpl",name:"tmpl",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:R,tag:""},{prop:"predicate",name:"predicate",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:B.Predicate,tag:""},{prop:"DefaultView",name:"",pkg:"",typ:E.DefaultView,tag:""},{prop:"events",name:"events",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:T,tag:""}]);O.init([{prop:"Model",name:"Model",pkg:"",typ:X,tag:""},{prop:"tmpl",name:"tmpl",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:Y,tag:""},{prop:"DefaultView",name:"",pkg:"",typ:E.DefaultView,tag:""},{prop:"events",name:"events",pkg:"github.com/go-humble/examples/todomvc/go/views",typ:T,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a=C.MustGetTemplate("app");$s=7;case 7:if($c){$c=false;a=a.$blk();}if(a&&a.$blk!==undefined){break s;}G=a;b=F.GetWindow().Document();$s=8;case 8:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}H=b;c=C.MustGetPartial("todo");$s=9;case 9:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}N=c;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/detect"]=(function(){var $pkg={},$init,A,B,D;A=$packages["github.com/gopherjs/gopherjs/js"];B=function(){var $ptr;return D()&&!($global.document===undefined);};$pkg.IsBrowser=B;D=function(){var $ptr;return!($global===null);};$pkg.IsJavascript=D;$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=A.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["regexp/syntax"]=(function(){var $pkg={},$init,E,B,F,C,A,D,G,H,I,M,N,O,P,Z,AM,BK,BL,BN,BQ,BW,BX,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,CS,CT,K,L,AA,AR,AS,AT,AU,AV,AW,AX,AY,AZ,BA,BB,BC,BD,BE,BF,BG,BH,BI,BJ,BM,J,Q,R,S,T,U,V,W,X,Y,AB,AC,AD,AE,AF,AG,AH,AI,AJ,AK,AL,AN,AO,AP,AQ,BO,BP,BR,BS,BT,BU,BV,BY,BZ,CA;E=$packages["bytes"];B=$packages["sort"];F=$packages["strconv"];C=$packages["strings"];A=$packages["unicode"];D=$packages["unicode/utf8"];G=$pkg.patchList=$newType(4,$kindUint32,"syntax.patchList","patchList","regexp/syntax",null);H=$pkg.frag=$newType(0,$kindStruct,"syntax.frag","frag","regexp/syntax",function(i_,out_){this.$val=this;if(arguments.length===0){this.i=0;this.out=0;return;}this.i=i_;this.out=out_;});I=$pkg.compiler=$newType(0,$kindStruct,"syntax.compiler","compiler","regexp/syntax",function(p_){this.$val=this;if(arguments.length===0){this.p=CF.nil;return;}this.p=p_;});M=$pkg.Error=$newType(0,$kindStruct,"syntax.Error","Error","regexp/syntax",function(Code_,Expr_){this.$val=this;if(arguments.length===0){this.Code="";this.Expr="";return;}this.Code=Code_;this.Expr=Expr_;});N=$pkg.ErrorCode=$newType(8,$kindString,"syntax.ErrorCode","ErrorCode","regexp/syntax",null);O=$pkg.Flags=$newType(2,$kindUint16,"syntax.Flags","Flags","regexp/syntax",null);P=$pkg.parser=$newType(0,$kindStruct,"syntax.parser","parser","regexp/syntax",function(flags_,stack_,free_,numCap_,wholeRegexp_,tmpClass_){this.$val=this;if(arguments.length===0){this.flags=0;this.stack=CI.nil;this.free=CH.nil;this.numCap=0;this.wholeRegexp="";this.tmpClass=CB.nil;return;}this.flags=flags_;this.stack=stack_;this.free=free_;this.numCap=numCap_;this.wholeRegexp=wholeRegexp_;this.tmpClass=tmpClass_;});Z=$pkg.charGroup=$newType(0,$kindStruct,"syntax.charGroup","charGroup","regexp/syntax",function(sign_,class$1_){this.$val=this;if(arguments.length===0){this.sign=0;this.class$1=CB.nil;return;}this.sign=sign_;this.class$1=class$1_;});AM=$pkg.ranges=$newType(0,$kindStruct,"syntax.ranges","ranges","regexp/syntax",function(p_){this.$val=this;if(arguments.length===0){this.p=CL.nil;return;}this.p=p_;});BK=$pkg.Prog=$newType(0,$kindStruct,"syntax.Prog","Prog","regexp/syntax",function(Inst_,Start_,NumCap_){this.$val=this;if(arguments.length===0){this.Inst=CG.nil;this.Start=0;this.NumCap=0;return;}this.Inst=Inst_;this.Start=Start_;this.NumCap=NumCap_;});BL=$pkg.InstOp=$newType(1,$kindUint8,"syntax.InstOp","InstOp","regexp/syntax",null);BN=$pkg.EmptyOp=$newType(1,$kindUint8,"syntax.EmptyOp","EmptyOp","regexp/syntax",null);BQ=$pkg.Inst=$newType(0,$kindStruct,"syntax.Inst","Inst","regexp/syntax",function(Op_,Out_,Arg_,Rune_){this.$val=this;if(arguments.length===0){this.Op=0;this.Out=0;this.Arg=0;this.Rune=CB.nil;return;}this.Op=Op_;this.Out=Out_;this.Arg=Arg_;this.Rune=Rune_;});BW=$pkg.Regexp=$newType(0,$kindStruct,"syntax.Regexp","Regexp","regexp/syntax",function(Op_,Flags_,Sub_,Sub0_,Rune_,Rune0_,Min_,Max_,Cap_,Name_){this.$val=this;if(arguments.length===0){this.Op=0;this.Flags=0;this.Sub=CI.nil;this.Sub0=CJ.zero();this.Rune=CB.nil;this.Rune0=CK.zero();this.Min=0;this.Max=0;this.Cap=0;this.Name="";return;}this.Op=Op_;this.Flags=Flags_;this.Sub=Sub_;this.Sub0=Sub0_;this.Rune=Rune_;this.Rune0=Rune0_;this.Min=Min_;this.Max=Max_;this.Cap=Cap_;this.Name=Name_;});BX=$pkg.Op=$newType(1,$kindUint8,"syntax.Op","Op","regexp/syntax",null);CB=$sliceType($Int32);CC=$sliceType(A.Range16);CD=$sliceType(A.Range32);CE=$sliceType($String);CF=$ptrType(BK);CG=$sliceType(BQ);CH=$ptrType(BW);CI=$sliceType(CH);CJ=$arrayType(CH,1);CK=$arrayType($Int32,2);CL=$ptrType(CB);CM=$ptrType(A.RangeTable);CN=$sliceType($Uint8);CO=$arrayType($Uint8,4);CP=$arrayType($Uint8,64);CQ=$ptrType(I);CR=$ptrType(M);CS=$ptrType(P);CT=$ptrType(BQ);G.prototype.next=function(a){var $ptr,a,b,c,d,e;b=this.$val;e=(c=a.Inst,d=b>>>1>>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]));if(((b&1)>>>0)===0){return(e.Out>>>0);}return(e.Arg>>>0);};$ptrType(G).prototype.next=function(a){return new G(this.$get()).next(a);};G.prototype.patch=function(a,b){var $ptr,a,b,c,d,e,f;c=this.$val;while(true){if(!(!((c===0)))){break;}f=(d=a.Inst,e=c>>>1>>>0,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]));if(((c&1)>>>0)===0){c=(f.Out>>>0);f.Out=b;}else{c=(f.Arg>>>0);f.Arg=b;}}};$ptrType(G).prototype.patch=function(a,b){return new G(this.$get()).patch(a,b);};G.prototype.append=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=this.$val;if(c===0){return b;}if(b===0){return c;}d=c;while(true){e=new G(d).next(a);if(e===0){break;}d=e;}h=(f=a.Inst,g=d>>>1>>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]));if(((d&1)>>>0)===0){h.Out=(b>>>0);}else{h.Arg=(b>>>0);}return c;};$ptrType(G).prototype.append=function(a,b){return new G(this.$get()).append(a,b);};J=function(a){var $ptr,a,b,c;b=new I.ptr(CF.nil);b.init();c=$clone(b.compile(a),H);new G(c.out).patch(b.p,b.inst(4).i);b.p.Start=(c.i>>0);return[b.p,$ifaceNil];};$pkg.Compile=J;I.ptr.prototype.init=function(){var $ptr,a;a=this;a.p=new BK.ptr(CG.nil,0,0);a.p.NumCap=2;a.inst(5);};I.prototype.init=function(){return this.$val.init();};I.ptr.prototype.compile=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x;b=this;c=a.Op;if(c===1){return b.fail();}else if(c===2){return b.nop();}else if(c===3){if(a.Rune.$length===0){return b.nop();}d=new H.ptr(0,0);e=a.Rune;f=0;while(true){if(!(f>0)),a.Flags),H);if(g===0){H.copy(d,h);}else{H.copy(d,b.cat(d,h));}f++;}return d;}else if(c===4){return b.rune(a.Rune,a.Flags);}else if(c===5){return b.rune(K,0);}else if(c===6){return b.rune(L,0);}else if(c===7){return b.empty(1);}else if(c===8){return b.empty(2);}else if(c===9){return b.empty(4);}else if(c===10){return b.empty(8);}else if(c===11){return b.empty(16);}else if(c===12){return b.empty(32);}else if(c===13){i=$clone(b.cap(((a.Cap<<1>>0)>>>0)),H);k=$clone(b.compile((j=a.Sub,(0>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]))),H);l=$clone(b.cap((((a.Cap<<1>>0)|1)>>>0)),H);return b.cat(b.cat(i,k),l);}else if(c===14){return b.star(b.compile((m=a.Sub,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]))),!((((a.Flags&32)>>>0)===0)));}else if(c===15){return b.plus(b.compile((n=a.Sub,(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]))),!((((a.Flags&32)>>>0)===0)));}else if(c===16){return b.quest(b.compile((o=a.Sub,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0]))),!((((a.Flags&32)>>>0)===0)));}else if(c===18){if(a.Sub.$length===0){return b.nop();}p=new H.ptr(0,0);q=a.Sub;r=0;while(true){if(!(r=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]);if(s===0){H.copy(p,b.compile(t));}else{H.copy(p,b.cat(p,b.compile(t)));}r++;}return p;}else if(c===19){u=new H.ptr(0,0);v=a.Sub;w=0;while(true){if(!(w=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w]);H.copy(u,b.alt(u,b.compile(x)));w++;}return u;}$panic(new $String("regexp: unhandled case in compile"));};I.prototype.compile=function(a){return this.$val.compile(a);};I.ptr.prototype.inst=function(a){var $ptr,a,b,c;b=this;c=new H.ptr((b.p.Inst.$length>>>0),0);b.p.Inst=$append(b.p.Inst,new BQ.ptr(a,0,0,CB.nil));return c;};I.prototype.inst=function(a){return this.$val.inst(a);};I.ptr.prototype.nop=function(){var $ptr,a,b;a=this;b=$clone(a.inst(6),H);b.out=((b.i<<1>>>0)>>>0);return b;};I.prototype.nop=function(){return this.$val.nop();};I.ptr.prototype.fail=function(){var $ptr,a;a=this;return new H.ptr(0,0);};I.prototype.fail=function(){return this.$val.fail();};I.ptr.prototype.cap=function(a){var $ptr,a,b,c,d,e;b=this;c=$clone(b.inst(2),H);c.out=((c.i<<1>>>0)>>>0);(d=b.p.Inst,e=c.i,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])).Arg=a;if(b.p.NumCap<((a>>0)+1>>0)){b.p.NumCap=(a>>0)+1>>0;}return c;};I.prototype.cap=function(a){return this.$val.cap(a);};I.ptr.prototype.cat=function(a,b){var $ptr,a,b,c;b=$clone(b,H);a=$clone(a,H);c=this;if((a.i===0)||(b.i===0)){return new H.ptr(0,0);}new G(a.out).patch(c.p,b.i);return new H.ptr(a.i,b.out);};I.prototype.cat=function(a,b){return this.$val.cat(a,b);};I.ptr.prototype.alt=function(a,b){var $ptr,a,b,c,d,e,f,g;b=$clone(b,H);a=$clone(a,H);c=this;if(a.i===0){return b;}if(b.i===0){return a;}d=$clone(c.inst(0),H);g=(e=c.p.Inst,f=d.i,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));g.Out=a.i;g.Arg=b.i;d.out=new G(a.out).append(c.p,b.out);return d;};I.prototype.alt=function(a,b){return this.$val.alt(a,b);};I.ptr.prototype.quest=function(a,b){var $ptr,a,b,c,d,e,f,g;a=$clone(a,H);c=this;d=$clone(c.inst(0),H);g=(e=c.p.Inst,f=d.i,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));if(b){g.Arg=a.i;d.out=((d.i<<1>>>0)>>>0);}else{g.Out=a.i;d.out=((((d.i<<1>>>0)|1)>>>0)>>>0);}d.out=new G(d.out).append(c.p,a.out);return d;};I.prototype.quest=function(a,b){return this.$val.quest(a,b);};I.ptr.prototype.star=function(a,b){var $ptr,a,b,c,d,e,f,g;a=$clone(a,H);c=this;d=$clone(c.inst(0),H);g=(e=c.p.Inst,f=d.i,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));if(b){g.Arg=a.i;d.out=((d.i<<1>>>0)>>>0);}else{g.Out=a.i;d.out=((((d.i<<1>>>0)|1)>>>0)>>>0);}new G(a.out).patch(c.p,d.i);return d;};I.prototype.star=function(a,b){return this.$val.star(a,b);};I.ptr.prototype.plus=function(a,b){var $ptr,a,b,c;a=$clone(a,H);c=this;return new H.ptr(a.i,c.star(a,b).out);};I.prototype.plus=function(a,b){return this.$val.plus(a,b);};I.ptr.prototype.empty=function(a){var $ptr,a,b,c,d,e;b=this;c=$clone(b.inst(3),H);(d=b.p.Inst,e=c.i,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e])).Arg=(a>>>0);c.out=((c.i<<1>>>0)>>>0);return c;};I.prototype.empty=function(a){return this.$val.empty(a);};I.ptr.prototype.rune=function(a,b){var $ptr,a,b,c,d,e,f,g;c=this;d=$clone(c.inst(7),H);g=(e=c.p.Inst,f=d.i,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));g.Rune=a;b=(b&(1))>>>0;if(!((a.$length===1))||(A.SimpleFold((0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]))===(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]))){b=(b&~(1))<<16>>>16;}g.Arg=(b>>>0);d.out=((d.i<<1>>>0)>>>0);if((((b&1)>>>0)===0)&&((a.$length===1)||(a.$length===2)&&((0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])===(1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])))){g.Op=8;}else if((a.$length===2)&&((0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])===0)&&((1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])===1114111)){g.Op=9;}else if((a.$length===4)&&((0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0])===0)&&((1>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+1])===9)&&((2>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+2])===11)&&((3>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+3])===1114111)){g.Op=10;}return d;};I.prototype.rune=function(a,b){return this.$val.rune(a,b);};M.ptr.prototype.Error=function(){var $ptr,a;a=this;return"error parsing regexp: "+new N(a.Code).String()+": `"+a.Expr+"`";};M.prototype.Error=function(){return this.$val.Error();};N.prototype.String=function(){var $ptr,a;a=this.$val;return a;};$ptrType(N).prototype.String=function(){return new N(this.$get()).String();};P.ptr.prototype.newRegexp=function(a){var $ptr,a,b,c;b=this;c=b.free;if(!(c===CH.nil)){b.free=c.Sub0[0];BW.copy(c,new BW.ptr(0,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,""));}else{c=new BW.ptr(0,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");}c.Op=a;return c;};P.prototype.newRegexp=function(a){return this.$val.newRegexp(a);};P.ptr.prototype.reuse=function(a){var $ptr,a,b;b=this;a.Sub0[0]=b.free;b.free=a;};P.prototype.reuse=function(a){return this.$val.reuse(a);};P.ptr.prototype.push=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;b=this;if((a.Op===4)&&(a.Rune.$length===2)&&((c=a.Rune,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]))===(d=a.Rune,(1>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+1])))){if(b.maybeConcat((s=a.Rune,(0>=s.$length?$throwRuntimeError("index out of range"):s.$array[s.$offset+0])),(b.flags&~1)<<16>>>16)){return CH.nil;}a.Op=3;a.Rune=$subslice(a.Rune,0,1);a.Flags=(b.flags&~1)<<16>>>16;}else if((a.Op===4)&&(a.Rune.$length===4)&&((e=a.Rune,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))===(f=a.Rune,(1>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+1])))&&((g=a.Rune,(2>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+2]))===(h=a.Rune,(3>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+3])))&&(A.SimpleFold((i=a.Rune,(0>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+0])))===(j=a.Rune,(2>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+2])))&&(A.SimpleFold((k=a.Rune,(2>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+2])))===(l=a.Rune,(0>=l.$length?$throwRuntimeError("index out of range"):l.$array[l.$offset+0])))||(a.Op===4)&&(a.Rune.$length===2)&&(((m=a.Rune,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]))+1>>0)===(n=a.Rune,(1>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])))&&(A.SimpleFold((o=a.Rune,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])))===(p=a.Rune,(1>=p.$length?$throwRuntimeError("index out of range"):p.$array[p.$offset+1])))&&(A.SimpleFold((q=a.Rune,(1>=q.$length?$throwRuntimeError("index out of range"):q.$array[q.$offset+1])))===(r=a.Rune,(0>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+0])))){if(b.maybeConcat((t=a.Rune,(0>=t.$length?$throwRuntimeError("index out of range"):t.$array[t.$offset+0])),(b.flags|1)>>>0)){return CH.nil;}a.Op=3;a.Rune=$subslice(a.Rune,0,1);a.Flags=(b.flags|1)>>>0;}else{b.maybeConcat(-1,0);}b.stack=$append(b.stack,a);return a;};P.prototype.push=function(a){return this.$val.push(a);};P.ptr.prototype.maybeConcat=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k;c=this;d=c.stack.$length;if(d<2){return false;}g=(e=c.stack,f=d-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));j=(h=c.stack,i=d-2>>0,((i<0||i>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+i]));if(!((g.Op===3))||!((j.Op===3))||!((((g.Flags&1)>>>0)===((j.Flags&1)>>>0)))){return false;}j.Rune=$appendSlice(j.Rune,g.Rune);if(a>=0){g.Rune=$subslice(new CB(g.Rune0),0,1);(k=g.Rune,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0]=a));g.Flags=b;return true;}c.stack=$subslice(c.stack,0,(d-1>>0));c.reuse(g);return false;};P.prototype.maybeConcat=function(a,b){return this.$val.maybeConcat(a,b);};P.ptr.prototype.newLiteral=function(a,b){var $ptr,a,b,c,d;c=this;d=c.newRegexp(3);d.Flags=b;if(!((((b&1)>>>0)===0))){a=Q(a);}d.Rune0[0]=a;d.Rune=$subslice(new CB(d.Rune0),0,1);return d;};P.prototype.newLiteral=function(a,b){return this.$val.newLiteral(a,b);};Q=function(a){var $ptr,a,b,c;if(a<65||a>71903){return a;}b=a;c=a;a=A.SimpleFold(a);while(true){if(!(!((a===c)))){break;}if(b>a){b=a;}a=A.SimpleFold(a);}return b;};P.ptr.prototype.literal=function(a){var $ptr,a,b;b=this;b.push(b.newLiteral(a,b.flags));};P.prototype.literal=function(a){return this.$val.literal(a);};P.ptr.prototype.op=function(a){var $ptr,a,b,c;b=this;c=b.newRegexp(a);c.Flags=b.flags;return b.push(c);};P.prototype.op=function(a){return this.$val.op(a);};P.ptr.prototype.repeat=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;g=this;h=g.flags;if(!((((g.flags&64)>>>0)===0))){if(e.length>0&&(e.charCodeAt(0)===63)){e=e.substring(1);h=(h^(32))<<16>>>16;}if(!(f==="")){return["",new M.ptr("invalid nested repetition operator",f.substring(0,(f.length-e.length>>0)))];}}i=g.stack.$length;if(i===0){return["",new M.ptr("missing argument to repetition operator",d.substring(0,(d.length-e.length>>0)))];}l=(j=g.stack,k=i-1>>0,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k]));if(l.Op>=128){return["",new M.ptr("missing argument to repetition operator",d.substring(0,(d.length-e.length>>0)))];}m=g.newRegexp(a);m.Min=b;m.Max=c;m.Flags=h;m.Sub=$subslice(new CI(m.Sub0),0,1);(n=m.Sub,(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]=l));(o=g.stack,p=i-1>>0,((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]=m));if((a===17)&&(b>=2||c>=2)&&!R(m,1000)){return["",new M.ptr("invalid repeat count",d.substring(0,(d.length-e.length>>0)))];}return[e,$ifaceNil];};P.prototype.repeat=function(a,b,c,d,e,f){return this.$val.repeat(a,b,c,d,e,f);};R=function(a,b){var $ptr,a,b,c,d,e,f,g;if(a.Op===17){c=a.Max;if(c===0){return true;}if(c<0){c=a.Min;}if(c>b){return false;}if(c>0){b=(d=b/(c),(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));}}e=a.Sub;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(!R(g,b)){return false;}f++;}return true;};P.ptr.prototype.concat=function(){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;a.maybeConcat(-1,0);b=a.stack.$length;while(true){if(!(b>0&&(c=a.stack,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).Op<128)){break;}b=b-(1)>>0;}e=$subslice(a.stack,b);a.stack=$subslice(a.stack,0,b);if(e.$length===0){return a.push(a.newRegexp(2));}f=a.collapse(e,18);$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=a.push(f);$s=2;case 2:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}return g;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.concat};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.concat=function(){return this.$val.concat();};P.ptr.prototype.alternate=function(){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.stack.$length;while(true){if(!(b>0&&(c=a.stack,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).Op<128)){break;}b=b-(1)>>0;}e=$subslice(a.stack,b);a.stack=$subslice(a.stack,0,b);if(e.$length>0){$s=1;continue;}$s=2;continue;case 1:$r=S((f=e.$length-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f])));$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:if(e.$length===0){return a.push(a.newRegexp(1));}g=a.collapse(e,19);$s=4;case 4:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=a.push(g);$s=5;case 5:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}return h;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.alternate};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.alternate=function(){return this.$val.alternate();};S=function(a){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=a.Op;if(b===4){$s=1;continue;}$s=2;continue;case 1:c=AC((a.$ptr_Rune||(a.$ptr_Rune=new CL(function(){return this.$target.Rune;},function($v){this.$target.Rune=$v;},a))));$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}a.Rune=c;if((a.Rune.$length===2)&&((d=a.Rune,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]))===0)&&((e=a.Rune,(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1]))===1114111)){a.Rune=CB.nil;a.Op=6;return;}if((a.Rune.$length===4)&&((f=a.Rune,(0>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]))===0)&&((g=a.Rune,(1>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+1]))===9)&&((h=a.Rune,(2>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+2]))===11)&&((i=a.Rune,(3>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+3]))===1114111)){a.Rune=CB.nil;a.Op=5;return;}if((a.Rune.$capacity-a.Rune.$length>>0)>100){a.Rune=$appendSlice($subslice(new CB(a.Rune0),0,0),a.Rune);}case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:S};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};P.ptr.prototype.collapse=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(a.$length===1){return(0>=a.$length?$throwRuntimeError("index out of range"):a.$array[a.$offset+0]);}d=c.newRegexp(b);d.Sub=$subslice(new CI(d.Sub0),0,0);e=a;f=0;while(true){if(!(f=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]);if(g.Op===b){d.Sub=$appendSlice(d.Sub,g.Sub);c.reuse(g);}else{d.Sub=$append(d.Sub,g);}f++;}if(b===19){$s=1;continue;}$s=2;continue;case 1:h=c.factor(d.Sub,d.Flags);$s=3;case 3:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}d.Sub=h;if(d.Sub.$length===1){i=d;d=(j=d.Sub,(0>=j.$length?$throwRuntimeError("index out of range"):j.$array[j.$offset+0]));c.reuse(i);}case 2:return d;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.collapse};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.collapse=function(a,b){return this.$val.collapse(a,b);};P.ptr.prototype.factor=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(a.$length<2){return a;}d=CB.nil;e=0;f=0;g=$subslice(a,0,0);h=0;case 1:if(!(h<=a.$length)){$s=2;continue;}i=CB.nil;j=0;if(h=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+h]));i=k[0];j=k[1];if(j===e){l=0;while(true){if(!(l=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l])===((l<0||l>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+l])))){break;}l=l+(1)>>0;}if(l>0){d=$subslice(d,0,l);h=h+(1)>>0;$s=1;continue;}}case 4:if(h===f){$s=5;continue;}if(h===(f+1>>0)){$s=6;continue;}$s=7;continue;case 5:$s=8;continue;case 6:g=$append(g,((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]));$s=8;continue;case 7:m=c.newRegexp(3);m.Flags=e;m.Rune=$appendSlice($subslice(m.Rune,0,0),d);n=f;while(true){if(!(n=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+n]=c.removeLeadingString(((n<0||n>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+n]),d.$length));n=n+(1)>>0;}o=c.collapse($subslice(a,f,h),19);$s=9;case 9:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}p=o;q=c.newRegexp(18);q.Sub=$append($subslice(q.Sub,0,0),m,p);g=$append(g,q);case 8:f=h;d=i;e=j;h=h+(1)>>0;$s=1;continue;case 2:a=g;f=0;g=$subslice(a,0,0);r=CH.nil;s=0;case 10:if(!(s<=a.$length)){$s=11;continue;}t=CH.nil;if(s=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+s]));if(!(r===CH.nil)&&r.Equal(t)){s=s+(1)>>0;$s=10;continue;}case 13:if(s===f){$s=14;continue;}if(s===(f+1>>0)){$s=15;continue;}$s=16;continue;case 14:$s=17;continue;case 15:g=$append(g,((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]));$s=17;continue;case 16:u=r;v=f;while(true){if(!(v=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+v]=c.removeLeadingRegexp(((v<0||v>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+v]),w));v=v+(1)>>0;}x=c.collapse($subslice(a,f,s),19);$s=18;case 18:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}y=x;z=c.newRegexp(18);z.Sub=$append($subslice(z.Sub,0,0),u,y);g=$append(g,z);case 17:f=s;r=t;s=s+(1)>>0;$s=10;continue;case 11:a=g;f=0;g=$subslice(a,0,0);aa=0;case 19:if(!(aa<=a.$length)){$s=20;continue;}if(aa=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+aa]))){$s=21;continue;}$s=22;continue;case 21:aa=aa+(1)>>0;$s=19;continue;case 22:if(aa===f){$s=23;continue;}if(aa===(f+1>>0)){$s=24;continue;}$s=25;continue;case 23:$s=26;continue;case 24:g=$append(g,((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]));$s=26;continue;case 25:ab=f;ac=f+1>>0;while(true){if(!(ac=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ab]).Op<((ac<0||ac>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ac]).Op||(((ab<0||ab>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ab]).Op===((ac<0||ac>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ac]).Op)&&((ab<0||ab>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ab]).Rune.$length<((ac<0||ac>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ac]).Rune.$length){ab=ac;}ac=ac+(1)>>0;}ad=((ab<0||ab>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ab]);ae=((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]);((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]=ad);((ab<0||ab>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ab]=ae);af=f+1>>0;while(true){if(!(af=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]),((af<0||af>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+af]));c.reuse(((af<0||af>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+af]));af=af+(1)>>0;}$r=S(((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]));$s=27;case 27:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}g=$append(g,((f<0||f>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+f]));case 26:if(aa=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+aa]));}f=aa+1>>0;aa=aa+(1)>>0;$s=19;continue;case 20:a=g;f=0;g=$subslice(a,0,0);ag=a;ah=0;while(true){if(!(ah>0)=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ai]).Op===2)&&((aj=ai+1>>0,((aj<0||aj>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+aj])).Op===2)){ah++;continue;}g=$append(g,((ai<0||ai>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+ai]));ah++;}a=g;return a;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.factor};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.factor=function(a,b){return this.$val.factor(a,b);};P.ptr.prototype.leadingString=function(a){var $ptr,a,b,c;b=this;if((a.Op===18)&&a.Sub.$length>0){a=(c=a.Sub,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]));}if(!((a.Op===3))){return[CB.nil,0];}return[a.Rune,(a.Flags&1)>>>0];};P.prototype.leadingString=function(a){return this.$val.leadingString(a);};P.ptr.prototype.removeLeadingString=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i;c=this;if((a.Op===18)&&a.Sub.$length>0){e=(d=a.Sub,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]));e=c.removeLeadingString(e,b);(f=a.Sub,(0>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+0]=e));if(e.Op===2){c.reuse(e);g=a.Sub.$length;if(g===0||g===1){a.Op=2;a.Sub=CI.nil;}else if(g===2){h=a;a=(i=a.Sub,(1>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+1]));c.reuse(h);}else{$copySlice(a.Sub,$subslice(a.Sub,1));a.Sub=$subslice(a.Sub,0,(a.Sub.$length-1>>0));}}return a;}if(a.Op===3){a.Rune=$subslice(a.Rune,0,$copySlice(a.Rune,$subslice(a.Rune,b)));if(a.Rune.$length===0){a.Op=2;}}return a;};P.prototype.removeLeadingString=function(a,b){return this.$val.removeLeadingString(a,b);};P.ptr.prototype.leadingRegexp=function(a){var $ptr,a,b,c,d;b=this;if(a.Op===2){return CH.nil;}if((a.Op===18)&&a.Sub.$length>0){d=(c=a.Sub,(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]));if(d.Op===2){return CH.nil;}return d;}return a;};P.prototype.leadingRegexp=function(a){return this.$val.leadingRegexp(a);};P.ptr.prototype.removeLeadingRegexp=function(a,b){var $ptr,a,b,c,d,e,f,g;c=this;if((a.Op===18)&&a.Sub.$length>0){if(b){c.reuse((d=a.Sub,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])));}a.Sub=$subslice(a.Sub,0,$copySlice(a.Sub,$subslice(a.Sub,1)));e=a.Sub.$length;if(e===0){a.Op=2;a.Sub=CI.nil;}else if(e===1){f=a;a=(g=a.Sub,(0>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+0]));c.reuse(f);}return a;}if(b){c.reuse(a);}return c.newRegexp(2);};P.prototype.removeLeadingRegexp=function(a,b){return this.$val.removeLeadingRegexp(a,b);};T=function(a,b){var $ptr,a,b,c,d,e,f,g;c=new BW.ptr(3,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");c.Flags=b;c.Rune=$subslice(new CB(c.Rune0),0,0);d=a;e=0;while(true){if(!(e=c.Rune.$capacity){c.Rune=new CB($stringToRunes(a));break;}c.Rune=$append(c.Rune,g);e+=f[1];}return c;};U=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(!((((b&2)>>>0)===0))){c=AN(a);if(!($interfaceIsEqual(c,$ifaceNil))){return[CH.nil,c];}return[T(a,b),$ifaceNil];}d=new P.ptr(0,CI.nil,CH.nil,0,"",CB.nil);e=$ifaceNil;f=0;g=0;h="";d.flags=b;d.wholeRegexp=a;i=a;case 1:if(!(!(i===""))){$s=2;continue;}j="";k=i.charCodeAt(0);if(k===40){$s=3;continue;}if(k===124){$s=4;continue;}if(k===41){$s=5;continue;}if(k===94){$s=6;continue;}if(k===36){$s=7;continue;}if(k===46){$s=8;continue;}if(k===91){$s=9;continue;}if(k===42||k===43||k===63){$s=10;continue;}if(k===123){$s=11;continue;}if(k===92){$s=12;continue;}$s=13;continue;case 3:if(!((((d.flags&64)>>>0)===0))&&i.length>=2&&(i.charCodeAt(1)===63)){l=d.parsePerlFlags(i);i=l[0];e=l[1];if(!($interfaceIsEqual(e,$ifaceNil))){return[CH.nil,e];}$s=14;continue;}d.numCap=d.numCap+(1)>>0;d.op(128).Cap=d.numCap;i=i.substring(1);$s=14;continue;case 4:m=d.parseVerticalBar();$s=15;case 15:if($c){$c=false;m=m.$blk();}if(m&&m.$blk!==undefined){break s;}e=m;if(!($interfaceIsEqual(e,$ifaceNil))){$s=16;continue;}$s=17;continue;case 16:return[CH.nil,e];case 17:i=i.substring(1);$s=14;continue;case 5:n=d.parseRightParen();$s=18;case 18:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}e=n;if(!($interfaceIsEqual(e,$ifaceNil))){$s=19;continue;}$s=20;continue;case 19:return[CH.nil,e];case 20:i=i.substring(1);$s=14;continue;case 6:if(!((((d.flags&16)>>>0)===0))){d.op(9);}else{d.op(7);}i=i.substring(1);$s=14;continue;case 7:if(!((((d.flags&16)>>>0)===0))){o=d.op(10);o.Flags=(o.Flags|(256))>>>0;}else{d.op(8);}i=i.substring(1);$s=14;continue;case 8:if(!((((d.flags&8)>>>0)===0))){d.op(6);}else{d.op(5);}i=i.substring(1);$s=14;continue;case 9:q=d.parseClass(i);$s=21;case 21:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;i=p[0];e=p[1];if(!($interfaceIsEqual(e,$ifaceNil))){$s=22;continue;}$s=23;continue;case 22:return[CH.nil,e];case 23:$s=14;continue;case 10:r=i;s=i.charCodeAt(0);if(s===42){g=14;}else if(s===43){g=15;}else if(s===63){g=16;}t=i.substring(1);u=d.repeat(g,0,0,r,t,h);t=u[0];e=u[1];if(!($interfaceIsEqual(e,$ifaceNil))){return[CH.nil,e];}j=r;i=t;$s=14;continue;case 11:g=17;v=i;w=d.parseRepeat(i);x=w[0];y=w[1];z=w[2];aa=w[3];if(!aa){d.literal(123);i=i.substring(1);$s=14;continue;}if(x<0||x>1000||y>1000||y>=0&&x>y){return[CH.nil,new M.ptr("invalid repeat count",v.substring(0,(v.length-z.length>>0)))];}ab=d.repeat(g,x,y,v,z,h);z=ab[0];e=ab[1];if(!($interfaceIsEqual(e,$ifaceNil))){return[CH.nil,e];}j=v;i=z;$s=14;continue;case 12:if(!((((d.flags&64)>>>0)===0))&&i.length>=2){ac=i.charCodeAt(1);if(ac===65){d.op(9);i=i.substring(2);$s=14;continue s;}else if(ac===98){d.op(11);i=i.substring(2);$s=14;continue s;}else if(ac===66){d.op(12);i=i.substring(2);$s=14;continue s;}else if(ac===67){return[CH.nil,new M.ptr("invalid escape sequence",i.substring(0,2))];}else if(ac===81){ad="";ae=C.Index(i,"\\E");if(ae<0){ad=i.substring(2);i="";}else{ad=i.substring(2,ae);i=i.substring((ae+2>>0));}d.push(T(ad,d.flags));$s=14;continue s;}else if(ac===122){d.op(10);i=i.substring(2);$s=14;continue s;}}af=d.newRegexp(4);af.Flags=d.flags;if(i.length>=2&&((i.charCodeAt(1)===112)||(i.charCodeAt(1)===80))){$s=24;continue;}$s=25;continue;case 24:ah=d.parseUnicodeClass(i,$subslice(new CB(af.Rune0),0,0));$s=26;case 26:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ag=ah;ai=ag[0];aj=ag[1];ak=ag[2];if(!($interfaceIsEqual(ak,$ifaceNil))){return[CH.nil,ak];}if(!(ai===CB.nil)){af.Rune=ai;i=aj;d.push(af);$s=14;continue s;}case 25:am=d.parsePerlClassEscape(i,$subslice(new CB(af.Rune0),0,0));$s=27;case 27:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}al=am;an=al[0];ao=al[1];if(!(an===CB.nil)){$s=28;continue;}$s=29;continue;case 28:af.Rune=an;i=ao;d.push(af);$s=14;continue s;case 29:d.reuse(af);ap=d.parseEscape(i);f=ap[0];i=ap[1];e=ap[2];if(!($interfaceIsEqual(e,$ifaceNil))){return[CH.nil,e];}d.literal(f);$s=14;continue;case 13:aq=AO(i);f=aq[0];i=aq[1];e=aq[2];if(!($interfaceIsEqual(e,$ifaceNil))){return[CH.nil,e];}d.literal(f);case 14:h=j;$s=1;continue;case 2:ar=d.concat();$s=30;case 30:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}ar;as=d.swapVerticalBar();$s=33;case 33:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}if(as){$s=31;continue;}$s=32;continue;case 31:d.stack=$subslice(d.stack,0,(d.stack.$length-1>>0));case 32:at=d.alternate();$s=34;case 34:if($c){$c=false;at=at.$blk();}if(at&&at.$blk!==undefined){break s;}at;au=d.stack.$length;if(!((au===1))){return[CH.nil,new M.ptr("missing closing )",a)];}return[(av=d.stack,(0>=av.$length?$throwRuntimeError("index out of range"):av.$array[av.$offset+0])),$ifaceNil];}return;}if($f===undefined){$f={$blk:U};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Parse=U;P.ptr.prototype.parseRepeat=function(a){var $ptr,a,b,c,d,e,f,g,h,i;b=0;c=0;d="";e=false;f=this;if(a===""||!((a.charCodeAt(0)===123))){return[b,c,d,e];}a=a.substring(1);g=false;h=f.parseInt(a);b=h[0];a=h[1];g=h[2];if(!g){return[b,c,d,e];}if(a===""){return[b,c,d,e];}if(!((a.charCodeAt(0)===44))){c=b;}else{a=a.substring(1);if(a===""){return[b,c,d,e];}if(a.charCodeAt(0)===125){c=-1;}else{i=f.parseInt(a);c=i[0];a=i[1];g=i[2];if(!g){return[b,c,d,e];}else if(c<0){b=-1;}}}if(a===""||!((a.charCodeAt(0)===125))){return[b,c,d,e];}d=a.substring(1);e=true;return[b,c,d,e];};P.prototype.parseRepeat=function(a){return this.$val.parseRepeat(a);};P.ptr.prototype.parsePerlFlags=function(a){var $ptr,a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b="";c=$ifaceNil;d=this;e=a;if(e.length>4&&(e.charCodeAt(2)===80)&&(e.charCodeAt(3)===60)){f=C.IndexRune(e,62);if(f<0){c=AN(e);if(!($interfaceIsEqual(c,$ifaceNil))){g="";h=c;b=g;c=h;return[b,c];}i="";j=new M.ptr("invalid named capture",a);b=i;c=j;return[b,c];}k=e.substring(0,(f+1>>0));l=e.substring(4,f);c=AN(l);if(!($interfaceIsEqual(c,$ifaceNil))){m="";n=c;b=m;c=n;return[b,c];}if(!V(l)){o="";p=new M.ptr("invalid named capture",k);b=o;c=p;return[b,c];}d.numCap=d.numCap+(1)>>0;q=d.op(128);q.Cap=d.numCap;q.Name=l;r=e.substring((f+1>>0));s=$ifaceNil;b=r;c=s;return[b,c];}t=0;e=e.substring(2);u=d.flags;v=1;w=false;Loop:while(true){if(!(!(e===""))){break;}x=AO(e);t=x[0];e=x[1];c=x[2];if(!($interfaceIsEqual(c,$ifaceNil))){y="";z=c;b=y;c=z;return[b,c];}aa=t;if(aa===105){u=(u|(1))>>>0;w=true;}else if(aa===109){u=(u&~(16))<<16>>>16;w=true;}else if(aa===115){u=(u|(8))>>>0;w=true;}else if(aa===85){u=(u|(32))>>>0;w=true;}else if(aa===45){if(v<0){break Loop;}v=-1;u=~u<<16>>>16;w=false;}else if(aa===58||aa===41){if(v<0){if(!w){break Loop;}u=~u<<16>>>16;}if(t===58){d.op(128);}d.flags=u;ab=e;ac=$ifaceNil;b=ab;c=ac;return[b,c];}else{break Loop;}}ad="";ae=new M.ptr("invalid or unsupported Perl syntax",a.substring(0,(a.length-e.length>>0)));b=ad;c=ae;return[b,c];};P.prototype.parsePerlFlags=function(a){return this.$val.parsePerlFlags(a);};V=function(a){var $ptr,a,b,c,d,e;if(a===""){return false;}b=a;c=0;while(true){if(!(c=2&&(a.charCodeAt(0)===48)&&48<=a.charCodeAt(1)&&a.charCodeAt(1)<=57){return[b,c,d];}f=a;while(true){if(!(!(a==="")&&48<=a.charCodeAt(0)&&a.charCodeAt(0)<=57)){break;}a=a.substring(1);}c=a;d=true;f=f.substring(0,(f.length-a.length>>0));g=0;while(true){if(!(g=100000000){b=-1;break;}b=((b*10>>0)+(f.charCodeAt(g)>>0)>>0)-48>>0;g=g+(1)>>0;}return[b,c,d];};P.prototype.parseInt=function(a){return this.$val.parseInt(a);};W=function(a){var $ptr,a;return(a.Op===3)&&(a.Rune.$length===1)||(a.Op===4)||(a.Op===5)||(a.Op===6);};X=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=a.Op;if(c===3){return(a.Rune.$length===1)&&((d=a.Rune,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]))===b);}else if(c===4){e=0;while(true){if(!(e=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e]))<=b&&b<=(g=a.Rune,h=e+1>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]))){return true;}e=e+(2)>>0;}return false;}else if(c===5){return!((b===10));}else if(c===6){return true;}return false;};P.ptr.prototype.parseVerticalBar=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.concat();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}b;c=a.swapVerticalBar();$s=4;case 4:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}if(!c){$s=2;continue;}$s=3;continue;case 2:a.op(129);case 3:return $ifaceNil;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parseVerticalBar};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parseVerticalBar=function(){return this.$val.parseVerticalBar();};Y=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=a.Op;switch(0){default:if(c===6){}else if(c===5){if(X(b,10)){a.Op=6;}}else if(c===4){if(b.Op===3){a.Rune=AD(a.Rune,(d=b.Rune,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0])),b.Flags);}else{a.Rune=AG(a.Rune,b.Rune);}}else if(c===3){if(((e=b.Rune,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))===(f=a.Rune,(0>=f.$length?$throwRuntimeError("index out of range"):f.$array[f.$offset+0])))&&(b.Flags===a.Flags)){break;}a.Op=4;a.Rune=AD($subslice(a.Rune,0,0),(g=a.Rune,(0>=g.$length?$throwRuntimeError("index out of range"):g.$array[g.$offset+0])),a.Flags);a.Rune=AD(a.Rune,(h=b.Rune,(0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0])),b.Flags);}}};P.ptr.prototype.swapVerticalBar=function(){var $ptr,a,aa,ab,ac,ad,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.stack.$length;if(b>=3&&((c=a.stack,d=b-2>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).Op===129)&&W((e=a.stack,f=b-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f])))&&W((g=a.stack,h=b-3>>0,((h<0||h>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h])))){k=(i=a.stack,j=b-1>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));n=(l=a.stack,m=b-3>>0,((m<0||m>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+m]));if(k.Op>n.Op){o=n;p=k;k=o;n=p;(q=a.stack,r=b-3>>0,((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r]=n));}Y(n,k);a.reuse(k);a.stack=$subslice(a.stack,0,(b-1>>0));return true;}if(b>=2){$s=1;continue;}$s=2;continue;case 1:u=(s=a.stack,t=b-1>>0,((t<0||t>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t]));x=(v=a.stack,w=b-2>>0,((w<0||w>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w]));if(x.Op===129){$s=3;continue;}$s=4;continue;case 3:if(b>=3){$s=5;continue;}$s=6;continue;case 5:$r=S((y=a.stack,z=b-3>>0,((z<0||z>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+z])));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:(aa=a.stack,ab=b-2>>0,((ab<0||ab>=aa.$length)?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+ab]=u));(ac=a.stack,ad=b-1>>0,((ad<0||ad>=ac.$length)?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+ad]=x));return true;case 4:case 2:return false;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.swapVerticalBar};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.swapVerticalBar=function(){return this.$val.swapVerticalBar();};P.ptr.prototype.parseRightParen=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;b=a.concat();$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}b;c=a.swapVerticalBar();$s=4;case 4:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}if(c){$s=2;continue;}$s=3;continue;case 2:a.stack=$subslice(a.stack,0,(a.stack.$length-1>>0));case 3:d=a.alternate();$s=5;case 5:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}d;e=a.stack.$length;if(e<2){return new M.ptr("unexpected )",a.wholeRegexp);}h=(f=a.stack,g=e-1>>0,((g<0||g>=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]));k=(i=a.stack,j=e-2>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]));a.stack=$subslice(a.stack,0,(e-2>>0));if(!((k.Op===128))){return new M.ptr("unexpected )",a.wholeRegexp);}a.flags=k.Flags;if(k.Cap===0){a.push(h);}else{k.Op=13;k.Sub=$subslice(new CI(k.Sub0),0,1);(l=k.Sub,(0>=l.$length?$throwRuntimeError("index out of range"):l.$array[l.$offset+0]=h));a.push(k);}return $ifaceNil;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parseRightParen};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parseRightParen=function(){return this.$val.parseRightParen();};P.ptr.prototype.parseEscape=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,bm,bn,bo,bp,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=0;c="";d=$ifaceNil;e=this;f=a.substring(1);if(f===""){g=0;h="";i=new M.ptr("trailing backslash at end of expression","");b=g;c=h;d=i;return[b,c,d];}j=AO(f);k=j[0];f=j[1];d=j[2];if(!($interfaceIsEqual(d,$ifaceNil))){l=0;m="";n=d;b=l;c=m;d=n;return[b,c,d];}o=k;Switch:switch(0){default:if(o===49||o===50||o===51||o===52||o===53||o===54||o===55){if(f===""||f.charCodeAt(0)<48||f.charCodeAt(0)>55){break;}b=k-48>>0;p=1;while(true){if(!(p<3)){break;}if(f===""||f.charCodeAt(0)<48||f.charCodeAt(0)>55){break;}b=(((((b>>>16<<16)*8>>0)+(b<<16>>>16)*8)>>0)+(f.charCodeAt(0)>>0)>>0)-48>>0;f=f.substring(1);p=p+(1)>>0;}q=b;r=f;s=$ifaceNil;b=q;c=r;d=s;return[b,c,d];}else if(o===48){b=k-48>>0;p=1;while(true){if(!(p<3)){break;}if(f===""||f.charCodeAt(0)<48||f.charCodeAt(0)>55){break;}b=(((((b>>>16<<16)*8>>0)+(b<<16>>>16)*8)>>0)+(f.charCodeAt(0)>>0)>>0)-48>>0;f=f.substring(1);p=p+(1)>>0;}t=b;u=f;v=$ifaceNil;b=t;c=u;d=v;return[b,c,d];}else if(o===120){if(f===""){break;}w=AO(f);k=w[0];f=w[1];d=w[2];if(!($interfaceIsEqual(d,$ifaceNil))){x=0;y="";z=d;b=x;c=y;d=z;return[b,c,d];}if(k===123){aa=0;b=0;while(true){if(f===""){break Switch;}ab=AO(f);k=ab[0];f=ab[1];d=ab[2];if(!($interfaceIsEqual(d,$ifaceNil))){ac=0;ad="";ae=d;b=ac;c=ad;d=ae;return[b,c,d];}if(k===125){break;}af=AQ(k);if(af<0){break Switch;}b=((((b>>>16<<16)*16>>0)+(b<<16>>>16)*16)>>0)+af>>0;if(b>1114111){break Switch;}aa=aa+(1)>>0;}if(aa===0){break Switch;}ag=b;ah=f;ai=$ifaceNil;b=ag;c=ah;d=ai;return[b,c,d];}aj=AQ(k);ak=AO(f);k=ak[0];f=ak[1];d=ak[2];if(!($interfaceIsEqual(d,$ifaceNil))){al=0;am="";an=d;b=al;c=am;d=an;return[b,c,d];}ao=AQ(k);if(aj<0||ao<0){break;}ap=((((aj>>>16<<16)*16>>0)+(aj<<16>>>16)*16)>>0)+ao>>0;aq=f;ar=$ifaceNil;b=ap;c=aq;d=ar;return[b,c,d];}else if(o===97){as=7;at=f;au=d;b=as;c=at;d=au;return[b,c,d];}else if(o===102){av=12;aw=f;ax=d;b=av;c=aw;d=ax;return[b,c,d];}else if(o===110){ay=10;az=f;ba=d;b=ay;c=az;d=ba;return[b,c,d];}else if(o===114){bb=13;bc=f;bd=d;b=bb;c=bc;d=bd;return[b,c,d];}else if(o===116){be=9;bf=f;bg=d;b=be;c=bf;d=bg;return[b,c,d];}else if(o===118){bh=11;bi=f;bj=d;b=bh;c=bi;d=bj;return[b,c,d];}else{if(k<128&&!AP(k)){bk=k;bl=f;bm=$ifaceNil;b=bk;c=bl;d=bm;return[b,c,d];}}}bn=0;bo="";bp=new M.ptr("invalid escape sequence",a.substring(0,(a.length-f.length>>0)));b=bn;c=bo;d=bp;return[b,c,d];};P.prototype.parseEscape=function(a){return this.$val.parseEscape(a);};P.ptr.prototype.parseClassChar=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k;c=0;d="";e=$ifaceNil;f=this;if(a===""){g=0;h="";i=new M.ptr("missing closing ]",b);c=g;d=h;e=i;return[c,d,e];}if(a.charCodeAt(0)===92){j=f.parseEscape(a);c=j[0];d=j[1];e=j[2];return[c,d,e];}k=AO(a);c=k[0];d=k[1];e=k[2];return[c,d,e];};P.prototype.parseClassChar=function(a,b){return this.$val.parseClassChar(a,b);};P.ptr.prototype.parsePerlClassEscape=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=CB.nil;d="";e=this;if((((e.flags&64)>>>0)===0)||a.length<2||!((a.charCodeAt(0)===92))){return[c,d];}g=$clone((f=AU[$String.keyFor(a.substring(0,2))],f!==undefined?f.v:new Z.ptr(0,CB.nil)),Z);if(g.sign===0){return[c,d];}i=e.appendGroup(b,g);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}h=i;j=a.substring(2);c=h;d=j;return[c,d];}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parsePerlClassEscape};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parsePerlClassEscape=function(a,b){return this.$val.parsePerlClassEscape(a,b);};P.ptr.prototype.parseNamedClass=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=CB.nil;d="";e=$ifaceNil;f=this;if(a.length<2||!((a.charCodeAt(0)===91))||!((a.charCodeAt(1)===58))){return[c,d,e];}g=C.Index(a.substring(2),":]");if(g<0){return[c,d,e];}g=g+(2)>>0;h=a.substring(0,(g+2>>0));i=a.substring((g+2>>0));j=h;a=i;l=$clone((k=BJ[$String.keyFor(j)],k!==undefined?k.v:new Z.ptr(0,CB.nil)),Z);if(l.sign===0){m=CB.nil;n="";o=new M.ptr("invalid character class range",j);c=m;d=n;e=o;return[c,d,e];}q=f.appendGroup(b,l);$s=1;case 1:if($c){$c=false;q=q.$blk();}if(q&&q.$blk!==undefined){break s;}p=q;r=a;s=$ifaceNil;c=p;d=r;e=s;return[c,d,e];}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parseNamedClass};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parseNamedClass=function(a,b){return this.$val.parseNamedClass(a,b);};P.ptr.prototype.appendGroup=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=$clone(b,Z);c=this;if(((c.flags&1)>>>0)===0){$s=1;continue;}$s=2;continue;case 1:if(b.sign<0){a=AI(a,b.class$1);}else{a=AG(a,b.class$1);}$s=3;continue;case 2:d=$subslice(c.tmpClass,0,0);d=AH(d,b.class$1);c.tmpClass=d;e=AC((c.$ptr_tmpClass||(c.$ptr_tmpClass=new CL(function(){return this.$target.tmpClass;},function($v){this.$target.tmpClass=$v;},c))));$s=4;case 4:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;if(b.sign<0){a=AI(a,d);}else{a=AG(a,d);}case 3:return a;}return;}if($f===undefined){$f={$blk:P.ptr.prototype.appendGroup};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.appendGroup=function(a,b){return this.$val.appendGroup(a,b);};AB=function(a){var $ptr,a,b,c,d,e,f,g;if(a==="Any"){return[AA,AA];}c=(b=A.Categories[$String.keyFor(a)],b!==undefined?b.v:CM.nil);if(!(c===CM.nil)){return[c,(d=A.FoldCategory[$String.keyFor(a)],d!==undefined?d.v:CM.nil)];}f=(e=A.Scripts[$String.keyFor(a)],e!==undefined?e.v:CM.nil);if(!(f===CM.nil)){return[f,(g=A.FoldScript[$String.keyFor(a)],g!==undefined?g.v:CM.nil)];}return[CM.nil,CM.nil];};P.ptr.prototype.parseUnicodeClass=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=CB.nil;d="";e=$ifaceNil;f=this;if((((f.flags&128)>>>0)===0)||a.length<2||!((a.charCodeAt(0)===92))||!((a.charCodeAt(1)===112))&&!((a.charCodeAt(1)===80))){return[c,d,e];}g=1;if(a.charCodeAt(1)===80){g=-1;}h=a.substring(2);i=AO(h);j=i[0];h=i[1];e=i[2];if(!($interfaceIsEqual(e,$ifaceNil))){return[c,d,e];}k="";l="";m=k;n=l;if(!((j===123))){m=a.substring(0,(a.length-h.length>>0));n=m.substring(2);}else{o=C.IndexRune(a,125);if(o<0){e=AN(a);if(!($interfaceIsEqual(e,$ifaceNil))){return[c,d,e];}p=CB.nil;q="";r=new M.ptr("invalid character class range",a);c=p;d=q;e=r;return[c,d,e];}s=a.substring(0,(o+1>>0));t=a.substring((o+1>>0));m=s;h=t;n=a.substring(3,o);e=AN(n);if(!($interfaceIsEqual(e,$ifaceNil))){return[c,d,e];}}if(!(n==="")&&(n.charCodeAt(0)===94)){g=-g;n=n.substring(1);}u=AB(n);v=u[0];w=u[1];if(v===CM.nil){x=CB.nil;y="";z=new M.ptr("invalid character class range",m);c=x;d=y;e=z;return[c,d,e];}if((((f.flags&1)>>>0)===0)||w===CM.nil){$s=1;continue;}$s=2;continue;case 1:if(g>0){b=AJ(b,v);}else{b=AK(b,v);}$s=3;continue;case 2:aa=$subslice(f.tmpClass,0,0);aa=AJ(aa,v);aa=AJ(aa,w);f.tmpClass=aa;ab=AC((f.$ptr_tmpClass||(f.$ptr_tmpClass=new CL(function(){return this.$target.tmpClass;},function($v){this.$target.tmpClass=$v;},f))));$s=4;case 4:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=ab;if(g>0){b=AG(b,aa);}else{b=AI(b,aa);}case 3:ac=b;ad=h;ae=$ifaceNil;c=ac;d=ad;e=ae;return[c,d,e];}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parseUnicodeClass};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parseUnicodeClass=function(a,b){return this.$val.parseUnicodeClass(a,b);};P.ptr.prototype.parseClass=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,b,ba,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;b=$f.b;ba=$f.ba;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b="";c=$ifaceNil;d=this;e=a.substring(1);f=d.newRegexp(4);f.Flags=d.flags;f.Rune=$subslice(new CB(f.Rune0),0,0);g=1;if(!(e==="")&&(e.charCodeAt(0)===94)){g=-1;e=e.substring(1);if(((d.flags&4)>>>0)===0){f.Rune=$append(f.Rune,10,10);}}h=f.Rune;i=true;case 1:if(!(e===""||!((e.charCodeAt(0)===93))||i)){$s=2;continue;}if(!(e==="")&&(e.charCodeAt(0)===45)&&(((d.flags&64)>>>0)===0)&&!i&&((e.length===1)||!((e.charCodeAt(1)===93)))){j=D.DecodeRuneInString(e.substring(1));k=j[1];l="";m=new M.ptr("invalid character class range",e.substring(0,(1+k>>0)));b=l;c=m;return[b,c];}i=false;if(e.length>2&&(e.charCodeAt(0)===91)&&(e.charCodeAt(1)===58)){$s=3;continue;}$s=4;continue;case 3:o=d.parseNamedClass(e,h);$s=5;case 5:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}n=o;p=n[0];q=n[1];r=n[2];if(!($interfaceIsEqual(r,$ifaceNil))){s="";t=r;b=s;c=t;return[b,c];}if(!(p===CB.nil)){u=p;v=q;h=u;e=v;$s=1;continue;}case 4:x=d.parseUnicodeClass(e,h);$s=6;case 6:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;y=w[0];z=w[1];aa=w[2];if(!($interfaceIsEqual(aa,$ifaceNil))){ab="";ac=aa;b=ab;c=ac;return[b,c];}if(!(y===CB.nil)){$s=7;continue;}$s=8;continue;case 7:ad=y;ae=z;h=ad;e=ae;$s=1;continue;case 8:ag=d.parsePerlClassEscape(e,h);$s=9;case 9:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}af=ag;ah=af[0];ai=af[1];if(!(ah===CB.nil)){$s=10;continue;}$s=11;continue;case 10:aj=ah;ak=ai;h=aj;e=ak;$s=1;continue;case 11:al=e;am=0;an=0;ao=am;ap=an;aq=d.parseClassChar(e,a);ao=aq[0];e=aq[1];aa=aq[2];if(!($interfaceIsEqual(aa,$ifaceNil))){ar="";as=aa;b=ar;c=as;return[b,c];}ap=ao;if(e.length>=2&&(e.charCodeAt(0)===45)&&!((e.charCodeAt(1)===93))){e=e.substring(1);at=d.parseClassChar(e,a);ap=at[0];e=at[1];aa=at[2];if(!($interfaceIsEqual(aa,$ifaceNil))){au="";av=aa;b=au;c=av;return[b,c];}if(ap>0));aw="";ax=new M.ptr("invalid character class range",al);b=aw;c=ax;return[b,c];}}if(((d.flags&1)>>>0)===0){h=AE(h,ao,ap);}else{h=AF(h,ao,ap);}$s=1;continue;case 2:e=e.substring(1);f.Rune=h;ay=AC((f.$ptr_Rune||(f.$ptr_Rune=new CL(function(){return this.$target.Rune;},function($v){this.$target.Rune=$v;},f))));$s=12;case 12:if($c){$c=false;ay=ay.$blk();}if(ay&&ay.$blk!==undefined){break s;}h=ay;if(g<0){h=AL(h);}f.Rune=h;d.push(f);az=e;ba=$ifaceNil;b=az;c=ba;return[b,c];}return;}if($f===undefined){$f={$blk:P.ptr.prototype.parseClass};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.b=b;$f.ba=ba;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};P.prototype.parseClass=function(a){return this.$val.parseClass(a);};AC=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=B.Sort((b=new AM.ptr(a),new b.constructor.elem(b)));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}c=a.$get();if(c.$length<2){return c;}d=2;e=2;while(true){if(!(e=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+e]);g=(h=e+1>>0,((h<0||h>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+h]));i=f;j=g;if(i<=((k=d-1>>0,((k<0||k>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+k]))+1>>0)){if(j>(l=d-1>>0,((l<0||l>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+l]))){(m=d-1>>0,((m<0||m>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+m]=j));}e=e+(2)>>0;continue;}((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]=i);(n=d+1>>0,((n<0||n>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+n]=j));d=d+(2)>>0;e=e+(2)>>0;}return $subslice(c,0,d);}return;}if($f===undefined){$f={$blk:AC};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};AD=function(a,b,c){var $ptr,a,b,c;if(!((((c&1)>>>0)===0))){return AF(a,b,b);}return AE(a,b,b);};AE=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;d=a.$length;e=2;while(true){if(!(e<=4)){break;}if(d>=e){f=(g=d-e>>0,((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]));h=(i=(d-e>>0)+1>>0,((i<0||i>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+i]));j=f;k=h;if(b<=(k+1>>0)&&j<=(c+1>>0)){if(b>0,((l<0||l>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+l]=b));}if(c>k){(m=(d-e>>0)+1>>0,((m<0||m>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+m]=c));}return a;}}e=e+(2)>>0;}return $append(a,b,c);};AF=function(a,b,c){var $ptr,a,b,c,d,e;if(b<=65&&c>=71903){return AE(a,b,c);}if(c<65||b>71903){return AE(a,b,c);}if(b<65){a=AE(a,b,64);b=65;}if(c>71903){a=AE(a,71904,c);c=71903;}d=b;while(true){if(!(d<=c)){break;}a=AE(a,d,d);e=A.SimpleFold(d);while(true){if(!(!((e===d)))){break;}a=AE(a,e,e);e=A.SimpleFold(e);}d=d+(1)>>0;}return a;};AG=function(a,b){var $ptr,a,b,c,d;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]),(d=c+1>>0,((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d])));c=c+(2)>>0;}return a;};AH=function(a,b){var $ptr,a,b,c,d;c=0;while(true){if(!(c=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+c]),(d=c+1>>0,((d<0||d>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d])));c=c+(2)>>0;}return a;};AI=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i;c=0;d=0;while(true){if(!(d=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]);f=(g=d+1>>0,((g<0||g>=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+g]));h=e;i=f;if(c<=(h-1>>0)){a=AE(a,c,h-1>>0);}c=i+1>>0;d=d+(2)>>0;}if(c<=1114111){a=AE(a,c,1114111);}return a;};AJ=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;c=b.R16;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),A.Range16);f=(e.Lo>>0);g=(e.Hi>>0);h=(e.Stride>>0);i=f;j=g;k=h;if(k===1){a=AE(a,i,j);d++;continue;}l=i;while(true){if(!(l<=j)){break;}a=AE(a,l,l);l=l+(k)>>0;}d++;}m=b.R32;n=0;while(true){if(!(n=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+n]),A.Range32);p=(o.Lo>>0);q=(o.Hi>>0);r=(o.Stride>>0);s=p;t=q;u=r;if(u===1){a=AE(a,s,t);n++;continue;}v=s;while(true){if(!(v<=t)){break;}a=AE(a,v,v);v=v+(u)>>0;}n++;}return a;};AK=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;c=0;d=b.R16;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]),A.Range16);g=(f.Lo>>0);h=(f.Hi>>0);i=(f.Stride>>0);j=g;k=h;l=i;if(l===1){if(c<=(j-1>>0)){a=AE(a,c,j-1>>0);}c=k+1>>0;e++;continue;}m=j;while(true){if(!(m<=k)){break;}if(c<=(m-1>>0)){a=AE(a,c,m-1>>0);}c=m+1>>0;m=m+(l)>>0;}e++;}n=b.R32;o=0;while(true){if(!(o=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o]),A.Range32);q=(p.Lo>>0);r=(p.Hi>>0);s=(p.Stride>>0);t=q;u=r;v=s;if(v===1){if(c<=(t-1>>0)){a=AE(a,c,t-1>>0);}c=u+1>>0;o++;continue;}w=t;while(true){if(!(w<=u)){break;}if(c<=(w-1>>0)){a=AE(a,c,w-1>>0);}c=w+1>>0;w=w+(v)>>0;}o++;}if(c<=1114111){a=AE(a,c,1114111);}return a;};AL=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j;b=0;c=0;d=0;while(true){if(!(d=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+d]);f=(g=d+1>>0,((g<0||g>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+g]));h=e;i=f;if(b<=(h-1>>0)){((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]=b);(j=c+1>>0,((j<0||j>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+j]=(h-1>>0)));c=c+(2)>>0;}b=i+1>>0;d=d+(2)>>0;}a=$subslice(a,0,c);if(b<=1114111){a=$append(a,b,1114111);}return a;};AM.ptr.prototype.Less=function(a,b){var $ptr,a,b,c,d,e,f;c=$clone(this,AM);d=c.p.$get();a=a*(2)>>0;b=b*(2)>>0;return((a<0||a>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+a])<((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b])||(((a<0||a>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+a])===((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b]))&&(e=a+1>>0,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]))>(f=b+1>>0,((f<0||f>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+f]));};AM.prototype.Less=function(a,b){return this.$val.Less(a,b);};AM.ptr.prototype.Len=function(){var $ptr,a,b;a=$clone(this,AM);return(b=a.p.$get().$length/2,(b===b&&b!==1/0&&b!==-1/0)?b>>0:$throwRuntimeError("integer divide by zero"));};AM.prototype.Len=function(){return this.$val.Len();};AM.ptr.prototype.Swap=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;c=$clone(this,AM);d=c.p.$get();a=a*(2)>>0;b=b*(2)>>0;e=((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b]);f=(g=b+1>>0,((g<0||g>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+g]));h=((a<0||a>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+a]);i=(j=a+1>>0,((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j]));((a<0||a>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+a]=e);(k=a+1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]=f));((b<0||b>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+b]=h);(l=b+1>>0,((l<0||l>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+l]=i));};AM.prototype.Swap=function(a,b){return this.$val.Swap(a,b);};AN=function(a){var $ptr,a,b,c,d;while(true){if(!(!(a===""))){break;}b=D.DecodeRuneInString(a);c=b[0];d=b[1];if((c===65533)&&(d===1)){return new M.ptr("invalid UTF-8",a);}a=a.substring(d);}return $ifaceNil;};AO=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;b=0;c="";d=$ifaceNil;e=D.DecodeRuneInString(a);b=e[0];f=e[1];if((b===65533)&&(f===1)){g=0;h="";i=new M.ptr("invalid UTF-8",a);b=g;c=h;d=i;return[b,c,d];}j=b;k=a.substring(f);l=$ifaceNil;b=j;c=k;d=l;return[b,c,d];};AP=function(a){var $ptr,a;return 48<=a&&a<=57||65<=a&&a<=90||97<=a&&a<=122;};AQ=function(a){var $ptr,a;if(48<=a&&a<=57){return a-48>>0;}if(97<=a&&a<=102){return(a-97>>0)+10>>0;}if(65<=a&&a<=70){return(a-65>>0)+10>>0;}return-1;};BL.prototype.String=function(){var $ptr,a;a=this.$val;if((a>>>0)>=(BM.$length>>>0)){return"";}return((a<0||a>=BM.$length)?$throwRuntimeError("index out of range"):BM.$array[BM.$offset+a]);};$ptrType(BL).prototype.String=function(){return new BL(this.$get()).String();};BO=function(a,b){var $ptr,a,b,c,d;c=32;d=0;if(BP(a)){d=1;}else if(a===10){c=(c|(1))>>>0;}else if(a<0){c=(c|(5))>>>0;}if(BP(b)){d=(d^(1))<<24>>>24;}else if(b===10){c=(c|(2))>>>0;}else if(b<0){c=(c|(10))>>>0;}if(!((d===0))){c=(c^(48))<<24>>>24;}return c;};$pkg.EmptyOpContext=BO;BP=function(a){var $ptr,a;return 65<=a&&a<=90||97<=a&&a<=122||48<=a&&a<=57||(a===95);};$pkg.IsWordChar=BP;BK.ptr.prototype.String=function(){var $ptr,a,b;a=this;b=new E.Buffer.ptr(CN.nil,0,CO.zero(),CP.zero(),0);BT(b,a);return b.String();};BK.prototype.String=function(){return this.$val.String();};BK.ptr.prototype.skipNop=function(a){var $ptr,a,b,c,d,e;b=this;d=(c=b.Inst,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));while(true){if(!((d.Op===6)||(d.Op===2))){break;}a=d.Out;d=(e=b.Inst,((a<0||a>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+a]));}return[d,a];};BK.prototype.skipNop=function(a){return this.$val.skipNop(a);};BQ.ptr.prototype.op=function(){var $ptr,a,b,c;a=this;b=a.Op;c=b;if(c===8||c===9||c===10){b=7;}return b;};BQ.prototype.op=function(){return this.$val.op();};BK.ptr.prototype.Prefix=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l;a="";b=false;c=this;d=c.skipNop((c.Start>>>0));e=d[0];if(!((e.op()===7))||!((e.Rune.$length===1))){f="";g=e.Op===4;a=f;b=g;return[a,b];}h=new E.Buffer.ptr(CN.nil,0,CO.zero(),CP.zero(),0);while(true){if(!((e.op()===7)&&(e.Rune.$length===1)&&((((e.Arg<<16>>>16)&1)>>>0)===0))){break;}h.WriteRune((i=e.Rune,(0>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+0])));j=c.skipNop(e.Out);e=j[0];}k=h.String();l=e.Op===4;a=k;b=l;return[a,b];};BK.prototype.Prefix=function(){return this.$val.Prefix();};BK.ptr.prototype.StartCond=function(){var $ptr,a,b,c,d,e,f,g;a=this;b=0;c=(a.Start>>>0);e=(d=a.Inst,((c<0||c>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]));Loop:while(true){f=e.Op;if(f===3){b=(b|((e.Arg<<24>>>24)))>>>0;}else if(f===5){return 255;}else if(f===2||f===6){}else{break Loop;}c=e.Out;e=(g=a.Inst,((c<0||c>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+c]));}return b;};BK.prototype.StartCond=function(){return this.$val.StartCond();};BQ.ptr.prototype.MatchRune=function(a){var $ptr,a,b;b=this;return!((b.MatchRunePos(a)===-1));};BQ.prototype.MatchRune=function(a){return this.$val.MatchRune(a);};BQ.ptr.prototype.MatchRunePos=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;b=this;c=b.Rune;if(c.$length===1){d=(0>=c.$length?$throwRuntimeError("index out of range"):c.$array[c.$offset+0]);if(a===d){return 0;}if(!(((((b.Arg<<16>>>16)&1)>>>0)===0))){e=A.SimpleFold(d);while(true){if(!(!((e===d)))){break;}if(a===e){return 0;}e=A.SimpleFold(e);}}return-1;}f=0;while(true){if(!(f=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+f])){return-1;}if(a<=(g=f+1>>0,((g<0||g>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+g]))){return(h=f/2,(h===h&&h!==1/0&&h!==-1/0)?h>>0:$throwRuntimeError("integer divide by zero"));}f=f+(2)>>0;}i=0;k=(j=c.$length/2,(j===j&&j!==1/0&&j!==-1/0)?j>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(i>0))/2,(l===l&&l!==1/0&&l!==-1/0)?l>>0:$throwRuntimeError("integer divide by zero"))>>0;o=(n=2*m>>0,((n<0||n>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+n]));if(o<=a){if(a<=(p=(2*m>>0)+1>>0,((p<0||p>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+p]))){return m;}i=m+1>>0;}else{k=m;}}return-1;};BQ.prototype.MatchRunePos=function(a){return this.$val.MatchRunePos(a);};BR=function(a){var $ptr,a;return(a===95)||(65<=a&&a<=90)||(97<=a&&a<=122)||(48<=a&&a<=57);};BQ.ptr.prototype.MatchEmptyWidth=function(a,b){var $ptr,a,b,c,d;c=this;d=(c.Arg<<24>>>24);if(d===1){return(a===10)||(a===-1);}else if(d===2){return(b===10)||(b===-1);}else if(d===4){return a===-1;}else if(d===8){return b===-1;}else if(d===16){return!(BR(a)===BR(b));}else if(d===32){return BR(a)===BR(b);}$panic(new $String("unknown empty width arg"));};BQ.prototype.MatchEmptyWidth=function(a,b){return this.$val.MatchEmptyWidth(a,b);};BQ.ptr.prototype.String=function(){var $ptr,a,b;a=this;b=new E.Buffer.ptr(CN.nil,0,CO.zero(),CP.zero(),0);BV(b,a);return b.String();};BQ.prototype.String=function(){return this.$val.String();};BS=function(a,b){var $ptr,a,b,c,d,e;c=b;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);a.WriteString(e);d++;}};BT=function(a,b){var $ptr,a,b,c,d,e,f,g,h;c=b.Inst;d=0;while(true){if(!(d=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+e]));h=F.Itoa(e);if(h.length<3){a.WriteString(" ".substring(h.length));}if(e===b.Start){h=h+("*");}BS(a,new CE([h,"\t"]));BV(a,g);BS(a,new CE(["\n"]));d++;}};BU=function(a){var $ptr,a;return F.FormatUint(new $Uint64(0,a),10);};BV=function(a,b){var $ptr,a,b,c;c=b.Op;if(c===0){BS(a,new CE(["alt -> ",BU(b.Out),", ",BU(b.Arg)]));}else if(c===1){BS(a,new CE(["altmatch -> ",BU(b.Out),", ",BU(b.Arg)]));}else if(c===2){BS(a,new CE(["cap ",BU(b.Arg)," -> ",BU(b.Out)]));}else if(c===3){BS(a,new CE(["empty ",BU(b.Arg)," -> ",BU(b.Out)]));}else if(c===4){BS(a,new CE(["match"]));}else if(c===5){BS(a,new CE(["fail"]));}else if(c===6){BS(a,new CE(["nop -> ",BU(b.Out)]));}else if(c===7){if(b.Rune===CB.nil){BS(a,new CE(["rune "]));}BS(a,new CE(["rune ",F.QuoteToASCII($runesToString(b.Rune))]));if(!(((((b.Arg<<16>>>16)&1)>>>0)===0))){BS(a,new CE(["/i"]));}BS(a,new CE([" -> ",BU(b.Out)]));}else if(c===8){BS(a,new CE(["rune1 ",F.QuoteToASCII($runesToString(b.Rune))," -> ",BU(b.Out)]));}else if(c===9){BS(a,new CE(["any -> ",BU(b.Out)]));}else if(c===10){BS(a,new CE(["anynotnl -> ",BU(b.Out)]));}};BW.ptr.prototype.Equal=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;b=this;if(b===CH.nil||a===CH.nil){return b===a;}if(!((b.Op===a.Op))){return false;}c=b.Op;if(c===10){if(!((((b.Flags&256)>>>0)===((a.Flags&256)>>>0)))){return false;}}else if(c===3||c===4){if(!((b.Rune.$length===a.Rune.$length))){return false;}d=b.Rune;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);if(!((g===(h=a.Rune,((f<0||f>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+f]))))){return false;}e++;}}else if(c===19||c===18){if(!((b.Sub.$length===a.Sub.$length))){return false;}i=b.Sub;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(!l.Equal((m=a.Sub,((k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k])))){return false;}j++;}}else if(c===14||c===15||c===16){if(!((((b.Flags&32)>>>0)===((a.Flags&32)>>>0)))||!(n=b.Sub,(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])).Equal((o=a.Sub,(0>=o.$length?$throwRuntimeError("index out of range"):o.$array[o.$offset+0])))){return false;}}else if(c===17){if(!((((b.Flags&32)>>>0)===((a.Flags&32)>>>0)))||!((b.Min===a.Min))||!((b.Max===a.Max))||!(p=b.Sub,(0>=p.$length?$throwRuntimeError("index out of range"):p.$array[p.$offset+0])).Equal((q=a.Sub,(0>=q.$length?$throwRuntimeError("index out of range"):q.$array[q.$offset+0])))){return false;}}else if(c===13){if(!((b.Cap===a.Cap))||!(b.Name===a.Name)||!(r=b.Sub,(0>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+0])).Equal((s=a.Sub,(0>=s.$length?$throwRuntimeError("index out of range"):s.$array[s.$offset+0])))){return false;}}return true;};BW.prototype.Equal=function(a){return this.$val.Equal(a);};BY=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;c=b.Op;switch(0){default:if(c===1){a.WriteString("[^\\x00-\\x{10FFFF}]");}else if(c===2){a.WriteString("(?:)");}else if(c===3){if(!((((b.Flags&1)>>>0)===0))){a.WriteString("(?i:");}d=b.Rune;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);BZ(a,f,false);e++;}if(!((((b.Flags&1)>>>0)===0))){a.WriteString(")");}}else if(c===4){if(!(((g=b.Rune.$length%2,g===g?g:$throwRuntimeError("integer divide by zero"))===0))){a.WriteString("[invalid char class]");break;}a.WriteRune(91);if(b.Rune.$length===0){a.WriteString("^\\x00-\\x{10FFFF}");}else if(((h=b.Rune,(0>=h.$length?$throwRuntimeError("index out of range"):h.$array[h.$offset+0]))===0)&&((i=b.Rune,j=b.Rune.$length-1>>0,((j<0||j>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]))===1114111)){a.WriteRune(94);k=1;while(true){if(!(k<(b.Rune.$length-1>>0))){break;}l=(m=b.Rune,((k<0||k>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+k]))+1>>0;n=(o=b.Rune,p=k+1>>0,((p<0||p>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+p]))-1>>0;q=l;r=n;BZ(a,q,q===45);if(!((q===r))){a.WriteRune(45);BZ(a,r,r===45);}k=k+(2)>>0;}}else{s=0;while(true){if(!(s=u.$length)?$throwRuntimeError("index out of range"):u.$array[u.$offset+s]));v=(w=b.Rune,x=s+1>>0,((x<0||x>=w.$length)?$throwRuntimeError("index out of range"):w.$array[w.$offset+x]));y=t;z=v;BZ(a,y,y===45);if(!((y===z))){a.WriteRune(45);BZ(a,z,z===45);}s=s+(2)>>0;}}a.WriteRune(93);}else if(c===5){a.WriteString("(?-s:.)");}else if(c===6){a.WriteString("(?s:.)");}else if(c===7){a.WriteRune(94);}else if(c===8){a.WriteRune(36);}else if(c===9){a.WriteString("\\A");}else if(c===10){if(!((((b.Flags&256)>>>0)===0))){a.WriteString("(?-m:$)");}else{a.WriteString("\\z");}}else if(c===11){a.WriteString("\\b");}else if(c===12){a.WriteString("\\B");}else if(c===13){if(!(b.Name==="")){a.WriteString("(?P<");a.WriteString(b.Name);a.WriteRune(62);}else{a.WriteRune(40);}if(!(((aa=b.Sub,(0>=aa.$length?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0])).Op===2))){BY(a,(ab=b.Sub,(0>=ab.$length?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+0])));}a.WriteRune(41);}else if(c===14||c===15||c===16||c===17){ad=(ac=b.Sub,(0>=ac.$length?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+0]));if(ad.Op>13||(ad.Op===3)&&ad.Rune.$length>1){a.WriteString("(?:");BY(a,ad);a.WriteString(")");}else{BY(a,ad);}ae=b.Op;if(ae===14){a.WriteRune(42);}else if(ae===15){a.WriteRune(43);}else if(ae===16){a.WriteRune(63);}else if(ae===17){a.WriteRune(123);a.WriteString(F.Itoa(b.Min));if(!((b.Max===b.Min))){a.WriteRune(44);if(b.Max>=0){a.WriteString(F.Itoa(b.Max));}}a.WriteRune(125);}if(!((((b.Flags&32)>>>0)===0))){a.WriteRune(63);}}else if(c===18){af=b.Sub;ag=0;while(true){if(!(ag=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag]);if(ah.Op===19){a.WriteString("(?:");BY(a,ah);a.WriteString(")");}else{BY(a,ah);}ag++;}}else if(c===19){ai=b.Sub;aj=0;while(true){if(!(aj=ai.$length)?$throwRuntimeError("index out of range"):ai.$array[ai.$offset+aj]);if(ak>0){a.WriteRune(124);}BY(a,al);aj++;}}else{a.WriteString(">0))+">");}}};BW.ptr.prototype.String=function(){var $ptr,a,b;a=this;b=new E.Buffer.ptr(CN.nil,0,CO.zero(),CP.zero(),0);BY(b,a);return b.String();};BW.prototype.String=function(){return this.$val.String();};BZ=function(a,b,c){var $ptr,a,b,c,d,e;if(A.IsPrint(b)){if(C.IndexRune("\\.+*?()|[]{}^$",b)>=0||c){a.WriteRune(92);}a.WriteRune(b);return;}d=b;switch(0){default:if(d===7){a.WriteString("\\a");}else if(d===12){a.WriteString("\\f");}else if(d===10){a.WriteString("\\n");}else if(d===13){a.WriteString("\\r");}else if(d===9){a.WriteString("\\t");}else if(d===11){a.WriteString("\\v");}else{if(b<256){a.WriteString("\\x");e=F.FormatInt(new $Int64(0,b),16);if(e.length===1){a.WriteRune(48);}a.WriteString(e);break;}a.WriteString("\\x{");a.WriteString(F.FormatInt(new $Int64(0,b),16));a.WriteString("}");}}};BW.ptr.prototype.MaxCap=function(){var $ptr,a,b,c,d,e,f;a=this;b=0;if(a.Op===13){b=a.Cap;}c=a.Sub;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);f=e.MaxCap();if(b>0));a.capNames(b);return b;};BW.prototype.CapNames=function(){return this.$val.CapNames();};BW.ptr.prototype.capNames=function(a){var $ptr,a,b,c,d,e,f;b=this;if(b.Op===13){(c=b.Cap,((c<0||c>=a.$length)?$throwRuntimeError("index out of range"):a.$array[a.$offset+c]=b.Name));}d=b.Sub;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);f.capNames(a);e++;}};BW.prototype.capNames=function(a){return this.$val.capNames(a);};BW.ptr.prototype.Simplify=function(){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;a=this;if(a===CH.nil){return CH.nil;}b=a.Op;if(b===13||b===18||b===19){c=a;d=a.Sub;e=0;while(true){if(!(e=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]);h=g.Simplify();if(c===a&&!(h===g)){c=new BW.ptr(0,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");BW.copy(c,a);c.Rune=CB.nil;c.Sub=$appendSlice($subslice(new CI(c.Sub0),0,0),$subslice(a.Sub,0,f));}if(!(c===a)){c.Sub=$append(c.Sub,h);}e++;}return c;}else if(b===14||b===15||b===16){j=(i=a.Sub,(0>=i.$length?$throwRuntimeError("index out of range"):i.$array[i.$offset+0])).Simplify();return CA(a.Op,a.Flags,j,a);}else if(b===17){if((a.Min===0)&&(a.Max===0)){return new BW.ptr(2,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");}l=(k=a.Sub,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])).Simplify();if(a.Max===-1){if(a.Min===0){return CA(14,a.Flags,l,CH.nil);}if(a.Min===1){return CA(15,a.Flags,l,CH.nil);}m=new BW.ptr(18,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");m.Sub=$subslice(new CI(m.Sub0),0,0);n=0;while(true){if(!(n<(a.Min-1>>0))){break;}m.Sub=$append(m.Sub,l);n=n+(1)>>0;}m.Sub=$append(m.Sub,CA(15,a.Flags,l,CH.nil));return m;}if((a.Min===1)&&(a.Max===1)){return l;}o=CH.nil;if(a.Min>0){o=new BW.ptr(18,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");o.Sub=$subslice(new CI(o.Sub0),0,0);p=0;while(true){if(!(p>0;}}if(a.Max>a.Min){q=CA(16,a.Flags,l,CH.nil);r=a.Min+1>>0;while(true){if(!(r>0;}if(o===CH.nil){return q;}o.Sub=$append(o.Sub,q);}if(!(o===CH.nil)){return o;}return new BW.ptr(1,0,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");}return a;};BW.prototype.Simplify=function(){return this.$val.Simplify();};CA=function(a,b,c,d){var $ptr,a,b,c,d,e;if(c.Op===2){return c;}if((a===c.Op)&&(((b&32)>>>0)===((c.Flags&32)>>>0))){return c;}if(!(d===CH.nil)&&(d.Op===a)&&(((d.Flags&32)>>>0)===((b&32)>>>0))&&c===(e=d.Sub,(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]))){return d;}d=new BW.ptr(a,b,CI.nil,CJ.zero(),CB.nil,CK.zero(),0,0,0,"");d.Sub=$append($subslice(new CI(d.Sub0),0,0),c);return d;};G.methods=[{prop:"next",name:"next",pkg:"regexp/syntax",typ:$funcType([CF],[G],false)},{prop:"patch",name:"patch",pkg:"regexp/syntax",typ:$funcType([CF,$Uint32],[],false)},{prop:"append",name:"append",pkg:"regexp/syntax",typ:$funcType([CF,G],[G],false)}];CQ.methods=[{prop:"init",name:"init",pkg:"regexp/syntax",typ:$funcType([],[],false)},{prop:"compile",name:"compile",pkg:"regexp/syntax",typ:$funcType([CH],[H],false)},{prop:"inst",name:"inst",pkg:"regexp/syntax",typ:$funcType([BL],[H],false)},{prop:"nop",name:"nop",pkg:"regexp/syntax",typ:$funcType([],[H],false)},{prop:"fail",name:"fail",pkg:"regexp/syntax",typ:$funcType([],[H],false)},{prop:"cap",name:"cap",pkg:"regexp/syntax",typ:$funcType([$Uint32],[H],false)},{prop:"cat",name:"cat",pkg:"regexp/syntax",typ:$funcType([H,H],[H],false)},{prop:"alt",name:"alt",pkg:"regexp/syntax",typ:$funcType([H,H],[H],false)},{prop:"quest",name:"quest",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"star",name:"star",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"plus",name:"plus",pkg:"regexp/syntax",typ:$funcType([H,$Bool],[H],false)},{prop:"empty",name:"empty",pkg:"regexp/syntax",typ:$funcType([BN],[H],false)},{prop:"rune",name:"rune",pkg:"regexp/syntax",typ:$funcType([CB,O],[H],false)}];CR.methods=[{prop:"Error",name:"Error",pkg:"",typ:$funcType([],[$String],false)}];N.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CS.methods=[{prop:"newRegexp",name:"newRegexp",pkg:"regexp/syntax",typ:$funcType([BX],[CH],false)},{prop:"reuse",name:"reuse",pkg:"regexp/syntax",typ:$funcType([CH],[],false)},{prop:"push",name:"push",pkg:"regexp/syntax",typ:$funcType([CH],[CH],false)},{prop:"maybeConcat",name:"maybeConcat",pkg:"regexp/syntax",typ:$funcType([$Int32,O],[$Bool],false)},{prop:"newLiteral",name:"newLiteral",pkg:"regexp/syntax",typ:$funcType([$Int32,O],[CH],false)},{prop:"literal",name:"literal",pkg:"regexp/syntax",typ:$funcType([$Int32],[],false)},{prop:"op",name:"op",pkg:"regexp/syntax",typ:$funcType([BX],[CH],false)},{prop:"repeat",name:"repeat",pkg:"regexp/syntax",typ:$funcType([BX,$Int,$Int,$String,$String,$String],[$String,$error],false)},{prop:"concat",name:"concat",pkg:"regexp/syntax",typ:$funcType([],[CH],false)},{prop:"alternate",name:"alternate",pkg:"regexp/syntax",typ:$funcType([],[CH],false)},{prop:"collapse",name:"collapse",pkg:"regexp/syntax",typ:$funcType([CI,BX],[CH],false)},{prop:"factor",name:"factor",pkg:"regexp/syntax",typ:$funcType([CI,O],[CI],false)},{prop:"leadingString",name:"leadingString",pkg:"regexp/syntax",typ:$funcType([CH],[CB,O],false)},{prop:"removeLeadingString",name:"removeLeadingString",pkg:"regexp/syntax",typ:$funcType([CH,$Int],[CH],false)},{prop:"leadingRegexp",name:"leadingRegexp",pkg:"regexp/syntax",typ:$funcType([CH],[CH],false)},{prop:"removeLeadingRegexp",name:"removeLeadingRegexp",pkg:"regexp/syntax",typ:$funcType([CH,$Bool],[CH],false)},{prop:"parseRepeat",name:"parseRepeat",pkg:"regexp/syntax",typ:$funcType([$String],[$Int,$Int,$String,$Bool],false)},{prop:"parsePerlFlags",name:"parsePerlFlags",pkg:"regexp/syntax",typ:$funcType([$String],[$String,$error],false)},{prop:"parseInt",name:"parseInt",pkg:"regexp/syntax",typ:$funcType([$String],[$Int,$String,$Bool],false)},{prop:"parseVerticalBar",name:"parseVerticalBar",pkg:"regexp/syntax",typ:$funcType([],[$error],false)},{prop:"swapVerticalBar",name:"swapVerticalBar",pkg:"regexp/syntax",typ:$funcType([],[$Bool],false)},{prop:"parseRightParen",name:"parseRightParen",pkg:"regexp/syntax",typ:$funcType([],[$error],false)},{prop:"parseEscape",name:"parseEscape",pkg:"regexp/syntax",typ:$funcType([$String],[$Int32,$String,$error],false)},{prop:"parseClassChar",name:"parseClassChar",pkg:"regexp/syntax",typ:$funcType([$String,$String],[$Int32,$String,$error],false)},{prop:"parsePerlClassEscape",name:"parsePerlClassEscape",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String],false)},{prop:"parseNamedClass",name:"parseNamedClass",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String,$error],false)},{prop:"appendGroup",name:"appendGroup",pkg:"regexp/syntax",typ:$funcType([CB,Z],[CB],false)},{prop:"parseUnicodeClass",name:"parseUnicodeClass",pkg:"regexp/syntax",typ:$funcType([$String,CB],[CB,$String,$error],false)},{prop:"parseClass",name:"parseClass",pkg:"regexp/syntax",typ:$funcType([$String],[$String,$error],false)}];AM.methods=[{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)}];CF.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"skipNop",name:"skipNop",pkg:"regexp/syntax",typ:$funcType([$Uint32],[CT,$Uint32],false)},{prop:"Prefix",name:"Prefix",pkg:"",typ:$funcType([],[$String,$Bool],false)},{prop:"StartCond",name:"StartCond",pkg:"",typ:$funcType([],[BN],false)}];BL.methods=[{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CT.methods=[{prop:"op",name:"op",pkg:"regexp/syntax",typ:$funcType([],[BL],false)},{prop:"MatchRune",name:"MatchRune",pkg:"",typ:$funcType([$Int32],[$Bool],false)},{prop:"MatchRunePos",name:"MatchRunePos",pkg:"",typ:$funcType([$Int32],[$Int],false)},{prop:"MatchEmptyWidth",name:"MatchEmptyWidth",pkg:"",typ:$funcType([$Int32,$Int32],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)}];CH.methods=[{prop:"Equal",name:"Equal",pkg:"",typ:$funcType([CH],[$Bool],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"MaxCap",name:"MaxCap",pkg:"",typ:$funcType([],[$Int],false)},{prop:"CapNames",name:"CapNames",pkg:"",typ:$funcType([],[CE],false)},{prop:"capNames",name:"capNames",pkg:"regexp/syntax",typ:$funcType([CE],[],false)},{prop:"Simplify",name:"Simplify",pkg:"",typ:$funcType([],[CH],false)}];H.init([{prop:"i",name:"i",pkg:"regexp/syntax",typ:$Uint32,tag:""},{prop:"out",name:"out",pkg:"regexp/syntax",typ:G,tag:""}]);I.init([{prop:"p",name:"p",pkg:"regexp/syntax",typ:CF,tag:""}]);M.init([{prop:"Code",name:"Code",pkg:"",typ:N,tag:""},{prop:"Expr",name:"Expr",pkg:"",typ:$String,tag:""}]);P.init([{prop:"flags",name:"flags",pkg:"regexp/syntax",typ:O,tag:""},{prop:"stack",name:"stack",pkg:"regexp/syntax",typ:CI,tag:""},{prop:"free",name:"free",pkg:"regexp/syntax",typ:CH,tag:""},{prop:"numCap",name:"numCap",pkg:"regexp/syntax",typ:$Int,tag:""},{prop:"wholeRegexp",name:"wholeRegexp",pkg:"regexp/syntax",typ:$String,tag:""},{prop:"tmpClass",name:"tmpClass",pkg:"regexp/syntax",typ:CB,tag:""}]);Z.init([{prop:"sign",name:"sign",pkg:"regexp/syntax",typ:$Int,tag:""},{prop:"class$1",name:"class",pkg:"regexp/syntax",typ:CB,tag:""}]);AM.init([{prop:"p",name:"p",pkg:"regexp/syntax",typ:CL,tag:""}]);BK.init([{prop:"Inst",name:"Inst",pkg:"",typ:CG,tag:""},{prop:"Start",name:"Start",pkg:"",typ:$Int,tag:""},{prop:"NumCap",name:"NumCap",pkg:"",typ:$Int,tag:""}]);BQ.init([{prop:"Op",name:"Op",pkg:"",typ:BL,tag:""},{prop:"Out",name:"Out",pkg:"",typ:$Uint32,tag:""},{prop:"Arg",name:"Arg",pkg:"",typ:$Uint32,tag:""},{prop:"Rune",name:"Rune",pkg:"",typ:CB,tag:""}]);BW.init([{prop:"Op",name:"Op",pkg:"",typ:BX,tag:""},{prop:"Flags",name:"Flags",pkg:"",typ:O,tag:""},{prop:"Sub",name:"Sub",pkg:"",typ:CI,tag:""},{prop:"Sub0",name:"Sub0",pkg:"",typ:CJ,tag:""},{prop:"Rune",name:"Rune",pkg:"",typ:CB,tag:""},{prop:"Rune0",name:"Rune0",pkg:"",typ:CK,tag:""},{prop:"Min",name:"Min",pkg:"",typ:$Int,tag:""},{prop:"Max",name:"Max",pkg:"",typ:$Int,tag:""},{prop:"Cap",name:"Cap",pkg:"",typ:$Int,tag:""},{prop:"Name",name:"Name",pkg:"",typ:$String,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=E.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}K=new CB([0,9,11,1114111]);L=new CB([0,1114111]);AA=new A.RangeTable.ptr(new CC([new A.Range16.ptr(0,65535,1)]),new CD([new A.Range32.ptr(65536,1114111,1)]),0);AR=new CB([48,57]);AS=new CB([9,10,12,13,32,32]);AT=new CB([48,57,65,90,95,95,97,122]);AU=$makeMap($String.keyFor,[{k:"\\d",v:new Z.ptr(1,AR)},{k:"\\D",v:new Z.ptr(-1,AR)},{k:"\\s",v:new Z.ptr(1,AS)},{k:"\\S",v:new Z.ptr(-1,AS)},{k:"\\w",v:new Z.ptr(1,AT)},{k:"\\W",v:new Z.ptr(-1,AT)}]);AV=new CB([48,57,65,90,97,122]);AW=new CB([65,90,97,122]);AX=new CB([0,127]);AY=new CB([9,9,32,32]);AZ=new CB([0,31,127,127]);BA=new CB([48,57]);BB=new CB([33,126]);BC=new CB([97,122]);BD=new CB([32,126]);BE=new CB([33,47,58,64,91,96,123,126]);BF=new CB([9,13,32,32]);BG=new CB([65,90]);BH=new CB([48,57,65,90,95,95,97,122]);BI=new CB([48,57,65,70,97,102]);BJ=$makeMap($String.keyFor,[{k:"[:alnum:]",v:new Z.ptr(1,AV)},{k:"[:^alnum:]",v:new Z.ptr(-1,AV)},{k:"[:alpha:]",v:new Z.ptr(1,AW)},{k:"[:^alpha:]",v:new Z.ptr(-1,AW)},{k:"[:ascii:]",v:new Z.ptr(1,AX)},{k:"[:^ascii:]",v:new Z.ptr(-1,AX)},{k:"[:blank:]",v:new Z.ptr(1,AY)},{k:"[:^blank:]",v:new Z.ptr(-1,AY)},{k:"[:cntrl:]",v:new Z.ptr(1,AZ)},{k:"[:^cntrl:]",v:new Z.ptr(-1,AZ)},{k:"[:digit:]",v:new Z.ptr(1,BA)},{k:"[:^digit:]",v:new Z.ptr(-1,BA)},{k:"[:graph:]",v:new Z.ptr(1,BB)},{k:"[:^graph:]",v:new Z.ptr(-1,BB)},{k:"[:lower:]",v:new Z.ptr(1,BC)},{k:"[:^lower:]",v:new Z.ptr(-1,BC)},{k:"[:print:]",v:new Z.ptr(1,BD)},{k:"[:^print:]",v:new Z.ptr(-1,BD)},{k:"[:punct:]",v:new Z.ptr(1,BE)},{k:"[:^punct:]",v:new Z.ptr(-1,BE)},{k:"[:space:]",v:new Z.ptr(1,BF)},{k:"[:^space:]",v:new Z.ptr(-1,BF)},{k:"[:upper:]",v:new Z.ptr(1,BG)},{k:"[:^upper:]",v:new Z.ptr(-1,BG)},{k:"[:word:]",v:new Z.ptr(1,BH)},{k:"[:^word:]",v:new Z.ptr(-1,BH)},{k:"[:xdigit:]",v:new Z.ptr(1,BI)},{k:"[:^xdigit:]",v:new Z.ptr(-1,BI)}]);BM=new CE(["InstAlt","InstAltMatch","InstCapture","InstEmptyWidth","InstMatch","InstFail","InstNop","InstRune","InstRune1","InstRuneAny","InstRuneAnyNotNL"]);}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["regexp"]=(function(){var $pkg={},$init,C,H,B,A,D,F,G,E,I,J,K,P,Q,R,S,V,W,AA,AH,AQ,AX,AY,AZ,BA,BI,BJ,BK,BL,BM,BN,BO,BP,BQ,BR,BS,BT,BU,BV,BW,BX,BY,BZ,CA,CB,CC,CD,CE,CF,CG,CH,CI,CJ,CK,CL,CM,CN,CO,CP,CQ,CR,L,U,AC,AD,AI,AJ,AN,M,N,O,T,X,Y,Z,AB,AE,AF,AG,AK,AO,AR,AT,AU,AW,BH;C=$packages["bytes"];H=$packages["github.com/gopherjs/gopherjs/nosync"];B=$packages["io"];A=$packages["regexp/syntax"];D=$packages["sort"];F=$packages["strconv"];G=$packages["strings"];E=$packages["unicode"];I=$packages["unicode/utf8"];J=$pkg.job=$newType(0,$kindStruct,"regexp.job","job","regexp",function(pc_,arg_,pos_){this.$val=this;if(arguments.length===0){this.pc=0;this.arg=0;this.pos=0;return;}this.pc=pc_;this.arg=arg_;this.pos=pos_;});K=$pkg.bitState=$newType(0,$kindStruct,"regexp.bitState","bitState","regexp",function(prog_,end_,cap_,input_,jobs_,visited_){this.$val=this;if(arguments.length===0){this.prog=BO.nil;this.end=0;this.cap=BJ.nil;this.input=$ifaceNil;this.jobs=BP.nil;this.visited=BL.nil;return;}this.prog=prog_;this.end=end_;this.cap=cap_;this.input=input_;this.jobs=jobs_;this.visited=visited_;});P=$pkg.queue=$newType(0,$kindStruct,"regexp.queue","queue","regexp",function(sparse_,dense_){this.$val=this;if(arguments.length===0){this.sparse=BL.nil;this.dense=BR.nil;return;}this.sparse=sparse_;this.dense=dense_;});Q=$pkg.entry=$newType(0,$kindStruct,"regexp.entry","entry","regexp",function(pc_,t_){this.$val=this;if(arguments.length===0){this.pc=0;this.t=BS.nil;return;}this.pc=pc_;this.t=t_;});R=$pkg.thread=$newType(0,$kindStruct,"regexp.thread","thread","regexp",function(inst_,cap_){this.$val=this;if(arguments.length===0){this.inst=BU.nil;this.cap=BJ.nil;return;}this.inst=inst_;this.cap=cap_;});S=$pkg.machine=$newType(0,$kindStruct,"regexp.machine","machine","regexp",function(re_,p_,op_,maxBitStateLen_,b_,q0_,q1_,pool_,matched_,matchcap_,inputBytes_,inputString_,inputReader_){this.$val=this;if(arguments.length===0){this.re=BQ.nil;this.p=BO.nil;this.op=BM.nil;this.maxBitStateLen=0;this.b=BI.nil;this.q0=new P.ptr(BL.nil,BR.nil);this.q1=new P.ptr(BL.nil,BR.nil);this.pool=BT.nil;this.matched=false;this.matchcap=BJ.nil;this.inputBytes=new AZ.ptr(BN.nil);this.inputString=new AY.ptr("");this.inputReader=new BA.ptr($ifaceNil,false,0);return;}this.re=re_;this.p=p_;this.op=op_;this.maxBitStateLen=maxBitStateLen_;this.b=b_;this.q0=q0_;this.q1=q1_;this.pool=pool_;this.matched=matched_;this.matchcap=matchcap_;this.inputBytes=inputBytes_;this.inputString=inputString_;this.inputReader=inputReader_;});V=$pkg.onePassProg=$newType(0,$kindStruct,"regexp.onePassProg","onePassProg","regexp",function(Inst_,Start_,NumCap_){this.$val=this;if(arguments.length===0){this.Inst=BZ.nil;this.Start=0;this.NumCap=0;return;}this.Inst=Inst_;this.Start=Start_;this.NumCap=NumCap_;});W=$pkg.onePassInst=$newType(0,$kindStruct,"regexp.onePassInst","onePassInst","regexp",function(Inst_,Next_){this.$val=this;if(arguments.length===0){this.Inst=new A.Inst.ptr(0,0,0,BK.nil);this.Next=BL.nil;return;}this.Inst=Inst_;this.Next=Next_;});AA=$pkg.queueOnePass=$newType(0,$kindStruct,"regexp.queueOnePass","queueOnePass","regexp",function(sparse_,dense_,size_,nextIndex_){this.$val=this;if(arguments.length===0){this.sparse=BL.nil;this.dense=BL.nil;this.size=0;this.nextIndex=0;return;}this.sparse=sparse_;this.dense=dense_;this.size=size_;this.nextIndex=nextIndex_;});AH=$pkg.runeSlice=$newType(12,$kindSlice,"regexp.runeSlice","runeSlice","regexp",null);AQ=$pkg.Regexp=$newType(0,$kindStruct,"regexp.Regexp","Regexp","regexp",function(expr_,prog_,onepass_,prefix_,prefixBytes_,prefixComplete_,prefixRune_,prefixEnd_,cond_,numSubexp_,subexpNames_,longest_,mu_,machine_){this.$val=this;if(arguments.length===0){this.expr="";this.prog=BO.nil;this.onepass=BM.nil;this.prefix="";this.prefixBytes=BN.nil;this.prefixComplete=false;this.prefixRune=0;this.prefixEnd=0;this.cond=0;this.numSubexp=0;this.subexpNames=CD.nil;this.longest=false;this.mu=new H.Mutex.ptr(false);this.machine=CF.nil;return;}this.expr=expr_;this.prog=prog_;this.onepass=onepass_;this.prefix=prefix_;this.prefixBytes=prefixBytes_;this.prefixComplete=prefixComplete_;this.prefixRune=prefixRune_;this.prefixEnd=prefixEnd_;this.cond=cond_;this.numSubexp=numSubexp_;this.subexpNames=subexpNames_;this.longest=longest_;this.mu=mu_;this.machine=machine_;});AX=$pkg.input=$newType(8,$kindInterface,"regexp.input","input","regexp",null);AY=$pkg.inputString=$newType(0,$kindStruct,"regexp.inputString","inputString","regexp",function(str_){this.$val=this;if(arguments.length===0){this.str="";return;}this.str=str_;});AZ=$pkg.inputBytes=$newType(0,$kindStruct,"regexp.inputBytes","inputBytes","regexp",function(str_){this.$val=this;if(arguments.length===0){this.str=BN.nil;return;}this.str=str_;});BA=$pkg.inputReader=$newType(0,$kindStruct,"regexp.inputReader","inputReader","regexp",function(r_,atEOT_,pos_){this.$val=this;if(arguments.length===0){this.r=$ifaceNil;this.atEOT=false;this.pos=0;return;}this.r=r_;this.atEOT=atEOT_;this.pos=pos_;});BI=$ptrType(K);BJ=$sliceType($Int);BK=$sliceType($Int32);BL=$sliceType($Uint32);BM=$ptrType(V);BN=$sliceType($Uint8);BO=$ptrType(A.Prog);BP=$sliceType(J);BQ=$ptrType(AQ);BR=$sliceType(Q);BS=$ptrType(R);BT=$sliceType(BS);BU=$ptrType(A.Inst);BV=$ptrType($Int);BW=$arrayType($Uint8,4);BX=$arrayType($Uint8,64);BY=$ptrType(AA);BZ=$sliceType(W);CA=$ptrType($Uint32);CB=$sliceType(BK);CC=$ptrType(BK);CD=$sliceType($String);CE=$ptrType(S);CF=$sliceType(CE);CG=$sliceType(BN);CH=$sliceType(BJ);CI=$sliceType(CG);CJ=$sliceType(CD);CK=$ptrType(P);CL=$funcType([$String],[$String],false);CM=$funcType([BN,BJ],[BN],false);CN=$funcType([BN],[BN],false);CO=$funcType([BJ],[],false);CP=$ptrType(AY);CQ=$ptrType(AZ);CR=$ptrType(BA);M=function(a){var $ptr,a,b;if(!O(a)){return 0;}return(b=262144/a.Inst.$length,(b===b&&b!==1/0&&b!==-1/0)?b>>0:$throwRuntimeError("integer divide by zero"));};N=function(a){var $ptr,a;if(!O(a)){return L;}return new K.ptr(a,0,BJ.nil,$ifaceNil,BP.nil,BL.nil);};O=function(a){var $ptr,a;return a.Inst.$length<=500;};K.ptr.prototype.reset=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=this;c.end=a;if(c.jobs.$capacity===0){c.jobs=$makeSlice(BP,0,256);}else{c.jobs=$subslice(c.jobs,0,0);}e=(d=((((c.prog.Inst.$length*((a+1>>0))>>0)+32>>0)-1>>0))/32,(d===d&&d!==1/0&&d!==-1/0)?d>>0:$throwRuntimeError("integer divide by zero"));if(c.visited.$capacity=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h]=0));g++;}}if(c.cap.$capacity=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+l]=-1));k++;}};K.prototype.reset=function(a,b){return this.$val.reset(a,b);};K.ptr.prototype.shouldVisit=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m;c=this;d=((((a>>0)*((c.end+1>>0))>>0)+b>>0)>>>0);if(!(((((e=c.visited,f=(g=d/32,(g===g&&g!==1/0&&g!==-1/0)?g>>>0:$throwRuntimeError("integer divide by zero")),((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]))&(((h=(((d&31)>>>0)),h<32?(1<>>0)))>>>0)===0))){return false;}j=(i=d/32,(i===i&&i!==1/0&&i!==-1/0)?i>>>0:$throwRuntimeError("integer divide by zero"));(m=c.visited,((j<0||j>=m.$length)?$throwRuntimeError("index out of range"):m.$array[m.$offset+j]=(((k=c.visited,((j<0||j>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+j]))|(((l=(((d&31)>>>0)),l<32?(1<>>0)))>>>0)));return true;};K.prototype.shouldVisit=function(a,b){return this.$val.shouldVisit(a,b);};K.ptr.prototype.push=function(a,b,c){var $ptr,a,b,c,d,e;d=this;if((e=d.prog.Inst,((a<0||a>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+a])).Op===5){return;}if((c===0)&&!d.shouldVisit(a,b)){return;}d.jobs=$append(d.jobs,new J.ptr(a,c,b));};K.prototype.push=function(a,b,c){return this.$val.push(a,b,c);};S.ptr.prototype.tryBacktrack=function(a,b,c,d){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=e.re.longest;e.matched=false;a.push(c,d,0);case 1:if(!(a.jobs.$length>0)){$s=2;continue;}g=a.jobs.$length-1>>0;i=(h=a.jobs,((g<0||g>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g])).pc;k=(j=a.jobs,((g<0||g>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+g])).pos;m=(l=a.jobs,((g<0||g>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+g])).arg;a.jobs=$subslice(a.jobs,0,g);$s=3;continue;case 4:if(!a.shouldVisit(i,k)){$s=1;continue;}case 3:o=$clone((n=a.prog.Inst,((i<0||i>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+i])),A.Inst);p=o.Op;if(p===5){$s=5;continue;}if(p===0){$s=6;continue;}if(p===1){$s=7;continue;}if(p===7){$s=8;continue;}if(p===8){$s=9;continue;}if(p===10){$s=10;continue;}if(p===9){$s=11;continue;}if(p===2){$s=12;continue;}if(p===3){$s=13;continue;}if(p===6){$s=14;continue;}if(p===4){$s=15;continue;}$s=16;continue;case 5:$panic(new $String("unexpected InstFail"));$s=17;continue;case 6:q=m;if(q===0){$s=18;continue;}if(q===1){$s=19;continue;}$s=20;continue;case 18:a.push(i,k,1);i=o.Out;$s=4;continue;$s=20;continue;case 19:m=0;i=o.Arg;$s=4;continue;case 20:$panic(new $String("bad arg in InstAlt"));$s=17;continue;case 7:r=(s=a.prog.Inst,t=o.Out,((t<0||t>=s.$length)?$throwRuntimeError("index out of range"):s.$array[s.$offset+t])).Op;if(r===7||r===8||r===9||r===10){$s=21;continue;}$s=22;continue;case 21:a.push(o.Arg,k,0);i=o.Arg;k=a.end;$s=4;continue;case 22:a.push(o.Out,a.end,0);i=o.Out;$s=4;continue;$s=17;continue;case 8:v=b.step(k);$s=23;case 23:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;w=u[0];x=u[1];if(!o.MatchRune(w)){$s=24;continue;}$s=25;continue;case 24:$s=1;continue;case 25:k=k+(x)>>0;i=o.Out;$s=4;continue;$s=17;continue;case 9:z=b.step(k);$s=26;case 26:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}y=z;aa=y[0];ab=y[1];if(!((aa===(ac=o.Rune,(0>=ac.$length?$throwRuntimeError("index out of range"):ac.$array[ac.$offset+0]))))){$s=27;continue;}$s=28;continue;case 27:$s=1;continue;case 28:k=k+(ab)>>0;i=o.Out;$s=4;continue;$s=17;continue;case 10:ae=b.step(k);$s=29;case 29:if($c){$c=false;ae=ae.$blk();}if(ae&&ae.$blk!==undefined){break s;}ad=ae;af=ad[0];ag=ad[1];if((af===10)||(af===-1)){$s=30;continue;}$s=31;continue;case 30:$s=1;continue;case 31:k=k+(ag)>>0;i=o.Out;$s=4;continue;$s=17;continue;case 11:ai=b.step(k);$s=32;case 32:if($c){$c=false;ai=ai.$blk();}if(ai&&ai.$blk!==undefined){break s;}ah=ai;aj=ah[0];ak=ah[1];if(aj===-1){$s=33;continue;}$s=34;continue;case 33:$s=1;continue;case 34:k=k+(ak)>>0;i=o.Out;$s=4;continue;$s=17;continue;case 12:al=m;if(al===0){$s=35;continue;}if(al===1){$s=36;continue;}$s=37;continue;case 35:if(0<=o.Arg&&o.Arg<(a.cap.$length>>>0)){a.push(i,(am=a.cap,an=o.Arg,((an<0||an>=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an])),1);(ao=a.cap,ap=o.Arg,((ap<0||ap>=ao.$length)?$throwRuntimeError("index out of range"):ao.$array[ao.$offset+ap]=k));}i=o.Out;$s=4;continue;$s=37;continue;case 36:(aq=a.cap,ar=o.Arg,((ar<0||ar>=aq.$length)?$throwRuntimeError("index out of range"):aq.$array[aq.$offset+ar]=k));$s=1;continue;case 37:$panic(new $String("bad arg in InstCapture"));$s=1;continue;$s=17;continue;case 13:as=b.context(k);$s=40;case 40:if($c){$c=false;as=as.$blk();}if(as&&as.$blk!==undefined){break s;}if(!(((((o.Arg<<24>>>24)&~as)<<24>>>24)===0))){$s=38;continue;}$s=39;continue;case 38:$s=1;continue;case 39:i=o.Out;$s=4;continue;$s=17;continue;case 14:i=o.Out;$s=4;continue;$s=17;continue;case 15:if(a.cap.$length===0){e.matched=true;return e.matched;}if(a.cap.$length>1){(at=a.cap,(1>=at.$length?$throwRuntimeError("index out of range"):at.$array[at.$offset+1]=k));}if(!e.matched||(f&&k>0&&k>(au=e.matchcap,(1>=au.$length?$throwRuntimeError("index out of range"):au.$array[au.$offset+1])))){$copySlice(e.matchcap,a.cap);}e.matched=true;if(!f){return e.matched;}if(k===a.end){return e.matched;}$s=1;continue;$s=17;continue;case 16:$panic(new $String("bad inst"));case 17:$panic(new $String("unreachable"));$s=1;continue;case 2:return e.matched;}return;}if($f===undefined){$f={$blk:S.ptr.prototype.tryBacktrack};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};S.prototype.tryBacktrack=function(a,b,c,d){return this.$val.tryBacktrack(a,b,c,d);};S.ptr.prototype.backtrack=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=a.canCheckPrefix();$s=3;case 3:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}if(!f){$s=1;continue;}$s=2;continue;case 1:$panic(new $String("backtrack called for a RuneReader"));case 2:g=e.re.cond;if(g===255){return false;}if(!((((g&4)>>>0)===0))&&!((b===0))){return false;}h=e.b;h.reset(c,d);e.matchcap=$subslice(e.matchcap,0,d);i=e.matchcap;j=0;while(true){if(!(j=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]=-1));j++;}if(!((((g&4)>>>0)===0))){$s=4;continue;}$s=5;continue;case 4:if(h.cap.$length>0){(m=h.cap,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]=b));}n=e.tryBacktrack(h,a,(e.p.Start>>>0),b);$s=6;case 6:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}return n;case 5:o=-1;case 7:if(!(b<=c&&!((o===0)))){$s=8;continue;}if(e.re.prefix.length>0){$s=9;continue;}$s=10;continue;case 9:p=a.index(e.re,b);$s=11;case 11:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}q=p;if(q<0){return false;}b=b+(q)>>0;case 10:if(h.cap.$length>0){(r=h.cap,(0>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+0]=b));}s=e.tryBacktrack(h,a,(e.p.Start>>>0),b);$s=14;case 14:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}if(s){$s=12;continue;}$s=13;continue;case 12:return true;case 13:u=a.step(b);$s=15;case 15:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;o=t[1];b=b+(o)>>0;$s=7;continue;case 8:return false;}return;}if($f===undefined){$f={$blk:S.ptr.prototype.backtrack};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$r=$r;return $f;};S.prototype.backtrack=function(a,b,c,d){return this.$val.backtrack(a,b,c,d);};S.ptr.prototype.newInputBytes=function(a){var $ptr,a,b;b=this;b.inputBytes.str=a;return b.inputBytes;};S.prototype.newInputBytes=function(a){return this.$val.newInputBytes(a);};S.ptr.prototype.newInputString=function(a){var $ptr,a,b;b=this;b.inputString.str=a;return b.inputString;};S.prototype.newInputString=function(a){return this.$val.newInputString(a);};S.ptr.prototype.newInputReader=function(a){var $ptr,a,b;b=this;b.inputReader.r=a;b.inputReader.atEOT=false;b.inputReader.pos=0;return b.inputReader;};S.prototype.newInputReader=function(a){return this.$val.newInputReader(a);};T=function(a,b){var $ptr,a,b,c,d,e;c=new S.ptr(BQ.nil,a,b,0,BI.nil,new P.ptr(BL.nil,BR.nil),new P.ptr(BL.nil,BR.nil),BT.nil,false,BJ.nil,new AZ.ptr(BN.nil),new AY.ptr(""),new BA.ptr($ifaceNil,false,0));d=c.p.Inst.$length;P.copy(c.q0,new P.ptr($makeSlice(BL,d),$makeSlice(BR,0,d)));P.copy(c.q1,new P.ptr($makeSlice(BL,d),$makeSlice(BR,0,d)));e=a.NumCap;if(e<2){e=2;}if(b===AN){c.maxBitStateLen=M(a);}c.matchcap=$makeSlice(BJ,e);return c;};S.ptr.prototype.init=function(a){var $ptr,a,b,c,d,e;b=this;c=b.pool;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);e.cap=$subslice(e.cap,0,a);d++;}b.matchcap=$subslice(b.matchcap,0,a);};S.prototype.init=function(a){return this.$val.init(a);};S.ptr.prototype.alloc=function(a){var $ptr,a,b,c,d,e,f;b=this;c=BS.nil;d=b.pool.$length;if(d>0){c=(e=b.pool,f=d-1>>0,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));b.pool=$subslice(b.pool,0,(d-1>>0));}else{c=new R.ptr(BU.nil,BJ.nil);c.cap=$makeSlice(BJ,b.matchcap.$length,b.matchcap.$capacity);}c.inst=a;return c;};S.prototype.alloc=function(a){return this.$val.alloc(a);};S.ptr.prototype.match=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=c.re.cond;if(d===255){return false;}c.matched=false;e=c.matchcap;f=0;while(true){if(!(f=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+g]=-1));f++;}i=c.q0;j=c.q1;k=i;l=j;m=-1;n=-1;o=m;p=n;q=0;r=0;s=q;t=r;v=a.step(b);$s=1;case 1:if($c){$c=false;v=v.$blk();}if(v&&v.$blk!==undefined){break s;}u=v;o=u[0];s=u[1];if(!((o===-1))){$s=2;continue;}$s=3;continue;case 2:x=a.step(b+s>>0);$s=4;case 4:if($c){$c=false;x=x.$blk();}if(x&&x.$blk!==undefined){break s;}w=x;p=w[0];t=w[1];case 3:y=0;if(b===0){$s=5;continue;}$s=6;continue;case 5:y=A.EmptyOpContext(-1,o);$s=7;continue;case 6:z=a.context(b);$s=8;case 8:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}y=z;case 7:case 9:if(k.dense.$length===0){$s=11;continue;}$s=12;continue;case 11:if(!((((d&4)>>>0)===0))&&!((b===0))){$s=10;continue;}if(c.matched){$s=10;continue;}if(!(c.re.prefix.length>0&&!((p===c.re.prefixRune)))){aa=false;$s=15;continue s;}ab=a.canCheckPrefix();$s=16;case 16:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}aa=ab;case 15:if(aa){$s=13;continue;}$s=14;continue;case 13:ac=a.index(c.re,b);$s=17;case 17:if($c){$c=false;ac=ac.$blk();}if(ac&&ac.$blk!==undefined){break s;}ad=ac;if(ad<0){$s=10;continue;}b=b+(ad)>>0;af=a.step(b);$s=18;case 18:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ae=af;o=ae[0];s=ae[1];ah=a.step(b+s>>0);$s=19;case 19:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}ag=ah;p=ag[0];t=ag[1];case 14:case 12:if(!c.matched){if(c.matchcap.$length>0){(ai=c.matchcap,(0>=ai.$length?$throwRuntimeError("index out of range"):ai.$array[ai.$offset+0]=b));}c.add(k,(c.p.Start>>>0),b,c.matchcap,y,BS.nil);}y=A.EmptyOpContext(o,p);c.step(k,l,b,b+s>>0,o,y);if(s===0){$s=10;continue;}if((c.matchcap.$length===0)&&c.matched){$s=10;continue;}b=b+(s)>>0;aj=p;ak=t;o=aj;s=ak;if(!((o===-1))){$s=20;continue;}$s=21;continue;case 20:am=a.step(b+s>>0);$s=22;case 22:if($c){$c=false;am=am.$blk();}if(am&&am.$blk!==undefined){break s;}al=am;p=al[0];t=al[1];case 21:an=l;ao=k;k=an;l=ao;$s=9;continue;case 10:c.clear(l);return c.matched;}return;}if($f===undefined){$f={$blk:S.ptr.prototype.match};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};S.prototype.match=function(a,b){return this.$val.match(a,b);};S.ptr.prototype.clear=function(a){var $ptr,a,b,c,d,e;b=this;c=a.dense;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),Q);if(!(e.t===BS.nil)){b.pool=$append(b.pool,e.t);}d++;}a.dense=$subslice(a.dense,0,0);};S.prototype.clear=function(a){return this.$val.clear(a);};S.ptr.prototype.step=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;g=this;h=g.re.longest;i=0;while(true){if(!(i=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i]));l=k.t;if(l===BS.nil){i=i+(1)>>0;continue;}if(h&&g.matched&&l.cap.$length>0&&(m=g.matchcap,(0>=m.$length?$throwRuntimeError("index out of range"):m.$array[m.$offset+0]))<(n=l.cap,(0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0]))){g.pool=$append(g.pool,l);i=i+(1)>>0;continue;}o=l.inst;p=false;q=o.Op;if(q===4){if(l.cap.$length>0&&(!h||!g.matched||(r=g.matchcap,(1>=r.$length?$throwRuntimeError("index out of range"):r.$array[r.$offset+1]))=s.$length?$throwRuntimeError("index out of range"):s.$array[s.$offset+1]=c));$copySlice(g.matchcap,l.cap);}if(!h){t=$subslice(a.dense,(i+1>>0));u=0;while(true){if(!(u=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]),Q);if(!(v.t===BS.nil)){g.pool=$append(g.pool,v.t);}u++;}a.dense=$subslice(a.dense,0,0);}g.matched=true;}else if(q===7){p=o.MatchRune(e);}else if(q===8){p=e===(w=o.Rune,(0>=w.$length?$throwRuntimeError("index out of range"):w.$array[w.$offset+0]));}else if(q===9){p=true;}else if(q===10){p=!((e===10));}else{$panic(new $String("bad inst"));}if(p){l=g.add(b,o.Out,d,l.cap,f,l);}if(!(l===BS.nil)){g.pool=$append(g.pool,l);}i=i+(1)>>0;}a.dense=$subslice(a.dense,0,0);};S.prototype.step=function(a,b,c,d,e,f){return this.$val.step(a,b,c,d,e,f);};S.ptr.prototype.add=function(a,b,c,d,e,f){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;g=this;if(b===0){return f;}i=(h=a.sparse,((b<0||b>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+b]));if(i<(a.dense.$length>>>0)&&((j=a.dense,((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])).pc===b)){return f;}k=a.dense.$length;a.dense=$subslice(a.dense,0,(k+1>>0));m=(l=a.dense,((k<0||k>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+k]));m.t=BS.nil;m.pc=b;(n=a.sparse,((b<0||b>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+b]=(k>>>0)));p=(o=g.p.Inst,((b<0||b>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+b]));q=p.Op;if(q===5){}else if(q===0||q===1){f=g.add(a,p.Out,c,d,e,f);f=g.add(a,p.Arg,c,d,e,f);}else if(q===3){if((((p.Arg<<24>>>24)&~e)<<24>>>24)===0){f=g.add(a,p.Out,c,d,e,f);}}else if(q===6){f=g.add(a,p.Out,c,d,e,f);}else if(q===2){if((p.Arg>>0)=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+r]));(t=p.Arg,((t<0||t>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+t]=c));g.add(a,p.Out,c,d,e,BS.nil);(u=p.Arg,((u<0||u>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+u]=s));}else{f=g.add(a,p.Out,c,d,e,f);}}else if(q===4||q===7||q===8||q===9||q===10){if(f===BS.nil){f=g.alloc(p);}else{f.inst=p;}if(d.$length>0&&!((v=f.cap,$indexPtr(v.$array,v.$offset+0,BV))===$indexPtr(d.$array,d.$offset+0,BV))){$copySlice(f.cap,d);}m.t=f;f=BS.nil;}else{$panic(new $String("unhandled"));}return f;};S.prototype.add=function(a,b,c,d,e,f){return this.$val.add(a,b,c,d,e,f);};S.ptr.prototype.onepass=function(a,b){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;e=d.re.cond;if(e===255){return false;}d.matched=false;f=d.matchcap;g=0;while(true){if(!(g=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+h]=-1));g++;}j=-1;k=-1;l=j;m=k;n=0;o=0;p=n;q=o;s=a.step(b);$s=1;case 1:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}r=s;l=r[0];p=r[1];if(!((l===-1))){$s=2;continue;}$s=3;continue;case 2:u=a.step(b+p>>0);$s=4;case 4:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}t=u;m=t[0];q=t[1];case 3:v=0;if(b===0){$s=5;continue;}$s=6;continue;case 5:v=A.EmptyOpContext(-1,l);$s=7;continue;case 6:w=a.context(b);$s=8;case 8:if($c){$c=false;w=w.$blk();}if(w&&w.$blk!==undefined){break s;}v=w;case 7:x=d.op.Start;c[0]=$clone((y=d.op.Inst,((x<0||x>=y.$length)?$throwRuntimeError("index out of range"):y.$array[y.$offset+x])),W);if(!((b===0)&&((((c[0].Inst.Arg<<24>>>24)&~v)<<24>>>24)===0)&&d.re.prefix.length>0)){z=false;$s=11;continue s;}aa=a.canCheckPrefix();$s=12;case 12:if($c){$c=false;aa=aa.$blk();}if(aa&&aa.$blk!==undefined){break s;}z=aa;case 11:if(z){$s=9;continue;}$s=10;continue;case 9:ab=a.hasPrefix(d.re);$s=16;case 16:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}if(ab){$s=13;continue;}$s=14;continue;case 13:b=b+(d.re.prefix.length)>>0;ad=a.step(b);$s=17;case 17:if($c){$c=false;ad=ad.$blk();}if(ad&&ad.$blk!==undefined){break s;}ac=ad;l=ac[0];p=ac[1];af=a.step(b+p>>0);$s=18;case 18:if($c){$c=false;af=af.$blk();}if(af&&af.$blk!==undefined){break s;}ae=af;m=ae[0];q=ae[1];ag=a.context(b);$s=19;case 19:if($c){$c=false;ag=ag.$blk();}if(ag&&ag.$blk!==undefined){break s;}v=ag;x=(d.re.prefixEnd>>0);$s=15;continue;case 14:return d.matched;case 15:case 10:case 20:W.copy(c[0],(ah=d.op.Inst,((x<0||x>=ah.$length)?$throwRuntimeError("index out of range"):ah.$array[ah.$offset+x])));x=(c[0].Inst.Out>>0);ai=c[0].Inst.Op;if(ai===4){$s=22;continue;}if(ai===7){$s=23;continue;}if(ai===8){$s=24;continue;}if(ai===9){$s=25;continue;}if(ai===10){$s=26;continue;}if(ai===0||ai===1){$s=27;continue;}if(ai===5){$s=28;continue;}if(ai===6){$s=29;continue;}if(ai===3){$s=30;continue;}if(ai===2){$s=31;continue;}$s=32;continue;case 22:d.matched=true;if(d.matchcap.$length>0){(aj=d.matchcap,(0>=aj.$length?$throwRuntimeError("index out of range"):aj.$array[aj.$offset+0]=0));(ak=d.matchcap,(1>=ak.$length?$throwRuntimeError("index out of range"):ak.$array[ak.$offset+1]=b));}return d.matched;case 23:if(!c[0].Inst.MatchRune(l)){return d.matched;}$s=33;continue;case 24:if(!((l===(al=c[0].Inst.Rune,(0>=al.$length?$throwRuntimeError("index out of range"):al.$array[al.$offset+0]))))){return d.matched;}$s=33;continue;case 25:$s=33;continue;case 26:if(l===10){return d.matched;}$s=33;continue;case 27:x=(Y(c[0],l)>>0);$s=20;continue;$s=33;continue;case 28:return d.matched;case 29:$s=20;continue;$s=33;continue;case 30:if(!(((((c[0].Inst.Arg<<24>>>24)&~v)<<24>>>24)===0))){return d.matched;}$s=20;continue;$s=33;continue;case 31:if((c[0].Inst.Arg>>0)=am.$length)?$throwRuntimeError("index out of range"):am.$array[am.$offset+an]=b));}$s=20;continue;$s=33;continue;case 32:$panic(new $String("bad inst"));case 33:if(p===0){$s=21;continue;}v=A.EmptyOpContext(l,m);b=b+(p)>>0;ao=m;ap=q;l=ao;p=ap;if(!((l===-1))){$s=34;continue;}$s=35;continue;case 34:ar=a.step(b+p>>0);$s=36;case 36:if($c){$c=false;ar=ar.$blk();}if(ar&&ar.$blk!==undefined){break s;}aq=ar;m=aq[0];q=aq[1];case 35:$s=20;continue;case 21:return d.matched;}return;}if($f===undefined){$f={$blk:S.ptr.prototype.onepass};}$f.$ptr=$ptr;$f.a=a;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};S.prototype.onepass=function(a,b){return this.$val.onepass(a,b);};AQ.ptr.prototype.doExecute=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=this;g=f.get();h=$ifaceNil;i=0;if(!($interfaceIsEqual(a,$ifaceNil))){h=g.newInputReader(a);}else if(!(b===BN.nil)){h=g.newInputBytes(b);i=b.$length;}else{h=g.newInputString(c);i=c.length;}if(!(g.op===AN)){$s=1;continue;}if(i=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f]));if(!((g.Op===3))||(((((g.Arg<<24>>>24))&4)>>>0)===0)){h="";i=g.Op===4;j=(a.Start>>>0);b=h;c=i;d=j;return[b,c,d];}d=g.Out;g=(k=a.Inst,((d<0||d>=k.$length)?$throwRuntimeError("index out of range"):k.$array[k.$offset+d]));while(true){if(!(g.Op===6)){break;}d=g.Out;g=(l=a.Inst,((d<0||d>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+d]));}if(!((Z(g)===7))||!((g.Rune.$length===1))){m="";n=g.Op===4;o=(a.Start>>>0);b=m;c=n;d=o;return[b,c,d];}p=new C.Buffer.ptr(BN.nil,0,BW.zero(),BX.zero(),0);while(true){if(!((Z(g)===7)&&(g.Rune.$length===1)&&((((g.Arg<<16>>>16)&1)>>>0)===0))){break;}p.WriteRune((q=g.Rune,(0>=q.$length?$throwRuntimeError("index out of range"):q.$array[q.$offset+0])));r=g.Out;s=(t=a.Inst,u=g.Out,((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u]));d=r;g=s;}v=p.String();w=(g.Op===3)&&!((((((g.Arg<<24>>>24))&4)>>>0)===0));x=d;b=v;c=w;d=x;return[b,c,d];};Y=function(a,b){var $ptr,a,b,c,d;c=a.Inst.MatchRunePos(b);if(c>=0){return(d=a.Next,((c<0||c>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+c]));}if(a.Inst.Op===1){return a.Inst.Out;}return 0;};Z=function(a){var $ptr,a,b,c;b=a.Op;c=b;if(c===8||c===9||c===10){b=7;}return b;};AA.ptr.prototype.empty=function(){var $ptr,a;a=this;return a.nextIndex>=a.size;};AA.prototype.empty=function(){return this.$val.empty();};AA.ptr.prototype.next=function(){var $ptr,a,b,c,d;a=0;b=this;a=(c=b.dense,d=b.nextIndex,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]));b.nextIndex=b.nextIndex+(1)>>>0;return a;};AA.prototype.next=function(){return this.$val.next();};AA.ptr.prototype.clear=function(){var $ptr,a;a=this;a.size=0;a.nextIndex=0;};AA.prototype.clear=function(){return this.$val.clear();};AA.ptr.prototype.reset=function(){var $ptr,a;a=this;a.nextIndex=0;};AA.prototype.reset=function(){return this.$val.reset();};AA.ptr.prototype.contains=function(a){var $ptr,a,b,c,d,e,f;b=this;if(a>=(b.sparse.$length>>>0)){return false;}return(c=b.sparse,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]))=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+a])),((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]))===a);};AA.prototype.contains=function(a){return this.$val.contains(a);};AA.ptr.prototype.insert=function(a){var $ptr,a,b;b=this;if(!b.contains(a)){b.insertNew(a);}};AA.prototype.insert=function(a){return this.$val.insert(a);};AA.ptr.prototype.insertNew=function(a){var $ptr,a,b,c,d,e;b=this;if(a>=(b.sparse.$length>>>0)){return;}(c=b.sparse,((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=b.size));(d=b.dense,e=b.size,((e<0||e>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+e]=a));b.size=b.size+(1)>>>0;};AA.prototype.insertNew=function(a){return this.$val.insertNew(a);};AB=function(a){var $ptr,a,b;b=BY.nil;b=new AA.ptr($makeSlice(BL,a),$makeSlice(BL,a),0,0);return b;};AE=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,$s,$deferred,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;$s=$f.$s;$deferred=$f.$deferred;$r=$f.$r;}var $err=null;try{s:while(true){switch($s){case 0:$deferred=[];$deferred.index=$curGoroutine.deferStack.length;$curGoroutine.deferStack.push($deferred);e=[e];f=[f];g=[g];h=[h];i=[i];j=[j];k=a.$get().$length;l=b.$get().$length;if(!(((k&1)===0))||!(((l&1)===0))){$panic(new $String("mergeRuneSets odd length []rune"));}m=0;n=0;i[0]=m;j[0]=n;f[0]=$makeSlice(BK,0);g[0]=$makeSlice(BL,0);e[0]=true;$deferred.push([(function(e,f,g,h,i,j){return function(){var $ptr;if(!e[0]){f[0]=BK.nil;g[0]=BL.nil;}};})(e,f,g,h,i,j),[]]);h[0]=-1;o=(function(e,f,g,h,i,j){return function(o,p,q){var $ptr,o,p,q,r,s,t,u,v,w;if(h[0]>0&&(r=p.$get(),s=o.$get(),((s<0||s>=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]))<=((h[0]<0||h[0]>=f[0].$length)?$throwRuntimeError("index out of range"):f[0].$array[f[0].$offset+h[0]])){return false;}f[0]=$append(f[0],(t=p.$get(),u=o.$get(),((u<0||u>=t.$length)?$throwRuntimeError("index out of range"):t.$array[t.$offset+u])),(v=p.$get(),w=o.$get()+1>>0,((w<0||w>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w])));o.$set(o.$get()+(2)>>0);h[0]=h[0]+(2)>>0;g[0]=$append(g[0],q);return true;};})(e,f,g,h,i,j);case 1:if(!(i[0]=l){$s=3;continue;}if(i[0]>=k){$s=4;continue;}if((p=b.$get(),((j[0]<0||j[0]>=p.$length)?$throwRuntimeError("index out of range"):p.$array[p.$offset+j[0]]))<(q=a.$get(),((i[0]<0||i[0]>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+i[0]]))){$s=5;continue;}$s=6;continue;case 3:r=o((i.$ptr||(i.$ptr=new BV(function(){return this.$target[0];},function($v){this.$target[0]=$v;},i))),a,c);$s=8;case 8:if($c){$c=false;r=r.$blk();}if(r&&r.$blk!==undefined){break s;}e[0]=r;$s=7;continue;case 4:s=o((j.$ptr||(j.$ptr=new BV(function(){return this.$target[0];},function($v){this.$target[0]=$v;},j))),b,d);$s=9;case 9:if($c){$c=false;s=s.$blk();}if(s&&s.$blk!==undefined){break s;}e[0]=s;$s=7;continue;case 5:t=o((j.$ptr||(j.$ptr=new BV(function(){return this.$target[0];},function($v){this.$target[0]=$v;},j))),b,d);$s=10;case 10:if($c){$c=false;t=t.$blk();}if(t&&t.$blk!==undefined){break s;}e[0]=t;$s=7;continue;case 6:u=o((i.$ptr||(i.$ptr=new BV(function(){return this.$target[0];},function($v){this.$target[0]=$v;},i))),a,c);$s=11;case 11:if($c){$c=false;u=u.$blk();}if(u&&u.$blk!==undefined){break s;}e[0]=u;case 7:if(!e[0]){return[AC,AD];}$s=1;continue;case 2:return[f[0],g[0]];}return;}}catch(err){$err=err;$s=-1;return[BK.nil,BL.nil];}finally{$callDeferred($deferred,$err);if($curGoroutine.asleep){if($f===undefined){$f={$blk:AE};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.$s=$s;$f.$deferred=$deferred;$f.$r=$r;return $f;}}};AF=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j;c=b.Inst;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),A.Inst);g=f.Op;if(g===0||g===1||g===7){}else if(g===2||g===3||g===6||g===4||g===5){(h=a.Inst,((e<0||e>=h.$length)?$throwRuntimeError("index out of range"):h.$array[h.$offset+e])).Next=BL.nil;}else if(g===8||g===9||g===10){(i=a.Inst,((e<0||e>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+e])).Next=BL.nil;W.copy((j=a.Inst,((e<0||e>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+e])),new W.ptr($clone(f,A.Inst),BL.nil));}d++;}};AG=function(a){var $ptr,a,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;b=new V.ptr(BZ.nil,a.Start,a.NumCap);c=a.Inst;d=0;while(true){if(!(d=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]),A.Inst);b.Inst=$append(b.Inst,new W.ptr($clone(e,A.Inst),BL.nil));d++;}f=b.Inst;g=0;while(true){if(!(g=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+h])).Inst.Op;if(i===0||i===1){m=(k=(l=b.Inst,((h<0||h>=l.$length)?$throwRuntimeError("index out of range"):l.$array[l.$offset+h])),(k.$ptr_Out||(k.$ptr_Out=new CA(function(){return this.$target.Inst.Out;},function($v){this.$target.Inst.Out=$v;},k))));p=(n=(o=b.Inst,((h<0||h>=o.$length)?$throwRuntimeError("index out of range"):o.$array[o.$offset+h])),(n.$ptr_Arg||(n.$ptr_Arg=new CA(function(){return this.$target.Inst.Arg;},function($v){this.$target.Inst.Arg=$v;},n))));s=$clone((q=b.Inst,r=p.$get(),((r<0||r>=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+r])),W);if(!((s.Inst.Op===0)||(s.Inst.Op===1))){t=m;u=p;p=t;m=u;W.copy(s,(v=b.Inst,w=p.$get(),((w<0||w>=v.$length)?$throwRuntimeError("index out of range"):v.$array[v.$offset+w])));if(!((s.Inst.Op===0)||(s.Inst.Op===1))){g++;continue;}}z=$clone((x=b.Inst,y=m.$get(),((y<0||y>=x.$length)?$throwRuntimeError("index out of range"):x.$array[x.$offset+y])),W);if((z.Inst.Op===0)||(z.Inst.Op===1)){g++;continue;}ad=(aa=(ab=b.Inst,ac=p.$get(),((ac<0||ac>=ab.$length)?$throwRuntimeError("index out of range"):ab.$array[ab.$offset+ac])),(aa.$ptr_Out||(aa.$ptr_Out=new CA(function(){return this.$target.Inst.Out;},function($v){this.$target.Inst.Out=$v;},aa))));ah=(ae=(af=b.Inst,ag=p.$get(),((ag<0||ag>=af.$length)?$throwRuntimeError("index out of range"):af.$array[af.$offset+ag])),(ae.$ptr_Arg||(ae.$ptr_Arg=new CA(function(){return this.$target.Inst.Arg;},function($v){this.$target.Inst.Arg=$v;},ae))));ai=false;if(s.Inst.Out===(h>>>0)){ai=true;}else if(s.Inst.Arg===(h>>>0)){ai=true;aj=ah;ak=ad;ad=aj;ah=ak;}if(ai){ad.$set(m.$get());}if(m.$get()===ad.$get()){p.$set(ah.$get());}}else{g++;continue;}g++;}return b;};AH.prototype.Len=function(){var $ptr,a;a=this;return a.$length;};$ptrType(AH).prototype.Len=function(){return this.$get().Len();};AH.prototype.Less=function(a,b){var $ptr,a,b,c;c=this;return((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a])<((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);};$ptrType(AH).prototype.Less=function(a,b){return this.$get().Less(a,b);};AH.prototype.Swap=function(a,b){var $ptr,a,b,c,d,e;c=this;d=((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]);e=((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]);((a<0||a>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]=d);((b<0||b>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+b]=e);};$ptrType(AH).prototype.Swap=function(a,b){return this.$get().Swap(a,b);};AH.prototype.Sort=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;$r=D.Sort(a);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AH.prototype.Sort};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};$ptrType(AH).prototype.Sort=function(){return this.$get().Sort();};AK=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=[c];d=[d];e=[e];if(a[0].Inst.$length>=1000){return AN;}f=AB(a[0].Inst.$length);d[0]=AB(a[0].Inst.$length);c[0]=$throwNilPointerError;e[0]=$throwNilPointerError;b[0]=$makeSlice(CB,a[0].Inst.$length);c[0]=(function(a,b,c,d,e){return function $b(g,h){var $ptr,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(h.contains(g)){return;}j=$clone((i=a[0].Inst,((g<0||g>=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+g])),W);k=j.Inst.Op;if(k===0||k===1){$s=1;continue;}if(k===4||k===5){$s=2;continue;}$s=3;continue;case 1:h.insert(j.Inst.Out);$r=c[0](j.Inst.Out,h);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}h.insert(j.Inst.Arg);$s=4;continue;case 2:$s=4;continue;case 3:h.insert(j.Inst.Out);case 4:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};})(a,b,c,d,e);e[0]=(function(a,b,c,d,e){return function $b(g,h){var $ptr,aa,ab,ac,ad,ae,af,ag,ah,ai,aj,ak,al,am,an,ao,ap,aq,ar,as,at,au,av,aw,ax,ay,az,ba,bb,bc,bd,be,bf,bg,bh,bi,bj,bk,bl,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;aa=$f.aa;ab=$f.ab;ac=$f.ac;ad=$f.ad;ae=$f.ae;af=$f.af;ag=$f.ag;ah=$f.ah;ai=$f.ai;aj=$f.aj;ak=$f.ak;al=$f.al;am=$f.am;an=$f.an;ao=$f.ao;ap=$f.ap;aq=$f.aq;ar=$f.ar;as=$f.as;at=$f.at;au=$f.au;av=$f.av;aw=$f.aw;ax=$f.ax;ay=$f.ay;az=$f.az;ba=$f.ba;bb=$f.bb;bc=$f.bc;bd=$f.bd;be=$f.be;bf=$f.bf;bg=$f.bg;bh=$f.bh;bi=$f.bi;bj=$f.bj;bk=$f.bk;bl=$f.bl;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;q=$f.q;r=$f.r;s=$f.s;t=$f.t;u=$f.u;v=$f.v;w=$f.w;x=$f.x;y=$f.y;z=$f.z;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:i=false;i=true;k=(j=a[0].Inst,((g<0||g>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+g]));if(d[0].contains(g)){return i;}d[0].insert(g);l=k.Inst.Op;if(l===0||l===1){$s=1;continue;}if(l===2||l===6){$s=2;continue;}if(l===3){$s=3;continue;}if(l===4||l===5){$s=4;continue;}if(l===7){$s=5;continue;}if(l===8){$s=6;continue;}if(l===9){$s=7;continue;}if(l===10){$s=8;continue;}$s=9;continue;case 1:n=e[0](k.Inst.Out,h);$s=11;case 11:if($c){$c=false;n=n.$blk();}if(n&&n.$blk!==undefined){break s;}if(!(n)){m=false;$s=10;continue s;}o=e[0](k.Inst.Arg,h);$s=12;case 12:if($c){$c=false;o=o.$blk();}if(o&&o.$blk!==undefined){break s;}m=o;case 10:i=m;q=(p=h[$Uint32.keyFor(k.Inst.Out)],p!==undefined?p.v:false);s=(r=h[$Uint32.keyFor(k.Inst.Arg)],r!==undefined?r.v:false);if(q&&s){i=false;$s=9;continue;}if(s){t=k.Inst.Arg;u=k.Inst.Out;k.Inst.Out=t;k.Inst.Arg=u;v=s;w=q;q=v;s=w;}if(q){x=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(x)]={k:x,v:true};k.Inst.Op=1;}z=AE($indexPtr(b[0].$array,b[0].$offset+k.Inst.Out,CC),$indexPtr(b[0].$array,b[0].$offset+k.Inst.Arg,CC),k.Inst.Out,k.Inst.Arg);$s=13;case 13:if($c){$c=false;z=z.$blk();}if(z&&z.$blk!==undefined){break s;}y=z;((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=y[0]);k.Next=y[1];if(k.Next.$length>0&&((aa=k.Next,(0>=aa.$length?$throwRuntimeError("index out of range"):aa.$array[aa.$offset+0]))===4294967295)){i=false;$s=9;continue;}$s=9;continue;case 2:ab=e[0](k.Inst.Out,h);$s=14;case 14:if($c){$c=false;ab=ab.$blk();}if(ab&&ab.$blk!==undefined){break s;}i=ab;ac=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(ac)]={k:ac,v:(ad=h[$Uint32.keyFor(k.Inst.Out)],ad!==undefined?ad.v:false)};((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=$appendSlice(new BK([]),(ae=k.Inst.Out,((ae<0||ae>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+ae]))));k.Next=new BL([]);ag=(af=((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]).$length/2,(af===af&&af!==1/0&&af!==-1/0)?af>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(ag>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);ag=ag-(1)>>0;}$s=9;continue;case 3:ah=e[0](k.Inst.Out,h);$s=15;case 15:if($c){$c=false;ah=ah.$blk();}if(ah&&ah.$blk!==undefined){break s;}i=ah;ai=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(ai)]={k:ai,v:(aj=h[$Uint32.keyFor(k.Inst.Out)],aj!==undefined?aj.v:false)};((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=$appendSlice(new BK([]),(ak=k.Inst.Out,((ak<0||ak>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+ak]))));k.Next=new BL([]);am=(al=((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]).$length/2,(al===al&&al!==1/0&&al!==-1/0)?al>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(am>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);am=am-(1)>>0;}$s=9;continue;case 4:an=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(an)]={k:an,v:k.Inst.Op===4};$s=9;continue;$s=9;continue;case 5:ao=e[0](k.Inst.Out,h);$s=16;case 16:if($c){$c=false;ao=ao.$blk();}if(ao&&ao.$blk!==undefined){break s;}i=ao;ap=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(ap)]={k:ap,v:false};if(k.Next.$length>0){$s=9;continue;}if(k.Inst.Rune.$length===0){((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=new BK([]));k.Next=new BL([k.Inst.Out]);$s=9;continue;}aq=$makeSlice(BK,0);if((k.Inst.Rune.$length===1)&&!(((((k.Inst.Arg<<16>>>16)&1)>>>0)===0))){$s=17;continue;}$s=18;continue;case 17:as=(ar=k.Inst.Rune,(0>=ar.$length?$throwRuntimeError("index out of range"):ar.$array[ar.$offset+0]));aq=$append(aq,as,as);at=E.SimpleFold(as);while(true){if(!(!((at===as)))){break;}aq=$append(aq,at,at);at=E.SimpleFold(at);}$r=D.Sort($subslice(new AH(aq.$array),aq.$offset,aq.$offset+aq.$length));$s=20;case 20:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=19;continue;case 18:aq=$appendSlice(aq,k.Inst.Rune);case 19:((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=aq);k.Next=new BL([]);av=(au=((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]).$length/2,(au===au&&au!==1/0&&au!==-1/0)?au>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(av>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);av=av-(1)>>0;}k.Inst.Op=7;$s=9;continue;case 6:aw=e[0](k.Inst.Out,h);$s=21;case 21:if($c){$c=false;aw=aw.$blk();}if(aw&&aw.$blk!==undefined){break s;}i=aw;ax=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(ax)]={k:ax,v:false};if(k.Next.$length>0){$s=9;continue;}ay=new BK([]);if(!(((((k.Inst.Arg<<16>>>16)&1)>>>0)===0))){$s=22;continue;}$s=23;continue;case 22:ba=(az=k.Inst.Rune,(0>=az.$length?$throwRuntimeError("index out of range"):az.$array[az.$offset+0]));ay=$append(ay,ba,ba);bb=E.SimpleFold(ba);while(true){if(!(!((bb===ba)))){break;}ay=$append(ay,bb,bb);bb=E.SimpleFold(bb);}$r=D.Sort($subslice(new AH(ay.$array),ay.$offset,ay.$offset+ay.$length));$s=25;case 25:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=24;continue;case 23:ay=$append(ay,(bc=k.Inst.Rune,(0>=bc.$length?$throwRuntimeError("index out of range"):bc.$array[bc.$offset+0])),(bd=k.Inst.Rune,(0>=bd.$length?$throwRuntimeError("index out of range"):bd.$array[bd.$offset+0])));case 24:((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=ay);k.Next=new BL([]);bf=(be=((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]).$length/2,(be===be&&be!==1/0&&be!==-1/0)?be>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(bf>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);bf=bf-(1)>>0;}k.Inst.Op=7;$s=9;continue;case 7:bg=e[0](k.Inst.Out,h);$s=26;case 26:if($c){$c=false;bg=bg.$blk();}if(bg&&bg.$blk!==undefined){break s;}i=bg;bh=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(bh)]={k:bh,v:false};if(k.Next.$length>0){$s=9;continue;}((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=$appendSlice(new BK([]),AJ));k.Next=new BL([k.Inst.Out]);$s=9;continue;case 8:bi=e[0](k.Inst.Out,h);$s=27;case 27:if($c){$c=false;bi=bi.$blk();}if(bi&&bi.$blk!==undefined){break s;}i=bi;bj=g;(h||$throwRuntimeError("assignment to entry in nil map"))[$Uint32.keyFor(bj)]={k:bj,v:false};if(k.Next.$length>0){$s=9;continue;}((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]=$appendSlice(new BK([]),AI));k.Next=new BL([]);bl=(bk=((g<0||g>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+g]).$length/2,(bk===bk&&bk!==1/0&&bk!==-1/0)?bk>>0:$throwRuntimeError("integer divide by zero"));while(true){if(!(bl>=0)){break;}k.Next=$append(k.Next,k.Inst.Out);bl=bl-(1)>>0;}case 9:return i;}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.aa=aa;$f.ab=ab;$f.ac=ac;$f.ad=ad;$f.ae=ae;$f.af=af;$f.ag=ag;$f.ah=ah;$f.ai=ai;$f.aj=aj;$f.ak=ak;$f.al=al;$f.am=am;$f.an=an;$f.ao=ao;$f.ap=ap;$f.aq=aq;$f.ar=ar;$f.as=as;$f.at=at;$f.au=au;$f.av=av;$f.aw=aw;$f.ax=ax;$f.ay=ay;$f.az=az;$f.ba=ba;$f.bb=bb;$f.bc=bc;$f.bd=bd;$f.be=be;$f.bf=bf;$f.bg=bg;$f.bh=bh;$f.bi=bi;$f.bj=bj;$f.bk=bk;$f.bl=bl;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.s=s;$f.t=t;$f.u=u;$f.v=v;$f.w=w;$f.x=x;$f.y=y;$f.z=z;$f.$s=$s;$f.$r=$r;return $f;};})(a,b,c,d,e);f.clear();f.insert((a[0].Start>>>0));h=(g=a[0].Inst.$length,((g<0||g>2147483647)?$throwRuntimeError("makemap: size out of range"):{}));case 1:if(!(!f.empty())){$s=2;continue;}i=f.next();k=$clone((j=a[0].Inst,((i<0||i>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+i])),W);d[0].clear();l=e[0](i,h);$s=5;case 5:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}if(!l){$s=3;continue;}$s=4;continue;case 3:a[0]=AN;$s=2;continue;case 4:m=k.Inst.Op;if(m===0||m===1){f.insert(k.Inst.Out);f.insert(k.Inst.Arg);}else if(m===2||m===3||m===6){f.insert(k.Inst.Out);}else if(m===4){}else if(m===5){}else if(m===7||m===8||m===9||m===10){}else{}$s=1;continue;case 2:if(!(a[0]===AN)){n=a[0].Inst;o=0;while(true){if(!(o=q.$length)?$throwRuntimeError("index out of range"):q.$array[q.$offset+p])).Inst.Rune=((p<0||p>=b[0].$length)?$throwRuntimeError("index out of range"):b[0].$array[b[0].$offset+p]);o++;}}return a[0];}return;}if($f===undefined){$f={$blk:AK};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.$s=$s;$f.$r=$r;return $f;};AO=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=BM.nil;if(a.Start===0){b=AN;return b;}if(!(((c=a.Inst,d=a.Start,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d])).Op===3))||!((((((e=a.Inst,f=a.Start,((f<0||f>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+f])).Arg<<24>>>24)&4)>>>0)===4))){b=AN;return b;}g=a.Inst;h=0;case 1:if(!(h=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+h]),A.Inst);l=(j=a.Inst,k=i.Out,((k<0||k>=j.$length)?$throwRuntimeError("index out of range"):j.$array[j.$offset+k])).Op;m=i.Op;if(m===0||m===1){if((l===4)||((n=a.Inst,o=i.Arg,((o<0||o>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+o])).Op===4)){b=AN;return b;}}else if(m===3){if(l===4){if((((i.Arg<<24>>>24)&8)>>>0)===8){h++;$s=1;continue;}b=AN;return b;}}else{if(l===4){b=AN;return b;}}h++;$s=1;continue;case 2:b=AG(a);p=AK(b);$s=3;case 3:if($c){$c=false;p=p.$blk();}if(p&&p.$blk!==undefined){break s;}b=p;if(!(b===AN)){AF(b,a);}b=b;return b;}return;}if($f===undefined){$f={$blk:AO};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};AQ.ptr.prototype.String=function(){var $ptr,a;a=this;return a.expr;};AQ.prototype.String=function(){return this.$val.String();};AR=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=AT(a,212,false);$s=1;case 1:if($c){$c=false;b=b.$blk();}if(b&&b.$blk!==undefined){break s;}return b;}return;}if($f===undefined){$f={$blk:AR};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};$pkg.Compile=AR;AQ.ptr.prototype.Longest=function(){var $ptr,a;a=this;a.longest=true;};AQ.prototype.Longest=function(){return this.$val.Longest();};AT=function(a,b,c){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;p=$f.p;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=A.Parse(a,b);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(!($interfaceIsEqual(g,$ifaceNil))){return[BQ.nil,g];}h=f.MaxCap();i=f.CapNames();f=f.Simplify();j=A.Compile(f);k=j[0];g=j[1];if(!($interfaceIsEqual(g,$ifaceNil))){return[BQ.nil,g];}l=AO(k);$s=2;case 2:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}m=new AQ.ptr(a,k,l,"",BN.nil,false,0,0,k.StartCond(),h,i,c,new H.Mutex.ptr(false),CF.nil);if(m.onepass===AN){n=k.Prefix();m.prefix=n[0];m.prefixComplete=n[1];}else{o=X(k);m.prefix=o[0];m.prefixComplete=o[1];m.prefixEnd=o[2];}if(!(m.prefix==="")){m.prefixBytes=new BN($stringToBytes(m.prefix));p=I.DecodeRuneInString(m.prefix);m.prefixRune=p[0];}return[m,$ifaceNil];}return;}if($f===undefined){$f={$blk:AT};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.$s=$s;$f.$r=$r;return $f;};AQ.ptr.prototype.get=function(){var $ptr,a,b,c,d,e,f;a=this;a.mu.Lock();b=a.machine.$length;if(b>0){e=(c=a.machine,d=b-1>>0,((d<0||d>=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]));a.machine=$subslice(a.machine,0,(b-1>>0));a.mu.Unlock();return e;}a.mu.Unlock();f=T(a.prog,a.onepass);f.re=a;return f;};AQ.prototype.get=function(){return this.$val.get();};AQ.ptr.prototype.put=function(a){var $ptr,a,b;b=this;b.mu.Lock();b.machine=$append(b.machine,a);b.mu.Unlock();};AQ.prototype.put=function(a){return this.$val.put(a);};AU=function(a){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=AR(a);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;d=b[0];e=b[1];if(!($interfaceIsEqual(e,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:f=e.Error();$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}$panic(new $String("regexp: Compile("+AW(a)+"): "+f));case 3:return d;}return;}if($f===undefined){$f={$blk:AU};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$pkg.MustCompile=AU;AW=function(a){var $ptr,a;if(F.CanBackquote(a)){return"`"+a+"`";}return F.Quote(a);};AQ.ptr.prototype.NumSubexp=function(){var $ptr,a;a=this;return a.numSubexp;};AQ.prototype.NumSubexp=function(){return this.$val.NumSubexp();};AQ.ptr.prototype.SubexpNames=function(){var $ptr,a;a=this;return a.subexpNames;};AQ.prototype.SubexpNames=function(){return this.$val.SubexpNames();};AY.ptr.prototype.step=function(a){var $ptr,a,b,c;b=this;if(a>0),1];}return I.DecodeRuneInString(b.str.substring(a));}return[-1,0];};AY.prototype.step=function(a){return this.$val.step(a);};AY.ptr.prototype.canCheckPrefix=function(){var $ptr,a;a=this;return true;};AY.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};AY.ptr.prototype.hasPrefix=function(a){var $ptr,a,b;b=this;return G.HasPrefix(b.str,a.prefix);};AY.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};AY.ptr.prototype.index=function(a,b){var $ptr,a,b,c;c=this;return G.Index(c.str.substring(b),a.prefix);};AY.prototype.index=function(a,b){return this.$val.index(a,b);};AY.ptr.prototype.context=function(a){var $ptr,a,b,c,d,e,f,g,h;b=this;c=-1;d=-1;e=c;f=d;if(a>0&&a<=b.str.length){g=I.DecodeLastRuneInString(b.str.substring(0,a));e=g[0];}if(a=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+a]));if(d<128){return[(d>>0),1];}return I.DecodeRune($subslice(b.str,a));}return[-1,0];};AZ.prototype.step=function(a){return this.$val.step(a);};AZ.ptr.prototype.canCheckPrefix=function(){var $ptr,a;a=this;return true;};AZ.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};AZ.ptr.prototype.hasPrefix=function(a){var $ptr,a,b;b=this;return C.HasPrefix(b.str,a.prefixBytes);};AZ.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};AZ.ptr.prototype.index=function(a,b){var $ptr,a,b,c;c=this;return C.Index($subslice(c.str,b),a.prefixBytes);};AZ.prototype.index=function(a,b){return this.$val.index(a,b);};AZ.ptr.prototype.context=function(a){var $ptr,a,b,c,d,e,f,g,h;b=this;c=-1;d=-1;e=c;f=d;if(a>0&&a<=b.str.$length){g=I.DecodeLastRune($subslice(b.str,0,a));e=g[0];}if(a>0;return[e,f];}return;}if($f===undefined){$f={$blk:BA.ptr.prototype.step};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};BA.prototype.step=function(a){return this.$val.step(a);};BA.ptr.prototype.canCheckPrefix=function(){var $ptr,a;a=this;return false;};BA.prototype.canCheckPrefix=function(){return this.$val.canCheckPrefix();};BA.ptr.prototype.hasPrefix=function(a){var $ptr,a,b;b=this;return false;};BA.prototype.hasPrefix=function(a){return this.$val.hasPrefix(a);};BA.ptr.prototype.index=function(a,b){var $ptr,a,b,c;c=this;return-1;};BA.prototype.index=function(a,b){return this.$val.index(a,b);};BA.ptr.prototype.context=function(a){var $ptr,a,b;b=this;return 0;};BA.prototype.context=function(a){return this.$val.context(a);};AQ.ptr.prototype.LiteralPrefix=function(){var $ptr,a,b,c,d,e;a="";b=false;c=this;d=c.prefix;e=c.prefixComplete;a=d;b=e;return[a,b];};AQ.prototype.LiteralPrefix=function(){return this.$val.LiteralPrefix();};AQ.ptr.prototype.MatchReader=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute(a,BN.nil,"",0,0);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!(c===BJ.nil);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.MatchReader};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.MatchReader=function(a){return this.$val.MatchReader(a);};AQ.ptr.prototype.MatchString=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,BN.nil,a,0,0);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!(c===BJ.nil);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.MatchString};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.MatchString=function(a){return this.$val.MatchString(a);};AQ.ptr.prototype.Match=function(a){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,a,"",0,0);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}return!(c===BJ.nil);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.Match};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.Match=function(a){return this.$val.Match(a);};AQ.ptr.prototype.ReplaceAllString=function(a,b){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=[c];c[0]=this;d=2;if(G.Index(b[0],"$")>=0){d=2*((c[0].numSubexp+1>>0))>>0;}e=c[0].replaceAll(BN.nil,a[0],d,(function(a,b,c){return function(e,f){var $ptr,e,f;return c[0].expand(e,b[0],BN.nil,a[0],f);};})(a,b,c));$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}f=e;return $bytesToString(f);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAllString};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAllString=function(a,b){return this.$val.ReplaceAllString(a,b);};AQ.ptr.prototype.ReplaceAllLiteralString=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=[b];c=this;d=c.replaceAll(BN.nil,a,2,(function(b){return function(d,e){var $ptr,d,e;return $appendSlice(d,b[0]);};})(b));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return $bytesToString(d);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAllLiteralString};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAllLiteralString=function(a,b){return this.$val.ReplaceAllLiteralString(a,b);};AQ.ptr.prototype.ReplaceAllStringFunc=function(a,b){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=this;d=c.replaceAll(BN.nil,a[0],2,(function(a,b){return function $b(d,e){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=d;g=b[0](a[0].substring((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;return $appendSlice(f,h);}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;return $bytesToString(e);}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAllStringFunc};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAllStringFunc=function(a,b){return this.$val.ReplaceAllStringFunc(a,b);};AQ.ptr.prototype.replaceAll=function(a,b,c,d){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;o=$f.o;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:e=this;f=0;g=0;h=BN.nil;i=0;if(!(a===BN.nil)){i=a.$length;}else{i=b.length;}case 1:if(!(g<=i)){$s=2;continue;}j=e.doExecute($ifaceNil,a,b,g,c);$s=3;case 3:if($c){$c=false;j=j.$blk();}if(j&&j.$blk!==undefined){break s;}k=j;if(k.$length===0){$s=2;continue;}if(!(a===BN.nil)){h=$appendSlice(h,$subslice(a,f,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])));}else{h=$appendSlice(h,b.substring(f,(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])));}if((1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])>f||((0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0])===0)){$s=4;continue;}$s=5;continue;case 4:l=d(h,k);$s=6;case 6:if($c){$c=false;l=l.$blk();}if(l&&l.$blk!==undefined){break s;}h=l;case 5:f=(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1]);m=0;if(!(a===BN.nil)){n=I.DecodeRune($subslice(a,g));m=n[1];}else{o=I.DecodeRuneInString(b.substring(g));m=o[1];}if((g+m>>0)>(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])){g=g+(m)>>0;}else if((g+1>>0)>(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])){g=g+(1)>>0;}else{g=(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1]);}$s=1;continue;case 2:if(!(a===BN.nil)){h=$appendSlice(h,$subslice(a,f));}else{h=$appendSlice(h,b.substring(f));}return h;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.replaceAll};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.replaceAll=function(a,b,c,d){return this.$val.replaceAll(a,b,c,d);};AQ.ptr.prototype.ReplaceAll=function(a,b){var $ptr,a,b,c,d,e,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=[c];d=[d];d[0]=this;e=2;if(C.IndexByte(b[0],36)>=0){e=2*((d[0].numSubexp+1>>0))>>0;}c[0]="";f=d[0].replaceAll(a[0],"",e,(function(a,b,c,d){return function(f,g){var $ptr,f,g;if(!((c[0].length===b[0].$length))){c[0]=$bytesToString(b[0]);}return d[0].expand(f,c[0],a[0],"",g);};})(a,b,c,d));$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;return g;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAll};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAll=function(a,b){return this.$val.ReplaceAll(a,b);};AQ.ptr.prototype.ReplaceAllLiteral=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=[b];c=this;d=c.replaceAll(a,"",2,(function(b){return function(d,e){var $ptr,d,e;return $appendSlice(d,b[0]);};})(b));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAllLiteral};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAllLiteral=function(a,b){return this.$val.ReplaceAllLiteral(a,b);};AQ.ptr.prototype.ReplaceAllFunc=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];c=this;d=c.replaceAll(a[0],"",2,(function(a,b){return function $b(d,e){var $ptr,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=d;g=b[0]($subslice(a[0],(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));$s=1;case 1:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}h=g;return $appendSlice(f,h);}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.ReplaceAllFunc};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.ReplaceAllFunc=function(a,b){return this.$val.ReplaceAllFunc(a,b);};AQ.ptr.prototype.pad=function(a){var $ptr,a,b,c;b=this;if(a===BJ.nil){return BJ.nil;}c=((1+b.numSubexp>>0))*2>>0;while(true){if(!(a.$length=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+1])===j){if((0>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+0])===l){o=false;}p=0;if(b===BN.nil){q=I.DecodeRuneInString(a.substring(j,f));p=q[1];}else{r=I.DecodeRune($subslice(b,j,f));p=r[1];}if(p>0){j=j+(p)>>0;}else{j=f+1>>0;}}else{j=(1>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+1]);}l=(1>=n.$length?$throwRuntimeError("index out of range"):n.$array[n.$offset+1]);if(o){$s=4;continue;}$s=5;continue;case 4:$r=d(e.pad(n));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}k=k+(1)>>0;case 5:$s=1;continue;case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.allMatches};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.o=o;$f.p=p;$f.q=q;$f.r=r;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.allMatches=function(a,b,c,d){return this.$val.allMatches(a,b,c,d);};AQ.ptr.prototype.Find=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,a,"",0,2);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(d===BJ.nil){return BN.nil;}return $subslice(a,(0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),(1>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+1]));}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.Find};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.Find=function(a){return this.$val.Find(a);};AQ.ptr.prototype.FindIndex=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=BJ.nil;c=this;d=c.doExecute($ifaceNil,a,"",0,2);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(e===BJ.nil){b=BJ.nil;return b;}b=$subslice(e,0,2);return b;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindIndex=function(a){return this.$val.FindIndex(a);};AQ.ptr.prototype.FindString=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,BN.nil,a,0,2);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(d===BJ.nil){return"";}return a.substring((0>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+0]),(1>=d.$length?$throwRuntimeError("index out of range"):d.$array[d.$offset+1]));}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindString};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindString=function(a){return this.$val.FindString(a);};AQ.ptr.prototype.FindStringIndex=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=BJ.nil;c=this;d=c.doExecute($ifaceNil,BN.nil,a,0,2);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(e===BJ.nil){b=BJ.nil;return b;}b=$subslice(e,0,2);return b;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindStringIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindStringIndex=function(a){return this.$val.FindStringIndex(a);};AQ.ptr.prototype.FindReaderIndex=function(a){var $ptr,a,b,c,d,e,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=BJ.nil;c=this;d=c.doExecute(a,BN.nil,"",0,2);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;if(e===BJ.nil){b=BJ.nil;return b;}b=$subslice(e,0,2);return b;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindReaderIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindReaderIndex=function(a){return this.$val.FindReaderIndex(a);};AQ.ptr.prototype.FindSubmatch=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,a,"",0,b.prog.NumCap);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(d===BJ.nil){return CG.nil;}e=$makeSlice(CG,(1+b.numSubexp>>0));f=e;g=0;while(true){if(!(g>0)>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]))>=0){((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]=$subslice(a,(j=2*h>>0,((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])),(k=(2*h>>0)+1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))));}g++;}return e;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindSubmatch};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindSubmatch=function(a){return this.$val.FindSubmatch(a);};AQ.ptr.prototype.Expand=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;return e.expand(a,$bytesToString(b),c,"",d);};AQ.prototype.Expand=function(a,b,c,d){return this.$val.Expand(a,b,c,d);};AQ.ptr.prototype.ExpandString=function(a,b,c,d){var $ptr,a,b,c,d,e;e=this;return e.expand(a,b,BN.nil,c,d);};AQ.prototype.ExpandString=function(a,b,c,d){return this.$val.ExpandString(a,b,c,d);};AQ.ptr.prototype.expand=function(a,b,c,d,e){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z;f=this;while(true){if(!(b.length>0)){break;}g=G.Index(b,"$");if(g<0){break;}a=$appendSlice(a,b.substring(0,g));b=b.substring(g);if(b.length>1&&(b.charCodeAt(1)===36)){a=$append(a,36);b=b.substring(2);continue;}h=BH(b);i=h[0];j=h[1];k=h[2];l=h[3];if(!l){a=$append(a,36);b=b.substring(1);continue;}b=k;if(j>=0){if(((2*j>>0)+1>>0)>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))>=0){if(!(c===BN.nil)){a=$appendSlice(a,$subslice(c,(n=2*j>>0,((n<0||n>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+n])),(o=(2*j>>0)+1>>0,((o<0||o>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+o]))));}else{a=$appendSlice(a,d.substring((p=2*j>>0,((p<0||p>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+p])),(q=(2*j>>0)+1>>0,((q<0||q>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+q]))));}}}else{r=f.subexpNames;s=0;while(true){if(!(s=r.$length)?$throwRuntimeError("index out of range"):r.$array[r.$offset+s]);if(i===u&&((2*t>>0)+1>>0)>0,((v<0||v>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+v]))>=0){if(!(c===BN.nil)){a=$appendSlice(a,$subslice(c,(w=2*t>>0,((w<0||w>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+w])),(x=(2*t>>0)+1>>0,((x<0||x>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+x]))));}else{a=$appendSlice(a,d.substring((y=2*t>>0,((y<0||y>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+y])),(z=(2*t>>0)+1>>0,((z<0||z>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+z]))));}break;}s++;}}}a=$appendSlice(a,b);return a;};AQ.prototype.expand=function(a,b,c,d,e){return this.$val.expand(a,b,c,d,e);};BH=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k;b="";c=0;d="";e=false;if(a.length<2||!((a.charCodeAt(0)===36))){return[b,c,d,e];}f=false;if(a.charCodeAt(1)===123){f=true;a=a.substring(2);}else{a=a.substring(1);}g=0;while(true){if(!(g>0;}if(g===0){return[b,c,d,e];}b=a.substring(0,g);if(f){if(g>=a.length||!((a.charCodeAt(g)===125))){return[b,c,d,e];}g=g+(1)>>0;}c=0;k=0;while(true){if(!(k=100000000){c=-1;break;}c=((c*10>>0)+(b.charCodeAt(k)>>0)>>0)-48>>0;k=k+(1)>>0;}if((b.charCodeAt(0)===48)&&b.length>1){c=-1;}d=a.substring(g);e=true;return[b,c,d,e];};AQ.ptr.prototype.FindSubmatchIndex=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,a,"",0,b.prog.NumCap);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=b.pad(c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindSubmatchIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindSubmatchIndex=function(a){return this.$val.FindSubmatchIndex(a);};AQ.ptr.prototype.FindStringSubmatch=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,BN.nil,a,0,b.prog.NumCap);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(d===BJ.nil){return CD.nil;}e=$makeSlice(CD,(1+b.numSubexp>>0));f=e;g=0;while(true){if(!(g>0)>0,((i<0||i>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+i]))>=0){((h<0||h>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+h]=a.substring((j=2*h>>0,((j<0||j>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+j])),(k=(2*h>>0)+1>>0,((k<0||k>=d.$length)?$throwRuntimeError("index out of range"):d.$array[d.$offset+k]))));}g++;}return e;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindStringSubmatch};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindStringSubmatch=function(a){return this.$val.FindStringSubmatch(a);};AQ.ptr.prototype.FindStringSubmatchIndex=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute($ifaceNil,BN.nil,a,0,b.prog.NumCap);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=b.pad(c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindStringSubmatchIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindStringSubmatchIndex=function(a){return this.$val.FindStringSubmatchIndex(a);};AQ.ptr.prototype.FindReaderSubmatchIndex=function(a){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=b.doExecute(a,BN.nil,"",0,b.prog.NumCap);$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=b.pad(c);$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}return d;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindReaderSubmatchIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindReaderSubmatchIndex=function(a){return this.$val.FindReaderSubmatchIndex(a);};AQ.ptr.prototype.FindAll=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];c=[c];d=this;if(b<0){b=a[0].$length+1>>0;}c[0]=$makeSlice(CG,0,10);$r=d.allMatches("",a[0],b,(function(a,c){return function(e){var $ptr,e;c[0]=$append(c[0],$subslice(a[0],(0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));};})(a,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CG.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAll};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAll=function(a,b){return this.$val.FindAll(a,b);};AQ.ptr.prototype.FindAllIndex=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;if(b<0){b=a.$length+1>>0;}c[0]=$makeSlice(CH,0,10);$r=d.allMatches("",a,b,(function(c){return function(e){var $ptr,e;c[0]=$append(c[0],$subslice(e,0,2));};})(c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CH.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllIndex=function(a,b){return this.$val.FindAllIndex(a,b);};AQ.ptr.prototype.FindAllString=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];c=[c];d=this;if(b<0){b=a[0].length+1>>0;}c[0]=$makeSlice(CD,0,10);$r=d.allMatches(a[0],BN.nil,b,(function(a,c){return function(e){var $ptr,e;c[0]=$append(c[0],a[0].substring((0>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+0]),(1>=e.$length?$throwRuntimeError("index out of range"):e.$array[e.$offset+1])));};})(a,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CD.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllString};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllString=function(a,b){return this.$val.FindAllString(a,b);};AQ.ptr.prototype.FindAllStringIndex=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;if(b<0){b=a.length+1>>0;}c[0]=$makeSlice(CH,0,10);$r=d.allMatches(a,BN.nil,b,(function(c){return function(e){var $ptr,e;c[0]=$append(c[0],$subslice(e,0,2));};})(c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CH.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllStringIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllStringIndex=function(a,b){return this.$val.FindAllStringIndex(a,b);};AQ.ptr.prototype.FindAllSubmatch=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];c=[c];d=this;if(b<0){b=a[0].$length+1>>0;}c[0]=$makeSlice(CI,0,10);$r=d.allMatches("",a[0],b,(function(a,c){return function(e){var $ptr,e,f,g,h,i,j,k,l,m;g=$makeSlice(CG,(f=e.$length/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")));h=g;i=0;while(true){if(!(i>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))>=0){((j<0||j>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j]=$subslice(a[0],(l=2*j>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])),(m=(2*j>>0)+1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))));}i++;}c[0]=$append(c[0],g);};})(a,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CI.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllSubmatch};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllSubmatch=function(a,b){return this.$val.FindAllSubmatch(a,b);};AQ.ptr.prototype.FindAllSubmatchIndex=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;if(b<0){b=a.$length+1>>0;}c[0]=$makeSlice(CH,0,10);$r=d.allMatches("",a,b,(function(c){return function(e){var $ptr,e;c[0]=$append(c[0],e);};})(c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CH.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllSubmatchIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllSubmatchIndex=function(a,b){return this.$val.FindAllSubmatchIndex(a,b);};AQ.ptr.prototype.FindAllStringSubmatch=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];c=[c];d=this;if(b<0){b=a[0].length+1>>0;}c[0]=$makeSlice(CJ,0,10);$r=d.allMatches(a[0],BN.nil,b,(function(a,c){return function(e){var $ptr,e,f,g,h,i,j,k,l,m;g=$makeSlice(CD,(f=e.$length/2,(f===f&&f!==1/0&&f!==-1/0)?f>>0:$throwRuntimeError("integer divide by zero")));h=g;i=0;while(true){if(!(i>0,((k<0||k>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+k]))>=0){((j<0||j>=g.$length)?$throwRuntimeError("index out of range"):g.$array[g.$offset+j]=a[0].substring((l=2*j>>0,((l<0||l>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+l])),(m=(2*j>>0)+1>>0,((m<0||m>=e.$length)?$throwRuntimeError("index out of range"):e.$array[e.$offset+m]))));}i++;}c[0]=$append(c[0],g);};})(a,c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CJ.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllStringSubmatch};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllStringSubmatch=function(a,b){return this.$val.FindAllStringSubmatch(a,b);};AQ.ptr.prototype.FindAllStringSubmatchIndex=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=[c];d=this;if(b<0){b=a.length+1>>0;}c[0]=$makeSlice(CH,0,10);$r=d.allMatches(a,BN.nil,b,(function(c){return function(e){var $ptr,e;c[0]=$append(c[0],e);};})(c));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(c[0].$length===0){return CH.nil;}return c[0];}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.FindAllStringSubmatchIndex};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.FindAllStringSubmatchIndex=function(a,b){return this.$val.FindAllStringSubmatchIndex(a,b);};AQ.ptr.prototype.Split=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;if(b===0){return CD.nil;}if(c.expr.length>0&&(a.length===0)){return new CD([""]);}d=c.FindAllStringIndex(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;f=$makeSlice(CD,0,e.$length);g=0;h=0;i=e;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);if(b>0&&f.$length>=(b-1>>0)){break;}h=(0>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+0]);if(!(((1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1])===0))){f=$append(f,a.substring(g,h));}g=(1>=k.$length?$throwRuntimeError("index out of range"):k.$array[k.$offset+1]);j++;}if(!((h===a.length))){f=$append(f,a.substring(g));}return f;}return;}if($f===undefined){$f={$blk:AQ.ptr.prototype.Split};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.$s=$s;$f.$r=$r;return $f;};AQ.prototype.Split=function(a,b){return this.$val.Split(a,b);};BI.methods=[{prop:"reset",name:"reset",pkg:"regexp",typ:$funcType([$Int,$Int],[],false)},{prop:"shouldVisit",name:"shouldVisit",pkg:"regexp",typ:$funcType([$Uint32,$Int],[$Bool],false)},{prop:"push",name:"push",pkg:"regexp",typ:$funcType([$Uint32,$Int,$Int],[],false)}];CE.methods=[{prop:"tryBacktrack",name:"tryBacktrack",pkg:"regexp",typ:$funcType([BI,AX,$Uint32,$Int],[$Bool],false)},{prop:"backtrack",name:"backtrack",pkg:"regexp",typ:$funcType([AX,$Int,$Int,$Int],[$Bool],false)},{prop:"newInputBytes",name:"newInputBytes",pkg:"regexp",typ:$funcType([BN],[AX],false)},{prop:"newInputString",name:"newInputString",pkg:"regexp",typ:$funcType([$String],[AX],false)},{prop:"newInputReader",name:"newInputReader",pkg:"regexp",typ:$funcType([B.RuneReader],[AX],false)},{prop:"init",name:"init",pkg:"regexp",typ:$funcType([$Int],[],false)},{prop:"alloc",name:"alloc",pkg:"regexp",typ:$funcType([BU],[BS],false)},{prop:"free",name:"free",pkg:"regexp",typ:$funcType([BS],[],false)},{prop:"match",name:"match",pkg:"regexp",typ:$funcType([AX,$Int],[$Bool],false)},{prop:"clear",name:"clear",pkg:"regexp",typ:$funcType([CK],[],false)},{prop:"step",name:"step",pkg:"regexp",typ:$funcType([CK,CK,$Int,$Int,$Int32,A.EmptyOp],[],false)},{prop:"add",name:"add",pkg:"regexp",typ:$funcType([CK,$Uint32,$Int,BJ,A.EmptyOp,BS],[BS],false)},{prop:"onepass",name:"onepass",pkg:"regexp",typ:$funcType([AX,$Int],[$Bool],false)}];BY.methods=[{prop:"empty",name:"empty",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"next",name:"next",pkg:"regexp",typ:$funcType([],[$Uint32],false)},{prop:"clear",name:"clear",pkg:"regexp",typ:$funcType([],[],false)},{prop:"reset",name:"reset",pkg:"regexp",typ:$funcType([],[],false)},{prop:"contains",name:"contains",pkg:"regexp",typ:$funcType([$Uint32],[$Bool],false)},{prop:"insert",name:"insert",pkg:"regexp",typ:$funcType([$Uint32],[],false)},{prop:"insertNew",name:"insertNew",pkg:"regexp",typ:$funcType([$Uint32],[],false)}];AH.methods=[{prop:"Len",name:"Len",pkg:"",typ:$funcType([],[$Int],false)},{prop:"Less",name:"Less",pkg:"",typ:$funcType([$Int,$Int],[$Bool],false)},{prop:"Swap",name:"Swap",pkg:"",typ:$funcType([$Int,$Int],[],false)},{prop:"Sort",name:"Sort",pkg:"",typ:$funcType([],[],false)}];BQ.methods=[{prop:"doExecute",name:"doExecute",pkg:"regexp",typ:$funcType([B.RuneReader,BN,$String,$Int,$Int],[BJ],false)},{prop:"String",name:"String",pkg:"",typ:$funcType([],[$String],false)},{prop:"Longest",name:"Longest",pkg:"",typ:$funcType([],[],false)},{prop:"get",name:"get",pkg:"regexp",typ:$funcType([],[CE],false)},{prop:"put",name:"put",pkg:"regexp",typ:$funcType([CE],[],false)},{prop:"NumSubexp",name:"NumSubexp",pkg:"",typ:$funcType([],[$Int],false)},{prop:"SubexpNames",name:"SubexpNames",pkg:"",typ:$funcType([],[CD],false)},{prop:"LiteralPrefix",name:"LiteralPrefix",pkg:"",typ:$funcType([],[$String,$Bool],false)},{prop:"MatchReader",name:"MatchReader",pkg:"",typ:$funcType([B.RuneReader],[$Bool],false)},{prop:"MatchString",name:"MatchString",pkg:"",typ:$funcType([$String],[$Bool],false)},{prop:"Match",name:"Match",pkg:"",typ:$funcType([BN],[$Bool],false)},{prop:"ReplaceAllString",name:"ReplaceAllString",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"ReplaceAllLiteralString",name:"ReplaceAllLiteralString",pkg:"",typ:$funcType([$String,$String],[$String],false)},{prop:"ReplaceAllStringFunc",name:"ReplaceAllStringFunc",pkg:"",typ:$funcType([$String,CL],[$String],false)},{prop:"replaceAll",name:"replaceAll",pkg:"regexp",typ:$funcType([BN,$String,$Int,CM],[BN],false)},{prop:"ReplaceAll",name:"ReplaceAll",pkg:"",typ:$funcType([BN,BN],[BN],false)},{prop:"ReplaceAllLiteral",name:"ReplaceAllLiteral",pkg:"",typ:$funcType([BN,BN],[BN],false)},{prop:"ReplaceAllFunc",name:"ReplaceAllFunc",pkg:"",typ:$funcType([BN,CN],[BN],false)},{prop:"pad",name:"pad",pkg:"regexp",typ:$funcType([BJ],[BJ],false)},{prop:"allMatches",name:"allMatches",pkg:"regexp",typ:$funcType([$String,BN,$Int,CO],[],false)},{prop:"Find",name:"Find",pkg:"",typ:$funcType([BN],[BN],false)},{prop:"FindIndex",name:"FindIndex",pkg:"",typ:$funcType([BN],[BJ],false)},{prop:"FindString",name:"FindString",pkg:"",typ:$funcType([$String],[$String],false)},{prop:"FindStringIndex",name:"FindStringIndex",pkg:"",typ:$funcType([$String],[BJ],false)},{prop:"FindReaderIndex",name:"FindReaderIndex",pkg:"",typ:$funcType([B.RuneReader],[BJ],false)},{prop:"FindSubmatch",name:"FindSubmatch",pkg:"",typ:$funcType([BN],[CG],false)},{prop:"Expand",name:"Expand",pkg:"",typ:$funcType([BN,BN,BN,BJ],[BN],false)},{prop:"ExpandString",name:"ExpandString",pkg:"",typ:$funcType([BN,$String,$String,BJ],[BN],false)},{prop:"expand",name:"expand",pkg:"regexp",typ:$funcType([BN,$String,BN,$String,BJ],[BN],false)},{prop:"FindSubmatchIndex",name:"FindSubmatchIndex",pkg:"",typ:$funcType([BN],[BJ],false)},{prop:"FindStringSubmatch",name:"FindStringSubmatch",pkg:"",typ:$funcType([$String],[CD],false)},{prop:"FindStringSubmatchIndex",name:"FindStringSubmatchIndex",pkg:"",typ:$funcType([$String],[BJ],false)},{prop:"FindReaderSubmatchIndex",name:"FindReaderSubmatchIndex",pkg:"",typ:$funcType([B.RuneReader],[BJ],false)},{prop:"FindAll",name:"FindAll",pkg:"",typ:$funcType([BN,$Int],[CG],false)},{prop:"FindAllIndex",name:"FindAllIndex",pkg:"",typ:$funcType([BN,$Int],[CH],false)},{prop:"FindAllString",name:"FindAllString",pkg:"",typ:$funcType([$String,$Int],[CD],false)},{prop:"FindAllStringIndex",name:"FindAllStringIndex",pkg:"",typ:$funcType([$String,$Int],[CH],false)},{prop:"FindAllSubmatch",name:"FindAllSubmatch",pkg:"",typ:$funcType([BN,$Int],[CI],false)},{prop:"FindAllSubmatchIndex",name:"FindAllSubmatchIndex",pkg:"",typ:$funcType([BN,$Int],[CH],false)},{prop:"FindAllStringSubmatch",name:"FindAllStringSubmatch",pkg:"",typ:$funcType([$String,$Int],[CJ],false)},{prop:"FindAllStringSubmatchIndex",name:"FindAllStringSubmatchIndex",pkg:"",typ:$funcType([$String,$Int],[CH],false)},{prop:"Split",name:"Split",pkg:"",typ:$funcType([$String,$Int],[CD],false)}];CP.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BQ],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BQ,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[A.EmptyOp],false)}];CQ.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BQ],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BQ,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[A.EmptyOp],false)}];CR.methods=[{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)},{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BQ],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BQ,$Int],[$Int],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[A.EmptyOp],false)}];J.init([{prop:"pc",name:"pc",pkg:"regexp",typ:$Uint32,tag:""},{prop:"arg",name:"arg",pkg:"regexp",typ:$Int,tag:""},{prop:"pos",name:"pos",pkg:"regexp",typ:$Int,tag:""}]);K.init([{prop:"prog",name:"prog",pkg:"regexp",typ:BO,tag:""},{prop:"end",name:"end",pkg:"regexp",typ:$Int,tag:""},{prop:"cap",name:"cap",pkg:"regexp",typ:BJ,tag:""},{prop:"input",name:"input",pkg:"regexp",typ:AX,tag:""},{prop:"jobs",name:"jobs",pkg:"regexp",typ:BP,tag:""},{prop:"visited",name:"visited",pkg:"regexp",typ:BL,tag:""}]);P.init([{prop:"sparse",name:"sparse",pkg:"regexp",typ:BL,tag:""},{prop:"dense",name:"dense",pkg:"regexp",typ:BR,tag:""}]);Q.init([{prop:"pc",name:"pc",pkg:"regexp",typ:$Uint32,tag:""},{prop:"t",name:"t",pkg:"regexp",typ:BS,tag:""}]);R.init([{prop:"inst",name:"inst",pkg:"regexp",typ:BU,tag:""},{prop:"cap",name:"cap",pkg:"regexp",typ:BJ,tag:""}]);S.init([{prop:"re",name:"re",pkg:"regexp",typ:BQ,tag:""},{prop:"p",name:"p",pkg:"regexp",typ:BO,tag:""},{prop:"op",name:"op",pkg:"regexp",typ:BM,tag:""},{prop:"maxBitStateLen",name:"maxBitStateLen",pkg:"regexp",typ:$Int,tag:""},{prop:"b",name:"b",pkg:"regexp",typ:BI,tag:""},{prop:"q0",name:"q0",pkg:"regexp",typ:P,tag:""},{prop:"q1",name:"q1",pkg:"regexp",typ:P,tag:""},{prop:"pool",name:"pool",pkg:"regexp",typ:BT,tag:""},{prop:"matched",name:"matched",pkg:"regexp",typ:$Bool,tag:""},{prop:"matchcap",name:"matchcap",pkg:"regexp",typ:BJ,tag:""},{prop:"inputBytes",name:"inputBytes",pkg:"regexp",typ:AZ,tag:""},{prop:"inputString",name:"inputString",pkg:"regexp",typ:AY,tag:""},{prop:"inputReader",name:"inputReader",pkg:"regexp",typ:BA,tag:""}]);V.init([{prop:"Inst",name:"Inst",pkg:"",typ:BZ,tag:""},{prop:"Start",name:"Start",pkg:"",typ:$Int,tag:""},{prop:"NumCap",name:"NumCap",pkg:"",typ:$Int,tag:""}]);W.init([{prop:"Inst",name:"",pkg:"",typ:A.Inst,tag:""},{prop:"Next",name:"Next",pkg:"",typ:BL,tag:""}]);AA.init([{prop:"sparse",name:"sparse",pkg:"regexp",typ:BL,tag:""},{prop:"dense",name:"dense",pkg:"regexp",typ:BL,tag:""},{prop:"size",name:"size",pkg:"regexp",typ:$Uint32,tag:""},{prop:"nextIndex",name:"nextIndex",pkg:"regexp",typ:$Uint32,tag:""}]);AH.init($Int32);AQ.init([{prop:"expr",name:"expr",pkg:"regexp",typ:$String,tag:""},{prop:"prog",name:"prog",pkg:"regexp",typ:BO,tag:""},{prop:"onepass",name:"onepass",pkg:"regexp",typ:BM,tag:""},{prop:"prefix",name:"prefix",pkg:"regexp",typ:$String,tag:""},{prop:"prefixBytes",name:"prefixBytes",pkg:"regexp",typ:BN,tag:""},{prop:"prefixComplete",name:"prefixComplete",pkg:"regexp",typ:$Bool,tag:""},{prop:"prefixRune",name:"prefixRune",pkg:"regexp",typ:$Int32,tag:""},{prop:"prefixEnd",name:"prefixEnd",pkg:"regexp",typ:$Uint32,tag:""},{prop:"cond",name:"cond",pkg:"regexp",typ:A.EmptyOp,tag:""},{prop:"numSubexp",name:"numSubexp",pkg:"regexp",typ:$Int,tag:""},{prop:"subexpNames",name:"subexpNames",pkg:"regexp",typ:CD,tag:""},{prop:"longest",name:"longest",pkg:"regexp",typ:$Bool,tag:""},{prop:"mu",name:"mu",pkg:"regexp",typ:H.Mutex,tag:""},{prop:"machine",name:"machine",pkg:"regexp",typ:CF,tag:""}]);AX.init([{prop:"canCheckPrefix",name:"canCheckPrefix",pkg:"regexp",typ:$funcType([],[$Bool],false)},{prop:"context",name:"context",pkg:"regexp",typ:$funcType([$Int],[A.EmptyOp],false)},{prop:"hasPrefix",name:"hasPrefix",pkg:"regexp",typ:$funcType([BQ],[$Bool],false)},{prop:"index",name:"index",pkg:"regexp",typ:$funcType([BQ,$Int],[$Int],false)},{prop:"step",name:"step",pkg:"regexp",typ:$funcType([$Int],[$Int32,$Int],false)}]);AY.init([{prop:"str",name:"str",pkg:"regexp",typ:$String,tag:""}]);AZ.init([{prop:"str",name:"str",pkg:"regexp",typ:BN,tag:""}]);BA.init([{prop:"r",name:"r",pkg:"regexp",typ:B.RuneReader,tag:""},{prop:"atEOT",name:"atEOT",pkg:"regexp",typ:$Bool,tag:""},{prop:"pos",name:"pos",pkg:"regexp",typ:$Int,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=H.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=G.$init();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=I.$init();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}L=BI.nil;U=$makeSlice(BJ,0);AC=new BK([]);AD=new BL([4294967295]);AI=new BK([0,9,11,1114111]);AJ=new BK([0,1114111]);AN=BM.nil;}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["github.com/go-humble/router"]=(function(){var $pkg={},$init,D,E,F,A,B,C,J,K,L,N,V,W,X,Y,Z,AA,AB,AC,AD,AE,AF,G,H,I,M,O,P,Q,R,S,T,U;D=$packages["github.com/go-humble/detect"];E=$packages["github.com/gopherjs/gopherjs/js"];F=$packages["honnef.co/go/js/dom"];A=$packages["log"];B=$packages["regexp"];C=$packages["strings"];J=$pkg.Router=$newType(0,$kindStruct,"router.Router","Router","github.com/go-humble/router",function(routes_,ShouldInterceptLinks_,ForceHashURL_,listener_){this.$val=this;if(arguments.length===0){this.routes=W.nil;this.ShouldInterceptLinks=false;this.ForceHashURL=false;this.listener=$throwNilPointerError;return;}this.routes=routes_;this.ShouldInterceptLinks=ShouldInterceptLinks_;this.ForceHashURL=ForceHashURL_;this.listener=listener_;});K=$pkg.Context=$newType(0,$kindStruct,"router.Context","Context","github.com/go-humble/router",function(Params_,Path_,InitialLoad_){this.$val=this;if(arguments.length===0){this.Params=false;this.Path="";this.InitialLoad=false;return;}this.Params=Params_;this.Path=Path_;this.InitialLoad=InitialLoad_;});L=$pkg.Handler=$newType(4,$kindFunc,"router.Handler","Handler","github.com/go-humble/router",null);N=$pkg.route=$newType(0,$kindStruct,"router.route","route","github.com/go-humble/router",function(regex_,paramNames_,handler_){this.$val=this;if(arguments.length===0){this.regex=X.nil;this.paramNames=Y.nil;this.handler=$throwNilPointerError;return;}this.regex=regex_;this.paramNames=paramNames_;this.handler=handler_;});V=$ptrType(N);W=$sliceType(V);X=$ptrType(B.Regexp);Y=$sliceType($String);Z=$sliceType($emptyInterface);AA=$funcType([],[],false);AB=$ptrType(J);AC=$ptrType(E.Object);AD=$funcType([AC],[],false);AE=$mapType($String,$String);AF=$ptrType(K);I=function(){var $ptr,a,b,c,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:if(D.IsBrowser()){$s=1;continue;}$s=2;continue;case 1:a=false;c=F.GetWindow().Document();$s=3;case 3:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=$assertType(c,F.HTMLDocument,true);H=b[0];a=b[1];if(!a){$panic(new $String("Could not convert document to dom.HTMLDocument"));}G=(!($global.onpopstate===undefined))&&(!($global.history===undefined))&&(!($global.history.pushState===undefined));case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:I};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.$s=$s;$f.$r=$r;return $f;};M=function(){var $ptr;return new J.ptr(new W([]),false,false,$throwNilPointerError);};$pkg.New=M;J.ptr.prototype.HandleFunc=function(a,b){var $ptr,a,b,c,d,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;d=O(a,b);$s=1;case 1:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}c.routes=$append(c.routes,d);$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.HandleFunc};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.HandleFunc=function(a,b){return this.$val.HandleFunc(a,b);};O=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=new N.ptr(X.nil,Y.nil,b);d=C.Split(a,"/");d=P(d);e="^";f=d;g=0;while(true){if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);if((h.charCodeAt(0)===123)&&(h.charCodeAt((h.length-1>>0))===125)){e=e+("/");e=e+("([\\w+-]*)");c.paramNames=$append(c.paramNames,h.substring(1,((h.length-1>>0))));}else{e=e+("/");e=e+(h);}g++;}e=e+("/?$");i=B.MustCompile(e);$s=1;case 1:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}c.regex=i;return c;}return;}if($f===undefined){$f={$blk:O};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};J.ptr.prototype.Start=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(G&&!a.ForceHashURL){$s=1;continue;}$s=2;continue;case 1:$r=a.pathChanged(T(),true);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.watchHistory();$s=3;continue;case 2:$r=a.setInitialHash();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a.watchHash();case 3:if(a.ShouldInterceptLinks){$s=6;continue;}$s=7;continue;case 6:$r=a.InterceptLinks();$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 7:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.Start};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.Start=function(){return this.$val.Start();};J.ptr.prototype.Stop=function(){var $ptr,a;a=this;if(G&&!a.ForceHashURL){$global.onpopstate=null;}else{$global.onhashchange=null;}};J.prototype.Stop=function(){return this.$val.Stop();};J.ptr.prototype.Navigate=function(a){var $ptr,a,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;if(G&&!b.ForceHashURL){$s=1;continue;}$s=2;continue;case 1:U(a);$r=b.pathChanged(a,false);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=3;continue;case 2:S(a);case 3:if(b.ShouldInterceptLinks){$s=5;continue;}$s=6;continue;case 5:$r=b.InterceptLinks();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.Navigate};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.Navigate=function(a){return this.$val.Navigate(a);};J.ptr.prototype.Back=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;$global.history.back();if(a.ShouldInterceptLinks){$s=1;continue;}$s=2;continue;case 1:$r=a.InterceptLinks();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 2:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.Back};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.Back=function(){return this.$val.Back();};J.ptr.prototype.InterceptLinks=function(){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;c=H.Links();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}b=c;d=0;case 2:if(!(d=b.$length)?$throwRuntimeError("index out of range"):b.$array[b.$offset+d]);f=e.GetAttribute("href");$s=4;case 4:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(g===""){$s=5;continue;}if(C.HasPrefix(g,"http://")||C.HasPrefix(g,"https://")||C.HasPrefix(g,"//")){$s=6;continue;}if(C.HasPrefix(g,"#")){$s=7;continue;}if(C.HasPrefix(g,"/")){$s=8;continue;}$s=9;continue;case 5:return;case 6:return;case 7:return;case 8:if(!(a.listener===$throwNilPointerError)){$s=10;continue;}$s=11;continue;case 10:$r=e.RemoveEventListener("click",true,a.listener);$s=12;case 12:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 11:h=e.AddEventListener("click",true,$methodVal(a,"interceptLink"));$s=13;case 13:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}a.listener=h;case 9:d++;$s=2;continue;case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.InterceptLinks};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.InterceptLinks=function(){return this.$val.InterceptLinks();};J.ptr.prototype.interceptLink=function(a){var $ptr,a,b,c,d,e,f,g,h,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=this;c=a.CurrentTarget();$s=1;case 1:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c.GetAttribute("href");$s=2;case 2:if($c){$c=false;d=d.$blk();}if(d&&d.$blk!==undefined){break s;}e=d;g=b.findBestRoute(e);$s=3;case 3:if($c){$c=false;g=g.$blk();}if(g&&g.$blk!==undefined){break s;}f=g;h=f[0];if(!(h===V.nil)){$s=4;continue;}$s=5;continue;case 4:$r=a.PreventDefault();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$go($methodVal(b,"Navigate"),[e]);case 5:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.interceptLink};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.interceptLink=function(a){return this.$val.interceptLink(a);};J.ptr.prototype.setInitialHash=function(){var $ptr,a,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=this;if(R()===""){$s=1;continue;}$s=2;continue;case 1:S("/");$s=3;continue;case 2:$r=a.pathChanged(Q(R()),true);$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.setInitialHash};}$f.$ptr=$ptr;$f.a=a;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.setInitialHash=function(){return this.$val.setInitialHash();};J.ptr.prototype.pathChanged=function(a,b){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,m,n,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;m=$f.m;n=$f.n;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:c=this;e=c.findBestRoute(a);$s=1;case 1:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}d=e;f=d[0];g=d[1];if(f===V.nil){$s=2;continue;}$s=3;continue;case 2:$r=A.Fatal(new Z([new $String("Could not find route to match: "+a)]));$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}return;case 3:h=new K.ptr($makeMap($String.keyFor,[]),a,b);i=g;j=0;while(true){if(!(j=i.$length)?$throwRuntimeError("index out of range"):i.$array[i.$offset+j]);m=(n=f.paramNames,((k<0||k>=n.$length)?$throwRuntimeError("index out of range"):n.$array[n.$offset+k]));(h.Params||$throwRuntimeError("assignment to entry in nil map"))[$String.keyFor(m)]={k:m,v:l};j++;}$r=f.handler(h);$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:J.ptr.prototype.pathChanged};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.g=g;$f.h=h;$f.i=i;$f.j=j;$f.k=k;$f.l=l;$f.m=m;$f.n=n;$f.$s=$s;$f.$r=$r;return $f;};J.prototype.pathChanged=function(a,b){return this.$val.pathChanged(a,b);};J.ptr.prototype.findBestRoute=function(a){var $ptr,a,b,c,d,e,f,g,h,i,j,k,l,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;g=$f.g;h=$f.h;i=$f.i;j=$f.j;k=$f.k;l=$f.l;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=V.nil;c=Y.nil;d=$clone(this,J);e=-1;f=d.routes;g=0;case 1:if(!(g=f.$length)?$throwRuntimeError("index out of range"):f.$array[f.$offset+g]);i=h.regex.FindStringSubmatch(a);$s=3;case 3:if($c){$c=false;i=i.$blk();}if(i&&i.$blk!==undefined){break s;}j=i;if(!(j===Y.nil)){if(((e===-1))||(j.$length=c.$length)?$throwRuntimeError("index out of range"):c.$array[c.$offset+d]);if(!(e==="")){b=$append(b,e);}d++;}return b;};J.ptr.prototype.watchHash=function(){var $ptr,a;a=this;$global.onhashchange=$externalize((function(){var $ptr;$go((function $b(){var $ptr,b,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;b=$f.b;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b=Q(R());$r=a.pathChanged(b,false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.b=b;$f.$s=$s;$f.$r=$r;return $f;}),[]);}),AA);};J.prototype.watchHash=function(){return this.$val.watchHash();};J.ptr.prototype.watchHistory=function(){var $ptr,a;a=this;$global.onpopstate=$externalize((function(){var $ptr;$go((function $b(){var $ptr,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=a.pathChanged(T(),false);$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if(a.ShouldInterceptLinks){$s=2;continue;}$s=3;continue;case 2:$r=a.InterceptLinks();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.$s=$s;$f.$r=$r;return $f;}),[]);}),AA);};J.prototype.watchHistory=function(){return this.$val.watchHistory();};Q=function(a){var $ptr,a,b;return(b=C.SplitN(a,"#",2),(1>=b.$length?$throwRuntimeError("index out of range"):b.$array[b.$offset+1]));};R=function(){var $ptr;return $internalize($global.location.hash,$String);};S=function(a){var $ptr,a;$global.location.hash=$externalize(a,$String);};T=function(){var $ptr;return $internalize($global.location.pathname,$String);};U=function(a){var $ptr,a;$global.history.pushState(null,$externalize("",$String),$externalize(a,$String));};J.methods=[{prop:"findBestRoute",name:"findBestRoute",pkg:"github.com/go-humble/router",typ:$funcType([$String],[V,Y],false)}];AB.methods=[{prop:"HandleFunc",name:"HandleFunc",pkg:"",typ:$funcType([$String,L],[],false)},{prop:"Start",name:"Start",pkg:"",typ:$funcType([],[],false)},{prop:"Stop",name:"Stop",pkg:"",typ:$funcType([],[],false)},{prop:"Navigate",name:"Navigate",pkg:"",typ:$funcType([$String],[],false)},{prop:"Back",name:"Back",pkg:"",typ:$funcType([],[],false)},{prop:"InterceptLinks",name:"InterceptLinks",pkg:"",typ:$funcType([],[],false)},{prop:"interceptLink",name:"interceptLink",pkg:"github.com/go-humble/router",typ:$funcType([F.Event],[],false)},{prop:"setInitialHash",name:"setInitialHash",pkg:"github.com/go-humble/router",typ:$funcType([],[],false)},{prop:"pathChanged",name:"pathChanged",pkg:"github.com/go-humble/router",typ:$funcType([$String,$Bool],[],false)},{prop:"watchHash",name:"watchHash",pkg:"github.com/go-humble/router",typ:$funcType([],[],false)},{prop:"watchHistory",name:"watchHistory",pkg:"github.com/go-humble/router",typ:$funcType([],[],false)}];J.init([{prop:"routes",name:"routes",pkg:"github.com/go-humble/router",typ:W,tag:""},{prop:"ShouldInterceptLinks",name:"ShouldInterceptLinks",pkg:"",typ:$Bool,tag:""},{prop:"ForceHashURL",name:"ForceHashURL",pkg:"",typ:$Bool,tag:""},{prop:"listener",name:"listener",pkg:"github.com/go-humble/router",typ:AD,tag:""}]);K.init([{prop:"Params",name:"Params",pkg:"",typ:AE,tag:""},{prop:"Path",name:"Path",pkg:"",typ:$String,tag:""},{prop:"InitialLoad",name:"InitialLoad",pkg:"",typ:$Bool,tag:""}]);L.init([AF],[],false);N.init([{prop:"regex",name:"regex",pkg:"github.com/go-humble/router",typ:X,tag:""},{prop:"paramNames",name:"paramNames",pkg:"github.com/go-humble/router",typ:Y,tag:""},{prop:"handler",name:"handler",pkg:"github.com/go-humble/router",typ:L,tag:""}]);$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=D.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=E.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=F.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=5;case 5:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=C.$init();$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}G=false;H=$ifaceNil;$r=I();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$packages["main"]=(function(){var $pkg={},$init,C,D,B,A,F,G,H,I,J,E;C=$packages["github.com/go-humble/examples/todomvc/go/models"];D=$packages["github.com/go-humble/examples/todomvc/go/views"];B=$packages["github.com/go-humble/router"];A=$packages["log"];F=$sliceType($emptyInterface);G=$ptrType(C.Todo);H=$sliceType(G);I=$funcType([],[],false);J=$sliceType(I);E=function(){var $ptr,a,b,c,d,e,f,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;a=$f.a;b=$f.b;c=$f.c;d=$f.d;e=$f.e;f=$f.f;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:a=[a];b=[b];$r=A.Println(new F([new $String("Starting")]));$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}a[0]=new C.TodoList.ptr(H.nil,J.nil);c=a[0].Load();$s=2;case 2:if($c){$c=false;c=c.$blk();}if(c&&c.$blk!==undefined){break s;}d=c;if(!($interfaceIsEqual(d,$ifaceNil))){$s=3;continue;}$s=4;continue;case 3:$panic(d);case 4:e=D.NewApp(a[0]);$s=5;case 5:if($c){$c=false;e=e.$blk();}if(e&&e.$blk!==undefined){break s;}b[0]=e;a[0].OnChange((function(a,b){return function $b(){var $ptr,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$go((function(a,b){return function $b(){var $ptr,f,g,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;f=$f.f;g=$f.g;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:f=a[0].Save();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(g);case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};})(a,b),[]);f=b[0].Render();$s=1;case 1:if($c){$c=false;f=f.$blk();}if(f&&f.$blk!==undefined){break s;}g=f;if(!($interfaceIsEqual(g,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(g);case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.f=f;$f.g=g;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));f=B.New();f.ForceHashURL=true;$r=f.HandleFunc("/",(function(a,b){return function $b(g){var $ptr,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b[0].UseFilter(C.Predicates.All);h=b[0].Render();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(i);case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));$s=6;case 6:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=f.HandleFunc("/active",(function(a,b){return function $b(g){var $ptr,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b[0].UseFilter(C.Predicates.Remaining);h=b[0].Render();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(i);case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=f.HandleFunc("/completed",(function(a,b){return function $b(g){var $ptr,g,h,i,$s,$r;$s=0;var $f,$c=false;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$ptr=$f.$ptr;g=$f.g;h=$f.h;i=$f.i;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:b[0].UseFilter(C.Predicates.Completed);h=b[0].Render();$s=1;case 1:if($c){$c=false;h=h.$blk();}if(h&&h.$blk!==undefined){break s;}i=h;if(!($interfaceIsEqual(i,$ifaceNil))){$s=2;continue;}$s=3;continue;case 2:$panic(i);case 3:$s=-1;case-1:}return;}if($f===undefined){$f={$blk:$b};}$f.$ptr=$ptr;$f.g=g;$f.h=h;$f.i=i;$f.$s=$s;$f.$r=$r;return $f;};})(a,b));$s=8;case 8:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=f.Start();$s=9;case 9:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$s=-1;case-1:}return;}if($f===undefined){$f={$blk:E};}$f.$ptr=$ptr;$f.a=a;$f.b=b;$f.c=c;$f.d=d;$f.e=e;$f.f=f;$f.$s=$s;$f.$r=$r;return $f;};$init=function(){$pkg.$init=function(){};var $f,$c=false,$s=0,$r;if(this!==undefined&&this.$blk!==undefined){$f=this;$c=true;$s=$f.$s;$r=$f.$r;}s:while(true){switch($s){case 0:$r=C.$init();$s=1;case 1:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=D.$init();$s=2;case 2:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=B.$init();$s=3;case 3:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}$r=A.$init();$s=4;case 4:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}if($pkg===$mainPkg){$s=5;continue;}$s=6;continue;case 5:$r=E();$s=7;case 7:if($c){$c=false;$r=$r.$blk();}if($r&&$r.$blk!==undefined){break s;}case 6:}return;}if($f===undefined){$f={$blk:$init};}$f.$s=$s;$f.$r=$r;return $f;};$pkg.$init=$init;return $pkg;})(); -$synthesizeMethods(); -var $mainPkg = $packages["main"]; -$packages["runtime"].$init(); -$go($mainPkg.$init, [], true); -$flushConsole(); - -}).call(this); -//# sourceMappingURL=app.js.map diff --git a/examples/humble/js/app.js.map b/examples/humble/js/app.js.map deleted file mode 100644 index 94898112c6..0000000000 --- a/examples/humble/js/app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"app.js","sources":["/github.com/gopherjs/gopherjs/js/js.go","/github.com/gopherjs/gopherjs/compiler/natives/runtime/runtime.go","/runtime/error.go","/errors/errors.go","/github.com/gopherjs/gopherjs/compiler/natives/sync/atomic/atomic.go","/github.com/gopherjs/gopherjs/compiler/natives/sync/pool.go","/github.com/gopherjs/gopherjs/compiler/natives/sync/sync.go","/sync/mutex.go","/sync/once.go","/sync/pool.go","/sync/runtime.go","/sync/rwmutex.go","/io/io.go","/github.com/gopherjs/gopherjs/compiler/natives/unicode/unicode.go","/unicode/digit.go","/unicode/graphic.go","/unicode/letter.go","/unicode/utf8/utf8.go","/github.com/gopherjs/gopherjs/compiler/natives/bytes/bytes.go","/bytes/buffer.go","/bytes/bytes.go","/github.com/gopherjs/gopherjs/compiler/natives/math/math.go","/math/abs.go","/math/frexp.go","/math/log10.go","/math/pow10.go","/strconv/atob.go","/strconv/atof.go","/strconv/atoi.go","/strconv/decimal.go","/strconv/extfloat.go","/strconv/ftoa.go","/strconv/itoa.go","/strconv/quote.go","/encoding/base64/base64.go","/github.com/gopherjs/gopherjs/compiler/natives/syscall/syscall.go","/github.com/gopherjs/gopherjs/compiler/natives/syscall/syscall_unix.go","/syscall/env_unix.go","/syscall/exec_unix.go","/syscall/route_bsd.go","/syscall/str.go","/syscall/syscall.go","/syscall/syscall_bsd.go","/syscall/syscall_darwin.go","/syscall/syscall_unix.go","/syscall/zsyscall_darwin_amd64.go","/github.com/gopherjs/gopherjs/nosync/mutex.go","/github.com/gopherjs/gopherjs/nosync/once.go","/github.com/gopherjs/gopherjs/compiler/natives/strings/strings.go","/strings/reader.go","/strings/replace.go","/strings/search.go","/strings/strings.go","/github.com/gopherjs/gopherjs/compiler/natives/time/time.go","/time/format.go","/time/time.go","/time/zoneinfo.go","/github.com/gopherjs/gopherjs/compiler/natives/os/os.go","/os/dir_unix.go","/os/doc.go","/os/error.go","/os/error_unix.go","/os/file.go","/os/file_posix.go","/os/file_unix.go","/os/getwd_darwin.go","/os/path_unix.go","/os/proc.go","/os/stat_darwin.go","/os/sys_darwin.go","/os/types.go","/os/types_notwin.go","/os/getwd.go","/github.com/gopherjs/gopherjs/compiler/natives/reflect/reflect.go","/reflect/type.go","/reflect/value.go","/fmt/format.go","/fmt/print.go","/fmt/scan.go","/sort/search.go","/sort/sort.go","/flag/flag.go","/unicode/utf16/utf16.go","/encoding/json/decode.go","/encoding/json/encode.go","/encoding/json/fold.go","/encoding/json/indent.go","/encoding/json/scanner.go","/encoding/json/tags.go","/math/rand/exp.go","/math/rand/normal.go","/math/rand/rand.go","/math/rand/rng.go","/math/big/arith.go","/math/big/int.go","/math/big/intconv.go","/math/big/nat.go","/math/big/natconv.go","/github.com/gopherjs/gopherjs/compiler/natives/crypto/rand/rand.go","/github.com/dchest/uniuri/uniuri.go","/encoding/gob/decode.go","/encoding/gob/error.go","/encoding/gob/type.go","/github.com/go-humble/locstor/data_store.go","/github.com/go-humble/locstor/encode.go","/github.com/go-humble/locstor/local_storage.go","/github.com/go-humble/examples/todomvc/go/models/filter.go","/github.com/go-humble/examples/todomvc/go/models/todo.go","/github.com/go-humble/examples/todomvc/go/models/todo_list.go","/log/log.go","/github.com/wsxiaoys/terminal/color/color.go","/github.com/albrow/prtty/prtty.go","/compress/flate/huffman_code.go","/compress/flate/reverse_bits.go","/hash/crc32/crc32.go","/path/filepath/match.go","/path/filepath/path.go","/path/filepath/path_unix.go","/io/ioutil/ioutil.go","/go/token/position.go","/go/token/token.go","/go/ast/ast.go","/go/ast/scope.go","/honnef.co/go/js/dom/dom.go","/honnef.co/go/js/dom/events.go","/html/escape.go","/net/url/url.go","/container/list/list.go","/github.com/gopherjs/gopherjs/compiler/natives/text/template/parse/lex.go","/text/template/parse/lex.go","/text/template/parse/node.go","/text/template/parse/parse.go","/text/template/exec.go","/text/template/funcs.go","/text/template/helper.go","/text/template/option.go","/text/template/template.go","/html/template/attr.go","/html/template/content.go","/html/template/context.go","/html/template/css.go","/html/template/error.go","/html/template/escape.go","/html/template/html.go","/html/template/js.go","/html/template/template.go","/html/template/transition.go","/html/template/url.go","/github.com/go-humble/temple/temple/dom.go","/github.com/go-humble/temple/temple/temple.go","/github.com/go-humble/examples/todomvc/go/templates/templates.go","/github.com/go-humble/view/default_view.go","/github.com/go-humble/view/event.go","/github.com/go-humble/view/view.go","/github.com/go-humble/examples/todomvc/go/views/app.go","/github.com/go-humble/examples/todomvc/go/views/todo.go","/github.com/go-humble/detect/detect.go","/regexp/syntax/compile.go","/regexp/syntax/parse.go","/regexp/syntax/prog.go","/regexp/syntax/regexp.go","/regexp/syntax/simplify.go","/regexp/backtrack.go","/regexp/exec.go","/regexp/onepass.go","/regexp/regexp.go","/github.com/go-humble/router/router.go","main.go"],"mappings":";;;;mrBA+BO,OAAqC,yC,yGAGrC,OAAgD,kE,4GAGhD,OAAgC,yC,2GAGhC,OAA0B,kC,2GAG1B,OAAkC,mB,kHAGlC,OAAgD,4C,0HAGhD,OAA4D,yE,8GAG5D,OAAiD,mD,2GAGjD,OAA8C,kG,mGAG9C,OAAyB,mB,qGAGzB,OAA6B,sC,sGAG7B,OAAuB,8B,kGAGvB,OAA2B,qC,uGAG3B,OAA6B,sC,wGAG7B,OAA6B,6B,0GAG7B,OAAqC,8C,+GAGrC,OAA8B,gB,wGAQ9B,OACL,kE,sGAIK,OACL,4C,yF,4BA4BC,a,CAED,yBACA,oCACI,oDACH,gHAD2B,W,CAG5B,S,sCAoCA,kB,mrD;wyBClJA,qEACA,0BACA,wBACA,2CACC,kB,GAGG,YACJ,0B,4EAqBA,yE,kB,qD,CAIA,6J,6F,yCAiBA,S,iD,wE,wHCvCK,OACL,oB,WAEC,c,C,0BAGA,kE,C,yBAGA,mF,CAGD,gH,2GAOK,Y,sIAEA,YACL,0B,8hC,4F;yQC1CA,oB,yDAQK,OACL,W;qV,mBC8BC,YACA,Y,CAED,a,iEA4CA,mBACA,YACA,U,6CAoCA,iB,qDAgBA,Y,sDAQA,Y,mFAeK,Q,kB,4GAIA,Q,oCAEJ,kE,C,+EAGA,mF,CAED,Q,ge;snF,8OCzKK,OACL,qD,OACC,kE,OACC,8F,OAED,iB,OAED,0HACA,oDACA,S,0OAGK,O,mCAEJ,O,CAED,2B,iF,6NCvBA,8C,OACC,qBACA,4IACA,2F,O,yB,+V,yBAQD,+C,kBAEC,O,CAGD,gFACA,iBACA,sF,kBAEC,uB,C,gG,6JAOD,a,+OCMK,O,oJAMJ,O,CAGD,QACA,IACA,OACC,UACA,MACA,gD,O,S,2LAOG,O,CAED,KACA,WACA,c,CAED,S,O,M,cAMC,sD,CAED,c,CAED,iL,O,cAEE,c,CAED,sMACA,OACA,I,O,qB,0aAeG,OAOL,sI,uBAEC,sD,CAGD,IACA,O,oCAIE,O,CAGD,eACA,iL,OACC,sMACA,O,OAED,U,qB,+iBCzFI,O,uIAEJ,O,CAGD,6FACA,8CACA,4C,OACC,qJACA,sF,O,kVCqJD,yIACC,4FACI,iDACH,eACA,sBACA,yDACC,4G,KAED,gBANiC,W,CAQlC,UACA,c,KAED,a,wBASA,K,iCAIA,4F,yB,2BCrLI,oBACJ,M,4RCVK,OAKL,8L,OAEC,0N,O,4YAYI,OAMF,mM,O,6CAED,KACA,yD,CAGD,6L,OAEC,0N,O,O,sZAcG,OAML,6FAEA,qLAEA,6M,OACC,0N,O,wZAeI,OASL,sK,kBAEC,KACA,wD,CAGG,0CACH,0NADuB,W,qBAIxB,+F,sPAQK,OACL,wC,yQAKK,OAAuB,2H,+XACvB,OAAuB,6H,shG,4F,qG,K,I;m0BC+IzB,yE,O,4H,O,8I,gd,gB,8C,CAiBH,iEACK,IACJ,sHACA,W,qB,SAGA,Y,6CAEA,wB,CAED,Y,ma,4H,q1B,4F,4F,wC,0C,sB,8C,wE,iC,iC;8hE,cC3SC,a,CAED,IACA,YACA,8BACC,qGACA,uF,+BAEC,iF,cAEC,+D,CAED,c,C,gBAGA,I,MAEA,S,C,CAGF,S,2B,WCjBC,oB,CAED,uB,4C,iBCwCC,iH,CAED,6B,oDAgBA,qI,WAEE,Y,C,KAGF,a,uC,iBAiBC,gH,CAED,wB,6C,iBAmCC,IACA,oEACC,Y,CAED,a,CAED,6B,oE,0BCzCC,kDACC,uF,WAEC,a,C,YAGA,gG,C,KAGF,a,CAID,IACA,YACA,8BACC,qGACA,uF,qBAEC,gG,C,WAGA,I,MAEA,S,C,CAGF,a,qD,kBAMC,kDACC,uF,WAEC,a,C,YAGA,2F,C,KAGF,a,CAID,IACA,YACA,8BACC,qGACA,iG,qBAEC,2F,C,WAGA,I,MAEA,S,C,CAGF,a,qCAKA,Q,oIAEC,yB,CAED,Q,0GAEC,oB,CAED,a,iDAIA,QACG,gB,oIACF,sC,CAED,Q,0GAEC,oB,CAED,a,6B,iBAOC,4G,CAED,uB,+CA2DA,8B,uC,W,kBAOE,Y,CAED,S,CAED,e,4C,W,iBAOE,Y,CAED,S,CAED,e,sDAmEA,IACA,aACA,8BACC,qG,wGAEC,S,MAEA,I,C,C,0HAID,sG,CAME,Q,eACF,S,CAED,a,s8B,2hB,wE,ka,sH,0D,o3Y,+7G,kkC,ovT,mM,srG,i5K,8mG,yJ,w9K,+mF,muC,kT,y5C,61G,4J,wT,ykB,6J,oL,yyG,upB,qiJ,yU,8mB,2sC,i2H,gL,wD,wD,yJ,W,W,W,W,c,W,e,U,W,W,W,U,W,W,W,W,W,U,U,W,W,W,W,W,W,W,U,W,W,W,W,U,U,8D,W,c,W,W,W,W,ysB,gH,8D,s5C,6K,uF,+E,sF,uF,+E,mW,wG,gH,0D,+E,wD,+E,8D,uF,uF,qI,wG,u9H,yG,yI,2L,wM,8D,+H,4K,8D,8D,6xB,+N,mF,8D,4Z,s1B,mW,iZ,8b,6X,wD,gH,4P,4I,uF,+qB,uF,uF,4G,8D,mW,8O,mF,6O,6H,uF,uF,+b,2uB,sG,oJ,gH,oN,0D,8D,uF,8D,8R,+E,uF,4G,2F,gH,8D,gH,uF,2K,gH,kK,0G,uF,6H,wD,wD,wD,gH,8D,8D,8D,uF,8D,8D,mW,uF,kK,8D,8D,0D,uF,gH,mF,+E,+E,mF,uF,8D,uF,sH,iV,uF,+E,0D,sG,+E,sG,+E,oJ,mF,uF,iZ,4U,wD,+E,kM,4G,uF,uF,0D,uF,mF,a,8B,e,iB,gB,iB,c,kB,c,gB,iB,e,gB,iB,c,4B,e,2B,e,a,iB,e,e,kB,gB,iB,gB,mB,iB,6B,gB,iB,iB,mB,e,gB,c,iB,iB,Y,e,gB,e,e,iB,yB,kB,8B,+B,iB,e,gB,iB,iB,mB,c,e,kB,Y,c,e,c,iB,iB,a,e,e,iB,kB,gB,mB,qB,sB,yB,6B,a,a,kB,Y,gB,gB,kB,oB,Y,c,iB,sB,mB,0B,mB,oB,0B,mB,c,gB,qB,kB,oB,iB,mB,wB,e,c,kB,mB,gB,gB,gB,oB,gB,qB,kB,qB,e,gB,iB,e,iB,iB,c,c,e,e,a,gB,iB,gB,iB,Y,oB,W,6lI,4P,oB,i5iB,mB,25B,6wC,uD,wD,8E,sD,m3E,yO,k2E,8E,8E,uL;iRCtTA,Y,Q,6C,CAIA,gF,U,+C,C,U,8C,C,Q,6C,CAgBA,gF,kB,8C,C,UAOC,8C,W,8C,C,8C,C,Q,mD,CAWD,iF,oB,oD,C,UAOC,4E,Y,oD,C,uB,oD,C,gD,C,Q,mD,CAcD,iF,oB,oD,C,UAOC,yG,wB,oD,C,gD,C,oD,mMAYD,W,Q,6C,CAIA,kB,U,+C,C,U,8C,C,Q,6C,CAgBA,kB,kB,8C,C,UAOC,8C,W,8C,C,8C,C,Q,mD,CAWD,mB,oB,oD,C,UAOC,4E,Y,oD,C,uB,oD,C,gD,C,Q,mD,CAcD,mB,oB,oD,C,UAOC,yG,wB,oD,C,gD,C,oD,+BAcD,cACA,S,yDAkBA,qBACA,Y,2DAWA,qBACA,Y,yFAYA,Y,U,gC,CAIA,SACA,4F,U,4B,CAOA,S,QAEC,I,CAEG,W,+B,4FAEF,M,CAFyB,W,C,QAM1B,I,CAED,oC,sB,gC,C,4B,qFAeA,W,U,gC,CAIA,SACA,uB,U,4B,CAOA,S,QAEC,I,CAEG,W,+B,uBAEF,M,CAFyB,W,C,QAM1B,I,CAED,oC,sB,gC,C,4B,yDAWA,QACC,SACD,iBACC,SACD,kBACC,SACD,6BACC,SACD,mBACC,SACD,qBACC,S,CAED,S,gDAOO,UACP,WACC,2FACA,SACD,kBACC,+GACA,kHACA,SACD,wCACC,QAGA,gHACA,0HACA,kHACA,SAJD,mBACC,gHACA,0HACA,kHACA,S,MAEA,gHACA,2HACA,0HACA,kHACA,S,C,qDAOD,IACI,IACA,0C,6FAEF,W,MAEA,2BACA,W,CALqB,W,CAQvB,S,wDAKA,gEACC,W,SAED,S,oDAM6B,+B;gxBCpY7B,yI,UAEE,S,C,KAGF,S,wD,+BAKC,a,CAED,yI,kGAEE,a,C,KAGF,Y,2DCoBK,OAA4B,8B,uGAI5B,O,eAGJ,c,CAED,8C,sGAKK,OAAuB,8B,gGAIvB,OAAuB,uB,wGAIvB,OACL,aAEA,mBACC,6DACD,gBAEC,Q,CAED,sC,8GAKK,OAAqB,c,8GAKrB,OACL,U,4BAGC,c,C,yCAGI,S,0BAEH,mC,uHAMA,yCACA,uB,MAGA,iCACA,qC,CAED,QACA,Q,CAED,6CACA,kB,0GAQK,O,QAEJ,yD,CAED,YACA,2B,mIAMK,OACL,aACA,oB,mE,2IAOK,OACL,aACA,mB,oE,kbAcK,OACL,a,yBAGC,c,CAED,OACI,mC,UAEF,Q,qBAIC,mC,CAED,qCACA,8CACA,Q,CAED,sJACA,8CACA,gE,+BAEC,c,C,sC,4B,C,qB,oC,+aAaF,qC,+CAEE,yB,C,QAGF,wB,oaAOK,OACL,aACA,qD,OACC,UACA,+H,QAEC,iE,CAED,mBACA,kB,sC,4B,C,e,0C,C,OAWD,cACA,Y,0TAOK,OACL,aACA,YACA,iGACA,iB,mJAOK,O,UAEJ,0B,oC,CAGD,mDACA,4C,oC,0IAQK,OACL,a,yBAGC,c,kBAEC,Y,C,gC,CAIF,uCACA,mB,QAEC,a,CAED,Y,4GAOK,OACL,aACA,U,QAEC,I,CAED,sCACA,mB,QAEC,a,CAED,S,yIAKK,OACL,a,yBAGC,c,gC,CAGD,yGACA,mBACA,a,oC,qKASK,OACL,a,yBAGC,c,0C,CAGD,aACA,yG,UAEC,mB,mD,CAGD,qDACA,mB,8C,qHASK,O,wBAEJ,8E,CAED,a,YAEC,oDACA,mB,CAED,iB,qHAMK,O,6CAEJ,4E,CAED,a,YAEC,mB,CAED,iB,oJASK,OACL,+BAGA,oBACA,Y,wJAIK,OACL,8BACA,oB,QAEC,gBACA,Q,CAED,2BACA,QACA,a,4B,qJAUK,OACL,+B,4C,+FAWoC,4C,4CASpC,oE,gECvUA,Y,UAEC,S,C,gBAGA,S,CAED,gF,UAEC,c,CAED,IACA,yCACA,sC,kGAEE,sB,QAEC,M,CAED,W,C,iCAGA,S,CAED,W,CAED,S,4D,eAyDK,IACA,IACA,0CACH,4F,UAEC,I,MAEA,6C,CAED,uE,UAEE,S,C,SATqB,W,C,CAczB,S,gDA8JA,2D,iTAgBA,YACA,IACA,mBACI,6CACH,IACA,4F,WAEC,6C,CAED,sF,SAEC,e,QAEC,I,C,eAIA,gBACA,mBACA,+BACA,I,CAED,0C,CAED,W,qBAED,wB,sXAe+B,sG,oTAGA,sG,wUAwE/B,+F,WAEC,c,CAED,sB,6WAMA,+F,oGAEC,sCACA,W,MAEA,W,CAED,wB,0WAMA,mL,6XAuCA,IACA,yCACC,IACA,4F,WAEC,6C,CAED,yH,OACC,S,OAED,W,qBAED,S,maAOI,6CACH,mH,WAEC,mD,CAED,WACA,yH,OACC,S,O,qBAGF,S,4LAIA,sCACC,uE,UAEE,Y,C,SAGF,a,G,8MAaD,kG,uUAMA,kG,6TAMA,sG,6LA6DA,iEAEK,gB,sFAEH,8G,MAEA,gCACA,6B,C,sFAGA,8G,MAEA,gCACA,6B,C,UAOA,S,C,QAKA,gB,C,wB,0BAMC,S,CAED,a,CAKD,kBACA,0CACC,kB,C,UAGA,S,CAED,a,CAID,6B,muE,4F,4F,4F,4F;;ghBCzrBA,c,wCAuCA,8B,2D,0C,0CAyBA,UACC,S,MAEA,S,C,8C,WAMA,a,C,WAGA,a,CAED,a,sD,0B,gD,WASC,U,C,aAGA,sE,C,cAGA,uE,CAED,mC,0C,iBAKC,S,CAED,8B,yCAYA,c,sCAwBA,S,wCAgDA,+BACA,4CACA,8CACA,8C,8BAIA,sBACA,yB,kDAIA,qBACA,0B,4DAIA,sBACA,gJ,kDAIA,gCACA,sDACA,0B,sDClNA,SACC,UACD,iBACC,S,CAED,U,0D,kC,6D,C,qC,yECAA,W,qCAEA,yB,qC,CAGA,4BACA,UACA,+GACA,yFACA,uFACA,UACA,c,uCCZA,2B,aAIC,gB,CAED,mC,qCCQA,QACA,SACI,qCACH,+FACA,sOAF8B,a,C,kL,sJ,e,I,M,O,M,K;i0ECzB/B,IACA,kE,uCAEA,2E,wC,C,+C,sD,6BCKC,a,CAEG,yCACH,kB,iBAEC,kB,CAED,kB,iBAEC,kB,C,eAGA,a,CAVuB,W,CAazB,Y,6D,iBAKC,Y,CAED,kBAGA,W,kC,sC,CAIA,iB,kC,uC,CAIA,0B,e,qC,CAIA,0B,gC,sC,C,MAbC,Y,CAkBD,Y,uEAGK,OACL,IACA,YACA,c,gBAIC,S,CAGD,yBACC,WACD,+BACC,WACA,W,CAID,QACA,QACA,qCAEC,yB,MAEE,S,CAED,OACA,UAPgB,W,SAUjB,mDACC,O,uCAEC,iBAbe,W,S,C,aAiBf,kGACA,iB,oCAEA,a,CApBe,W,S,CAwBjB,M,C,OAGA,S,C,OAGA,U,C,kEASA,W,gBAEC,S,CAED,I,yBAEC,W,+BAEA,WACA,K,C,wDAGA,S,CAED,IACA,+E,YAEE,4C,CAF8C,W,CAKhD,wB,C,sBAIA,S,CAGD,OACA,S,8JAQA,I,gBAIC,kB,CAGD,yBACC,WACD,+BACC,OACA,W,CAID,QACA,QACA,IACA,IACA,IACA,qCACQ,kBACP,W,MAEE,kB,CAED,OACA,IAPgB,W,SAUjB,uBACC,O,sBAEC,WAbe,W,S,CAgBhB,W,SAEC,gCACA,gFACA,W,oCAEA,O,CAtBe,W,S,CA0BjB,M,C,OAGA,kB,C,OAGA,I,C,kEASA,W,gBAEC,kB,CAED,I,yBAEC,W,+BAEA,WACA,K,C,wDAGA,kB,CAED,IACA,+E,YAEE,4C,CAF8C,W,CAKhD,kB,C,sBAIA,kB,CAGD,SACA,OACA,kB,sKAOK,OACD,IACA,mBAGJ,0C,OACC,mBACA,SACA,c,OAMD,0C,OACC,c,OAED,2C,OAEC,mBACA,SACA,c,OAID,IACA,iCACK,I,oBAEH,K,MAEA,gG,CAED,YACA,W,CAED,wDACK,I,qBAEH,K,MAEA,iG,CAED,WACA,W,CAID,W,oBAMC,qBACA,YACA,W,CAGD,yF,OACC,c,QAID,iCACA,qBAGA,sH,QACC,2BACA,WACA,0F,QACC,c,Q,Q,iIAMD,S,CAED,cAED,OAEC,mBACA,oDACA,OAED,OAEC,qIACA,2J,UAEC,yH,C,4B,gJ,sEAsBA,Y,CAED,gB,MAEC,K,CAGD,U,+BAKA,qB,SAIE,uGACA,K,C,sBAIA,Y,C,oHAGF,sB,2H,CAGA,Y,qE,sEAOC,Y,CAED,gB,MAEC,K,CAGD,U,+BAIA,qB,SAIE,gHACA,K,C,sBAIA,Y,C,6HAGF,sB,oI,CAGA,Y,qHAMG,qB,M,6C,C,MAMF,0C,M,OAIK,yB,M,oC,C,CAKJ,uCACG,8B,MACF,gCACA,kC,MAEC,oB,C,4B,C,C,CAMA,wC,e,gD,CAIJ,sCACA,mC,OAEC,oB,C,gC,qHAME,qB,M,oC,C,MAMF,0C,M,OAIK,yB,M,oC,C,CAKJ,uCACG,8B,MACF,gCACA,uB,MAEC,oB,C,4B,C,C,CAMA,wC,e,gD,CAIJ,sCACA,wB,OAEC,oB,C,gC,uE,WAwBA,qB,4B,CAGD,qB,4B,uOClgBK,OACL,oJ,2MAIA,qC,+BAIA,oC,8IAYI,8C,UAGH,K,CAGD,IACA,oGACA,OACC,iBACA,c,cAED,O,cAGA,OAEC,+JACA,OACC,8C,QACC,iBACA,c,QAED,KACA,I,eACD,OACC,IACA,I,sBAEA,K,Q,qBAID,+BACA,c,OAKD,IACA,WACC,oCACD,iBACC,2B,MAEA,wG,CAGD,6EAEA,0CACK,IACJ,kBACA,mHACA,QACC,gB,eACD,QACC,8B,eACD,QACC,8B,uBAEA,mBACA,iBACA,c,QAED,mD,QACC,mBACA,iBACA,c,QAGD,0F,QAEC,qCACA,gBACA,c,QAED,+BAEA,kEACA,gJ,QAEC,qCACA,gBACA,c,QAED,IApCiB,W,uB,oCAyCnB,O,qD,gJ,UAwBE,K,C,iB,wD,CASD,IACA,Q,yBAEC,iB,+BAEA,OACA,iB,CAIG,mBACJ,yB,iGAEC,kCACA,wB,0C,CAGD,gD,+D,uG,C,6D,oG,CAOA,6B,MAEC,+B,C,oC,uEAOD,0B,mE,iEClLK,OACL,a,WAEC,c,C,WAGA,e,CAGD,mBACA,IAEA,aACC,UAED,kBAEC,wFACA,WACA,wFACA,WACA,wCACA,kEAED,oBAEC,kEACA,wFACA,WACA,qE,MAIA,kEACA,iD,CAED,wC,2FAIA,kDACC,wF,KAED,iB,gCAOA,gIACC,iB,C,aAGA,O,C,8DAKI,OACD,YAGJ,IACA,+DACC,oCACA,6EACA,oHACA,WACA,I,CAID,OACI,W,+BACH,qJACA,iBAFgB,W,CAIjB,UACA,M,8HAUA,IACA,IAGI,IACJ,yD,Y,UAIG,OACA,O,CAED,yDACC,WACA,W,CAED,M,CAED,mFACA,4BAdgB,W,CAgBjB,wBAGA,iCACC,mFACA,2BACA,oCACA,iGACA,WACA,4BANe,W,CAUhB,8BACC,2BACA,oC,UAEC,iGACA,W,cAEA,a,CAED,W,CAGD,OACA,M,kCAiGI,yC,iBAEF,Y,C,gHAGA,2G,CALsB,W,CAQxB,a,4DAKA,gG,qIAEC,W,CAGD,OACA,YAGI,IACA,W,+BACH,8HACA,yFACA,mBACA,W,UAEC,iG,qBAEA,a,CAED,IAVgB,W,CAcjB,8BACC,yFACA,mBACA,W,UAEC,iG,qBAEA,a,CAED,I,CAGD,iB,cAEC,S,CAED,iBACA,M,iDAIK,OAEL,aAEA,cACC,+BACC,SACA,Y,CAED,cACD,cACC,gCACC,SACA,Y,CAED,e,C,oG,iBAOA,a,C,yG,YAKC,Y,CAED,oL,CAGD,qF,iDAOK,O,iBAEJ,O,C,YAGA,a,MAEA,e,C,+GAKI,O,iBAEJ,O,CAED,OACA,M,+HAIK,O,iBAEJ,O,CAIG,wCACH,6E,SAEC,qKACA,YACA,O,CALuB,W,CAWzB,UACA,OACA,iB,iIAKK,O,YAEJ,0C,CAEG,IACJ,mBACI,6CACH,uLADgC,W,CAGjC,iCACC,gCADe,W,C,eAIf,kE,CAED,S,iMC5RK,OACL,cAEA,c,oBAIC,qBACA,2CACA,W,CAID,kD,wJAGC,kE,C,uFAKA,2BACA,W,C,2DAMA,mBACA,oDACA,O,uIAGA,S,CAGD,qIACA,2J,UAEC,mH,CAED,Y,iPAOK,OACL,SACA,2BACA,Q,sHAGC,gDACA,Q,oE,CAGD,cAEA,4G,mGAEC,4G,MAEA,4G,CAED,Y,oLAKK,OACL,yB,8B,a,C,0DAKC,uBACA,Y,C,0DAGA,uBACA,Y,C,0DAGA,sBACA,W,C,0DAGA,sBACA,W,C,0DAGA,sBACA,W,C,0DAGA,sBACA,W,CAED,qBACA,yBACA,S,kKAK2B,eAAtB,OACL,0EACA,0EAGA,cACA,cAGA,qKACA,gMAEA,2EAEA,yFACA,6B,0MAYK,OAGL,I,MAGC,W,CAGD,SACA,QACA,QAGA,oG,kB,iB,CAIA,4E,qJAKC,6FACA,c,MAEA,cACA,iFACA,W,CAID,iF,QAEC,W,CAED,WAGA,gBACA,2BAQA,eACI,I,aAGH,uD,MAEA,sB,CAGD,6CACA,qI,2X,iB,C,gB,sKAgBK,OAUL,+GACA,oGAEA,iBACC,4FAEA,UACC,WACD,gBACC,W,MAEA,W,C,CAKF,iF,gD,2GAOA,4BACA,iFACA,iFACA,S,2JAMK,O,yCAEJ,OACA,OACA,YACA,Y,C,UAGA,yF,CAID,cACA,qBAEA,eACA,yCACA,2FACA,mBAGA,IACA,IACA,mBACI,8D,+EAEF,IACA,M,CAED,gCALmC,W,CAOpC,I,QAGC,kFACA,qGACA,qE,MAEA,I,CAIG,YACJ,KACI,oCACH,iGACA,4DACA,WACA,0FACA,M,CAEG,qCACH,qLAD2B,a,CAG5B,WACA,QACA,YACA,Y,Q,6CAIE,yE,CAID,8BACC,gCACA,gC,oIAGC,a,CAED,0BACA,uJACA,uEACA,aACA,W,CAED,Q,CAkBD,wG,QAEC,a,CAGG,6C,kHAEF,aACA,M,CAHyB,a,CAM3B,Y,iJ,gFAaC,yE,C,6GAGA,0D,C,wJAGA,Y,C,wJAIA,YACA,+B,sGAEE,iB,MAEA,M,CAJY,W,C,QAQb,yFACA,OACA,iB,MAEA,yM,CAED,Y,CAED,a,uMAOK,O,yCAEJ,OACA,OACA,YACA,Y,C,gDAII,YACJ,KACI,wEACH,oCACA,6EACA,oHACA,WACA,I,CAED,iBACI,kCACH,kLADmB,W,CAGpB,sBACA,kJACC,iB,C,aAGA,O,CAED,YACA,Y,CAED,c,gBAGC,qDACA,Y,C,gBAGA,qDACA,Y,CAGD,YAEA,gFACA,gFAIA,eACA,yCACA,+FAGA,wEAEA,wEAGI,KACA,qE,sFAEF,MACA,M,CAED,kCALmC,a,CAOhC,qCACH,gGACA,2GACA,2HACA,2EAEG,wF,gEACF,aACA,aACA,YAGA,0D,CAZ6B,a,CAe/B,QACA,eACA,YAII,KACJ,oBACA,YACC,kCACA,kCACA,qCACA,kIACA,iBACA,yF,mFAKC,yG,C,C,mK,yFAcD,a,CAED,mN,YACC,yMACA,mD,C,2OAIA,a,C,gKAIA,a,C,6GAIA,OACA,O,CAED,Y,wCC9mBA,kE,gEAMA,qB,4HAII,mBACA,SACJ,IACA,WACC,2CACA,KACD,iBACC,mBACA,K,MAEA,wE,CAGD,qFACA,sFACA,qIAEA,IACA,gDAEK,KAEJ,iCACC,QACD,YACC,S,MAEA,S,CAED,yBAED,gBAEC,W,MAIA,iG,CAED,gB,WAIC,qB,C,OAIA,yB,CAGG,+BACJ,QAEA,M,MAGC,uCACA,qEACI,aACJ,eACA,2B,OAEC,yB,CAGD,KACA,sBACC,kBACD,mBACC,qBACD,4BACC,O,C,uBAID,KACA,KACA,sBACC,aACD,4B,UAEE,I,CAED,K,C,WAII,aACJ,eACA,wCACA,wB,C,C,OAID,yB,CAED,uB,8DAKA,uCACA,YACA,8BACI,+BACJ,M,MAEC,YACA,mDAEA,IACA,oBACC,YACD,kBACC,qBACD,0BACC,O,C,MAID,IACA,oBACC,gBACD,kBACC,mBACD,0B,UAEE,I,CAED,W,CAED,mD,CAED,uB,sDAGsD,eACtD,IACA,oBACC,qBACD,kBACC,mBACD,0BAEC,I,uBAEC,O,C,MAMA,I,CAED,Y,e,WAGE,O,CAED,sD,C,WAGA,O,CAED,iC,CAID,uB,uF,8BAQC,OACA,O,CAiBD,c,sEAGC,O,CAMD,uCACA,yEACA,qCAQI,mBACA,I,iHAEH,kCACA,I,MAEA,iEACA,S,CAED,uCACA,yEACA,qCAKA,gEAII,qCACC,wB,WAEH,6E,MAEA,K,CAED,6E,WAEC,6E,MAEA,K,CAKD,8CAIA,oDAKA,UACC,gBACA,OACD,YACC,oBACA,OACD,aACC,kBACA,O,CAjCoB,W,C,kEA6CS,e,MAG9B,gB,CAID,K,kBAEC,wF,CAED,e,QAIC,gBACA,IACA,kB,QAEC,qCACA,I,CAED,+BACC,gBADgB,W,C,CAMlB,eACA,Y,aAEC,I,C,QAGA,KACA,K,MAEA,K,CAED,eAIA,SACC,yCACD,gBACC,+M,MAEA,yX,CAGD,S,kDAI+B,e,MAG9B,gB,C,WAKA,gBACA,qCACA,iCACC,gBADe,W,C,MAIhB,gB,C,QAKA,gBACI,kCACH,KACG,Y,iBACF,+F,CAED,eALqB,W,C,CASvB,S,gD,MAOC,gB,CAID,+BAGA,iBAGA,yB,SAEC,gB,CAED,4CAEA,S,gC,QAKC,S,CAED,S,gC,QAKC,S,CAED,S,oCC3bA,oCACA,S,uDAOA,6FACA,S,8CAKA,8B,mDAMA,uFACA,S,wDAMA,8BACA,S,mH,cAuBC,iE,CAIG,YACJ,K,MAGC,gC,C,WASC,wEACC,4CACA,gGACI,kCACH,WACA,yFACA,6IACA,IAJkB,W,CAMnB,I,CAKF,eACA,gCACC,WACA,yFACA,6IACA,I,CAGD,WACA,yF,MAES,uE,QAET,mBACA,qBACA,iFACC,WACA,6IACA,2B,CAGD,WACA,mI,MAIA,mBACA,iFACC,WACA,oBACA,4LACA,I,CAGD,WACA,mI,C,C,MAKA,WACA,sE,C,MAIA,yCACA,Y,CAED,yCACA,Y,wDC9HI,YACJ,sHACA,eACI,yCACH,uBACA,I,WAEC,wC,C,yBAGA,wBACA,2EACA,uEAT0B,0B,C,2BAa1B,gBACA,0BAd0B,0B,C,M,iBAmBzB,0BAnByB,0B,C,gBAuB1B,4BACA,2CAxB0B,0B,CA2B3B,IACA,UACC,wBACD,gBACC,wBACD,iBACC,wBACD,iBACC,wBACD,iBACC,wBACD,gBACC,wBACD,iBACC,wB,MAGA,SACC,wBACA,2EACA,uEACD,oBACC,QAGA,wBACI,oCACH,4EADoB,W,CAFtB,kBACC,wBACI,oCACH,4EADoB,W,C,MAIrB,wBACI,oCACH,4EADoB,W,C,C,CA1DI,kBAgE5B,eACA,yB,4BASA,sB,0CAaA,qB,iDAcA,mC,kDAMA,6B,oDASA,kC,yDAMA,6B,iEAOA,qCACC,wCACA,iB,Q,cAGE,a,CAED,S,C,cAGA,a,C,4CAGA,a,C,CAGF,Y,+EAIA,SAEA,iB,qCAEA,wB,6CAEA,uB,6C,CAGA,Y,yHAmBO,kBACP,kCACC,iBACA,gBACD,iBACC,wC,wEAED,sB,4F,C,gBAMC,iBACA,gB,CAED,kBACA,iBAEA,IACA,6BACC,IACD,iBACC,IACD,kBACC,KACD,kBACC,KACD,kBACC,KACD,kBACC,IACD,kBACC,KACD,mCACC,IACA,IACA,YACC,IACD,kBACC,IACD,iBACC,I,CAEG,I,eAEH,iBACA,gB,CAEG,kCACH,qC,QAEC,iBACA,gB,CAED,cANkB,W,CAQnB,iB,YAGC,IACA,M,C,cAGA,iBACA,gB,CAED,IACA,OACD,yEACC,gB,eAEC,iBACA,gB,CAEG,oCACH,+B,eAEC,iBACA,gB,CAED,mBANkB,a,CAQnB,iB,WAEC,iBACA,gB,CAED,KACD,iBACC,KACD,yB,eAEE,iBACA,gB,CAED,S,MAEA,iBACA,gB,EAED,IACA,gB,6JASA,W,Q,0C,CAIA,kB,oC,0C,CAIA,0B,W,a,0C,C,oC,C,6B,0C,C,a,0C,C,wBAiBC,IACA,W,oCAEA,iBACC,wC,iD,oC,C,C,CAOE,YACJ,6HACA,qCACC,+C,uC,kC,CAIA,K,gBAEC,6B,MAEA,8BACA,8C,C,gC,8C,C,C,yD,kDAYE,yC,wBAEF,Y,CAFsB,W,CAKxB,a,4CAMA,wBACA,8BACC,qG,2FAEC,S,MAEA,I,C,CAGF,S,4CAMA,wBACA,8BACC,qG,2FAEC,S,MAEA,I,C,CAGF,S,oE,W,kBAiBE,Y,C,mBAIA,mB,CAED,a,C,kBAUA,qCACA,U,uNAEC,a,CAED,UACA,mH,CAGD,gCACA,U,uNAEC,a,C,cAGA,Y,CAED,eACA,qBACA,8H,izF,4F,4F,4F,O,mC,6I,qE,0C,uC,q1E,ia,+4J,wiB,yB,2B,87E,+sB,6oE,ia;wlC,uBC5ZC,8D,CAGD,iCACA,aACA,+BAEI,oCACH,uFADiC,W,CAG9B,yCACH,kHAD6B,W,CAG9B,S,0EAKK,iBACL,YACA,S,0NA+BK,O,kBAEJ,O,CAGD,gBACA,sGACA,8BAEC,qVAEA,wMACA,wMACA,uMACA,6LAEA,WACA,W,CAGD,iB,UAEC,O,CAGD,qH,UAEC,iI,CAGD,oNACA,oNAEA,KACA,WACC,mN,wBAEC,yH,CAEF,iB,wBAEE,yHACA,yH,C,C,4HAMG,OACL,wCACA,cACA,yB,seAYK,O,0C,gC,CAML,0C,OACK,IACA,oDACH,2KACA,qBAFoC,W,CAIrC,WACA,iB,aAEC,Y,CAED,wCACG,0M,O,gC,OAGH,S,OAID,0CACC,M,gBAEC,YACA,sE,CAED,4CACG,qS,O,gC,QAGH,WACA,iB,qBAIG,0CACH,kKADuB,W,CAGxB,iBACA,mBACA,Y,whBAKK,OAEL,8E,OACC,4DACA,0JACA,S,OAED,a,kNASA,oD,4EAKK,O,mBAEJ,2G,CAED,yG,8GASK,OACL,sF,sPAMK,OACL,IAGA,kOACC,W,CAGD,0CAEK,WACJ,gBAEA,0C,kB,6B,0D,CAKE,gCACA,M,CAED,uFAEA,WAEA,kOACC,W,C,uBAKA,IACA,iB,0DAGA,gB,kB,iE,C,+G,gE,CAWC,WAEA,kOACC,W,C,C,gBAKD,a,CAED,iCACA,M,CAED,yJ,6E,gE,C,KAOD,kGACA,KACA,WACC,sGAGA,sGAGA,uGAJD,iBACC,sGAGA,uGADD,iBACC,uG,CAED,iBACA,kB,C,4C,4IAWI,OACL,8BACA,Y,gIAIK,OACL,uCACA,qDACA,2B,kIAgGK,O,mBAGJ,2G,CAGD,gG,ouD,4F,4F,uF,uF,qD;g2GC/aA,mC,uBAEE,6DACA,S,C,G,wB,OAOD,yJ,CAED,O,+BAIA,2B,qBAEC,KACA,O,CAGD,oBACA,YACC,oB,WAEC,M,CAED,4EACA,wB,C,2B,oCCjCD,kB,kBAEC,c,CAED,QACA,yBACA,qCACI,oDACH,6BACA,4IAFiC,W,CAIlC,S,+JAeA,qCACC,W,Q,a,MAKC,Y,CAED,OACA,kB,kBAEC,wB,CAED,qC,CAED,kC,8JAIG,e,gBACF,a,iH,C,gCAIA,IACA,qCACA,WACA,K,8D,CAGD,I,iD,oGAKG,gB,gBACF,mB,iH,C,iBAIA,I,C,6C,qDAwBD,yCACA,iK,UAEE,0B,CAED,O,KAED,cACA,oB,sECzEA,MACA,0IACK,yC,yBAEF,mBACG,sE,OACF,4F,MAMA,2F,CAED,M,CAZsB,W,C,K,gfAiCzB,4F,iB,iC,CAKA,6FACA,8CAEA,6E,O,iC,CAIA,0FACI,yC,yB,mD,CAAoB,W,C,iC,gZCWE,U,kDC3E1B,IAIC,I,UAeA,S,CAED,yC,4B,QCjCC,uB,CAED,mB,oCAII,YACJ,KACA,gCACC,qJACA,WACA,2F,CAED,yFACA,8C,gCCyBI,yC,wBAEF,0B,CAFsB,W,CAKxB,iCACA,iBACA,oB,sHAyBK,O,qC,yGAQA,OACL,oG,+GCnBI,oB,sC,qGAgYJ,sB,sC,6B,CAMA,IACG,mF,sC,6B,C,U,qC,CAQH,mBACG,+G,sC,6B,C,gHAMF,Y,C,qE,8FC/ZG,YACJ,KAEA,2BACA,sB,sC,iC,CAOG,mI,sC,iC,C,+I,iFAWH,YACA,kDACC,mhB,iBAEC,SACA,M,CAED,wB,wCAEC,S,CAED,gCACI,kD,sBAEH,S,CAED,WACA,WACA,e,C,mD,smBC5DI,O,S,0C,CAML,yH,sC,iC,CAMI,uBAOJ,OAGA,uDACA,iGACA,kDACA,iG,wC,+5BAIK,O,kD,sB,CAML,sDACA,iGACA,kDACA,sD,2F,sB,CAMG,+L,O,a,OAGH,8B,qB,kaAaK,Y,0BAEJ,uE,cAEC,S,C,CAGF,0B,4HAGK,YACL,iE,kIAGK,YACL,mC,+GAcA,IACA,UACC,iBACD,iBACC,UACD,iBACC,UACD,gBACC,U,CAED,iB,sDAoBA,wBASA,Y,mEAOA,wBAIA,Y,8ECiCI,I,gBAEH,mB,MAEA,oB,CAED,0C,eAEC,Q,CAED,S,8DAgCA,8CACA,S,eAEC,Q,CAED,Y,sDAgGI,SACJ,qB,sCAEC,S,CAED,2BACA,K,eAEC,Q,CAED,S,4DAsCA,0B,eAEC,Q,CAED,S,0CAiDA,iBACA,O,2DAMA,2B,eAEC,Q,CAED,S,iEAgBA,kC,eAEC,Q,CAED,S,qEAMA,wC,eAEC,Q,CAED,S,uEA2BA,qyC,eAEC,Q,CAED,S,4DAgBA,2B,eAEC,Q,CAED,S,gEAMA,uC,eAEC,Q,CAED,S,kFAMI,I,gBAEH,mB,MAEA,oB,CAED,uDACA,S,eAEC,Q,CAED,Y,kFA8LI,SACJ,qB,sCAEC,S,CAED,+xCACA,K,eAEC,Q,CAED,S,gFA0HI,SACJ,qB,sCAEC,Y,CAED,uCACA,KACA,S,eAEC,Q,CAED,Y,6EAuBI,I,gBAEH,mB,MAEA,oB,CAED,kEACA,S,eAEC,Q,CAED,Y,8EAMI,I,gBAEH,mB,MAEA,oB,CAED,kEACA,S,eAEC,Q,CAED,Y,2EAMI,I,gBAEH,mB,MAEA,oB,CAED,+CACA,S,eAEC,Q,CAED,Y,4EAmFA,oDACA,2C,eAEC,Q,CAED,Y,yEAyJI,SACJ,qB,sCAEC,S,CAED,+xCACA,K,eAEC,Q,CAED,S,yEA8HI,I,gBAEH,mB,MAEA,oB,CAED,+CACA,S,eAEC,Q,CAED,Y,0EAMA,gEACA,I,eAEC,Q,CAED,Y,kDAMA,qB,eAEC,Q,CAED,S,k8E,4F,4F,4F,4F,kN,Q,Q,K,O,a,c,c,c,c,a,2lF,6C,S;gqCCj2CK,O,aAEJ,uD,CAED,c,qGAIK,O,cAEJ,wD,CAED,e,uGAUK,O,8CAEJ,uD,CAED,mB,qGAIK,O,mBAEJ,wD,CAED,oB,wGAIK,O,kBAEJ,uD,CAED,2C,wGAIK,O,0BAEJ,wD,CAED,2C,2GASK,OACL,2B,gBAEC,wD,C,mGAKI,OACL,U,mGAIK,O,uBAEJ,wD,C,waCzDI,U,cAEJ,O,C,eAGA,kD,CAED,gBACA,wDACC,iBACA,e,aAED,sF;2iGC1BA,+D,gDAIA,kC,4CAIA,sC,oDAIA,IAGA,iBACC,mCACD,4BACC,SACD,8B,UAEE,S,CAED,S,CAGD,YACC,S,WAEC,M,CAED,WACA,+B,CAED,S,mECtBK,O,8FAEJ,S,CAED,8H,iGAOK,OAA0B,gC,0IAE1B,O,kB,oC,C,8F,gC,CAOL,cACA,gDACA,wEACA,Y,4IAGK,O,yC,0E,C,wF,gC,CAQL,8C,gBAEC,Q,CAED,Y,iJAGK,OACL,c,8F,gC,CAIA,kCACA,wEACA,Y,uHAGK,OACL,c,kDAEC,kE,CAED,wEACA,iB,2KAGK,O,8FAEJ,c,0C,CAGD,0DACG,kC,UACF,wE,mD,CAGD,qEACA,wEACA,c,iHAGK,O,iBAEJ,+E,CAED,6BACA,cACA,iB,8HAIK,OACL,cACI,kBACJ,IACA,UACC,IACD,gBACC,oDACD,gBACC,yE,MAEA,qE,C,yCAGA,wE,CAED,MACA,oB,8ZAIK,OACL,c,8F,kD,CAIA,iCACA,kH,eAEC,yE,CAED,wEACA,kB,sDAEC,kB,CAED,Y,mSAKkC,uC,8E,6EC7HjC,+D,C,4GAIA,iL,CAGD,OACI,0C,yGAEF,uB,C,oHAGA,Q,CAL2B,W,C,MAU5B,YACA,4CACC,gF,KAIG,gDACH,qGACA,gHACA,qEAHiC,W,CAKlC,4B,CAGD,YAGI,gDACH,qGACA,kGACA,6FAHiC,W,CAKlC,4B,oPAIK,OACL,qG,sdAIK,O,gI,uUAwDA,O,W,mBAGH,UACA,a,CAED,O,C,qBAKI,IACJ,wD,kDAEE,M,CAFuC,W,C,wBAMxC,iC,gBAKI,S,wBAEH,S,MAEA,sD,CAKD,mCACA,mCACA,+MACA,wMACA,YACA,cACA,4B,MAGA,sDAIA,iCACA,SACA,4B,C,8BAID,qG,8GAEC,kI,CAED,+H,MAEA,WACA,wCACA,qB,C,6JAII,OAGL,IACA,SACA,IACA,wC,mCAEE,aACA,UACA,IACA,O,C,WAIA,M,C,wBAGA,qG,yBAEC,M,CAED,mGACA,iBACA,W,2CAEA,yBACA,+BACA,S,MAEA,M,C,CAGF,c,+HAeA,0DAEI,0CACH,uFACI,yCACH,qGADyB,W,CAFE,W,CAO7B,qHACC,oC,KAGG,IACJ,yH,UAEE,wG,MAEA,mFACA,iB,C,KAIF,wCAEI,0CACH,kNAD4B,W,CAG7B,S,uDAMK,OACL,iCACA,4B,6DAIK,OACL,iCACA,2B,qOAWK,iBACL,2H,0OAIA,sC,OAEC,6C,CAED,S,gPAGK,OACL,8BACA,mMACA,4B,opBAGK,OACL,OACI,gBACA,QACA,6CAEH,0E,OACC,0G,sIAEC,WACA,c,C,OAKF,kDACA,aACA,mC,OACC,+HACA,W,sCAEC,Y,CAED,yHACA,W,sCAEC,Y,CAED,WACA,IACA,c,OAED,W,qBAED,oD,OACC,wIACA,W,QAED,Y,mZAYA,0B,+DAGK,OACD,SACJ,oBACA,YACC,gC,WAEC,M,CAED,OACA,0CACA,0BACA,wC,C,OAGA,S,CAED,iCACA,yB,mbAGK,OACL,OACI,gBACJ,OACC,gC,WAEC,c,CAED,sIACA,W,sCAEC,Y,CAED,sHACA,W,sCAEC,Y,CAED,wC,qBAED,6HACA,WACA,Y,kWAQK,YACD,SACA,yCACH,kB,6F,eAGE,4B,CAED,qK,CANsB,W,C,eAUvB,S,CAED,yB,8dAGK,YAEL,Q,eAEC,W,CAED,mBAEA,wCACC,mBACA,iBACA,wJACC,qK,KAED,yHACA,W,sC,4B,C,qB,oC,mZAcI,YACL,WACA,QACI,yCACH,kB,gGAEC,OAEA,wG,CALsB,W,C,OASvB,S,CAED,mBACA,IACI,yCACH,kB,gGAEC,gGACA,iB,MAEA,gFACA,iB,CAPsB,W,CAUxB,yB,wgBAGK,YACL,OACA,IACI,4CACH,kBACA,0H,OAFuB,W,c,OAKvB,4C,OACC,+HACA,W,sC,4B,C,OAKD,SACA,wLACA,W,sC,4B,CAduB,W,qBAmBxB,oD,OACK,IACJ,wIACA,W,QAED,Y,8aCpdA,kDAKA,gBAIA,wDACC,8F,KAKG,kCACH,gHADqB,W,CAOtB,IACI,mC,gCAEF,S,CAGD,0HALsB,W,CAQnB,kCACH,gC,yDAGC,mI,CAJoB,W,CAQtB,S,sCAIA,iD,qFAEE,M,CAF8B,W,CAKhC,S,2DAKK,OACL,wBACA,qCAEC,wBACA,4EACC,WACA,W,C,QAGA,c,CAED,8N,CAED,S,yF,QAKC,S,CAED,S,kD,UCxGC,c,CAED,yB,cAEC,I,CAED,mBACI,IACA,IACJ,gBACA,qCACC,qD,cAEC,oG,MAEA,6G,CAED,WAPc,W,C,eAWd,oG,CAED,S,gCA2FA,iB,iDAKA,kB,oDAKA,kB,+DAiFA,UACC,yB,MAEA,2E,UAEE,S,C,S,CAIH,S,oE,eAOC,2EACC,uE,UAEE,S,C,S,S,CAKJ,S,mE,UAmCC,c,C,WAGA,e,C,QAGA,c,CAED,kBACA,IACA,mBACA,IACI,oE,gFAEF,6GACA,WACA,gBACA,yB,CAL4C,W,CAQ9C,oGACA,+B,oCAU4C,mB,+CAiBR,oB,4D,kBA2DnC,S,C,kBAGA,oF,CAED,iCACI,0CACH,qGADuB,W,CAIxB,mBACA,+FACA,kJACC,uCACA,uC,KAED,yB,6CAKA,uD,kDAKA,mE,mUAUA,WACA,IAGI,SAEJ,8EACC,sF,e,UAGE,sB,CAED,mBACA,kC,C,SAGA,I,WAEC,e,C,eAIA,gBACA,mBACA,+BACA,I,CAED,0C,C,6B,eAID,S,CAED,wC,oYAkB+B,sG,wUAwE/B,+F,WAEC,S,CAED,sB,6WAMA,+F,+BAEC,8CACA,W,MAEA,W,CAED,wB,0WAMA,mL,8UAMA,mG,uXAaA,IACA,wCACC,IACA,uB,WAEC,qD,CAED,yH,OACC,S,OAED,W,qBAED,S,wYAOI,4CACH,2DACA,WACA,yH,OACC,S,O,qBAGF,S,8UAqCA,sG,mJ,YAOC,6B,CAED,S,mD,YAOC,6C,CAED,S,2E,mBAWC,S,CAIE,S,UACF,S,mBAEA,I,CAID,+DACA,IACA,IACI,kCACH,I,iB,QAGE,8CACA,W,C,MAGD,6B,CAED,sDACA,uCACA,gBAZkB,W,CAcnB,oDACA,wC,o7H,4F,4F,4F,4F;0/ECxrBI,oC,gCAcJ,sBACA,0BACA,oBACA,oB,uBAEC,cACA,O,CAED,gCACA,yF,wBAIA,wF,0DAIA,M,oJ,6B,iBCiEC,a,CAED,kBACA,qB,ySAMI,yCACI,2BACP,W,wD,4D,2E,C,8B,2E,C,CAUA,iB,uB,oC,2D,2E,C,8B,6E,C,C,oC,gF,C,CAeA,iB,+E,2L,CAKA,iB,sD,iF,C,iFAMA,iB,yD,iF,C,iFAMA,iB,sD,iF,CAKA,iB,iFAGA,iB,iFAGA,iB,iFAGA,iB,sD,iF,CAKA,kB,uD,iF,CAKA,iB,4D,gF,C,8D,gF,C,0D,gF,C,2D,gF,C,wD,gF,CAiBA,iB,4D,gF,C,8D,gF,C,0D,gF,C,2D,gF,CAcA,iB,sFAEE,0BACA,UACA,+DACC,a,C,cAIA,M,gCAEC,M,CAED,sC,0E,C,C,CAhHyB,W,C,6C,qCAgLzB,yCACH,kBACA,kB,eAGC,eACA,e,4BAEC,a,C,CARsB,W,CAYzB,Y,uCAIA,yI,qDAEE,0C,C,KAGF,gB,gDAOA,U,QAEC,gBACA,W,CAIG,YACJ,KACA,gCACC,WACA,yFACA,0GACA,I,CAED,WACA,yFAGI,wCACH,gBADiC,W,CAIlC,8C,gEAQA,Q,gEAEC,uBACA,iB,CAED,6BACA,2C,iD,6B,C,MAKC,K,C,oC,oDAQD,IACI,YACA,kCACH,WACA,qJACA,2F,C,QAIA,I,C,MAGA,oHACC,W,C,UAGA,S,C,CAGF,gBACA,gD,uNAKK,kBACL,0I,6aAmBK,kBAED,SACJ,iB,SAEK,YACJ,2B,MAEA,qB,CAED,qGACA,yB,2zBAKK,kBAEJ,iHAEA,KACA,IACA,IACA,KACA,IACA,IAGD,oCACC,4B,cAEC,oB,C,UAGA,M,CAED,I,0BAIC,sC,C,0BAKA,iC,CAGD,WACA,+BACC,K,SAEC,O,CAED,8EACD,mBACC,YACD,mBACC,oDACD,mBACC,sBACA,qBACD,mBACC,iBACD,mBACC,iBACD,mBACC,wDACD,mBACC,0BACA,qBACD,mBACC,YACD,mB,SAEE,gB,CAED,YACD,mBACC,YACD,mBACC,YACD,mBAEC,qE,WAEC,M,CAED,aACD,mBAEC,qE,WAEC,M,CAED,aACD,mBACC,YACD,mBACC,YACD,mBACC,YACD,mBACC,YACD,mB,UAEE,uB,MAEA,uB,CAEF,mB,UAEE,uB,MAEA,uB,CAEF,iF,sDAIE,gBACA,M,CAED,+FACA,K,SAEC,gBACA,OACA,O,MAEA,gB,CAED,uG,2CAEC,gB,CAED,6E,2C,uBAKE,gB,CAED,6E,CAGF,kB,cAEE,oBACA,M,CAID,+F,SAEC,gBACA,O,MAEA,gB,CAED,uGACA,6EACD,2BACC,qD,E,CAGF,S,khBAeA,kB,+CAIK,O,mBAEJ,gH,CAMD,4C,2F,gBAOC,a,CAED,kBACA,oB,gC,aAQC,e,C,a,MAIC,e,CAED,oE,CAED,kH,4BAIA,6DACC,iB,CAED,S,gCAMA,qC,yB,0CAGG,a,CAED,QACA,QACA,S,C,2DAGA,a,CAED,iBACA,iB,CAED,oB,8MA0CA,kH,uvDAaA,gBACA,KACA,QACA,QAIC,IACA,IACA,IACA,IACA,IACA,IACA,IACA,UACA,MACA,MAID,YACK,aACJ,mCACA,kDACA,6B,uCAEC,qE,C,W,sBAIC,qF,CAED,M,CAED,KACI,MACJ,YACA,+B,eAEE,MACA,M,CAED,iDACA,2B,UAEC,c,MAEA,c,CAEF,mB,yBAEE,MACA,M,CAED,iDACA,2BACD,mBACC,mCACD,mBACC,mCACD,6BACC,2C,eAEC,U,CAEF,mBAEC,2BACD,mBACC,2BACD,uC,mDAEE,iB,CAED,2C,cAEC,Q,CAEF,mBACC,wC,eAEC,S,CAEF,6BACC,2C,cAEC,S,CAEF,6BACC,2C,eAEC,W,CAEF,6BACC,2C,eAEC,W,C,iDAKA,iBACA,c,yBAGC,M,CAGD,KACA,gDAA2C,a,CAE3C,qCACA,kB,CAEF,mB,eAEE,MACA,M,CAED,iDACA,MACA,cACC,OACD,oBACC,O,MAEA,M,CAEF,mB,eAEE,MACA,M,CAED,iDACA,MACA,cACC,OACD,oBACC,O,MAEA,M,CAEF,0F,gEAEE,iBACA,YACA,M,CAEG,gD,yB,eAGF,MACA,M,C,8BAGA,MACA,M,CAED,mH,kB,eAGC,MACA,M,CAED,uG,+B,eAGC,MACA,M,C,yDAGA,MACA,M,CAED,+H,+B,eAGC,MACA,M,CAED,+H,M,eAGC,MACA,M,CAED,mH,CAEG,iCACJ,4B,oCAEC,4B,C,oCAGA,4B,CAED,sCACA,oBACA,YACA,kBACC,O,MAEA,M,CAEF,kB,0CAGE,YACA,iBACA,M,CAED,2B,QAEC,MACA,M,CAED,mDAED,kBAGC,sB,gBAEC,MACA,M,CAED,qCACA,kBAED,kB,kFAGE,M,CAID,KACA,6GACC,a,CAED,0CACA,yB,E,cAGA,yF,C,uCAGA,qE,C,C,YAID,Y,sBAEA,I,CAGD,gD,OACC,iI,OAGD,8C,OACC,mIACA,qFAIA,4K,kCAEC,SACA,qB,CAID,iBACA,qB,OAGD,4C,OACC,qIAGA,qL,OAEC,qFACA,SACA,qB,C,2CAKA,gCACA,gB,CAED,iBACA,qB,OAID,kI,qwC,e,gC,C,wE,+B,C,6BAuBC,Q,+B,CAIG,IACA,kC,gBAEF,M,CAEE,kB,eACF,M,CAL0B,W,CAQ5B,IACA,+B,gCAEA,gB,yB,+B,CAIA,gB,yB,+B,CAIA,gB,mC,C,oC,sCAUA,iB,iBAEC,S,CAED,kB,6BAEC,S,CAED,0C,sCAEC,S,C,WAGA,+B,C,sHAGA,S,CAED,kC,iE,8BAKC,KACA,c,CAEE,qC,sCACF,c,C,uBAGA,sBACA,c,CAKD,UACI,kCACH,YAD4B,W,CAG7B,c,iGAOA,IACA,qCACC,kB,eAEC,M,C,kE,sD,CAMD,iI,yC,sD,CATiB,W,C,2D,4FAoClB,IACI,kBACJ,Q,cAIC,kB,uBAEC,SACA,iB,C,C,YAKD,8B,C,WAGA,uD,CAED,oCAEE,4CACA,IAGG,Y,wEAIH,uD,CAGD,WACA,6B,sCAEC,uD,CAED,oBAGA,Q,sCAEC,iBACA,WACA,6B,sCAEC,uD,CAEG,8CACH,SAD4B,W,CAG7B,oB,C,WAIA,uD,CAID,KACA,sCACC,oB,8BAEC,M,CAHgB,a,C,WAOjB,+D,CAED,qBACA,kBACA,oG,QAEC,sE,C,qHAIA,uD,CAED,iB,yCAIC,kG,yCAGC,uD,C,CAGF,qD,yCAGC,uD,C,C,MAKD,+B,CAED,yC,gFClrCmB,eAAd,kBACL,qJ,sHAIoB,eAAf,kBACL,qJ,mHAQmB,eAAd,kBACL,gF,yGAqCK,YAA2B,sF,2HA0B3B,YAA6B,2E,iIAyG7B,kBACL,wD,kXAKK,kBACL,QAEA,oD,OACC,yF,OAED,sDACA,2C,OACC,wM,OACC,iF,qBAEA,oGACA,gE,O,OAGF,sF,olBAKK,kBACL,QACA,oD,OACC,yF,OAGD,sDACA,2C,OACC,wM,OACC,mBACA,qB,qBAEA,6G,OAED,gE,qBAEA,Q,OAED,kFACA,c,0gBAIK,kBACL,mHACA,c,8aAIK,kBACL,sGACA,S,iaAIK,kBACL,qGACA,S,kaAIK,kBACL,qGACA,S,uZAIK,kBACL,iL,2NAMA,2EACA,8G,8VAOK,kBACL,0HACA,oKAgBA,uGAMA,iF,eAEC,W,C,UAMA,WACA,K,8BAKC,W,C,C,yBAQE,gF,eACF,WACA,I,C,CAIF,Y,qiBAIK,kB,+M,mQAML,gDACA,0FACA,qBACA,wFACA,mBACA,c,8NAIK,kBACL,+N,kZAIK,kBACL,4N,+YAIK,kBACL,sI,qOAKK,kBACL,kB,6SAKK,kBACL,sGACA,c,4PAsCK,OAED,YACJ,KAEA,8BACA,uC,MAEC,gC,C,kDAMI,IACJ,WACA,uEACA,WAEA,8BACC,UACD,kDAEC,IACA,uEACD,qDAEC,IAEA,WACA,+C,MAGA,IACA,uE,CAED,iDACA,iC,MAEA,WACA,uEAEA,iDAGA,gEACA,sC,yCAIC,WACA,uEACA,gEACA,sC,yCAKC,WACA,uEACA,iC,C,C,C,MAMF,WACA,sE,CAGD,8C,kJASA,YACA,QACI,kCACH,mCACA,kC,MAEC,WACA,qH,CAED,sCAPqB,W,C,MAUrB,WACA,wF,C,4B,kCAQD,Y,8BAEC,WACA,wF,MAEA,+DACC,WACA,oJACA,sC,C,CAGF,S,iDAIK,OAAkC,kC,kIAYlC,OACL,uCACA,sCACA,yC,0HAIK,OACL,wCACA,uCACA,0D,wHAIK,OACL,wCACA,uCACA,yD,uIAIK,kBACL,gIACA,2F,kBAEC,4EACA,oB,cAEA,4EACA,oB,CAED,SACA,S,mHAOiB,eAAZ,kBACL,+LAGA,sBACC,SACD,sBACC,6B,MAEA,qC,C,yYAkBI,kBACL,+GACA,gHACA,4I,8jBAeK,kB,0N,gUAOL,uCAGA,wCACA,+BACA,iFAMA,uCACA,wEACA,8EACA,gFAKA,sCACA,4EACA,+EAMA,qCACA,wEACA,mDACA,8EAEA,4HACA,c,OAGC,gB,CAGD,I,UAIC,SAEC,WACD,iBAEC,IACA,KACA,gB,C,CAMF,mGACA,4FACI,K,UAEH,WACA,M,MAEA,6E,CAGD,WACA,iBACA,gB,+BAkCA,oBACA,yE,yDAIK,kBACL,eACA,S,oGAIK,kBACL,iBACA,S,wGAMK,kB,eAEJ,iE,CAED,QACA,S,yGAIK,kBACL,Q,eAEC,W,CAED,S,iUAKK,kBACL,iKACA,Y,uPAKK,kBACL,0D,+GAOK,kBACL,kK,mVAMK,kBACD,IAEJ,mD,OACC,K,qBAEA,iG,2EAEC,8E,CAED,0F,gCAEC,mE,CAED,c,OAGD,ydAkBA,oB,ipBAIK,OACL,I,kBAEC,8C,C,2FAIA,0D,C,wBAIA,qD,CAGD,iBACA,stCAGA,iBACA,iXAEA,iBACA,4MAEA,yC,OACC,S,qBACS,mN,OACT,iB,qBAEA,e,O,OAGD,iB,4jBAQK,kBACL,wG,8ZAIK,OACL,2G,ibAKK,kBACF,yI,OAGF,yE,OAED,6K,odAKK,OAEL,8JACA,S,2cAKK,kBACF,yI,OACF,yE,OAED,yK,odAKK,OAEL,0JACA,S,uQ,yFAUC,2CACA,kDACA,mF,yCAEC,yEACA,gE,C,CAGF,gH,+CAIA,0N,4D,QAQC,sGACA,WACA,kB,C,SAGA,uFACA,WACA,kB,C,4B,qqB,eAuBA,8D,CAID,cACA,2BACA,cAGA,mCACA,2BACA,2BACA,2BAEA,iGAKA,qCACA,iFACA,mCAGA,qCACA,iFACA,sFAGA,mCACA,+EACA,qFAGA,IACA,oFAGA,0J,gBAEC,wE,CAID,+EAGA,mCACA,wGAEA,yFAMA,gIACA,6C,OACQ,oPACP,OACC,4I,cACD,OACC,8G,OAED,uE,OAGD,uE,0gBAKK,kB,0CAEJ,S,CAED,iBACA,uC,yHAMK,kB,0CAEJ,S,CAED,iB,oGAEC,uC,CAED,oD,qNAMQ,eACR,QACA,S,mDAGC,OACA,6CACA,K,QAEC,oBACA,4E,C,CAMF,2JACC,qIACA,gHAGD,4EACC,sEACA,qEACA,6I,MAQA,4CACA,gEACA,4BACA,uBACA,sFACA,oE,gEAEC,wE,CAED,0F,gEAEC,wE,CAKD,+BACA,uFACC,wB,CAED,oBACA,YACC,I,wKAGC,IACA,oE,gEAEC,wE,CAED,0D,C,2GAGA,M,CAED,6BACA,wHACA,6B,CAED,2B,C,oCAUA,aACA,wC,CAED,Y,2MC7mCK,O,eAEJ,U,CAED,wC,OACC,2F,OAED,S,wXAKK,OACL,mG,qNAMA,iLAOA,qGACA,S,+gBAUK,OACL,yF,uBAGC,QACA,IACA,QACA,4BACA,oCACA,kB,CAGE,c,iKACF,SACA,WACA,UACA,eACA,aACA,kB,C,8KAIA,wHACA,SACA,WACA,UACA,4B,mBAEC,8F,MAEA,oC,CAED,kB,CAKD,OACA,oCACA,KACA,aACA,uCACC,+GACA,gG,6DAEC,KACA,M,MAEA,M,C,CAGF,2MACA,UACA,YACA,WACA,+FAEA,kB,wbAkBK,O,uBAGJ,S,C,yNAKI,wI,2GAEF,S,CAFyC,W,C,CAQ5C,uD,2GAEE,S,C,KAKF,S,0IAKK,OACL,mJ,gBAEE,Y,C,KAGF,a,+kBAMK,OACL,yFAQA,0DACC,kGACA,4C,OACC,qL,e,+C,C,O,yBAQF,6DACC,0G,gB,8D,C,MAOD,c,08L,4F,4F,4F,4F,4F,kM,qD,mF,sD,0F,gI,iC,gC,6B,+I,wG,6S,+E,0E,Y,c,8G,4C;qnFCjPA,iB,8BAIG,kB,qBACF,SACA,oDACI,2DACH,+IADgC,W,C,C,0BAKjC,wB,C,wB,kHCJI,O,4BAGJ,sCAEA,uC,CAED,iBAEA,I,SAEC,MACA,K,CAGD,qBACA,qC,mBAGE,SACI,YACJ,mE,sC,6C,C,cAKC,M,C,CAKE,gBACJ,yEACA,qBACA,W,C,0B,gC,C,oC,6WC2DI,O,e,+C,C,wH,wTAmBA,O,e,+C,C,8C,8RCxGA,OAA+B,yH,kYAQ/B,OAAkC,mH,8M,mCAOtC,iB,CAED,uB,oDAcA,a,uDCjCA,IACA,sBACC,aACD,6CACC,QACD,6CACC,Q,CAED,kF,8CCaK,OAAyB,mB,6QAuCzB,OACL,kI,mQAMK,O,e,0C,CAIL,0B,QAEC,I,C,yD,gC,C,sCAMA,kC,C,4B,oJASI,O,e,0C,CAIL,sCACC,6B,4C,gC,C,sCAKC,kCACA,M,CAED,WACA,iBACA,gE,CAED,Y,mJAMK,O,e,0C,CAIL,2B,QAEC,I,C,uBAGA,kB,CAGD,Q,sCAGC,mC,C,4B,mJAQI,O,e,0C,CAIL,sCACC,8B,sCAEC,mCACA,M,CAED,WACA,iBACA,gE,CAED,Y,4KAOK,O,e,wD,CAIL,4B,6FAEC,kB,C,sC,wE,C,oC,+IAUI,O,e,0C,C,+D,wHAoCA,O,eAEJ,uB,CAEE,sB,sCACF,wC,CAED,iB,qFAQA,iB,6C,QAyBC,I,CAED,Y,wGChPA,mC,+BAEC,iB,C,+BAGA,iB,C,+BAGA,gB,CAGD,S,kCAOG,mB,sCACF,8B,CAED,iB,kEAKK,O,eAEJ,uB,CAEE,4B,sCACF,wC,CAED,iB,mHAyBK,O,eAEJ,uB,CAEE,0B,sCACF,wC,CAED,iB,sHAMK,O,eAEJ,uB,CAEE,2B,sCACF,2C,CAED,iB,iHAMK,O,eAEJ,uB,CAEE,qB,sCACF,qB,CAED,iB,mGCnFK,O,eAEJ,kB,CAED,sB,uFAKA,S,QAEC,c,CAED,uCACA,uDACA,S,gD,yC,yJAaE,K,C,MAGD,mJ,C,gDAcD,Q,uDAEI,e,UACF,O,C,CAIF,2C,sCAEC,qC,C,MAKA,Q,C,QAMA,iB,CAGD,gC,gEAKK,O,eAEJ,uB,CAED,sB,4GAGK,O,uBAEJ,uB,CAEG,YACD,gB,sCACF,8B,CAED,QAGA,4BACA,S,2GAKK,O,eAEJ,kC,CAEG,6TACJ,uB,sCAEC,kD,CAED,oC,uFAMI,6TACJ,c,sCAEC,wC,CAED,0B,6CAQI,6TACJ,e,sCAEC,yC,CAED,0B,4YAGK,OACL,c,WAEC,M,CAED,kCACA,6BACA,wIACC,2G,UAIC,kB,C,sC,4B,CAKD,e,yB,4B,+WAgBI,O,+BAEJ,4B,C,gE,uIAQI,O,+BAEJ,4B,C,mE,mJAOI,OACL,YACC,I,+BAEC,4B,CAED,qDACA,W,0DAMC,iBACA,S,C,qEAIA,iBACA,S,C,4B,C,0IASG,O,+BAEJ,4B,C,oE,0JASI,O,kD,2FA+CL,gBAEA,sDACC,mBAD8B,W,CAI3B,W,+B,yBAEF,wBACA,M,CAHe,W,CAOjB,S,yBC3TA,M,4BAIA,8C,4BCEA,c,iDCMA,c,4B,UA8BC,I,CAED,U,iDCnCA,8DAMA,gCACA,qBACA,yBACC,+BACD,mBACC,+BACD,oBACC,iCACD,mBACC,+BACD,oBACC,gCACD,oBAEA,oBACC,+B,C,iCAGA,8B,C,iCAGA,8B,C,gCAGA,8B,CAED,S,4BAGmB,uBACnB,4B,uCCvCA,2C,sCAEC,O,CAEG,IACJ,oE,8BAEE,iB,C,S,2DAMD,Q,C,wEC8BI,YAED,YACJ,IACA,wF,iEAEE,gFACA,W,C,S,UAID,sEACA,W,CAGD,qF,gEAEE,gF,MAEA,sE,CAED,W,SAED,gD,0HAKK,YACL,oC,4HAKK,YACL,+B,+HAIK,YACL,kB,yHAGK,OAA8B,c,sGAC9B,OAA8B,gC,uGCjF9B,OAAoC,c,qGACpC,OAAoC,c,wGACpC,OAAoC,iB,0GACpC,OAAoC,a,6qJ,4F,4F,4F,4F,4F,4F,4F,sH,0C,8C,2C,8C,yC,0C,6C,6C,2BCLJ,Y,G,M,I,K,K;+8SCHrC,6B,GACA,sLACA,wJACA,mKACA,kNACA,2MACA,sNACA,yMACA,8OACA,yMACA,2MACA,2MACA,0JACA,mKAEA,OACA,oC,0PAIA,iB,6H,+BAKC,qIAKA,aACA,kBAEA,kB,6EAEC,uCACA,yDACC,UACA,UACA,6N,MAOD,wDAKA,0B,CAGD,aACA,YACC,gIAID,kBACC,K,oBAEC,K,C,oBAGA,K,CAED,qGAID,kBACC,aACA,uCACA,yDACC,qG,MAED,cACA,uCACA,yDACC,qG,MAED,sDAMD,kBACC,cACA,uCACA,yDACC,UACA,+I,MAMD,mCAID,kBACC,oIAID,kBACC,4FAGD,kBACC,4FAGD,kBACC,aACA,uCACA,yDACC,UACA,kK,MAQD,mC,C,CAOF,sB,mCAIA,eACA,Y,qDAMI,kBACJ,UACA,U,YAEC,c,CAED,0F,QAEC,kEACA,gG,CAED,U,6BAIA,wB,kDAIA,gBACI,uDACH,qCACA,0DAFgC,a,C,uUAOjC,oGACA,ia,OACC,uI,OAED,mL,ybAIA,6I,OACC,2D,O,SAGA,uD,C,SAGA,uD,C,UAGA,oD,CAGD,gQAAgH,wM,2M,6K,OAK/G,sE,C,oCAGA,iB,CAED,yB,uN,oCAKC,8B,CAED,2H,mKAoCK,QACL,0B,sFAIA,4B,wNAIA,iH,gJAIA,aACA,YACC,wBACD,kBACC,oB,MAEA,mD,C,4QAKD,oGACA,SACA,aACA,WACC,2BACD,iBACC,2BACD,yBACC,sBACD,iBACC,sCACD,iBACC,4BACD,iBACC,4BACD,mCACC,uBACD,kBACC,Y,CAED,6D,4LAoCA,mB,sC,mC,0CAgBA,M,2BAEC,a,CAED,gDACA,c,mDAIA,sBACA,gC,mBAEC,S,CAED,8C,2UAIA,+BACA,aACA,aACA,qI,OACC,gBACA,YACA,M,OAED,yBACA,QACA,QACA,gC,4PAIA,sBACA,oC,oCAWA,qC,0PAIA,MACA,iBACA,gW,0KAIA,MACA,iB,8BAIA,mC,6YAGc,MACV,eACJ,oD,OACC,oH,OAGG,QACG,kSACP,OACC,gB,eACD,OACC,yBACA,sBACA,sBACA,0BACA,iC,eACD,OACC,uO,QACC,qK,QACC,MACA,e,QAED,gBACA,gNACA,e,QAED,+B,eACD,OACC,oBACA,Y,eACD,OACC,U,uBAEA,yC,QAED,yP,kfAGc,MAAL,MACT,0B,+BAEC,sC,C,YAGA,mC,CAED,iCAEA,0B,+BAEC,sC,CAED,iCAEA,iIAEA,e,YAEC,gC,CAGD,e,YAEC,gC,CAGD,uC,6PAG8B,MAC1B,M,uBAEH,mB,iCAEC,qE,CAED,8G,2BAEC,4D,CAED,yC,qBAEC,wE,CAGD,UACA,kB,MAGA,kC,8CAEC,qE,CAED,8G,2BAEC,4D,CAED,WACA,wD,CAED,e,cAEC,sB,CAED,gCACA,iB,yNAGmB,M,gBAElB,gD,C,oCAGA,6G,CAED,8D,OACC,2G,O,cAIA,mC,CAED,mB,wJAIA,Y,yBAIA,gB,yRAG+B,M,4BAE9B,+E,CAGD,4CACA,kB,cAEC,4B,CAED,8DACC,8C,aAED,0J,wMAGK,QACL,aACA,yDACC,Y,MAEA,a,C,gVAII,QACL,8HACA,OACC,aACD,OACC,mHACD,OACK,mDACH,+O,OACC,a,OAF4B,a,qB,OAM/B,Y,wWAGK,Q,8CAEJ,0D,CAED,8G,wBAEC,uB,CAED,M,2BAEC,6BACA,iB,CAED,UACA,WACA,wDACA,0CACC,oFACA,+E,IAED,6BACA,YACA,U,yHAGK,Q,+CAEJ,c,C,gCAGA,iB,qDAEC,iBACA,sCACC,oCACD,2BACC,qCACD,kB,4BAEE,iBACA,M,CAED,6BACA,sBACA,sBACA,0BACA,M,E,CAGF,U,CAED,c,27BAKK,QACL,UAEC,KACA,Q,iCAGA,kDACA,e,cAEC,sB,C,MAGD,eACA,a,C,WAIA,gE,CAGD,oBACA,c,O,qBAGE,mE,C,kBAGA,uE,C,kBAGA,wE,C,M,oBAIA,a,C,kBAGA,kE,C,oCAGA,mE,C,CAGF,iJ,kBAEE,iE,C,MAGE,wCACA,yQ,OACF,4P,OAFiB,a,qBAKnB,sD,OAEC,oBACA,6GACA,2GACI,0CACH,4GACG,4J,QACF,wQ,QAED,gMALkB,a,uBAOnB,MACA,4BACA,kCACA,8F,OAGD,c,yBAEC,gE,CAED,eAEA,kCACA,4JACC,yc,4BAED,uKAEA,2EACA,QACC,cACD,QACC,mJ,QAEA,qBACA,8DACC,wN,4BAED,U,Q,kvBAII,QACL,0BACA,MACA,YACC,oBACD,2BACC,2C,CAED,2C,yF,6BAOC,sB,CAED,U,oC,6BAKC,iB,CAED,U,+SAGK,QACE,oGACP,OACC,e,mBAEC,8B,CAED,qBACA,2HAED,O,eAEE,8B,CAED,eACA,mBACA,2CACA,mCACA,6C,OAGA,4C,O,iqBAII,QACL,2BACA,mB,gCAEC,yD,CAGD,sDACA,6GACA,aAEA,qB,2BAEC,iB,CAED,iCAEG,8K,OACC,mE,OACF,eACC,oGACA,6C,OACC,yBACA,+FACuC,iE,+EACC,6D,0B,OAGzC,sD,QACC,oG,Q,qB,O,OAMJ,aACA,0G,QACC,4FACuC,oD,yEACC,gD,uB,QAGzC,uJ,iWAIA,qCAEC,KACA,iEACC,a,CAED,oB,YAEC,M,CAKD,KACA,8HACC,a,C,0FAGA,M,CAED,sBACA,2BAGA,KACA,oE,2BAEE,a,CAED,a,C,kBAGA,M,CAED,6BACA,2B,cAGC,0BACA,U,C,CAGF,S,8cAGK,QACE,+HACP,OACC,mB,+BAEC,yD,CAED,cACA,qBACA,iCAEA,aACA,wG,OACC,kGACuC,8B,qFACC,0B,6B,OAGzC,+HAED,OACC,e,+CAEC,yD,CAED,mBACA,cACA,gCACA,iCAEA,4CACA,gBACA,yG,OACC,kGACuC,8B,qFACC,0B,6B,QAGzC,iIAED,OACC,iB,8BAEC,0D,CAED,8BACA,2BACA,wI,OAGA,6C,O,2YAII,QACL,4D,+HAGK,QACE,gCACP,qBACC,mCACD,kBACC,8BACD,kBACC,2CACD,kBACC,2BACD,kBACC,+B,MAEA,6C,C,6GAII,QACE,gCACP,qBACC,qCACD,kBACC,yCACD,kBACC,gDACD,kBACC,4C,MAEA,2C,C,6GAII,QACE,gCACP,uC,eAEE,S,CAED,mBACD,kB,eAEE,S,CAED,SACD,kB,eAEE,S,CAED,0B,MAEA,+C,C,6TAIiB,MAAb,QACL,mCACA,iCACA,4HACA,6D,OACC,gHACA,OACC,+B,cACD,OACC,+G,cACD,OACC,wB,qBAEA,yB,OAED,O,OAED,c,oRAGK,QACL,mCACA,2BACA,iB,mEAEC,sE,CAED,6BACA,sBACA,sBACA,gBACA,gB,2HAGK,QACL,mCACA,2BACA,iB,0CAEC,oE,CAED,6BACA,sBACA,cACA,0BACA,gB,wZAGK,QAEJ,KACA,aACA,QAEM,+HACP,O,4BAEE,yE,CAED,mBACA,eACA,cACA,2B,cAED,OACC,UACA,eACA,8B,cAED,OACC,iB,8BAEC,6E,CAED,gI,OAGA,6C,O,uBAIA,sE,CAGD,uI,umBAGK,QAEJ,KACA,aACA,QAEM,gCACP,Y,4BAEE,yE,CAED,mBACA,eACA,cACA,2BAED,kBACC,UACA,eACA,8B,MAGA,8C,C,8BAIA,uE,CAGD,0I,sUAGK,QACL,2BACA,iCACA,oB,8aAMA,4C,OAEC,0B,CAED,yG,oC,4C,CAIA,SACA,e,+C,geAKA,wE,OAEC,0B,CAED,yG,oCAEC,a,CAED,Y,+LC9uBK,a,uBAEJ,iG,CAED,6B,kIAiCK,QACL,U,iHAGK,Q,qCAEJ,S,CAED,yB,4GAGK,Q,kCAEJ,S,CAED,sB,wGAGK,QAA4B,wB,0GAE5B,QAA2B,e,yGAE3B,Q,gBAEJ,iD,CAED,a,gBAEC,yE,CAED,wB,uGAGK,QAAwB,oB,8GAExB,QAA6B,yB,kHAE7B,QAAwB,+B,wGAIxB,QAA4B,U,+GAuB5B,Q,gBAEJ,S,CAED,0B,yNAGK,Q,gBAEJ,c,CAEG,UACJ,iEACC,8G,6C,uE,C,MAKD,c,kIAMK,Q,mBAEJ,eACA,sB,CAED,mC,qLAGK,Q,mBAEJ,e,oC,C,iD,2MAMI,Q,mBAEJ,e,gE,C,6E,6HAMI,QACL,iC,4GAGK,QACL,8B,4GAGK,Q,wBAEJ,yD,CAED,eACA,kB,qHAGK,Q,wBAEJ,4D,CAED,eACA,oB,oIAGK,QACL,aACA,YACC,eACA,mBACD,kBACC,eACA,mBACD,kBACC,eACA,mBACD,kBACC,eACA,mBACD,kBACC,eACA,mB,CAED,qD,6SAGK,Q,wBAEJ,yD,CAED,eACA,yG,qcAGK,Q,wBAEJ,gE,CAED,eACA,gH,ydAGK,Q,wBAEJ,+D,CAED,eACA,+G,0dAGK,Q,wBAEJ,mE,CAED,eACA,mH,8RAGK,Q,wBAEJ,oD,CAED,eACA,mH,wGAGK,Q,wBAEJ,oD,CAED,eACA,kB,sGAGK,Q,wBAEJ,sD,CAED,eACA,kB,2GAGK,Q,wBAEJ,4D,CAED,eACA,yB,kHAGK,Q,wBAEJ,uD,CAED,eACA,uB,6GAGK,Q,wBAEJ,wD,CAED,eACA,sB,oHAGK,Q,wBAEJ,qD,CAED,eACA,kH,yGAGK,aACL,MACA,WACC,eACD,iBACC,eACD,iBACC,a,CAED,gC,sMAIK,Q,iCAEJ,U,CAED,8GACA,uB,2BAEC,6B,CAED,mBACA,YACA,U,mHAIK,QAAoC,0B,yNAGpC,Q,gBAEJ,c,CAEG,UACJ,iEACC,8G,wB,uE,C,MAKD,c,4IAiCK,aAIL,qCAEC,KACA,iEACC,a,CAED,oB,YAEC,M,CAOD,KACA,qJACC,a,C,oGAGA,M,CAED,sBACA,2BAGA,KACA,oE,2BAEE,a,CAED,a,C,kBAGA,M,CAED,6BACA,2B,YAGC,mC,uCAEC,M,CAED,U,C,CAGF,S,gbAIK,Q,gCAEJ,U,CAED,6GACA,mBACA,qD,OACC,uB,qBAEA,WACA,qI,OACC,kG,OAED,uGACA,kB,O,2BAGA,6B,C,uBAGA,qB,CAED,oBASA,sBACA,U,2pBAOK,QACL,qBACA,0JACC,sC,OACC,WACA,qX,OACC,oG,OAED,W,OAED,qH,0BAED,U,6/BAWK,QASL,cACA,mCAQI,SAOJ,0BAEA,0CACC,uCACA,MACA,SAMA,+JACC,UACA,kF,OAIC,mB,OAED,8FACA,mEACC,6GAEI,MACA,UACJ,sD,OACC,kB,uBAIA,UACA,kD,QACC,6G,QAED,a,QAID,iI,Q,uD,6F,CAMC,gHACA,gBACA,yCACA,8BACA,QACA,mB,Q,yCAOA,mB,CAED,e,mDAEC,2FACA,mB,C,eAGA,0B,CAED,2F,mDAEC,2F,CAEG,UACJ,6BACA,kBACA,iC,0B,0B,OAID,c,C,qBAGF,c,i9BAKK,QAEL,SACA,+C,OACC,mEACC,6GACA,kD,OACC,QACA,mB,OAED,wD,O,2J,O,0B,O,QAMD,c,C,oEAE8C,kB,0I,2VAmB/C,kC,6PA4EK,Q,oCAEJ,mE,CAED,0I,OACC,6E,OAED,iC,6QAGK,Q,oCAEJ,qE,CAED,sBACA,4B,yUAGK,Q,oCAEJ,sE,CAED,sBACA,gI,iT,wBAUC,a,CAED,e,2BAEC,Y,C,mBAgBA,eACA,KACI,qDACH,8GACA,8G,8EAEI,a,2BACF,Y,C,CAL6B,a,CAShC,a,CAGD,8B,gBAEC,a,CAED,KACI,qDACH,8GACA,8G,+EAEI,a,2BACF,Y,C,CAL6B,a,CAShC,a,oC,YAWC,Y,C,qEAMA,a,CAID,iB,+G,YAKC,Y,CAGD,a,wBAEC,a,C,wCAMA,Y,CAID,MACA,YACC,qEAED,kB,+DAKE,Y,CAID,4EAED,kBACC,eACA,e,iHAEC,a,CAED,4J,oHAEE,a,C,MAGF,2J,mHAEE,a,C,MAGF,YAED,kBACC,eACA,e,uDAEC,Y,CAID,aAED,kBACC,oFAED,2BACC,8CAED,kBACC,eACA,e,+CAEC,a,CAED,gEACC,6GACA,6G,mGAEC,a,C,qHAGA,a,C,uBAGA,a,C,6FAGA,a,C,+BAGA,a,C,MAGF,Y,CAGD,a,8B,gBAisBC,iB,CAED,U,8BA2HA,6B,2CCzgEK,aACL,0B,6HAKK,Q,6CAEJ,iE,C,gCAGA,qB,CAED,c,6GA+DK,Q,gBAEJ,qD,CAED,6E,2GAwCK,a,gCAEJ,2C,C,wIAMI,a,WAEJ,2B,C,2BAGA,qF,C,sJAOI,a,WAEJ,2B,C,2BAIA,qF,C,uBAGA,mE,C,kJASI,Q,4BAEJ,iE,CAED,uE,sGAKK,QACL,0BACA,qB,mRAKK,QACL,2BACA,oJ,OACC,6D,OAGD,qB,8YAKK,QACL,2BACA,oJ,OACC,6D,OAGD,qB,oOAQK,QACL,mC,8GAQK,QACL,gC,oSAWK,QACL,2BACA,iCACA,+G,0aAUK,QACL,2BACA,iCACA,oH,sQAoXK,QACL,0BACA,MACA,YACC,4DACD,kBACC,qB,CAED,mE,8YAwEK,QACL,gD,OACC,uL,OAED,2BACA,0JACC,sC,OACC,iN,O,eAEE,mF,CAED,oG,O,OAGF,uG,0BAED,U,4jBAMK,QACL,2BACG,gL,OACF,sH,OAED,8B,yhBAOK,QACF,oL,OACF,sH,OAED,8B,uTAKK,QACL,0BACA,MACA,YACC,qBACD,kBACC,qB,CAED,iE,gHAqDK,QACL,0BACA,UACA,MACA,WACC,+BACD,iBACC,+BACD,iBACC,+BACD,iBACC,+BACD,iBACC,iB,CAED,+D,4GAIK,Q,gBAEJ,mD,CAED,6B,gUAQK,Q,8G,yPA+EA,QACL,uB,4GAKK,QACL,8B,4WA6BuB,MAAlB,QACL,2BACA,mBASA,uIAEI,K,gCAEH,U,MAEA,mH,CAED,8B,WAEC,8B,CAED,WACA,sCACA,8B,WAIC,SACA,aACA,qC,MAEA,mC,C,imBAQI,QACL,2BACA,mBACA,UAEA,4CAEA,gBACA,K,cAEC,U,CAED,iBACA,qBACI,KACA,gDACH,+F,WAKC,c,C,WAKA,SACA,aACA,yH,MAEA,uH,CAED,OAjBsB,a,qBAmBvB,0B,2UAOK,Q,oBAEJ,6C,C,qEAGA,0D,C,qCAGA,8D,CAED,oBACA,iBACA,4CACA,oC,mHAIK,Q,oBAEJ,gD,C,iCAGA,S,CAED,0B,sIAQK,Q,oBAEJ,mD,C,iCAGA,8B,CAED,wD,QAEC,8B,CAED,2B,iIAKK,QACL,2BACA,mBACA,yB,oIAKK,QACL,0BACA,MACA,YACC,kCACD,kBACC,a,CAED,2E,oJAKK,QACL,0BACA,MACA,YACC,cACD,kBACC,a,CAED,yE,2G,SAKC,O,CAED,8D,0EAKK,QACL,0BACA,MACA,2CACC,gEACA,oEACA,kD,CAED,uE,oJAKK,QACL,0BACA,MACA,sDACC,gEACA,qEACA,kD,CAED,wE,6WAqDK,QACL,2BACA,iC,uI,0iBAMK,QACL,mB,wBAEC,0D,CAED,WACA,oCACI,K,WAEH,SACA,UACA,2B,MAEA,mH,CAED,wI,QAEC,0B,CAED,c,oeAMmB,MAAd,QACL,2BACA,iCACA,uG,0fAKmB,MAAd,QACL,mB,wBAEC,0D,CAED,iCACA,oIACI,K,gCAEH,U,MAEA,mH,C,gI,sSAyBI,QACL,mCACA,0BACA,gB,8SAKK,QACL,mCACA,2BACA,oJ,OACC,gE,OAED,gB,kcAKK,QACL,mCACA,2BACA,oJ,OACC,gE,OAED,gB,qRAKK,QACL,mCACO,gCAGP,YACC,+CACD,kBACC,gB,MAJA,sE,C,qIAUI,QACL,mCACO,gCAGP,YACC,yBACD,kBACC,gB,MAJA,oE,C,+HAUI,QACL,mCACO,gCAGP,WACC,wDACD,iBACC,6DACD,iBACC,6DACD,iBACC,wDACD,iBACC,gB,MAVA,kE,C,8WA8C8B,MAAL,MAArB,QACL,2BACA,iCACA,iCACA,mBACA,0IACI,K,gCAEH,U,MAEA,mH,C,oBAGA,2BACA,O,CAED,iCACA,2IACI,K,gCAEH,U,MAEA,mH,CAED,gH,8UAKK,QACL,mCACO,gCAGP,WACC,2BACD,iBACC,gCACD,iBACC,gCACD,kBACC,2BACD,kBACC,gBACD,kBACC,2B,MAZA,mE,C,2HAkBI,QACL,mCACA,2BACA,gB,gIAKK,QACL,mCACA,2BACA,gB,0TAwHK,QACE,gCACP,WACC,wBACD,kBACC,qB,CAID,4H,4eAQK,QACL,2BACA,iC,sI,+bAQsB,MAAjB,QACL,2BACA,iCACA,6G,4QAIK,QACL,W,WAEC,2C,C,uBAIA,c,CAKD,sB,uBAGC,mB,uCAEC,qE,CAED,8GACA,c,CAGD,kC,oDAEC,qE,CAED,8GACA,e,kHAKK,QACL,0BACA,UACA,MACA,WACC,gCACD,iBACC,gCACD,iBACC,gCACD,kBACC,gCACD,kBACC,iBACD,kBACC,iE,CAED,gE,4GAMK,Q,oBAGJ,iD,C,4BAGA,uE,CAED,c,uTAwCA,6D,OACC,sO,O,+WAoSD,0I,OACC,uD,OAED,0BACA,0H,qX,oCAmDC,yC,CAED,yBACA,MACA,uN,2bAaK,QACL,8D,OACC,kG,OAGD,gFACA,OAGC,UACA,qBACA,8BACA,gCAED,O,WAEE,S,CAED,qG,uBAEC,Y,MAEA,a,CAED,4B,OAID,qG,sjBAMK,QACL,8D,OACC,yG,OAED,oMACA,4D,OACC,8M,OAED,sG,mqBAMA,wRACA,OACC,aACA,8FACC,UACD,2BACC,UACD,kBACC,U,C,cAGF,OACC,aACA,8FACC,UACD,2BACC,UACD,kBACC,U,C,cAGF,OACC,aACA,2CACC,UACD,4DACC,UACD,2BACC,U,C,cAGF,OACC,aACA,qBACC,U,C,cAGF,OACC,gN,OACC,gLACA,QACC,UACD,QACC,U,Q,O,cAIH,OACC,kN,QACC,gLACA,QACC,UACD,QACC,U,Q,Q,O,cAOF,U,CAID,id,QAGC,U,Q,c,mBAKC,U,CAED,U,CAGD,6B,4hBAwBA,oGACA,SACA,WACA,WACC,qBACD,iBACC,Y,CAED,6D,8ZAMA,oGACA,SACA,WACA,WACC,2CACD,kBACC,Y,CAED,6D,kZAIA,2LACA,iBACA,sCACA,U,yYAIA,2LACA,kGACA,sCACA,U,yYAIA,2LACA,kGACA,sCACA,U,8WASW,MACX,gK,gVAIY,MACZ,8H,mVAIgB,MAChB,gL,gVAIiB,MACjB,8I,uUAIgB,MAChB,yI,uUAIiB,MACjB,0I,uUAIa,MACb,+H,uUAIe,MACf,iI,uUAIiB,MACjB,+I,uUAIkB,MAClB,gJ,uXAImB,MACnB,sP,2ZAImB,MACnB,+P,2ZAImB,MACnB,sP,2ZAImB,MACnB,+P,mbAmBW,MACX,4LACA,qGACA,yI,OACC,Y,qBAEA,6B,OAED,8J,iaAIW,MACX,4C,OACC,8FACA,2CACA,U,OAED,kM,+9gB,4F,4F,4F,4F,4F,4F,Q,K,uD,yD,6P,mB,oC;m+JCn2EI,mCACH,wFACA,wFAFsB,W,C,mDAoClB,OACL,gG,kHAGK,OACL,QACA,e,+JAIK,OACL,oBACA,Q,QAEC,QACA,K,CAED,W,Q,uB,sC,C,M,sC,M,sC,C,CAYA,c,0IAIK,OACL,8BACC,I,SAEC,K,CAED,8BACA,W,C,mIAKI,O,wCAEJ,eACA,O,CAED,wD,QAEC,oB,CAED,e,QAEC,oB,C,mHAKI,O,wCAEJ,qBACA,O,CAED,gE,QAEC,oB,CAED,qB,QAEC,oB,C,yHAUI,O,MAEJ,S,MAEA,S,C,qKAMI,O,oEAGJ,O,CAGD,0C,MAEC,+B,CAGG,gC,qFAEH,kB,iDAGC,W,C,uBAIA,W,wBAGC,W,C,C,yCAID,W,C,SAIA,mB,C,CAMF,I,2BAEC,SACA,sB,6EAEA,Q,yCAEC,W,C,CAQF,YACA,8BAGA,IACA,+BACC,iEACC,WACA,oCACA,mNACA,I,CAEF,qCACC,iEACC,WACA,sJACA,2B,CAEF,oCACC,gEACC,WACA,gLACA,2B,CAEF,oCACC,gEACC,WACA,gLACA,2B,C,MAGD,uD,CAED,WACA,iHACA,kDACC,WACA,wF,C,qBAKA,IACA,8B,mGAEE,WACA,wF,CAEF,qCACC,WACA,mIACA,WACA,wF,C,C,uBAID,WACA,wFACA,WACA,wF,C,MAIA,WACA,wF,0BAEA,WACA,wF,2BAEA,WACA,wF,C,qLAKA,sDACA,gBACA,iDACA,WAEA,iBACA,wFACA,WACA,wFACA,WACA,sEACA,WACA,wF,CAGD,sB,wIAIK,O,0DAEJ,SACA,oE,UAEE,mBACA,M,CAED,W,S,CAGF,S,iHAIK,OACL,gBACA,e,+HAIK,OACL,Y,eAEC,W,CAED,8CAEI,SACA,kC,0BAEF,gB,C,kDAGA,kB,CAEG,I,eAEH,kB,MAEA,uF,CAED,uEAbkB,W,CAenB,S,4HAIK,O,4CAEJ,wB,CAED,sB,sHAIK,O,6CAEJ,wB,CAED,kB,mHAIK,OACL,gBACI,K,wCAEH,Y,M,oBAGC,oB,MAEA,a,C,CAGF,e,8GAKK,OACD,S,oBAEH,qG,MAEA,8F,CAED,S,2F,2BAOC,c,CAED,S,uMAIK,OAEL,yD,+KAEC,iB,MAEA,iF,C,iB,oBAKC,qCAAe,qB,QACf,sB,C,C,4D,2BAQA,oBACA,mB,+BAEA,+FACA,mB,CAED,sBACA,O,C,2GAIA,iFACA,SACA,O,C,wHAKA,SACA,O,CAGD,sB,kMAIK,OAA6B,+B,iHAG7B,OAA6B,8B,iHAG7B,OAA6B,+B,iHAG7B,OAA6B,gC,iHAG7B,OAA6B,+B,kHAG7B,OAA8B,yB,mHAO9B,OAA6B,+B,iHAG7B,OAA6B,8B,iHAG7B,OAA6B,+B,iHAG7B,OAA6B,gC,iHAG7B,OAA6B,+B,kHAG7B,OAA8B,yB,uHAG9B,OACL,oC,0HAIK,OACL,oC,iJAIK,OACL,oBACA,kBACA,mBACA,QACI,gBACH,IACA,WACC,wBACD,kBACC,8BACD,iBACC,6BACD,0BACC,8BACD,kBACC,+BACD,iBACC,8B,C,eAGA,M,CAGD,qBACA,uBACA,QACA,IAtBa,W,CAwBd,mBACA,kBACA,QACA,gB,kKCxcK,OACL,iC,4C,sFAIK,OACL,iC,2C,4DAIK,OACL,4BACA,iB,oEAGK,O,UAEJ,uCACA,iB,CAGD,WACA,YACA,+CACC,e,CAED,wGACA,gCACA,iB,kMA2BA,0GACA,kBACA,iBACA,yHACA,S,+IAIK,O,yBAGJ,O,CAED,2BACA,gBACA,oCACA,U,0HAGK,O,4D,gIAEA,O,8D,oHAEA,OACL,IACA,WACC,4BACD,iBACC,2BACD,iBACC,4BACD,iBACC,4BACD,iBACC,2B,CAED,a,yGAGK,OACL,0H,+HAKK,O,kJ,0VASL,sFACA,kGACA,4KACA,SACA,Y,yYAWA,sFACA,kGACA,wBACA,SACA,S,6VAMA,oL,kZASA,sFACA,2GACA,4KACA,SACA,Y,sXAaA,sFACA,2GACA,wBACA,SACA,S,kZAWA,sFACA,yGACA,4KACA,SACA,Y,wXAaA,sFACA,yGACA,wBACA,SACA,S,gWAMa,IACb,4FACA,6D,OACC,0F,OAED,S,kJAOA,6B,sE,S,0C,CAQI,4E,U,0C,CAIH,kDACA,OALiE,W,CAOlE,c,+OAGwB,IAAnB,O,iBAEJ,sHACA,O,CAED,2HACA,0SACA,2H,4eAGK,OACL,gBACA,UACA,UACA,SACA,UACA,4GACA,OACC,iTACA,UACA,uG,cACD,OACC,gTACA,UACA,6G,qBAEA,sH,OAED,UACA,iB,0dAGK,OACL,sDACA,OACC,qB,qBAEA,+F,O,4QAKI,OACL,2C,gEAEC,Q,CAED,mDACA,4C,uSAGK,OACL,+OACA,OACC,0D,eACD,OACC,U,eACD,OACC,2D,eACD,OACC,0D,eACD,OACC,sH,QACC,gB,uBAEA,iG,Q,eAEF,OACC,2D,eACD,OACC,gB,eACD,OACC,2D,sBAEA,iG,Q,kRAMI,OACL,uBACA,uBACA,qFACA,uB,gIAKK,OACL,6BACA,uBACA,2BACA,a,OAGC,aACA,gC,CAED,4BACA,0BACA,4DACA,6BACA,8BACA,aACA,6BACA,uB,oTAGK,OACL,kQACA,OACC,oF,eACD,OACC,mC,eACD,OACC,qF,eACD,O,0BAEE,kB,MAEA,qF,C,eAEF,OACC,oF,eACD,OACC,sH,QACC,yC,uBAEA,iG,Q,eAEF,OACC,qF,eACD,OACC,qF,eACD,OACC,yC,uBAEA,iG,Q,2cAII,OACL,kMACA,OACC,kB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,qBAEA,+F,O,8cAII,OACL,kMACA,OACC,kB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,cACD,OACC,iB,qBAEA,+F,O,gdAII,OACL,0HACA,OACC,mB,cACD,OACC,qB,qBAEA,+F,O,udAII,OACL,0HACA,OACC,oB,cACD,OACC,sB,qBAEA,+F,O,sdAII,OACL,wJACA,O,0BAEE,e,MAEA,e,C,cAEF,OACC,e,cACD,OACC,mC,cACD,OACC,mC,cACD,OACC,e,qBAEA,+F,O,gjBAII,OACL,sD,OACC,uD,OACC,4C,OACC,gE,OACC,wI,sBAEA,uSACA,sH,QAED,O,OAED,kE,QACC,uH,uBAEA,uSACA,4H,Q,qBAGD,2H,OAED,8I,Q,0BAGG,sH,MAEA,2H,C,CAGF,sH,2B,0BAGA,4H,MAEA,2H,CAED,O,OAED,kIACA,QACC,+B,eACD,QACC,mC,eACD,QACC,mC,eACD,QACC,+B,uBAEA,iG,Q,0kBAIsB,IAAlB,OACL,OACA,mHACA,O,cAEA,OACC,Q,qBAGA,+FACA,O,OAGG,IACJ,2FACA,OACC,c,qBAEA,+FACA,O,OAGD,gG,QACC,UACA,8SACA,UACA,U,UAEC,sH,MAEA,0D,CAED,U,e,QAEA,sH,uBAEA,qC,QACC,2E,uBAEA,6I,Q,Q,4gBAUG,OACF,gF,OAIC,0J,OACF,sHACA,O,O,gBAMA,U,CAED,mBACA,sHACA,SACA,sHACA,iBACA,mGACA,kBACA,2H,O,kUAKI,OACL,uB,MAEC,yBACA,2B,CAED,wB,MAEC,0BACA,4B,CAED,Y,qJAKK,O,MAEJ,0BACA,0B,C,MAGA,2BACA,2B,C,+nBAII,O,eAEJ,S,CAGE,8E,OACF,OACA,0FACA,uDACA,gGACA,S,OAID,uD,OACI,8E,OACF,OACA,uDAEA,6LACA,S,O,qBAMD,kFACA,QAKC,uHACA,YACC,OACA,uDACA,yMACA,SAED,YACC,OACA,uDACA,0MACA,S,Q,Q,O,iB,khCAOE,OACL,QACA,oCAEA,gE,OACC,qD,OACC,a,qBAEA,+F,O,iB,OAOF,uEACA,OACC,sN,iBAED,OACC,kM,iB,OAKD,o9BACA,iBACC,mG,eACD,iBACC,sG,eACD,iBACC,sG,eACD,iBACC,wG,eACD,iBACC,yG,eACD,iBACC,kH,eACD,iBACC,kH,eACD,iBACC,kH,eACD,iBACC,kH,eACD,iBACC,oG,eACD,iBACC,oH,eACD,iBACC,oH,eACD,iBACC,oH,eACD,iBACC,oH,eACD,kBACC,sG,eACD,kBACC,+I,eACD,kBACC,sGACA,uB,eACD,kBACC,iHACA,U,eACD,kB,8H,aAII,qJ,Q,iB,Q,+N,QAMJ,gBACA,S,gwBAIuB,IAAlB,OACL,8C,OACC,qD,OACC,sH,qBAEA,+F,O,iB,OAOF,uEACA,OACC,mN,iBAED,OACC,sG,iB,OAMD,gBACA,oD,QACC,qG,QAEE,6I,Q,iB,Q,uH,spCAW2B,IAAzB,OACL,UACA,UAEO,0dACP,OACC,oJ,eACD,OACC,0G,eACD,OACC,0G,eACD,OACC,4G,eACD,OACC,wI,QACC,uH,uBAEA,8G,Q,eAEF,OACC,wI,QACC,sJ,uBAEA,mH,Q,eAEF,OACC,+L,eACD,OACC,yD,QACC,8S,cAEC,kIACA,e,CAED,4H,uBAEA,sH,QAED,+FACA,8I,Q,0BAGG,sH,MAEA,2H,C,CAGF,0GACA,2HACA,uM,2B,0BAGA,4H,MAEA,2H,C,eAEF,OACC,yD,QACC,oT,QAED,WACA,KACA,aACI,qD,S,0BAGD,sH,MAEA,2H,C,CAGF,+E,QACI,gL,QACF,kIACA,2H,Q,QAGF,+MAd6B,a,uBAgB9B,4H,eACD,QACC,mGACA,iD,QACC,yD,QACC,0TACA,sH,uBAEA,sH,Q,uBAGD,mH,Q,eAEF,QAMI,0b,QACE,UACJ,iF,QACC,oG,e,QAEA,4M,uBAKA,0BACA,8DACC,4S,4B,QAGF,0GACA,UACA,e,QAED,yD,QACC,0T,+BAEC,kIACA,e,CAED,4H,uBAEA,2H,QAEG,+C,S,0BAGD,sH,MAEA,2H,C,CAGF,iNARwB,a,uB,0BAWxB,4H,MAEA,2H,C,eAEF,QACC,eAGA,wD,QACQ,6NACP,QACC,2HACA,mHACA,iB,gBACD,QACC,2HACA,mHACA,iB,gBACD,QACC,2HACA,mHACA,iB,S,QAKF,wG,eADD,QACC,wG,uBAEA,uG,QAED,U,a,6wBAMA,I,gBAEC,4HACA,S,UAEC,IACA,Q,C,CAGF,c,oF,e,0C,CAgBI,yC,yBAEF,iC,mB,+C,C,mD,CAF2B,W,C,0C,kHAexB,O,2C,0C,CAIL,iBACA,0C,iB,8C,CAIA,mB,2C,6fAIK,OACL,WACA,IACA,QACA,kBACI,qCACH,kBACA,IACA,yDACC,W,C,QAGA,2I,C,SAIA,c,CAID,WAGA,mBAEA,gCACC,kBACA,WACC,0BACD,iBACC,yBACD,iBACC,yBACD,iBACC,0BACD,iBACC,0B,MAEA,Q,CAba,W,CAkBf,oD,gCAIC,WACA,+D,+BAGC,uH,C,gBAMA,qBACA,0B,CAED,Q,MAEA,iE,iCAEC,mB,C,C,uCAMD,W,MAEC,mB,CAED,oD,gCAEC,WACA,iE,iBAGC,aACA,iC,C,gCAGA,uH,CAED,Q,MAEA,mE,gCAEC,aACA,gC,C,C,C,OAMF,oD,CAGD,sC,OACC,uHACA,c,OAED,qDACA,WAEA,wC,OACC,2HACA,c,OAED,+E,OACC,sHACA,SACA,sHACA,c,c,OAEA,sHACA,SACA,sHACA,c,OAED,uFACA,W,Y,yBAKE,2BACA,2B,C,wBAIA,0BACA,0B,C,CAGF,mG,qBAMD,6D,QACC,sHACA,2CACC,uFACA,qE,QACC,iTACA,2H,QAED,2G,uBAEC,sH,CARqB,W,uBAWvB,2H,Q,2pBAII,OACL,QACI,6CACH,mBAEA,uFACA,qC,OACC,sL,cAEC,2H,C,OAGF,qGAViC,W,qB,MAajC,2H,C,qVC3oCI,OACL,0BACA,gC,UAEC,Q,CAED,Y,wQ,iS,+aA8BA,2HACA,2GACA,UACA,Y,gPAwDK,O,uF,0UAIA,O,kBAEJ,uBACA,aACA,eACA,aACA,cACA,c,C,2EAGA,QACA,c,CAGD,sH,mCAEC,uBACA,a,qCAEA,a,CAED,c,0RAGK,O,gC,gC,C,4C,gTASA,OACL,4G,sC,+B,c,CAKC,W,CAED,S,mbAMK,OACL,6F,WAEC,4B,CAED,S,gcAGK,OACF,6E,OACF,8F,qBAEA,sB,OAED,cACA,uBACA,iB,sQAGK,OACL,oD,qHAGK,OACL,2D,2fAGK,OACL,gEACI,a,sCACC,kD,MACF,W,MAEA,U,C,C,a,8BAKF,K,CAED,2BACA,8FACA,e,kZ,aAoBC,a,CAED,eACA,iJ,WAEE,a,C,YAGA,Y,C,KAGF,a,4BAKA,a,iNAMK,OACL,qG,ifAeK,O,gBAEJ,eACA,0EACA,2BACA,Y,CAED,qJ,e,4B,C,uC,kSAQK,OACL,qDACA,mC,sZAKK,OACL,mH,sC,sC,C,iBAKC,gBACA,IACA,c,CAEG,IACA,2EACH,uL,sC,+BAGE,YACA,c,CAED,c,CAPqC,W,qBAUvC,2D,QAEC,uC,CAED,c,gkBASA,0GACG,iD,MACF,O,MAEA,yC,CAED,oBACA,kBACA,cACA,cACA,cACA,yBACA,4BACA,0BACA,uBACA,UACA,Y,mMAIiB,eAAZ,O,gBAGJ,mBACA,O,C,yBAIA,O,CAED,2BACA,eACA,U,iUAIK,OACL,OACC,6F,WAEC,O,CAED,+K,OACC,c,OAED,wC,O,MAEE,c,C,sBAGA,c,CAED,oCACA,O,OAED,0C,QACC,gGACA,c,Q,qB,2fAQG,OACL,mC,OACC,qG,OAGD,OACC,6F,WAEC,c,CAED,sH,OACC,gGACA,c,OAED,0H,qBAED,0E,wQAOA,2E,UAEE,S,C,SAGF,S,+PAKK,OACL,6F,WAEC,a,C,e,MAIC,0H,CAED,Y,CAED,gD,OACC,8F,OAED,a,ucAIK,OACL,6FACA,6C,OACC,8F,OAED,kB,2aAGK,OAEF,qI,OACF,c,OAED,8F,6aAKK,OACL,wG,6PAIK,OACL,uE,UAEE,Y,C,SAGF,qDACA,a,6ZAIK,OACL,qGACA,6F,gCAEC,a,CAGD,qOACA,OACC,aACD,OACC,YACD,OACC,0Z,OACC,Y,QAED,YACD,OACC,qiB,QACC,Y,QAED,a,OAED,a,8VAeK,OACL,gCACA,KACA,eACA,IACA,WACC,IACA,OACD,kBACC,IACA,aACD,kCACC,KACA,2B,CAED,Y,wTAIK,OACL,oC,OACC,6FACA,6H,OACC,kC,O,OAGF,wH,qBAEA,6B,sdAIK,OACL,6FACA,2GACA,UACA,gE,4CAEC,kE,CAED,S,0jBAMK,OACL,6H,O,sD,OAGA,6FACA,OAEA,yBACA,6H,OACC,qGACA,wC,OAED,c,0qBAKK,OACL,wC,OACC,oG,OAED,qGACA,6FACA,6BACA,QACA,wC,OACC,yR,OACC,qC,Q,qBAGD,gGACA,2C,QACC,2H,Q,OAGF,qGACA,mC,sCAEC,W,CAED,UACA,gE,4CAEC,8C,CAED,S,ssBAKK,OACL,wC,OACC,mI,OAED,qGACA,6FACA,6BACA,QACA,mE,OACC,yR,OACC,qC,Q,c,OAGD,2H,OAED,qGACA,oC,sCAEC,W,CAED,UACA,iE,4CAEC,uD,CAED,S,6qBAMK,OACL,2BAEA,iZ,OACC,6B,OAGD,8FAEA,4Z,OACC,6B,QAGD,uI,uBAGA,kI,QAEC,uI,uB,QAID,oI,QAEC,gGAEA,uI,uB,QAGD,6B,ioBAMK,OAEL,+FACA,gGACA,2BAEA,gI,OACC,Y,OAGD,wBACA,gGACA,+H,OACC,Y,OAED,kL,QACC,Y,Q,8B,qXAMI,OACF,Y,SAGF,iD,sCAGI,uC,MACF,Q,CAED,W,CAED,8C,sCAGI,uC,MACF,Q,CAED,W,CAED,oB,CAED,kC,sCAEC,W,CAED,S,6XAOK,O,sCAEJ,4B,CAED,qGACA,6FACA,iHACA,yGACA,yGACA,4B,shBAKK,O,iC,c,CAIL,qGACA,6FACA,wEACA,OACC,kG,cACD,OACC,+F,qBAEA,kH,OAED,S,2iBAIK,OACL,6FACA,6FACA,sEACA,OAEC,OACC,kG,UAEC,c,CAED,0H,qBAED,6BACD,OAEC,0HACA,QACC,oGACA,0HACA,qE,QAIC,2S,e,QAEA,e,Q,uBAGF,iD,sCAEC,W,CAED,S,OAEA,wC,OAED,S,gTAKA,SACA,IACA,mFACC,qBACD,4DACC,6BACD,yDACC,6B,CAED,iB,gVAMK,OACL,6F,WAEC,Y,CAED,sBACA,oC,OACC,8FACA,Y,OAED,mM,OAEC,mCACA,Y,C,sD,6fAMI,OACL,6FACA,OACC,2G,OAEC,c,CAED,0H,qB,sBAGA,2CACA,S,CAED,6B,43CAQK,OACL,2BACI,YAED,0E,OACF,6F,sC,+BAGE,qB,CAED,W,CAED,O,OAGD,y0BACA,gBACC,uG,eACD,gBACC,iJ,eACD,gBACC,8G,eACD,gBACC,oJ,eACD,gBACC,wJ,eACD,gBACC,+J,eACD,kBACC,8J,eACD,kBACC,gH,eACD,kBACC,4H,eACD,kBACC,gI,eACD,kBACC,iI,eACD,kBACC,4H,eACD,kBACC,iH,eACD,kBACC,4H,eAGD,kBACC,oE,QACC,uGACA,+FACA,kO,Q,eAEF,kBACC,oE,QACC,uGACA,+FACA,yN,Q,eAEF,kBACC,mH,eACD,kBAGC,2I,4BAEA,wGACA,MACA,uD,QACC,oOACA,O,QAEM,8ZACP,QACC,qM,eACD,QACC,uT,eACD,QACC,yT,eACD,QACC,4M,eACD,QAEC,aACA,2O,QACC,iO,QAED,6GACA,uNACI,iDACH,kOADyB,a,uB,eAG3B,QACC,uGACA,+FACA,ka,eACD,QACC,+T,uBAEA,mO,Q,Q,o9BAOC,a,sCACC,kD,MACF,c,MACS,2C,kCACT,U,MAEA,U,C,C,C,ycAMG,OACL,0HACA,wIACC,mGACA,W,yBAGD,iD,OACC,OACC,6F,uBAEC,c,C,WAGA,kCACA,c,C,qB,OAIH,e,4ga,4F,4F,4F,4F,4F,4F,4F,4F,oB,oB,iC,kC,+B,kC,kC,gC,iC,+B,sC,uC,oC,sC,gC,qC,0C,yC,wC,kDD16B0B,iN,I,+G,qH,2B,kZ,kDCuQA,oF,I,iD,0C;6bCzU1B,gBACA,iCACC,qGAEA,sH,OACC,S,qBAEA,I,O,qBAIF,S,wXA6BA,8DAAyC,0G,+F,wVAUpC,OAAsC,qJ,+N,QCxF1C,S,CAED,S,mPAKI,0CACC,gLACH,mGADuC,W,qBADlB,W,qB,uZAUvB,IACA,OACC,gB,SAEC,c,CAED,mM,OACC,W,OAED,uI,OACC,O,OAED,0GACA,I,qB,maAKD,IACA,IACA,SAGI,kIACH,6FAD8B,W,qBAK3B,2CACH,mGACA,6FAFwB,W,qB,mZAYzB,4H,OACC,8F,OAGD,4H,OACC,8FAEA,+H,OACC,gG,Q,O,mXAOE,qCACH,wGADkB,W,qB,+hBAMnB,qGACA,6C,OAEC,gGACA,8GACA,uGACA,iI,OAED,kGAYA,IACA,0CACA,OACC,kCACC,kP,QACC,W,e,QAEA,gGACA,WACA,W,uBAEA,e,Q,sBAGF,mCACC,4P,QACC,W,e,QAEA,0GACA,WACA,W,uBAEA,e,Q,uB,SAID,c,CAGD,qGACA,WACA,W,qBAGD,mBACA,oGAEA,mBACA,oG,sD,+fAMA,wCACC,uC,OACC,2FACA,O,OAED,WACA,wGAGA,mD,OACC,+FACA,I,qBAEA,+FACA,I,O,qBAGF,8C,QACC,6F,Q,oXASD,yFACA,IACI,kCACH,WADkB,uB,CAGnB,WACA,6F,sLA4DK,OAAqC,iB,gHACrC,OAAqC,gL,4HACrC,OAAqC,4V,+QAGrC,OAAwB,uF,gXAWH,8I;miFC/L1B,UACA,qF,2DAGK,OACL,+BACA,UACA,S,kDAGK,OAAkC,2B,4NAElC,OAAgC,gI,oLAEhC,OAAkC,Y,iCAavC,UACA,8F,2DAGK,OACL,mCACA,iDACA,S,kDAGK,OAAiC,+B,4NAEjC,OAA+B,gI,8JAMpC,UACA,wI,2DAGK,OACL,mCACA,8BACA,S,oDAGK,OAAmC,8C,4NAEnC,OAAiC,yH,4JAMtC,UACA,gG,2DAGK,OACL,oCACA,qBACA,S,kDAGK,OAAkC,iC,4NAElC,OAAgC,gI,8JAMrC,UACA,yI,2DAGK,OACL,oCACA,8BACA,S,oDAGK,OAAoC,+C,4NAEpC,OAAkC,yH,4JAMvC,UACA,qF,qDAGK,OACL,UACA,iB,kDAGK,OAAoC,6B,4NAEpC,OAAkC,gI,4JAMvC,UACA,qF,2DAGK,OACL,mCACA,UACA,S,kDAGK,OAAqC,8B,4NAErC,OAAmC,gI,8JAMxC,UACA,4I,2DAGK,OACL,mCACA,8BACA,S,oDAGK,OAAsC,kD,yDAEtC,OAAoC,qJ,+SA6DzC,4CACA,IACA,kE,kB,a,OACC,4FACA,W,KAED,2FACA,2BACA,yIACC,uI,KAED,S,kOAGK,O,0CAEJ,gB,CAED,gB,2GAKK,OACL,W,iUAKK,OACL,kOACC,uF,yB,6dAYI,OACL,kOACC,uF,yB,8QAWI,OACL,+D,qWAUK,OACL,wFACA,oC,OACC,4I,OAED,gG,sCAEC,S,C,qBAGA,Y,CAED,kGACA,iB,2QAWA,IACA,gBACC,YACD,iBACC,YACD,kBACC,Y,CAED,a,oDAUA,UACI,yC,yBAEE,8C,yBAEF,0BACA,2C,4B,CAH8B,W,CAOhC,M,CAT0B,W,CAa5B,UACA,UACA,6BACC,KACD,oCACC,aACD,oCACC,UACD,+DACC,QACD,oCACC,WACD,+DACC,S,CAED,Y,gPAMK,UACL,uTACC,kIACA,sB,eAEC,Y,C,gBAKA,W,MAIA,iB,CAED,QACA,iD,OACI,yE,OAEF,kJ,qBAEA,kJ,O,OAGF,+I,qQ,4XAwBD,mH,kUAKA,6C,OACC,wH,qBAEA,iJ,OAED,oG,oKAkBK,OAA0B,8B,2GAQ1B,O,2BAEJ,S,CAED,sG,qGAWK,OAAyB,sB,qGAMzB,OAA8B,c,iTAO9B,OACL,oG,ydAWK,OACL,4BACA,qGACA,S,maAMA,mH,qXAKK,OACL,oG,qdAWK,OACL,wBACA,oGACA,S,gaAMA,kH,sXAKK,OACL,oG,6dAWK,OACL,sCACA,sGACA,S,ucAWK,OACL,oG,ydAWK,OACL,wBACA,qGACA,S,maAMA,mH,wXAKK,OACL,oG,ieAWK,OACL,uCACA,uGACA,S,4cAWK,OACL,oG,ieAWK,OACL,yBACA,uGACA,S,yaAMA,qH,2XAKK,OACL,oG,qeAWK,OACL,wBACA,wGACA,S,idAYK,OACL,oG,yeAaK,OACL,0CACA,yGACA,S,+aAOA,uH,qcASK,OAEL,8GACA,iFACA,mC,OACK,KACJ,6C,OACC,0I,qBAEA,iK,OAED,4HACA,uB,O,qBAGA,Y,CAED,kG,ghBAeK,OACL,+FACA,+GACA,4FACA,S,6ZAKK,OACL,iE,OACC,sD,OACC,+F,qBAEA,wF,O,qBAGD,4F,O,wsBAKI,O,uBAEJ,wB,CAED,2F,8DAEC,wB,CAED,I,yBAEC,W,iBAEC,2BACA,wB,C,CAGF,iBACA,gG,OACC,qJ,OAID,2BACA,QACA,KACI,yC,yBAEF,wBACA,OACA,mBACA,M,CALyB,W,CAQ3B,WACA,iFACA,oC,OACC,qD,OACC,4FACA,2B,OAED,oK,OAGE,8N,QACF,qC,QACI,iK,QACF,yL,Q,uBAGE,sK,QACF,uK,Q,Q,uB,yBAOD,OACA,sI,CAED,sC,QACC,qK,QAEE,+K,QACF,6L,Q,Q,qBAID,Y,CAED,qGACA,uB,6qBAOK,OACL,cACA,SACA,OACC,4G,MAEC,c,C,mCAGA,c,CAED,kBACA,UACC,SACD,gBACC,UACD,gBACC,U,C,qBAGF,iB,mQAIK,OACL,gB,6FAuBA,2EAIA,S,wEAMK,OACL,SACA,kB,40L,4F,4F,4F,4F,4F,4F,4F,2C,gH,4MAjcA,oOACA,uF;mR,4F;sR,4F;qpB,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F,8J,uL,2J,qJ,yJ,8I,gJ,kL,qK,8K,yJ,4K,4L,oK,2K,6L,0K;sFC7dA,yB,kD,yCAQC,wD,CAED,a;41PCqCI,oPACJ,8F,sCAEC,S,CAGD,UACA,qG,kWAoBK,OACL,iK,mZAsBK,O,wCAEJ,6B,CAGD,wI,OACC,wI,OAED,gI,6lBAGK,OACL,8DACI,a,sCACC,qC,MACF,U,CAED,2B,C,aAIF,8F,kC,wC,CAKA,eAGA,6F,8B,qZAQK,YAA4B,S,yHAG5B,YACL,0B,yHAIK,YACL,2B,2HAkBK,OACL,SACA,QACA,uBACA,S,yGAIK,OACL,U,+GAKK,O,8CAEJ,e,C,uWAMI,OACL,0GACA,6I,sCAEC,W,CAED,kCAKA,yC,OACC,uG,qBAEA,sG,OAGD,S,wfAMK,OACD,IACJ,OACC,uD,OACC,8FACA,0B,qBAEA,+GACA,mBACA,uG,O,eAGA,c,C,qBAGF,S,0kBAK2B,IAAtB,OACL,8C,OACC,sI,sCAEC,W,CAED,kC,gBAOC,kBACA,e,CAED,sGACA,sGAEA,4BACA,gK,OAEC,sGACA,sGACA,wGACA,yG,OAGD,O,OAGM,mMAIP,QACC,+F,eAED,QACC,gG,eAED,QACC,iG,uBATA,W,Q,4jBAmBI,OACE,6LAIP,OACC,uH,cAED,OACC,wH,cAED,OACC,uLACA,YACC,S,Q,qBAXD,W,OAcD,iD,qpBAO8B,IAAzB,OAIL,mN,OACC,W,OAED,OAGC,6D,OACC,0FACA,+U,QACC,IACA,c,Q,O,uBAKD,c,CAGD,8O,QACC,c,QAED,6C,QACC,oR,QAED,2I,QACI,wK,QACF,gD,QAEE,wL,QACF,gD,Q,QAGF,kG,qBAED,8B,80BAK2B,IAAtB,OAEL,0HACA,mE,OACC,mBACA,0L,sCAEC,W,CAED,O,OAED,mE,OACC,6DACA,mBACA,wFACA,O,OAGD,IAGA,0GACA,OACC,qD,QAEC,2RACA,O,QAKD,6DACA,mBACA,0FACA,OACD,Q,eACA,QACC,e,uBANA,6DACA,mBACA,0FACA,O,QAMD,IACA,QAEC,kG,UAEC,e,CAID,mBACA,eAGA,iD,QAEC,8C,QACC,wG,QAEC,I,CAED,mHACA,6FACA,6F,Q,eAGA,iB,C,QAIF,6C,QAEC,+L,uBAGA,yH,QAED,WAGA,wG,UAEC,e,C,eAGA,W,C,uBAIF,6C,QACC,iD,QAEC,yMACA,yCACC,8LADkB,W,uB,uBAInB,Y,Q,QAGF,4D,QACC,4M,Q,ixCAQ2B,IAAvB,OAEL,0HACA,mE,OACC,mBACA,0L,sCAEC,W,CAED,O,OAED,mE,OACC,8DACA,mBACA,wFACA,O,OAED,IAGA,uE,OACC,oSACA,O,QAID,gFACA,QAEC,WACA,8N,QACC,8DACA,mBACA,0FACA,O,QAED,6C,QACC,yL,Q,eAEF,Q,uBAGC,8DACA,mBACA,0FACA,O,QAGG,8BAEJ,QAEC,kG,UAGC,e,C,eAGA,W,CAID,aACA,wGACA,oCACA,4B,QAEC,W,CAIG,+BACJ,SAEA,iD,QACC,0GACA,gD,QACC,iM,uBAEA,6L,QAED,K,uBAEI,UACJ,uGACA,8DACC,8F,6BAEC,MACA,e,CAED,oN,QACC,M,Q,4BAGF,kD,QACC,KACA,aACA,4JACC,kD,QACC,8C,QACC,kS,QAED,oG,QAED,uG,4B,Q,QAMH,yC,QACC,wG,Q,eAGA,W,CAID,sC,QACC,gNACA,cACC,gH,eACD,mBACC,uI,6BAEA,4S,Q,uBAGD,gG,QAKD,iD,QACC,8SACA,yG,QAID,wG,UAEC,e,C,eAGA,W,C,uB,m7BAQ2B,IAAxB,OAEL,aACA,gGAGA,mBACA,eAEA,oI,qRAKK,O,gBAEJ,2B,CAED,mC,sCAEC,uF,CAED,kC,y7BAU+C,IAA1C,OAEL,+C,OAEC,uRACA,O,OAED,sFACA,sHACA,mE,OACC,oG,sCAEC,W,CAED,O,OAED,oE,OACC,2H,QACC,qC,QACC,2R,uBAEA,8D,QAED,O,QAED,sBACA,sC,QACC,qC,QACC,uR,uBAEA,W,Q,QAGF,sG,sCAEC,W,CAED,O,QAGD,IAEO,+LACP,QACC,6EACA,QACC,6L,Q,eAGF,QACC,WACA,kFAOA,QACC,c,eACD,QACC,qD,QACC,2M,uBAEA,4D,Q,uBAXD,qC,QACC,iS,uBAEA,4D,Q,Q,eAYH,QACC,2BACA,uC,QACC,qC,QACC,6R,uBAEA,W,Q,QAGF,+GAGA,QACC,iP,QACC,8DACA,e,QAED,uDACA,iD,uCAEC,gBACA,e,CAED,gN,eACD,QACC,gC,eACD,QACC,qD,QACC,6N,uBAEA,8D,Q,uBAnBD,8D,Q,uBAwBD,6D,QACC,qC,QACC,6R,uBAEA,W,Q,QAGF,qBACA,6NAWA,QACC,yC,uCAEC,gBACA,e,C,2BAGA,8DACA,e,CAED,gM,eAED,QACC,0C,0DAEC,kEACA,e,CAED,a,eAED,QACC,2C,2DAEC,kEACA,e,CAED,c,eAED,QACC,gP,4DAEC,kEACA,e,CAED,e,uB,oDA1CC,gBACA,e,CAED,qC,QACC,6R,uBAEA,0D,Q,Q,Q,08BA8CE,OACL,yLAIA,OACC,yGACD,OACC,kHACD,OACC,2G,OAPA,WACA,mC,O,kfAWI,OACD,mBACJ,OAEC,gG,UAEC,c,CAID,mBACA,eAEA,+GAGA,gG,UAEC,c,C,eAGA,W,C,qBAGF,S,8iBAIK,OACL,KACA,OAEC,gG,UAGC,c,C,eAGA,W,CAID,aACA,gGACA,mCACA,sB,OAEC,W,CAID,uC,OACC,gG,O,eAGA,W,CAID,2LAGA,gG,UAEC,c,C,eAGA,W,C,qBAGF,S,imBAIK,OAEL,aACA,gGAGA,mBACA,eACA,4BAEO,oFACP,YACC,iBAED,2BACC,4BAED,iBACC,sB,OAEC,W,CAED,sB,M,8BAIC,W,CAED,mD,sCAEC,e,CAED,S,C,yU,mMAQA,S,CAED,oE,sCAEC,S,CAED,kB,+CAMA,sBACA,oBACA,Y,2F,4NAKC,Y,CAED,kCAKA,IACA,sCACC,uF,6BAEC,M,C,UAGA,WACA,S,CAED,6C,yBAEC,M,CAED,W,C,kB,+B,CAMD,kCACA,iCACA,sC,wBAKE,2CACA,+BACA,I,CAEM,uFACP,WACC,W,iBAEC,Y,CAED,uFAGA,qDACC,0KACA,WACA,WACD,iBACC,uFACA,WACA,WACD,kBACC,wFACA,WACA,WACD,kBACC,wFACA,WACA,WACD,kBACC,wFACA,WACA,WACD,kBACC,uFACA,WACA,WACD,kBACC,WACA,qB,QAEC,Y,CAED,W,qBAEC,qBACG,oB,mBAEF,WACA,wCACA,M,CAGD,Q,CAED,wC,MA3CA,Y,EA+CF,uBACC,YAGD,gBACC,uFACA,WACA,W,MAIA,6CACA,WACA,wC,C,C,8C,qNC37BF,yEACA,8F,sCAEC,iB,CAED,mC,qVAgEK,OACL,gI,6NAQK,OACL,wC,wRAsBK,OACL,mP,8kBAsBK,OACL,oEACI,a,sCACC,qC,MACF,U,CAEE,4C,MACF,uB,CAED,2B,C,aAGF,8L,2B,iZAIK,OACL,U,6FAGiB,IACjB,WACA,mCACC,mBACD,gBACC,gBACD,4CACC,4CACD,sDACC,6CACD,yBACC,qBACD,yBACC,iB,CAED,a,uOAGkC,IAA7B,OACL,kL,4ZAUiB,I,iBAEhB,U,CAED,mG,6VAIA,mBACA,wEACA,qB,oCAEC,Y,CAOD,kB,iBAEC,Q,CAEG,4BACJ,YACA,8TAAyC,IACxC,YACA,8F,gIAED,oBAIA,+FACA,YACA,kBACA,gGACA,oBACA,Y,sgBAWA,iI,OACC,U,OAED,sI,OACC,0I,OACC,oM,O,OAIF,qI,QACC,U,QAED,0I,QACC,8I,QACC,oM,Q,QAIF,8eACA,QACC,UACD,QACC,UACD,QACC,UACD,QACC,UACD,QACC,UACD,QACC,UACD,QACC,UACD,QACC,8FACD,QACC,8FACD,QACC,8FACD,QACC,8FACD,QACC,8F,QAEA,U,Q,qSAIuC,IACxC,6B,+QAGqC,I,+BAEpC,6BACA,O,CAED,+GACA,+GACA,gE,OAEC,qG,O,sCAGA,gC,C,8bAIwC,IACzC,W,cAEC,6BACA,O,CAED,+GACA,+GACA,gE,OAEC,qG,O,sCAGA,gC,C,4bAIwC,I,+BAExC,6BACA,O,CAED,4HACA,+G,mCAEC,0B,C,sCAGA,gC,C,8bAI4C,IAC7C,W,cAEC,6BACA,O,CAED,4HACA,+G,mCAEC,0B,C,sCAGA,gC,C,iNAI+B,I,MAE/B,uB,C,aAGA,6B,MAEA,8B,C,MAGA,uB,C,sCAI8B,IAC/B,2D,MAEC,uB,CAED,kB,MAEC,uB,C,sCAI+B,IAChC,6D,MAEC,uB,CAED,kB,MAEC,uB,C,2DAM8C,IAA1C,YACL,Y,6BAEC,sE,CAED,kE,MAEC,uB,CAED,kB,MAEC,uB,C,0XASiC,IAClC,gE,OACC,4F,WAEC,M,CAED,wBACA,O,OAED,mC,OACC,0M,sCAEC,W,CAED,4B,qBAEA,qL,O,6YAIoC,I,cAEpC,6BACA,O,CAED,0L,gKAG2C,IAC3C,8B,sTAQ+C,IAA1C,OACL,wBACA,OACA,8JACC,+FACA,kE,OACC,kB,O,MAGA,Q,MAEA,uB,CAED,iBACA,uBACA,qM,yBAED,wB,kiBAIA,uFACA,yCAIA,uJACC,qR,yBAED,8B,0fAO4C,IAAvC,O,cAEJ,6BACA,O,CAED,wBACI,2JACJ,4FACA,4I,QAEE,uB,CAED,mLACA,uBACA,0M,yBAED,wB,ihBAIA,wN,OACC,U,OAED,yLACA,8B,mYAGoC,I,cAEnC,6BACA,O,CAED,2FACA,uBACA,gD,OAEC,qDACA,0BACA,kB,qBAIA,gCACA,0FACA,yF,OAED,uB,6YAQ8C,IAAzC,O,cAEJ,6BACA,O,CAED,wG,obAKA,mN,OACC,U,OAED,mGACA,8B,iZAO8C,IAAzC,OACL,uBACA,UACI,qC,QAEF,uB,CAED,uMAJkB,W,qBAMnB,uB,8cAIA,yLACA,8B,iYAO4C,IAAvC,O,cAEJ,6BACA,O,CAED,qM,ucAIA,yLACA,8B,6VAOiD,IAA5C,OACL,6C,OACC,sG,qBAEA,mG,O,wPAOD,kBACA,8B,oC,WAKC,a,CAED,uEAEC,oD,M,kCAME,a,C,C,SAIH,Y,kPAGiB,IACjB,wIACC,+C,O,cAEE,mC,CAED,0F,OAED,4F,yBAED,S,+XAIA,wIACC,8H,OACC,0F,OAED,iG,yBAED,S,oLAOK,OAAuC,iB,sHACvC,OAAuC,4V,wTACvC,OAAuC,uL,waACvC,OAAuC,oL,4PAGvC,OACL,iBACA,uBACA,IACI,yCACA,kB,U,2EAED,WACA,S,C,QAGA,uC,CAED,IACA,mBACC,uBACA,sBACD,iBACC,uBACA,wBACD,iBACC,uBACA,wBACD,gBACC,uBACA,wB,MAMA,8BACA,oDACA,gD,CAED,WACA,IACA,S,CAED,qD,yB,QAGE,uC,CAED,gCACA,WACA,IACA,S,C,2B,QAWC,uC,CAED,+BACA,0CACA,WACA,IACA,S,CAED,W,C,eAGA,qC,CAED,uBACA,sC,qIAIK,OACL,iBACA,uBACA,IACI,0CACA,uF,U,2EAED,WACA,S,C,QAGA,iC,CAED,IACA,mBACC,uBACA,sBACD,iBACC,uBACA,wBACD,iBACC,uBACA,wBACD,gBACC,uBACA,wB,MAMA,8BACA,oDACA,gD,CAED,WACA,IACA,S,CAED,6C,yB,QAGE,iC,CAED,gCACA,WACA,IACA,S,C,2B,QAWC,iC,CAED,+BACA,0CACA,WACA,IACA,S,CAED,W,C,gBAGA,+B,CAED,uBACA,sC,mGAgBc,eACd,2CACA,4BACA,S,yCAQK,OAAsB,iB,sHAEtB,OAA2B,oY,0HAE3B,O,6LAEJ,0L,C,iNAGA,4M,C,2LAGA,+F,CAED,2E,kHAMK,OAAuB,iB,sHAEvB,OAA4B,oY,sIAE5B,OACL,kO,0GAEE,a,C,iMAGA,6L,C,KAGF,4M,k1BAQA,aACA,mFAGA,6BACA,6BAGA,6BAGI,SAEJ,yCACC,+BACA,yCAEA,mJACC,qF,OACC,kB,OAED,iGAGI,mIACH,wHACA,qD,QAFiC,W,c,QAKjC,qCACA,2C,QANiC,W,c,QASjC,sB,WAEC,K,CAED,yCACA,uBACA,kHAEA,UACA,+R,QAEC,oG,QAID,SACA,gE,QACC,2PACA,QAKC,Q,Q,QAKF,kN,QACC,a,WAEC,S,CAED,wG,yDAaC,yH,CAvD+B,W,c,QA6DjC,mJACA,uF,QACC,0Q,QA/DgC,W,qB,yB,qBAqEpC,sJAQA,oBACI,kEAGH,sGACA,WACI,oDACH,oH,oBAEC,M,CAHwC,a,C,WAOzC,kBAZuC,c,e,CAexC,+D,OAEC,kB,CAjBuC,c,uBAqBzC,KACA,sJAEA,S,mkBAaA,8FACA,KACA,oJ,sBAEE,mBACA,M,C,U,SAMC,6F,CAED,I,C,K,SAID,kG,C,gBAMA,6F,CAED,2F,8NAUA,mBACA,sDACA,qB,kBAEC,S,CAKD,uF,eAEC,a,CAGD,kB,iBAEC,gC,CAED,6FACA,oBACA,S,8JCvoCA,QACA,QACA,qI,WAEE,mB,CAED,c,eAEC,O,6BAGA,O,C,K,MAID,U,C,MAGA,U,CAED,U,kDAQA,qI,kBAEE,a,CAED,gF,U,eAGE,c,iB,2BAGE,a,C,MAGD,a,C,CAGF,iBACA,a,CAID,gCACA,IACA,oB,iBAEE,a,CAEF,0B,kBAEE,a,C,MAGD,a,CAED,iB,K,gBAIA,a,CAED,Y,0C,+BASC,a,CAED,yIACC,uF,UAEC,a,C,oC,uCAIC,a,C,MAGD,a,C,KAGF,Y,wC,+BASC,a,CAED,yI,0HAEE,a,C,KAGF,Y,2UC9HA,UACI,4GACJ,aACA,IACA,4I,sC,QAGG,0B,CAED,uBACA,6CACA,yCACA,S,C,oQ,QAKC,0B,CAED,wBACA,uIACA,S,CAED,wG,S,WAGE,c,C,QAGA,0B,CAED,S,C,yBAGF,gI,OACC,cACA,gB,O,gBAGA,wB,CAED,iB,ucCpCA,UACA,wIACC,gFACA,sI,OACC,a,O,yBAGF,6H,OACC,a,OAED,iB,unBAOA,UACA,4IACC,kGACA,sC,OACC,sGAIA,OACC,sI,Q,wF,Q,cAGD,O,oDAEA,O,0E,O,O,yBAKF,iI,Q,wD,Q,yD,uVAYK,OAAiC,a,wGA4EjC,OACL,UACA,yCACA,gBACA,aACA,e,6QAKK,O,0CAEJ,U,C,aAGA,U,CAED,4F,aAEC,U,C,uCAGA,yD,CAED,U,mOAIK,OACL,qC,sIAKK,OACL,4BACA,yCACA,a,UAEC,UACA,c,MAEA,U,C,qGAKD,4C,gC,sBAMC,S,C,WAGA,e,CAED,e,kC,sBAMC,S,CAED,IACA,YACC,UACA,oBACA,SACD,iBACC,UACA,oBACA,SACD,iBACC,UACA,SACD,iBACC,UACA,SACD,iBACC,UACA,SACD,kBACC,UACA,SACD,kBACC,UACA,SACD,kBACC,UACA,S,C,iBAGA,UACA,S,CAED,mD,sC,sBAMC,S,C,YAGA,uBACA,iHACA,e,CAED,e,gC,sBAMC,S,C,WAGA,UACA,S,CAED,+D,kDAMA,uB,UAGC,UACA,cACA,e,C,sBAGA,UACA,S,CAED,iHACA,IACA,U,WAEE,iHACA,UACA,S,CAED,qCACD,gB,WAEE,iHACA,UACA,S,C,YAGA,kBACA,S,CAED,gDACD,gB,WAEE,UACA,S,C,WAGA,kBACA,S,CAED,wC,CAED,qB,gC,sDASC,mC,CAED,U,gC,WAMC,UACA,S,C,WAGA,UACA,S,C,SAGA,sC,CAED,S,kCAKA,IACA,uEACC,UACA,S,C,YAGA,UACA,S,CAED,0C,gC,8CAMC,UACA,S,CAGD,wD,gC,8CAMC,UACA,S,CAGD,wD,gC,8CAMC,UACA,S,CAGD,wD,gC,8CAMC,UACA,S,CAGD,wD,gC,WAMC,UACA,S,C,iBAGA,UACA,S,CAED,uC,gC,iBAOC,UACA,S,CAED,e,gC,WAMC,UACA,S,C,wBAGA,UACA,S,CAED,e,gC,iBAOC,UACA,S,CAED,2D,gC,iBAOC,UACA,S,C,wBAGA,UACA,S,CAED,e,gC,WAOC,UACA,S,C,WAGA,UACA,S,CAED,e,gC,iBAOC,UACA,S,CAED,mD,gC,iBAQC,UACA,S,CAED,e,gC,YAMC,UACA,S,CAED,oD,gC,YAMC,UACA,S,CAED,oD,gC,YAMC,UACA,S,CAED,oD,gC,WAMC,UACA,S,CAED,qD,gC,YAMC,UACA,S,CAED,qD,gC,YAMC,UACA,S,CAED,qD,gC,YAMC,UACA,S,CAED,qD,gC,YAMC,UACA,S,CAED,oD,gC,YAMC,UACA,S,CAED,oD,gC,YAMC,UACA,S,CAED,oD,gCAMA,U,sDAIK,OACL,UACA,2DACA,U,6F,WAOC,c,C,WAGA,a,CAID,0BACA,6C,iDAKK,O,WAEJ,oD,CAED,aACA,mBACA,UACA,Y,yFAKA,aACA,mBACA,kB,8BCnmBG,iB,gBACF,+C,CAED,a,2DAMK,Y,iBAEJ,a,CAED,IACA,oCACK,KACJ,iB,SAEC,mD,C,UAGA,Y,CAED,I,CAED,a,0vQ,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F,8F,8F,8F,8L,+D,kC,uB,sB,mI,mI,mC;wU,4F,4F,4F,4F;+vCCZK,OACL,OACC,4FACA,cACA,uE,yEAEC,S,CAED,uC,OACC,yM,OAED,4Y,OACC,S,O,qB,oR,QClBD,e,CAED,c,qTAWK,OACL,OACC,iGACA,QACA,uE,4EAGC,S,CAGD,uC,OAEC,OACC,wMACA,wL,aAEC,c,C,qB,QAID,wB,CAED,wB,OAED,mZ,QACC,S,Q,qB,8SCnCE,4BACJ,UACA,S,4CAU4B,oB,gOAGvB,OAA4B,gG,6YAG5B,OAAyB,oG,kYAGzB,OAA2B,+H,6YAG3B,OAAyB,+J,+YAGzB,OACL,sGACA,gC,ueAKK,O,0CAEJ,kD,CAED,kJ,OACC,oL,OAED,0JACA,2FACA,mFACC,2F,qBAED,wB,ohBAKK,O,SAEJ,kD,CAED,oD,OACC,2G,OAED,oGACA,2FACA,iCACC,2F,qBAED,mE,kdAKK,O,SAEJ,gD,CAED,+C,OACC,2G,OAED,0J,gaAIK,OAmBL,6H,UAEC,I,CAED,S,yZAIK,OAOL,sG,UAEC,I,CAED,S,kbAIK,OACL,mBACI,qCACH,gGACA,0KACA,uFAHkB,W,qBAKnB,S,wbAkFK,OACL,YACA,+FACA,cACA,S,2YAGK,OACL,YACA,gGACA,c,8NCvDA,2FACA,mEACA,uG,QAEC,oB,CAED,S,iEAIK,OACL,QACA,WAEA,0C,yCAEC,yE,C,8BAGA,yB,CAGD,2CACI,sCACH,Q,SAEK,kBACJ,mCACA,QACA,uFACA,QACA,sEACA,2HACA,oI,CAVsB,W,C,4HAgBnB,OACL,mB,YAEC,qB,CAGD,qB,aAEC,uB,CAGD,wRACA,wFACA,S,47D,4F,4F,uxF,+lL,o8J,u5C,ozF,u9E,8unB;inD,mC,iD,sC,yC,qB,yC,qB,yC,qB,yC,qB,yC,qB,yC,qB,6C,uB,yC,qB,6C,uB,iC,iB,iDCjNA,UACA,U,aAEC,I,CAED,Y,2DAgBA,gBACA,aACA,gBACA,aACA,4CACA,+DACA,gBACA,aACA,sDACA,uEACA,4CACA,Y,oDAKA,uBACG,U,QACF,Y,CAED,Y,0CAKA,mCACC,YADkB,8B,C,WAIlB,6BACA,W,C,SAGA,6BACA,W,C,SAGA,6BACA,W,C,SAGA,W,CAED,S,4BAYA,yB,yG,S,8C,CAyBA,QACA,4BAEA,aACA,gBACA,wEACA,8BACA,eACA,kBACA,+FACA,uDAEA,kJACC,cACA,c,cAEC,M,C,CAIF,kHACA,gGACA,wDAEA,kJACC,cACA,c,cAEC,M,C,C,wO,sDAoBF,gKACC,uFACA,kBACA,uFAEA,0D,KAED,S,sDAYA,gKACC,uFACA,kBACA,uFAEA,iE,KAED,S,oDAaA,IACA,gKACC,UACA,uFACA,wB,KAED,S,oDAYA,IACA,gKACC,UACA,uFACA,0B,KAED,S,iEAIG,Y,QACF,WACA,kGACA,2BACI,uCACH,IACA,kGACA,kJAHsB,W,CAKvB,2G,CAED,S,iEAIG,Y,QACF,WACA,gFACA,0BACI,yCACH,IACA,kGACA,kJAHoB,W,CAKrB,+H,CAED,S,sDAIA,IACA,kDACC,gM,KAED,S,wDAKA,kDACC,gMACA,4GACA,Y,KAED,S,kDAIA,IACI,gDACH,gMAD4B,W,CAG7B,S,8CCjRK,O,sBAEJ,S,C,UAGA,S,CAED,S,8GAIK,OACL,Q,yCAEC,OACA,+B,CAED,mDACA,QACA,S,uHAIK,OACL,yBACA,YACA,S,mHASK,O,aAEJ,uBACA,Y,CAED,S,uGAQK,OACL,0E,2GAQK,OACL,uEACA,YACA,S,+GAIK,OACL,SACA,YACA,S,uGAIK,OACL,SACA,8BACA,S,6GAIK,OACL,Q,kBAIC,6B,M,wBAKC,6B,MAEA,KACA,6B,C,CAGF,yBACA,S,iHAIK,OACL,Q,qBAIC,6B,M,wBAKC,6B,MAEA,KACA,6B,C,CAGF,yBACA,S,+GAIK,OAKL,6BACA,wCACA,S,8HAMK,OAEL,0DACC,mCACD,uFACC,mC,CAID,Q,yCAEC,mHACA,sE,CAGD,8EACA,QACA,S,0IAIK,O,sJAGJ,4C,CAEG,oFACJ,2FACA,8BACA,kB,2HAMK,OACL,2CACA,wCACA,S,iHAMK,OACL,2CACA,6BACA,S,4HAeK,OACL,qDACA,6EACA,Y,6HAMK,OACL,QACI,2BACJ,gB,U,MAGE,Y,MAEA,Y,C,CAGF,S,mHAMK,OACL,I,2BAEC,kC,CAEG,2BACJ,gB,U,UAGE,W,MAEA,W,C,CAGF,S,wHAkBK,OACL,I,2BAEC,kC,CAED,gB,U,UAGE,YACA,W,MAEA,YACA,W,C,CAGF,Y,2HASK,OAML,kBACC,mB,UAEC,K,CAEF,gBACC,K,MAEA,I,CAED,S,2F,kBAcC,wB,CAED,8H,sBAEC,oM,CAED,S,mDAKK,OACL,2C,UAEC,+B,CAED,S,yGAKK,OACL,iB,8UAYK,OACL,iBACA,oG,sCAEC,qB,CAED,sB,kCAEC,qB,CAED,e,+RAKK,OACL,wBACA,YACA,S,kHAIK,OACL,sCACA,mC,yGAKK,OACL,sB,uHAMK,OACD,S,WAEH,Q,CAIG,S,kBAEH,Q,CAGD,6BACA,yI,uBAGC,yBACA,Y,CAGD,S,sJAOK,O,6BAEJ,4B,kBAEC,4B,C,kBAGA,4B,CAED,S,C,2BAGA,wB,CAGD,kCACA,kCAEA,2BACA,qDAEA,qDACA,2BAEA,2BACA,2BAEA,0CACC,2BACA,mCAEA,oBAEA,SACA,WACA,aACA,WACA,SAEA,SACA,WACA,aACA,WACA,S,C,kBAIA,a,C,kBAIA,a,CAGD,aACA,S,iJAMK,OACL,IACA,2BAIA,gCAEC,WACA,SACD,sCACC,WACA,S,MAEA,SACA,S,C,sBAMA,S,CAKD,2BACG,2B,QACF,I,CAED,WACA,WAGA,2B,+GAGC,S,MAEA,S,CAGD,0CAEC,kC,UAEC,gBACA,8B,MAEA,gB,CAED,W,CAGD,kB,wTAMK,O,SAEJ,wD,CAED,+J,gcAIK,OACL,Y,+BAEC,aACA,S,CAED,0HACA,S,4PAKK,OACD,2BACJ,oB,UAKC,W,CAED,S,oaAMA,8J,OACC,kM,OAOG,uIACJ,YACA,YACA,I,a,aAIE,K,CAED,e,CAGD,Y,qBAEE,S,C,yBAGA,S,CAED,oB,yBAEC,S,CAKD,8B,yBAEC,qG,qBAEC,K,C,CAGF,iB,mOAIC,K,CAED,eACA,e,C,0oBAQI,OACL,mLACA,OACC,cACD,OACC,mCACD,OACC,c,O,uBAGA,oC,CAIG,8BACJ,eACA,8BACA,iBAGI,8BACJ,+BACA,iIACC,kB,qBAOG,0LACJ,kBACA,iBACA,mBACA,mBACA,sBACA,KACA,YAEK,KACJ,eACA,gDACC,gCACA,c,C,WAIA,mB,CAGD,wFAEA,gCACA,gCACA,gCACA,M,C,4XAKI,OACL,yBACA,YACA,S,iHAIK,O,UAGJ,sBACA,aACA,kBACA,WACA,S,CAGD,yBACA,YACA,S,+GAKK,O,U,oBAIH,8G,CAED,S,C,QAGA,0C,C,UAGA,uBACA,6B,CAGD,0B,oHAOK,O,QAEJ,0C,C,UAGA,sBACA,gCACA,kBACA,sBACA,S,CAED,oCACA,YACA,S,mIAIK,O,kB,UAIH,uBACA,uBACA,kCACA,WACA,S,CAID,6BACA,YACA,S,C,UAKA,gB,CAID,uBACA,4BACA,YACA,S,0HAIK,O,kB,UAIH,uBACA,uBACA,wBACA,YACA,S,CAID,gCACA,YACA,S,C,UAKA,uBACA,sCACA,WACA,S,CAID,uBACA,yBACA,YACA,S,8HAIK,O,kB,UAIH,uBACA,uBACA,mCACA,WACA,S,CAID,4BACA,YACA,S,C,UAKA,gB,CAID,uBACA,0CACA,WACA,S,uHAIK,O,kB,UAIH,uBACA,uBACA,qBACA,YACA,S,CAID,6BACA,YACA,S,C,UAKA,gB,CAID,uBACA,uCACA,WACA,S,2GAIK,O,UAGJ,0BACA,YACA,S,CAID,0BACA,WACA,S,gHAOK,O,eAEJ,yB,CAED,6CACA,sBACA,I,UAEC,c,CAED,uFACA,iC,8SAIK,O,kBAGJ,oCACA,iB,CAED,gFACA,2D,OACC,0L,OAED,2BACA,qCACA,iB,+PAIK,OAEL,qD,wUAIK,OAEF,6J,OACF,4J,OAED,iB,sTAIK,O,qE,wUAKA,OACF,6J,OACF,4J,OAED,iB,oRCx7BK,OAEL,eACC,cACD,gBACC,gC,CAED,6B,yFAIA,IACA,WACC,4DACD,kBACC,4DACD,oCACC,6DACD,kBACC,6DACD,iBACC,6D,CAED,S,kOAKA,4C,OACC,4BACA,iCACC,0FADgB,W,qB,O,inBAiBb,OACL,QAGA,sEACA,OAEC,gKACA,OACD,OACC,0HACA,O,OAID,KACA,qQACA,OACC,M,cACD,OACC,M,cACD,OACC,M,OAID,KACA,+H,QACC,IACA,YACC,MACD,kBACC,OACD,iBACC,O,C,QAKF,kBAGI,IACA,KACA,KAGJ,0H,OAGC,gBACC,kBACD,4BACC,O,C,CAKF,8CACG,mK,QACK,4QACP,QAEC,M,eACD,QAEC,M,uBAGA,K,Q,QAKF,gGACA,8FACA,8FACA,iGACA,8FACA,iG,6qBAcK,OAEL,qG,sCAEC,mB,CAID,gI,sCAEC,mB,CAED,yBAEA,sB,igBAII,IACD,+K,O,gC,OAGH,sEACA,OACC,O,cACD,O,qBAGC,8F,OAED,Y,+ZASK,kBACL,6HACA,4E,OACC,sI,OAED,uB,qbAGK,kBACL,+G,odAMK,OACL,gGACA,IACA,IACA,WACC,IACD,kBACC,IACD,kBACC,KACD,0BACC,KACD,2B,MAGC,uC,CAED,8IACA,S,mRC9KK,OACL,kDACC,uF,K,mHAII,OACL,YACA,qIACC,W,CAED,wB,gHAGK,O,mBAEJ,wB,CAKD,iC,qHAGK,O,UAEJ,wB,CAED,YACA,gFACA,S,2IAGK,OAEF,e,uFACF,oB,CAID,IACI,mEACH,WADkB,4B,CAKnB,YACA,kDACC,+IACA,4B,KAGD,S,2HAGK,OACL,oBACA,gBACA,S,+HAGK,OACL,YACA,YAGA,QACC,kBACD,gBAEC,wBACD,gBAEC,gB,CAID,iBACA,wM,QAEC,mK,CAED,uFAEA,gB,mIAGK,OACL,YACA,YAGA,QACC,iCACD,gBAEC,wBACD,gBAEC,gB,CAID,YACA,wM,QAEC,iK,C,eAGA,iC,CAGD,gB,+HAGK,OACL,YACA,Y,wBAGC,QACC,KACD,cACC,I,CAED,S,CAGD,SACA,6MACC,W,CAID,8KACC,KACD,oLACC,I,CAED,S,gIAGK,OACL,Y,qBAEC,oB,CAID,iBACA,qOAEA,gB,qIAMA,gDACA,yI,eAEE,qQ,C,K,yFASG,OACD,gBACJ,YACA,UACI,kCACH,uFACA,mIACA,8HACA,2HAEA,6BACA,8G,0GAEC,I,MAEA,I,CAXiB,W,C,eAelB,iL,CAED,S,6IAMG,wM,eACF,gL,C,4CAME,wM,eACF,gL,C,sEAcD,Y,8BAMC,UACA,O,CA4BD,UACA,4CACA,4CAYA,UACA,uBAGA,IACA,yC,kMAEC,KACA,qL,CAID,yC,kMAEC,KACA,qL,CAKD,yBACA,aAIA,yBACA,uCAUA,wBACA,qC,QAEC,wB,MAEA,wB,C,oCAMD,6M,kDAOG,Y,QACC,kO,eACF,S,gBAEC,+J,C,C,C,gC,QAQF,S,CAED,S,gCAQA,IACA,+BACC,uBACA,Y,CAED,6B,sEAGK,OACL,YACA,YAGA,QACC,kBACD,2BACC,wBACD,gBACC,qG,C,qBAMA,S,C,SAKA,iBACA,UACA,gB,CAUD,QAIA,mBACA,mBACA,4BACA,UACA,0BACA,8B,oBAgBK,SAGJ,WACA,iBACA,aACA,UAGA,WACI,0CACH,iB,gBAEC,mB,CAED,WACA,aACA,UACA,aACA,eATuB,W,C,CAazB,gB,gIAKK,OAEL,8BAEC,qCACD,gEACC,qCACD,+CACC,sBACD,mFACC,sD,CAED,8EACA,sF,qJAIK,OACL,YAEA,UACC,wCACD,gBACC,WACA,YACD,gBACC,mBACA,Y,CAGD,YACA,6HACA,WACA,Y,yJAGK,O,kBAEJ,wC,C,eAIA,mBACA,WACA,Y,C,kBAII,IACJ,wGACA,eACA,Y,CAGD,kCACA,Y,8PASK,OACL,YACA,iB,qBAMC,S,CAED,iBAEA,0B,qBAEC,S,CAED,yBACA,UAGA,sG,QAGC,mBACA,yHACA,I,CAED,yPAGI,qCAEH,c,oNAEK,KACJ,6UAGA,+HAEA,mJACC,cACA,MACA,gH,UAGC,M,CAED,+H,C,CAKF,2OAEA,wP,gBAEC,gP,WACA,2LACA,c,CAGD,2FAhCmB,a,CAmCpB,WACA,yHACA,W,gC,mIAMK,OACF,iB,SACF,2G,CAED,S,2GAgCA,YACC,oMACD,kBACC,sM,MAEA,yC,C,wDAMI,O,kBAEJ,S,CAEG,IACJ,mHACC,Y,CAGD,8G,qJAIK,OACL,Y,UAEC,wB,CAID,mGACA,iBACA,sSACA,gCAEA,gB,iIAIK,OACL,YACA,mG,SAEC,wB,CAID,YACA,+MAEA,gB,4IAGK,OACL,8FACA,wFACA,YACA,IACA,UACC,YACA,gB,SAGC,S,CAED,uLACA,gBACD,gB,SAEE,iBACA,uB,MAEA,Y,CAED,gBACA,sLAEA,S,CAED,6C,qIAIK,OACL,yF,uBAEC,S,CAGD,kM,yHAyBK,OACL,YACA,Y,QAEC,I,CAID,YACI,kCACH,uQADkB,W,CAInB,gB,gIAGK,OACL,YACA,Y,QAEC,I,CAID,YACI,kCACH,wQADkB,W,CAGnB,8CAEA,gB,wIAGK,OACL,YACA,YACA,I,QAEC,gBACA,I,CAID,YACI,kCACH,uQADkB,W,CAGnB,8CAEA,gB,iIAGK,OACL,YACA,YACA,I,QAEC,gBACA,I,CAID,YACI,kCACH,uQADkB,W,CAGnB,8CAEA,gB,+GAKA,yB,qDAIK,OAED,SACJ,oB,sI,ybAMK,O,YAEJ,S,CAED,oBAEA,sE,UAEC,K,CAED,sCAEA,OACC,oEACA,OACC,qDACC,qL,yB,cAEF,OACC,wDACC,0T,2B,qBAGD,yC,O,kBAED,4L,eAEC,c,C,qBAIF,gB,6cAKK,O,qBAGJ,S,C,yGAKA,oB,C,kBAMA,oB,C,6HAMA,sBACA,S,C,uBAMA,oB,CAED,W,0C,gGASE,gC,CAED,8B,CAGD,0GACA,cACA,4BACI,SAQJ,eAGI,2BACA,oCACH,aACA,oB,kCAGC,aACA,oB,C,uBAIA,kCACA,0C,CAGD,+BAdkB,a,CAiBf,kDACH,0FAEI,qCACH,aACA,oB,kCAGC,aACA,oB,C,uBAIA,kCACA,0C,CAGD,+BAdmB,a,CAHQ,a,CAqB7B,gB,sRAIK,OAGD,0BAIA,YACJ,QACA,OACI,mCACH,qKACA,qCACA,wCACA,mCACA,6BACA,wCACA,mCAPqB,W,CAUtB,eAEI,kDACH,2FACI,qC,4CAKF,aACA,oBACA,gCACA,oBAEA,aACA,oBACA,gCACA,oBAEA,aACA,oBACA,gCACA,oBAEA,aACA,oBACA,gCACA,oB,CAGD,kGACA,oBACA,gCACA,oBAEA,iCA/BmB,a,CAFQ,a,CAqC7B,gB,+OAKK,OACD,oDAEJ,Y,gBAIC,sB,sBAEA,YACA,UACA,wDACC,gL,M,MAGD,I,CAED,IAKA,uFACA,uFACI,qCACH,yDACA,mEAFmB,gC,CAIpB,WAGA,eACA,kCACA,wB,gBAEC,YACA,gBACA,I,CAGD,YACA,UACA,gFAII,aACJ,mCACA,mCACI,qCACH,8PADqB,a,CAKtB,YACA,oBAEA,YAGI,kDACH,2FACI,qC,4CAEF,2BACA,2BACA,2BACA,2B,CAED,kHACA,oBACA,iCATmB,a,CAFQ,a,CAe7B,2BACA,gB,snBAMK,O,kBAEJ,a,C,kB,oFAKC,a,C,iJAIA,wF,CAKD,gFACA,wHACC,Y,C,C,gGAKD,a,CAMG,IAEJ,YACC,qBACD,kBACC,oB,MAEA,yC,C,6mBAKA,a,CAQD,oBAEA,yBACA,qBAEA,qBACA,qJAEI,gDACJ,eAGI,uCACH,4GACA,iBACA,qB,uCAHqB,a,c,CAOjB,qCACH,iBACA,qC,mBAToB,a,gB,C,mBAcnB,a,CAPuB,c,CAUzB,a,qBAGD,Y,2fAOK,OACL,YACA,qIACK,kCACH,WACA,kGACA,6BAHmB,W,C,KAOrB,kIACC,W,CAGD,S,sIAKK,OACL,uHAEA,IACA,IACI,IACA,0CACH,0IACG,Y,WACF,uFACA,WACA,IACA,I,CANwB,W,C,gBAUzB,uF,CAGD,gB,+HChuCA,gBACI,gIAEH,kDACA,W,CAGD,Y,0CAQA,IACA,8B,mBAEE,kD,CAED,kDACA,uB,CAED,S,mkBAkCK,OAEL,6DAGA,oC,OACC,8J,OAID,4G,sCAEC,gB,CAID,IACA,uC,OAEC,KACA,wC,OACC,IACO,0OACP,Q,OAGE,I,CAED,KACA,sBACC,KACD,2BACC,I,CAED,mFACA,QACC,IACG,4L,QAEF,gB,Q,eAEF,QACC,I,Q,eAEF,QAEC,mBACA,YACA,gB,QAGA,gB,Q,O,OASH,mBACA,WACA,4BACA,KACA,KACA,MACA,QACC,+C,QACC,QACA,KAEG,4L,Q,+BAED,YACA,e,CAED,gB,Q,QAKE,KAEJ,iBACC,yBACD,wBACC,uCACD,uBACC,uC,MAEA,M,CAED,0C,QACC,sGACA,e,QAED,WAGA,0DACA,a,YAIC,sBACA,KACA,K,CAIE,4L,Q,+BAED,YACA,e,CAED,gB,Q,uB,UAOD,qBAGC,IACA,KACD,iCAEC,wC,CAED,gB,C,SAMA,6B,CAED,W,UAKC,U,CAGD,gB,+eAWK,OACL,wE,iLAYK,OACL,iBAIA,eACC,oDACD,wBACC,oC,CAID,iCACA,mB,2BAKC,QACA,kCACA,gFACA,KAGI,0CAEH,+BACC,WACA,+GACA,6BACA,Y,C,UAMA,uFACA,K,MAGA,yHACA,WACA,+GAGA,wHACA,qB,CAtBsB,W,CA2BxB,2CACC,WACA,+GACA,gCACA,Y,C,MAID,2BAIA,yBAGA,iBAGA,gCAKA,IACI,uIACH,W,C,CAIF,sC,iMAmBK,O,kBAIA,SACJ,iBACA,uCAEC,aACA,UACA,uIACC,W,C,sMAGA,W,QAEC,8C,C,CAKF,oHAGA,4GACA,wDACA,mB,C,CAKF,aACI,K,WAGH,sCAEC,gCACI,0CACH,aAIA,iGACA,6IACA,MAPiC,a,C,C,MAWnC,sCAEC,gCACI,0CACH,aACA,wKACA,kGAHiC,a,C,C,CASpC,mBACA,+BACC,aACA,2F,C,2JAsBI,OACL,2D,uI,oBAOC,c,CAID,IACI,iDACH,WADkE,2B,CAK/D,S,WAEH,gBACA,kC,MAEA,mB,C,gHAMI,SACA,kC,qG,UAGD,2GACA,8F,MAEA,6SACA,0M,CAID,uGACA,yJACC,yLACA,iM,CAGD,6L,CAjBiB,W,C,C,WAuBnB,kB,CAGD,S,ytP,4F,4F,4F,4F,4F,4F,4F,4F,4I,e,wB,e,M,mG,mM;kYCleA,wB,0FAKK,OACL,WACA,0BAGA,iB,kBAEC,mB,C,qB,qCAIC,Y,YAKC,Q,CAED,wC,oC,C,CAMC,kB,qBACC,gD,qBACF,sB,4C,C,C,iF,yU,4F,4F,4F,kH,8E;sUCCF,0G,icAYA,kBACA,8GACA,Y,UAEC,gF,CAED,0EACA,IACA,OACI,kL,OACF,mJ,OAED,qIACC,S,QAGC,a,CAED,2OACA,W,UAEC,yB,C,K,qBAIH,mC,ya,4F,4F;sU,4F,4F,4F,4F,oE,oE,+C,qD,2D,4D,uD,yF;utMCgK8C,MAC9C,+D,yCAI8C,MAC9C,iB,kGAEC,W,CAED,c,yCAI+C,MAC/C,kB,8CAEC,W,CAED,e,yCAI+C,MAC/C,iB,oGAEC,W,CAED,c,yCAIgD,MAChD,kB,gDAEC,W,CAED,e,yCAI+C,MAC/C,iB,yGAEC,W,CAED,c,yCAIgD,MAChD,kB,qDAEC,W,CAED,e,yCAI+C,MAC/C,iBACA,c,yCAIgD,MAChD,kBACA,e,oCASI,mBACA,oCACH,sBACA,kGACA,2BAHkB,a,CAKnB,4B,sCAQA,SACA,M,SAEC,O,C,2DAIA,M,CAED,U,sCAKiD,MACjD,uC,sCAKiD,MACjD,gC,4CAMmD,MACnD,6BACA,6BACA,sC,4CAMoD,MACpD,sBACA,sBACA,sC,4RAwBgD,MAChD,mCACA,qC,OACC,iJ,OAGD,qBACG,6F,OACF,+H,OAED,iC,ubA4yBI,0DACJ,yLACA,OACC,MACA,M,cACD,OACC,MACA,M,qBAEA,qD,OAED,SACA,SAGA,6LACA,OACC,M,eACD,OACC,M,sBAEA,oD,QAED,U,qXC/rCA,iM,qJAKA,oD,0zBCqBA,WACA,uDACA,a,kBAEC,a,CAGD,UACA,6CACG,uD,kBAEF,a,CAED,4CACA,SACA,SAMA,UACA,OACC,UACA,0I,OACC,c,OAED,sGACA,8D,O,kR,OAIA,8G,QACC,oG,QAED,uB,qBAGE,gK,QACF,0C,uBACS,gK,QACT,0C,Q,QASE,gK,QACF,0C,uBACS,gK,QACT,0C,Q,QAQD,8FACA,a,k/B,mCAkBC,c,CAED,KAGA,OACC,uI,O,wC,OAGG,2I,OACF,kB,W,wC,CAIA,kGACA,c,OAED,c,qBAGD,6I,QAEC,mJ,Q,wC,Q,Q,wC,ieAUD,6G,uCAEC,O,CAED,U,2UAyBA,gI,OACC,O,OAED,aACA,8FACA,2F,sKAGK,Y,UAEJ,iB,CAED,uD,oSAIK,Y,qDAEJ,c,CAED,mH,kZAIK,Y,qDAEJ,c,CAED,iH,uOAYK,OAA6B,Y,qGAE7B,OAAkC,O,2GAElC,OAAiC,c,kHAEjC,OACL,c,mHAGK,OAA+B,c,qiBAiCpC,4FACA,8PACA,uPACA,qQACA,0QACA,2PACA,2QAEA,MACA,6E,mB,c,iBACC,4F,MAKD,yC,QACC,8K,QAED,MACA,yFACA,+G,6WAWA,kCACA,S,gPAGK,QAEL,yFACA,oGACA,S,ofAGK,O,iEAEJ,yB,CAED,0GACA,+R,4cAGK,OAAgC,uG,oXAQrC,8BACA,wFACA,S,wJAGK,OACL,yB,qHAGK,OAAqC,yB,yFAU1C,kCACA,S,4PAGK,QAEL,yFACA,mGACA,oG,ygBAGK,O,iEAEJ,yB,CAED,0GACA,8HACA,+HACA,6J,qdAGK,OAA8B,uG,+MASnC,gCACA,S,8OAGK,OAEL,wFAGA,iI,OACC,wF,OAED,mG,oeAGK,O,iEAEJ,yB,CAED,0GACA,uQ,mcAGK,OAAgC,uG,6hBAahC,O,eAEJ,c,CAEE,wF,OACF,yB,CAED,0GACA,oCACA,yJACC,qS,0BAED,YACA,U,kgBAGK,OAAiC,uG,oXAGtC,qCAGA,wFACA,S,ktCAUA,wD,OACC,6G,OAEG,gBACA,sCACJ,4D,0CAEE,gC,C,iBAKK,mgBAEP,OACC,uCAED,OACC,uCAED,OACC,uCAED,OACC,uCAED,OACC,uCAED,QACC,uCAED,QACC,uCAED,QACC,SACA,mGACA,6N,0CAEC,wB,CAUD,4MACA,qBAED,QACC,SACA,mGACA,4N,0CAEC,wB,CAED,6N,0CAEC,wB,CAED,mGACA,qBAED,QAEC,sO,QACC,uC,QAED,SACA,mGACA,+Z,0CAEC,wB,CAED,gGACA,qBAED,QACC,gGACA,mGACA,4GACI,oJACH,gIACA,qI,QAF6B,a,e,QAK7B,8GACA,oGACA,2C,QACC,8GACA,sG,QAED,8H,uCAEC,qB,CAMD,sI,QACC,2F,QAED,iJAtB6B,a,uBAwB9B,qB,QAGA,8P,Q,+1BAMD,kCACA,qB,+P,gBAQC,a,CAID,SACA,gIACC,gG,qBAED,iR,OACC,a,OAED,Y,uXAMA,8FACA,6G,gbASA,6F,OAEC,qB,CAED,qH,oCAEC,gG,CAED,c,uaAIA,4C,OACC,kLACA,mX,O,kdAOD,2GACA,oFACA,oC,OACC,gK,OAED,mBACA,gGACA,yFACA,4FACA,4FACA,U,2OAwBK,O,eAGJ,qB,CAGD,yBACC,gCACD,+BACC,gCACD,gCACC,iCACD,6BACC,8BACD,oCACC,qCACD,yCACC,0CACD,uCACC,wC,CAED,qB,+FAmBA,yCACA,2D,2NAIA,S,2BAGC,S,CAEE,S,mBACF,qB,CAED,oG,y2BAMA,UACA,6CAEG,S,mBACF,qB,CAGD,8M,uCAEC,kB,CAED,qKAEA,wD,OACC,gN,uCAEC,kB,CAED,yNACA,iBACA,WACC,iEACD,iBACC,iEACD,iBACC,iE,CAED,S,qBAEA,2BACO,wOACP,QACC,iF,eACD,QACC,iF,eACD,QAEC,2O,QACC,iF,Q,eAEF,QACC,iF,Q,OAKF,MACA,2CACA,6E,mB,c,iBACC,gG,MAED,+FACA,qBACA,qB,+xBAKA,sMACA,oE,OACC,qI,OAED,U,opB,WAyCC,sD,CAED,UACA,6CACA,wGAGG,mK,OACF,6M,OAEE,0I,OACF,0N,OAGD,yGAEA,oG,4rBAWA,cACA,mGAIA,MACA,oI,OACI,0I,OACF,OAiBA,K,O,OAGF,yI,OACC,2I,QACC,sG,uBAEA,6M,Q,OAIF,6F,kZAIA,kGACA,mGACA,oGACA,oGACA,sGACA,mGACA,oGACA,qGACA,qGACA,yGACA,wGACA,wGACA,4GACA,6GACA,wGACA,yGACA,wGACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+FACA,+F,kvJ,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,0O,uD,mD,uD,wD,mC,oB,2T,M,4G,4G,4G,4G,4G,4G,M,M,wG,uG,wG,yG,yG,0G,2G,6G,8G,+G,+G,+G,+G,+G,+G,M,M,gM,yF;slCCz4BA,oB,wRAMK,iBACL,oH,sCAEC,S,CAED,8B,+dAOK,iBACL,oG,sCAEC,S,CAED,oI,2QAIK,iBACL,Y,mRCIA,mG,mZAKA,uG,0OC5BK,iBACL,a,qQAIA,gH,sI,kBAQC,wC,CAED,2DACA,iB,mO,kBAOC,4C,CAED,qCACA,yD,OACC,mM,OAGD,0C,wJ,kBAoBC,wC,CAED,sCACA,iB,qjC,4F,4F,4F,4F,4F,4F,8B,uB;4wDC5DK,iBACL,oH,+XAKK,iBACL,0H,iZAKK,iBACL,0H,4bAKK,iBACL,YACA,8IACC,qH,OACC,e,O,yBAGF,S,+OAOA,wMACC,2F,oG,2BAOD,8BACC,gB,G,2BAOD,e,6MCpDK,OACL,yBACA,mG,kYAIK,OACL,0G,uOAKK,OACL,mB,kHAIK,OACL,mB,6RAKK,OACL,cACA,mG,8PAIK,OACL,e,iRAIK,OACL,UACA,mG,+OAIK,OACL,Y,sRAaK,iBACL,mK,ocAQK,OACL,4BACG,wK,OACF,S,OAED,aACA,2BACA,mBACA,iB,+QCnEK,OACL,+C,ySAKK,OACL,wJACC,sF,yB,yeAKI,OACF,wR,OACC,oF,OACF,+F,OAED,S,OAED,wDACC,wG,KAED,iB,8bAIK,iBACF,4K,OACF,S,OAED,iB,iZAIK,OACL,qIAKA,8F,saAIK,OACL,qGACA,8F,8bAKK,OACL,2IACC,iB,KAED,8F,4bAKK,OACL,2IACC,kB,KAED,8F,0bAIK,OACL,sGACA,8F,i4F,4F,4F,4F,kDF7EgC,Y,0D;wsBGgDhC,qD,kMAIK,OACL,YACA,+CACA,Q,0KAQI,YACJ,KACA,qCACC,WACA,wFACA,uGACA,WACA,I,CAGD,wFACA,qD,mXAG0C,mBAArC,OACL,wC,yBAEC,uB,CAED,qD,OACC,qD,OACC,+GACA,SACA,6BACA,cACA,6BACA,SACA,6B,OAED,qD,OACC,gHACA,SACA,6BACA,SACA,6BACA,S,wBAEC,6BACA,4G,CAED,6B,O,O,yB,yBAKA,IACI,8C,yBAEF,wBACA,M,CAH6B,W,CAM/B,I,CAED,iCACA,6BACA,UACA,oC,C,+wBAUI,OACL,yBACI,KACA,IACJ,YACA,+C,yBAGC,cACI,QACJ,mC,OAEC,QACA,I,CAED,Y,CAED,2BACA,qNACA,4B,4DAEC,wB,CAED,2GACA,S,snBAKK,OACL,6L,+cAKK,OAAqC,0L,mcAIrC,OAAuC,4L,ucAGvC,OACL,0LACA,U,6cAIK,OACL,6LACA,U,idAIK,OACL,4LACA,U,ucAIK,OACL,6FACA,6FACA,uB,6cAIK,OACL,gGACA,6FACA,uB,idAIK,OACL,+FACA,6FACA,uB,sYAIK,OACL,YACA,+CACA,c,oTAIK,OACL,YACA,+CACA,S,8SAIK,OACL,YACA,+CACA,gB,uTAIK,OACL,YACA,+CACA,W,4RAKA,YACA,+CACA,Q,kSA4BA,0L,uWAMA,6L,oWAMA,4L,8VAKA,0LACA,U,uWAKA,6LACA,U,oWAKA,4LACA,U,8VAKA,6FACA,6FACA,uB,uWAKA,gGACA,6FACA,uB,oWAKA,+FACA,6FACA,uB,8tD,4F,4F,4F,4F,4F,4F;0hBChQA,IACA,KACA,KAEA,0EACC,8EACA,kIACA,OACC,4I,cACD,OACC,I,cACD,OACC,I,cACD,OACC,I,O,6BAGF,+J,6eAKA,6BACA,mE,OAEC,gJACA,O,OAGD,uEAGA,OACC,wBACA,OACC,6BACA,qE,QACC,kJACA,c,Q,YAGA,c,CAED,e,qBAED,+L,cACD,OACC,gB,qBAhBA,mM,O,gb,WAuBA,S,CAGD,uBACA,wBAEA,OACC,6B,sCAEC,c,CAED,4CAGA,OACC,yF,qBAFA,e,O,qBAKF,kB,6YAKA,mJACI,+E,OACF,mM,O,yB,6WAiDF,0CACA,uLACA,qG,gS,4F,4F,4F,4F,4F;koBCjKA,sFACA,yK,iCAIA,iBAIA,2CACA,S,wEAGK,OACL,qIACC,W,K,oIAII,OACL,qIACC,U,K,oTAII,OACL,sBACA,mU,mbAGK,OACL,sBACA,qU,mcAGK,OACL,sBACA,2T,+bAGK,OACL,sBACA,mU,mbAGK,OACL,sBACA,qU,mcAGK,OACL,sBACA,2T,+bAGK,OACL,sBACA,mU,mbAGK,OACL,sBACA,qU,mcAGK,OACL,sBACA,2T,qxC,4F,4F,4F,4F,4I,8B,2B,2B,8B,4B;k1BCrEA,oD,qCAKA,UACA,aACA,SACI,IACA,oCACC,IACA,IAEJ,4BAEC,gBACA,IACA,MACD,gBAEC,gCACA,IACA,MACD,gBAEC,iBACA,IACA,M,MAGA,gCACA,I,EAED,uFACA,6FAzB2B,iB,CA2B5B,S,iCAIA,SACA,aACA,SACI,mCACH,uFACA,6FAF6B,iB,CAI9B,S,gCCjDA,6N,kCAIA,sD,q2B,4F,4F,4F,4F,4F,4F,k7B,Q;oP;mKC+BA,WACI,oCACH,UACI,kC,oBAEF,wB,MAEA,6B,CAJiB,W,CAOnB,gFAToB,W,CAWrB,S,kL,4F,4F;ya,4F,4F,4F,4F,4F,4F,4F,4F,iD;ywBC5CA,6CACK,QACA,KACJ,4B,c,mD,CAMA,8B,oCAKC,IACA,S,C,sC,gC,C,MAQI,oEACH,kD,M,+BADkD,W,S,CAOjD,IACA,iB,C,sC,gC,CARiD,W,C,C,wC,C,+C,4EAuBrD,6DACC,iBACA,O,CAED,QACI,IAEA,8CACH,kBACA,W,sBAIG,W,CAGH,iBACC,OACD,iBACC,QACD,iB,OAEE,W,C,CAf0B,W,C,kE,kGA0B7B,qC,iBAEE,c,CAED,kBACA,WAEC,wCACA,iBACA,iB,iBAIC,qBACA,c,CAGD,uB,MAEC,iB,CAGD,QACA,IACA,Y,4CAEE,iBACA,M,CAEG,gBACD,4B,sCACF,c,CAED,I,yBAEI,yC,sCACF,c,C,C,eAID,O,CAED,W,C,UAGA,c,CAGF,iB,yBAEE,c,CAED,iCACA,iBACA,iBAED,iBAEE,iB,iBAEC,qBACA,c,C,2CAOD,c,CAED,iBACA,iB,M,2CAHC,c,CAED,iBACA,iB,C,C,iD,0D,mEASD,qBACA,c,C,iCAGA,iB,iBAEC,qBACA,c,C,CAGF,wC,yBAEC,qB,CAED,iB,iBAEC,qB,CAED,c,2Y,UAaI,oB,sC,yC,C,8C,CAMJ,qBACA,IACA,WACC,MACD,kB,MAGC,iC,CAGD,uC,O,yH,OAII,SACJ,oG,sCAEC,Y,CAED,wIACC,wG,sCAEC,Y,C,yBAGF,Y,uxBAQA,IACA,0B,sCAEC,Y,CAED,2H,OACC,Y,OAED,0B,sCAEC,Y,CAED,2CAEA,4BACA,+FAEA,qIACC,uB,sC,4B,C,MAKC,8B,C,KAGF,Y,2ZAOA,8B,mDCrRK,O,sBAEJ,qG,CAED,4B,gHAGK,O,mB,oDAGH,eACA,O,CAED,mCACA,2C,CAED,uGACA,e,2GAGK,O,mBAEJ,mD,CAED,iF,2GA8BA,IACA,QACA,iB,W,mCAIE,Y,CAED,a,CAED,qCAOA,WACA,4BACA,gB,MAEC,aACA,gB,CAGD,8BAEC,uCAEC,WACD,8FAEC,WACD,6HAEC,WAEA,UAEC,eACA,kEACC,e,CAEF,a,UAGE,a,CAED,aACA,aACA,M,C,M,sCAMA,a,CAGD,mEACC,0BAD4C,W,C,C,C,YAQ9C,a,CAGD,qB,wCAkBC,SAED,+B,kEAiBA,QACA,gBACA,2EACC,W,C,sE,wCAWD,a,gZA+IA,kGACA,mE,OACC,6J,OACC,iB,OAED,S,OAGD,2H,OACC,iB,OAGD,uGACA,qE,QACC,iG,QAGD,0IACC,mBACA,uGACA,qE,QACI,uM,QACF,S,Q,uBAGD,6FACA,qE,QACC,qK,QACC,S,Q,Q,Q,2BAKJ,iB,seAUA,2BACA,mE,OACC,uG,OAED,gG,wXAMA,0B,sCAEC,iB,CAED,mCACA,U,sCAEC,iB,CAED,+FACA,oB,2J,WASC,U,CAGD,uFACC,iC,CAGD,4BAEA,gBACA,oEACC,W,C,SAGA,wB,C,WAIA,U,CAED,S,yCAwBA,4B,+CC9bA,S,oCAqBA,yI,cAEE,qC,C,KAGF,S,uwB,4F,4F,4F,4F,4F,4F,4F,oD,0C;ovBC1BA,6CAGA,gEACC,a,mCAEC,O,CAEE,2C,0CACF,O,MAEA,U,C,aAGF,yG,6C,2tBAiBA,0B,sCAEC,gB,CAED,2CAGI,kBAED,yF,OAEC,yK,OACF,I,O,OAQF,4H,6e,4F,4F,4F,4F,4F,4F,4F,4F,oDAwEC,qBACA,2H;+S,4F,4F,4F;uf,4F,4F,4F,4F,4F,4F,4F,4F,4F;2WC9DI,YACL,iB,4HCsJK,YACL,K,eAEC,qE,C,WAGA,8B,CAED,S,8HAmBK,YACL,IACA,WACC,SACD,iBACC,SACD,yDACC,SACD,yCACC,SACD,iEACC,S,CAED,S,iHAMA,KACI,oCACH,4JAD0C,W,C,8CAmBtC,YAA8B,iB,kIAK9B,YAA+B,kB,mIAK/B,YAA8B,kB,0tB,4F,4F,4F,oG,2hB;qc,4F,4F,4F,4F,4F,4F,4F,4F;gjLCjP9B,OAA8B,e,gGAC9B,OAA8B,2C,kGAS9B,OAAmC,qG,oGACnC,OAAmC,kI,+EAEP,4C,6BAGjC,WACA,yDACC,W,CAED,wB,qFASK,O,eAEJ,S,CAED,gCACA,8IACC,4F,KAGD,sBACA,qIAGC,kBACA,WAEC,iB,uCAGC,iB,CAEF,iBAEC,iC,CAID,kBAGA,qIACC,kB,K,KAMF,IACA,qI,4HAEE,uFACA,W,C,KAGF,mB,iHAIC,gB,CAGD,sB,kRAkBK,O,sBAEJ,sG,CAED,mG,gYAGK,O,sBAEJ,mB,CAED,mG,kYAUK,O,mCAEJ,iB,CAID,kD,OACC,qL,OAED,S,2ZAGK,O,mCAEJ,sB,CAIE,sD,OACF,qM,OAED,S,uPAIK,OACL,I,kBAEC,0IACC,kB,UAEC,I,CAED,W,K,CAGF,S,4GAyMK,OAA+B,iB,gGAE/B,OAA+B,kB,wQAoB/B,O,mDAEJ,c,CAED,qG,oNAOK,OAA8B,6C,gGAO9B,OAAqC,+C,iRAerC,OACL,uD,OACC,sG,OAED,qG,+MA6CA,iCACA,oB,sEAMK,OAA+B,kB,iHAE/B,O,kBAEJ,c,CAED,c,uGAgLK,OAAqC,qB,kRAIrC,OAAqC,oL,4NAKrC,OAAqC,gB,yQAkBrC,OAAkC,mG,8YAMlC,OAAiC,gN,mOAejC,OAAgC,qB,kGA8FhC,O,uBAEJ,oB,CAED,oB,oGAEK,OAAgC,sG,kGAChC,OAAgC,oB,kGAEhC,O,sBAEJ,gB,CAED,oB,+TAGK,OACF,wD,OACF,uM,OAED,wE,OACC,mG,OAED,oI,saAEK,OAA+B,mG,4XAsD/B,OAA+B,mG,4XAS/B,O,uBAEJ,oB,CAED,mG,6NCp5BK,OACL,gE,+HAQK,OACF,iE,eACF,wG,CAED,S,2WAIK,OACD,sDACJ,wHACA,0E,OACC,2GACA,6E,kB,kB,OACC,wJ,yB,OAGF,gHACA,qB,yUAiCK,OACL,SACA,SACA,uCACC,2I,eAEE,e,C,KAGH,6C,wCAEE,oB,CAED,oBACD,6CACC,2I,eAEE,e,C,KAGH,6C,oBAEE,oB,CAEF,6C,oBAEE,oB,CAEF,6C,qBAEE,qB,CAEF,6CACC,yIACI,uC,kBACF,e,C,KAGH,6C,CAGA,S,iGA2BK,YAAgC,2E,y2N,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F;siB,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F;mT,4F,4F;qf,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F;oY,4F,4F,4F,4F,4F;+a,4F,4F,4F,4F,4F,4F,4F;i3oDChErC,6CACC,a,mCAEC,O,CAEE,2C,yCACF,I,MAEA,U,C,QAGF,6D,qB,kIAKI,SACJ,yBACI,kCACH,0BADuB,W,CAGxB,S,iCAII,SACJ,yBACI,kCACH,0BADuB,W,CAGxB,S,iCAII,SACJ,yBACI,kCACH,0BADuB,W,CAGxB,S,6BAwBA,gBACA,6BACC,6C,MAEA,iC,C,6BAKD,gBAGC,gC,6B,4BAMA,iB,CAED,gBAEA,qBACC,iC,MAEA,Y,C,6B,4BAMA,iB,CAED,gBAGC,Y,iC,4BAMA,iB,CAED,wCACA,gBACA,IACA,kCACC,qFACD,wCACC,+CACD,sCACC,8FACD,uCACC,iCACD,sCACC,qBACD,sCACC,qBACD,oCACC,qBACD,wCACC,uEACD,wCACC,yBACD,sCACC,wBACD,0CACC,qBACD,2CACC,qBACD,qCACC,qBACD,uCACC,qBACD,uCACC,8BACD,0CACC,0CACD,sCACC,qBACD,sCACC,qDACD,uCACC,qBACD,0CACC,qBACD,sCACC,qBACD,yCACC,qBACD,sCACC,qBACD,oCACC,qBACD,wCACC,0CACD,uCACC,kDACD,uCACC,wMACD,wCACC,sDACD,uCACC,wBACD,wCACC,qBACD,oCACC,uBACD,sCACC,uCACD,qCACC,wBACD,uCACC,qBACD,sCACC,qBACD,sCACC,8BACD,uCACC,+BACD,qCACC,2BACD,wCACC,wDACD,uCACC,gCACD,0CACC,8BACD,wCACC,kDACD,wCACC,0CACD,2CACC,qBACD,uCACC,2BACD,qCACC,qBACD,0CACC,2BACD,uCACC,wBACD,wCACC,6CACD,wCACC,qEACD,wCACC,8BACD,sCACC,qBACD,uCACC,qBACD,uCACC,qBACD,8CACC,qBACD,2CACC,2BACD,+CACC,qBACD,iDACC,2BACD,0CACC,uBACD,0CACC,yBACD,8CACC,qBACD,0CACC,+FACD,sCACC,wBACD,uCACC,wBACD,uCACC,yCACD,uCACC,qBACD,yCACC,qBACD,uCACC,iCACD,kCACC,S,MAEA,S,C,6BAKD,Y,mCAEC,c,CAED,yB,uCAIA,cACA,2BACA,yIACC,uG,KAED,S,2CAIA,gCACA,2BACA,yIACC,uG,KAED,S,wBAIA,2B,mEAWK,OACL,gB,4BAEC,S,CAED,+B,4GAGK,OACL,kD,+GAGK,OACL,mC,wGAGK,OACL,sC,8GAGK,OACL,sC,2GAGK,O,iBAEJ,6D,C,qDAGA,yC,CAKD,S,8GAGK,OACD,SACJ,6BACI,kCACH,iDADuB,W,CAGxB,S,6GAKK,O,iBAEJ,wDACA,O,C,qDAGA,oCACA,O,CAGD,6D,iHAMK,OACL,2B,gHA4EK,iBACL,qE,qIAGK,iBACL,oE,sIAGK,iBACL,uE,uIAWK,OACL,oD,uHAGK,OACL,2C,uGAGK,OACL,gE,iHAGK,OACL,2D,wHAGK,OACL,2D,2HAGK,OACL,+D,cAEC,a,CAED,Y,+HAGK,OACL,Q,MAEC,O,CAED,+D,2HAGK,OACL,gE,iHAGK,OACL,2D,0HAGK,OACD,SACJ,oCACA,yBACI,kCACH,0CADuB,W,CAGxB,S,yGAGK,OACL,sC,mCAEC,c,CAED,yB,+GAGK,OACD,SACJ,qCACA,yBACI,kCACH,0CADuB,W,CAGxB,S,iHAGK,OACL,kG,8HAGK,OACD,SACJ,oCACA,yBACI,kCACH,0BADuB,W,CAGxB,S,6GAGK,OACL,uCACA,oE,wHAGK,OACD,SACJ,sCACA,yBACI,kCACH,0CADuB,W,CAGxB,S,iHAGK,OACL,oE,qHAGK,OACL,kE,wHAGK,OACD,SACJ,sCACA,yBACI,kCACH,0CADuB,W,CAGxB,S,4GAGK,OACL,+D,8GAGK,OACL,0D,8GAGK,OACL,6D,oGAGK,kBACL,mC,8GAGK,kBACL,+C,kHAGK,kBAEL,uC,sHAGK,kBACL,6C,kIAGK,kBACL,4D,6HAGK,kBAEL,uC,sIAGK,kBACL,kE,iJAGK,kBACL,uE,0JAGK,kBACL,sE,8IAGK,kBAEL,uC,6HAGK,kBAEL,uC,wTAGK,kBACL,qN,mcAGK,kBACL,4O,wRAGK,kBACL,sD,qJAGK,kBACL,oE,2IAGK,kBACL,4F,8IAGK,kBACL,qF,8IAGK,kBACL,mD,yJAGK,kBACL,oE,kKAGK,kBACL,6E,8JAGK,kBACL,2E,gKAGK,kBACL,+E,4JAGK,kBACL,qE,uIAGK,kBACL,oE,wIAGK,kBACL,uE,kIAgIK,OACL,oC,+GAGK,OACL,4B,qHAGK,OACL,gC,2HAGK,OACL,oBACA,oE,6GAGK,OACL,2C,2GAGK,OACL,sC,oHAGK,OACL,0C,yHAGK,OACL,yC,mHAGK,OACL,qC,2GAGK,OACL,mC,gHAGK,OACL,0C,yHAGK,OACL,yC,oHAGK,OACL,sC,8GAGK,OACL,sC,6GAGK,OACL,mC,4GAGK,OACL,sC,8GAGK,OACL,sC,iHAGK,OACL,yC,uHAGK,OACL,yC,gHAGK,OACL,gC,sGAGK,OAEL,iB,gHAGK,OAEL,uC,iHAGK,OACL,uD,6GAGK,OACL,wC,yGAGK,OACL,gB,qGAGK,OACL,gB,iHAGK,OACL,0B,oIAGK,OACL,yB,wHAGK,OACL,iB,6GAGK,OACL,oD,8GAGK,OACL,iB,0GAGK,OACL,mB,4TAOK,OACD,Y,cAEH,iB,CAED,4K,gSAGK,OAEL,uC,qHAGK,OACL,gB,8GAGK,OACL,qB,wHAGK,OACL,qB,0HAGK,OACL,0G,oIAGK,OACL,mI,iJAGK,OACL,yF,8HAGK,OACL,iB,gHAGK,OACL,8F,0HAGK,OACL,uB,8HAGK,OACL,uB,4HAGK,OACL,qB,0HAGK,OACL,uB,+HAGK,OACL,0B,oIAGK,OACL,uB,2HAGK,OACL,4C,+HAGK,OACL,gE,sIAGK,OACL,+D,uHAGK,OACL,gB,8HAKK,OACL,2LAAgC,2F,0GAChC,4FACA,S,iKAGK,OACL,+F,2HAIA,8C,oEAGK,OACL,2LAAgC,2F,0GAChC,wE,4JAGK,OACL,iC,wIAoEK,OACL,gD,6GAsFK,OACL,gB,0IAGK,OACL,2LAAgC,2F,0GAChC,4FACA,S,iKAGK,OACL,+F,gJAGK,OACL,8C,iHAGK,OACL,8B,uHAGK,OACL,8B,sHAGK,OACL,6B,sHAGK,OACL,+B,uHAGK,OACL,+C,iHAGK,OACL,uC,kHAGK,OACL,gD,0HAGK,OACL,2C,gIAGK,OAEL,uC,6HAGK,OACL,8B,0HAGK,OACL,iC,kIAGK,OACL,mC,kIAGK,OACL,kD,gIAGK,OACL,6C,mTAGK,OACL,oH,4QAGK,OACL,oD,qTAYK,OACL,qJ,gdAGK,OACL,2H,uPAGK,OACL,mC,6UAGK,OACD,YACJ,mE,OACC,kH,OAED,qJ,iTAGK,OACL,+D,2TAGK,OACL,8H,+PAGK,OACL,qD,sIAGK,OACL,kF,wIAGK,OACL,qB,uSAGK,OACL,oH,idAGK,OACL,mN,8RAyDK,OACL,uE,gIAGK,OACL,0CACA,8BACA,YACA,qIACC,0I,KAED,S,sHAGK,OACL,kE,iIAGK,OACL,4E,yIAGK,OACL,uE,4IAGK,OACL,6E,4IAGK,OACL,wE,gJAGK,OACL,4D,8HAGK,OACL,iE,wGAGK,OACL,4D,gHAGK,OACL,oD,0HAGK,OACL,gE,uHAGK,OACL,kE,2GAGK,OACL,6D,qHAGK,OACL,iE,2HAGK,OACL,+D,yHAGK,OACL,uD,0HAGK,OACL,8D,sHAGK,OACL,gE,oHAGK,OACL,yD,2GAGK,OACL,8D,uHAGK,OACL,2C,sHAGK,OACL,mE,8GAGK,OACL,8D,+GAGK,OACL,uC,sGAGK,OACL,wC,wGAGK,OACL,wC,yHASK,OACL,gCACA,8BACA,yBACI,kCACH,YACA,kJAFuB,W,CAIxB,S,oIAGK,OACL,6CACA,iC,yJAGK,OACL,oD,uJAGK,OACL,gD,kIAGK,OACL,gF,8GAKK,OACL,qD,6GAGK,OACL,mD,qGAGK,OACL,8C,4GAGK,OACL,wD,sHAGK,OACL,sF,wIAGK,OACL,gH,oJAGK,OACL,6E,8JAGK,OACL,2E,gKAGK,OACL,qG,0JAGK,OACL,mE,wIAGK,OACL,6F,2IAGK,OACL,oE,wIAGK,OACL,uE,6IAGK,OACL,4D,iJAGK,OACL,sF,oJAGK,OACL,iF,gJAGK,OACL,2G,wIAGK,OACL,0D,0HAGK,OACL,qD,sHAcK,OACL,sE,kGAgBK,OACL,oI,kGAiBK,OACL,sE,mGAuCK,OACL,2D,uGAGK,OACL,2D,6GAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,2IAwCK,OACL,qBACA,4D,8HAGK,OACL,4F,kJAKK,OACL,uC,kKAKK,OACL,uB,sIAGK,OACL,2B,gJAGK,OACL,6B,mJAGK,OACL,4B,6HAKK,OACL,gB,uGAGK,OACL,kB,8GAGK,OACL,qB,wHAGK,OACL,qB,oHAGK,OACL,qB,wHAGK,OACL,qB,+GAGK,OACL,gB,gIAGK,OACL,mC,2KAGK,OACL,oC,mKAGK,OACL,8C,6IAGK,OACL,0B,yIAGK,OACL,sC,qIAKK,OACL,oB,kHAGK,OACL,mB,uHAGK,OACL,wB,iJAGK,OACL,gC,oKAGK,OACL,mC,8JAKK,O,WAEJ,+CACA,O,CAGD,iD,gJAGK,O,WAEJ,iDACA,O,CAGD,mD,kIAYK,OACL,qE,+GAsBK,OACL,oE,6GAGK,OACL,2D,yGAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,qIAmBK,OACL,oE,sHAGK,OACL,2E,yHAGK,OACL,0D,0GAGK,OACL,yD,0GAGK,OACL,mE,+GAGK,OACL,8F,4HAqBK,OACL,2E,oIAGK,OACL,kF,kIAmEK,OACL,yDACA,0CACA,kDACC,2G,KAED,S,yGAGK,OACL,2D,mCAEC,c,CAED,yB,uGAGK,OACL,2D,yGAGK,OACL,2D,yGAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,mIAGK,OACL,0D,iIAGK,OACL,gG,gJAGK,OACL,4F,oHAGK,OACL,0F,2GAeK,OACL,2D,uGAGK,OACL,2D,6GAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,oIAaK,OACL,mE,2GAGK,OACL,2D,qGAKK,OACL,2D,oGAYK,OACL,oI,oGAGK,OACL,+H,wGAGK,OAEL,uC,oHAQK,OACL,4DACA,2BACA,yIACC,uG,KAED,S,yGAGK,OACL,iE,2GAsBK,kBACL,2D,yGA8BK,OACL,2D,gHAGK,OACL,2E,oIAGK,OACL,kF,2HAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,iIAoBK,OACL,2D,qGAaK,OACL,2D,uGAGK,OACL,2D,6GAGK,OAEL,mI,4GAGK,OACL,iI,4GAGK,OACL,2E,uIAGK,OACL,4F,mIAoBK,kBACL,2D,2GAkCK,OACL,2D,yGAGK,OACL,2D,wGAGK,OACL,qE,sHAGK,OACL,6E,gIAGK,OACL,8D,mCAEC,c,CAED,yB,iHAGK,OACL,yF,mCAEC,c,CAED,yB,qHAQK,OACL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,8IA0CK,OACL,4DACA,2BACA,yIACC,uG,KAED,S,gHAGK,OACL,yF,4HAGK,OAEL,+D,+HAKK,OACL,2DACA,2BACA,yIACC,uG,KAED,S,6GAGK,OAEL,8D,yHAGK,OACL,wF,iHA6BK,OACL,2D,uGAGK,OACL,2D,6GAGK,OAEL,mI,sHAGK,OACL,2E,uIAGK,OACL,4F,mIAGK,OACL,0D,iIAGK,OACL,gG,0IA6BK,OACL,0E,uGAQK,OACL,mF,uGAGK,OACL,qF,sHAKK,OACL,KACA,gCACI,kCACH,0CACA,oDACA,2FAHkB,W,CAMnB,S,oHAGK,OACL,iD,0IAGK,OACL,gF,iJAGK,OACL,mF,uJAGK,OACL,8F,iIAGK,OACL,+C,2GAGK,OACL,qC,6F,4BCrsFC,iB,CAED,gBACA,gBACA,IACA,+BACC,qBACD,2CACC,qBACD,uCACC,qBACD,wCACC,qBACD,gCACC,qBACD,qCACC,qBACD,iCACC,gCACD,uCACC,qBACD,2CACC,qBACD,kCACC,qBACD,uCACC,qBACD,wCACC,qBACD,6CACC,qBACD,2CACC,qBACD,0CACC,qBACD,gCACC,qBACD,8CACC,qBACD,iCACC,qBACD,iCACC,qBACD,mCACC,qBACD,sCACC,qBACD,4CACC,qBACD,oCACC,oEACD,uCACC,qBACD,mCACC,0BACD,iCACC,uEACD,oCACC,qBACD,kDACC,qBACD,0CACC,qBACD,mCACC,qBACD,oCACC,qBACD,oCACC,qBACD,mCACC,qBACD,gDACC,qBACD,kCACC,qBACD,mCACC,qBACD,+BACC,qBACD,mCACC,qBACD,gCACC,qBACD,iCACC,qBACD,iCACC,qBACD,sCACC,qBACD,8BACC,qBACD,yCACC,qBACD,iCACC,6B,MAEA,S,C,iDA6BI,OACL,2B,iHAGK,OACL,8B,0HAGK,OACL,iC,mIAGK,OACL,oC,mIAGK,OACL,yC,mHAGK,OACL,0B,wHAGK,OACL,mCACA,0FACA,+EACA,+C,+GAGK,OACL,2C,+GAGK,OACL,0B,6IAGK,OACL,oC,wJAGK,OACL,2B,uIAwDK,OACL,wE,kIAyBK,OACL,6C,mIAGK,OACL,gF,q12F,4F,4F;yUC9MA,6B,iBAGC,0K,sC,C,8F,iBAMC,0K,sC,CAGD,WACA,uFACA,Q,wBAEC,OACA,W,CAGD,IACA,sCACC,uFACA,W,M,iBAGE,gEACA,S,wBAEA,wEACA,S,uBAEA,wEACA,S,C,uBAGD,gEACA,S,C,gBAGA,W,CAED,M,C,SAIA,0K,sC,C,mBAMA,kF,mDAGA,Q,C,mE,CASF,sCACC,uFACA,W,8CAGC,S,C,gBAGA,W,CAED,M,CAGD,mC,W,+J,MAKU,+C,e,uE,MAEA,oE,mBACT,2C,6E,aAGA,iB,SAEC,K,CAEG,qCACA,mE,gB,gF,CADoB,a,C,C,C,CAOzB,8BACA,8C,gC,iDAMA,yI,WAEE,+BACA,sCACC,uF,WAEC,+B,MAEA,uFACA,0B,C,CAGF,wB,C,KAGF,S,2B,uBA0BC,S,CAED,mD,wM,4F,4F,245C,glK,gL;iQ,8CC3IC,a,C,UASA,IACA,mHACC,a,C,CAIF,IACA,oCACC,aAED,yFAGC,IACA,UAKC,cAED,gBAKC,6CAED,gBAEC,YAED,gBAGC,a,C,CAKF,Y,2BAoEA,c,0EAIA,gBACI,yCACH,kB,W,sBAGE,W,MAEA,W,C,CANqB,W,C,qBAYvB,S,CAGD,wCACA,IACI,yCACI,kBACP,sBACC,wFACA,WACD,iBACC,wFACA,gJACA,4IACA,W,MAEA,qGACA,W,CAZsB,W,CAexB,yB,kL,4F,4F,4F,4F,4F;mqBCtMK,OACF,S,0CACF,S,CAED,a,qGAIK,OACF,S,0CACF,S,CAED,a,mGAWK,OACL,mBACA,mBACA,QACA,S,8EAIkB,kE,uDAIb,OAAqB,a,kGAGrB,O,cAEJ,a,CAED,mB,qGAIK,O,cAEJ,a,CAED,mB,uGAIK,O,wBAEJ,S,C,sHAKI,OACL,SACA,SACA,SACA,SACA,SACA,SACA,mBACA,S,2HAIK,OACL,kD,4HAIK,OACL,mBACA,mBACA,aACA,aACA,aACA,mBACA,S,8GAKK,O,eAIJ,Y,CAED,e,iHAIK,OACL,aACA,+B,sHAIK,OACL,aACA,oC,4HAKK,O,kBAEJ,a,CAGD,+B,uIAKK,O,kBAEJ,a,CAGD,0B,iIAKK,O,mCAEJ,O,CAGD,6B,4HAKK,O,mCAEJ,O,CAGD,kC,8HAKK,O,wCAEJ,O,CAED,6B,iIAKK,O,wCAEJ,O,CAED,wB,0IAKK,OACL,aACI,4DACH,mCAD8C,6B,6IAO1C,OACL,aACI,2DACH,8BAD6C,6B;g8TC5LzC,OACL,0GACA,c,qTAGK,OACL,sPACA,6B,2bAGK,OACL,sBACA,wCACC,kGACA,sB,qBAED,sBACA,mCACA,gBACA,S,4O,WAKC,O,C,WAGA,O,CAED,sEAOA,UACA,S,wOCzCK,iBACL,uIACA,OACC,YACD,OACC,aACD,OACC,qIACD,OACC,yI,OAED,mI,gPAyEK,O,+BAEJ,UACA,S,CAED,+DACA,eACA,yBACA,S,qGAIK,OACL,WACA,WACA,S,qGAIK,OACL,yB,yGAUK,OACL,c,4GAIK,O,+BAEJ,Y,CAED,WACA,a,iHAIK,OACL,qD,CAEA,W,qHAMK,OACL,yD,kTAoBK,OACL,U,O,iG,O,c,C,qB,yOA0CA,Y,sD,kBAGG,W,CAED,S,C,kBAGA,M,C,C,kBAKD,W,CAED,UACA,6B,2BAKA,yC,+CAEC,S,CAED,UACA,eACA,S,oNAKA,mBACA,yCACA,qC,OACC,8H,OAED,+BACA,qF,OACC,mJ,OAGD,0CACA,WACA,S,yIAKA,0CACA,WACA,S,wPAQA,oF,O,qBAEE,S,CAED,iI,OAEM,gcACP,OACC,+HACD,OACC,SACD,OACC,sD,QACC,2H,QAED,U,eACD,OACC,W,eACD,OACC,UACD,OACC,UACD,QACC,SACD,QACC,SACD,Q,8BAGE,4B,eAEC,S,C,CAKF,WACA,SAFD,QACC,WACA,SACD,QACC,WACA,SACD,QACC,WACA,iC,eACD,QACC,WACA,iCACA,kD,QACC,uJ,Q,eAEF,QACC,UACA,S,QAEA,kK,QAED,S,qKAMA,uCACC,S,CAED,WACA,S,sOAMA,OACQ,kDACP,O,qBAGC,WACA,mCACA,mD,OACC,4I,OAGD,oDACC,qDACD,+BACC,UACD,kCACC,U,MAEA,U,CAED,gB,O,qBAGF,S,8TAMA,6F,kS,qBAOC,WACA,S,CAED,8F,sT,qB,WAQE,W,MAEA,W,CAED,S,CAEG,IACJ,YACC,W,WAEC,WACA,M,C,CAGF,mD,OACC,4I,OAED,UACA,S,2KAOK,OACL,W,iBAEC,Y,CAED,IACA,4DACC,Y,CAKE,4C,UACF,Y,CAED,a,mSAOA,OACC,+GACA,OACI,W,6BACF,c,CAID,6IADD,OACC,6IACD,OACC,gB,O,qBAGF,UACA,S,yUAQA,iD,OACC,gL,OAEE,+D,OAEF,8F,OACC,gL,OAED,U,qBAEA,W,OAED,S,mKAGK,OAEL,eAEA,e,kCAEC,2B,CAED,e,kBAEC,e,C,mBAGA,eACA,0B,CAGD,c,iBAGC,SACA,a,CAED,Y,gSAMA,OACC,+GACA,OACI,W,6BACF,c,CAID,wIADD,OACC,wIACD,OACC,gB,O,qBAGF,WACA,S,kUAMA,OACC,6EACA,OACC,4IACD,OACC,gB,O,qBAGF,WACA,S,oIAKA,wB,4BAKA,yB,4BAKA,4C,8CCpgBK,YACL,S,6HAKK,YACL,S,+HAoCK,OACL,iC,kHAGK,OACL,2B,2GAGK,OACL,Y,kTAGK,OACL,mDACA,8IACC,uG,yBAED,kB,0cAGK,O,eAEJ,S,CAED,sBACA,8IACC,oL,yBAED,S,waAGK,OACL,mG,mOAWK,OACL,mD,0RAGK,OACL,qH,+NAGK,OACL,Y,qGAGK,OACL,gE,uHAaK,OACL,qC,kIAGK,OACL,yB,qWAGK,OACL,K,qBAEC,8I,QAEE,W,CAED,iB,KAED,a,CAED,iJ,QAEE,Y,CAED,gG,yBAED,S,8RAGK,OACL,Y,wVAGK,O,eAEJ,S,CAEG,SACJ,0IACC,sC,KAED,mCACA,6IACC,oM,yBAED,S,ocAGK,OACL,mG,yOAcK,OACL,6B,kSAGK,OACL,2H,+NAIK,OACL,Y,gTAGK,OACL,gO,8PAYK,OACL,gC,wHAGK,OACL,yB,qWAGK,OACL,KACA,iJ,QAEE,U,CAEE,0E,OACF,wGACA,kB,OAED,gG,yBAED,S,8RAGK,OACL,Y,gTAGK,O,eAEJ,S,CAED,yBACA,6IACC,oL,yBAED,S,mOAaA,gC,yEAMK,OACL,QACA,S,iHAMK,OACL,OACA,S,+GAGK,OACL,e,yGAGK,OACL,Y,qGAGK,OACL,+C,mHAYK,OACL,yC,qIAGK,OACL,KACA,+I,QAEE,U,CAED,Q,KAED,S,yGAGK,OACL,Y,qGAGK,OACL,kE,0GAUK,OACL,yB,2GAGK,OAIL,S,uGAGK,OACL,U,yGAGK,OACL,Y,qGAGK,OACL,0B,0GAUK,OACL,0B,2GAGK,OAIL,U,uGAGK,OACL,Y,yGAGK,OACL,Y,qGAGK,OACL,0B,gHAaK,OACL,qD,6HAGK,OACL,KACA,2IACC,Y,KAED,S,yGAGK,OACL,Y,qGAGK,OACL,iE,gHAcK,OACL,kC,qHAIK,O,8CAEJ,uC,CAED,iB,WAEC,mC,CAED,2B,oUAGK,OACL,iGACG,qC,MACF,Y,CAED,2IACC,Y,KAED,S,yQAGK,OACL,Y,qGAGK,OACL,wE,+GAWK,OACL,2B,mHAGK,O,WAEJ,a,CAED,c,yGAGK,OACL,Y,qGAGK,OACL,kC,ggBAqBK,OACL,uGACA,oEACA,OACC,qE,sCAEC,iB,CAED,4C,OACC,oK,OAED,wBACA,aACA,0BACA,cACA,YACA,eACA,oBACD,OAEI,yT,OACF,iB,OAED,iBACA,oBACA,oB,O,sDAIA,gE,mCAEC,iBACA,kCACA,oBACA,oB,C,CAIF,oC,mCAEC,cACA,W,CAED,mC,mCAEC,aACA,U,8BAEC,cACA,W,C,CAIF,wE,QACC,eACA,8B,e,QAEA,eACA,+B,uBAEA,oCACA,mE,QAGC,2D,QACC,gK,QAED,eACA,Y,gDAGC,aACA,wB,C,kDAGA,cACA,0B,C,Q,QAIH,mE,QACC,qK,QAED,oB,kbAKK,OACL,iC,cAEC,6BACA,wD,YAEC,gC,CAED,0D,aAEC,kC,C,C,6HAKG,OACL,c,yGAGK,OACL,Y,uGAGK,OACL,4GACA,aACA,S,qHAYK,OACL,8B,2HAGK,OACL,gB,yGAGK,OACL,Y,qGAGK,OACL,6C,0GAWK,OACL,yB,6GAGK,OACL,gB,yGAGK,OACL,Y,qGAGK,OACL,0B,+GAWK,OACL,2B,iHAGK,OACL,S,uGAGK,OACL,iB,yGAGK,OACL,Y,qGAGK,OACL,kC,ySAcK,OACL,KACA,aACA,WACC,OACD,iBACC,UACD,iBACC,S,MAEA,2C,CAED,wD,OACC,kL,OAED,6J,oPAGK,OACL,Y,uGAGK,OACL,aACA,WACC,yDACD,iBACC,4DACD,iBACC,2D,MAEA,2C,C,yHASI,OACL,8C,wWAGK,OACL,4e,wSAQK,OACL,8C,8WAGK,OACL,+e,uSAQK,OACL,8C,4WAGK,OACL,8e,uSAaK,OACL,gC,mTAGK,OACL,iD,OACC,iJ,OAED,2J,sOAGK,OACL,Y,yTAGK,OACL,6O,maCpyBK,O,eAEJ,c,CAED,+K,kdAaA,KACA,mBACA,SACA,2GACA,Y,8YAIK,OACL,+C,OACC,+B,qBAEA,mH,OAED,mG,yOAIK,OACL,+B,+GAKsB,cAAjB,OACL,qBACA,c,uHAK0B,cAAJ,cAAjB,OACL,qBACA,qBACA,c,0SAIK,O,kBAEJ,wG,CAED,cACA,mHACA,kB,mbAIK,OACL,OACC,kG,oBAEC,c,C,qB,qB,ocAOG,OACL,OACC,kG,oBAEC,c,C,qBAGF,W,qB,0OAQA,8D,kXASK,OACL,mGACA,0F,eAEC,I,CAED,wBACA,sB,WAEC,I,MAEA,WACA,S,CAED,uBACA,4FACA,6C,OACC,gI,O,0L,4hBAMI,OACL,cACA,iMACA,qG,gbAIK,OACL,6G,kbAIK,OACL,4GACA,gD,OACC,oG,OAED,S,idAIK,OACL,4GACA,gE,OACC,oG,OAED,S,6cAIyB,cAApB,OACL,qK,2cAIK,OACL,aACA,mE,OACI,qC,MACF,U,CAED,+C,OACC,gGACA,c,OAED,8B,OAED,O,sQAIK,OACL,cACA,QACA,qBACA,U,4HAIK,OACL,aACA,cACA,e,wiBAOK,OACL,+IACA,mBACA,gCACA,SACA,0FACA,2FACA,c,0C,wqBAKK,OACL,yDACA,6K,OACC,gGACA,O,OAED,4H,OACC,yK,O,2iBAMD,8WACA,WACC,YACD,gB,eACA,gB,eACA,gBACC,gJACC,2H,QACC,a,Q,2BAGF,YACD,gB,eACA,gB,eACA,gBACC,wHACD,gB,0BAEC,kI,QAED,a,sjBAMK,OACL,6LACA,kIACC,iI,OACC,oGACA,8I,QACC,8BACA,cACA,wBACA,4BACA,yGACA,c,QAED,a,OAEM,gPACP,QACC,0H,uBAEA,iB,Q,qB,qB,6jBASG,OAEL,gIACI,YACJ,sCACA,mE,OACC,6F,OAED,4GACI,YACJ,iHACA,kI,OACC,6J,OAED,6FACA,c,kmBAMK,OACL,gMACA,0IACC,kGACA,wIACA,O,4B,OAGA,Y,qBAED,0HACA,Y,qfAKK,OACE,qLACP,OACC,8BACD,OACC,iG,OAEA,0G,OAED,iB,kkBAQK,OACE,8RACP,O,0GAEA,O,2GAEA,O,0GAEA,O,6GAEA,O,gHAEA,O,4G,OAGA,W,6U,spBAOK,OACD,SACJ,sGAEA,OACI,wJ,OACF,wFAKA,oGACG,sN,QACF,kGACA,6BACA,eACA,6BACA,4D,QACC,4D,QACC,c,QAED,qJ,Q,e,QAGD,e,uBAEA,a,Q,OAGF,c,qBAED,wCACA,QACQ,sRACP,QAEC,yG,eAEC,W,CAED,SACD,QAEC,WACA,2L,uBAEA,sG,Q,uB,smBAKG,OAEL,oD,OACC,4I,OAGD,8JACC,uPACA,OAEC,uK,O,yB,u5BAKG,OACL,2DACA,qBACA,+FACI,YACJ,4GACA,0JACA,O,cACA,OACC,mC,OASC,qI,OACC,0FACA,4LACA,6LAEA,c,Q,OAGF,8GACA,sI,QACC,mI,Q,O,uF,2wBAUG,OACL,mO,ubAOK,OACL,0O,+bAOK,OACL,wO,kbAMK,OACL,sM,2bAMK,OAEL,4G,eAGC,2C,CAED,2N,sgBAOK,OACD,KACJ,4GACA,wDACA,OACC,iCACA,mE,OACC,6F,OAED,I,qBAEA,wH,OAEG,SACJ,kJ,OACC,WAEA,0G,QAED,mD,2iBAOK,OACL,mMACA,OACC,gGACA,6F,sCAEC,Y,CAEM,4OACP,OACC,c,eACD,OACC,gI,eACD,QACC,W,eACD,Q,uBAEC,6J,QAED,c,qBAED,sD,QACC,yH,QAED,S,+mBAQK,OACL,0F,mCAEC,iB,CAED,iI,OACC,2LACA,6HACC,yL,qBAOD,yNACA,QACC,4N,eACD,QACC,+N,eACD,QACC,kP,uBAEA,I,Q,OAGF,S,4oBAYK,OACE,2ZACP,OACC,gI,eACD,OACC,yD,QACC,qJ,QAED,0CACD,OACC,uBACD,OACC,uBACD,OACC,8GACD,OACC,+BACD,OACC,uCACD,OACC,gIACA,qE,QACC,+F,QAED,SACD,QACC,wHACG,yJ,QACF,wK,QAED,SACD,QACC,iCACA,qE,QACC,+F,QAED,kC,QAED,WACA,iB,6UAIK,OACL,2I,cAEE,a,C,yFAGA,Y,C,KAGF,a,2HAIK,OACL,6B,wVAKK,OACL,qBACA,0I,kGAEE,S,C,KAGF,qOACA,iB,i+lB,4F,4F,4F,4F,4F,4F,4F,4F,6K;unJCppBiC,IAA5B,OACL,sD,yGAIK,OACL,sB,qGAIK,OACL,6B,gHAI6B,IAAxB,OACL,8H,oTAIK,OACD,+C,6GAEF,4G,CAF6B,W,CAK/B,8IACA,S,0PAMK,OACL,S,+E,sBAOC,2B,CAED,S,0SAIK,OACL,mBACA,qE,OACC,uJ,qBAEA,gIACA,8M,OAED,qG,sSAMA,a,sCAEC,IACA,uCACC,UACD,4CACC,U,UAEA,U,C,C,2RAWG,OACD,S,yBAEH,gE,CAED,4C,OACC,oM,OAED,qG,itBASK,OACL,yHACA,8FACA,sEAKA,uE,OACC,+R,OAED,wGACA,Y,4rBAOK,O,sBAEJ,S,CAEG,sDACJ,iF,kB,kB,aACC,uE,OACC,kB,O,iBAGA,uB,CAED,6H,yBAEG,K,iBAEH,4C,CAED,S,goBAKoB,IAAf,OACL,QACA,6UACA,gBAGC,4GACA,2D,QACC,sG,Q,cAEF,gBACC,mK,cACD,gBACC,gJACC,gG,2B,cAEF,gBACC,qG,cACD,gBACC,wG,cACD,gBACI,kL,QACF,+G,Q,cAEF,gBACC,mK,yBAEA,6H,O,ywBAM+C,IAA3C,OACL,iDACA,qGACA,qBACA,oC,OACC,uJ,OAED,oE,OACC,wC,OACC,gG,sBAEA,gG,Q,c,OAGD,gG,O,kdAMU,I,iB,mC,CAKX,WACA,mCACC,YACD,gBACC,WACD,yBACC,gDACD,yCACC,aACD,4CACC,2CACD,yBACC,qBACD,sDACC,4CACD,iBACC,O,MAEA,Y,C,+B,4oBAKwB,IAApB,UACL,cACA,uDACA,oNAEA,iBACA,6NAA4B,IAAP,I,wCAGnB,iB,C,wCAIA,iB,CAED,oHACA,e,0HAED,wIACA,O,gBAEE,c,CAEG,4CACH,mSAD0B,W,sBAG3B,OACD,O,gBAEE,c,CAED,0TACC,gM,2BAED,OACD,O,cAEE,c,CAED,KACA,QACC,qH,QAEC,e,CAED,yMALO,a,uB,WAQP,c,CAED,OACD,OACC,c,qBAEA,mK,OAED,wE,QACC,0H,Q,oxBAI2B,IAAvB,OACL,QACA,0EACA,4C,OACC,oJ,OAGD,0GACA,cACA,SAEA,kDACA,wG,knBAW4B,IAAvB,O,eAEJ,S,CAED,QACA,6IACC,sGAEA,kM,OACC,yL,O,yBAGF,0IACC,oG,K,a,ihBAK8C,IAA1C,OACL,0D,OACC,6N,O,4pBAIqE,IAA3C,IAAtB,OACL,2FACA,mPACA,gBACC,oHACD,gBACC,oHACD,gBAEC,qHACD,gBAEC,4GACD,gBACC,yH,OAED,QACA,6GACA,yPACA,iBACC,qHACD,iBACC,SACD,iBACC,gI,eACD,iBACC,iHACD,kBACC,8H,QAED,sIACA,mC,gqBAOK,OAIL,QACA,0KACA,OACC,8GACD,OACC,yHACD,OACC,qDACA,uG,OACC,+I,OAED,+GACD,OACC,+I,OAED,S,kRAIA,6F,wQAG2F,IAA9D,IAAxB,OACL,QACA,0H,ihBAG2F,IAA9D,IAAxB,OACL,QACA,qD,OACC,oJ,OAED,mI,OACC,iJ,OAGD,+GACA,0H,yiBAGoG,IAApE,IAA3B,OAEL,QACA,uLACA,qD,OACC,sGACA,S,OAED,uI,+kBAM+G,IAA5E,IAAL,IAAzB,OACL,YACI,4CACH,kMADoB,W,qBAIrB,6M,kmBAG8G,IAAlF,IAAvB,OACL,QACA,UACA,4GACA,oC,OACC,oJ,OAED,8G,kzBAMyG,IAAP,IAAzE,IAApB,O,iBAEJ,S,CAED,WACA,6FAGA,I,oCAEC,W,CAEE,iE,OACF,8G,OAED,2BAEA,oGACA,mC,OACC,sJ,OAED,+EACA,OACC,+IACA,qC,QACC,4GACA,qD,QACC,uK,QAGD,qC,QACC,4K,QAED,U,QAED,+J,eACD,QAEC,oHACA,wP,QACC,qC,QACC,8J,QAED,yGACA,iD,QACC,mIACA,Q,eAEA,QACC,yM,eACD,QACC,qJ,Q,QAGF,U,Q,QAGF,8JACA,mC,4tCAWiG,IAApE,IAAL,IAAnB,O,kBAEJ,iB,CAED,WACA,Y,gBAEC,W,CAED,YACA,ugB,OACC,kGACA,uC,QACC,0T,Q,c,OAGD,8S,OAED,iI,QAEC,+R,QAGD,oBAEA,KACA,kDACC,yYADoC,a,uBAIrC,yI,QACC,oSACA,4CACC,0RADoB,a,uB,QAKtB,+C,QACC,sMACA,yI,QACC,8C,QAGC,uG,uBAIA,oG,Q,QAGF,uM,QAED,qGAEA,+I,QACC,QACA,kW,QAED,uF,g0BAKA,0KACA,OACC,Y,OAED,a,2bAI4B,IAAvB,OACL,8C,OACC,2L,OAEC,gG,OAED,qI,OAED,4N,OACC,+D,QACC,4FACA,6I,QACC,S,Q,QAQF,obACA,QACC,4FACA,gD,QACC,kJ,Q,eAEF,QACC,W,uBAEA,+J,Q,QAGF,S,20BAGuB,IAAlB,OACL,QACA,6UACA,gBACC,0GACD,gBACC,yH,QACC,kG,QAED,oI,cACD,gBACC,8NACD,gBACC,4NACD,gBACC,+MACD,gBACC,0NACD,gBACC,qO,OAED,gZACA,QACC,8GACD,QACC,iHACD,QACC,+GACD,QACC,iHACD,QACC,4I,QACC,wH,Q,eAEF,QACC,gHACD,QACC,yH,QAED,iJACA,mC,kuBAGK,OACL,QACG,0E,OACF,gLACA,kBACA,S,OAED,kIACA,mC,qhBAGK,OACL,QACG,0E,OACF,gLACA,oBACA,S,OAED,oIACA,mC,4hBAGK,OACL,QACG,mF,OACF,gLACA,kBACA,S,OAED,qIACA,mC,uiBAGK,OACL,QACG,oF,OACF,gLACA,oBACA,S,OAED,8IACA,mC,qjBAGK,OACL,QACG,qF,OACF,gLACA,sBACA,S,OAED,mIACA,mC,yhBAGK,OACF,uF,OACF,gLACA,2BACA,S,OAED,qIACA,mC,yoBAGkC,IAA7B,OACL,QACA,waACA,gBACC,qHACD,gBACC,SACD,gBACC,sHACD,gBACC,uHACD,gBAEC,kJ,eACD,gBACC,2GACD,gBACC,uHACD,gBACC,yHACD,gBACC,4G,QAED,sKACA,mC,koBAMa,IACb,8D,c,+B,C,qCAKE,c,CAL8D,+G,gC,6ZAaxB,IAAnC,OACL,QACA,qGACA,oC,OACC,6I,OAED,0G,qhBAKmB,IACnB,+C,OACC,6F,O,iBAGA,uC,CAGD,0R,OACC,sW,OACC,W,uBAEA,WACA,mBACC,wB,C,Q,OAIH,4G,gNAOK,OAAwB,iB,sHACxB,OAAwB,4V,sIAIxB,kBAAgC,4Q,0HAIhC,kBAAiC,8Q,sHAIjC,kBAAkC,oN,kUAIlC,kBAAmC,qX,2b,iBAKvC,S,CAED,qRACA,OACC,8L,cACD,OACC,8L,cACD,OACC,8L,cACD,OACC,8L,OAED,S,gUCzzBA,KACA,0FACA,S,oaAKA,qE,kB,kB,aACC,8F,uBAEC,sD,CAED,8H,OACC,gS,OAED,2G,yB,8PAOD,kE,kB,a,aACC,2F,K,8NAOD,wYACA,OACC,YACD,OACC,Y,OAED,a,wfAKA,qE,OACC,2GACA,4DACG,0F,gBACF,e,C,OAGC,0E,gBACF,e,CAED,0C,ywBASA,8FACA,wIACC,8FACI,QACD,uI,OACF,6I,OAED,+FACA,OACK,kBACJ,gJACA,QACC,U,eACD,QACC,0C,uBAEA,wK,QAED,0J,QACC,kJ,QAED,qI,eACD,QACC,gD,QACC,2L,QAED,wP,QACC,6K,QAEE,wJ,QACF,K,uBAEA,wM,Q,uBAGD,oK,Q,yBAGF,uH,ukBAOA,8LACA,mC,OACC,mI,OAED,WACA,2CACC,0B,CAED,uI,otBAQA,8FACA,WACA,mI,OACC,iJ,OAED,uH,OACC,gR,OAED,6FACI,YACJ,mI,QACC,sD,QACC,8M,QAED,wL,uBAEA,sD,QACC,8L,Q,QAGF,2BACA,+IACC,wGAEI,aACJ,sJ,QACC,kG,uBAEA,K,QAED,8L,QACC,qG,QAED,sJ,QACC,yL,QAED,wF,2BAED,oGACA,+I,QACC,oY,QAED,sM,kmBAMA,uLACA,S,wWAMA,uH,OACC,S,OAED,qDACC,uFACA,uH,OACC,c,O,yBAGF,S,sXAMA,sH,OACC,S,OAED,qDACC,uFACA,sH,OACC,c,O,yBAGF,S,0WAKA,uL,c,oJA2Bc,IACd,WACA,UACC,oBACD,4CACC,oBACD,sDACC,oBACD,yBACC,oBACD,yBACC,oBACD,iBACC,oB,CAED,a,0fAKA,8FACA,sB,sCAEC,gB,C,kBAGA,iB,CAED,wIACC,8FACA,sB,sCAEC,gB,CAED,QACA,4C,OAGC,qBACC,iJACD,2BACC,oJ,MAEA,iB,C,qBAGD,oLACA,OACC,sB,eACD,OACC,6E,eACD,QACC,wB,eACD,QACC,mE,eACD,QACC,wM,eACD,QACC,qE,uBAEA,oC,Q,O,MAID,uB,C,yBAGF,wB,ujBAMA,iHACA,a,+iBAKA,8FACA,sB,sCAEC,gB,CAED,8FACA,sB,sCAEC,gB,CAED,QACA,4C,OAGC,qBACC,iKACD,2BACC,kK,MAEA,iB,C,qBAGD,wJACA,OACC,iBACD,OACC,sB,eACD,OACC,8E,eACD,OACC,sM,eACD,QACC,wF,uBAEA,oC,Q,OAGF,oB,0gBAMA,uG,yCAEC,Y,CAED,wG,6WAMA,uG,sCAEC,gB,CAED,qB,sWAMA,uG,sCAEC,gB,CAED,qB,4ZAeA,IACA,4IACK,SACJ,oJACA,OACC,K,cACD,OACC,K,cACD,OACC,K,cACD,OACC,K,cACD,OACC,K,qBAEA,kB,OAED,2GACA,4FACA,S,yBAED,yG,gZ,6BAOC,S,CAEG,sDACJ,qHACA,qB,sUAMA,+K,shBAkBA,IACI,6CACH,uFAEA,6C,OAHuB,W,c,OAOvB,yGAEA,uC,OAGC,yJACA,OACC,6F,eACD,QACC,6F,eACD,QACC,6F,eACD,QACC,6F,eACD,QACC,6F,uBAEA,6FACA,sCACA,yHACA,yH,Q,qBAID,6CACA,gD,QACC,kH,uBAEA,sI,QAED,kB,OAED,SAvCuB,W,qBAyCxB,+G,sfAMA,oI,OACC,S,OAEG,sDACJ,qHACA,qB,6JAIA,IACA,2CACC,Y,CAED,oB,4MAMA,+K,sUAMA,0L,+aASA,QACI,K,kBAGH,wH,CAED,oC,OACC,4IACC,+L,MAEC,uF,C,yBAGF,6F,OAED,S,0ZC3iBK,OACL,SACA,8F,ggBAMA,+C,OAEC,oK,OAED,wIACC,6G,sCAEC,iB,CAED,oBACA,YAOI,S,eAEH,Q,C,iBAGA,I,MAEA,W,CAED,mG,sCAEC,iB,C,yBAGF,oB,gaAiBK,OACL,SACA,8F,8bAKA,yG,sCAEC,iB,CAED,+C,OACC,2K,OAED,8F,oMCxEK,OACL,SACA,qIACC,e,KAED,S,2HAGK,O,WAEJ,2C,CAED,iBACA,YACA,UAEC,gFACA,qBACC,gFACA,iCACC,6BACA,OACD,qBACC,6BACA,OACD,sBACC,6BACA,O,C,C,CAIH,+C,iGClCA,oCAGA,SACA,S,0DAIK,OACL,c,yGAMK,OACL,SACA,yDAMA,S,uGAIK,O,sBAEJ,8FACA,UACA,gBACA,eACA,W,C,2nBAUI,OACL,iBACA,S,sBAEC,oB,CAED,iF,kB,kB,a,eAEE,4GACA,kB,CAGD,mBACA,uG,yBAED,2GACA,4DACA,oF,kB,a,aACC,6G,KAED,mF,kB,a,cACC,gI,KAED,oB,mhBAIK,OACL,aACA,cACA,WACA,wBACA,0BACA,S,+UAMK,OACL,SAGA,I,kBAEC,W,CAGE,wM,OACF,iB,OAEA,S,OAED,oB,kTAIK,O,sBAEJ,c,CAGD,+CACA,8E,kB,a,OACC,e,KAED,S,wHAQK,OACL,SACA,cACA,eACA,S,ibAOK,OACL,SACA,0GACA,2DACA,2GACA,0BACA,S,uWAKK,O,sBAEJ,c,CAED,oE,yYAUK,OACL,SACA,2GACA,2KACA,6G,sCAEC,iB,CAGD,qE,kB,kB,aACI,+K,OACF,iB,O,yBAGF,oB,kkBAOK,O,2BAEJ,4D,CAED,SACG,+G,OACF,4GACA,uG,MAGC,wB,CAED,oC,OACC,wK,O,OAGF,uGACA,uB,orO,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F,8F,4H,2G,2G,wC,8C,4C,mC,mC,mC,kC,kC,mC,8C,kC,iC,kC,mC,mC,2d;opKC1FA,8F,2BAKC,iB,MACS,oB,gB,+BAER,S,CAGD,wB,C,CAEE,4E,MACF,S,C,wBAIA,S,C,kEAcA,S,CAED,S,kX,mCC/FC,iB,CAEE,iJ,OAEF,S,OAED,8FACA,yDACC,0F,qBAED,oG,4X,mCAaC,iB,CAED,8FACA,mTACC,0F,qBAED,oG,4cAMA,+C,OACC,4eACA,gBACC,YACD,gBACC,YACD,gBACC,YACD,gBACC,YACD,gBACC,YACD,gBACC,YACD,iBACC,Y,Q,OAGF,8IACC,4K,2BAED,uG,0ZC3GK,kBACL,6O,gOAImB,eAAd,kBACL,wJ,4UAWK,kB,gBAGJ,S,CAED,6HACA,kD,OACC,kH,OAED,oD,OACC,oH,OAED,kD,OACC,oH,OAED,mD,QACC,mH,QAED,sD,QACC,sH,QAED,S,ubAmGK,Y,cAEJ,2E,CAED,+I,+NAMA,IACA,0CACC,Y,CAED,a,8BAKA,IACA,sCACC,Y,CAED,a,mNAyBK,Y,aAEJ,2E,CAED,+I,oZA6BK,Y,aAEJ,2E,CAED,iJ,6ZAgBK,YACL,IACA,UACC,oBACD,gBACC,mBACD,gBACC,qB,CAED,+I,2ZA+BK,Y,aAEJ,2E,CAED,iJ,oZAwBK,Y,aAEJ,2E,CAED,8I,0aCjUA,wB,QAGC,a,C,eAGA,4C,UAGC,a,C,CAQF,oI,yJAQA,iI,4VAgBA,oB,WAEC,S,CAKD,6BACA,gDACC,oB,WAEC,Y,CAED,4D,gBAEC,c,CAID,mH,OAGC,IACA,qIACC,W,CAED,sG,cAEC,yG,CAED,qDAIA,+D,qBAGA,sCACA,0E,O,qBAGF,S,oPAKA,iD,gPAKA,IACA,wIACC,2BACA,+GACA,OACC,2B,cACD,OACC,mC,cACD,OACC,mC,qBAEA,iJ,O,yBAGF,S,kK,kBAMC,S,CAGD,gFACA,kCACC,sBACD,iB,uGAKE,sB,CAED,sB,CAED,S,8BAKA,IACA,0CACC,Y,CAED,a,+SAKA,8FACI,mDACJ,wBACI,yCAEH,qDACI,KAEJ,uHACC,0F,MANsB,W,S,CAUvB,gCACA,iBACA,S,8EAEC,gB,CAdsB,W,C,UAkBvB,S,CAED,8BACA,kB,+fAoCA,qG,UAEC,S,CAED,6IAaA,yIACC,IACA,oHACC,iBACD,iB,uHAIE,iB,C,M,sBAIA,e,C,C,KAIH,8F,qDAEC,iB,CAED,yB,6cCnEK,OACL,6IACA,OACC,oHACA,4KACD,OACC,qMACD,OACC,iL,OAED,sC,gcAMA,0H,ybCtLA,QACA,sJACI,YACJ,uF,OACC,6B,c,OAEA,6L,O,sCAIG,kE,kBACF,cACA,mBACA,c,CAED,S,CAED,6FACG,kE,kBACF,eACA,mB,CAED,iB,wNAqDA,8K,mXAmBwB,eAAnB,OACL,6UACA,gBACC,0GACD,gBACC,4HACD,gBACC,0GACD,gBACC,+HACD,gBACC,8GACD,gBACC,0GACD,gBACC,8H,OAED,iJ,qnBAI8B,eAAzB,O,iCAGJ,S,CAED,iBACA,qBACA,+UACA,OACC,SACD,OACC,mIACA,QACC,uCAGA,UACA,mBACC,wC,MAEA,2C,C,eALF,QACC,UACA,mBACC,wC,MAEA,2C,C,eAEF,QACC,wC,eACD,QACC,qL,QAKA,iI,Q,eAEF,OACC,0CAEA,U,eACD,OACC,0C,eACD,OACC,6C,eACD,OACC,4C,eACD,OACC,yC,eACD,OACC,2C,eACD,O,eAEA,QACC,UACA,4C,uBAEA,+C,QACC,4C,uBAEA,mJ,Q,QAGF,UACA,UAEA,gBACC,4C,MAEA,yC,CAED,0GACA,S,mTAMA,IACA,uCACC,yBACD,6CACC,eACD,6CACC,e,CAED,c,6iB,kBAWC,O,CAED,iBAEA,SACI,2CACA,kG,4BACC,uH,MAFmB,W,c,C,CAMvB,6BANuB,W,qBAQxB,IACA,qIACC,gO,+FAEE,W,kBAEC,O,C,C,K,KAKJ,0DACA,qBAEA,wIACC,gMACA,kPACC,oG,iBAEC,gKACC,kB,MAED,yB,C,0BAGF,U,yBAGD,gJACC,2C,MAED,S,ybA4BG,Y,eACF,4NACA,8H,uHAEC,S,C,CAGF,oB,6PAKA,4IACC,uH,OACC,S,O,yBAGF,S,mLAKG,iD,cACF,I,CAEE,iD,cACF,I,CAED,a,gCAKA,gG,0CAkBU,eACV,UACA,UAEC,UACD,gBAEC,uHACD,gBAEC,2B,CAED,S,mSAMY,eAAH,e,iBAER,S,C,iBAGA,S,C,YAGA,S,CAGD,eACA,oB,YAGC,YACA,S,CAGD,aACA,gB,YAGC,UACA,S,CAQE,yH,OACC,2J,OACF,S,O,OAIF,0P,4eAO8B,eAAzB,OACL,mHACA,gE,OAIC,6JACA,sG,iBAKC,kBACA,+DACA,S,C,OAGF,uHACA,kG,qiBAI4B,eAAvB,O,eAEJ,S,CAED,8IACC,wG,yBAED,S,mhCAOyC,eAApC,OACL,aAEA,yE,kB,a,wBACC,6G,KAED,4GACA,gKACA,mC,OAEC,yE,kB,a,wBACC,gH,KAED,oF,mB,c,iBACC,wG,MAED,mF,mB,c,iBACC,uG,MAED,+F,mB,mB,iBACC,0G,0BAED,kG,mB,mB,iBACC,8G,2BAED,+F,mB,oB,iBACC,0G,4B,OAGF,Y,y6BAIgC,eAA3B,OACL,0IACA,+C,OACC,0G,OAED,S,+mBAK4B,eAAvB,OAGL,6FACA,qGACG,2H,MAEF,Y,CAED,gBACA,4C,OAGC,kH,OACC,6L,OAKD,2K,OAKD,0C,OAGC,gBACA,8C,QACC,WACA,wKACA,mG,QAED,I,OAED,gH,spBAK+B,eAA1B,OAEL,oIACA,oC,OAEI,uK,OACF,uC,O,OAIF,uD,OACC,mN,OAKD,S,sjBAMoC,qBAA/B,OACL,qDAA4B,e,iBAG1B,a,C,uEAKA,Y,CAGD,kB,UAMD,0HACA,uI,qsBAoB4B,eAAvB,OACL,oFACA,gDACC,+HACA,SACA,4G,OACC,I,2BAEK,wC,8FAEF,IACA,M,CAHwB,W,C,CAOvB,qCACH,sX,OACC,0BACA,sBACA,S,QAJmB,W,qB,c,OAQrB,WACA,Y,0EASE,gB,MAEA,gB,CAEF,kBACC,gB,CAED,I,O,uDAIA,U,gBAGC,a,CAED,2BACA,I,CAED,gE,QACC,6P,QAED,wC,qBAGD,iE,Q,mCAEE,6B,CAED,gH,QAED,S,0tBAKqB,eACrB,6C,OACC,mC,UAIC,Y,CAGD,2L,OAGD,iG,WAEC,Y,CAED,6C,OAQI,8E,OACF,yN,O,OAMF,gD,OAKK,gHACH,kMACA,iD,uBAED,oB,Q,qBAIA,W,CAID,iD,gfAIK,OACF,wH,OACF,8J,OAED,sG,giBAIK,OACF,sH,OACF,8J,OAED,wG,kiBAIK,OACF,sH,OACF,8J,OAED,oG,+wBAKK,OACL,4E,kB,kB,OACC,uG,yBAED,6E,kB,kB,OACI,qM,OACF,qD,O,yBAGF,sF,kB,kB,aACC,iG,0BAED,2F,mB,c,iBACC,W,MAED,0F,mB,c,iBACC,W,M,seAKI,OACL,wB,eAEC,4D,CAED,S,0TC/uBA,qGACA,uC,OACC,wL,OAED,qG,oYAKA,qGACA,uC,OACC,uL,OAED,oG,2XAKA,qGACA,uC,OACC,oG,OAED,oG,2WAKA,qG,UAEC,S,CAED,oG,ybA6FA,+DACA,gBACI,4CAIH,qDACA,iI,OACI,uF,sBACF,gCACA,iBACA,S,C,c,O,c,OAMD,6JACA,S,OAhBsB,W,qB,UAoBvB,S,CAED,8BACA,kB,2kBAMI,mDACJ,mGAGA,gDACC,6C,OACC,U,+BAGC,I,CAED,iMACA,S,iCAGC,I,2BAEK,wC,8FAEF,IACA,M,CAHwB,W,C,CAO3B,0B,MAEA,Q,CAED,oCACA,c,OAED,mH,QAEC,c,C,qBAIA,W,CAED,kE,qB,MAGA,S,uCAEA,wB,CAED,kB,4hBAMA,qG,UAEC,S,C,iBAQA,iB,CAED,8FACG,kI,OAGF,iB,OAED,uEAEC,iBACA,wB,MAEC,iB,C,SAGF,S,mMAUA,S,mUCtOA,oI,kBAEC,S,CAIM,kIACP,mBAGC,SAEA,qIACC,W,C,uBAKA,S,CAED,SACD,iB,yNAGE,S,CAED,SAGD,0FACC,SAGD,0BACC,SAGD,yBACC,SAGD,kCACC,SAYD,kBACC,S,MAIA,IACA,wIACC,W,C,mFAGA,S,C,CAMF,S,0aA2BA,8FACA,kKACC,0F,qBAED,oG,gpBAMI,YACJ,+C,OACC,mKACA,qNACA,gBACC,SACD,gBAEC,kBACD,W,cAEA,WACC,2G,O,qBAGD,8IACC,4K,2BAED,4G,OAKD,8GACA,qE,QAOC,0V,Q,kBAWA,e,CAED,4BACA,gCACI,oDAGJ,kB,OAEC,iB,CAED,KAGI,4CACH,mDACA,M,cAEC,a,oBAEA,a,C,eAGA,6BACA,mBACA,Y,CAED,c,C,sBAGA,0B,OAEC,iB,CAED,a,CAED,yB,gkBAOA,qG,UAEC,gB,CAED,gB,2UAQA,8FACA,W,WAGC,a,CAED,S,mKASI,mDACJ,wBACI,yCAEH,qDACI,KAEJ,mHACC,uFACD,mBACC,YACD,mBACC,Y,MAVsB,W,S,CAcvB,gCACA,iBACA,SAhBuB,W,C,UAmBvB,S,CAED,8BACA,kB,4BAgFA,WACC,YACD,uBACC,YACD,uBACC,YACD,iBACC,YACD,wBACC,Y,CAED,a,yaCjUK,OACL,cACA,8FACA,+CAEA,uCACA,sE,kB,a,OACC,e,KAED,S,yZAqBK,OACL,iBACA,S,0dAIK,OACL,wGACA,yDACA,kI,OACC,iD,OACC,kT,OAEE,sL,QACF,S,Q,c,OAGD,mB,OAED,iB,wlBASK,OACF,+J,OACF,S,OAED,0G,0fASK,OACL,4H,sCAEC,S,CAED,0G,4xBAMK,OACL,wGACA,yDACA,kEACA,4C,O,kL,O,sF,2C,CAMA,iF,O,+L,O,8BAIC,mF,CAED,0E,OACC,4G,O,4B,66BAaI,OACL,wGACA,sBACA,0GACA,+G,sCAEC,iB,CAKD,wGACA,yDACA,iJACC,WACA,kE,eAEC,Y,CAGD,sBACA,SACA,c,KAED,oB,o0BAOK,OACL,wGACA,yDACA,6E,OACC,yM,OAED,wH,sCAEC,iB,CAED,6CAMA,yGACA,oB,23BAWK,OACL,wGACA,yDACA,6E,OACC,+L,OAED,8G,sCAEC,iB,CAED,qEAQA,oJACC,WACA,kEACA,yF,OACC,iM,OAED,sGACA,kJ,yBAOD,oB,6bAKA,4EAQA,yGACA,S,0XAMK,OACL,wGACA,yDACA,iB,iWAIK,OACL,yDAMA,yGACA,S,uGAIK,OACL,qB,uRAgBK,OACL,+FACA,S,8OAQK,OACL,mBACA,S,2bAKK,OACL,wGACA,yDACA,sE,iiBAyBK,OACL,8F,ygBAMA,+C,OAEC,yK,OAED,wIACC,6G,sCAEC,iB,CAED,oBACA,YAOI,S,eAEH,Q,CAED,8C,OACC,I,qBAEA,4F,OAED,qG,sCAEC,iB,C,yBAGF,oB,uaAiBK,OACL,8F,8bAKA,yG,sCAEC,iB,CAED,+C,OACC,gL,OAED,8F,iaC/WU,eACV,IACA,OACC,sC,gCAEC,oB,mEAEA,8C,CAED,WACA,Q,8F,yBAGE,oB,CAED,wB,CAED,uG,e,MAGE,I,CAGD,yC,CAED,I,qB,ueAaQ,eAET,U,kBAEC,oB,C,8FAGA,uI,CAKD,uG,kBAEC,6C,CAED,gBACA,uC,OACC,4N,OAKD,8MACA,OACC,I,cACD,OACC,I,cACD,OACC,I,O,kBAGA,I,MAEA,I,CAED,iD,qaAIc,eACd,uG,kBAEC,6C,6BAEA,U,CAED,Y,+JAIe,eAEf,U,kBAEC,oB,yGAGA,UACA,Y,CAED,UAEA,iB,sDAWiB,eACjB,U,kBAEC,oB,CAGD,IACA,uFACA,WACC,qBACD,iBACC,qB,CAED,uHACA,Y,kCAIa,eACV,gB,gBACF,8C,CAED,oB,oCAmBmB,e,uBAEf,2F,gBACF,yC,C,CAGF,oB,sCAKA,IACA,aACA,sCAEC,gB,WAEC,S,CAED,wB,kEAGC,yB,yHAGC,c,CAED,mB,CAED,kB,CAED,S,gCAIU,eACV,oB,gCAIS,e,0BAER,Y,oDAIA,Y,CAED,oB,4UAIQ,eACR,uBACA,wC,OAEC,qGACA,oB,OAED,oHACA,mLACA,OACC,6B,cACD,OACC,6B,cACD,OACC,6WACA,QACC,4B,eACD,QACC,4B,eACD,QACC,W,eACD,QACC,U,uBAEA,sN,Q,qBAMD,mC,OAED,iB,2fAKiB,eACjB,SACA,UACA,WACC,QACD,iBACC,U,CAGD,oBACA,OACC,oC,QAEC,c,CAED,mLACA,OACC,WACA,+C,OACC,wM,O,cAKF,OACC,O,cACD,OACC,Q,qB,OAIC,4BACA,iB,C,OAGF,S,qBAGD,qC,QAGC,6L,QAMD,oB,qZAMc,eACd,gB,WAEC,oB,CAED,4EACA,OACC,U,cACD,OACC,W,qBAEA,6H,OAED,iB,4YAIa,eACT,KACA,IACJ,4EACA,OACC,6C,cACD,OACC,wB,qBASA,6H,OAGD,kB,WAEC,oB,CAED,UAMA,Y,meAIS,eA4BT,IACA,OACC,0C,QAEC,oB,CAED,6MACA,OAEC,2HACA,+H,OACC,sJAEA,oHACC,4BACD,0HACC,4B,MAEA,W,CAED,Y,Q,cAEF,O,uBAEE,kGACA,WACC,WACA,iBACD,iBACC,WACA,iB,C,C,cAGH,OACC,WACA,iBACD,OACC,WACA,iB,OAED,S,qB,ujBAKW,eACR,KACJ,sHACA,OACC,S,cACD,OACC,Q,cACD,OAGC,iB,qBAEA,6H,OAGD,IACA,OACC,oCACA,sC,OACC,8NACA,iB,QAED,6H,QACC,WACA,iD,QACC,yM,Q,uBAMD,WACA,iB,QAED,8NACA,S,qB,4QAKU,eACX,oB,gOAQI,6CACH,wNACA,OACC,iBACD,OAIC,8K,O,OARsB,W,qBAaxB,yB,kJAYA,mC,4BAKA,2B,kP,+GAMC,Y,CAED,SACA,yCACC,uF,UAEC,WACA,c,C,kJAIA,WACA,c,CAED,c,qBAED,iL,wKAKI,0CACH,uFACA,0C,MAGC,S,CALsB,W,CAQxB,iB,yPCnjBA,qG,UAEC,S,CAEE,8F,OACF,6G,mDAEC,kB,C,OAGF,S,8UAMA,kG,oSASA,iG,iaAMA,qG,UAEC,O,CAEG,sDACJ,IAOI,wDACH,kBACA,yOAOA,O,MAT6B,W,c,C,cAkB7B,OAlB6B,W,c,cAoB7B,O,iFApB6B,W,c,C,qB,kBAAA,W,c,C,iBAAA,W,c,C,iBAAA,W,c,C,OAqC7B,mCACA,gIACA,SAvC6B,W,qB,UA0C7B,S,CAED,iCACA,qB,mqL,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F,8F,o9D,2G,2G,sY,wG,uG,+G,+E,8c,wC,wC,kS,2mB,0D,uC,kP,6O,2X,sX,0S,4G,6V,+P,ue,sI,kC,iC,2C,yC,2K,gC,uC,gC,kG,uG;y+DCrFA,0BACG,mK,OACF,S,OAED,6GACA,iB,2XAOK,OACL,+F,0bAOK,OACL,+F,0bAOK,OACL,+F,yjBAWK,OACL,0GACA,sIACA,wIACC,8NACA,OACI,+K,QACF,S,Q,eAEF,OACI,8K,QACF,S,Q,eAEF,OACI,6K,QACF,S,Q,sBAGE,+K,QACF,S,Q,Q,yBAIH,iB,mkBASK,OACL,gS,sgBAWK,OACL,+R,kgBAUK,OACL,8R,2fCtCK,kBACL,2FACA,oC,OACC,oK,OAED,oB,8eAKK,kBACL,0FACA,oC,OACC,mK,OAED,oB,0eAKK,kBACL,yFACA,oC,OACC,kK,OAED,oB,mSAMK,kBACL,2F,OAEC,wD,CAED,S,kJAMK,kBACL,0F,OAEC,uD,CAED,S,+IAMK,kBACL,yF,OAEC,sD,CAED,S,oGAKA,mI,2EAqBK,OACL,iG,wHAOK,iB,sDAEJ,yB,MAEA,4C,C,2HAQI,iB,qDAEJ,yB,MAEA,2C,C,4XAMI,OACL,+M,sCAEC,S,CAED,kBAGA,+GACA,gH,8hBAMK,OACL,6G,sCAEC,S,CAED,yH,ueAQK,OACL,4H,6lBAKiC,cAA5B,OAEL,8E,kB,kB,OACC,6J,OACI,qN,OACF,S,O,O,yBAKH,8E,kB,kB,OACC,iK,QACI,yN,QACF,S,Q,Q,0BAIH,iB,uoBAKK,OACL,+M,sCAEC,S,CAED,kBAGA,8GACA,+G,0hBAMK,OACL,6G,sCAEC,S,CAED,wH,meASK,OACL,2H,+xBAMgC,cAA3B,OAEL,+E,kB,kB,OACC,6J,OACI,qN,OACF,S,O,O,yBAKH,+E,kB,kB,OACC,iK,QACI,yN,QACF,S,Q,Q,0BAKH,gF,kB,mB,OACC,iK,QACI,mO,QACF,U,Q,Q,2BAKH,yF,mB,oB,SACC,wK,QACI,oO,QACF,U,Q,Q,4BAIH,iB,yxBAKK,OACL,+M,sCAEC,S,CAED,kBAGA,6GACA,8G,shBAMK,OACL,6G,sCAEC,S,CAED,uH,+dASK,OACL,0H,qlBAM+B,cAA1B,OAEL,+E,kB,kB,OACC,6J,OACI,qN,OACF,S,O,O,yBAKH,+E,kB,kB,OACC,iK,QACI,yN,QACF,S,Q,Q,0BAIH,iB,uoBASK,OACL,sN,kB,kB,aAKI,yJ,OACF,S,O,yBAGF,iB,mfAQA,mBACG,6QACF,wD,OACC,iDACG,8J,OACF,S,O,OAGF,iB,0R,OAEA,S,OAED,iB,gnH,4F,4F,4F,4F,4F,4F,4F,4F,4F,8F,8F,8F,8F,8F,8F,+B;8WCzYI,YACJ,eAEG,8xB,OAoBF,U,OAGE,4e,OASF,U,OAGE,ktB,OAkBF,U,OAGD,6CACA,2CACA,yCACA,qDACA,mDACA,iD,oT,4U;moCC3DK,OACL,mE,OACC,2G,OAED,Y,wOAIK,OACL,O,sWCRA,6BAIA,yMACA,iJACC,8GACA,uC,yBAED,S,wbAIK,OACL,qJACC,2N,yB,yQAOI,OACL,oB,2QCZA,4L,8gC,4F,4F,4F;siDCAK,OACL,c,6QAKA,8EAIA,uNACA,S,6UAKK,OACL,qO,+jBAOK,OACL,+IACC,6F,yBAED,mBACG,wX,OACF,S,OAED,sNACA,qPACC,OAQA,qNACA,iD,QACC,4M,QAED,sGACG,mK,QACF,S,Q,2BAGF,uGACA,iB,2iBAIK,OACL,wLAGA,0LAEA,gL,4fAMK,OACL,8H,OAEC,8E,CAED,2KACA,2C,OACC,qGACA,iO,O,0dAMI,OACL,2G,kcAIK,OACL,2GACA,+F,OACC,uG,qBAEA,qG,O,oPAQD,0NACC,sCACA,sF,OACC,uF,O,+H,+NAQF,IACG,oJ,OACF,U,OAED,4G,8YAMA,yGACA,uC,OAGC,6G,OAED,iBACA,4IACC,uC,OACC,uDACA,wH,O,yB,gMC5IF,6D,kRAOK,OACL,+IACC,6F,yBAED,mBACG,qR,OACF,S,OAED,qGACA,iB,6dAIK,OACL,yKAEA,0KAEA,wKAEA,0KAEA,oLAGA,mL,8cAMK,OACL,mG,qZAIK,OACL,mG,ubAKK,OACL,sMACA,8NACA,2BAEA,qO,4dAKK,OACL,8NACA,2KAGA,2C,OACC,sG,qBAEA,mG,O,4eAOI,OACL,sMACA,8NACA,6FACA,0B,qzE,4F,4F,4F,4F,4F,4F,0G,0G;kJCxFA,4C,yCAkBA,wB,sM;2sHCfK,YACL,8G,oBAEC,kB,CAED,kB,kIAGK,YACL,qCACC,8G,oBAEC,cACA,Q,MAEA,cACA,Q,C,C,6IAKG,Y,UAEJ,S,C,UAGA,S,CAGD,IACA,YACC,mB,UAEC,M,CAED,I,CAGD,8G,oBAEC,c,MAEA,c,CAED,S,kHAgBI,oBACJ,SACA,yBACA,oCACA,mBACA,sB,4DAGK,OACL,2BACA,aACA,U,qJAMK,OACL,OACA,UACC,gBACD,gBACC,eACD,gB,uBAEE,e,CAEG,iBACJ,uDACC,yD,UAEC,Y,MAEA,qB,C,KAGF,SACD,gBACC,8BACD,gBACC,mBACD,gBACC,mBACD,gBACC,kBACD,gBACC,kBACD,gBACC,kBACD,iBACC,kBACD,iBACC,mBACD,iBACC,mBACD,iBACC,uCACA,+GACA,2CACA,2BACD,iBACC,8IACD,iBACC,8IACD,iBACC,+IACD,iB,sBAEE,e,CAEG,iBACJ,6I,UAEE,uB,MAEA,gC,C,KAGF,SACD,iBACK,iBACJ,yIACC,gC,KAED,S,CAED,yD,gHAGK,OAEL,sCACA,oDACA,S,sGAGK,OACL,sBACA,yBACA,S,iGAGK,OACL,sB,2GAGK,OACL,sBACA,yBACA,8G,6BAGC,uB,CAED,S,yGAG0B,cAAJ,cAAjB,O,yBAGJ,sB,CAKD,4BACA,4B,qHAG0B,cAAJ,cAAjB,O,YAGJ,S,C,YAGA,S,CAGD,sBACA,0GACA,UACA,UACA,qCACA,S,uHAGwB,cAAnB,OACL,sBACA,0G,MAEC,UACA,yB,MAEA,UACA,mC,CAED,qCACA,S,0HAGuB,cAAlB,OACL,sBACA,0G,MAEC,UACA,yB,MAEA,UACA,mC,CAED,4BACA,S,gHAGuB,cAAlB,OACL,sC,mHAGK,OACL,sBACA,oHACA,yBACA,S,sHAGK,OACL,sBACA,0GACA,SACA,c,sMAGC,oB,CAED,cACA,yBAIA,2NACC,OACD,0MACC,OACD,qXACC,Q,CAGD,S,0GC3QK,OACL,uE,mGA0BK,YACL,S,oIAuCK,OACL,S,kBAEC,iBACA,sE,MAEA,6D,CAED,OACA,S,mHAGK,OACL,iBACA,S,8IAMK,O,4N,kIAIH,c,CAED,OACA,6BACA,8B,64C,4HAWC,c,CAID,OACA,6BACA,wB,MAGA,oB,CAGD,2BACA,S,mIAYK,OACL,kB,QAEC,a,CAGD,4GACA,4G,6EAEC,a,CAID,mC,SAIC,sCACA,2FACA,UACA,Y,CAGD,sCACA,WACA,a,sIAIK,OACL,iBACA,U,yBAEC,O,CAED,aACA,sCACA,S,uG,kBAMC,S,CAED,IACA,IACI,uD,QAEF,I,CAFsC,mBAKxC,S,mDAKK,OACL,gC,8GAKK,OACL,iBACA,gBACA,iB,4IAOK,OACL,U,gC,uCAGE,iBACA,oB,C,cAMA,iG,C,CAGF,kB,UAEC,sG,CAED,4G,cAEC,sG,CAGD,iBACA,QACA,QACA,UACA,oCACA,0FACA,4G,uCAGC,mF,CAGD,oB,yH,cAcC,Q,UAEC,Y,C,QAGA,Q,C,QAGA,a,C,QAGA,yF,C,CAGF,yI,YAEE,a,C,KAGF,Y,mQAIK,OACL,oBAGA,kBACA,gJACC,W,CAED,uBACA,+B,kBAIC,8B,CAGD,8L,ieAIK,OAGL,kBACA,gJACC,W,CAED,uBACA,+BAIA,6C,OACC,6L,O,kBAMA,8B,CAGD,8L,meAKA,8CACA,OACC,2M,+NAEC,cACA,OACA,O,C,gaAGA,cACA,OACA,O,C,6CAKA,2D,C,O,icASG,O,kBAEJ,oF,CAED,iBACA,oCACA,qI,aAEE,gCACA,W,MAEA,uB,C,KAGF,wC,OACC,6G,sBAEC,IACA,0FACA,W,C,OAGF,S,4xBAcK,O,gBAEJ,S,CAIG,SACA,IACJ,IACA,mBACI,8CAOC,SACA,IACJ,6C,OACC,sH,UAEC,IACA,kOACC,W,C,QAKA,mBAnBuB,W,c,C,C,OA8B1B,uE,O,c,OAIC,kG,qBAGA,iBACA,UACA,6CAEI,kCACH,2MADsB,W,CAGvB,iHAEA,kBACA,wCACA,e,OAID,IACA,IACA,IAtD0B,W,qBAwD3B,IAKA,IACA,mBACI,SACA,gDAMC,SACJ,+C,QACC,wG,8BARyB,W,e,C,QAkB1B,0E,Q,e,QAIC,kG,uBAGA,IACI,kCACH,aACA,mMAFsB,W,CAIvB,mHAEA,kBACA,wCACA,e,QAID,IACA,IAvC0B,W,uBAyC3B,IAGA,IACA,mBACI,kDAOH,4I,QAP0B,a,e,QAa1B,4E,Q,e,QAGC,kG,uBAIA,KACI,0C,gkBAEF,M,CAFyB,a,CAK3B,sWAEI,0CACH,gLACA,iGAF0B,a,CAI3B,4KACA,kG,Q,iBAKA,qG,CAED,UAxC0B,a,uBA0C3B,IAGA,IACA,mBACA,wD,yOAEE,c,CAED,qG,MAED,IAEA,S,kfAKK,O,iCAEJ,0F,C,kBAGA,iB,CAED,+B,yJAKK,O,iCAIJ,0FACA,6BACA,0F,aAEC,WACA,gBACA,iBAEC,OACA,aACD,gBACC,IACA,0FACA,W,MAEA,qCACA,8C,C,CAGF,S,C,aAIA,kE,uBAEC,O,C,CAGF,S,uJAKK,O,aAEJ,c,C,iCAGA,0F,aAEC,c,CAED,S,CAED,S,qJAMK,O,iC,MAGH,iG,CAED,8DACA,gBACA,UACC,OACA,aACD,gBACC,IACA,0FACA,W,CAED,S,C,MAGA,W,CAED,sB,mIAIA,6DACA,UACA,sCACA,uE,qCAGE,iCACA,M,CAED,yB,SAED,S,oqB,yBAWI,Q,sCACF,iB,CAED,yB,CAKA,yCACA,YACA,IACA,IACA,KAED,UACA,gBACA,IACA,uCACC,KAEA,0TAOA,O,qEAGK,oC,sCACF,iB,CAED,e,CAED,yBACA,uBACA,iB,eACD,OACI,6K,QACF,iB,QAED,iB,eACD,OACI,4K,QACF,iB,QAED,iB,eACD,O,gCAEE,Q,MAEA,Q,CAED,iB,eACD,O,gC,W,4B,MAIE,Q,CAED,iB,eACD,O,+BAEE,Q,MAEA,Q,CAED,iB,eACD,OACI,sL,QACF,iB,Q,eAEF,QACC,IACA,kBACA,WACC,KACD,iBACC,KACD,iBACC,K,CAED,iBACG,sC,sCACF,iB,CAED,IACA,I,eACD,QACC,KACA,IACA,gD,QAGC,eACA,iBACA,e,C,mCAIA,uF,CAEE,yC,sCACF,iB,CAED,IACA,I,eACD,Q,6CAEE,mBACA,YACC,QACA,iBACA,iBACD,kBACC,SACA,iBACA,iBACD,kBACC,SACA,iBACA,iBACD,kBAEC,qEACD,kBAEK,MACD,oB,SACF,kBACA,K,MAEA,qBACA,yB,CAED,sBACA,iBACD,mBACC,SACA,iBACA,iB,C,CAIF,kBACA,iBAGA,kG,QACC,4K,uCAEC,kB,C,mBAGA,WACA,KACA,WACA,iB,C,QAKC,wN,QACF,WACA,KACA,WACA,iB,QAED,YAGG,4C,sCACF,iB,CAED,a,uBAzJG,iC,sCACF,iB,CAED,a,QAwJD,I,qBAGD,kGACA,8I,QAEC,oD,QAED,qGAEA,mB,gBAEC,gD,CAED,gH,qjBAMK,O,uCAEJ,gB,CAED,iBACI,QACD,qC,OACF,gB,C,WAGA,gB,C,8BAGA,I,MAEA,iB,WAEC,gB,C,0BAGA,K,MACS,qC,OACT,gB,cAGA,K,C,C,C,uCAID,gB,CAED,iBACA,OACA,gB,gNAMK,OACL,I,+DAmBC,oB,QAEI,Q,sC,6B,C,gE,CAMJ,0BACA,mBACG,Q,sC,6B,C,U,gE,CAQH,yBACA,YACA,eACA,S,wD,CAKG,IACJ,iBACA,UACA,IACA,QAEA,yCACI,6B,sC,6B,CAGH,KAKA,aACC,cACA,OACD,mBACC,qBACA,OACD,mBACC,cACA,OACD,kBACC,eACA,OAGD,kB,QAEE,W,CAED,KAGA,cACA,QAGD,2B,Q,OAGG,W,CAED,c,C,WAIA,U,CAED,U,wC,MAvCA,W,C,C,qH,+G,WAsDD,a,CAED,uE,wBAEE,a,C,SAGF,Y,+EAIK,O,mDAEJ,c,C,kFAIA,c,CAED,IACA,8EACC,iB,CAED,IACA,OAEA,wCACI,yC,iBAGF,KACA,M,CAED,4CANuB,W,CAQxB,c,2FAMA,2E,2CAQA,OACA,UACC,2HACD,gBACK,+C,oNAEF,Y,CAF4B,W,CAK9B,aACD,gBACC,kBACD,gBACC,Y,CAED,a,yOAIK,OACL,0FAMA,qI,OACC,U,OAGD,iB,+PAOA,OACA,4BAEA,gB,YAGE,O,CAEF,gB,aAGE,mH,MAEA,yB,CAEF,gB,+MAGE,M,CAED,OACA,kIACA,mH,E,ueAOI,OAGL,kB,2VAEC,4GACA,4G,cAGC,gBACA,4G,CAED,OACA,WACA,sCACA,Y,CAGD,sC,OACC,4GACA,4GACA,4C,OACC,sC,OAGC,+L,OAED,oHACA,oHACA,Y,O,OAGF,a,+sBAIK,OACL,0FACA,oI,OAEC,oD,OAED,6FAEA,kB,QAEC,+C,CAED,4GACA,4GACA,sC,oBAEC,+C,CAGD,gB,cAGC,U,MAEA,QACA,oCACA,0FACA,U,CAED,iB,0gBAKK,OACL,iB,W,6F,CAIA,6B,sC,uC,CAMA,WAWA,6E,mDAGE,M,CAKD,UACI,kC,mDAEF,M,CAED,4EACA,iBALkB,W,C,8CAHpB,iBAEC,UACI,kC,mDAEF,M,CAED,4EACA,iBALkB,W,C,8CAUpB,kB,WAEE,M,CAEE,6B,sC,uC,C,YAQF,KACA,IACA,Y,WAEE,a,CAEE,iC,sC,6C,C,YAIF,M,CAED,S,SAEC,a,CAED,oD,cAEC,a,CAED,a,C,WAGA,a,C,oD,CAMF,SACG,iC,sC,6C,CAGH,S,eAEC,M,C,sGAUF,iB,4CAEA,kB,6CAEA,kB,6CAEA,kB,6CAEA,kB,4CAEA,kB,6C,M,kB,oD,C,E,sH,yKAQK,O,W,sE,C,yB,sD,C,2C,6YAsBA,O,oEAEJ,Y,CAED,2F,eAEC,Y,C,yI,4qBAQI,O,qEAEJ,c,CAGD,+B,QAEC,c,CAED,WACA,0DACA,4E,e,uF,C,8I,gkBAOsC,cAAjC,OACL,uD,O,aAEE,kB,MAEA,kB,C,qBAGD,4BACA,kBACA,aACA,sN,aAEC,U,MAEA,U,C,OAGF,S,iQ,cAaC,c,CAEE,+D,kBACF,yE,CAEE,4D,kBACF,uE,CAED,sB,khBAMK,O,4HAEJ,c,CAID,I,yBAEC,K,CAED,iBACA,6B,sCAEC,c,CAEG,kB,iBAGH,wCACA,iB,MAGA,qB,QAEI,Q,sCACF,c,C,uF,CAIF,0DACA,mBACG,Q,sCACF,c,C,C,sCAMD,KACA,iB,CAGD,sB,e,uF,CAKA,qE,O,QAEE,U,MAEA,U,C,qBAMD,6BACA,YACA,YACA,cACA,6N,QAEC,W,MAEA,W,C,O,oD,mrCAQG,OACL,iBACA,iBACA,gBACA,sCAEA,I,sCAEC,KACA,iB,0BAKC,6B,C,CAIF,SACA,OACA,kE,iHAIE,8C,8F,CAGD,QAGA,4F,OACC,6H,sC,6B,C,kBAKC,gBACA,c,C,OAKF,gI,uC,kC,CAIA,+C,OACC,oBACA,c,OAIE,wL,QACF,sBACA,c,QAID,KACI,sBACD,mD,uC,kC,CAGH,M,mEAGC,iBACG,mD,uC,kC,C,UAIF,2C,6E,C,C,0BAKD,c,MAEA,c,C,qBAGF,iBAGA,SACA,8M,QAEC,Q,CAED,SACA,U,wC,u4BASA,sIAEA,W,gBAEC,S,CAID,IACI,0CACH,iM,8G,sGAIE,kG,CALqB,W,S,CAUvB,uFACA,kGACA,WAZuB,W,CAexB,wB,yN,yBAMC,iB,CAED,iB,wDASA,YACI,mC,SAEF,mN,6B,QAGE,kG,C,QAGA,yG,CAED,S,C,CAViB,W,CAepB,sB,wC,oBAgBC,iB,C,kBAIA,iB,C,SAIA,aACA,K,C,YAIA,gBACA,Q,CAIG,mCACH,YACA,kBACA,qCACC,YACA,kB,CALoB,W,CAQtB,S,oCAMI,0CACH,6LADuB,W,CAGxB,S,oCAKI,0CACH,6LADuB,W,CAGxB,S,8CAMA,IACI,0CACH,iM,gBAEC,iB,CAED,SALuB,W,C,eAQvB,kB,CAED,S,wEAKA,2JACC,oD,UAEC,YACA,a,CAEG,mCACH,YADqB,W,C,KAIvB,2JACC,oD,UAEC,YACA,a,CAEG,mCACH,YADqB,W,C,KAIvB,S,0EAKA,IACA,2JACC,oD,U,gBAGE,iB,CAED,SACA,a,CAEG,mC,gBAEF,iB,CAED,SAJqB,W,C,KAOvB,2JACC,oD,U,gBAGE,iB,CAED,SACA,a,CAEG,mC,gBAEF,iB,CAED,SAJqB,W,C,K,eAQtB,kB,CAED,S,8CAMA,IACA,IACI,0CACH,iM,gBAEC,uFACA,yGACA,W,CAED,SAPuB,W,CASxB,mB,eAIC,uB,CAED,S,2DAWK,kBACL,aACA,WACA,WACA,giB,4GAGK,kBACL,4G,4HAGK,kBACL,aACA,WACA,WACA,ouB,+FAIA,oCACC,wC,yBAEC,oC,CAED,iB,CAED,iB,uEAIA,wC,yB,kE,C,2D,4BAQA,iD,4B,iBAKC,e,C,kBAGA,sB,C,iBAGA,sB,CAED,S,4CCvzDK,Y,8BAEJ,S,CAED,8F,mHAsBI,KACA,IAEJ,UACC,IACD,iBACC,cACD,cACC,c,CAGD,UACC,mBACD,iBACC,cACD,cACC,e,C,eAGA,oB,CAED,S,mDAOA,2D,qEAWK,OACD,mDACJ,QACA,kB,qHAKK,OACL,kGACA,iDACC,QACA,kG,CAED,Y,+GAIK,OACL,OACA,IACA,yBACC,I,CAED,S,sIAMK,OACL,kC,6C,oC,CAQI,mDACJ,+FACC,sGACA,0B,C,4C,0HAOI,OACD,IACJ,gBACA,kGAEA,iBACC,OACA,UACC,6BACD,gBACC,WACD,uB,MAGC,W,CAED,QACA,kG,CAED,S,uHAOK,OACL,kC,wJAQK,OACL,S,kBAIC,gF,UAEC,S,C,wCAGI,uD,UAEF,S,CAF0C,mB,CAM7C,S,CAKG,gD,2FAEF,S,C,uGAGA,2F,CALmC,W,CAUrC,IACA,+FACA,8BACC,qGACG,kG,S,8GAED,S,CAED,S,MAEA,I,C,CAGF,S,qGAMA,gE,kEASK,OACL,mBACA,UACC,yBACD,gBACC,yBACD,gBACC,cACD,gBACC,cACD,iBACC,uBACD,iBACC,qB,CAED,+C,qIAGK,OACD,mDACJ,QACA,kB,iGAIA,qIACC,iB,K,4CAKD,uDACC,kGACA,Y,eAEC,yC,C,gBAGA,U,CAED,uBACA,QACA,qB,K,4BAKD,yC,kCAIA,OACA,UACC,mDACD,gBACC,wDACD,gBACC,kDACD,gBACC,oDACD,gBACC,wBACD,gBACC,uBACD,gBACC,oCACD,gB,oBAGE,6B,CAED,+D,wCAEC,qB,CAED,iCACD,gBACC,iFACD,gBACC,oCACD,iBACC,yC,C,oFCzRI,O,2BAEJ,a,C,qBAGA,a,CAED,OACA,W,mDAGE,a,CAGF,uB,yCAEE,a,CAED,8I,6GAEE,a,C,KAIH,yB,uCAEE,a,CAED,6I,6GAEE,a,C,KAIH,iC,0OAEE,a,CAGF,iB,kRAEE,a,CAGF,iB,oOAEE,a,C,CAGF,Y,+KAKA,OAGA,4BACC,sCACD,gBACC,sBACD,gB,+BAEE,sB,CAED,0IACC,c,K,+BAGA,mB,CAEF,gB,uFAEE,sCACA,M,CAED,gB,uBAEC,oC,4OAIA,gBACI,sDACH,+NACA,e,eAEC,gBACA,e,CAL8B,W,C,MAS5B,+CACH,qNACA,e,eAEC,gBACA,e,CAL4B,W,C,CAS/B,gBACD,gBACC,yBACD,gBACC,wBACD,gBACC,gBACD,gBACC,gBACD,gBACC,qBACD,iB,iCAEE,yB,MAEA,qB,CAEF,iBACC,qBACD,iBACC,qBACD,iB,mBAEE,sBACA,sBACA,gB,MAEA,gB,C,4GAGA,kG,CAED,gBACD,yCACI,+F,6CACF,qBACA,SACA,mB,MAEA,S,CAED,QACA,YACC,gBACD,kBACC,gBACD,kBACC,gBACD,kBACC,iBACA,6B,uBAEC,gB,aAEC,6B,C,CAGF,iB,C,gCAGA,gB,CAEF,iBACC,oJ,eAEE,qBACA,SACA,mB,MAEA,S,C,MAGH,iBACC,0J,SAEE,iB,CAED,S,M,MA1HD,mD,E,kDA+HI,OACD,mDACJ,QACA,kB,mG,iB,2CAQE,gB,CAED,eACA,O,CAGD,IACA,4BACC,qBACD,iBACC,qBACD,iBACC,qBACD,iBACC,qBACD,gBACC,qBACD,iBACC,qB,M,UAGC,qBACA,kC,iBAEC,gB,CAED,iBACA,M,CAED,sBACA,+CACA,mB,E,0DAKI,OACL,I,cAEC,Q,CAED,yIACI,a,QACF,I,C,KAGF,S,+GAIK,OACL,mCACA,cACA,S,4HAGK,O,cAEJ,sG,CAED,yIACC,c,K,uJC/SI,O,eAEJ,c,CAED,OACA,2BAEC,IACA,6IACC,e,oBAGC,6DACA,aACA,cACA,uE,C,aAGA,uB,C,KAGF,SAED,iCACC,qGACA,4BAED,iB,6BAIE,kE,CAID,qG,e,cAME,+B,C,cAKA,+B,CAID,8DACA,oCACI,6CACH,uBADyB,W,CAG1B,6CACA,S,C,6BAOA,S,CAQG,S,YAEH,8DACA,oCACI,sCACH,uBADuB,W,C,C,gBAOxB,0BACI,+CACH,8DACA,iDACA,0BAHgC,W,C,eAMhC,S,CAED,uB,C,kBAGA,S,CAKD,kE,CAGD,S,yG,aAsBC,S,C,oDAIA,S,C,gKAGA,S,CAGD,6DACA,+CACA,S,ioP,4F,4F,4F,4F,4F,4F,2B,sB,+G,mB,8B,sC,yM,gC,0B,mB,uB,0B,mB,oB,oB,oB,uC,wB,mB,sC,gC,k/B;ymL,UCpGC,S,CAED,6G,2B,UAQC,S,CAED,qD,2BAQA,2B,yEAMK,OACL,Q,yBAGC,4B,MAEA,6B,CAGD,2I,0BAEC,gC,MAEA,mCACA,0DACC,qG,K,C,sBAKD,uB,MAEA,2B,CAED,sDACC,kG,K,6IAMI,OACL,0C,0PAEC,a,C,yFAED,uPACA,Y,oIAKK,O,gHAEJ,O,C,iCAMA,O,CAGD,wC,uvBAIK,OACL,eACA,gBAEA,cACA,8CACC,sBAEA,qGACA,sGACA,sGACA,6BASA,cACD,O,wBAEE,c,CAEF,OAEC,sHAEA,gTAGA,OACC,2C,eACD,OASC,uEACA,QACC,cACA,QACA,c,eACD,QAEC,IACA,QACA,c,QAED,0C,eAED,OAEC,iLACA,QAEC,kBACA,QACA,QACA,c,QAGD,sBACA,QACA,c,eAED,OACC,2GACA,mD,QACC,c,QAED,WACA,QACA,c,eAED,OACC,6GACA,0I,QACC,c,QAED,YACA,QACA,c,eAED,QACC,sHACA,wD,QACC,c,QAED,YACA,QACA,c,eAED,QACC,sHACA,2C,QACC,c,QAED,YACA,QACA,c,eAED,QACC,0EACA,Q,wCAGE,2HACA,iH,CAED,QACA,c,eACD,QAEC,iHACA,c,QAGD,8CACA,c,eAED,QACC,+K,QACC,c,QAED,QACA,c,eAED,QACC,QACA,c,eAED,Q,sBAIE,eACA,iB,C,oBAOA,8F,C,6HAGA,6B,CAED,e,OAIC,iB,C,cAKA,iB,CAID,c,uBAxIA,gC,QA0ID,mC,qBAGD,iB,+7BAIK,OACL,oI,OACC,yD,OAGD,Y,YAEC,a,C,qCAIA,a,CAGD,MACA,aAEA,qCACA,2DACC,uG,KAID,sD,O,oBAEE,0F,CAED,4H,OASD,KACA,8CACC,uD,OAEC,mG,QAEC,a,CAED,W,Q,oBAIA,0F,CAED,0J,QAEC,Y,QAED,oGAjB+B,W,qBAmBhC,a,oYCvTK,OACL,mBACA,oB,oIAGK,OACL,oBACA,qB,sIAGK,OACL,kBACA,0BACA,oBACA,qB,iHAKA,uKACA,mBACA,4DACA,4DACA,W,QAEC,I,C,WAGA,sB,CAED,4BACA,S,sDAGK,OACL,0IACC,2B,KAED,qC,iHAKK,OACD,SACD,iB,QACF,2GACA,oC,MAEA,2BACA,6D,CAED,SACA,S,8pBAcK,OACL,Y,YAEC,a,CAED,gBACA,2DACC,uG,KAED,sBACA,kBACA,gBACA,yGACA,6C,OACC,8G,OAEG,IACJ,uC,OACC,yB,qBAEA,8F,OAED,OACC,uD,Q,qCAGE,e,C,cAIA,e,CAED,4O,QAEC,0G,SAEC,e,CAED,YACA,oHACA,yH,Q,Q,e,yBAKA,mG,CAED,+C,CAED,wBACA,yB,UAEC,e,C,wCAKA,e,CAED,WACA,oBACA,+C,QACC,yH,QAED,oB,sBAED,WACA,iB,whBAIK,OACL,qJ,oBAGE,2B,C,KAGF,+B,8JAQK,OACL,eACI,gDACH,mGACA,M,eAFgC,W,S,C,wNAQ/B,yBAR+B,W,S,CAWhC,SACA,QACA,OAIA,U,sIAEE,0FACA,6B,C,OAIA,yK,oBAGE,2B,C,KAGF,+B,CAED,eAED,gBACC,iBACD,gBACC,+FACD,gBACC,OACD,iBACC,c,MA1BA,gC,C,MA6BA,6B,C,kBAIA,yB,CAhD+B,W,CAmDjC,+B,6KAOK,O,UAEJ,S,CAEE,oG,uIACF,S,CAGD,kBACA,sCACA,mGACA,WACA,OACA,0GAEA,oGACA,OAGA,UAEA,uBACC,yBACA,yBACD,gB,yCAEE,yB,CAEF,gBACC,yBACD,gB,yBAEE,iGACA,iGACA,4BACA,iG,MAEA,yB,CAEF,6C,eAEE,a,MAEA,S,C,sGAGA,oB,CAED,MACA,S,MA/BA,iC,CAiCD,S,0tBAMK,OACL,Y,YAEC,a,CAED,gBACA,2DACC,uG,KAED,kBACA,gBACA,yGACA,6C,OACC,8G,OAEG,IACJ,uC,OACC,yB,qBAEA,8F,OAED,aACA,kHAEA,uQ,OAGC,4I,QACC,4BACA,oHACA,yHACA,sGACA,sB,uBAEA,iB,Q,QAGF,QACC,oHACA,qBACA,sTAGA,QACC,e,yBAEC,mGACA,mG,CAED,iBACD,Q,4BAEE,iB,C,eAEF,Q,kHAEE,iB,C,eAEF,Q,eAEA,Q,WAEE,iB,C,eAGF,QACC,iBACA,e,eACD,QACC,iBACD,QACC,e,eACD,Q,sDAEE,iB,CAED,e,eACD,Q,0CAEE,8H,CAED,e,uBAvCA,gC,Q,UA0CA,e,CAED,wBACA,WACA,oBACA,+C,QACC,yH,Q,uBAGF,iB,w0BAUK,OACL,UACI,YACA,I,sCAEH,sB,wBAEA,qBACA,Y,MAEA,sBACA,W,CAED,oH,OACC,gI,OACC,SACA,c,O,c,O,iBAIA,W,CAED,wI,OACC,SACA,c,O,qBAGD,UACA,kI,QACC,SACA,c,Q,O,UAID,SACA,S,CAED,oCACA,yBACA,SACA,S,mXC1aA,4G,sD,0D,CAIA,QACA,kGACA,mCACC,QACA,kG,C,2C,0D,CAQG,mDACJ,6FACC,sGACA,0H,C,+F,mCAUD,yB,SAEC,sG,C,kBAGA,kB,CAED,S,+BAIA,OACA,IACA,yBACC,I,CAED,S,+CAUK,OACL,2B,iHAGK,OACL,iHACA,gCACA,S,sGAGK,OACL,SACA,c,wGAGK,OACL,c,sHAGK,O,8BAEJ,a,CAED,2T,oHAGK,O,mBAEJ,e,C,yHAII,O,8BAEJ,O,CAED,yGACA,4GACA,sB,0G,6D,ijBAuBA,mBACA,mB,mCAEC,uD,CAGA,sBAED,sBACA,sBACA,UACA,kE,UAEE,YACA,Y,C,uBAIF,QACA,2E,iOAEE,a,CAED,kP,wBAEA,iBACA,qBACA,Y,kBAGD,4CACC,6SACA,OACC,8L,cACD,OACC,8L,cACD,OACC,gM,qBAEA,gM,O,UAGA,c,C,qBAGF,kB,gaAKA,6JACC,OACA,wBACA,4CACC,4GACD,+BACC,4GACA,2I,C,K,+GAOF,qCAIA,yJACC,0D,KAQD,uDACC,0GAGA,iBAEC,6NACA,6NAEA,uH,wCAEC,gBACA,qH,wCAEC,a,C,CAGF,uH,qCAIC,a,CAID,qPACA,qPACA,S,yBAEC,Q,+BAEA,QACA,wB,C,OAGA,kB,C,yBAMA,kB,C,MAtCD,a,C,KA0CF,S,yCAMK,OAAmC,iB,kHACnC,OAAmC,gL,8HACnC,OAAmC,4V,iRAGnC,OACL,4F,iiB,4BAcC,U,CAIA,wBACA,2BACA,2BACA,2BACA,sCAED,+P,kBAEE,O,CAED,+GACA,0FACA,OACC,qBACA,qGACA,qB,cACD,O,qBAEC,qB,O,mJAMF,s1BACC,OACA,qG,qBAEC,S,CAED,eACA,wPACA,OACC,uPAEA,4DACA,4D,SAEC,QACA,c,C,MAIA,oDACA,gB,C,MAGA,8FACA,Y,CAID,gU,kIAGC,QACA,c,C,cAEF,OACC,4GACA,yJAEA,wOACA,kBACI,kOACH,kCAD2C,a,C,cAG7C,OACC,4GACA,yJACA,wOACA,kBACI,kOACH,kCAD2C,a,C,cAG7C,OACC,0GACA,c,cACD,OACC,4GACA,kG,qBAEC,c,C,4BAGA,yGACA,4BACA,c,CAED,oBACA,uG,QACC,qGACA,qBACI,2DACH,qBAD2C,qBAG5C,0J,uBAEA,gC,QAED,iGACA,kBACI,kOACH,kCAD2C,a,CAG5C,Y,cACD,OACC,4GACA,kG,qBAEC,c,CAED,cAEA,4E,QACC,qGACA,qBACI,2DACH,qBAD2C,qBAG5C,0J,uBAEA,mN,QAED,iGACA,kBACI,kOACH,kCAD2C,a,CAG5C,Y,cACD,OACC,4GACA,kG,qBAEC,c,CAED,0HACA,4B,cACD,OACC,4GACA,kG,qBAEC,c,CAED,0HACA,kBACI,kOACH,kCAD2C,a,C,OAI7C,S,qkBAGD,UACA,2BACA,kGACA,wCACC,WACA,+GACA,aACA,2H,OACC,QACA,c,OAED,YACA,iBACC,qBACA,qBACD,8BACC,qBACD,gBACA,gBACA,sC,M,C,qB,iBAKA,0DACC,2M,K,CAGF,Y,ohB,gB,c,C,uQ,c,CA4DA,4JACC,6GACA,OAKA,iB,8H,c,CAIA,gB,U,mCAGG,kB,C,c,C,M,U,c,C,C,yBAQJ,QAGA,uF,cAGC,Q,C,a,mPC3dI,OACL,c,8PAcA,sG,kKA8BK,OACL,e,kYAIA,4G,sCAEC,iB,CAED,aACA,eAEA,eACA,6B,sCAEC,iB,CAED,6K,mBAUC,iD,MAEA,4D,C,qBAKA,+CACA,mD,CAED,oB,0PAMK,OACL,YACG,oB,QACF,8GACA,0CACA,cACA,S,CAED,cACA,sBACA,OACA,S,qGAOK,OACL,YACA,+BACA,c,8RAOA,qGACA,mE,OACC,6I,OAED,S,6K,sBAgBC,gB,CAED,kB,mDAIK,OACL,mB,sHAQK,OACL,qB,wHAoBK,O,mBAEJ,sB,UAEC,iB,CAED,gD,CAED,a,iHAGK,OACL,Y,iIAGK,OACL,mC,yHAGK,OACL,4C,+HAGK,OACL,kB,yBAEC,wD,C,mBAGA,kD,CAED,6B,oHAQK,O,oBAEJ,iG,UAEC,iB,CAED,wC,CAED,a,iHAGK,OACL,Y,iIAGK,OACL,wC,yHAGK,OACL,iD,+HAGK,OACL,kB,0BAEC,gD,C,oBAGA,0C,CAED,6B,kUAUK,O,6BAEJ,a,CAGD,qH,sCAEC,aACA,a,CAED,mBACA,Y,wQAGK,OACL,a,iIAGK,OACL,a,yHAGK,OACL,S,mHAGK,OACL,S,2IAMK,O,kD,+SAMA,OACL,8H,+aAIK,OACL,qI,yaAIK,OACL,iI,idAuCK,UACL,I,yBAEC,+B,CAED,mFACC,yC,4FAED,yB,ofAMK,OACL,yEACC,4B,6G,ugBAQI,OACL,iRACC,gS,gNAED,yB,6kBAGK,OACL,IACA,IACI,SACA,I,kBAEH,Y,MAEA,W,CAED,kCACC,gH,kBAEC,c,C,kBAKA,+G,MAEA,+G,CAOD,sM,OACC,wF,OAED,gFAGI,I,kBAEH,sC,MAEA,8C,C,2FAGA,W,iGAIA,W,MAEA,gF,C,qB,kBAMD,iC,MAEA,iC,CAGD,S,ykBAMK,UACL,I,4BAEC,+B,CAED,QACA,iF,oCAEE,0B,CAED,qC,8FAED,S,meAMK,OACL,qEACC,4B,6F,seAQI,OACL,6QACC,gS,qN,+QAkCI,O,eAGJ,c,CAED,4BACA,sCACC,gB,CAED,S,yaAIK,OACD,I,eAEH,W,MAEA,Y,CAGG,gEACH,4H,kBAEC,c,CAGD,O,sF,sFAME,Q,CAEG,I,eAGH,gD,MAEA,wC,C,QAGA,W,MAEA,S,C,MAGD,gF,CAED,gFAEA,mC,OACC,8FACA,W,O,qB,gjBAOG,OACL,iH,eAEC,c,CAED,gL,0bAOK,OACL,iH,e,kB,C,4B,+bAYK,OACL,qH,eAEC,S,CAED,gL,kdAOK,OACL,qH,e,kB,C,4B,weAYK,OACL,8G,e,kB,C,4B,khBAYK,OACL,6H,eAEC,c,CAED,oCACA,kD,2HAEE,yS,C,KAGF,S,mUAoBK,OACL,4C,8IAMK,OACL,gC,gMAGK,OACL,qCACC,iB,QAEC,M,CAED,mCACA,iB,uCAGC,gBACA,iBACA,S,CAED,oC,OAGC,gBACA,iBACA,S,CAED,I,S,kI,kBAIG,sO,MAEA,sO,C,C,MAIF,qJ,yI,kBAGG,sO,MAEA,sO,CAED,M,C,K,C,CAKJ,oBACA,S,mJ,0CAOC,gB,CAED,Q,0BAEC,OACA,iB,MAEA,iB,CAED,IACA,qCACC,qD,+CAEC,M,CAED,W,C,UAIA,gB,CAED,mB,M,4CAIE,gB,CAED,W,CAID,IACI,yC,yDAEF,KACA,M,CAED,4CAL0B,W,C,uCAS1B,K,CAGD,iBACA,OACA,gB,qPAQK,OACL,wN,uhBAQK,OACL,iI,eAEC,c,CAED,oCACA,kD,2HAEE,yS,C,KAGF,S,ihBAQK,OACL,4N,+eAQK,OACL,qN,6eASK,O,QAEJ,oB,CAED,yBACA,uEACC,+L,0F,qBAGA,c,CAED,Y,gcAOK,O,QAEJ,iB,CAED,yBACA,kEACC,oC,wF,qBAGA,c,CAED,Y,sdAOK,O,QAEJ,mB,CAED,yBACA,2EACC,+L,0F,qBAGA,c,CAED,Y,wdAOK,O,QAEJ,gB,CAED,yBACA,sEACC,oC,wF,qBAGA,c,CAED,Y,0eAOK,O,QAEJ,oB,CAED,yBACA,uFACC,8GACA,kD,uGAEE,4S,C,KAGF,qB,0F,qBAGA,c,CAED,Y,geAOK,O,QAEJ,iB,CAED,yBACA,kEACC,qB,wF,qBAGA,c,CAED,Y,sfAOK,O,QAEJ,mB,CAED,yBACA,2FACC,8GACA,kD,uGAEE,4S,C,KAGF,qB,0F,qBAGA,c,CAED,Y,wfAQK,O,QAEJ,gB,CAED,yBACA,sEACC,qB,wF,qBAGA,c,CAED,Y,2iBAkBK,O,UAGJ,c,C,oCAIA,oB,CAGD,2GACA,6BAEA,IACA,IACA,qI,6BAEE,M,CAGD,gF,2FAEC,8B,CAED,gF,K,sBAIA,4B,CAGD,S,8rW,4F,4F,4F,4F,4F,4F,4F,4F,4F,S,mB,c,wB,4B,uB;24DCrkCA,+C,OAIK,QACJ,yJ,OAEC,sE,CAED,oH,O,4IAgDD,8D,0PAqBK,OACL,iH,+dAMA,2BAGA,iBACA,OACA,MACA,qI,mEAEE,UACA,mBACA,oE,MAEA,UACA,Q,C,KAGF,YACA,wGACA,S,6VAKK,OACL,oD,OACC,0GACA,iB,qBAEA,qGACA,c,OAED,wD,OACC,qG,O,+NAMI,O,uBAEJ,wB,MAEA,0B,C,+QAQI,OACL,oD,OACC,KACA,yG,qBAEA,K,OAED,wD,OACC,qG,O,+YAOI,OACL,uBACA,wD,OACC,qG,O,mcAaI,OACL,+NACC,wGACA,gNACA,OACC,OACD,OAEC,OACD,OAKC,OACD,OAEC,yE,QAEC,mI,QAED,2J,O,yB,khBAQG,OACL,uMAGG,yJ,OACF,qGACA,kC,O,kdAKI,OACL,0C,OACC,O,qBAEA,6G,O,uhBAOI,OACL,kHAEA,2C,OACC,qJACA,O,OAGD,6CAKA,yIACC,sM,KAED,+F,6mBAUK,iBACL,KACA,+IACC,+G,iB,8BAGE,YACA,IACA,iB,C,C,yB,4B,+SASH,YACA,qI,cAEE,e,C,KAGF,S,kDAKK,OACL,uDACC,4LACC,SACA,yG,8G,O,qHAOG,OACL,qDACC,mLACC,2GACA,wD,OACC,qG,O,uG,O,mGAQH,0G,wBAKA,mD,2BAKA,8C,wBAKA,uD,2BAKA,iF,k/D,4F,4F,4F,4F,4F,gH;wlBCnUA,8HAGA,qCACG,gK,OACF,U,OAGD,mGAIA,oOAEC,0NACI,gK,OACF,U,O,4HAIC,kK,OACF,U,O,yHAOF,UACA,oBACA,oPACC,iCACG,kK,OACF,U,O,+MAGF,0PACC,uCACG,kK,OACF,U,O,+MAGF,6PACC,uCACG,kK,OACF,U,O,+MAGF,4F,2T,4F,4F,4F,4F,iD,O,sF"} diff --git a/examples/humble/node_modules/todomvc-app-css/index.css b/examples/humble/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/humble/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/humble/node_modules/todomvc-app-css/package.json b/examples/humble/node_modules/todomvc-app-css/package.json deleted file mode 100644 index 8ddb61306f..0000000000 --- a/examples/humble/node_modules/todomvc-app-css/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "todomvc-app-css", - "version": "2.0.1", - "description": "CSS for TodoMVC apps", - "license": "CC-BY-4.0", - "repository": { - "type": "git", - "url": "https://github.com/tastejs/todomvc-app-css" - }, - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "files": [ - "index.css" - ], - "keywords": [ - "todomvc", - "tastejs", - "app", - "todo", - "template", - "css", - "style", - "stylesheet" - ], - "gitHead": "f1bb1aa9b19888f339055418374a9b3a2d4c6fc5", - "bugs": { - "url": "https://github.com/tastejs/todomvc-app-css/issues" - }, - "homepage": "https://github.com/tastejs/todomvc-app-css", - "_id": "todomvc-app-css@2.0.1", - "scripts": {}, - "_shasum": "f64d50b744a8a83c1151a08055b88f3aa5ccb052", - "_from": "todomvc-app-css@>=2.0.0 <3.0.0", - "_npmVersion": "2.5.1", - "_nodeVersion": "0.12.0", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "addyosmani", - "email": "addyosmani@gmail.com" - }, - { - "name": "passy", - "email": "phartig@rdrei.net" - }, - { - "name": "stephenplusplus", - "email": "sawchuk@gmail.com" - } - ], - "dist": { - "shasum": "f64d50b744a8a83c1151a08055b88f3aa5ccb052", - "tarball": "http://registry.npmjs.org/todomvc-app-css/-/todomvc-app-css-2.0.1.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/todomvc-app-css/-/todomvc-app-css-2.0.1.tgz" -} diff --git a/examples/humble/node_modules/todomvc-app-css/readme.md b/examples/humble/node_modules/todomvc-app-css/readme.md deleted file mode 100644 index 6ddbebf024..0000000000 --- a/examples/humble/node_modules/todomvc-app-css/readme.md +++ /dev/null @@ -1,28 +0,0 @@ -# todomvc-app-css - -> CSS for TodoMVC apps - -![](screenshot.png) - - -## Install - - -``` -$ npm install --save todomvc-app-css -``` - - -## Getting started - -```html - -``` - -See the [TodoMVC app template](https://github.com/tastejs/todomvc-app-template). - - - -## License - -Creative Commons License
            This work by Sindre Sorhus is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/examples/humble/node_modules/todomvc-common/base.css b/examples/humble/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/humble/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/humble/node_modules/todomvc-common/base.js b/examples/humble/node_modules/todomvc-common/base.js deleted file mode 100644 index 315d278c3c..0000000000 --- a/examples/humble/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,249 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-31081062-1', 'auto'); - ga('send', 'pageview'); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length; - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - // getFile('learn.json', Learn); -})(); diff --git a/examples/humble/node_modules/todomvc-common/package.json b/examples/humble/node_modules/todomvc-common/package.json deleted file mode 100644 index 0bcff0fb11..0000000000 --- a/examples/humble/node_modules/todomvc-common/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "todomvc-common", - "version": "1.0.2", - "description": "Common TodoMVC utilities used by our apps", - "license": "MIT", - "repository": { - "type": "git", - "url": "https://github.com/tastejs/todomvc-common" - }, - "author": { - "name": "TasteJS" - }, - "main": "base.js", - "files": [ - "base.js", - "base.css" - ], - "keywords": [ - "todomvc", - "tastejs", - "util", - "utilities" - ], - "gitHead": "e82d0c79e01687ce7407df786cc784ad82166cb3", - "bugs": { - "url": "https://github.com/tastejs/todomvc-common/issues" - }, - "homepage": "https://github.com/tastejs/todomvc-common", - "_id": "todomvc-common@1.0.2", - "scripts": {}, - "_shasum": "eb3ab61281ac74809f5869c917c7b08bc84234e0", - "_from": "todomvc-common@>=1.0.0 <2.0.0", - "_npmVersion": "2.7.4", - "_nodeVersion": "0.12.2", - "_npmUser": { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - "dist": { - "shasum": "eb3ab61281ac74809f5869c917c7b08bc84234e0", - "tarball": "http://registry.npmjs.org/todomvc-common/-/todomvc-common-1.0.2.tgz" - }, - "maintainers": [ - { - "name": "sindresorhus", - "email": "sindresorhus@gmail.com" - }, - { - "name": "addyosmani", - "email": "addyosmani@gmail.com" - }, - { - "name": "passy", - "email": "phartig@rdrei.net" - }, - { - "name": "stephenplusplus", - "email": "sawchuk@gmail.com" - } - ], - "directories": {}, - "_resolved": "https://registry.npmjs.org/todomvc-common/-/todomvc-common-1.0.2.tgz", - "readme": "ERROR: No README data found!" -} diff --git a/examples/humble/node_modules/todomvc-common/readme.md b/examples/humble/node_modules/todomvc-common/readme.md deleted file mode 100644 index 7a5de5118f..0000000000 --- a/examples/humble/node_modules/todomvc-common/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# todomvc-common - -> Common TodoMVC utilities used by our apps - - -## Install - -``` -$ npm install --save todomvc-common -``` - - -## License - -MIT © [TasteJS](http://tastejs.com) diff --git a/examples/humble/package.json b/examples/humble/package.json deleted file mode 100644 index e939a50f20..0000000000 --- a/examples/humble/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private": true, - "dependencies": { - "todomvc-app-css": "^2.0.0", - "todomvc-common": "^1.0.0" - } -} diff --git a/examples/humble/serve.go b/examples/humble/serve.go deleted file mode 100644 index cbdbb802ce..0000000000 --- a/examples/humble/serve.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build ignore - -package main - -import ( - "log" - "net/http" -) - -func main() { - addr := "localhost:8000" - log.Println("Serving on http://" + addr) - log.Fatal(http.ListenAndServe(addr, http.FileServer(http.Dir(".")))) -} diff --git a/examples/meteor/.bowerrc b/examples/meteor/.bowerrc deleted file mode 100644 index e707f8fb3e..0000000000 --- a/examples/meteor/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory": "client/bower_components" -} diff --git a/examples/meteor/.meteor/.gitignore b/examples/meteor/.meteor/.gitignore deleted file mode 100644 index 4083037423..0000000000 --- a/examples/meteor/.meteor/.gitignore +++ /dev/null @@ -1 +0,0 @@ -local diff --git a/examples/meteor/.meteor/.id b/examples/meteor/.meteor/.id deleted file mode 100644 index d9665f1f41..0000000000 --- a/examples/meteor/.meteor/.id +++ /dev/null @@ -1,7 +0,0 @@ -# This file contains a token that is unique to your project. -# Check it into your repository along with the rest of this directory. -# It can be used for purposes such as: -# - ensuring you don't accidentally deploy one app on top of another -# - providing package authors with aggregated statistics - -181lbexnajpbf74ep8 diff --git a/examples/meteor/.meteor/packages b/examples/meteor/.meteor/packages deleted file mode 100644 index 4daa89c271..0000000000 --- a/examples/meteor/.meteor/packages +++ /dev/null @@ -1 +0,0 @@ -standard-app-packages diff --git a/examples/meteor/.meteor/platforms b/examples/meteor/.meteor/platforms deleted file mode 100644 index 8a3a35f9f6..0000000000 --- a/examples/meteor/.meteor/platforms +++ /dev/null @@ -1,2 +0,0 @@ -browser -server diff --git a/examples/meteor/.meteor/release b/examples/meteor/.meteor/release deleted file mode 100644 index 23c773e6bb..0000000000 --- a/examples/meteor/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -METEOR@1.0.3.1 \ No newline at end of file diff --git a/examples/meteor/.meteor/versions b/examples/meteor/.meteor/versions deleted file mode 100644 index 754058a245..0000000000 --- a/examples/meteor/.meteor/versions +++ /dev/null @@ -1,49 +0,0 @@ -application-configuration@1.0.4 -autoupdate@1.1.5 -base64@1.0.2 -binary-heap@1.0.2 -blaze@2.0.4 -blaze-tools@1.0.2 -boilerplate-generator@1.0.2 -callback-hook@1.0.2 -check@1.0.4 -ddp@1.0.14 -deps@1.0.6 -ejson@1.0.5 -fastclick@1.0.2 -follower-livedata@1.0.3 -geojson-utils@1.0.2 -html-tools@1.0.3 -htmljs@1.0.3 -http@1.0.10 -id-map@1.0.2 -jquery@1.11.3 -json@1.0.2 -launch-screen@1.0.1 -livedata@1.0.12 -logging@1.0.6 -meteor@1.1.4 -meteor-platform@1.2.1 -minifiers@1.1.3 -minimongo@1.0.6 -mobile-status-bar@1.0.2 -mongo@1.0.11 -observe-sequence@1.0.4 -ordered-dict@1.0.2 -random@1.0.2 -reactive-dict@1.0.5 -reactive-var@1.0.4 -reload@1.1.2 -retry@1.0.2 -routepolicy@1.0.4 -session@1.0.5 -spacebars@1.0.5 -spacebars-compiler@1.0.4 -standard-app-packages@1.0.4 -templating@1.0.11 -tracker@1.0.5 -ui@1.0.5 -underscore@1.0.2 -url@1.0.3 -webapp@1.1.6 -webapp-hashing@1.0.2 diff --git a/examples/meteor/app.html b/examples/meteor/app.html deleted file mode 100644 index b549a34ab5..0000000000 --- a/examples/meteor/app.html +++ /dev/null @@ -1,66 +0,0 @@ - - - Meteor • TodoMVC - - -
            - {{> todoapp}} -
            - - - - - - - - - - diff --git a/examples/meteor/app.js b/examples/meteor/app.js deleted file mode 100644 index 0b7dd13bb9..0000000000 --- a/examples/meteor/app.js +++ /dev/null @@ -1,230 +0,0 @@ -// Collection to keep the todos -Todos = new Meteor.Collection('todos'); - -// JS code for the client (browser) -if (Meteor.isClient) { - - // Session var to keep current filter type ("all", "active", "completed") - Session.set('filter', 'all'); - - // Session var to keep todo which is currently in editing mode, if any - Session.set('editing_todo', null); - - // Set up filter types and their mongo db selectors - var filter_selections = { - all: {}, - active: {completed: false}, - completed: {completed: true} - }; - - // Get selector types as array - var filters = _.keys(filter_selections); - - // Bind route handlers to filter types - var routes = {}; - _.each(filters, function(filter) { - routes['/'+filter] = function() { - Session.set('filter', filter); - }; - }); - - // Initialize router with routes - var router = Router(routes); - router.init(); - - ///////////////////////////////////////////////////////////////////////// - // The following two functions are taken from the official Meteor - // "Todos" example - // The original code can be viewed at: https://github.com/meteor/meteor - ///////////////////////////////////////////////////////////////////////// - - // Returns an event_map key for attaching "ok/cancel" events to - // a text input (given by selector) - var okcancel_events = function (selector) { - return 'keyup '+selector+', keydown '+selector+', focusout '+selector; - }; - - // Creates an event handler for interpreting "escape", "return", and "blur" - // on a text field and calling "ok" or "cancel" callbacks. - var make_okcancel_handler = function (options) { - var ok = options.ok || function () {}; - var cancel = options.cancel || function () {}; - - return function (evt) { - if (evt.type === 'keydown' && evt.which === 27) { - // escape = cancel - cancel.call(this, evt); - - } else if (evt.type === 'keyup' && evt.which === 13 || - evt.type === 'focusout') { - // blur/return/enter = ok/submit if non-empty - var value = String(evt.target.value || ''); - if (value) { - ok.call(this, value, evt); - } else { - cancel.call(this, evt); - } - } - }; - }; - - // Some helpers - - // Get the number of todos completed - var todos_completed_helper = function() { - return Todos.find({completed: true}).count(); - }; - - // Get the number of todos not completed - var todos_not_completed_helper = function() { - return Todos.find({completed: false}).count(); - }; - - //// - // Logic for the 'todoapp' partial which represents the whole app - //// - - // Helper to get the number of todos - Template.todoapp.todos = function() { - return Todos.find().count(); - }; - - Template.todoapp.events = {}; - - // Register key events for adding new todo - Template.todoapp.events[okcancel_events('#new-todo')] = - make_okcancel_handler({ - ok: function (title, evt) { - Todos.insert({title: $.trim(title), completed: false, - created_at: new Date().getTime()}); - evt.target.value = ''; - } - }); - - //// - // Logic for the 'main' partial which wraps the actual todo list - //// - - // Get the todos considering the current filter type - Template.main.todos = function() { - return Todos.find(filter_selections[Session.get('filter')], {sort: {created_at: 1}}); - }; - - Template.main.todos_not_completed = todos_not_completed_helper; - - // Register click event for toggling complete/not complete button - Template.main.events = { - 'click input#toggle-all': function(evt) { - var completed = true; - if (!Todos.find({completed: false}).count()) { - completed = false; - } - Todos.find({}).forEach(function(todo) { - Todos.update({'_id': todo._id}, {$set: {completed: completed}}); - }); - } - }; - - //// - // Logic for the 'todo' partial representing a todo - //// - - // True of current todo is completed, false otherwise - Template.todo.todo_completed = function() { - return this.completed; - }; - - // Get the current todo which is in editing mode, if any - Template.todo.todo_editing = function() { - return Session.equals('editing_todo', this._id); - }; - - // Register events for toggling todo's state, editing mode and destroying a todo - Template.todo.events = { - 'click input.toggle': function() { - Todos.update(this._id, {$set: {completed: !this.completed}}); - }, - 'dblclick label': function() { - Session.set('editing_todo', this._id); - }, - 'click button.destroy': function() { - Todos.remove(this._id); - } - }; - - // Register key events for updating title of an existing todo - Template.todo.events[okcancel_events('li.editing input.edit')] = - make_okcancel_handler({ - ok: function (value) { - Session.set('editing_todo', null); - Todos.update(this._id, {$set: {title: $.trim(value)}}); - }, - cancel: function () { - Session.set('editing_todo', null); - Todos.remove(this._id); - } - }); - - //// - // Logic for the 'footer' partial - //// - - Template.footer.todos_completed = todos_completed_helper; - - Template.footer.todos_not_completed = todos_not_completed_helper; - - // True if exactly one todo is not completed, false otherwise - // Used for handling pluralization of "item"/"items" word - Template.footer.todos_one_not_completed = function() { - return Todos.find({completed: false}).count() == 1; - }; - - // Prepare array with keys of filter_selections only - Template.footer.filters = filters; - - // True if the requested filter type is currently selected, - // false otherwise - Template.footer.filter_selected = function(type) { - return Session.equals('filter', type); - }; - - // Register click events for clearing completed todos - Template.footer.events = { - 'click button#clear-completed': function() { - Meteor.call('clearCompleted'); - } - }; -} - -//Publish and subscribe setting -if (Meteor.isServer) { - Meteor.publish('todos', function () { - return Todos.find(); - }); -} - -if (Meteor.isClient) { - Meteor.subscribe('todos'); -} - -//Allow users to write directly to this collection from client code, subject to limitations you define. -if (Meteor.isServer) { - Todos.allow({ - insert: function () { - return true; - }, - update: function () { - return true; - }, - remove: function () { - return true; - } - }); -} - -//Defines functions that can be invoked over the network by clients. -Meteor.methods({ - clearCompleted: function () { - Todos.remove({completed: true}); - } -}); \ No newline at end of file diff --git a/examples/meteor/bower.json b/examples/meteor/bower.json deleted file mode 100644 index 83a4ac211f..0000000000 --- a/examples/meteor/bower.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "todomvc-meteor", - "version": "0.0.0", - "dependencies": { - "todomvc-common": "~0.3.0", - "director": "~1.2.0" - } -} diff --git a/examples/meteor/client/bower_components/director/build/director.js b/examples/meteor/client/bower_components/director/build/director.js deleted file mode 100644 index 0befbe0751..0000000000 --- a/examples/meteor/client/bower_components/director/build/director.js +++ /dev/null @@ -1,712 +0,0 @@ - - -// -// Generated on Sun Dec 16 2012 22:47:05 GMT-0500 (EST) by Nodejitsu, Inc (Using Codesurgeon). -// Version 1.1.9 -// - -(function (exports) { - - -/* - * browser.js: Browser specific functionality for director. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -if (!Array.prototype.filter) { - Array.prototype.filter = function(filter, that) { - var other = [], v; - for (var i = 0, n = this.length; i < n; i++) { - if (i in this && filter.call(that, v = this[i], i, this)) { - other.push(v); - } - } - return other; - }; -} - -if (!Array.isArray){ - Array.isArray = function(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; - }; -} - -var dloc = document.location; - -function dlocHashEmpty() { - // Non-IE browsers return '' when the address bar shows '#'; Director's logic - // assumes both mean empty. - return dloc.hash === '' || dloc.hash === '#'; -} - -var listener = { - mode: 'modern', - hash: dloc.hash, - history: false, - - check: function () { - var h = dloc.hash; - if (h != this.hash) { - this.hash = h; - this.onHashChanged(); - } - }, - - fire: function () { - if (this.mode === 'modern') { - this.history === true ? window.onpopstate() : window.onhashchange(); - } - else { - this.onHashChanged(); - } - }, - - init: function (fn, history) { - var self = this; - this.history = history; - - if (!Router.listeners) { - Router.listeners = []; - } - - function onchange(onChangeEvent) { - for (var i = 0, l = Router.listeners.length; i < l; i++) { - Router.listeners[i](onChangeEvent); - } - } - - //note IE8 is being counted as 'modern' because it has the hashchange event - if ('onhashchange' in window && (document.documentMode === undefined - || document.documentMode > 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write(" - - - diff --git a/examples/olives/js/app.js b/examples/olives/js/app.js deleted file mode 100644 index 30a213f9fc..0000000000 --- a/examples/olives/js/app.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; -var input = require('./uis/input'); -var list = require('./uis/list'); -var controls = require('./uis/controls'); - -var LocalStore = require('olives').LocalStore; -var Store = require('emily').Store; - -// The tasks Store is told to init on an array -// so tasks are indexed by a number -// This store is shared among several UIs of this application -// that's why it's created here -var tasks = new LocalStore([]); - -// Also create a shared stats store -var stats = new Store({ - nbItems: 0, - nbLeft: 0, - nbCompleted: 0, - plural: 'items' -}); - -// Synchronize the store on 'todos-olives' localStorage -tasks.sync('todos-olives'); - -// Initialize Input UI by giving it a view and a model. -input(document.querySelector('.header input'), tasks); - -// Init the List UI the same way, pass it the stats store too -list(document.querySelector('.main'), tasks, stats); - -// Same goes for the control UI -controls(document.querySelector('.footer'), tasks, stats); diff --git a/examples/olives/js/lib/RouterPlugin.js b/examples/olives/js/lib/RouterPlugin.js deleted file mode 100644 index b205235863..0000000000 --- a/examples/olives/js/lib/RouterPlugin.js +++ /dev/null @@ -1,43 +0,0 @@ -'use strict'; - -var tools = require('./tools'); - -var routes = { - '#/': 'show-all', - '#/completed': 'show-completed', - '#/active': 'show-active' -}; - -/** - * A quick plugin to interface with a url-highway router. - * @param {url highway} the router's instance - * @constructor - */ -module.exports = function RouterPlugin(router) { - var currentRoute = router.getLastRoute(); - - /** - * Set a given className to a dom element if its hash matches with the url's hash - * @param link - * @param className - */ - this.isLinkActive = function isLinkActive(link, className) { - if (router.getLastRoute() === link.hash) { - link.classList.add(className); - } - - router.watch(function (route) { - tools.toggleClass.call(link, link.hash === route, className); - }); - }; - - this.toggleClassOnRouteChange = function toggleClassOnRouteChange(list) { - router.watch(function (route) { - list.classList.remove(routes[currentRoute]); - list.classList.add(routes[route]); - currentRoute = route; - }); - }; - - router.start('#/'); -}; diff --git a/examples/olives/js/lib/router.js b/examples/olives/js/lib/router.js deleted file mode 100644 index 9279f3fd3e..0000000000 --- a/examples/olives/js/lib/router.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict'; - -var UrlHighway = require('url-highway'); - -var urlHighway = new UrlHighway(); - -urlHighway.parse = function (hash) { - return [hash]; -}; - -module.exports = urlHighway; diff --git a/examples/olives/js/lib/tools.js b/examples/olives/js/lib/tools.js deleted file mode 100644 index 9722cc2e6b..0000000000 --- a/examples/olives/js/lib/tools.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict'; - -/* - * A set of commonly used functions. - * They're useful for several UIs in the app. - * They could also be reused in other projects - */ -module.exports = { - // className is set to the 'this' dom node according to the value's truthiness - toggleClass: function (value, className) { - if (value) { - this.classList.add(className); - } else { - this.classList.remove(className); - } - } -}; diff --git a/examples/olives/js/uis/controls.js b/examples/olives/js/uis/controls.js deleted file mode 100644 index 3bc920be72..0000000000 --- a/examples/olives/js/uis/controls.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -var OObject = require('olives').OObject; -var EventPlugin = require('olives')['Event.plugin']; -var BindPlugin = require('olives')['Bind.plugin']; -var tools = require('../lib/tools'); -var router = require('../lib/router'); -var RouterPlugin = require('../lib/RouterPlugin'); - -module.exports = function controlsInit(view, model, stats) { - // The OObject (the controller) inits with a default model which is a simple store - // But it can be init'ed with any other store, like the LocalStore - var controls = new OObject(model); - - // A function to get the completed tasks - function getCompleted() { - var completed = []; - model.loop(function (value, id) { - if (value.completed) { - completed.push(id); - } - }); - return completed; - } - - // Update all stats - function updateStats() { - var nbCompleted = getCompleted().length; - - stats.set('nbItems', model.count()); - stats.set('nbLeft', stats.get('nbItems') - nbCompleted); - stats.set('nbCompleted', nbCompleted); - stats.set('plural', stats.get('nbLeft') === 1 ? 'item' : 'items'); - } - - // Add plugins to the UI. - controls.seam.addAll({ - event: new EventPlugin(controls), - router: new RouterPlugin(router), - stats: new BindPlugin(stats, { - toggleClass: tools.toggleClass - }) - }); - - // Alive applies the plugins to the HTML view - controls.alive(view); - - // Delete all tasks - controls.delAll = function delAll() { - model.delAll(getCompleted()); - }; - - // Update stats when the tasks list is modified - model.watch('added', updateStats); - model.watch('deleted', updateStats); - model.watch('updated', updateStats); - - // I could either update stats at init or save them in a localStore - updateStats(); -}; diff --git a/examples/olives/js/uis/input.js b/examples/olives/js/uis/input.js deleted file mode 100644 index 9d01b8437b..0000000000 --- a/examples/olives/js/uis/input.js +++ /dev/null @@ -1,29 +0,0 @@ -'use strict'; -var OObject = require('olives').OObject; -var EventPlugin = require('olives')['Event.plugin']; - -// It returns an init function -module.exports = function inputInit(view, model) { - // The OObject (the controller) inits with a default model which is a simple store - // But it can be init'ed with any other store, like the LocalStore - var input = new OObject(model); - var ENTER_KEY = 13; - - // The event plugin that is added to the OObject - // We have to tell it where to find the methods - input.seam.add('event', new EventPlugin(input)); - - // The method to add a new taks - input.addTask = function addTask(event, node) { - if (event.keyCode === ENTER_KEY && node.value.trim()) { - model.alter('push', { - title: node.value.trim(), - completed: false - }); - node.value = ''; - } - }; - - // Alive applies the plugins to the HTML view - input.alive(view); -}; diff --git a/examples/olives/js/uis/list.js b/examples/olives/js/uis/list.js deleted file mode 100644 index 76d3310598..0000000000 --- a/examples/olives/js/uis/list.js +++ /dev/null @@ -1,91 +0,0 @@ -'use strict'; -var OObject = require('olives').OObject; -var EventPlugin = require('olives')['Event.plugin']; -var BindPlugin = require('olives')['Bind.plugin']; -var tools = require('../lib/tools'); -var router = require('../lib/router'); -var RouterPlugin = require('../lib/routerPlugin'); - -module.exports = function listInit(view, model, stats) { - // The OObject (the controller) initializes with a default model which is a simple store - // But it can be initialized with any other store, like the LocalStore - var list = new OObject(model); - var modelPlugin = new BindPlugin(model, { - toggleClass: tools.toggleClass - }); - var ENTER_KEY = 13; - var ESC_KEY = 27; - - // The plugins - list.seam.addAll({ - event: new EventPlugin(list), - model: modelPlugin, - router: new RouterPlugin(router), - stats: new BindPlugin(stats, { - toggleClass: tools.toggleClass, - toggleCheck: function (value) { - this.checked = model.count() === value ? 'on' : ''; - } - }) - }); - - // Remove the completed task - list.remove = function remove(event, node) { - model.del(node.getAttribute('data-model_id')); - }; - - // Un/check all tasks - list.toggleAll = function toggleAll(event, node) { - var checked = !!node.checked; - - model.loop(function (value, idx) { - this.update(idx, 'completed', checked); - }, model); - }; - - // Enter edit mode - list.startEdit = function startEdit(event, node) { - var taskId = modelPlugin.getItemIndex(node); - - toggleEditing(taskId, true); - getElementByModelId('input.edit', taskId).focus(); - }; - - // Leave edit mode - list.stopEdit = function stopEdit(event, node) { - var taskId = modelPlugin.getItemIndex(node); - var value; - - if (event.keyCode === ENTER_KEY || event.type === 'blur') { - value = node.value.trim(); - - if (value) { - model.update(taskId, 'title', value); - } else { - model.del(taskId); - } - - // When task #n is removed, #n+1 becomes #n, the dom node is updated to the new value, - // so editing mode should exit anyway - if (model.has(taskId)) { - toggleEditing(taskId, false); - } - } else if (event.keyCode === ESC_KEY) { - toggleEditing(taskId, false); - // Also reset the input field to the previous value so that the blur event doesn't pick up the discarded one - node.value = model.get(taskId).title; - } - }; - - // Alive applies the plugins to the HTML view - list.alive(view); - - function toggleEditing(taskId, bool) { - var li = getElementByModelId('li', taskId); - tools.toggleClass.call(li, bool, 'editing'); - } - - function getElementByModelId(selector, taskId) { - return view.querySelector(selector + '[data-model_id="' + taskId + '"]'); - } -}; diff --git a/examples/olives/node_modules/todomvc-app-css/index.css b/examples/olives/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/olives/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/olives/node_modules/todomvc-common/base.css b/examples/olives/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/olives/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/olives/node_modules/todomvc-common/base.js b/examples/olives/node_modules/todomvc-common/base.js deleted file mode 100644 index 3c6723f390..0000000000 --- a/examples/olives/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,249 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ - (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), - m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) - })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); - ga('create', 'UA-31081062-1', 'auto'); - ga('send', 'pageview'); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length; - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/olives/olives-todo.js b/examples/olives/olives-todo.js deleted file mode 100644 index 21458688e5..0000000000 --- a/examples/olives/olives-todo.js +++ /dev/null @@ -1,6457 +0,0 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o -// -// 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 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. - -// when used in node, this will actually load the util module we depend on -// versus loading the builtin util module as happens otherwise -// this is a bug in node module loading as far as I am concerned -var util = require('util/'); - -var pSlice = Array.prototype.slice; -var hasOwn = Object.prototype.hasOwnProperty; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = module.exports = ok; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({ message: message, -// actual: actual, -// expected: expected }) - -assert.AssertionError = function AssertionError(options) { - this.name = 'AssertionError'; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - if (options.message) { - this.message = options.message; - this.generatedMessage = false; - } else { - this.message = getMessage(this); - this.generatedMessage = true; - } - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } - else { - // non v8 browsers so we can have a stacktrace - var err = new Error(); - if (err.stack) { - var out = err.stack; - - // try to strip useless frames - var fn_name = stackStartFunction.name; - var idx = out.indexOf('\n' + fn_name); - if (idx >= 0) { - // once we have located the function frame - // we need to strip out everything before it (and its line) - var next_line = out.indexOf('\n', idx + 1); - out = out.substring(next_line + 1); - } - - this.stack = out; - } - } -}; - -// assert.AssertionError instanceof Error -util.inherits(assert.AssertionError, Error); - -function replacer(key, value) { - if (util.isUndefined(value)) { - return '' + value; - } - if (util.isNumber(value) && !isFinite(value)) { - return value.toString(); - } - if (util.isFunction(value) || util.isRegExp(value)) { - return value.toString(); - } - return value; -} - -function truncate(s, n) { - if (util.isString(s)) { - return s.length < n ? s : s.slice(0, n); - } else { - return s; - } -} - -function getMessage(self) { - return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' + - self.operator + ' ' + - truncate(JSON.stringify(self.expected, replacer), 128); -} - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, !!guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -function ok(value, message) { - if (!value) fail(value, true, message, '==', assert.ok); -} -assert.ok = ok; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, '==', assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, '!=', assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, 'deepEqual', assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (util.isBuffer(actual) && util.isBuffer(expected)) { - if (actual.length != expected.length) return false; - - for (var i = 0; i < actual.length; i++) { - if (actual[i] !== expected[i]) return false; - } - - return true; - - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (util.isDate(actual) && util.isDate(expected)) { - return actual.getTime() === expected.getTime(); - - // 7.3 If the expected value is a RegExp object, the actual value is - // equivalent if it is also a RegExp object with the same source and - // properties (`global`, `multiline`, `lastIndex`, `ignoreCase`). - } else if (util.isRegExp(actual) && util.isRegExp(expected)) { - return actual.source === expected.source && - actual.global === expected.global && - actual.multiline === expected.multiline && - actual.lastIndex === expected.lastIndex && - actual.ignoreCase === expected.ignoreCase; - - // 7.4. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (!util.isObject(actual) && !util.isObject(expected)) { - return actual == expected; - - // 7.5 For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b) { - if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - // if one is a primitive, the other must be same - if (util.isPrimitive(a) || util.isPrimitive(b)) { - return a === b; - } - var aIsArgs = isArguments(a), - bIsArgs = isArguments(b); - if ((aIsArgs && !bIsArgs) || (!aIsArgs && bIsArgs)) - return false; - if (aIsArgs) { - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - var ka = objectKeys(a), - kb = objectKeys(b), - key, i; - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key])) return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, '===', assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as -// determined by !==. assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, '!==', assert.notStrictEqual); - } -}; - -function expectedException(actual, expected) { - if (!actual || !expected) { - return false; - } - - if (Object.prototype.toString.call(expected) == '[object RegExp]') { - return expected.test(actual); - } else if (actual instanceof expected) { - return true; - } else if (expected.call({}, actual) === true) { - return true; - } - - return false; -} - -function _throws(shouldThrow, block, expected, message) { - var actual; - - if (util.isString(expected)) { - message = expected; - expected = null; - } - - try { - block(); - } catch (e) { - actual = e; - } - - message = (expected && expected.name ? ' (' + expected.name + ').' : '.') + - (message ? ' ' + message : '.'); - - if (shouldThrow && !actual) { - fail(actual, expected, 'Missing expected exception' + message); - } - - if (!shouldThrow && expectedException(actual, expected)) { - fail(actual, expected, 'Got unwanted exception' + message); - } - - if ((shouldThrow && actual && expected && - !expectedException(actual, expected)) || (!shouldThrow && actual)) { - throw actual; - } -} - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function(err) { if (err) {throw err;}}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if (hasOwn.call(obj, key)) keys.push(key); - } - return keys; -}; - -},{"util/":57}],10:[function(require,module,exports){ -/** -* @license compare-numbers https://github.com/cosmosio/compare-numbers - * - * The MIT License (MIT) - * - * Copyright (c) 2014 Olivier Scherrer - */ -"use strict"; - -/** - * Compares two numbers and tells if the first one is bigger (1), smaller (-1) or equal (0) - * @param {Number} number1 the first number - * @param {Number} number2 the second number - * @returns 1 if number1>number2, -1 if number2>number1, 0 if equal - */ -function compareNumbers(number1, number2) { - if (number1 > number2) { - return 1; - } else if (number1 < number2) { - return -1; - } else { - return 0; - } -} - -module.exports = { - - /** - * Compares two numbers and tells if the first one is bigger (1), smaller (-1) or equal (0) - * @param {Number} number1 the first number - * @param {Number} number2 the second number - * @returns 1 if number1 > number2, -1 if number2 > number1, 0 if equal - */ - "asc": compareNumbers, - - /** - * Compares two numbers and tells if the first one is bigger (1), smaller (-1) or equal (0) - * @param {Number} number1 the first number - * @param {Number} number2 the second number - * @returns 1 if number2 > number1, -1 if number1 > number2, 0 if equal - */ - "desc": function desc(number1, number2) { - return compareNumbers(number2, number1); - } -}; - -},{}],11:[function(require,module,exports){ -/** -* @license data-binding-plugin https://github.com/flams/data-binding-plugin -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2015 Olivier Scherrer -*/ -"use strict"; - -var Observable = require("watch-notify"), - compareNumbers = require("compare-numbers"), - simpleLoop = require("simple-loop"), - toArray = require("to-array"), - getClosest = require("get-closest"), - nestedProperty = require("nested-property"), - getNodes = require("get-nodes"), - getDataset = require("get-dataset"); - -function setAttribute(node, property, value) { - if ('ownerSVGElement' in node) { - node.setAttribute(property, value); - return true; - } else if ('ownerDocument' in node) { - node[property] = value; - return true; - } else { - throw new Error("invalid element type"); - } -} - -/** - * @class - * This plugin links dom nodes to a model - */ -module.exports = function BindPluginConstructor($model, $bindings) { - - /** - * The model to watch - * @private - */ - var _model = null, - - /** - * The list of custom bindings - * @private - */ - _bindings = {}, - - /** - * The list of itemRenderers - * each foreach has its itemRenderer - * @private - */ - _itemRenderers = {}, - - /** - * The observers handlers - * @private - */ - _observers = {}; - - /** - * Exposed for debugging purpose - * @private - */ - this.observers = _observers; - - function _removeObserversForId(id) { - if (_observers[id]) { - _observers[id].forEach(function (handler) { - _model.unwatchValue(handler); - }); - delete _observers[id]; - } - } - - /** - * Define the model to watch for - * @param {Store} model the model to watch for changes - * @returns {Boolean} true if the model was set - */ - this.setModel = function setModel(model) { - _model = model; - }; - - /** - * Get the store that is watched for - * for debugging only - * @private - * @returns the Store - */ - this.getModel = function getModel() { - return _model; - }; - - /** - * The item renderer defines a dom node that can be duplicated - * It is made available for debugging purpose, don't use it - * @private - */ - this.ItemRenderer = function ItemRenderer($plugins, $rootNode) { - - /** - * The node that will be cloned - * @private - */ - var _node = null, - - /** - * The object that contains plugins.name and plugins.apply - * @private - */ - _plugins = null, - - /** - * The _rootNode where to append the created items - * @private - */ - _rootNode = null, - - /** - * The lower boundary - * @private - */ - _start = null, - - /** - * The number of item to display - * @private - */ - _nb = null; - - /** - * Set the duplicated node - * @private - */ - this.setRenderer = function setRenderer(node) { - _node = node; - return true; - }; - - /** - * Returns the node that is going to be used for rendering - * @private - * @returns the node that is duplicated - */ - this.getRenderer = function getRenderer() { - return _node; - }; - - /** - * Sets the rootNode and gets the node to copy - * @private - * @param {HTMLElement|SVGElement} rootNode - * @returns - */ - this.setRootNode = function setRootNode(rootNode) { - var renderer; - _rootNode = rootNode; - renderer = _rootNode.querySelector("*"); - this.setRenderer(renderer); - if (renderer) { - _rootNode.removeChild(renderer); - } - }; - - /** - * Gets the rootNode - * @private - * @returns _rootNode - */ - this.getRootNode = function getRootNode() { - return _rootNode; - }; - - /** - * Set the plugins objet that contains the name and the apply function - * @private - * @param plugins - * @returns true - */ - this.setPlugins = function setPlugins(plugins) { - _plugins = plugins; - return true; - }; - - /** - * Get the plugins object - * @private - * @returns the plugins object - */ - this.getPlugins = function getPlugins() { - return _plugins; - }; - - /** - * The nodes created from the items are stored here - * @private - */ - this.items = {}; - - /** - * Set the start limit - * @private - * @param {Number} start the value to start rendering the items from - * @returns the value - */ - this.setStart = function setStart(start) { - _start = parseInt(start, 10); - return _start; - }; - - /** - * Get the start value - * @private - * @returns the start value - */ - this.getStart = function getStart() { - return _start; - }; - - /** - * Set the number of item to display - * @private - * @param {Number/String} nb the number of item to display or "*" for all - * @returns the value - */ - this.setNb = function setNb(nb) { - _nb = nb == "*" ? nb : parseInt(nb, 10); - return _nb; - }; - - /** - * Get the number of item to display - * @private - * @returns the value - */ - this.getNb = function getNb() { - return _nb; - }; - - /** - * Adds a new item and adds it in the items list - * @private - * @param {Number} id the id of the item - * @returns - */ - this.addItem = function addItem(id) { - var node, - next; - - if (typeof id == "number" && !this.items[id]) { - next = this.getNextItem(id); - node = this.create(id); - if (node) { - // IE (until 9) apparently fails to appendChild when insertBefore's second argument is null, hence this. - if (next) { - _rootNode.insertBefore(node, next); - } else { - _rootNode.appendChild(node); - } - return true; - } else { - return false; - } - } else { - return false; - } - }; - - /** - * Get the next item in the item store given an id. - * @private - * @param {Number} id the id to start from - * @returns - */ - this.getNextItem = function getNextItem(id) { - var keys = Object.keys(this.items).map(function (string) { - return Number(string); - }), - closest = getClosest.greaterNumber(id, keys), - closestId = keys[closest]; - - // Only return if different - if (closestId != id) { - return this.items[closestId]; - } else { - return; - } - }; - - /** - * Remove an item from the dom and the items list - * @private - * @param {Number} id the id of the item to remove - * @returns - */ - this.removeItem = function removeItem(id) { - var item = this.items[id]; - if (item) { - _rootNode.removeChild(item); - delete this.items[id]; - _removeObserversForId(id); - return true; - } else { - return false; - } - }; - - /** - * create a new node. Actually makes a clone of the initial one - * and adds pluginname_id to each node, then calls plugins.apply to apply all plugins - * @private - * @param id - * @param pluginName - * @returns the associated node - */ - this.create = function create(id) { - if (_model.has(id)) { - var newNode = _node.cloneNode(true), - nodes = getNodes(newNode); - - toArray(nodes).forEach(function (child) { - child.setAttribute("data-" + _plugins.name+"_id", id); - }); - - this.items[id] = newNode; - _plugins.apply(newNode); - return newNode; - } - }; - - /** - * Renders the dom tree, adds nodes that are in the boundaries - * and removes the others - * @private - * @returns true boundaries are set - */ - this.render = function render() { - // If the number of items to render is all (*) - // Then get the number of items - var _tmpNb = _nb == "*" ? _model.count() : _nb; - - // This will store the items to remove - var marked = []; - - // Render only if boundaries have been set - if (_nb !== null && _start !== null) { - - // Loop through the existing items - simpleLoop(this.items, function (value, idx) { - // If an item is out of the boundary - idx = Number(idx); - - if (idx < _start || idx >= (_start + _tmpNb) || !_model.has(idx)) { - // Mark it - marked.push(idx); - } - }, this); - - // Remove the marked item from the highest id to the lowest - // Doing this will avoid the id change during removal - // (removing id 2 will make id 3 becoming 2) - marked.sort(compareNumbers.desc).forEach(this.removeItem, this); - - // Now that we have removed the old nodes - // Add the missing one - for (var i=_start, l=_tmpNb+_start; i -*/ -"use strict"; - -var toArray = require("to-array"); - -/** - * @class - * A Stack is a tool for managing DOM elements as groups. Within a group, dom elements - * can be added, removed, moved around. The group can be moved to another parent node - * while keeping the DOM elements in the same order, excluding the parent dom elements's - * children that are not in the Stack. - */ -module.exports = function StackConstructor($parent) { - - /** - * The parent DOM element is a documentFragment by default - * @private - */ - var _parent = document.createDocumentFragment(), - - /** - * The place where the dom elements hide - * @private - */ - _hidePlace = document.createElement("div"), - - /** - * The list of dom elements that are part of the stack - * Helps for excluding elements that are not part of it - * @private - */ - _childNodes = [], - - _lastTransit = null; - - /** - * Add a DOM element to the stack. It will be appended. - * @param {HTMLElement} dom the DOM element to add - * @returns {HTMLElement} dom - */ - this.add = function add(dom) { - if (!this.has(dom)) { - _parent.appendChild(dom); - _childNodes.push(dom); - return dom; - } else { - return false; - } - }; - - /** - * Remove a DOM element from the stack. - * @param {HTMLElement} dom the DOM element to remove - * @returns {HTMLElement} dom - */ - this.remove = function remove(dom) { - var index; - if (this.has(dom)) { - index = _childNodes.indexOf(dom); - _parent.removeChild(dom); - _childNodes.splice(index, 1); - return dom; - } else { - return false; - } - }; - - /** - * Place a stack by appending its DOM elements to a new parent - * @param {HTMLElement} newParentDom the new DOM element to append the stack to - * @returns {HTMLElement} newParentDom - */ - this.place = function place(newParentDom) { - [].slice.call(_parent.childNodes).forEach(function (childDom) { - if (this.has(childDom)) { - newParentDom.appendChild(childDom); - } - }, this); - return this._setParent(newParentDom); - }; - - /** - * Move an element up in the stack - * @param {HTMLElement} dom the dom element to move up - * @returns {HTMLElement} dom - */ - this.up = function up(dom) { - if (this.has(dom)) { - var domPosition = this.getPosition(dom); - this.move(dom, domPosition + 1); - return dom; - } else { - return false; - } - }; - - /** - * Move an element down in the stack - * @param {HTMLElement} dom the dom element to move down - * @returns {HTMLElement} dom - */ - this.down = function down(dom) { - if (this.has(dom)) { - var domPosition = this.getPosition(dom); - this.move(dom, domPosition - 1); - return dom; - } else { - return false; - } - }; - - /** - * Move an element that is already in the stack to a new position - * @param {HTMLElement} dom the dom element to move - * @param {Number} position the position to which to move the DOM element - * @returns {HTMLElement} dom - */ - this.move = function move(dom, position) { - if (this.has(dom)) { - var domIndex = _childNodes.indexOf(dom); - _childNodes.splice(domIndex, 1); - // Preventing a bug in IE when insertBefore is not given a valid - // second argument - var nextElement = getNextElementInDom(position); - if (nextElement) { - _parent.insertBefore(dom, nextElement); - } else { - _parent.appendChild(dom); - } - _childNodes.splice(position, 0, dom); - return dom; - } else { - return false; - } - }; - - function getNextElementInDom(position) { - if (position >= _childNodes.length) { - return; - } - var nextElement = _childNodes[position]; - if (toArray(_parent.childNodes).indexOf(nextElement) == -1) { - return getNextElementInDom(position +1); - } else { - return nextElement; - } - } - - /** - * Insert a new element at a specific position in the stack - * @param {HTMLElement} dom the dom element to insert - * @param {Number} position the position to which to insert the DOM element - * @returns {HTMLElement} dom - */ - this.insert = function insert(dom, position) { - if (!this.has(dom)) { - _childNodes.splice(position, 0, dom); - _parent.insertBefore(dom, _parent.childNodes[position]); - return dom; - } else { - return false; - } - }; - - /** - * Get the position of an element in the stack - * @param {HTMLElement} dom the dom to get the position from - * @returns {HTMLElement} dom - */ - this.getPosition = function getPosition(dom) { - return _childNodes.indexOf(dom); - }; - - /** - * Count the number of elements in a stack - * @returns {Number} the number of items - */ - this.count = function count() { - return _parent.childNodes.length; - }; - - /** - * Tells if a DOM element is in the stack - * @param {HTMLElement} dom the dom to tell if its in the stack - * @returns {HTMLElement} dom - */ - this.has = function has(childDom) { - return this.getPosition(childDom) >= 0; - }; - - /** - * Hide a dom element that was previously added to the stack - * It will be taken out of the dom until displayed again - * @param {HTMLElement} dom the dom to hide - * @return {boolean} if dom element is in the stack - */ - this.hide = function hide(dom) { - if (this.has(dom)) { - _hidePlace.appendChild(dom); - return true; - } else { - return false; - } - }; - - /** - * Show a dom element that was previously hidden - * It will be added back to the dom - * @param {HTMLElement} dom the dom to show - * @return {boolean} if dom element is current hidden - */ - this.show = function show(dom) { - if (this.has(dom) && dom.parentNode === _hidePlace) { - this.move(dom, _childNodes.indexOf(dom)); - return true; - } else { - return false; - } - }; - - /** - * Helper function for hiding all the dom elements - */ - this.hideAll = function hideAll() { - _childNodes.forEach(this.hide, this); - }; - - /** - * Helper function for showing all the dom elements - */ - this.showAll = function showAll() { - _childNodes.forEach(this.show, this); - }; - - /** - * Get the parent node that a stack is currently attached to - * @returns {HTMLElement} parent node - */ - this.getParent = function getParent() { - return _parent; - }; - - /** - * Set the parent element (without appending the stacks dom elements to) - * @private - */ - this._setParent = function _setParent(parent) { - _parent = parent; - return _parent; - }; - - /** - * Get the place where the DOM elements are hidden - * @private - */ - this.getHidePlace = function getHidePlace() { - return _hidePlace; - }; - - /** - * Set the place where the DOM elements are hidden - * @private - */ - this.setHidePlace = function setHidePlace(hidePlace) { - _hidePlace = hidePlace; - }; - - /** - * Get the last dom element that the stack transitted to - * @returns {HTMLElement} the last dom element - */ - this.getLastTransit = function getLastTransit() { - return _lastTransit; - }; - - /** - * Transit between views, will show the new one and hide the previous - * element that the stack transitted to, if any. - * @param {HTMLElement} dom the element to transit to - * @returns {Boolean} false if the element can't be shown - */ - this.transit = function transit(dom) { - if (_lastTransit) { - this.hide(_lastTransit); - } - if (this.show(dom)) { - _lastTransit = dom; - return true; - } else { - return false; - } - }; - - if ($parent) { - this._setParent($parent); - } - -}; - -},{"to-array":51}],13:[function(require,module,exports){ -/** - * Emily.js - http://flams.github.com/emily/ - * Copyright(c) 2012-2015 Olivier Scherrer - * MIT Licensed - */ - var compareNumbers = require("compare-numbers"), - nestedProperty = require("nested-property"), - getClosest = require("get-closest"); - -module.exports = { - Observable: require("watch-notify"), - Promise: require("./Promise"), - Router: require("highway"), - StateMachine: require("synchronous-fsm"), - Store: require("observable-store"), - Tools: { - getGlobal: require("get-global"), - mixin: require("simple-object-mixin"), - count: require("object-count"), - compareNumbers: compareNumbers.asc, - toArray: require("to-array"), - loop: require("simple-loop"), - objectsDiffs : require("shallow-diff"), - clone: require("shallow-copy"), - getNestedProperty: nestedProperty.get, - setNestedProperty: nestedProperty.set, - closest: getClosest.number, - closestGreater: getClosest.greaterNumber, - closestLower: getClosest.lowerNumber - }, - Transport: require("transport") -}; - -},{"./Promise":14,"compare-numbers":10,"get-closest":16,"get-global":18,"highway":20,"nested-property":24,"object-count":25,"observable-store":26,"shallow-copy":41,"shallow-diff":42,"simple-loop":43,"simple-object-mixin":44,"synchronous-fsm":49,"to-array":51,"transport":52,"watch-notify":58}],14:[function(require,module,exports){ -/** -* Emily.js - http://flams.github.com/emily/ -* Copyright(c) 2012-2015 Olivier Scherrer -* MIT Licensed -*/ -"use strict"; - -var Observable = require("watch-notify"), -StateMachine = require("synchronous-fsm"); - -/** -* @class -* Create a promise/A+ -*/ -module.exports = function PromiseConstructor() { - - /** - * The fulfilled value - * @private - */ - var _value = null, - - /** - * The rejection reason - * @private - */ - _reason = null, - - /** - * The funky observable - * @private - */ - _observable = new Observable(), - - /** - * The stateMachine - * @private - */ - _stateMachine = new StateMachine("Pending", { - - // The promise is pending - "Pending": [ - - // It can only be fulfilled when pending - ["fulfill", function onFulfill(value) { - _value = value; - _observable.notify("fulfill", value); - // Then it transits to the fulfilled state - }, "Fulfilled"], - - // it can only be rejected when pending - ["reject", function onReject(reason) { - _reason = reason; - _observable.notify("reject", reason); - // Then it transits to the rejected state - }, "Rejected"], - - // When pending, add the resolver to an observable - ["toFulfill", function toFulfill(resolver) { - _observable.watch("fulfill", resolver); - }], - - // When pending, add the resolver to an observable - ["toReject", function toReject(resolver) { - _observable.watch("reject", resolver); - }]], - - // When fulfilled, - "Fulfilled": [ - // We directly call the resolver with the value - ["toFulfill", function toFulfill(resolver) { - resolver(_value); - }]], - - // When rejected - "Rejected": [ - // We directly call the resolver with the reason - ["toReject", function toReject(resolver) { - resolver(_reason); - }]] - }); - - /** - * Fulfilled the promise. - * A promise can be fulfilld only once. - * @param the fulfillment value - * @returns the promise - */ - this.fulfill = function fulfill(value) { - setTimeout(function () { - _stateMachine.event("fulfill", value); - }, 0); - return this; - - }; - - /** - * Reject the promise. - * A promise can be rejected only once. - * @param the rejection value - * @returns true if the rejection function was called - */ - this.reject = function reject(reason) { - setTimeout(function () { - _stateMachine.event("reject", reason); - }, 0); - return this; - }; - - /** - * The callbacks to call after fulfillment or rejection - * @param {Function} fulfillmentCallback the first parameter is a success function, it can be followed by a scope - * @param {Function} the second, or third parameter is the rejection callback, it can also be followed by a scope - * @examples: - * - * then(fulfillment) - * then(fulfillment, scope, rejection, scope) - * then(fulfillment, rejection) - * then(fulfillment, rejection, scope) - * then(null, rejection, scope) - * @returns {Promise} the new promise - */ - this.then = function then() { - var promise = new PromiseConstructor(); - - // If a fulfillment callback is given - if (arguments[0] instanceof Function) { - // If the second argument is also a function, then no scope is given - if (arguments[1] instanceof Function) { - _stateMachine.event("toFulfill", this.makeResolver(promise, arguments[0])); - } else { - // If the second argument is not a function, it's the scope - _stateMachine.event("toFulfill", this.makeResolver(promise, arguments[0], arguments[1])); - } - } else { - // If no fulfillment callback given, give a default one - _stateMachine.event("toFulfill", this.makeResolver(promise, function () { - promise.fulfill(_value); - })); - } - - // if the second arguments is a callback, it's the rejection one, and the next argument is the scope - if (arguments[1] instanceof Function) { - _stateMachine.event("toReject", this.makeResolver(promise, arguments[1], arguments[2])); - } - - // if the third arguments is a callback, it's the rejection one, and the next arguments is the sopce - if (arguments[2] instanceof Function) { - _stateMachine.event("toReject", this.makeResolver(promise, arguments[2], arguments[3])); - } - - // If no rejection callback is given, give a default one - if (!(arguments[1] instanceof Function) && - !(arguments[2] instanceof Function)) { - _stateMachine.event("toReject", this.makeResolver(promise, function () { - promise.reject(_reason); - })); - } - - return promise; - }; - - /** - * Cast a thenable into an Emily promise - * @returns {Boolean} false if the given promise is not a thenable - */ - this.cast = function cast(thenable) { - if (thenable instanceof PromiseConstructor || - typeof thenable == "object" || - typeof thenable == "function") { - - thenable.then(this.fulfill.bind(this), - this.reject.bind(this)); - - return true; - } else { - return false; - } - }; - - /** - * Make a resolver - * for debugging only - * @private - * @returns {Function} a closure - */ - this.makeResolver = function makeResolver(promise, func, scope) { - return function resolver(value) { - var returnedPromise; - - try { - returnedPromise = func.call(scope, value); - if (returnedPromise === promise) { - throw new TypeError("Promise A+ 2.3.1: If `promise` and `x` refer to the same object, reject `promise` with a `TypeError' as the reason."); - } - if (!promise.cast(returnedPromise)) { - promise.fulfill(returnedPromise); - } - } catch (err) { - promise.reject(err); - } - - }; - }; - - /** - * Returns the reason - * for debugging only - * @private - */ - this.getReason = function getReason() { - return _reason; - }; - - /** - * Returns the reason - * for debugging only - * @private - */ - this.getValue = function getValue() { - return _value; - }; - - /** - * Get the promise's observable - * for debugging only - * @private - * @returns {Observable} - */ - this.getObservable = function getObservable() { - return _observable; - }; - - /** - * Get the promise's stateMachine - * for debugging only - * @private - * @returns {StateMachine} - */ - this.getStateMachine = function getStateMachine() { - return _stateMachine; - }; - - /** - * Get the statesMachine's states - * for debugging only - * @private - * @returns {Object} - */ - this.getStates = function getStates() { - return _states; - }; -}; - -},{"synchronous-fsm":49,"watch-notify":58}],15:[function(require,module,exports){ -/** -* @license event-plugin https://github.com/flams/event-plugin -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer - Olivier Wietrich -*/ -"use strict"; - -/** -* @class -* @requires Utils -* Event plugin adds events listeners to DOM nodes. -* It can also delegate the event handling to a parent dom node -* The event plugin constructor. -* ex: new EventPlugin({method: function(){} ...}, false); -* @param {Object} the object that has the event handling methods -* @param {Boolean} $isMobile if the event handler has to map with touch events -*/ -module.exports = function EventPluginConstructor($parent, $isMobile) { - - /** - * The parent callback - * @private - */ - var _parent = null, - - /** - * Load the tool at runtime so that it doesn't throw an error - * when not loaded in a browser - */ - matchesSelector = require("matches-selector"), - - /** - * The mapping object. - * @private - */ - _map = { - "mousedown" : "touchstart", - "mouseup" : "touchend", - "mousemove" : "touchmove" - }, - - /** - * Is touch device. - * @private - */ - _isMobile = !!$isMobile; - - /** - * Add mapped event listener (for testing purpose). - * @private - */ - this.addEventListener = function addEventListener(node, event, callback, useCapture) { - node.addEventListener(this.map(event), callback, !!useCapture); - }; - - /** - * Listen to DOM events. - * @param {Object} node DOM node - * @param {String} name event's name - * @param {String} listener callback's name - * @param {String} useCapture string - */ - this.listen = function listen(node, name, listener, useCapture) { - this.addEventListener(node, name, function(e){ - _parent[listener].call(_parent, e, node); - }, !!useCapture); - }; - - /** - * Delegate the event handling to a parent DOM element - * @param {Object} node DOM node - * @param {String} selector CSS3 selector to the element that listens to the event - * @param {String} name event's name - * @param {String} listener callback's name - * @param {String} useCapture string - */ - this.delegate = function delegate(node, selector, name, listener, useCapture) { - this.addEventListener(node, name, function(event){ - if (matchesSelector(event.target, selector)) { - _parent[listener].call(_parent, event, node); - } - }, !!useCapture); - }; - - /** - * Get the parent object. - * @return {Object} the parent object - */ - this.getParent = function getParent() { - return _parent; - }; - - /** - * Set the parent object. - * The parent object is an object which the functions are called by node listeners. - * @param {Object} the parent object - * @return true if object has been set - */ - this.setParent = function setParent(parent) { - if (parent instanceof Object){ - _parent = parent; - return true; - } - return false; - }; - - /** - * Get event mapping. - * @param {String} event's name - * @return the mapped event's name - */ - this.map = function map(name) { - return _isMobile ? (_map[name] || name) : name; - }; - - /** - * Set event mapping. - * @param {String} event's name - * @param {String} event's value - * @return true if mapped - */ - this.setMap = function setMap(name, value) { - if (typeof name == "string" && - typeof value == "string") { - _map[name] = value; - return true; - } - return false; - }; - - //init - this.setParent($parent); -}; - -},{"matches-selector":23}],16:[function(require,module,exports){ -/** -* @license get-closest https://github.com/cosmosio/get-closest -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -/** - * Get the closest number in an array - * @param {Number} item the base number - * @param {Array} array the array to search into - * @param {Function} getDiff returns the difference between the base number and - * and the currently read item in the array. The item which returned the smallest difference wins. - * @private - */ -function _getClosest(item, array, getDiff) { - var closest, - diff; - - assert(Array.isArray(array), "Get closest expects an array as second argument"); - - array.forEach(function (comparedItem, comparedItemIndex) { - var thisDiff = getDiff(comparedItem, item); - - if (thisDiff >= 0 && (typeof diff == "undefined" || thisDiff < diff)) { - diff = thisDiff; - closest = comparedItemIndex; - } - }); - - return closest; -} - -module.exports = { - - /** - * Get the closest number in an array given a base number - * Example: closest(30, [20, 0, 50, 29]) will return 3 as 29 is the closest item - * @param {Number} item the base number - * @param {Array} array the array of numbers to search into - * @returns {Number} the index of the closest item in the array - */ - number: function closestNumber(item, array) { - return _getClosest(item, array, function (comparedItem, item) { - return Math.abs(comparedItem - item); - }); - }, - - /** - * Get the closest greater number in an array given a base number - * Example: closest(30, [20, 0, 50, 29]) will return 2 as 50 is the closest greater item - * @param {Number} item the base number - * @param {Array} array the array of numbers to search into - * @returns {Number} the index of the closest item in the array - */ - greaterNumber: function closestGreaterNumber(item, array) { - return _getClosest(item, array, function (comparedItem, item) { - return comparedItem - item; - }); - }, - - /** - * Get the closest lower number in an array given a base number - * Example: closest(30, [20, 0, 50, 29]) will return 0 as 20 is the closest lower item - * @param {Number} item the base number - * @param {Array} array the array of numbers to search into - * @returns {Number} the index of the closest item in the array - */ - lowerNumber: function closestLowerNumber(item, array) { - return _getClosest(item, array, function (comparedItem, item) { - return item - comparedItem; - }); - }, - - /** - * Get the closest item in an array given a base item and a comparator function - * Example (closest("lundi", ["mundi", "mardi"], getLevenshteinDistance)) will return 0 for "lundi" - * @param {*} item the base item - * @param {Array} array an array of items - * @param {Function} comparator a comparatof function to compare the items - * - * The function looks like: - * - * // comparedItem comes from the array - * // baseItem is the item to compare the others to - * // It returns a number - * function comparator(comparedItem, baseItem) { - * return comparedItem - baseItem; - * } - */ - custom: function closestCustom(item, array, comparator) { - return _getClosest(item, array, comparator); - } - -}; - -},{"assert":9}],17:[function(require,module,exports){ -/** -* @license get-dataset https://github.com/cosmios/get-dataset -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -/** - * Get a domNode's dataset attribute. If dataset doesn't exist (IE) - * then the domNode is looped through to collect them. - * @param {HTMLElement|SVGElement} dom - * @returns {Object} dataset - */ - module.exports = function getDataset(dom) { - var dataset = {}, - i, l, split,join; - - if ("dataset" in dom) { - return dom.dataset; - } else { - for (i=0, l=dom.attributes.length; i - */ -"use strict"; - -/** - * Return the global object, whatever the runtime is. - * As we're in use strict mode, we can't just call a function and return this. Instead, we spawn a new - * function via eval that won't be affected by 'use strict'. - * Strict mode is enforced so it allows this code to work when packed in another 'strict mode' module. - */ -module.exports = function getGlobal() { - return Function('return this')(); -}; - -},{}],19:[function(require,module,exports){ -/** -* @license get-nodes https://github.com/cosmios/get-nodes -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var toArray = require("to-array"); - -module.exports = function getNodes(dom) { - var domElements = dom.querySelectorAll("*"), - arrayDomElements = toArray(domElements); - - arrayDomElements.unshift(dom); - - return arrayDomElements; -}; - -},{"to-array":51}],20:[function(require,module,exports){ -/** -* @license highway https://github.com/cosmosio/highway -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2015 Olivier Scherrer -*/ -"use strict"; - -var Observable = require("watch-notify"), - toArray = require("to-array"); - -/** - * @class - * Routing allows for navigating in an application by defining routes. - */ -module.exports = function RouterConstructor() { - - /** - * The routes observable (the applications use it) - * @private - */ - var _routes = new Observable(), - - /** - * The events observable (used by Routing) - * @private - */ - _events = new Observable(), - - /** - * The routing history - * @private - */ - _history = [], - - /** - * For navigating through the history, remembers the current position - * @private - */ - _currentPos = -1, - - /** - * The depth of the history - * @private - */ - _maxHistory = 10; - - /** - * Only for debugging - * @private - */ - this.getRoutesObservable = function getRoutesObservable() { - return _routes; - }; - - /** - * Only for debugging - * @private - */ - this.getEventsObservable = function getEventsObservable() { - return _events; - }; - - /** - * Set the maximum length of history - * As the user navigates through the application, the - * routeur keeps track of the history. Set the depth of the history - * depending on your need and the amount of memory that you can allocate it - * @param {Number} maxHistory the depth of history - * @returns {Boolean} true if maxHistory is equal or greater than 0 - */ - this.setMaxHistory = function setMaxHistory(maxHistory) { - if (maxHistory >= 0) { - _maxHistory = maxHistory; - return true; - } else { - return false; - } - - }; - - /** - * Get the current max history setting - * @returns {Number} the depth of history - */ - this.getMaxHistory = function getMaxHistory() { - return _maxHistory; - }; - - /** - * Set a new route - * @param {String} route the name of the route - * @param {Function} func the function to be execute when navigating to the route - * @param {Object} scope the scope in which to execute the function - * @returns a handle to remove the route - */ - this.set = function set() { - return _routes.watch.apply(_routes, arguments); - }; - - /** - * Remove a route - * @param {Object} handle the handle provided by the set method - * @returns true if successfully removed - */ - this.unset = function unset(handle) { - return _routes.unwatch(handle); - }; - - /** - * Navigate to a route - * @param {String} route the route to navigate to - * @param {*} *params - * @returns - */ - this.navigate = function get(route) { - if (this.load.apply(this, arguments)) { - // Before adding a new route to the history, we must clear the forward history - _history.splice(_currentPos +1, _history.length); - _history.push(toArray(arguments)); - this.ensureMaxHistory(_history); - _currentPos = _history.length -1; - return true; - } else { - return false; - } - - }; - - /** - * Ensure that history doesn't grow bigger than the max history setting - * @param {Store} history the history store - * @private - */ - this.ensureMaxHistory = function ensureMaxHistory(history) { - var count = history.length, - max = this.getMaxHistory(), - excess = count - max; - - if (excess > 0) { - history.splice(0, excess); - } - }; - - /** - * Actually loads the route - * @private - */ - this.load = function load() { - var copy = toArray(arguments); - - if (_routes.notify.apply(_routes, copy)) { - copy.unshift("route"); - _events.notify.apply(_events, copy); - return true; - } else { - return false; - } - }; - - /** - * Watch for route changes - * @param {Function} func the func to execute when the route changes - * @param {Object} scope the scope in which to execute the function - * @returns {Object} the handle to unwatch for route changes - */ - this.watch = function watch(func, scope) { - return _events.watch("route", func, scope); - }; - - /** - * Unwatch routes changes - * @param {Object} handle the handle was returned by the watch function - * @returns true if unwatch - */ - this.unwatch = function unwatch(handle) { - return _events.unwatch(handle); - }; - - /** - * Get the history store, for debugging only - * @private - */ - this.getHistoryStore = function getHistoryStore() { - return _history; - }; - - /** - * Get the current length of history - * @returns {Number} the length of history - */ - this.getHistoryCount = function getHistoryCount() { - return _history.length; - }; - - /** - * Flush the entire history - */ - this.clearHistory = function clearHistory() { - _history.length = 0; - }; - - /** - * Go back and forth in the history - * @param {Number} nb the amount of history to rewind/forward - * @returns true if history exists - */ - this.go = function go(nb) { - var history = _history[_currentPos + nb]; - if (history) { - _currentPos += nb; - this.load.apply(this, history); - return true; - } else { - return false; - } - }; - - /** - * Go back in the history, short for go(-1) - * @returns - */ - this.back = function back() { - return this.go(-1); - }; - - /** - * Go forward in the history, short for go(1) - * @returns - */ - this.forward = function forward() { - return this.go(1); - }; - -}; - -},{"to-array":51,"watch-notify":58}],21:[function(require,module,exports){ -/** -* @license local-observable-store https://github.com/cosmosio/local-observable-store -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2015 Olivier Scherrer -*/ -"use strict"; - -var Store = require("observable-store"), - loop = require("simple-loop"); - -/** - * @class - * LocalStore is an Emily's Store that can be synchronized with localStorage - * Synchronize the store, reload your page/browser and resynchronize it with the same value - * and it gets restored. - * Only valid JSON data will be stored - */ -function LocalStoreConstructor() { - - /** - * The name of the property in which to store the data - * @private - */ - var _name = null, - - /** - * The localStorage - * @private - */ - _localStorage = localStorage; - - /** - * Saves the current values in localStorage - * @private - */ - function persistLocalStorage() { - _localStorage.setItem(_name, this.toJSON()); - } - - /** - * Override default localStorage with a new one - * @param local$torage the new localStorage - * @returns {Boolean} true if success - * @private - */ - this.setLocalStorage = function setLocalStorage(local$torage) { - if (local$torage && typeof local$torage.setItem == "function") { - _localStorage = local$torage; - return true; - } else { - return false; - } - }; - - /** - * Get the current localStorage - * @returns localStorage - * @private - */ - this.getLocalStorage = function getLocalStorage() { - return _localStorage; - }; - - /** - * Synchronize the store with localStorage - * @param {String} name the name in which to save the data - * @returns {Boolean} true if the param is a string - */ - this.sync = function sync(name) { - var json; - - if (typeof name == "string") { - _name = name; - json = JSON.parse(_localStorage.getItem(name)); - - loop(json, function (value, idx) { - if (!this.has(idx)) { - this.set(idx, value); - } - }, this); - - persistLocalStorage.call(this); - - // Watch for modifications to update localStorage - this.watch("added", persistLocalStorage, this); - this.watch("updated", persistLocalStorage, this); - this.watch("deleted", persistLocalStorage, this); - return true; - } else { - return false; - } - }; -} - -module.exports = function LocalStoreFactory(init) { - LocalStoreConstructor.prototype = new Store(init); - return new LocalStoreConstructor(); -}; - -},{"observable-store":26,"simple-loop":22}],22:[function(require,module,exports){ -/** -* @license simple-loop https://github.com/flams/simple-loop -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -/** - * Small abstraction for looping over objects and arrays - * Warning: it's not meant to be used with nodeList - * To use with nodeList, convert to array first - * @param {Array/Object} iterated the array or object to loop through - * @param {Function} callback the function to execute for each iteration - * @param {Object} scope the scope in which to execute the callback - */ -module.exports = function loop(iterated, callback, scope) { - assert(typeof iterated == "object", "simple-loop: iterated must be an array/object"); - assert(typeof callback == "function", "simple-loop: callback must be a function"); - - if (Array.isArray(iterated)) { - iterated.forEach(callback, scope); - } else { - for (var i in iterated) { - if (iterated.hasOwnProperty(i)) { - callback.call(scope, iterated[i], i, iterated); - } - } - } -}; - -},{"assert":9}],23:[function(require,module,exports){ -'use strict'; - -var proto = Element.prototype; -var vendor = proto.matches - || proto.matchesSelector - || proto.webkitMatchesSelector - || proto.mozMatchesSelector - || proto.msMatchesSelector - || proto.oMatchesSelector; - -module.exports = match; - -/** - * Match `el` to `selector`. - * - * @param {Element} el - * @param {String} selector - * @return {Boolean} - * @api public - */ - -function match(el, selector) { - if (vendor) return vendor.call(el, selector); - var nodes = el.parentNode.querySelectorAll(selector); - for (var i = 0; i < nodes.length; i++) { - if (nodes[i] == el) return true; - } - return false; -} -},{}],24:[function(require,module,exports){ -/** -* @license nested-property https://github.com/cosmosio/nested-property -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2015 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -module.exports = { - set: setNestedProperty, - get: getNestedProperty, - has: hasNestedProperty, - hasOwn: function (object, property, options) { - return this.has(object, property, options || {own: true}); - }, - isIn: isInNestedProperty -}; - -/** - * Get the property of an object nested in one or more objects - * given an object such as a.b.c.d = 5, getNestedProperty(a, "b.c.d") will return 5. - * @param {Object} object the object to get the property from - * @param {String} property the path to the property as a string - * @returns the object or the the property value if found - */ -function getNestedProperty(object, property) { - if (object && typeof object == "object") { - if (typeof property == "string" && property !== "") { - var split = property.split("."); - return split.reduce(function (obj, prop) { - return obj && obj[prop]; - }, object); - } else if (typeof property == "number") { - return object[property]; - } else { - return object; - } - } else { - return object; - } -} - -/** - * Tell if a nested object has a given property (or array a given index) - * given an object such as a.b.c.d = 5, hasNestedProperty(a, "b.c.d") will return true. - * It also returns true if the property is in the prototype chain. - * @param {Object} object the object to get the property from - * @param {String} property the path to the property as a string - * @param {Object} options: - * - own: set to reject properties from the prototype - * @returns true if has (property in object), false otherwise - */ -function hasNestedProperty(object, property, options) { - options = options || {}; - - if (object && typeof object == "object") { - if (typeof property == "string" && property !== "") { - var split = property.split("."); - return split.reduce(function (obj, prop, idx, array) { - if (idx == array.length - 1) { - if (options.own) { - return !!(obj && obj.hasOwnProperty(prop)); - } else { - return !!(obj !== null && typeof obj == "object" && prop in obj); - } - } - return obj && obj[prop]; - }, object); - } else if (typeof property == "number") { - return property in object; - } else { - return false; - } - } else { - return false; - } -} - -/** - * Set the property of an object nested in one or more objects - * If the property doesn't exist, it gets created. - * @param {Object} object - * @param {String} property - * @param value the value to set - * @returns object if no assignment was made or the value if the assignment was made - */ -function setNestedProperty(object, property, value) { - if (object && typeof object == "object") { - if (typeof property == "string" && property !== "") { - var split = property.split("."); - return split.reduce(function (obj, prop, idx) { - obj[prop] = obj[prop] || {}; - if (split.length == (idx + 1)) { - obj[prop] = value; - } - return obj[prop]; - }, object); - } else if (typeof property == "number") { - object[property] = value; - return object[property]; - } else { - return object; - } - } else { - return object; - } -} - -/** - * Tell if an object is on the path to a nested property - * If the object is on the path, and the path exists, it returns true, and false otherwise. - * @param {Object} object to get the nested property from - * @param {String} property name of the nested property - * @param {Object} objectInPath the object to check - * @param {Object} options: - * - validPath: return false if the path is invalid, even if the object is in the path - * @returns {boolean} true if the object is on the path - */ -function isInNestedProperty(object, property, objectInPath, options) { - options = options || {}; - - if (object && typeof object == "object") { - if (typeof property == "string" && property !== "") { - var split = property.split("."), - isIn = false, - pathExists; - - pathExists = !!split.reduce(function (obj, prop) { - isIn = isIn || obj === objectInPath || (!!obj && obj[prop] === objectInPath); - return obj && obj[prop]; - }, object); - - if (options.validPath) { - return isIn && pathExists; - } else { - return isIn; - } - } else { - return false; - } - } else { - return false; - } -} - -},{"assert":9}],25:[function(require,module,exports){ -/** -* @license object-count https://github.com/cosmosio/object-count -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -/** - * Count the number of properties in an object or the number or items - * in an array. - * It doesn't look up in the prototype chain - * @param {Object} object the object to get the number of items/properties from - * @returns {Number} - */ -module.exports = function count(object) { - assert(typeof object == "object", "object must be an array or an object"); - - if (Array.isArray(object)) { - return object.length; - } else { - return count(Object.keys(object)); - } -}; - -},{"assert":9}],26:[function(require,module,exports){ -/** -* @license observable-store https://github.com/flams/observable-store -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var Observable = require("watch-notify"), - diff = require("shallow-diff"), - clone = require("shallow-copy"), - compareNumbers = require("compare-numbers"), - count = require("object-count"), - nestedProperty = require("nested-property"), - simpleLoop = require("simple-loop"); - -/** - * @class - * Store creates an observable structure based on a key/values object - * or on an array - * @param {Array/Object} the data to initialize the store with - * @returns - */ -module.exports = function StoreConstructor($data) { - - /** - * Where the data is stored - * @private - */ - var _data = clone($data) || {}, - - /** - * The observable for publishing changes on the store iself - * @private - */ - _storeObservable = new Observable(), - - /** - * The observable for publishing changes on a value - * @private - */ - _valueObservable = new Observable(), - - /** - * Saves the handles for the subscriptions of the computed properties - * @private - */ - _computed = [], - - /** - * Gets the difference between two objects and notifies them - * @private - * @param {Object} previousData - */ - _notifyDiffs = function _notifyDiffs(previousData) { - var diffs = diff(previousData, _data); - ["updated", - "deleted", - "added"].forEach(function (value) { - diffs[value].forEach(function (dataIndex) { - _storeObservable.notify(value, dataIndex, _data[dataIndex], previousData[dataIndex]); - _valueObservable.notify(dataIndex, _data[dataIndex], value, previousData[dataIndex]); - }); - }); - }; - - /** - * Get the number of items in the store - * @returns {Number} the number of items in the store - */ - this.count = function() { - return count(_data); - }; - - /** - * Get a value from its index - * @param {String} name the name of the index - * @returns the value - */ - this.get = function get(name) { - return _data[name]; - }; - - /** - * Checks if the store has a given value - * @param {String} name the name of the index - * @returns {Boolean} true if the value exists - */ - this.has = function has(name) { - return _data.hasOwnProperty(name); - }; - - /** - * Set a new value and overrides an existing one - * @param {String} name the name of the index - * @param value the value to assign - * @returns true if value is set - */ - this.set = function set(name, value) { - var hasPrevious, - previousValue, - action; - - if (typeof name != "undefined") { - hasPrevious = this.has(name); - previousValue = this.get(name); - _data[name] = value; - action = hasPrevious ? "updated" : "added"; - _storeObservable.notify(action, name, _data[name], previousValue); - _valueObservable.notify(name, _data[name], action, previousValue); - return true; - } else { - return false; - } - }; - - /** - * Update the property of an item. - * @param {String} name the name of the index - * @param {String} property the property to modify. - * @param value the value to assign - * @returns false if the Store has no name index - */ - this.update = function update(name, property, value) { - var item; - if (this.has(name)) { - item = this.get(name); - nestedProperty.set(item, property, value); - _storeObservable.notify("updated", property, value); - _valueObservable.notify(name, item, "updated"); - return true; - } else { - return false; - } - }; - - /** - * Delete value from its index - * @param {String} name the name of the index from which to delete the value - * @returns true if successfully deleted. - */ - this.del = function del(name) { - var previous; - if (this.has(name)) { - if (!this.alter("splice", name, 1)) { - previous = _data[name]; - delete _data[name]; - _storeObservable.notify("deleted", name, undefined, previous); - _valueObservable.notify(name, _data[name], "deleted", previous); - } - return true; - } else { - return false; - } - }; - - /** - * Delete multiple indexes. Prefer this one over multiple del calls. - * @param {Array} - * @returns false if param is not an array. - */ - this.delAll = function delAll(indexes) { - if (Array.isArray(indexes)) { - // Indexes must be removed from the greatest to the lowest - // To avoid trying to remove indexes that don't exist. - // i.e: given [0, 1, 2], remove 1, then 2, 2 doesn't exist anymore - indexes.sort(compareNumbers.desc) - .forEach(this.del, this); - return true; - } else { - return false; - } - }; - - /** - * Alter the data by calling one of it's method - * When the modifications are done, it notifies on changes. - * If the function called doesn't alter the data, consider using proxy instead - * which is much, much faster. - * @param {String} func the name of the method - * @params {*} any number of params to be given to the func - * @returns the result of the method call - */ - this.alter = function alter(func) { - var apply, - previousData; - - if (_data[func]) { - previousData = clone(_data); - apply = this.proxy.apply(this, arguments); - _notifyDiffs(previousData); - _storeObservable.notify("altered", _data, previousData); - return apply; - } else { - return false; - } - }; - - /** - * Proxy is similar to alter but doesn't trigger events. - * It's preferable to call proxy for functions that don't - * update the interal data source, like slice or filter. - * @param {String} func the name of the method - * @params {*} any number of params to be given to the func - * @returns the result of the method call - */ - this.proxy = function proxy(func) { - if (_data[func]) { - return _data[func].apply(_data, Array.prototype.slice.call(arguments, 1)); - } else { - return false; - } - }; - - /** - * Watch the store's modifications - * @param {String} added/updated/deleted - * @param {Function} func the function to execute - * @param {Object} scope the scope in which to execute the function - * @returns {Handle} the subscribe's handler to use to stop watching - */ - this.watch = function watch(name, func, scope) { - return _storeObservable.watch(name, func, scope); - }; - - /** - * Unwatch the store modifications - * @param {Handle} handle the handler returned by the watch function - * @returns - */ - this.unwatch = function unwatch(handle) { - return _storeObservable.unwatch(handle); - }; - - /** - * Get the observable used for watching store's modifications - * Should be used only for debugging - * @returns {Observable} the Observable - */ - this.getStoreObservable = function getStoreObservable() { - return _storeObservable; - }; - - /** - * Watch a value's modifications - * @param {String} name the name of the value to watch for - * @param {Function} func the function to execute - * @param {Object} scope the scope in which to execute the function - * @returns handler to pass to unwatchValue - */ - this.watchValue = function watchValue(name, func, scope) { - return _valueObservable.watch(name, func, scope); - }; - - /** - * Unwatch the value's modifications - * @param {Handler} handler the handler returned by the watchValue function - * @private - * @returns true if unwatched - */ - this.unwatchValue = function unwatchValue(handler) { - return _valueObservable.unwatch(handler); - }; - - /** - * Get the observable used for watching value's modifications - * Should be used only for debugging - * @private - * @returns {Observable} the Observable - */ - this.getValueObservable = function getValueObservable() { - return _valueObservable; - }; - - /** - * Loop through the data - * @param {Function} func the function to execute on each data - * @param {Object} scope the scope in wich to run the callback - */ - this.loop = function loop(func, scope) { - simpleLoop(_data, func, scope); - }; - - /** - * Reset all data and get notifications on changes - * @param {Arra/Object} data the new data - * @returns {Boolean} - */ - this.reset = function reset(data) { - if (typeof data == "object") { - var previousData = clone(_data); - _data = clone(data) || {}; - _notifyDiffs(previousData); - _storeObservable.notify("resetted", _data, previousData); - return true; - } else { - return false; - } - - }; - - /** - * Compute a new property from other properties. - * The computed property will look exactly similar to any none - * computed property, it can be watched upon. - * @param {String} name the name of the computed property - * @param {Array} computeFrom a list of properties to compute from - * @param {Function} callback the callback to compute the property - * @param {Object} scope the scope in which to execute the callback - * @returns {Boolean} false if wrong params given to the function - */ - this.compute = function compute(name, computeFrom, callback, scope) { - var args = []; - - if (typeof name == "string" && - typeof computeFrom == "object" && - typeof callback == "function" && - !this.isCompute(name)) { - - _computed[name] = []; - - simpleLoop(computeFrom, function (property) { - _computed[name].push(this.watchValue(property, function () { - this.set(name, callback.call(scope)); - }, this)); - }, this); - - this.set(name, callback.call(scope)); - return true; - } else { - return false; - } - }; - - /** - * Remove a computed property - * @param {String} name the name of the computed to remove - * @returns {Boolean} true if the property is removed - */ - this.removeCompute = function removeCompute(name) { - if (this.isCompute(name)) { - simpleLoop(_computed[name], function (handle) { - this.unwatchValue(handle); - }, this); - this.del(name); - - delete _computed[name]; - return true; - } else { - return false; - } - }; - - /** - * Tells if a property is a computed property - * @param {String} name the name of the property to test - * @returns {Boolean} true if it's a computed property - */ - this.isCompute = function isCompute(name) { - return !!_computed[name]; - }; - - /** - * Returns a JSON version of the data - * Use dump if you want all the data as a plain js object - * @returns {String} the JSON - */ - this.toJSON = function toJSON() { - return JSON.stringify(_data); - }; - - /** - * Returns the store's data - * @returns {Object} the data - */ - this.dump = function dump() { - return _data; - }; -}; - -},{"compare-numbers":10,"nested-property":24,"object-count":25,"shallow-copy":41,"shallow-diff":27,"simple-loop":29,"watch-notify":58}],27:[function(require,module,exports){ -/** -* @license shallow-diff https://github.com/cosmosio/shallow-diff -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"), - loop = require("simple-loop"); - -/** - * Make a diff between two objects - * @param {Array/Object} base the base object - * @param {Array/Object} compared the object to compare the base with - * @example: - * With objects: - * - * base = {a:1, b:2, c:3, d:4, f:6} - * compared = {a:1, b:20, d: 4, e: 5} - * will return : - * { - * unchanged: ["a", "d"], - * updated: ["b"], - * deleted: ["f"], - * added: ["e"] - * } - * - * It also works with Arrays: - * - * base = [10, 20, 30] - * compared = [15, 20] - * will return : - * { - * unchanged: [1], - * updated: [0], - * deleted: [2], - * added: [] - * } - * - * @returns object - */ -module.exports = function shallowDiff(base, compared) { - assert(typeof base == "object", "the first object to compare with shallowDiff needs to be an object"); - assert(typeof compared == "object", "the second object to compare with shallowDiff needs to be an object"); - - var unchanged = [], - updated = [], - deleted = [], - added = []; - - // Loop through the compared object - loop(compared, function (value, idx) { - - // To get the added - if (typeof base[idx] == "undefined") { - added.push(idx); - - // The updated - } else if (value !== base[idx]) { - updated.push(idx); - - // And the unchanged - } else if (value === base[idx]) { - unchanged.push(idx); - } - - }); - - // Loop through the before object - loop(base, function (value, idx) { - - // To get the deleted - if (typeof compared[idx] == "undefined") { - deleted.push(idx); - } - }); - - return { - updated: updated, - unchanged: unchanged, - added: added, - deleted: deleted - }; -}; - -},{"assert":9,"simple-loop":28}],28:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],29:[function(require,module,exports){ -/** -* @license simple-loop https://github.com/flams/simple-loop -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -/** - * Small abstraction for looping over objects and arrays - * Warning: it's not meant to be used with nodeList - * To use with nodeList, convert to array first - * @param {Array/Object} iterated the array or object to loop through - * @param {Function} callback the function to execute for each iteration - * @param {Object} scope the scope in which to execute the callback - */ -module.exports = function loop(iterated, callback, scope) { - assert(typeof iterated == "object", "simple-loop: iterated must be an array/object"); - assert(typeof callback == "function", "simple-loop: callback must be a function"); - - if (Array.isArray(iterated)) { - for (var i=0; i -*/ -"use strict"; - -var Observable = require("watch-notify"), - toArray = require("to-array"); - -/** - * @class - * Routing allows for navigating in an application by defining routes. - */ -module.exports = function RouterConstructor() { - - /** - * The routes observable (the applications use it) - * @private - */ - var _routes = new Observable(), - - /** - * The events observable (used by Routing) - * @private - */ - _events = new Observable(), - - /** - * The routing history - * @private - */ - _history = [], - - /** - * For navigating through the history, remembers the current position - * @private - */ - _currentPos = -1, - - /** - * The depth of the history - * @private - */ - _maxHistory = 10; - - /** - * Only for debugging - * @private - */ - this.getRoutesObservable = function getRoutesObservable() { - return _routes; - }; - - /** - * Only for debugging - * @private - */ - this.getEventsObservable = function getEventsObservable() { - return _events; - }; - - /** - * Set the maximum length of history - * As the user navigates through the application, the - * routeur keeps track of the history. Set the depth of the history - * depending on your need and the amount of memory that you can allocate it - * @param {Number} maxHistory the depth of history - * @returns {Boolean} true if maxHistory is equal or greater than 0 - */ - this.setMaxHistory = function setMaxHistory(maxHistory) { - if (maxHistory >= 0) { - _maxHistory = maxHistory; - return true; - } else { - return false; - } - - }; - - /** - * Get the current max history setting - * @returns {Number} the depth of history - */ - this.getMaxHistory = function getMaxHistory() { - return _maxHistory; - }; - - /** - * Set a new route - * @param {String} route the name of the route - * @param {Function} func the function to be execute when navigating to the route - * @param {Object} scope the scope in which to execute the function - * @returns a handle to remove the route - */ - this.set = function set() { - return _routes.watch.apply(_routes, arguments); - }; - - /** - * Remove a route - * @param {Object} handle the handle provided by the set method - * @returns true if successfully removed - */ - this.unset = function unset(handle) { - return _routes.unwatch(handle); - }; - - /** - * Navigate to a route - * @param {String} route the route to navigate to - * @param {*} *params - * @returns - */ - this.navigate = function get(route) { - if (this.load.apply(this, arguments)) { - // Before adding a new route to the history, we must clear the forward history - _history.splice(_currentPos +1, _history.length); - _history.push(toArray(arguments)); - this.ensureMaxHistory(_history); - _currentPos = _history.length -1; - return true; - } else { - return false; - } - - }; - - /** - * Ensure that history doesn't grow bigger than the max history setting - * @param {Store} history the history store - * @private - */ - this.ensureMaxHistory = function ensureMaxHistory(history) { - var count = history.length, - max = this.getMaxHistory(), - excess = count - max; - - if (excess > 0) { - history.splice(0, excess); - } - }; - - /** - * Actually loads the route - * @private - */ - this.load = function load() { - var copy = toArray(arguments); - - if (_routes.notify.apply(_routes, copy)) { - copy.unshift("route"); - _events.notify.apply(_events, copy); - return true; - } else { - return false; - } - }; - - /** - * Watch for route changes - * @param {Function} func the func to execute when the route changes - * @param {Object} scope the scope in which to execute the function - * @returns {Object} the handle to unwatch for route changes - */ - this.watch = function watch(func, scope) { - return _events.watch("route", func, scope); - }; - - /** - * Unwatch routes changes - * @param {Object} handle the handle was returned by the watch function - * @returns true if unwatch - */ - this.unwatch = function unwatch(handle) { - return _events.unwatch(handle); - }; - - /** - * Get the history store, for debugging only - * @private - */ - this.getHistoryStore = function getHistoryStore() { - return _history; - }; - - /** - * Get the current length of history - * @returns {Number} the length of history - */ - this.getHistoryCount = function getHistoryCount() { - return _history.length; - }; - - /** - * Flush the entire history - */ - this.clearHistory = function clearHistory() { - _history.length = 0; - }; - - /** - * Go back and forth in the history - * @param {Number} nb the amount of history to rewind/forward - * @returns true if history exists - */ - this.go = function go(nb) { - var history = _history[_currentPos + nb]; - if (history) { - _currentPos += nb; - this.load.apply(this, history); - return true; - } else { - return false; - } - }; - - /** - * Go back in the history, short for go(-1) - * @returns - */ - this.back = function back() { - return this.go(-1); - }; - - /** - * Go forward in the history, short for go(1) - * @returns - */ - this.forward = function forward() { - return this.go(1); - }; - -}; - -},{"to-array":51,"watch-notify":33}],31:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],32:[function(require,module,exports){ -/** -* @license url-highway https://github.com/cosmosio/url-highway -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var Highway = require("highway"), - toArray = require("to-array"); - -/** - * @class - * UrlHighway is a router which navigates to the route defined in the URL and updates this URL - * while navigating. It's a subtype of Highway - */ -function UrlHighway() { - - /** - * The handle on the watch - * @private - */ - var _watchHandle, - - /** - * The default route to navigate to when nothing is supplied in the url - * @private - */ - _defaultRoute = "", - - /** - * The last route that was navigated to - * @private - */ - _lastRoute = window.location.hash; - - /** - * Navigates to the current hash or to the default route if none is supplied in the url - * @private - */ - /*jshint validthis:true*/ - function doNavigate() { - if (!hashIsEmpty()) { - var parsedHash = this.parse(window.location.hash); - this.navigate.apply(this, parsedHash); - } else { - this.navigate(_defaultRoute); - } - } - - /** - * An empty string or # are both empty hashes - */ - function hashIsEmpty() { - return !window.location.hash || window.location.hash == "#"; - } - - /** - * Set the default route to navigate to when nothing is defined in the url - * @param {String} defaultRoute the defaultRoute to navigate to - * @returns {Boolean} true if it's not an empty string - */ - this.setDefaultRoute = function setDefaultRoute(defaultRoute) { - if (defaultRoute && typeof defaultRoute == "string") { - _defaultRoute = defaultRoute; - return true; - } else { - return false; - } - }; - - /** - * Get the currently set default route - * @returns {String} the default route - */ - this.getDefaultRoute = function getDefaultRoute() { - return _defaultRoute; - }; - - /** - * The function that parses the url to determine the route to navigate to. - * It has a default behavior explained below, but can be overriden as long as - * it has the same contract. - * @param {String} hash the hash coming from window.location.has - * @returns {Array} has to return an array with the list of arguments to call - * navigate with. The first item of the array must be the name of the route. - * - * Example: #album/holiday/2013 - * will navigate to the route "album" and give two arguments "holiday" and "2013" - */ - this.parse = function parse(hash) { - return hash.split("#").pop().split("/"); - }; - - /** - * The function that converts, or serialises the route and its arguments to a valid URL. - * It has a default behavior below, but can be overriden as long as it has the same contract. - * @param {Array} args the list of arguments to serialize - * @returns {String} the serialized arguments to add to the url hashmark - * - * Example: - * ["album", "holiday", "2013"]; - * will give "album/holiday/2013" - * - */ - this.toUrl = function toUrl(args) { - return args.join("/"); - }; - - /** - * When all the routes and handlers have been defined, start the location router - * so it parses the URL and navigates to the corresponding route. - * It will also start listening to route changes and hashmark changes to navigate. - * While navigating, the hashmark itself will also change to reflect the current route state - */ - this.start = function start(defaultRoute) { - this.setDefaultRoute(defaultRoute); - doNavigate.call(this); - this.bindOnHashChange(); - this.bindOnRouteChange(); - }; - - /** - * Remove the events handler for cleaning. - */ - this.destroy = function destroy() { - this.unwatch(_watchHandle); - window.removeEventListener("hashchange", this.boundOnHashChange, true); - }; - - /** - * Parse the hash and navigate to the corresponding url - * @private - */ - this.onHashChange = function onHashChange() { - if (window.location.hash != _lastRoute) { - doNavigate.call(this); - } - }; - - /** - * The bound version of onHashChange for add/removeEventListener - * @private - */ - this.boundOnHashChange = this.onHashChange.bind(this); - - /** - * Add an event listener to hashchange to navigate to the corresponding route - * when it changes - * @private - */ - this.bindOnHashChange = function bindOnHashChange() { - window.addEventListener("hashchange", this.boundOnHashChange, true); - }; - - /** - * Watch route change events from the router to update the location - * @private - */ - this.bindOnRouteChange = function bindOnRouteChange() { - _watchHandle = this.watch(this.onRouteChange, this); - }; - - /** - * The handler for when the route changes - * It updates the location - * @private - */ - this.onRouteChange = function onRouteChange() { - window.location.hash = this.toUrl(toArray(arguments)); - _lastRoute = window.location.hash; - }; - - this.getLastRoute = function getLastRoute() { - return _lastRoute; - }; - -} - -module.exports = function UrlHighwayFactory() { - UrlHighway.prototype = new Highway(); - UrlHighway.constructor = Highway; - return new UrlHighway(); -}; - -},{"highway":30,"to-array":51}],33:[function(require,module,exports){ -/** -* @license watch-notify https://github.com/flams/watch-notify -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -var loop = require("simple-loop"), - toArray = require("to-array"); - -/** -* @class -* Observable is an implementation of the Observer design pattern, -* which is also known as publish/subscribe. -* -* This service creates an Observable to which you can add subscribers. -* -* @returns {Observable} -*/ -module.exports = function WatchNotifyConstructor() { - - /** - * The list of topics - * @private - */ - var _topics = {}; - - /** - * Add an observer - * @param {String} topic the topic to observe - * @param {Function} callback the callback to execute - * @param {Object} scope the scope in which to execute the callback - * @returns handle - */ - this.watch = function watch(topic, callback, scope) { - if (typeof callback == "function") { - var observers = _topics[topic] = _topics[topic] || [], - observer = [callback, scope]; - - observers.push(observer); - return [topic,observers.indexOf(observer)]; - - } else { - return false; - } - }; - - /** - * Listen to an event just once before removing the handler - * @param {String} topic the topic to observe - * @param {Function} callback the callback to execute - * @param {Object} scope the scope in which to execute the callback - * @returns handle - */ - this.once = function once(topic, callback, scope) { - var handle = this.watch(topic, function () { - callback.apply(scope, arguments); - this.unwatch(handle); - }, this); - return handle; - }; - - /** - * Remove an observer - * @param {Handle} handle returned by the watch method - * @returns {Boolean} true if there were subscribers - */ - this.unwatch = function unwatch(handle) { - var topic = handle[0], idx = handle[1]; - if (_topics[topic] && _topics[topic][idx]) { - // delete value so the indexes don't move - delete _topics[topic][idx]; - // If the topic is only set with falsy values, delete it; - if (!_topics[topic].some(function (value) { - return !!value; - })) { - delete _topics[topic]; - } - return true; - } else { - return false; - } - }; - - /** - * Notifies observers that a topic has a new message - * @param {String} topic the name of the topic to publish to - * @param subject - * @returns {Boolean} true if there was subscribers - */ - this.notify = function notify(topic) { - var observers = _topics[topic], - args = toArray(arguments).slice(1); - - if (observers) { - loop(observers, function (value) { - try { - if (value) { - value[0].apply(value[1] || null, args); - } - } catch (err) { } - }); - return true; - } else { - return false; - } - }; - - /** - * Check if topic has the described observer - * @param {Handle} - * @returns {Boolean} true if exists - */ - this.hasObserver = function hasObserver(handle) { - return !!( handle && _topics[handle[0]] && _topics[handle[0]][handle[1]]); - }; - - /** - * Check if a topic has observers - * @param {String} topic the name of the topic - * @returns {Boolean} true if topic is listened - */ - this.hasTopic = function hasTopic(topic) { - return !!_topics[topic]; - }; - - /** - * Unwatch all or unwatch all from topic - * @param {String} topic optional unwatch all from topic - * @returns {Boolean} true if ok - */ - this.unwatchAll = function unwatchAll(topic) { - if (_topics[topic]) { - delete _topics[topic]; - } else { - _topics = {}; - } - return true; - }; -}; - -},{"assert":9,"simple-loop":31,"to-array":51}],34:[function(require,module,exports){ -/** - * Olives http://flams.github.com/olives - * The MIT License (MIT) - * Copyright (c) 2012-2015 Olivier Scherrer - Olivier Wietrich - */ - "use strict"; - -module.exports = { - "Bind.plugin": require("data-binding-plugin"), - "LocalStore": require("local-observable-store"), - "LocationRouter": require("url-highway"), - "OObject": require("seam-view"), - "Event.plugin": require("event-plugin"), - "Place.plugin": require("place-plugin"), - "Plugins": require("seam"), - "SocketIOTransport": require("socketio-transport"), - "Stack": require("dom-stack") -}; - -},{"data-binding-plugin":11,"dom-stack":12,"event-plugin":15,"local-observable-store":21,"place-plugin":35,"seam":39,"seam-view":38,"socketio-transport":47,"url-highway":32}],35:[function(require,module,exports){ -/** -* @license place-plugin https://github.com/flams/place-plugin -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var simpleLoop = require("simple-loop"); - -/** -* @class -* Place plugin places SeamViews in the DOM. -*/ -function isSeamView(ui) { - return typeof ui == "object" && - typeof ui.place == "function"; -} - -/** - * Intilialize a Place.plugin with a list of SeamViews - * @param {Object} $uis a list of SeamViews such as: - * { - * "header": new SeamView(), - * "list": new SeamView() - * } - * @Constructor - */ -module.exports = function PlacePluginConstructor($uis) { - - /** - * The list of uis currently set in this place plugin - * @private - */ - var _uis = {}; - - /** - * Attach a SeamView to this DOM element - * @param {HTML|SVGElement} node the dom node where to attach the SeamView - * @param {String} the name of the SeamView to attach - * @throws {NoSuchSeamView} an error if there's no SeamView for the given name - */ - this.place = function place(node, name) { - if (_uis[name]) { - _uis[name].place(node); - } else { - throw new Error(name + " is not a SeamView UI in place: " + name); - } - }; - - /** - * Add an SeamView that can be attached to a dom element - * @param {String} the name of the SeamView to add to the list - * @param {SeamView} ui the SeamView to add the list - * @returns {Boolean} true if the SeamView was added - */ - this.set = function set(name, ui) { - if (typeof name == "string" && isSeamView(ui)) { - _uis[name] = ui; - return true; - } else { - return false; - } - }; - - /** - * Add multiple dom elements at once - * @param {Object} $uis a list of SeamViews such as: - * { - * "header": new SeamView(), - * "list": new SeamView() - * } - */ - this.setAll = function setAll(uis) { - simpleLoop(uis, function (ui, name) { - this.set(name, ui); - }, this); - }; - - /** - * Returns a SeamView from the list given its name - * @param {String} the name of the SeamView to get - * @returns {SeamView} SeamView for the given name - */ - this.get = function get(name) { - return _uis[name]; - }; - - if ($uis) { - this.setAll($uis); - } - -}; - -},{"simple-loop":36}],36:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],37:[function(require,module,exports){ -// shim for using process in browser - -var process = module.exports = {}; -var queue = []; -var draining = false; - -function drainQueue() { - if (draining) { - return; - } - draining = true; - var currentQueue; - var len = queue.length; - while(len) { - currentQueue = queue; - queue = []; - var i = -1; - while (++i < len) { - currentQueue[i](); - } - len = queue.length; - } - draining = false; -} -process.nextTick = function (fun) { - queue.push(fun); - if (!draining) { - setTimeout(drainQueue, 0); - } -}; - -process.title = 'browser'; -process.browser = true; -process.env = {}; -process.argv = []; -process.version = ''; // empty string to avoid regexp issues -process.versions = {}; - -function noop() {} - -process.on = noop; -process.addListener = noop; -process.once = noop; -process.off = noop; -process.removeListener = noop; -process.removeAllListeners = noop; -process.emit = noop; - -process.binding = function (name) { - throw new Error('process.binding is not supported'); -}; - -// TODO(shtylman) -process.cwd = function () { return '/' }; -process.chdir = function (dir) { - throw new Error('process.chdir is not supported'); -}; -process.umask = function() { return 0; }; - -},{}],38:[function(require,module,exports){ -/** -* @license seam-view https://github.com/flams/seam-view -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var StateMachine = require("synchronous-fsm"), - Seam = require("seam"), - toArray = require("to-array"); - -function isAcceptedType(dom) { - return dom.nodeType >= 1; -} - -/** -* @class -* OObject is a container for dom elements. It will also bind -* the dom to additional plugins like Data binding -* @requires StateMachine -*/ -module.exports = function SeamViewConstructor() { - - /** - * This function creates the dom of the UI from its template - * It then queries the dom for data- attributes - * It can't be executed if the template is not set - * @private - */ - function render(UI) { - - // The place where the template will be created - // is either the currentPlace where the node is placed - // or a temporary div - var baseNode = _currentPlace || document.createElement("div"); - - // If the template is set - if (UI.template) { - // In this function, the thisObject is the UI's prototype - // UI is the UI that has OObject as prototype - if (typeof UI.template == "string") { - // Let the browser do the parsing, can't be faster & easier. - baseNode.innerHTML = UI.template.trim(); - } else if (isAcceptedType(UI.template)) { - // If it's already an HTML element - baseNode.appendChild(UI.template); - } - - // The UI must be placed in a unique dom node - // If not, there can't be multiple UIs placed in the same parentNode - // as it wouldn't be possible to know which node would belong to which UI - // This is probably a DOM limitation. - if (baseNode.childNodes.length > 1) { - throw new Error("UI.template should have only one parent node"); - } else { - UI.dom = baseNode.childNodes[0]; - } - - UI.seam.apply(UI.dom); - - } else { - // An explicit message I hope - throw new Error("UI.template must be set prior to render"); - } - } - - /** - * This function appends the dom tree to the given dom node. - * This dom node should be somewhere in the dom of the application - * @private - */ - function place(UI, DOMplace, beforeNode) { - if (DOMplace) { - // IE (until 9) apparently fails to appendChild when insertBefore's second argument is null, hence this. - if (beforeNode) { - DOMplace.insertBefore(UI.dom, beforeNode); - } else { - DOMplace.appendChild(UI.dom); - } - // Also save the new place, so next renderings - // will be made inside it - _currentPlace = DOMplace; - } - } - - /** - * Does rendering & placing in one function - * @private - */ - function renderNPlace(UI, dom) { - render(UI); - place.apply(null, toArray(arguments)); - } - - /** - * This stores the current place - * If this is set, this is the place where new templates - * will be appended - * @private - */ - var _currentPlace = null, - - /** - * The UI's stateMachine. - * Much better than if(stuff) do(stuff) else if (!stuff and stuff but not stouff) do (otherstuff) - * Please open an issue if you want to propose a better one - * @private - */ - _stateMachine = new StateMachine("Init", { - "Init": [["render", render, this, "Rendered"], - ["place", renderNPlace, this, "Rendered"]], - "Rendered": [["place", place, this], - ["render", render, this]] - }); - - /** - * The module that will manage the plugins for this UI - * @see Olives/Plugins' doc for more info on how it works. - */ - this.seam = new Seam(); - - /** - * Describes the template, can either be like "<p></p>" or HTMLElements - * @type string or HTMLElement|SVGElement - */ - this.template = null; - - /** - * This will hold the dom nodes built from the template. - */ - this.dom = null; - - /** - * Place the UI in a given dom node - * @param node the node on which to append the UI - * @param beforeNode the dom before which to append the UI - */ - this.place = function place(node, beforeNode) { - _stateMachine.event("place", this, node, beforeNode); - }; - - /** - * Renders the template to dom nodes and applies the plugins on it - * It requires the template to be set first - */ - this.render = function render() { - _stateMachine.event("render", this); - }; - - /** - * Set the UI's template from a DOM element - * @param {HTMLElement|SVGElement} dom the dom element that'll become the template of the UI - * @returns true if dom is an HTMLElement|SVGElement - */ - this.setTemplateFromDom = function setTemplateFromDom(dom) { - if (isAcceptedType(dom)) { - this.template = dom; - return true; - } else { - return false; - } - }; - - /** - * Transforms dom nodes into a UI. - * It basically does a setTemplateFromDOM, then a place - * It's a helper function - * @param {HTMLElement|SVGElement} node the dom to transform to a UI - * @returns true if dom is an HTMLElement|SVGElement - */ - this.alive = function alive(dom) { - if (isAcceptedType(dom)) { - this.setTemplateFromDom(dom); - this.place(dom.parentNode, dom.nextElementSibling); - return true; - } else { - return false; - } - - }; - - /** - * Get the current dom node where the UI is placed. - * for debugging purpose - * @private - * @return {HTMLElement} node the dom where the UI is placed. - */ - this.getCurrentPlace = function(){ - return _currentPlace; - }; - -}; - -},{"seam":39,"synchronous-fsm":49,"to-array":51}],39:[function(require,module,exports){ -/** -* @license seam https://github.com/flams/seam -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var toArray = require("to-array"), - simpleLoop = require("simple-loop"), - getNodes = require("get-nodes"), - getDataset = require("get-dataset"); - -/** - * Seam makes it easy to attach JS behavior to your HTML/SVG via the data- attribute. - *
            - * - * JS behaviors are defined in plugins, which are plain JS objects with data and methods. - */ -module.exports = function Seam($plugins) { - - /** - * The list of plugins - * @private - */ - var _plugins = {}, - - /** - * Just a "functionalification" of trim - * for code readability - * @private - */ - trim = function trim(string) { - return string.trim(); - }, - - /** - * Call the plugins methods, passing them the dom node - * A phrase can be : - * - * the function has to call every method of the plugin - * passing it the node, and the given params - * @private - */ - applyPlugin = function applyPlugin(node, phrase, plugin) { - // Split the methods - phrase.split(";") - .forEach(function (couple) { - // Split the result between method and params - var split = couple.split(":"), - // Trim the name - method = split[0].trim(), - // And the params, if any - params = split[1] ? split[1].split(",").map(trim) : []; - - // The first param must be the dom node - params.unshift(node); - - if (_plugins[plugin] && _plugins[plugin][method]) { - // Call the method with the following params for instance : - // [node, "param1", "param2" .. ] - _plugins[plugin][method].apply(_plugins[plugin], params); - } - - }); - }; - - /** - * Add a plugin - * - * Note that once added, the function adds a "plugins" property to the plugin. - * It's an object that holds a name property, with the registered name of the plugin - * and an apply function, to use on new nodes that the plugin would generate - * - * @param {String} name the name of the data that the plugin should look for - * @param {Object} plugin the plugin that has the functions to execute - * @returns true if plugin successfully added. - */ - this.add = function add(name, plugin) { - var propertyName = "plugins"; - - if (typeof name == "string" && typeof plugin == "object" && plugin) { - _plugins[name] = plugin; - - plugin[propertyName] = { - name: name, - apply: function apply() { - return this.apply.apply(this, arguments); - }.bind(this) - }; - return true; - } else { - return false; - } - }; - - /** - * Add multiple plugins at once - * @param {Object} list key is the plugin name and value is the plugin - * @returns true if correct param - */ - this.addAll = function addAll(list) { - return simpleLoop(list, function (plugin, name) { - this.add(name, plugin); - }, this); - }; - - /** - * Get a previously added plugin - * @param {String} name the name of the plugin - * @returns {Object} the plugin - */ - this.get = function get(name) { - return _plugins[name]; - }; - - /** - * Delete a plugin from the list - * @param {String} name the name of the plugin - * @returns {Boolean} true if success - */ - this.del = function del(name) { - return delete _plugins[name]; - }; - - /** - * Apply the plugins to a NodeList - * @param {HTMLElement|SVGElement} dom the dom nodes on which to apply the plugins - * @returns {Boolean} true if the param is a dom node - */ - this.apply = function apply(dom) { - var nodes = getNodes(dom); - - simpleLoop(toArray(nodes), function (node) { - simpleLoop(getDataset(node), function (phrase, plugin) { - applyPlugin(node, phrase, plugin); - }); - }); - - return dom; - }; - - if ($plugins) { - this.addAll($plugins); - } - -}; - -},{"get-dataset":17,"get-nodes":19,"simple-loop":40,"to-array":51}],40:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],41:[function(require,module,exports){ -module.exports = function (obj) { - if (!obj || typeof obj !== 'object') return obj; - - var copy; - - if (isArray(obj)) { - var len = obj.length; - copy = Array(len); - for (var i = 0; i < len; i++) { - copy[i] = obj[i]; - } - } - else { - var keys = objectKeys(obj); - copy = {}; - - for (var i = 0, l = keys.length; i < l; i++) { - var key = keys[i]; - copy[key] = obj[key]; - } - } - return copy; -}; - -var objectKeys = Object.keys || function (obj) { - var keys = []; - for (var key in obj) { - if ({}.hasOwnProperty.call(obj, key)) keys.push(key); - } - return keys; -}; - -var isArray = Array.isArray || function (xs) { - return {}.toString.call(xs) === '[object Array]'; -}; - -},{}],42:[function(require,module,exports){ -/** - * @license shallow-diff https://github.com/cosmosio/shallow-diff - * - * The MIT License (MIT) - * - * Copyright (c) 2014-2015 Olivier Scherrer - */ -"use strict"; - -function assert(assertion, error) { - if (assertion) { - throw new TypeError("simple-loop: " + error); - } -} - -var loop = require("simple-loop"); - -/** - * Make a diff between two objects - * @param {Array/Object} base the base object - * @param {Array/Object} compared the object to compare the base with - * @example: - * With objects: - * - * base = {a:1, b:2, c:3, d:4, f:6} - * compared = {a:1, b:20, d: 4, e: 5} - * will return : - * { - * unchanged: ["a", "d"], - * updated: ["b"], - * deleted: ["f"], - * added: ["e"] - * } - * - * It also works with Arrays: - * - * base = [10, 20, 30] - * compared = [15, 20] - * will return : - * { - * unchanged: [1], - * updated: [0], - * deleted: [2], - * added: [] - * } - * - * @returns object - */ -module.exports = function shallowDiff(base, compared) { - assert(typeof base != "object", "the first object to compare with shallowDiff needs to be an object"); - assert(typeof compared != "object", "the second object to compare with shallowDiff needs to be an object"); - - var unchanged = [], - updated = [], - deleted = [], - added = []; - - // Loop through the compared object - loop(compared, function(value, idx) { - // To get the added items - if (!(idx in base)) { - added.push(idx); - - // The updated items - } else if (value !== base[idx]) { - updated.push(idx); - - // And the unchanged - } else if (value === base[idx]) { - unchanged.push(idx); - } - }); - - // Loop through the before object - loop(base, function(value, idx) { - // To get the deleted items - if (!(idx in compared)) { - deleted.push(idx); - } - }); - - return { - updated: updated, - unchanged: unchanged, - added: added, - deleted: deleted - }; -}; - -},{"simple-loop":43}],43:[function(require,module,exports){ -/** - * @license simple-loop https://github.com/flams/simple-loop - * - * The MIT License (MIT) - * - * Copyright (c) 2014-2015 Olivier Scherrer - */ -"use strict"; - -function assert(assertion, error) { - if (assertion) { - throw new TypeError("simple-loop: " + error); - } -} - -/** - * Small abstraction for looping over objects and arrays - * Warning: it's not meant to be used with nodeList - * To use with nodeList, convert to array first - * @param {Array/Object} iterated the array or object to loop through - * @param {Function} callback the function to execute for each iteration - * @param {Object} scope the scope in which to execute the callback - */ -module.exports = function loop(iterated, callback, scope) { - assert(typeof iterated != "object", "iterated must be an array/object"); - assert(typeof callback != "function", "callback must be a function"); - - var i; - - if (Array.isArray(iterated)) { - for (i = 0; i < iterated.length; i++) { - callback.call(scope, iterated[i], i, iterated); - } - } else { - for (i in iterated) { - if (iterated.hasOwnProperty(i)) { - callback.call(scope, iterated[i], i, iterated); - } - } - } -}; - -},{}],44:[function(require,module,exports){ -/** -* @license simple-mixin https://github.com/flams/simple-object-mixin -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var loop = require("simple-loop"); - -/** - * Mixes an object into another - * @param {Object} source object to get values from - * @param {Object} destination object to mix values into - * @param {Boolean} optional, set to true to prevent overriding - * @returns {Object} the destination object - */ -module.exports = function mixin(source, destination, dontOverride) { - loop(source, function (value, idx) { - if (!destination[idx] || !dontOverride) { - destination[idx] = source[idx]; - } - }); - return destination; -}; - -},{"simple-loop":45}],45:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],46:[function(require,module,exports){ -/** -* @license socketio-transport https://github.com/cosmosio/socketio-transport -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -/** - * Defines the SocketIOTransport - * @private - * @param {Object} $io socket.io's object - * @returns - */ -module.exports = function SocketIOTransportConstructor($socket) { - - /** - * @private - * The socket.io's socket - */ - var _socket = null; - - /** - * Set the socket created by SocketIO - * @param {Object} socket the socket.io socket - * @returns true if it seems to be a socket.io socket - */ - this.setSocket = function setSocket(socket) { - if (socket && typeof socket.emit == "function") { - _socket = socket; - return true; - } else { - return false; - } - }; - - /** - * Get the socket, for debugging purpose - * @private - * @returns {Object} the socket - */ - this.getSocket = function getSocket() { - return _socket; - }; - - /** - * Subscribe to a socket event - * @param {String} event the name of the event - * @param {Function} func the function to execute when the event fires - */ - this.on = function on(event, func) { - return _socket.on(event, func); - }; - - /** - * Subscribe to a socket event but disconnect as soon as it fires. - * @param {String} event the name of the event - * @param {Function} func the function to execute when the event fires - */ - this.once = function once(event, func) { - return _socket.once(event, func); - }; - - /** - * Publish an event on the socket - * @param {String} event the event to publish - * @param data - * @param {Function} callback is the function to be called for ack - */ - this.emit = function emit(event, data, callback) { - return _socket.emit(event, data, callback); - }; - - /** - * Stop listening to events on a channel - * @param {String} event the event to publish - * @param data - * @param {Function} callback is the function to be called for ack - */ - this.removeListener = function removeListener(event, data, callback) { - return _socket.removeListener(event, data, callback); - }; - - /** - * Make a request on the node server - * @param {String} channel watch the server's documentation to see available channels - * @param data the request data, it could be anything - * @param {Function} func the callback that will get the response. - * @param {Object} scope the scope in which to execute the callback - */ - this.request = function request(channel, data, func, scope) { - if (typeof channel == "string" && - typeof data != "undefined") { - - var reqData = { - eventId: Date.now() + Math.floor(Math.random()*1e6), - data: data - }, - boundCallback = function () { - if (func) { - func.apply(scope || null, arguments); - } - }; - - this.once(reqData.eventId, boundCallback); - - this.emit(channel, reqData); - - return true; - } else { - return false; - } - }; - - /** - * Listen to an url and get notified on new data - * @param {String} channel watch the server's documentation to see available channels - * @param data the request data, it could be anything - * @param {Function} func the callback that will get the data - * @param {Object} scope the scope in which to execute the callback - * @returns - */ - this.listen = function listen(channel, data, func, scope) { - if (typeof channel == "string" && - typeof data != "undefined" && - typeof func == "function") { - - var reqData = { - eventId: Date.now() + Math.floor(Math.random()*1e6), - data: data, - keepAlive: true - }, - boundCallback = function () { - if (func) { - func.apply(scope || null, arguments); - } - }, - that = this; - - this.on(reqData.eventId, boundCallback); - - this.emit(channel, reqData); - - return function stop() { - that.emit("disconnect-" + reqData.eventId); - that.removeListener(reqData.eventId, boundCallback); - }; - } else { - return false; - } - }; - - /** - * Sets the socket.io - */ - this.setSocket($socket); -}; - -},{}],47:[function(require,module,exports){ -/** -* @license socketio-transport https://github.com/cosmosio/socketio-transport -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -module.exports = { - Client: require("./client/index"), - Server: require("./server/index") -}; - -},{"./client/index":46,"./server/index":48}],48:[function(require,module,exports){ -/** -* @license socketio-transport https://github.com/cosmosio/socketio-transport -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer - */ -var isConnected = false; - -module.exports = function registerSocketIO(io, handlers) { - - if (isConnected) { - return false; - } else { - - // On connection we'll reference the handlers in socket.io - io.sockets.on("connection", function (socket) { - - var connectHandler = function (func, handler) { - // When a handler is called - socket.on(handler, function (reqData) { - - // Add socket.io's handshake for session management - reqData.data.handshake = socket.handshake; - - // pass it the requests data - var stop = func(reqData.data, - // The function to handle the result - function onEnd(body) { - socket.emit(reqData.eventId, body); - }, - // The function to handle chunks for a kept alive socket - function onData(chunk) { - reqData.keepAlive && socket.emit(reqData.eventId, ""+chunk); - }); - - // If func returned a stop function - if (typeof stop == "function") { - // Subscribe to disconnect-eventId event - socket.on("disconnect-"+reqData.eventId, stop); - } - - }); - - }; - - // for each handler, described in Emily as they can be used from node.js as well - handlers.loop(connectHandler); - // Also connect on new handlers - handlers.watch("added", connectHandler); - - }); - - isConnected = true; - } -}; - -},{}],49:[function(require,module,exports){ -/** -* @license synchronous-fsm https://github.com/flams/synchronous-fsm -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -var toArray = require("to-array"), - simpleLoop = require("simple-loop"); - -/** - * @class - * Creates a stateMachine - * - * @param initState {String} the initial state - * @param diagram {Object} the diagram that describes the state machine - * @example - * - * diagram = { - * "State1" : [ - * [ message1, action, nextState], // Same as the state's add function - * [ message2, action2, nextState] - * ], - * - * "State2" : - * [ message3, action3, scope3, nextState] - * ... and so on .... - * - * } - * - * @return the stateMachine object - */ -module.exports = function StateMachineConstructor($initState, $diagram) { - - /** - * The list of states - * @private - */ - var _states = {}, - - /** - * The current state - * @private - */ - _currentState = ""; - - /** - * Set the initialization state - * @param {String} name the name of the init state - * @returns {Boolean} - */ - this.init = function init(name) { - if (_states[name]) { - _currentState = name; - return true; - } else { - return false; - } - }; - - /** - * Add a new state - * @private - * @param {String} name the name of the state - * @returns {State} a new state - */ - this.add = function add(name) { - if (!_states[name]) { - var transition = _states[name] = new Transition(); - return transition; - } else { - return _states[name]; - } - }; - - /** - * Get an existing state - * @private - * @param {String} name the name of the state - * @returns {State} the state - */ - this.get = function get(name) { - return _states[name]; - }; - - /** - * Get the current state - * @returns {String} - */ - this.getCurrent = function getCurrent() { - return _currentState; - }; - - /** - * Tell if the state machine has the given state - * @param {String} state the name of the state - * @returns {Boolean} true if it has the given state - */ - this.has = function has(state) { - return _states.hasOwnProperty(state); - }; - - /** - * Advances the state machine to a given state - * @param {String} state the name of the state to advance the state machine to - * @returns {Boolean} true if it has the given state - */ - this.advance = function advance(state) { - if (this.has(state)) { - _currentState = state; - return true; - } else { - return false; - } - }; - - /** - * Pass an event to the state machine - * @param {String} name the name of the event - * @returns {Boolean} true if the event exists in the current state - */ - this.event = function event(name) { - var nextState; - - nextState = _states[_currentState].event.apply(_states[_currentState].event, toArray(arguments)); - // False means that there's no such event - // But undefined means that the state doesn't change - if (nextState === false) { - return false; - } else { - // There could be no next state, so the current one remains - if (nextState) { - // Call the exit action if any - _states[_currentState].event("exit"); - _currentState = nextState; - // Call the new state's entry action if any - _states[_currentState].event("entry"); - } - return true; - } - }; - - /** - * Initializes the StateMachine with the given diagram - */ - if ($diagram) { - simpleLoop($diagram, function (transition, state) { - var myState = this.add(state); - transition.forEach(function (params){ - myState.add.apply(null, params); - }); - }, this); - } - - /** - * Sets its initial state - */ - this.init($initState); -}; - -/** - * Each state has associated transitions - * @constructor - */ -function Transition() { - - /** - * The list of transitions associated to a state - * @private - */ - var _transitions = {}; - - /** - * Add a new transition - * @private - * @param {String} event the event that will trigger the transition - * @param {Function} action the function that is executed - * @param {Object} scope [optional] the scope in which to execute the action - * @param {String} next [optional] the name of the state to transit to. - * @returns {Boolean} true if success, false if the transition already exists - */ - this.add = function add(event, action, scope, next) { - - var arr = []; - - if (_transitions[event]) { - return false; - } - - if (typeof event == "string" && - typeof action == "function") { - - arr[0] = action; - - if (typeof scope == "object") { - arr[1] = scope; - } - - if (typeof scope == "string") { - arr[2] = scope; - } - - if (typeof next == "string") { - arr[2] = next; - } - - _transitions[event] = arr; - return true; - } - - return false; - }; - - /** - * Check if a transition can be triggered with given event - * @private - * @param {String} event the name of the event - * @returns {Boolean} true if exists - */ - this.has = function has(event) { - return !!_transitions[event]; - }; - - /** - * Get a transition from it's event - * @private - * @param {String} event the name of the event - * @return the transition - */ - this.get = function get(event) { - return _transitions[event] || false; - }; - - /** - * Execute the action associated to the given event - * @param {String} event the name of the event - * @param {params} params to pass to the action - * @private - * @returns false if error, the next state or undefined if success (that sounds weird) - */ - this.event = function event(newEvent) { - var _transition = _transitions[newEvent]; - if (_transition) { - _transition[0].apply(_transition[1], toArray(arguments).slice(1)); - return _transition[2]; - } else { - return false; - } - }; -} - -},{"simple-loop":50,"to-array":51}],50:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}],51:[function(require,module,exports){ -module.exports = toArray - -function toArray(list, index) { - var array = [] - - index = index || 0 - - for (var i = index || 0; i < list.length; i++) { - array[i - index] = list[i] - } - - return array -} - -},{}],52:[function(require,module,exports){ -/** -* @license transport https://github.com/cosmosio/transport -* -* The MIT License (MIT) -* -* Copyright (c) 2014 Olivier Scherrer -*/ -"use strict"; - -/** - * @class - * Transport hides and centralizes the logic behind requests. - * It can issue requests to request handlers, which in turn can issue requests - * to anything your node.js server has access to (HTTP, FileSystem, SIP...) - * @param {Emily Store} [optionanl] $reqHandlers an object containing the request handlers - * @returns - */ -module.exports = function TransportConstructor($reqHandlers) { - - /** - * The request handlers - * @private - */ - var _reqHandlers = null; - - /** - * Set the requests handlers object - * @param {Emily Store} reqHandlers an object containing the requests handlers - * @returns - */ - this.setReqHandlers = function setReqHandlers(reqHandlers) { - if (typeof reqHandlers == "object") { - _reqHandlers = reqHandlers; - return true; - } else { - return false; - } - }; - - /** - * Get the requests handlers - * @returns{ Emily Store} reqHandlers the object containing the requests handlers - */ - this.getReqHandlers = function getReqHandlers() { - return _reqHandlers; - }; - - /** - * Issue a request to a request handler - * @param {String} reqHandler the name of the request handler to issue the request to - * @param {Object} data the data, or payload, to send to the request handler - * @param {Function} callback the function to execute with the result - * @param {Object} scope the scope in which to execute the callback - * @returns - */ - this.request = function request(reqHandler, data, callback, scope) { - if (_reqHandlers.has(reqHandler) && - typeof data != "undefined") { - - _reqHandlers.get(reqHandler)(data, function () { - if (callback) { - callback.apply(scope, arguments); - } - }); - return true; - } else { - return false; - } - }; - - /** - * Issue a request to a reqHandler but keep listening for the response as it can be sent in several chunks - * or remain open as long as the abort funciton is not called - * @param {String} reqHandler the name of the request handler to issue the request to - * @param {Object} data the data, or payload, to send to the request handler - * @param {Function} callback the function to execute with the result - * @param {Object} scope the scope in which to execute the callback - * @returns {Function} the abort function to call to stop listening - */ - this.listen = function listen(reqHandler, data, callback, scope) { - var func, - abort; - - if (_reqHandlers.has(reqHandler) && - typeof data != "undefined" && - typeof callback == "function") { - - func = callback.bind(scope); - abort = _reqHandlers.get(reqHandler)(data, func, func); - - return function () { - if (typeof abort == "function") { - abort(); - } else if (typeof abort == "object" && typeof abort.func == "function") { - abort.func.call(abort.scope); - } - }; - } else { - return false; - } - }; - - this.setReqHandlers($reqHandlers); - -}; - -},{}],53:[function(require,module,exports){ -/** -* @license url-highway https://github.com/cosmosio/url-highway -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2016 Olivier Scherrer -*/ -var Highway = require("highway"), - toArray = require("to-array"); - -/** - * @class - * UrlHighway is a router which navigates to the route defined in the URL and updates this URL - * while navigating. It's a subtype of Highway - */ -function UrlHighway() { - "use strict"; - - /** - * The handle on the watch - * @private - */ - var _watchHandle, - - /** - * The default route to navigate to when nothing is supplied in the url - * @private - */ - _defaultRoute = "", - - /** - * The last route that was navigated to - * @private - */ - _lastRoute; - - /** - * Navigates to the current hash or to the default route if none is supplied in the url - * @private - */ - /*jshint validthis:true*/ - function doNavigate() { - if (!hashIsEmpty()) { - var parsedHash = this.parse(window.location.hash); - this.navigate.apply(this, parsedHash); - } else { - this.navigate(_defaultRoute); - } - } - - /** - * An empty string or # are both empty hashes - */ - function hashIsEmpty() { - return !window.location.hash || window.location.hash == "#"; - } - - /** - * Set the default route to navigate to when nothing is defined in the url - * @param {String} defaultRoute the defaultRoute to navigate to - * @returns {Boolean} true if it's not an empty string - */ - this.setDefaultRoute = function setDefaultRoute(defaultRoute) { - if (defaultRoute && typeof defaultRoute == "string") { - _defaultRoute = defaultRoute; - return true; - } else { - return false; - } - }; - - /** - * Get the currently set default route - * @returns {String} the default route - */ - this.getDefaultRoute = function getDefaultRoute() { - return _defaultRoute; - }; - - /** - * The function that parses the url to determine the route to navigate to. - * It has a default behavior explained below, but can be overriden as long as - * it has the same contract. - * @param {String} hash the hash coming from window.location.has - * @returns {Array} has to return an array with the list of arguments to call - * navigate with. The first item of the array must be the name of the route. - * - * Example: #album/holiday/2013 - * will navigate to the route "album" and give two arguments "holiday" and "2013" - */ - this.parse = function parse(hash) { - return hash.split("#").pop().split("/"); - }; - - /** - * The function that converts, or serialises the route and its arguments to a valid URL. - * It has a default behavior below, but can be overriden as long as it has the same contract. - * @param {Array} args the list of arguments to serialize - * @returns {String} the serialized arguments to add to the url hashmark - * - * Example: - * ["album", "holiday", "2013"]; - * will give "album/holiday/2013" - * - */ - this.toUrl = function toUrl(args) { - return args.join("/"); - }; - - /** - * When all the routes and handlers have been defined, start the location router - * so it parses the URL and navigates to the corresponding route. - * It will also start listening to route changes and hashmark changes to navigate. - * While navigating, the hashmark itself will also change to reflect the current route state - */ - this.start = function start(defaultRoute) { - this.setDefaultRoute(defaultRoute); - doNavigate.call(this); - this.bindOnHashChange(); - this.bindOnRouteChange(); - }; - - /** - * Remove the events handler for cleaning. - */ - this.stop = function stop() { - this.unwatch(_watchHandle); - window.removeEventListener("hashchange", this.boundOnHashChange, true); - }; - - /** - * Parse the hash and navigate to the corresponding url - * @private - */ - this.onHashChange = function onHashChange() { - if (window.location.hash != _lastRoute) { - doNavigate.call(this); - } - }; - - /** - * The bound version of onHashChange for add/removeEventListener - * @private - */ - this.boundOnHashChange = this.onHashChange.bind(this); - - /** - * Add an event listener to hashchange to navigate to the corresponding route - * when it changes - * @private - */ - this.bindOnHashChange = function bindOnHashChange() { - window.addEventListener("hashchange", this.boundOnHashChange, true); - }; - - /** - * Watch route change events from the router to update the location - * @private - */ - this.bindOnRouteChange = function bindOnRouteChange() { - _watchHandle = this.watch(this.onRouteChange, this); - }; - - /** - * The handler for when the route changes - * It updates the location - * @private - */ - this.onRouteChange = function onRouteChange() { - window.location.hash = this.toUrl(toArray(arguments)); - _lastRoute = window.location.hash; - }; - - /** - * Get the last, or current, route we've navigated to - * @returns {string} - */ - this.getLastRoute = function getLastRoute() { - return _lastRoute; - }; -} - -module.exports = function UrlHighwayFactory() { - UrlHighway.prototype = new Highway(); - UrlHighway.constructor = Highway; - return new UrlHighway(); -}; - -},{"highway":54,"to-array":51}],54:[function(require,module,exports){ -/** - * @license highway https://github.com/cosmosio/highway - * - * The MIT License (MIT) - * - * Copyright (c) 2014-2016 Olivier Scherrer - */ -"use strict"; - -var Observable = require("watch-notify"), - toArray = require("to-array"); - -/** - * @class - * Routing allows for navigating in an application by defining routes. - */ -module.exports = function HighwayConstructor() { - - /** - * The routes observable (the applications use it) - * @private - */ - var _routes = new Observable(), - - /** - * The events observable (used by Routing) - * @private - */ - _events = new Observable(), - - /** - * The routing history - * @private - */ - _history = [], - - /** - * For navigating through the history, remembers the current position - * @private - */ - _currentPos = -1, - - /** - * The max history depth - * @private - */ - _maxHistory = 10; - - /** - * Set a new route - * @param {String} route the name of the route - * @param {Function} func the function to be execute when navigating to the route - * @param {Object} scope the scope in which to execute the function - * @returns a handle to remove the route - */ - this.set = function set() { - return _routes.watch.apply(_routes, arguments); - }; - - /** - * Remove a route - * @param {Object} handle the handle provided by the set method - * @returns true if successfully removed - */ - this.unset = function unset(handle) { - return _routes.unwatch(handle); - }; - - /** - * Navigate to a route - * @param {String} route the route to navigate to - * @param {*} as many params as necessary - * @returns - */ - this.navigate = function navigate(route) { - clearForwardHistory(); - _history.push(toArray(arguments)); - ensureMaxHistory(); - _currentPos = _history.length - 1; - load.apply(this, arguments); - }; - - /** - * Go back and forth in the history - * @param {Number} nb the number of jumps in the history. Use negative number to go back. - * @returns true if history exists - */ - this.go = function go(nb) { - var history = _history[_currentPos + nb]; - if (history) { - _currentPos += nb; - load.apply(this, history); - return true; - } else { - return false; - } - }; - - /** - * Go back in the history, short for go(-1) - * @returns true if it was able to go back - */ - this.back = function back() { - return this.go(-1); - }; - - /** - * Go forward in the history, short for go(1) - * @returns true if it was able to go forward - */ - this.forward = function forward() { - return this.go(1); - }; - - /** - * Watch for route changes - * @param {Function} func the func to execute when the route changes - * @param {Object} scope the scope in which to execute the function - * @returns {Object} the handle to unwatch for route changes - */ - this.watch = function watch(func, scope) { - return _events.watch("route", func, scope); - }; - - /** - * Unwatch routes changes - * @param {Object} handle the handle was returned by the watch function - * @returns true if unwatch - */ - this.unwatch = function unwatch(handle) { - return _events.unwatch(handle); - }; - - /** - * Set the maximum length of history - * As the user navigates through the application, the - * router keeps track of the history. Set the depth of the history - * depending on your need and the amount of memory that you can allocate it - * @param {Number} maxHistory the depth of history - * @returns {Boolean} true if maxHistory is equal or greater than 0 - */ - this.setMaxHistory = function setMaxHistory(maxHistory) { - if (maxHistory >= 0) { - _maxHistory = maxHistory; - ensureMaxHistory(); - return true; - } else { - return false; - } - }; - - /** - * Get the current max history setting - * @returns {Number} the depth of history - */ - this.getMaxHistory = getMaxHistory; - - /** - * Get the current length of history - * @returns {Number} the length of history - */ - this.getHistoryCount = function getHistoryCount() { - return _history.length; - }; - - /** - * Flush the entire history - */ - this.clearHistory = function clearHistory() { - _history.length = 0; - }; - - /** - * Get a route from the history or the entire historic - * @param index - * @returns {*} - */ - this.getHistory = function getHistory(index) { - if (typeof index == "undefined") { - return _history; - } else { - return _history[_history.length - index - 1]; - } - }; - - function load() { - var copy = toArray(arguments); - - _routes.notify.apply(_routes, copy); - copy.unshift("route"); - _events.notify.apply(_events, copy); - } - - function getMaxHistory() { - return _maxHistory; - } - - function ensureMaxHistory() { - var count = _history.length, - max = getMaxHistory(), - excess = count - max; - - if (excess > 0) { - _history.splice(0, excess); - } - } - - function clearForwardHistory() { - _history.splice(_currentPos + 1, _history.length); - } -}; - -},{"to-array":51,"watch-notify":58}],55:[function(require,module,exports){ -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - -},{}],56:[function(require,module,exports){ -module.exports = function isBuffer(arg) { - return arg && typeof arg === 'object' - && typeof arg.copy === 'function' - && typeof arg.fill === 'function' - && typeof arg.readUInt8 === 'function'; -} -},{}],57:[function(require,module,exports){ -(function (process,global){ -// Copyright Joyent, Inc. and other Node contributors. -// -// 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. - -var formatRegExp = /%[sdj%]/g; -exports.format = function(f) { - if (!isString(f)) { - var objects = []; - for (var i = 0; i < arguments.length; i++) { - objects.push(inspect(arguments[i])); - } - return objects.join(' '); - } - - var i = 1; - var args = arguments; - var len = args.length; - var str = String(f).replace(formatRegExp, function(x) { - if (x === '%%') return '%'; - if (i >= len) return x; - switch (x) { - case '%s': return String(args[i++]); - case '%d': return Number(args[i++]); - case '%j': - try { - return JSON.stringify(args[i++]); - } catch (_) { - return '[Circular]'; - } - default: - return x; - } - }); - for (var x = args[i]; i < len; x = args[++i]) { - if (isNull(x) || !isObject(x)) { - str += ' ' + x; - } else { - str += ' ' + inspect(x); - } - } - return str; -}; - - -// Mark that a method should not be used. -// Returns a modified function which warns once by default. -// If --no-deprecation is set, then it is a no-op. -exports.deprecate = function(fn, msg) { - // Allow for deprecating things in the process of starting up. - if (isUndefined(global.process)) { - return function() { - return exports.deprecate(fn, msg).apply(this, arguments); - }; - } - - if (process.noDeprecation === true) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (process.throwDeprecation) { - throw new Error(msg); - } else if (process.traceDeprecation) { - console.trace(msg); - } else { - console.error(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -}; - - -var debugs = {}; -var debugEnviron; -exports.debuglog = function(set) { - if (isUndefined(debugEnviron)) - debugEnviron = process.env.NODE_DEBUG || ''; - set = set.toUpperCase(); - if (!debugs[set]) { - if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { - var pid = process.pid; - debugs[set] = function() { - var msg = exports.format.apply(exports, arguments); - console.error('%s %d: %s', set, pid, msg); - }; - } else { - debugs[set] = function() {}; - } - } - return debugs[set]; -}; - - -/** - * Echos the value of a value. Trys to print the value out - * in the best way possible given the different types. - * - * @param {Object} obj The object to print out. - * @param {Object} opts Optional options object that alters the output. - */ -/* legacy: obj, showHidden, depth, colors*/ -function inspect(obj, opts) { - // default options - var ctx = { - seen: [], - stylize: stylizeNoColor - }; - // legacy... - if (arguments.length >= 3) ctx.depth = arguments[2]; - if (arguments.length >= 4) ctx.colors = arguments[3]; - if (isBoolean(opts)) { - // legacy... - ctx.showHidden = opts; - } else if (opts) { - // got an "options" object - exports._extend(ctx, opts); - } - // set default options - if (isUndefined(ctx.showHidden)) ctx.showHidden = false; - if (isUndefined(ctx.depth)) ctx.depth = 2; - if (isUndefined(ctx.colors)) ctx.colors = false; - if (isUndefined(ctx.customInspect)) ctx.customInspect = true; - if (ctx.colors) ctx.stylize = stylizeWithColor; - return formatValue(ctx, obj, ctx.depth); -} -exports.inspect = inspect; - - -// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics -inspect.colors = { - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [30, 39], - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -// Don't use 'blue' not visible on cmd.exe -inspect.styles = { - 'special': 'cyan', - 'number': 'yellow', - 'boolean': 'yellow', - 'undefined': 'grey', - 'null': 'bold', - 'string': 'green', - 'date': 'magenta', - // "name": intentionally not styling - 'regexp': 'red' -}; - - -function stylizeWithColor(str, styleType) { - var style = inspect.styles[styleType]; - - if (style) { - return '\u001b[' + inspect.colors[style][0] + 'm' + str + - '\u001b[' + inspect.colors[style][1] + 'm'; - } else { - return str; - } -} - - -function stylizeNoColor(str, styleType) { - return str; -} - - -function arrayToHash(array) { - var hash = {}; - - array.forEach(function(val, idx) { - hash[val] = true; - }); - - return hash; -} - - -function formatValue(ctx, value, recurseTimes) { - // Provide a hook for user-specified inspect functions. - // Check that value is an object with an inspect function on it - if (ctx.customInspect && - value && - isFunction(value.inspect) && - // Filter out the util module, it's inspect function is special - value.inspect !== exports.inspect && - // Also filter out any prototype objects using the circular check. - !(value.constructor && value.constructor.prototype === value)) { - var ret = value.inspect(recurseTimes, ctx); - if (!isString(ret)) { - ret = formatValue(ctx, ret, recurseTimes); - } - return ret; - } - - // Primitive types cannot have properties - var primitive = formatPrimitive(ctx, value); - if (primitive) { - return primitive; - } - - // Look up the keys of the object. - var keys = Object.keys(value); - var visibleKeys = arrayToHash(keys); - - if (ctx.showHidden) { - keys = Object.getOwnPropertyNames(value); - } - - // IE doesn't make error fields non-enumerable - // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx - if (isError(value) - && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) { - return formatError(value); - } - - // Some type of object without properties can be shortcutted. - if (keys.length === 0) { - if (isFunction(value)) { - var name = value.name ? ': ' + value.name : ''; - return ctx.stylize('[Function' + name + ']', 'special'); - } - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } - if (isDate(value)) { - return ctx.stylize(Date.prototype.toString.call(value), 'date'); - } - if (isError(value)) { - return formatError(value); - } - } - - var base = '', array = false, braces = ['{', '}']; - - // Make Array say that they are Array - if (isArray(value)) { - array = true; - braces = ['[', ']']; - } - - // Make functions say that they are functions - if (isFunction(value)) { - var n = value.name ? ': ' + value.name : ''; - base = ' [Function' + n + ']'; - } - - // Make RegExps say that they are RegExps - if (isRegExp(value)) { - base = ' ' + RegExp.prototype.toString.call(value); - } - - // Make dates with properties first say the date - if (isDate(value)) { - base = ' ' + Date.prototype.toUTCString.call(value); - } - - // Make error with message first say the error - if (isError(value)) { - base = ' ' + formatError(value); - } - - if (keys.length === 0 && (!array || value.length == 0)) { - return braces[0] + base + braces[1]; - } - - if (recurseTimes < 0) { - if (isRegExp(value)) { - return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); - } else { - return ctx.stylize('[Object]', 'special'); - } - } - - ctx.seen.push(value); - - var output; - if (array) { - output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); - } else { - output = keys.map(function(key) { - return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); - }); - } - - ctx.seen.pop(); - - return reduceToSingleString(output, base, braces); -} - - -function formatPrimitive(ctx, value) { - if (isUndefined(value)) - return ctx.stylize('undefined', 'undefined'); - if (isString(value)) { - var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') - .replace(/'/g, "\\'") - .replace(/\\"/g, '"') + '\''; - return ctx.stylize(simple, 'string'); - } - if (isNumber(value)) - return ctx.stylize('' + value, 'number'); - if (isBoolean(value)) - return ctx.stylize('' + value, 'boolean'); - // For some reason typeof null is "object", so special case here. - if (isNull(value)) - return ctx.stylize('null', 'null'); -} - - -function formatError(value) { - return '[' + Error.prototype.toString.call(value) + ']'; -} - - -function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { - var output = []; - for (var i = 0, l = value.length; i < l; ++i) { - if (hasOwnProperty(value, String(i))) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - String(i), true)); - } else { - output.push(''); - } - } - keys.forEach(function(key) { - if (!key.match(/^\d+$/)) { - output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, - key, true)); - } - }); - return output; -} - - -function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { - var name, str, desc; - desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; - if (desc.get) { - if (desc.set) { - str = ctx.stylize('[Getter/Setter]', 'special'); - } else { - str = ctx.stylize('[Getter]', 'special'); - } - } else { - if (desc.set) { - str = ctx.stylize('[Setter]', 'special'); - } - } - if (!hasOwnProperty(visibleKeys, key)) { - name = '[' + key + ']'; - } - if (!str) { - if (ctx.seen.indexOf(desc.value) < 0) { - if (isNull(recurseTimes)) { - str = formatValue(ctx, desc.value, null); - } else { - str = formatValue(ctx, desc.value, recurseTimes - 1); - } - if (str.indexOf('\n') > -1) { - if (array) { - str = str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n').substr(2); - } else { - str = '\n' + str.split('\n').map(function(line) { - return ' ' + line; - }).join('\n'); - } - } - } else { - str = ctx.stylize('[Circular]', 'special'); - } - } - if (isUndefined(name)) { - if (array && key.match(/^\d+$/)) { - return str; - } - name = JSON.stringify('' + key); - if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { - name = name.substr(1, name.length - 2); - name = ctx.stylize(name, 'name'); - } else { - name = name.replace(/'/g, "\\'") - .replace(/\\"/g, '"') - .replace(/(^"|"$)/g, "'"); - name = ctx.stylize(name, 'string'); - } - } - - return name + ': ' + str; -} - - -function reduceToSingleString(output, base, braces) { - var numLinesEst = 0; - var length = output.reduce(function(prev, cur) { - numLinesEst++; - if (cur.indexOf('\n') >= 0) numLinesEst++; - return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; - }, 0); - - if (length > 60) { - return braces[0] + - (base === '' ? '' : base + '\n ') + - ' ' + - output.join(',\n ') + - ' ' + - braces[1]; - } - - return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; -} - - -// NOTE: These type checking functions intentionally don't use `instanceof` -// because it is fragile and can be easily faked with `Object.create()`. -function isArray(ar) { - return Array.isArray(ar); -} -exports.isArray = isArray; - -function isBoolean(arg) { - return typeof arg === 'boolean'; -} -exports.isBoolean = isBoolean; - -function isNull(arg) { - return arg === null; -} -exports.isNull = isNull; - -function isNullOrUndefined(arg) { - return arg == null; -} -exports.isNullOrUndefined = isNullOrUndefined; - -function isNumber(arg) { - return typeof arg === 'number'; -} -exports.isNumber = isNumber; - -function isString(arg) { - return typeof arg === 'string'; -} -exports.isString = isString; - -function isSymbol(arg) { - return typeof arg === 'symbol'; -} -exports.isSymbol = isSymbol; - -function isUndefined(arg) { - return arg === void 0; -} -exports.isUndefined = isUndefined; - -function isRegExp(re) { - return isObject(re) && objectToString(re) === '[object RegExp]'; -} -exports.isRegExp = isRegExp; - -function isObject(arg) { - return typeof arg === 'object' && arg !== null; -} -exports.isObject = isObject; - -function isDate(d) { - return isObject(d) && objectToString(d) === '[object Date]'; -} -exports.isDate = isDate; - -function isError(e) { - return isObject(e) && - (objectToString(e) === '[object Error]' || e instanceof Error); -} -exports.isError = isError; - -function isFunction(arg) { - return typeof arg === 'function'; -} -exports.isFunction = isFunction; - -function isPrimitive(arg) { - return arg === null || - typeof arg === 'boolean' || - typeof arg === 'number' || - typeof arg === 'string' || - typeof arg === 'symbol' || // ES6 symbol - typeof arg === 'undefined'; -} -exports.isPrimitive = isPrimitive; - -exports.isBuffer = require('./support/isBuffer'); - -function objectToString(o) { - return Object.prototype.toString.call(o); -} - - -function pad(n) { - return n < 10 ? '0' + n.toString(10) : n.toString(10); -} - - -var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', - 'Oct', 'Nov', 'Dec']; - -// 26 Feb 16:19:34 -function timestamp() { - var d = new Date(); - var time = [pad(d.getHours()), - pad(d.getMinutes()), - pad(d.getSeconds())].join(':'); - return [d.getDate(), months[d.getMonth()], time].join(' '); -} - - -// log is just a thin wrapper to console.log that prepends a timestamp -exports.log = function() { - console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); -}; - - -/** - * Inherit the prototype methods from one constructor into another. - * - * The Function.prototype.inherits from lang.js rewritten as a standalone - * function (not on Function.prototype). NOTE: If this file is to be loaded - * during bootstrapping this function needs to be rewritten using some native - * functions as prototype setup using normal JavaScript does not work as - * expected during bootstrapping (see mirror.js in r114903). - * - * @param {function} ctor Constructor function which needs to inherit the - * prototype. - * @param {function} superCtor Constructor function to inherit prototype from. - */ -exports.inherits = require('inherits'); - -exports._extend = function(origin, add) { - // Don't do anything if add isn't an object - if (!add || !isObject(add)) return origin; - - var keys = Object.keys(add); - var i = keys.length; - while (i--) { - origin[keys[i]] = add[keys[i]]; - } - return origin; -}; - -function hasOwnProperty(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -} - -}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"./support/isBuffer":56,"_process":37,"inherits":55}],58:[function(require,module,exports){ -/** -* @license watch-notify https://github.com/flams/watch-notify -* -* The MIT License (MIT) -* -* Copyright (c) 2014-2015 Olivier Scherrer -*/ -"use strict"; - -var assert = require("assert"); - -var loop = require("simple-loop"), - toArray = require("to-array"); - -/** -* @class -* Observable is an implementation of the Observer design pattern, -* which is also known as publish/subscribe. -* -* This service creates an Observable to which you can add subscribers. -* -* @returns {Observable} -*/ -module.exports = function WatchNotifyConstructor() { - - /** - * The list of topics - * @private - */ - var _topics = {}; - - /** - * Add an observer - * @param {String} topic the topic to observe - * @param {Function} callback the callback to execute - * @param {Object} scope the scope in which to execute the callback - * @returns handle - */ - this.watch = function watch(topic, callback, scope) { - if (typeof callback == "function") { - var observers = _topics[topic] = _topics[topic] || [], - observer = [callback, scope]; - - observers.push(observer); - return [topic, observers.indexOf(observer)]; - } else { - return false; - } - }; - - /** - * Listen to an event just once before removing the handler - * @param {String} topic the topic to observe - * @param {Function} callback the callback to execute - * @param {Object} scope the scope in which to execute the callback - * @returns handle - */ - this.once = function once(topic, callback, scope) { - var handle = this.watch(topic, function () { - callback.apply(scope, arguments); - this.unwatch(handle); - }, this); - return handle; - }; - - /** - * Remove an observer - * @param {Handle} handle returned by the watch method - * @returns {Boolean} true if there were subscribers - */ - this.unwatch = function unwatch(handle) { - var topic = handle[0], idx = handle[1]; - if (_topics[topic] && _topics[topic][idx]) { - // delete value so the indexes don't move - delete _topics[topic][idx]; - // If the topic is only set with falsy values, delete it; - if (!_topics[topic].some(function (value) { - return !!value; - })) { - delete _topics[topic]; - } - return true; - } else { - return false; - } - }; - - /** - * Notifies observers that a topic has a new message - * @param {String} topic the name of the topic to publish to - * @param subject - * @returns {Boolean} true if there was subscribers - */ - this.notify = function notify(topic) { - var observers = _topics[topic], - args = toArray(arguments).slice(1); - - if (observers) { - loop(observers, function (value) { - try { - if (value) { - value[0].apply(value[1] || null, args); - } - } catch (err) { - console.error("[Watch-notify] publishing on '" + topic + "'' threw an error: " + err); - } - }); - return true; - } else { - return false; - } - }; - - /** - * Check if topic has the described observer - * @param {Handle} - * @returns {Boolean} true if exists - */ - this.hasObserver = function hasObserver(handle) { - return !!( handle && _topics[handle[0]] && _topics[handle[0]][handle[1]]); - }; - - /** - * Check if a topic has observers - * @param {String} topic the name of the topic - * @returns {Boolean} true if topic is listened - */ - this.hasTopic = function hasTopic(topic) { - return !!_topics[topic]; - }; - - /** - * Unwatch all or unwatch all from topic - * @param {String} topic optional unwatch all from topic - * @returns {Boolean} true if ok - */ - this.unwatchAll = function unwatchAll(topic) { - if (_topics[topic]) { - delete _topics[topic]; - } else { - _topics = {}; - } - return true; - }; -}; - -},{"assert":9,"simple-loop":59,"to-array":51}],59:[function(require,module,exports){ -arguments[4][22][0].apply(exports,arguments) -},{"assert":9,"dup":22}]},{},[1]); diff --git a/examples/olives/package.json b/examples/olives/package.json deleted file mode 100644 index 999fbadaf0..0000000000 --- a/examples/olives/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "private": true, - "dependencies": { - "emily": "^3.0.7", - "olives": "^3.0.8", - "todomvc-app-css": "^2.1.0", - "todomvc-common": "^1.0.1", - "url-highway": "1.0.0" - }, - "scripts": { - "build": "browserify ./js/app.js -o olives-todo.js", - "watch": "watchify ./js/app.js -o olives-todo.js" - }, - "devDependencies": { - "browserify": "^9.0.4", - "watchify": "^3.1.0" - } -} diff --git a/examples/olives/readme.md b/examples/olives/readme.md deleted file mode 100644 index 3d835bbec1..0000000000 --- a/examples/olives/readme.md +++ /dev/null @@ -1,38 +0,0 @@ -# Olives.js TodoMVC Example - -> A JS Framework for creating realtime and scalable applications. Based on Emily.js and socket.io. - -> _[Olives.js - flams.github.io/olives](http://flams.github.io/olives)_ - - -## Learning Olives.js - -The [Olives.js website](http://flams.github.io/olives) is a great resource for getting started. - -Here are some links you may find helpful: - -* [Documentation](http://flams.github.io/olives/docs/latest) -* [Applications built with Olives.js](http://flams.github.io/olives/#liveexamples) -* [Olives.js on GitHub](https://github.com/flams/olives) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ - -## Building the app - -As this application is using node's module system, `browserify` or similar tool is required to package it for the browser. To build the app, simply do: - -``` -npm run build -``` - -To automatically rebuild the application as you make changes to the source code, you can do: - -``` -npm run watch -``` - -Make sure that you've installed all the dependencies first: - -``` -npm install -``` diff --git a/examples/puremvc/.gitignore b/examples/puremvc/.gitignore deleted file mode 100644 index d424c36f68..0000000000 --- a/examples/puremvc/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -node_modules/todomvc-app-css -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common -!node_modules/todomvc-common/base.js -!node_modules/todomvc-common/base.css - -node_modules/npmvc -!node_modules/npmvc/lib/puremvc-1.0.1.js - -node_modules/director -!node_modules/director/build/director.js diff --git a/examples/puremvc/index.html b/examples/puremvc/index.html deleted file mode 100644 index 91f325e353..0000000000 --- a/examples/puremvc/index.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - PureMVC • TodoMVC - - - - -
            -
            -

            todos

            - -
            -
            - - -
              -
            -
            - -
            - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/puremvc/js/AppConstants.js b/examples/puremvc/js/AppConstants.js deleted file mode 100644 index d94a2b2782..0000000000 --- a/examples/puremvc/js/AppConstants.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @author Mike Britton - * - * @class AppConstants - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - * - * Define the core and notification constants. - * - * PureMVC JS is multi-core, meaning you may have multiple, - * named and isolated PureMVC cores. This app only has one. - */ -puremvc.define({ name: 'todomvc.AppConstants' }, {}, { - // The multiton key for this app's single core - CORE_NAME: 'TodoMVC', - - // Notifications - STARTUP: 'startup', - ADD_TODO: 'add_todo', - DELETE_TODO: 'delete_todo', - UPDATE_TODO: 'update_todo', - TOGGLE_TODO_STATUS: 'toggle_todo_status', - REMOVE_TODOS_COMPLETED: 'remove_todos_completed', - FILTER_TODOS: 'filter_todos', - TODOS_FILTERED: 'todos_filtered', - - // Filter routes - FILTER_ALL: 'all', - FILTER_ACTIVE: 'active', - FILTER_COMPLETED: 'completed' -}); diff --git a/examples/puremvc/js/app.js b/examples/puremvc/js/app.js deleted file mode 100644 index 4dfad5056b..0000000000 --- a/examples/puremvc/js/app.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Mike Britton - * - * @class todomvc.Application - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.Application', - constructor: function() { - // register the startup command and trigger it. - this.facade.registerCommand( todomvc.AppConstants.STARTUP, todomvc.controller.command.StartupCommand ); - this.facade.sendNotification( todomvc.AppConstants.STARTUP ); - } - }, - - // INSTANCE MEMBERS - { - // Define the startup notification name - STARTUP: 'startup', - - // Get an instance of the PureMVC Facade. This creates the Model, View, and Controller instances. - facade: puremvc.Facade.getInstance( todomvc.AppConstants.CORE_NAME ) - } -); diff --git a/examples/puremvc/js/controller/command/PrepControllerCommand.js b/examples/puremvc/js/controller/command/PrepControllerCommand.js deleted file mode 100644 index ca4db9cac1..0000000000 --- a/examples/puremvc/js/controller/command/PrepControllerCommand.js +++ /dev/null @@ -1,29 +0,0 @@ -/** - * @author Mike Britton, Cliff Hall - * - * @class PrepControllerCommand - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.controller.command.PrepControllerCommand', - parent: puremvc.SimpleCommand - }, - - // INSTANCE MEMBERS - { - /** - * Register Commands with the Controller - * @override - */ - execute: function (note) { - // This registers multiple notes to a single command which performs different logic based on the note name. - // In a more complex app, we'd usually be registering a different command to each notification name. - this.facade.registerCommand( todomvc.AppConstants.ADD_TODO, todomvc.controller.command.TodoCommand ); - this.facade.registerCommand( todomvc.AppConstants.REMOVE_TODOS_COMPLETED, todomvc.controller.command.TodoCommand ); - this.facade.registerCommand( todomvc.AppConstants.DELETE_TODO, todomvc.controller.command.TodoCommand ); - this.facade.registerCommand( todomvc.AppConstants.UPDATE_TODO, todomvc.controller.command.TodoCommand ); - this.facade.registerCommand( todomvc.AppConstants.TOGGLE_TODO_STATUS, todomvc.controller.command.TodoCommand ); - this.facade.registerCommand( todomvc.AppConstants.FILTER_TODOS, todomvc.controller.command.TodoCommand ); - } - } -); diff --git a/examples/puremvc/js/controller/command/PrepModelCommand.js b/examples/puremvc/js/controller/command/PrepModelCommand.js deleted file mode 100644 index 7d5e27374e..0000000000 --- a/examples/puremvc/js/controller/command/PrepModelCommand.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @author Mike Britton - * - * @class PrepModelCommand - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.controller.command.PrepModelCommand', - parent: puremvc.SimpleCommand - }, - - // INSTANCE MEMBERS - { - /** - * Register Proxies with the Model - * @override - */ - execute: function(note) { - this.facade.registerProxy( new todomvc.model.proxy.TodoProxy() ); - } - } -); diff --git a/examples/puremvc/js/controller/command/PrepViewCommand.js b/examples/puremvc/js/controller/command/PrepViewCommand.js deleted file mode 100644 index 783ae36e48..0000000000 --- a/examples/puremvc/js/controller/command/PrepViewCommand.js +++ /dev/null @@ -1,23 +0,0 @@ -/** - * @author Mike Britton - * - * @class PrepViewCommand - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define ({ - name: 'todomvc.controller.command.PrepViewCommand', - parent: puremvc.SimpleCommand - }, - - // INSTANCE MEMBERS - { - /** - * Register Mediators with the View - * @override - */ - execute: function (note) { - this.facade.registerMediator( new todomvc.view.mediator.TodoFormMediator() ); - this.facade.registerMediator( new todomvc.view.mediator.RoutesMediator() ); - } - } -); diff --git a/examples/puremvc/js/controller/command/StartupCommand.js b/examples/puremvc/js/controller/command/StartupCommand.js deleted file mode 100644 index 877e90581d..0000000000 --- a/examples/puremvc/js/controller/command/StartupCommand.js +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @author Mike Britton - * - * @class StartupCommand - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.controller.command.StartupCommand', - parent: puremvc.MacroCommand - }, - - // INSTANCE MEMBERS - { - /** - * Add the sub-commands for this MacroCommand - * @override - */ - initializeMacroCommand: function () { - this.addSubCommand( todomvc.controller.command.PrepControllerCommand ); - this.addSubCommand( todomvc.controller.command.PrepModelCommand ); - this.addSubCommand( todomvc.controller.command.PrepViewCommand ); - } - } -); diff --git a/examples/puremvc/js/controller/command/TodoCommand.js b/examples/puremvc/js/controller/command/TodoCommand.js deleted file mode 100644 index 36694bf6b8..0000000000 --- a/examples/puremvc/js/controller/command/TodoCommand.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * @author Mike Britton, Cliff Hall - * - * @class TodoCommand - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define ({ - name: 'todomvc.controller.command.TodoCommand', - parent: puremvc.SimpleCommand - }, - - // INSTANCE MEMBERS - { - /** - * Perform business logic (in this case, based on Notification name) - * @override - */ - execute: function ( note ) { - var proxy = this.facade.retrieveProxy( todomvc.model.proxy.TodoProxy.NAME ); - - switch( note.getName() ) { - case todomvc.AppConstants.ADD_TODO: - proxy.addTodo( note.getBody() ); - break; - - case todomvc.AppConstants.DELETE_TODO: - proxy.deleteTodo( note.getBody() ); - break; - - case todomvc.AppConstants.UPDATE_TODO: - proxy.updateTodo( note.getBody() ); - break; - - case todomvc.AppConstants.TOGGLE_TODO_STATUS: - proxy.toggleCompleteStatus( note.getBody() ); - break; - - case todomvc.AppConstants.REMOVE_TODOS_COMPLETED: - proxy.removeTodosCompleted(); - break; - - case todomvc.AppConstants.FILTER_TODOS: - proxy.filterTodos( note.getBody() ); - break; - - default: - console.log('TodoCommand received an unsupported Notification'); - break; - } - } - } -); diff --git a/examples/puremvc/js/lib/puremvc.min.js b/examples/puremvc/js/lib/puremvc.min.js deleted file mode 100644 index e361a7395f..0000000000 --- a/examples/puremvc/js/lib/puremvc.min.js +++ /dev/null @@ -1,20 +0,0 @@ -(function(n){function i(a,d){this.setNotifyMethod(a);this.setNotifyContext(d)}function j(a,d,b){this.name=a;this.body=d;this.type=b}function k(){}function m(){}function l(){this.subCommands=[];this.initializeMacroCommand()}function g(a,d){this.mediatorName=a||this.constructor.NAME;this.viewComponent=d}function h(a,d){this.proxyName=a||this.constructor.NAME;null!=d&&this.setData(d)}function b(a){if(null!=b.instanceMap[a])throw Error(b.MULTITON_MSG);this.initializeNotifier(a);b.instanceMap[a]=this; -this.initializeFacade()}function c(a){if(null!=c.instanceMap[a])throw Error(c.MULTITON_MSG);this.multitonKey=a;c.instanceMap[this.multitonKey]=this;this.mediatorMap=[];this.observerMap=[];this.initializeView()}function e(a){if(e.instanceMap[a])throw Error(e.MULTITON_MSG);this.multitonKey=a;e.instanceMap[a]=this;this.proxyMap=[];this.initializeModel()}function f(a){if(null!=f.instanceMap[a])throw Error(f.MULTITON_MSG);this.multitonKey=a;f.instanceMap[this.multitonKey]=this;this.commandMap=[];this.initializeController()} -function p(a,d,b){for(var a=a.split("."),b=b||o.global,c,e,f=0,g=a.length;f 0 ); - for ( i = 0; i < this.todos.length; i++ ) { - if ( this.todos[ i ].completed === false ) { - checked = false; - break; - } - } - this.toggleAllCheckbox.checked = checked; - }, - - updateClearButton: function() { - this.clearButton.style.display = ( this.stats.todoCompleted === 0 ) ? 'none' : 'block'; - this.clearButton.innerHTML = 'Clear completed'; - }, - - updateTodoCount: function() { - var number = document.createElement( 'strong' ), - text = ' ' + (this.stats.todoLeft === 1 ? 'item' : 'items' ) + ' left'; - number.innerHTML = this.stats.todoLeft; - this.todoCount.innerHTML = null; - this.todoCount.appendChild( number ); - this.todoCount.appendChild( document.createTextNode( text ) ); - } - }, - - // STATIC MEMBERS - { - NAME: 'TodoForm', - } -); diff --git a/examples/puremvc/js/view/event/AppEvents.js b/examples/puremvc/js/view/event/AppEvents.js deleted file mode 100644 index 140834c4ae..0000000000 --- a/examples/puremvc/js/view/event/AppEvents.js +++ /dev/null @@ -1,48 +0,0 @@ -/** - * @author Cliff Hall - * - * @class AppEvents - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ name: 'todomvc.view.event.AppEvents' }, {}, - // STATIC MEMBERS - { - // Event name constants - TOGGLE_COMPLETE_ALL: 'toggle_complete_all', - TOGGLE_COMPLETE: 'toggle_complete', - CLEAR_COMPLETED: 'clear_completed', - DELETE_ITEM: 'delete_item', - UPDATE_ITEM: 'update_item', - ADD_ITEM: 'add_item', - - // Create event (cross-browser) - createEvent: function( eventName ) { - var event; - if ( document.createEvent ) { - event = document.createEvent( 'Events' ); - event.initEvent( eventName, false, false ); - } else if ( document.createEventObject ) { - event = document.createEventObject(); - } - return event; - }, - - // Add event listener (cross-browser) - addEventListener: function( object, type, listener, useCapture ) { - if ( object.addEventListener ) { - object.addEventListener( type, listener, useCapture ); - } else if ( object.attachEvent ) { - object.attachEvent( type, listener ); - } - }, - - // Dispatch event (cross-browser) - dispatchEvent: function( object, event ) { - if ( object.dispatchEvent ) { - object.dispatchEvent( event ); - } else if ( object.fireEvent ) { - object.fireEvent( event.type, event ); - } - }, - } -); diff --git a/examples/puremvc/js/view/mediator/RoutesMediator.js b/examples/puremvc/js/view/mediator/RoutesMediator.js deleted file mode 100644 index 03cbb8e2b0..0000000000 --- a/examples/puremvc/js/view/mediator/RoutesMediator.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * @author Cliff Hall - * - * @class RoutesMediator - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.view.mediator.RoutesMediator', - parent: puremvc.Mediator - }, - - // INSTANCE MEMBERS - { - // the router (Flatirion Director) - router: null, - - // setup the routes when mediator is registered - onRegister: function() { - - var todoProxy = this.facade.retrieveProxy( todomvc.model.proxy.TodoProxy.NAME ), - defaultRoute = this.getRouteForFilter( todoProxy.filter ), - options = { resource:this, notfound:this.handleFilterAll }, - routes = { - '/': this.handleFilterAll, - '/active': this.handleFilterActive, - '/completed': this.handleFilterCompleted - }; - - this.router = new Router( routes ).configure( options ); - this.router.init( defaultRoute ); - }, - - getRouteForFilter: function( filter ) { - var route; - switch (filter) { - case todomvc.AppConstants.FILTER_ALL: - route = '/'; - break; - - case todomvc.AppConstants.FILTER_ACTIVE: - route = '/active'; - break; - - case todomvc.AppConstants.FILTER_COMPLETED: - route = '/completed'; - break; - } - return route; - }, - - // route handlers - handleFilterAll: function () { - this.resource.facade.sendNotification( todomvc.AppConstants.FILTER_TODOS, todomvc.AppConstants.FILTER_ALL ); - }, - - handleFilterActive: function () { - this.resource.facade.sendNotification( todomvc.AppConstants.FILTER_TODOS, todomvc.AppConstants.FILTER_ACTIVE ); - }, - - handleFilterCompleted: function () { - this.resource.facade.sendNotification( todomvc.AppConstants.FILTER_TODOS, todomvc.AppConstants.FILTER_COMPLETED ); - }, - - }, - - // STATIC MEMBERS - { - NAME: 'RoutesMediator' - } -); diff --git a/examples/puremvc/js/view/mediator/TodoFormMediator.js b/examples/puremvc/js/view/mediator/TodoFormMediator.js deleted file mode 100644 index 1f4d449d83..0000000000 --- a/examples/puremvc/js/view/mediator/TodoFormMediator.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @author Mike Britton - * - * @class TodoFormMediator - * @link https://github.com/PureMVC/puremvc-js-demo-todomvc.git - */ -puremvc.define({ - name: 'todomvc.view.mediator.TodoFormMediator', - parent: puremvc.Mediator - }, - - // INSTANCE MEMBERS - { - // Notifications this mediator is interested in - listNotificationInterests: function() { - return [ todomvc.AppConstants.TODOS_FILTERED ]; - }, - - // Code to be executed when the Mediator instance is registered with the View - onRegister: function() { - this.setViewComponent( new todomvc.view.component.TodoForm ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.TOGGLE_COMPLETE, this ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.TOGGLE_COMPLETE_ALL, this ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.UPDATE_ITEM, this ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.DELETE_ITEM, this ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.ADD_ITEM, this ); - this.viewComponent.addEventListener( todomvc.view.event.AppEvents.CLEAR_COMPLETED, this ); - }, - - // Handle events from the view component - handleEvent: function ( event ) { - switch( event.type ) { - case todomvc.view.event.AppEvents.TOGGLE_COMPLETE_ALL: - this.sendNotification( todomvc.AppConstants.TOGGLE_TODO_STATUS, event.doToggleComplete ); - break; - - case todomvc.view.event.AppEvents.DELETE_ITEM: - this.sendNotification( todomvc.AppConstants.DELETE_TODO, event.todoId ); - break; - - case todomvc.view.event.AppEvents.ADD_ITEM: - this.sendNotification( todomvc.AppConstants.ADD_TODO, event.todo ); - break; - - case todomvc.view.event.AppEvents.CLEAR_COMPLETED: - this.sendNotification( todomvc.AppConstants.REMOVE_TODOS_COMPLETED ); - break; - - case todomvc.view.event.AppEvents.TOGGLE_COMPLETE: - case todomvc.view.event.AppEvents.UPDATE_ITEM: - this.sendNotification( todomvc.AppConstants.UPDATE_TODO, event.todo ); - break; - } - - }, - - // Handle notifications from other PureMVC actors - handleNotification: function( note ) { - switch ( note.getName() ) { - case todomvc.AppConstants.TODOS_FILTERED: - this.viewComponent.setFilteredTodoList( note.getBody() ); - break; - } - }, - }, - - // STATIC MEMBERS - { - NAME: 'TodoFormMediator' - } -); diff --git a/examples/puremvc/node_modules/director/build/director.js b/examples/puremvc/node_modules/director/build/director.js deleted file mode 100644 index 1038878723..0000000000 --- a/examples/puremvc/node_modules/director/build/director.js +++ /dev/null @@ -1,725 +0,0 @@ - - -// -// Generated on Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon). -// Version 1.2.6 -// - -(function (exports) { - -/* - * browser.js: Browser specific functionality for director. - * - * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. - * MIT LICENSE - * - */ - -var dloc = document.location; - -function dlocHashEmpty() { - // Non-IE browsers return '' when the address bar shows '#'; Director's logic - // assumes both mean empty. - return dloc.hash === '' || dloc.hash === '#'; -} - -var listener = { - mode: 'modern', - hash: dloc.hash, - history: false, - - check: function () { - var h = dloc.hash; - if (h != this.hash) { - this.hash = h; - this.onHashChanged(); - } - }, - - fire: function () { - if (this.mode === 'modern') { - this.history === true ? window.onpopstate() : window.onhashchange(); - } - else { - this.onHashChanged(); - } - }, - - init: function (fn, history) { - var self = this; - this.history = history; - - if (!Router.listeners) { - Router.listeners = []; - } - - function onchange(onChangeEvent) { - for (var i = 0, l = Router.listeners.length; i < l; i++) { - Router.listeners[i](onChangeEvent); - } - } - - //note IE8 is being counted as 'modern' because it has the hashchange event - if ('onhashchange' in window && (document.documentMode === undefined - || document.documentMode > 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write(" - - - - diff --git a/examples/rappidjs/node_modules/todomvc-app-css/index.css b/examples/rappidjs/node_modules/todomvc-app-css/index.css deleted file mode 100644 index d8be205ad4..0000000000 --- a/examples/rappidjs/node_modules/todomvc-app-css/index.css +++ /dev/null @@ -1,376 +0,0 @@ -html, -body { - margin: 0; - padding: 0; -} - -button { - margin: 0; - padding: 0; - border: 0; - background: none; - font-size: 100%; - vertical-align: baseline; - font-family: inherit; - font-weight: inherit; - color: inherit; - -webkit-appearance: none; - appearance: none; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -body { - font: 14px 'Helvetica Neue', Helvetica, Arial, sans-serif; - line-height: 1.4em; - background: #f5f5f5; - color: #4d4d4d; - min-width: 230px; - max-width: 550px; - margin: 0 auto; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - font-weight: 300; -} - -:focus { - outline: 0; -} - -.hidden { - display: none; -} - -.todoapp { - background: #fff; - margin: 130px 0 40px 0; - position: relative; - box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), - 0 25px 50px 0 rgba(0, 0, 0, 0.1); -} - -.todoapp input::-webkit-input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::-moz-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp input::input-placeholder { - font-style: italic; - font-weight: 300; - color: #e6e6e6; -} - -.todoapp h1 { - position: absolute; - top: -155px; - width: 100%; - font-size: 100px; - font-weight: 100; - text-align: center; - color: rgba(175, 47, 47, 0.15); - -webkit-text-rendering: optimizeLegibility; - -moz-text-rendering: optimizeLegibility; - text-rendering: optimizeLegibility; -} - -.new-todo, -.edit { - position: relative; - margin: 0; - width: 100%; - font-size: 24px; - font-family: inherit; - font-weight: inherit; - line-height: 1.4em; - border: 0; - color: inherit; - padding: 6px; - border: 1px solid #999; - box-shadow: inset 0 -1px 5px 0 rgba(0, 0, 0, 0.2); - box-sizing: border-box; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} - -.new-todo { - padding: 16px 16px 16px 60px; - border: none; - background: rgba(0, 0, 0, 0.003); - box-shadow: inset 0 -2px 1px rgba(0,0,0,0.03); -} - -.main { - position: relative; - z-index: 2; - border-top: 1px solid #e6e6e6; -} - -.toggle-all { - text-align: center; - border: none; /* Mobile Safari */ - opacity: 0; - position: absolute; -} - -.toggle-all + label { - width: 60px; - height: 34px; - font-size: 0; - position: absolute; - top: -52px; - left: -13px; - -webkit-transform: rotate(90deg); - transform: rotate(90deg); -} - -.toggle-all + label:before { - content: '❯'; - font-size: 22px; - color: #e6e6e6; - padding: 10px 27px 10px 27px; -} - -.toggle-all:checked + label:before { - color: #737373; -} - -.todo-list { - margin: 0; - padding: 0; - list-style: none; -} - -.todo-list li { - position: relative; - font-size: 24px; - border-bottom: 1px solid #ededed; -} - -.todo-list li:last-child { - border-bottom: none; -} - -.todo-list li.editing { - border-bottom: none; - padding: 0; -} - -.todo-list li.editing .edit { - display: block; - width: 506px; - padding: 12px 16px; - margin: 0 0 0 43px; -} - -.todo-list li.editing .view { - display: none; -} - -.todo-list li .toggle { - text-align: center; - width: 40px; - /* auto, since non-WebKit browsers doesn't support input styling */ - height: auto; - position: absolute; - top: 0; - bottom: 0; - margin: auto 0; - border: none; /* Mobile Safari */ - -webkit-appearance: none; - appearance: none; -} - -.todo-list li .toggle { - opacity: 0; -} - -.todo-list li .toggle + label { - /* - Firefox requires `#` to be escaped - https://bugzilla.mozilla.org/show_bug.cgi?id=922433 - IE and Edge requires *everything* to be escaped to render, so we do that instead of just the `#` - https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/7157459/ - */ - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23ededed%22%20stroke-width%3D%223%22/%3E%3C/svg%3E'); - background-repeat: no-repeat; - background-position: center left; -} - -.todo-list li .toggle:checked + label { - background-image: url('data:image/svg+xml;utf8,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2240%22%20height%3D%2240%22%20viewBox%3D%22-10%20-18%20100%20135%22%3E%3Ccircle%20cx%3D%2250%22%20cy%3D%2250%22%20r%3D%2250%22%20fill%3D%22none%22%20stroke%3D%22%23bddad5%22%20stroke-width%3D%223%22/%3E%3Cpath%20fill%3D%22%235dc2af%22%20d%3D%22M72%2025L42%2071%2027%2056l-4%204%2020%2020%2034-52z%22/%3E%3C/svg%3E'); -} - -.todo-list li label { - word-break: break-all; - padding: 15px 15px 15px 60px; - display: block; - line-height: 1.2; - transition: color 0.4s; -} - -.todo-list li.completed label { - color: #d9d9d9; - text-decoration: line-through; -} - -.todo-list li .destroy { - display: none; - position: absolute; - top: 0; - right: 10px; - bottom: 0; - width: 40px; - height: 40px; - margin: auto 0; - font-size: 30px; - color: #cc9a9a; - margin-bottom: 11px; - transition: color 0.2s ease-out; -} - -.todo-list li .destroy:hover { - color: #af5b5e; -} - -.todo-list li .destroy:after { - content: '×'; -} - -.todo-list li:hover .destroy { - display: block; -} - -.todo-list li .edit { - display: none; -} - -.todo-list li.editing:last-child { - margin-bottom: -1px; -} - -.footer { - color: #777; - padding: 10px 15px; - height: 20px; - text-align: center; - border-top: 1px solid #e6e6e6; -} - -.footer:before { - content: ''; - position: absolute; - right: 0; - bottom: 0; - left: 0; - height: 50px; - overflow: hidden; - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2), - 0 8px 0 -3px #f6f6f6, - 0 9px 1px -3px rgba(0, 0, 0, 0.2), - 0 16px 0 -6px #f6f6f6, - 0 17px 2px -6px rgba(0, 0, 0, 0.2); -} - -.todo-count { - float: left; - text-align: left; -} - -.todo-count strong { - font-weight: 300; -} - -.filters { - margin: 0; - padding: 0; - list-style: none; - position: absolute; - right: 0; - left: 0; -} - -.filters li { - display: inline; -} - -.filters li a { - color: inherit; - margin: 3px; - padding: 3px 7px; - text-decoration: none; - border: 1px solid transparent; - border-radius: 3px; -} - -.filters li a:hover { - border-color: rgba(175, 47, 47, 0.1); -} - -.filters li a.selected { - border-color: rgba(175, 47, 47, 0.2); -} - -.clear-completed, -html .clear-completed:active { - float: right; - position: relative; - line-height: 20px; - text-decoration: none; - cursor: pointer; -} - -.clear-completed:hover { - text-decoration: underline; -} - -.info { - margin: 65px auto 0; - color: #bfbfbf; - font-size: 10px; - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); - text-align: center; -} - -.info p { - line-height: 1; -} - -.info a { - color: inherit; - text-decoration: none; - font-weight: 400; -} - -.info a:hover { - text-decoration: underline; -} - -/* - Hack to remove background from Mobile Safari. - Can't use it globally since it destroys checkboxes in Firefox -*/ -@media screen and (-webkit-min-device-pixel-ratio:0) { - .toggle-all, - .todo-list li .toggle { - background: none; - } - - .todo-list li .toggle { - height: 40px; - } -} - -@media (max-width: 430px) { - .footer { - height: 50px; - } - - .filters { - bottom: 10px; - } -} diff --git a/examples/rappidjs/node_modules/todomvc-common/base.css b/examples/rappidjs/node_modules/todomvc-common/base.css deleted file mode 100644 index da65968a73..0000000000 --- a/examples/rappidjs/node_modules/todomvc-common/base.css +++ /dev/null @@ -1,141 +0,0 @@ -hr { - margin: 20px 0; - border: 0; - border-top: 1px dashed #c5c5c5; - border-bottom: 1px dashed #f7f7f7; -} - -.learn a { - font-weight: normal; - text-decoration: none; - color: #b83f45; -} - -.learn a:hover { - text-decoration: underline; - color: #787e7e; -} - -.learn h3, -.learn h4, -.learn h5 { - margin: 10px 0; - font-weight: 500; - line-height: 1.2; - color: #000; -} - -.learn h3 { - font-size: 24px; -} - -.learn h4 { - font-size: 18px; -} - -.learn h5 { - margin-bottom: 0; - font-size: 14px; -} - -.learn ul { - padding: 0; - margin: 0 0 30px 25px; -} - -.learn li { - line-height: 20px; -} - -.learn p { - font-size: 15px; - font-weight: 300; - line-height: 1.3; - margin-top: 0; - margin-bottom: 0; -} - -#issue-count { - display: none; -} - -.quote { - border: none; - margin: 20px 0 60px 0; -} - -.quote p { - font-style: italic; -} - -.quote p:before { - content: '“'; - font-size: 50px; - opacity: .15; - position: absolute; - top: -20px; - left: 3px; -} - -.quote p:after { - content: '”'; - font-size: 50px; - opacity: .15; - position: absolute; - bottom: -42px; - right: 3px; -} - -.quote footer { - position: absolute; - bottom: -40px; - right: 0; -} - -.quote footer img { - border-radius: 3px; -} - -.quote footer a { - margin-left: 5px; - vertical-align: middle; -} - -.speech-bubble { - position: relative; - padding: 10px; - background: rgba(0, 0, 0, .04); - border-radius: 5px; -} - -.speech-bubble:after { - content: ''; - position: absolute; - top: 100%; - right: 30px; - border: 13px solid transparent; - border-top-color: rgba(0, 0, 0, .04); -} - -.learn-bar > .learn { - position: absolute; - width: 272px; - top: 8px; - left: -300px; - padding: 10px; - border-radius: 5px; - background-color: rgba(255, 255, 255, .6); - transition-property: left; - transition-duration: 500ms; -} - -@media (min-width: 899px) { - .learn-bar { - width: auto; - padding-left: 300px; - } - - .learn-bar > .learn { - left: 8px; - } -} diff --git a/examples/rappidjs/node_modules/todomvc-common/base.js b/examples/rappidjs/node_modules/todomvc-common/base.js deleted file mode 100644 index 44fb50c613..0000000000 --- a/examples/rappidjs/node_modules/todomvc-common/base.js +++ /dev/null @@ -1,244 +0,0 @@ -/* global _ */ -(function () { - 'use strict'; - - /* jshint ignore:start */ - // Underscore's Template Module - // Courtesy of underscorejs.org - var _ = (function (_) { - _.defaults = function (object) { - if (!object) { - return object; - } - for (var argsIndex = 1, argsLength = arguments.length; argsIndex < argsLength; argsIndex++) { - var iterable = arguments[argsIndex]; - if (iterable) { - for (var key in iterable) { - if (object[key] == null) { - object[key] = iterable[key]; - } - } - } - } - return object; - } - - // By default, Underscore uses ERB-style template delimiters, change the - // following template settings to use alternative delimiters. - _.templateSettings = { - evaluate : /<%([\s\S]+?)%>/g, - interpolate : /<%=([\s\S]+?)%>/g, - escape : /<%-([\s\S]+?)%>/g - }; - - // When customizing `templateSettings`, if you don't want to define an - // interpolation, evaluation or escaping regex, we need one that is - // guaranteed not to match. - var noMatch = /(.)^/; - - // Certain characters need to be escaped so that they can be put into a - // string literal. - var escapes = { - "'": "'", - '\\': '\\', - '\r': 'r', - '\n': 'n', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g; - - // JavaScript micro-templating, similar to John Resig's implementation. - // Underscore templating handles arbitrary delimiters, preserves whitespace, - // and correctly escapes quotes within interpolated code. - _.template = function(text, data, settings) { - var render; - settings = _.defaults({}, settings, _.templateSettings); - - // Combine delimiters into one regular expression via alternation. - var matcher = new RegExp([ - (settings.escape || noMatch).source, - (settings.interpolate || noMatch).source, - (settings.evaluate || noMatch).source - ].join('|') + '|$', 'g'); - - // Compile the template source, escaping string literals appropriately. - var index = 0; - var source = "__p+='"; - text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { - source += text.slice(index, offset) - .replace(escaper, function(match) { return '\\' + escapes[match]; }); - - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } - if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } - if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } - index = offset + match.length; - return match; - }); - source += "';\n"; - - // If a variable is not specified, place data values in local scope. - if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n'; - - source = "var __t,__p='',__j=Array.prototype.join," + - "print=function(){__p+=__j.call(arguments,'');};\n" + - source + "return __p;\n"; - - try { - render = new Function(settings.variable || 'obj', '_', source); - } catch (e) { - e.source = source; - throw e; - } - - if (data) return render(data, _); - var template = function(data) { - return render.call(this, data, _); - }; - - // Provide the compiled function source as a convenience for precompilation. - template.source = 'function(' + (settings.variable || 'obj') + '){\n' + source + '}'; - - return template; - }; - - return _; - })({}); - - if (location.hostname === 'todomvc.com') { - window._gaq = [['_setAccount','UA-31081062-1'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)}(document,'script')); - } - /* jshint ignore:end */ - - function redirect() { - if (location.hostname === 'tastejs.github.io') { - location.href = location.href.replace('tastejs.github.io/todomvc', 'todomvc.com'); - } - } - - function findRoot() { - var base = location.href.indexOf('examples/'); - return location.href.substr(0, base); - } - - function getFile(file, callback) { - if (!location.host) { - return console.info('Miss the info bar? Run TodoMVC from a server to avoid a cross-origin error.'); - } - - var xhr = new XMLHttpRequest(); - - xhr.open('GET', findRoot() + file, true); - xhr.send(); - - xhr.onload = function () { - if (xhr.status === 200 && callback) { - callback(xhr.responseText); - } - }; - } - - function Learn(learnJSON, config) { - if (!(this instanceof Learn)) { - return new Learn(learnJSON, config); - } - - var template, framework; - - if (typeof learnJSON !== 'object') { - try { - learnJSON = JSON.parse(learnJSON); - } catch (e) { - return; - } - } - - if (config) { - template = config.template; - framework = config.framework; - } - - if (!template && learnJSON.templates) { - template = learnJSON.templates.todomvc; - } - - if (!framework && document.querySelector('[data-framework]')) { - framework = document.querySelector('[data-framework]').dataset.framework; - } - - this.template = template; - - if (learnJSON.backend) { - this.frameworkJSON = learnJSON.backend; - this.frameworkJSON.issueLabel = framework; - this.append({ - backend: true - }); - } else if (learnJSON[framework]) { - this.frameworkJSON = learnJSON[framework]; - this.frameworkJSON.issueLabel = framework; - this.append(); - } - - this.fetchIssueCount(); - } - - Learn.prototype.append = function (opts) { - var aside = document.createElement('aside'); - aside.innerHTML = _.template(this.template, this.frameworkJSON); - aside.className = 'learn'; - - if (opts && opts.backend) { - // Remove demo link - var sourceLinks = aside.querySelector('.source-links'); - var heading = sourceLinks.firstElementChild; - var sourceLink = sourceLinks.lastElementChild; - // Correct link path - var href = sourceLink.getAttribute('href'); - sourceLink.setAttribute('href', href.substr(href.lastIndexOf('http'))); - sourceLinks.innerHTML = heading.outerHTML + sourceLink.outerHTML; - } else { - // Localize demo links - var demoLinks = aside.querySelectorAll('.demo-link'); - Array.prototype.forEach.call(demoLinks, function (demoLink) { - if (demoLink.getAttribute('href').substr(0, 4) !== 'http') { - demoLink.setAttribute('href', findRoot() + demoLink.getAttribute('href')); - } - }); - } - - document.body.className = (document.body.className + ' learn-bar').trim(); - document.body.insertAdjacentHTML('afterBegin', aside.outerHTML); - }; - - Learn.prototype.fetchIssueCount = function () { - var issueLink = document.getElementById('issue-count-link'); - if (issueLink) { - var url = issueLink.href.replace('https://github.com', 'https://api.github.com/repos'); - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onload = function (e) { - var parsedResponse = JSON.parse(e.target.responseText); - if (parsedResponse instanceof Array) { - var count = parsedResponse.length - if (count !== 0) { - issueLink.innerHTML = 'This app has ' + count + ' open issues'; - document.getElementById('issue-count').style.display = 'inline'; - } - } - }; - xhr.send(); - } - }; - - redirect(); - getFile('learn.json', Learn); -})(); diff --git a/examples/rappidjs/package.json b/examples/rappidjs/package.json deleted file mode 100644 index 24169e19f1..0000000000 --- a/examples/rappidjs/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "private": true, - "dependencies": { - "todomvc-app-css": "^2.1.0", - "todomvc-common": "^1.0.1" - } -} diff --git a/examples/rappidjs/readme.md b/examples/rappidjs/readme.md deleted file mode 100644 index ed93171d45..0000000000 --- a/examples/rappidjs/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# rAppid.js TodoMVC Example - -> The declarative Rich Internet Application Javascript MVC Framework. - -> _[rAppid.js - rappidjs.com](http://rappidjs.com)_ - - -## Learning rAppid.js - -The [rAppid.js website](http://rappidjs.com) is a great resource for getting started. - -Here are some links you may find helpful: - -* [API Reference](http://www.rappidjs.com/#/api) -* [Wiki](http://www.rappidjs.com/#/wiki) -* [UI Components](http://www.rappidjs.com/#/ui) -* [Blog](http://blog.rappidjs.com) -* [rAppid.js on GitHub](https://github.com/rappid/rAppid.js) - -Get help from other rAppid.js users: - -* [rAppid.js on Twitter](http://twitter.com/rappidjs) - -_If you have other helpful links to share, or find any of the links above no longer work, please [let us know](https://github.com/tastejs/todomvc/issues)._ diff --git a/examples/serenadejs/.gitignore b/examples/serenadejs/.gitignore deleted file mode 100644 index 3f1de080b1..0000000000 --- a/examples/serenadejs/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -node_modules/todomvc-app-css/* -!node_modules/todomvc-app-css/index.css - -node_modules/todomvc-common/* -!node_modules/todomvc-common/base.js -!node_modules/todomvc-common/base.css - -node_modules/director/** -!node_modules/director/build/director.js diff --git a/examples/serenadejs/index.html b/examples/serenadejs/index.html deleted file mode 100755 index a1b02db25f..0000000000 --- a/examples/serenadejs/index.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Serenade.js • TodoMVC - - - - - - - - -
            -

            Double-click to edit a todo

            -

            Created by Elabs

            -

            Part of TodoMVC

            -
            - - - - - - - diff --git a/examples/serenadejs/js/app.coffee b/examples/serenadejs/js/app.coffee deleted file mode 100644 index f4846f9860..0000000000 --- a/examples/serenadejs/js/app.coffee +++ /dev/null @@ -1,82 +0,0 @@ -class Todo extends Serenade.Model - @belongsTo 'app', inverseOf: 'all', as: -> App - @property 'title', serialize: true - - @property 'completed', serialize: true - @property 'incomplete', - get: -> not @completed - - @property 'edit' - - remove: -> - @app.all.delete(this) - -class App extends Serenade.Model - @hasMany 'all', inverseOf: 'app', serialize: true, as: -> Todo - - @selection 'active', from: 'all', filter: 'incomplete' - @selection 'completed', from: 'all', filter: 'completed' - - @property 'label', - get: -> if @activeCount is 1 then 'item left' else 'items left' - - @property 'allCompleted', - get: -> @activeCount is 0 - set: (value) -> todo.completed = value for todo in @all - - @property 'newTitle' - - @property 'filter', value: 'all' - @property 'filtered', get: -> @[@filter] - - @property 'filterAll', get: -> @filter is 'all' - @property 'filterActive', get: -> @filter is 'active' - @property 'filterCompleted', get: -> @filter is 'completed' - -class AppController - constructor: (@app) -> - - newTodo: -> - title = @app.newTitle.trim() - @app.all.push(title: title) if title - @app.newTitle = '' - - clearCompleted: -> - @app.all = @app.active - -class TodoController - constructor: (@todo) -> - - removeTodo: -> - @todo.remove() - - edit: -> - @todo.edit = true - @field.select() - - edited: -> - if @todo.title.trim() - @todo.title = @todo.title.trim() - @todo.edit = false if @todo.edit - else - @todo.remove() - @todo.app.changed.trigger() - - loadField: (@field) -> - -app = new App(JSON.parse(localStorage.getItem('todos-serenade'))) -app.changed.bind -> localStorage.setItem('todos-serenade', app) - -router = Router - '/': -> app.filter = 'all' - '/active': -> app.filter = 'active' - '/completed': -> app.filter = 'completed' - -router.init() - -Serenade.view('app', document.getElementById('app').innerHTML) -Serenade.view('todo', document.getElementById('todo').innerHTML) -Serenade.controller('app', AppController) -Serenade.controller('todo', TodoController) - -document.body.insertBefore(Serenade.render('app', app), document.body.children[0]) diff --git a/examples/serenadejs/js/app.js b/examples/serenadejs/js/app.js deleted file mode 100755 index 3c056af634..0000000000 --- a/examples/serenadejs/js/app.js +++ /dev/null @@ -1,220 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var App, AppController, Todo, TodoController, app, router, _ref, _ref1, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; - - Todo = (function(_super) { - __extends(Todo, _super); - - function Todo() { - _ref = Todo.__super__.constructor.apply(this, arguments); - return _ref; - } - - Todo.belongsTo('app', { - inverseOf: 'all', - as: function() { - return App; - } - }); - - Todo.property('title', { - serialize: true - }); - - Todo.property('completed', { - serialize: true - }); - - Todo.property('incomplete', { - get: function() { - return !this.completed; - } - }); - - Todo.property('edit'); - - Todo.prototype.remove = function() { - return this.app.all["delete"](this); - }; - - return Todo; - - })(Serenade.Model); - - App = (function(_super) { - __extends(App, _super); - - function App() { - _ref1 = App.__super__.constructor.apply(this, arguments); - return _ref1; - } - - App.hasMany('all', { - inverseOf: 'app', - serialize: true, - as: function() { - return Todo; - } - }); - - App.selection('active', { - from: 'all', - filter: 'incomplete' - }); - - App.selection('completed', { - from: 'all', - filter: 'completed' - }); - - App.property('label', { - get: function() { - if (this.activeCount === 1) { - return 'item left'; - } else { - return 'items left'; - } - } - }); - - App.property('allCompleted', { - get: function() { - return this.activeCount === 0; - }, - set: function(value) { - var todo, _i, _len, _ref2, _results; - _ref2 = this.all; - _results = []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - todo = _ref2[_i]; - _results.push(todo.completed = value); - } - return _results; - } - }); - - App.property('newTitle'); - - App.property('filter', { - value: 'all' - }); - - App.property('filtered', { - get: function() { - return this[this.filter]; - } - }); - - App.property('filterAll', { - get: function() { - return this.filter === 'all'; - } - }); - - App.property('filterActive', { - get: function() { - return this.filter === 'active'; - } - }); - - App.property('filterCompleted', { - get: function() { - return this.filter === 'completed'; - } - }); - - return App; - - })(Serenade.Model); - - AppController = (function() { - function AppController(app) { - this.app = app; - } - - AppController.prototype.newTodo = function() { - var title; - title = this.app.newTitle.trim(); - if (title) { - this.app.all.push({ - title: title - }); - } - return this.app.newTitle = ''; - }; - - AppController.prototype.clearCompleted = function() { - return this.app.all = this.app.active; - }; - - return AppController; - - })(); - - TodoController = (function() { - function TodoController(todo) { - this.todo = todo; - } - - TodoController.prototype.removeTodo = function() { - return this.todo.remove(); - }; - - TodoController.prototype.edit = function() { - this.todo.edit = true; - return this.field.select(); - }; - - TodoController.prototype.edited = function() { - if (this.todo.title.trim()) { - this.todo.title = this.todo.title.trim(); - if (this.todo.edit) { - this.todo.edit = false; - } - } else { - this.todo.remove(); - } - return this.todo.app.changed.trigger(); - }; - - TodoController.prototype.loadField = function(field) { - this.field = field; - }; - - return TodoController; - - })(); - - app = new App(JSON.parse(localStorage.getItem('todos-serenade'))); - - app.changed.bind(function() { - return localStorage.setItem('todos-serenade', app); - }); - - router = Router({ - '/': function() { - return app.filter = 'all'; - }, - '/active': function() { - return app.filter = 'active'; - }, - '/completed': function() { - return app.filter = 'completed'; - } - }); - - router.init(); - - Serenade.view('app', document.getElementById('app').innerHTML); - - Serenade.view('todo', document.getElementById('todo').innerHTML); - - Serenade.controller('app', AppController); - - Serenade.controller('todo', TodoController); - - document.body.insertBefore(Serenade.render('app', app), document.body.children[0]); - -}).call(this); diff --git a/examples/serenadejs/js/lib/serenade.js b/examples/serenadejs/js/lib/serenade.js deleted file mode 100644 index 915da9bb80..0000000000 --- a/examples/serenadejs/js/lib/serenade.js +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Serenade.js JavaScript Framework v0.4.1 - * Revision: ae7d321b18 - * http://github.com/elabs/serenade.js - * - * Copyright 2011, Jonas Nicklas, Elabs AB - * Released under the MIT License - */ -(function(e){var t=function(){function t(){this.yy={}}var e={trace:function(){},yy:{},symbols_:{error:2,Root:3,ChildList:4,ElementIdentifier:5,AnyIdentifier:6,"#":7,".":8,Element:9,"[":10,"]":11,PropertyList:12,WHITESPACE:13,Text:14,INDENT:15,OUTDENT:16,TextList:17,Bound:18,STRING_LITERAL:19,Child:20,TERMINATOR:21,IfInstruction:22,Instruction:23,Helper:24,Property:25,"=":26,"!":27,":":28,"-":29,VIEW:30,COLLECTION:31,UNLESS:32,IN:33,IDENTIFIER:34,IF:35,ElseInstruction:36,ELSE:37,"@":38,$accept:0,$end:1},terminals_:{2:"error",7:"#",8:".",10:"[",11:"]",13:"WHITESPACE",15:"INDENT",16:"OUTDENT",19:"STRING_LITERAL",21:"TERMINATOR",26:"=",27:"!",28:":",29:"-",30:"VIEW",31:"COLLECTION",32:"UNLESS",33:"IN",34:"IDENTIFIER",35:"IF",37:"ELSE",38:"@"},productions_:[0,[3,0],[3,1],[5,1],[5,3],[5,2],[5,2],[5,3],[9,1],[9,3],[9,4],[9,3],[9,4],[17,1],[17,3],[14,1],[14,1],[4,1],[4,3],[20,1],[20,1],[20,1],[20,1],[20,1],[12,1],[12,3],[25,3],[25,3],[25,4],[25,4],[25,3],[25,3],[23,5],[23,5],[23,5],[23,5],[23,4],[24,3],[24,3],[24,4],[22,5],[22,4],[22,2],[36,6],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[18,2],[18,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:this.$=null;break;case 2:return this.$;case 3:this.$={name:o[a],classes:[]};break;case 4:this.$={name:o[a-2],id:o[a],classes:[]};break;case 5:this.$={name:"div",id:o[a],classes:[]};break;case 6:this.$={name:"div",classes:[o[a]]};break;case 7:this.$=function(){return o[a-2].classes.push(o[a]),o[a-2]}();break;case 8:this.$={name:o[a].name,id:o[a].id,classes:o[a].classes,properties:[],children:[],type:"element"};break;case 9:this.$=o[a-2];break;case 10:this.$=function(){return o[a-3].properties=o[a-1],o[a-3]}();break;case 11:this.$=function(){return o[a-2].children=o[a-2].children.concat(o[a]),o[a-2]}();break;case 12:this.$=function(){return o[a-3].children=o[a-3].children.concat(o[a-1]),o[a-3]}();break;case 13:this.$=[o[a]];break;case 14:this.$=o[a-2].concat(o[a]);break;case 15:this.$={type:"text",value:o[a],bound:!0};break;case 16:this.$={type:"text",value:o[a],bound:!1};break;case 17:this.$=[].concat(o[a]);break;case 18:this.$=o[a-2].concat(o[a]);break;case 19:this.$=o[a];break;case 20:this.$=o[a];break;case 21:this.$=o[a];break;case 22:this.$=o[a];break;case 23:this.$=o[a];break;case 24:this.$=[o[a]];break;case 25:this.$=o[a-2].concat(o[a]);break;case 26:this.$={name:o[a-2],value:o[a],bound:!0,scope:"attribute"};break;case 27:this.$={name:o[a-2],value:o[a],bound:!0,scope:"attribute"};break;case 28:this.$={name:o[a-3],value:o[a-1],bound:!0,scope:"attribute",preventDefault:!0};break;case 29:this.$={name:o[a-3],value:o[a-1],bound:!0,scope:"attribute",preventDefault:!0};break;case 30:this.$={name:o[a-2],value:o[a],bound:!1,scope:"attribute"};break;case 31:this.$=function(){return o[a].scope=o[a-2],o[a]}();break;case 32:this.$={children:[],type:"view",argument:o[a]};break;case 33:this.$={children:[],type:"collection",argument:o[a]};break;case 34:this.$={children:[],type:"unless",argument:o[a]};break;case 35:this.$={children:[],type:"in",argument:o[a]};break;case 36:this.$=function(){return o[a-3].children=o[a-1],o[a-3]}();break;case 37:this.$={command:o[a],arguments:[],children:[],type:"helper"};break;case 38:this.$=function(){return o[a-2].arguments.push(o[a]),o[a-2]}();break;case 39:this.$=function(){return o[a-3].children=o[a-1],o[a-3]}();break;case 40:this.$={children:[],type:"if",argument:o[a]};break;case 41:this.$=function(){return o[a-3].children=o[a-1],o[a-3]}();break;case 42:this.$=function(){return o[a-1]["else"]=o[a],o[a-1]}();break;case 43:this.$={arguments:[],children:o[a-1],type:"else"};break;case 44:this.$=o[a];break;case 45:this.$=o[a];break;case 46:this.$=o[a];break;case 47:this.$=o[a];break;case 48:this.$=o[a];break;case 49:this.$=o[a];break;case 50:this.$=o[a];break;case 51:this.$=function(){}()}},table:[{1:[2,1],3:1,4:2,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{1:[3]},{1:[2,2],21:[1,24]},{1:[2,17],16:[2,17],21:[2,17]},{1:[2,19],10:[1,25],13:[1,26],15:[1,27],16:[2,19],21:[2,19]},{1:[2,20],15:[1,28],16:[2,20],21:[2,20],29:[1,30],36:29},{1:[2,21],15:[1,31],16:[2,21],21:[2,21]},{1:[2,22],13:[1,32],15:[1,33],16:[2,22],21:[2,22]},{1:[2,23],13:[1,34],16:[2,23],21:[2,23]},{1:[2,8],8:[1,35],10:[2,8],13:[2,8],15:[2,8],16:[2,8],21:[2,8]},{13:[1,36]},{1:[2,13],13:[2,13],16:[2,13],21:[2,13]},{1:[2,3],7:[1,37],8:[2,3],10:[2,3],13:[2,3],15:[2,3],16:[2,3],21:[2,3]},{6:38,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{6:39,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{1:[2,15],10:[2,15],13:[2,15],15:[2,15],16:[2,15],21:[2,15]},{1:[2,16],10:[2,16],13:[2,16],15:[2,16],16:[2,16],21:[2,16]},{1:[2,44],7:[2,44],8:[2,44],10:[2,44],11:[2,44],13:[2,44],15:[2,44],16:[2,44],21:[2,44],26:[2,44],27:[2,44],28:[2,44],29:[2,44]},{1:[2,45],7:[2,45],8:[2,45],10:[2,45],11:[2,45],13:[2,45],15:[2,45],16:[2,45],21:[2,45],26:[2,45],27:[2,45],28:[2,45],29:[2,45]},{1:[2,46],7:[2,46],8:[2,46],10:[2,46],11:[2,46],13:[2,46],15:[2,46],16:[2,46],21:[2,46],26:[2,46],27:[2,46],28:[2,46],29:[2,46]},{1:[2,47],7:[2,47],8:[2,47],10:[2,47],11:[2,47],13:[2,47],15:[2,47],16:[2,47],21:[2,47],26:[2,47],27:[2,47],28:[2,47],29:[2,47]},{1:[2,48],7:[2,48],8:[2,48],10:[2,48],11:[2,48],13:[2,48],15:[2,48],16:[2,48],21:[2,48],26:[2,48],27:[2,48],28:[2,48],29:[2,48]},{1:[2,49],7:[2,49],8:[2,49],10:[2,49],11:[2,49],13:[2,49],15:[2,49],16:[2,49],21:[2,49],26:[2,49],27:[2,49],28:[2,49],29:[2,49]},{1:[2,51],6:40,10:[2,51],11:[2,51],13:[2,51],15:[2,51],16:[2,51],21:[2,51],27:[2,51],29:[2,51],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:41,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{6:45,11:[1,42],12:43,25:44,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{14:46,18:15,19:[1,16],38:[1,23]},{4:47,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{4:48,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{1:[2,42],15:[2,42],16:[2,42],21:[2,42],29:[2,42]},{13:[1,49]},{4:50,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{14:51,18:15,19:[1,16],38:[1,23]},{4:52,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{14:53,18:15,19:[1,16],38:[1,23]},{6:54,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{30:[1,56],31:[1,57],32:[1,58],33:[1,59],34:[1,60],35:[1,55]},{6:61,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{1:[2,5],8:[2,5],10:[2,5],13:[2,5],15:[2,5],16:[2,5],21:[2,5]},{1:[2,6],8:[2,6],10:[2,6],13:[2,6],15:[2,6],16:[2,6],21:[2,6]},{1:[2,50],10:[2,50],11:[2,50],13:[2,50],15:[2,50],16:[2,50],21:[2,50],27:[2,50],29:[2,50]},{1:[2,18],16:[2,18],21:[2,18]},{1:[2,9],10:[2,9],13:[2,9],15:[2,9],16:[2,9],21:[2,9]},{11:[1,62],13:[1,63]},{11:[2,24],13:[2,24]},{26:[1,64],28:[1,65]},{1:[2,11],10:[2,11],13:[2,11],15:[2,11],16:[2,11],21:[2,11]},{16:[1,66],21:[1,24]},{16:[1,67],21:[1,24]},{37:[1,68]},{16:[1,69],21:[1,24]},{1:[2,38],13:[2,38],15:[2,38],16:[2,38],21:[2,38]},{16:[1,70],21:[1,24]},{1:[2,14],13:[2,14],16:[2,14],21:[2,14]},{1:[2,7],8:[2,7],10:[2,7],13:[2,7],15:[2,7],16:[2,7],21:[2,7]},{13:[1,71]},{13:[1,72]},{13:[1,73]},{13:[1,74]},{13:[1,75]},{1:[2,37],13:[2,37],15:[2,37],16:[2,37],21:[2,37]},{1:[2,4],8:[2,4],10:[2,4],13:[2,4],15:[2,4],16:[2,4],21:[2,4]},{1:[2,10],10:[2,10],13:[2,10],15:[2,10],16:[2,10],21:[2,10]},{6:45,25:76,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{6:77,18:78,19:[1,79],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{6:45,25:80,30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19]},{1:[2,12],10:[2,12],13:[2,12],15:[2,12],16:[2,12],21:[2,12]},{1:[2,41],15:[2,41],16:[2,41],21:[2,41],29:[2,41]},{15:[1,81]},{1:[2,36],15:[2,36],16:[2,36],21:[2,36]},{1:[2,39],13:[2,39],15:[2,39],16:[2,39],21:[2,39]},{18:82,38:[1,23]},{19:[1,83]},{18:84,38:[1,23]},{18:85,38:[1,23]},{18:86,38:[1,23]},{11:[2,25],13:[2,25]},{11:[2,26],13:[2,26],27:[1,87]},{11:[2,27],13:[2,27],27:[1,88]},{11:[2,30],13:[2,30]},{11:[2,31],13:[2,31]},{4:89,5:9,6:12,7:[1,13],8:[1,14],9:4,14:11,17:8,18:15,19:[1,16],20:3,22:5,23:6,24:7,29:[1,10],30:[1,17],31:[1,18],32:[1,20],33:[1,21],34:[1,22],35:[1,19],38:[1,23]},{1:[2,40],15:[2,40],16:[2,40],21:[2,40],29:[2,40]},{1:[2,32],15:[2,32],16:[2,32],21:[2,32]},{1:[2,33],15:[2,33],16:[2,33],21:[2,33]},{1:[2,34],15:[2,34],16:[2,34],21:[2,34]},{1:[2,35],15:[2,35],16:[2,35],21:[2,35]},{11:[2,28],13:[2,28]},{11:[2,29],13:[2,29]},{16:[1,90],21:[1,24]},{1:[2,43],15:[2,43],16:[2,43],21:[2,43],29:[2,43]}],defaultActions:{},parseError:function(t,n){throw new Error(t)},parse:function(t){function v(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function m(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p);var d=this.lexer.options&&this.lexer.options.ranges;typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var g,y,b,w,E,S,x={},T,N,C,k;for(;;){b=r[r.length-1];if(this.defaultActions[b])w=this.defaultActions[b];else{if(g===null||typeof g=="undefined")g=m();w=o[b]&&o[b][g]}if(typeof w=="undefined"||!w.length||!w[0])var L="";if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(w[0]){case 1:r.push(g),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(w[1]),g=null,y?(g=y,y=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:N=this.productions_[w[1]][1],x.$=i[i.length-N],x._$={first_line:s[s.length-(N||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(N||1)].first_column,last_column:s[s.length-1].last_column},d&&(x._$.range=[s[s.length-(N||1)].range[0],s[s.length-1].range[1]]),S=this.performAction.call(x,u,f,a,this.yy,w[1],i,s);if(typeof S!="undefined")return S;N&&(r=r.slice(0,-1*N*2),i=i.slice(0,-1*N),s=s.slice(0,-1*N)),r.push(this.productions_[w[1]][0]),i.push(x.$),s.push(x._$),C=o[r[r.length-2]][r[r.length-1]],r.push(C);break;case 3:return!0}}return!0}};return t.prototype=e,e.Parser=t,new t}();typeof require!="undefined"&&typeof exports!="undefined"&&(exports.parser=t,exports.Parser=t.Parser,exports.parse=function(){return t.parse.apply(t,arguments)},exports.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");var n,r;return typeof process!="undefined"?n=require("fs").readFileSync(require("path").resolve(t[1]),"utf8"):n=require("file").path(require("file").cwd()).join(t[1]).read({charset:"utf-8"}),exports.parser.parse(n)},typeof module!="undefined"&&require.main===module&&exports.main(typeof process!="undefined"?process.argv.slice(1):require("system").args));var n,r,i,s,o,u,a,f,l,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H,B,j,F,I,q,R,U,z,W,X,V={}.hasOwnProperty,$=[].slice,J=function(e,t){function r(){this.constructor=e}for(var n in t)V.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},K=[].indexOf||function(e){for(var t=0,n=this.length;t=0},i.prototype.find=function(e){var t,n,r;for(n=0,r=this.length;n=0?h.push((c=i[n+"_property"])!=null?typeof c.trigger=="function"?c.trigger(i):void 0:void 0):h.push(void 0):h.push(void 0);return h}()):f.push(void 0);return f},b=function(){function e(e,t){var n,r,i;this.name=e,M(this,t),this.dependencies=[],this.localDependencies=[],this.globalDependencies=[];if(this.dependsOn){i=[].concat(this.dependsOn);for(n=0,r=i.length;n=0?(e.push(i.name),f.push(t(i.name))):f.push(void 0);return f},t(this.name),e}}),k(e.prototype,"listeners",{get:function(){return this.event.listeners}}),e.prototype.clearCache=function(){if(this.definition.cache&&this.definition.get)return delete this.object._s[this.valueName]},e.prototype.hasChanged=function(){var e,t,n;return this.definition.changed===!1?!1:this.definition.changed?(n=this.get(),t="old_val_"+this.name,e=this.object._s.hasOwnProperty(t)?this.definition.changed.call(this.object,this.object._s[t],n):!0,this.object._s[t]=n,e):!0},e}(),O=function(e,t,n){var r;n==null&&(n={}),r=new b(t,n),"_s"in e||A(e,"_s"),U(e._s,"properties",r),L(e._s,"property_access"),k(e,t,{get:function(){return this[t+"_property"].get()},set:function(e){return this[t+"_property"].set(e)},configurable:!0,enumerable:"enumerable"in n?n.enumerable:!0}),k(e,t+"_property",{get:function(){return new y(r,this)},configurable:!0}),typeof n.serialize=="string"&&O(e,n.serialize,{get:function(){return this[t]},set:function(e){return this[t]=e},configurable:!0});if("value"in n)return e[t]=n.value},H=1,v=function(){function e(e){var t;if(this.constructor.identityMap&&(e!=null?e.id:void 0)){t=i.get(this.constructor,e.id);if(t)return t.set(e),t;i.set(this.constructor,e.id,this)}this.set(e)}return e.identityMap=!0,e.find=function(e){return i.get(this,e)||new this({id:e})},e.extend=function(e){var t;return t=function(t){function n(){var t;t=n.__super__.constructor.apply(this,arguments);if(t)return t;e&&e.apply(this,arguments)}return J(n,t),n}(this)},e.property=function(){var e,t,n,r,i,s,o;t=2<=arguments.length?$.call(arguments,0,r=arguments.length-1):(r=0,[]),n=arguments[r++],typeof n=="string"&&(t.push(n),n={}),o=[];for(i=0,s=t.length;i=0?this.token(t,e[0]):this.token("IDENTIFIER",e[0]),e[0].length):0},e.prototype.stringToken=function(){var e;return(e=w.exec(this.chunk))?(this.token("STRING_LITERAL",e[1]),e[0].length):0},e.prototype.lineToken=function(){var e,t,n,r,i;if(!(n=d.exec(this.chunk)))return 0;t=n[0],this.line+=this.count(t,"\n"),r=this.last(this.tokens,1),i=t.length-1-t.lastIndexOf("\n"),e=i-this.indent;if(i===this.indent)this.newlineToken();else if(i>this.indent)this.token("INDENT"),this.indents.push(e),this.ends.push("OUTDENT");else{while(e<0)this.ends.pop(),e+=this.indents.pop(),this.token("OUTDENT");this.token("TERMINATOR","\n")}return this.indent=i,t.length},e.prototype.literalToken=function(){var e;return(e=h.exec(this.chunk))?(this.token(e[0]),1):this.error("Unexpected token '"+this.chunk.charAt(0)+"'")},e.prototype.newlineToken=function(){if(this.tag()!=="TERMINATOR")return this.token("TERMINATOR","\n")},e.prototype.tag=function(e,t){var n;return(n=this.last(this.tokens,e))&&(t?n[0]=t:n[0])},e.prototype.value=function(e,t){var n;return(n=this.last(this.tokens,e))&&(t?n[1]=t:n[1])},e.prototype.error=function(e){var t;throw t=this.code.slice(Math.max(0,this.i-10),Math.min(this.code.length,this.i+10)),SyntaxError(""+e+" on line "+(this.line+1)+" near "+JSON.stringify(t))},e.prototype.count=function(e,t){var n,r;n=r=0;if(!t.length)return 1/0;while(r=1+e.indexOf(t,r))n++;return n},e.prototype.last=function(e,t){return e[e.length-(t||0)-1]},e}(),m=function(){function e(e,t){this.ast=e,this.element=t,this.children=new s([]),this.boundClasses=new s([])}return L(e.prototype,"load"),L(e.prototype,"unload"),e.prototype.append=function(e){return e.appendChild(this.element)},e.prototype.insertAfter=function(e){return e.parentNode.insertBefore(this.element,e.nextSibling)},e.prototype.remove=function(){var e;return this.unbindEvents(),(e=this.element.parentNode)!=null?e.removeChild(this.element):void 0},k(e.prototype,"lastElement",{configurable:!0,get:function(){return this.element}}),e.prototype.nodes=function(){return this.children},e.prototype.bindEvent=function(e,t){if(e)return this.boundEvents||(this.boundEvents=[]),this.boundEvents.push({event:e,fun:t}),e.bind(t)},e.prototype.unbindEvents=function(){var e,t,n,r,i,s,o,u,a,f,l;this.unload.trigger(),u=this.nodes();for(r=0,s=u.length;r 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write(" - - - - - - - - - - - - - diff --git a/examples/somajs/js/app.js b/examples/somajs/js/app.js deleted file mode 100644 index e52962daf1..0000000000 --- a/examples/somajs/js/app.js +++ /dev/null @@ -1,25 +0,0 @@ -/*global soma:false */ -(function (todo, soma) { - - 'use strict'; - - todo.TodoApp = soma.Application.extend({ - init: function () { - // mapping rules so the model and router can be injected - this.injector.mapClass('model', todo.Model, true); - this.injector.mapClass('router', todo.Router, true); - // create templates for DOM Elements (optional soma-template plugin) - this.createTemplate(todo.HeaderView, document.querySelector('.header')); - this.createTemplate(todo.MainView, document.querySelector('.main')); - this.createTemplate(todo.FooterView, document.querySelector('.footer')); - }, - start: function () { - // dispatch a custom event to render the templates - this.dispatcher.dispatch('render'); - } - }); - - // create the application - new todo.TodoApp(); - -})(window.todo = window.todo || {}, soma); diff --git a/examples/somajs/js/models/router.js b/examples/somajs/js/models/router.js deleted file mode 100644 index 2f40164367..0000000000 --- a/examples/somajs/js/models/router.js +++ /dev/null @@ -1,27 +0,0 @@ -/*global Router:false */ -(function (todo, Router) { - - 'use strict'; - - todo.Router = function (dispatcher) { - - // create the router (director.js) - var router = new Router().init().configure({ - notfound: render - }); - - // dispatch a custom event to render the template on a route change - router.on(/.*/, render); - - function render() { - dispatcher.dispatch('render'); - } - - return { - getRoute: function () { - return router.getRoute()[0]; - } - }; - }; - -})(window.todo = window.todo || {}, Router); diff --git a/examples/somajs/js/models/todos.js b/examples/somajs/js/models/todos.js deleted file mode 100644 index 21f1961290..0000000000 --- a/examples/somajs/js/models/todos.js +++ /dev/null @@ -1,27 +0,0 @@ -(function (todo) { - - 'use strict'; - - todo.Model = function () { - - var storeKey = 'todos-somajs'; - - return { - get: function () { - // get the data from the local storage - return JSON.parse(localStorage.getItem(storeKey) || '[]'); - }, - set: function (items) { - // set the data to the local storage - localStorage.setItem(storeKey, JSON.stringify(items)); - }, - getActive: function () { - // returns items that are not completed - return this.get().filter(function (item) { - return !item.completed; - }).length; - } - }; - }; - -})(window.todo = window.todo || {}); diff --git a/examples/somajs/js/views/footer.js b/examples/somajs/js/views/footer.js deleted file mode 100644 index a7c5e9b0f9..0000000000 --- a/examples/somajs/js/views/footer.js +++ /dev/null @@ -1,43 +0,0 @@ -(function (todo) { - - 'use strict'; - - todo.FooterView = function (scope, template, model, router, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: returns a css class for the current filter (all/active/completed) - scope.highlightFilter = function (filter) { - var route = router.getRoute(); - return route === filter ? 'selected' : ''; - }; - - // template function: returns the number of completed items - scope.clearCompleted = function () { - items = items.filter(function (item) { - return !item.completed; - }); - update(); - }; - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the footer view - dispatcher.addEventListener('render', function () { - items = model.get(); - scope.active = model.getActive(); - scope.completed = items.length - scope.active; - scope.itemLabel = scope.active === 1 ? 'item' : 'items'; - scope.footerVisible = items.length > 0 ? true : false; - scope.clearCompletedVisible = scope.completed > 0 ? true : false; - template.render(); - }); - - }; - -})(window.todo = window.todo || {}); diff --git a/examples/somajs/js/views/header.js b/examples/somajs/js/views/header.js deleted file mode 100644 index 267d9ea967..0000000000 --- a/examples/somajs/js/views/header.js +++ /dev/null @@ -1,44 +0,0 @@ -(function (todo) { - - 'use strict'; - - var ENTER_KEY = 13; - - todo.HeaderView = function (scope, template, model, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: add a new item on an enter key press - scope.add = function (event) { - var value = event.currentTarget.value.trim(); - if (event.which === ENTER_KEY && value !== '') { - items.push({ - title: value, - completed: false - }); - event.currentTarget.value = ''; - update(); - } - }; - - // template function: remove text from the input (used on blur event) - scope.clear = function (event) { - event.currentTarget.value = ''; - }; - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the header view - dispatcher.addEventListener('render', function () { - items = model.get(); - template.render(); - }); - - }; - -})(window.todo = window.todo || {}); diff --git a/examples/somajs/js/views/main.js b/examples/somajs/js/views/main.js deleted file mode 100644 index 155b5b20ec..0000000000 --- a/examples/somajs/js/views/main.js +++ /dev/null @@ -1,107 +0,0 @@ -(function (todo) { - 'use strict'; - - var ENTER_KEY = 13; - var ESCAPE_KEY = 27; - - todo.MainView = function (scope, template, model, router, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: returns an array of items to display - // can be different depending on the filter selected - scope.items = function () { - var filter = router.getRoute(); - if (filter === '') { - return items; - } - return items.filter(function (item) { - return filter === 'active' ? !item.completed : item.completed; - }); - }; - - // template function: set all items to either completed or not completed - scope.toggleAll = function (event) { - items.forEach(function (item) { - item.completed = event.currentTarget.checked; - }); - update(); - }; - - // template function: set 1 item to either completed or not completed - scope.toggle = function (event, item) { - item.completed = !item.completed; - update(); - }; - - // template function: returns a css class depending if the item is completed or not completed - scope.completedClass = function (completed) { - return completed ? 'completed' : ''; - }; - - // template function: removes an item - scope.remove = function (event, item) { - if (item) { - items.splice(items.indexOf(item), 1); - update(); - } - }; - - // template function: edit an item (used on a double click event) - scope.edit = function (event, item) { - item.editing = 'editing'; - template.render(); - template.element.querySelector('.edit').focus(); - }; - - // template function: during edit mode, changes the value of an item after an enter key press - scope.update = function (event, item) { - if (cancelEditing(event, item)) { - return; - } - var value = event.currentTarget.value.trim(); - if (event.which === ENTER_KEY || event.type === 'blur') { - if (value) { - item.title = value; - } - else { - items.splice(items.indexOf(item), 1); - } - item.editing = ''; - event.currentTarget.value = value; - update(); - } - }; - - // escape has been pressed, revert the value of the input - function cancelEditing(event, item) { - if (event.which === ESCAPE_KEY) { - event.currentTarget.value = item.title; - event.currentTarget.blur(); - update(); - return true; - } - else { - return false; - } - } - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the main view - dispatcher.addEventListener('render', function () { - items = model.get(); - scope.active = model.getActive(); - scope.isVisible = scope.items().length > 0 ? true : false; - scope.allCompleted = items.length > 0 && scope.active === 0 ? true : false; - template.render(); - }); - - }; - -})(window.todo = window.todo || {}); diff --git a/examples/somajs/node_modules/director/build/director.js b/examples/somajs/node_modules/director/build/director.js deleted file mode 100644 index 1038878723..0000000000 --- a/examples/somajs/node_modules/director/build/director.js +++ /dev/null @@ -1,725 +0,0 @@ - - -// -// Generated on Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon). -// Version 1.2.6 -// - -(function (exports) { - -/* - * browser.js: Browser specific functionality for director. - * - * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. - * MIT LICENSE - * - */ - -var dloc = document.location; - -function dlocHashEmpty() { - // Non-IE browsers return '' when the address bar shows '#'; Director's logic - // assumes both mean empty. - return dloc.hash === '' || dloc.hash === '#'; -} - -var listener = { - mode: 'modern', - hash: dloc.hash, - history: false, - - check: function () { - var h = dloc.hash; - if (h != this.hash) { - this.hash = h; - this.onHashChanged(); - } - }, - - fire: function () { - if (this.mode === 'modern') { - this.history === true ? window.onpopstate() : window.onhashchange(); - } - else { - this.onHashChanged(); - } - }, - - init: function (fn, history) { - var self = this; - this.history = history; - - if (!Router.listeners) { - Router.listeners = []; - } - - function onchange(onChangeEvent) { - for (var i = 0, l = Router.listeners.length; i < l; i++) { - Router.listeners[i](onChangeEvent); - } - } - - //note IE8 is being counted as 'modern' because it has the hashchange event - if ('onhashchange' in window && (document.documentMode === undefined - || document.documentMode > 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write(" - - - diff --git a/examples/somajs_require/js/app.js b/examples/somajs_require/js/app.js deleted file mode 100644 index 1ebd7a3027..0000000000 --- a/examples/somajs_require/js/app.js +++ /dev/null @@ -1,60 +0,0 @@ -/*global requirejs:false */ -(function (requirejs) { - - 'use strict'; - - requirejs.config({ - baseUrl: './js', - paths: { - // libs - soma: '../node_modules/soma.js/build/soma', - template: '../node_modules/soma-template/build/soma-template', - director: '../node_modules/director/build/director', - // app paths - views: './views', - models: './models' - }, - shim: { - 'template': { - deps: ['soma'] - }, - 'director': { - exports: 'Router' - } - - } - }); - - requirejs([ - 'soma', - 'template', - 'models/todos', - 'models/router', - 'views/header', - 'views/main', - 'views/footer' - ], function (soma, template, TodoModel, RouterModel, HeaderView, MainView, FooterView) { - - var TodoApp = soma.Application.extend({ - init: function () { - // mapping rules so the model and router can be injected - this.injector.mapClass('model', TodoModel, true); - this.injector.mapClass('router', RouterModel, true); - // create templates for DOM Elements (optional soma-template plugin) - this.createTemplate(HeaderView, document.querySelector('.header')); - this.createTemplate(MainView, document.querySelector('.main')); - this.createTemplate(FooterView, document.querySelector('.footer')); - }, - start: function () { - // dispatch a custom event to render the templates - this.dispatcher.dispatch('render'); - } - }); - - // create the application - new TodoApp(); - - }); - - -})(requirejs); diff --git a/examples/somajs_require/js/models/router.js b/examples/somajs_require/js/models/router.js deleted file mode 100644 index 2faa1fe012..0000000000 --- a/examples/somajs_require/js/models/router.js +++ /dev/null @@ -1,33 +0,0 @@ -/*global define:false */ -(function () { - - 'use strict'; - - define(['director'], function (Router) { - - var RouterModel = function (dispatcher) { - - // create the router (director.js) - var router = new Router().init().configure({ - notfound: render - }); - - // dispatch a custom event to render the template on a route change - router.on(/.*/, render); - - function render() { - dispatcher.dispatch('render'); - } - - return { - getRoute: function () { - return router.getRoute()[0]; - } - }; - }; - - return RouterModel; - - }); - -})(); diff --git a/examples/somajs_require/js/models/todos.js b/examples/somajs_require/js/models/todos.js deleted file mode 100644 index 8b9b5d2572..0000000000 --- a/examples/somajs_require/js/models/todos.js +++ /dev/null @@ -1,35 +0,0 @@ -/*global define:false */ -(function () { - - 'use strict'; - - define([], function () { - - var TodoModel = function () { - - var storeKey = 'todos-somajs'; - - return { - get: function () { - // get the data from the local storage - return JSON.parse(localStorage.getItem(storeKey) || '[]'); - }, - set: function (items) { - // set the data to the local storage - localStorage.setItem(storeKey, JSON.stringify(items)); - }, - getActive: function () { - // returns items that are not completed - return this.get().filter(function (item) { - return !item.completed; - }).length; - } - }; - }; - - return TodoModel; - - }); - - -})(); diff --git a/examples/somajs_require/js/views/footer.js b/examples/somajs_require/js/views/footer.js deleted file mode 100644 index 0998516d02..0000000000 --- a/examples/somajs_require/js/views/footer.js +++ /dev/null @@ -1,50 +0,0 @@ -/*global define:false */ -(function () { - - 'use strict'; - - define([], function () { - - var FooterView = function (scope, template, model, router, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: returns a css class for the current filter (all/active/completed) - scope.highlightFilter = function (filter) { - var route = router.getRoute(); - return route === filter ? 'selected' : ''; - }; - - // template function: returns the number of completed items - scope.clearCompleted = function () { - items = items.filter(function (item) { - return !item.completed; - }); - update(); - }; - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the footer view - dispatcher.addEventListener('render', function () { - items = model.get(); - scope.active = model.getActive(); - scope.completed = items.length - scope.active; - scope.itemLabel = scope.active === 1 ? 'item' : 'items'; - scope.footerVisible = items.length > 0 ? true : false; - scope.clearCompletedVisible = scope.completed > 0 ? true : false; - template.render(); - }); - - }; - - return FooterView; - - }); - -})(); diff --git a/examples/somajs_require/js/views/header.js b/examples/somajs_require/js/views/header.js deleted file mode 100644 index 79a309745d..0000000000 --- a/examples/somajs_require/js/views/header.js +++ /dev/null @@ -1,52 +0,0 @@ -/*global define:false */ -(function () { - - 'use strict'; - - define([], function () { - - var ENTER_KEY = 13; - - var HeaderView = function (scope, template, model, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: add a new item on an enter key press - scope.add = function (event) { - var value = event.currentTarget.value.trim(); - if (event.which === ENTER_KEY && value !== '') { - items.push({ - title: value, - completed: false - }); - event.currentTarget.value = ''; - update(); - } - }; - - // template function: remove text from the input (used on blur event) - scope.clear = function (event) { - event.currentTarget.value = ''; - }; - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the header view - dispatcher.addEventListener('render', function () { - items = model.get(); - template.render(); - }); - - }; - - return HeaderView; - - - }); - -})(); diff --git a/examples/somajs_require/js/views/main.js b/examples/somajs_require/js/views/main.js deleted file mode 100644 index a8c04b1877..0000000000 --- a/examples/somajs_require/js/views/main.js +++ /dev/null @@ -1,114 +0,0 @@ -/*global define:false */ -(function () { - 'use strict'; - - define([], function () { - - var ENTER_KEY = 13; - var ESCAPE_KEY = 27; - - var MainView = function (scope, template, model, router, dispatcher) { - - // get data from the injected model - var items = model.get(); - - // template function: returns an array of items to display - // can be different depending on the filter selected - scope.items = function () { - var filter = router.getRoute(); - if (filter === '') { - return items; - } - return items.filter(function (item) { - return filter === 'active' ? !item.completed : item.completed; - }); - }; - - // template function: set all items to either completed or not completed - scope.toggleAll = function (event) { - items.forEach(function (item) { - item.completed = event.currentTarget.checked; - }); - update(); - }; - - // template function: set 1 item to either completed or not completed - scope.toggle = function (event, item) { - item.completed = !item.completed; - update(); - }; - - // template function: returns a css class depending if the item is completed or not completed - scope.completedClass = function (completed) { - return completed ? 'completed' : ''; - }; - - // template function: removes an item - scope.remove = function (event, item) { - if (item) { - items.splice(items.indexOf(item), 1); - update(); - } - }; - - // template function: edit an item (used on a double click event) - scope.edit = function (event, item) { - item.editing = 'editing'; - template.render(); - template.element.querySelector('.edit').focus(); - }; - - // template function: during edit mode, changes the value of an item after an enter key press - scope.update = function (event, item) { - if (cancelEditing(event, item)) { - return; - } - var value = event.currentTarget.value.trim(); - if (event.which === ENTER_KEY || event.type === 'blur') { - if (value) { - item.title = value; - } - else { - items.splice(items.indexOf(item), 1); - } - item.editing = ''; - event.currentTarget.value = value; - update(); - } - }; - - // escape has been pressed, revert the value of the input - function cancelEditing(event, item) { - if (event.which === ESCAPE_KEY) { - event.currentTarget.value = item.title; - event.currentTarget.blur(); - update(); - return true; - } - else { - return false; - } - } - - // save the changes to the model and dispatch a custom event to render the templates - function update() { - model.set(items); - dispatcher.dispatch('render'); - } - - // listen to a custom event to render the main view - dispatcher.addEventListener('render', function () { - items = model.get(); - scope.active = model.getActive(); - scope.isVisible = scope.items().length > 0 ? true : false; - scope.allCompleted = items.length > 0 && scope.active === 0 ? true : false; - template.render(); - }); - - }; - - return MainView; - - }); - -})(); diff --git a/examples/somajs_require/node_modules/director/build/director.js b/examples/somajs_require/node_modules/director/build/director.js deleted file mode 100644 index 1038878723..0000000000 --- a/examples/somajs_require/node_modules/director/build/director.js +++ /dev/null @@ -1,725 +0,0 @@ - - -// -// Generated on Tue Dec 16 2014 12:13:47 GMT+0100 (CET) by Charlie Robbins, Paolo Fragomeni & the Contributors (Using Codesurgeon). -// Version 1.2.6 -// - -(function (exports) { - -/* - * browser.js: Browser specific functionality for director. - * - * (C) 2011, Charlie Robbins, Paolo Fragomeni, & the Contributors. - * MIT LICENSE - * - */ - -var dloc = document.location; - -function dlocHashEmpty() { - // Non-IE browsers return '' when the address bar shows '#'; Director's logic - // assumes both mean empty. - return dloc.hash === '' || dloc.hash === '#'; -} - -var listener = { - mode: 'modern', - hash: dloc.hash, - history: false, - - check: function () { - var h = dloc.hash; - if (h != this.hash) { - this.hash = h; - this.onHashChanged(); - } - }, - - fire: function () { - if (this.mode === 'modern') { - this.history === true ? window.onpopstate() : window.onhashchange(); - } - else { - this.onHashChanged(); - } - }, - - init: function (fn, history) { - var self = this; - this.history = history; - - if (!Router.listeners) { - Router.listeners = []; - } - - function onchange(onChangeEvent) { - for (var i = 0, l = Router.listeners.length; i < l; i++) { - Router.listeners[i](onChangeEvent); - } - } - - //note IE8 is being counted as 'modern' because it has the hashchange event - if ('onhashchange' in window && (document.documentMode === undefined - || document.documentMode > 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write(" - - - - - - - - - diff --git a/examples/troopjs_require/index.js b/examples/troopjs_require/index.js deleted file mode 100644 index 26c8ee9ffd..0000000000 --- a/examples/troopjs_require/index.js +++ /dev/null @@ -1,34 +0,0 @@ -require({ - baseUrl: 'node_modules', - - packages: [{ - name: 'todos-troopjs', - location: '../js' - }], - - paths: { - jquery: 'jquery/dist/jquery' - }, - - deps: [ - 'require', - 'jquery', - 'troopjs/main', - 'troopjs-widget/main', - 'troopjs-route-hash/main' - ], - - callback: function (localRequire, jQuery) { - // Require "application" and "route" components - localRequire([ - 'troopjs-widget/application', - 'troopjs-route-hash/component' - ], function (Application, Route) { - // Wait for `document.ready` - jQuery(function ($) { - // Create `Application` attached to `$('html')`, add `Route` child component and `.start` - Application($('html'), 'bootstrap', Route($(window))).start(); - }); - }); - } -}); diff --git a/examples/troopjs_require/js/clear.js b/examples/troopjs_require/js/clear.js deleted file mode 100644 index 20d47ff88c..0000000000 --- a/examples/troopjs_require/js/clear.js +++ /dev/null @@ -1,38 +0,0 @@ -define([ - './component', - 'troopjs-hub/emitter', - 'poly/array' -], function (Component, hub) { - 'use strict'; - - /** - * Component for the `.clear-completed` button - */ - - return Component.extend({ - /** - * HUB `todos/change` handler (memorized). - * Called whenever the task list is updated - * @param {Array} tasks Updated task array - */ - 'hub/todos/change(true)': function (tasks) { - // Filter and count tasks that are completed - var count = tasks - .filter(function (task) { - return task.completed; - }) - .length; - - // Toggle visibility (visible if `count > 0`, hidden otherwise) - this.$element.toggle(count > 0); - }, - - /** - * DOM `click` handler - */ - 'dom/click': function () { - // Emit `todos/clear` on `hub` - hub.emit('todos/clear'); - } - }); -}); diff --git a/examples/troopjs_require/js/component.js b/examples/troopjs_require/js/component.js deleted file mode 100644 index e73a1343f8..0000000000 --- a/examples/troopjs_require/js/component.js +++ /dev/null @@ -1,14 +0,0 @@ -define([ - 'troopjs-compose/factory', - 'troopjs-hub/component', - 'troopjs-dom/component' -], function (Factory, HUBComponent, DOMComponent) { - 'use strict'; - - /** - * Base component. - * Mixes `HUBComponent` and `DOMComponent`. - */ - - return Factory(HUBComponent, DOMComponent); -}); diff --git a/examples/troopjs_require/js/count.js b/examples/troopjs_require/js/count.js deleted file mode 100644 index 2d59abdfae..0000000000 --- a/examples/troopjs_require/js/count.js +++ /dev/null @@ -1,29 +0,0 @@ -define([ - './component', - 'poly/array' -], function (Component) { - 'use strict'; - - /** - * Component for the `.todo-count` span - */ - - return Component.extend({ - /** - * HUB `todos/change` handler (memorized). - * Called whenever the task list is updated - * @param {Array} tasks Updated task array - */ - 'hub/todos/change(true)': function (tasks) { - // Filter and count tasks that are not completed - var count = tasks - .filter(function (task) { - return !task.completed; - }) - .length; - - // Update HTML with `count` taking pluralization into account - this.$element.html('' + count + ' ' + (count === 1 ? 'item' : 'items') + ' left'); - } - }); -}); diff --git a/examples/troopjs_require/js/create.js b/examples/troopjs_require/js/create.js deleted file mode 100644 index c058478c93..0000000000 --- a/examples/troopjs_require/js/create.js +++ /dev/null @@ -1,41 +0,0 @@ -define([ - './component', - 'troopjs-hub/emitter' -], function (Component, hub) { - 'use strict'; - - /** - * Component for the `.new-todo` input - */ - - var ENTER_KEY = 13; - - return Component.extend({ - /** - * DOM `keyup` handler - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/keyup': function ($event) { - var $element = this.$element; - var value; - - // If we pressed enter ... - if ($event.keyCode === ENTER_KEY) { - // Get `$element` value and trim whitespaces - value = $element - .val() - .trim(); - - if (value !== '') { - hub - .emit('todos/add', value) - // Wait for all handlers to execute - .then(function () { - // Set `$element` value to `''` - $element.val(''); - }); - } - } - } - }); -}); diff --git a/examples/troopjs_require/js/filter.js b/examples/troopjs_require/js/filter.js deleted file mode 100644 index 63c8a52b8f..0000000000 --- a/examples/troopjs_require/js/filter.js +++ /dev/null @@ -1,41 +0,0 @@ -define([ - './component', - 'troopjs-hub/emitter' -], function (Component, hub) { - 'use strict'; - - /** - * Component for the `.filters` list - */ - - return Component.extend({ - /** - * HUB `route/change` handler (memorized). - * Called whenever the route (`window.location.hash`) is updated. - * @param {String} route New route - */ - 'hub/route/change(true)': function (route) { - return hub - // Emit `todos/filter` with the new `route` on `hub`, yield `void 0` to not mutate arguments for next handler - .emit('todos/filter', route) - .yield(); - }, - - /** - * HUB `todos/filter` handler. - * Called whenever the task list filter is updated - * @param {String} filter New filter - */ - 'hub/todos/filter': function (filter) { - this.$element - // Find all `a` elements with a `href` attribute staring with `#` - .find('a[href^="#"]') - // Remove the `selected` class from matched elements - .removeClass('selected') - // Filter matched elements with a `href` attribute matching (`filter` || `/`) - .filter('[href="#' + (filter || '/') + '"]') - // Add the `selected` to matching elements - .addClass('selected'); - } - }); -}); diff --git a/examples/troopjs_require/js/hide.js b/examples/troopjs_require/js/hide.js deleted file mode 100644 index 131c8455fc..0000000000 --- a/examples/troopjs_require/js/hide.js +++ /dev/null @@ -1,21 +0,0 @@ -define([ - './component' -], function (Component) { - 'use strict'; - - /** - * Component for handling visibility depending on tasks count - */ - - return Component.extend({ - /** - * HUB `todos/change` handler (memorized). - * Called whenever the task list is updated - * @param {Array} tasks Updated task array - */ - 'hub/todos/change(true)': function (tasks) { - // Toggle visibility (visible if `task.length !== 0`, hidden otherwise) - this.$element.toggle(tasks.length !== 0); - } - }); -}); diff --git a/examples/troopjs_require/js/list.js b/examples/troopjs_require/js/list.js deleted file mode 100644 index 943674de82..0000000000 --- a/examples/troopjs_require/js/list.js +++ /dev/null @@ -1,288 +0,0 @@ -define([ - './component', - 'troopjs-hub/emitter', - 'jquery', - 'poly/array', - 'poly/string', - 'poly/json' -], function (Component, hub, $) { - 'use strict'; - - /** - * Component for the `.todo-list` list - */ - - var ENTER_KEY = 13; - var ESC_KEY = 27; - var STORAGE = window.localStorage; - - /** - * Generates `tasks` JSON from HTML and triggers `todos/change` on `hub` - * @private - */ - function update() { - var tasks = this.$element - // Find all `li` `.children` - .children('li') - // `.map` to JSON - .map(function (index, task) { - var $task = $(task); - - return { - title: $task - .find('label') - .text(), - completed: $task - .find('.toggle') - .prop('checked') - }; - }) - // Get underlying Array - .get(); - - // Emit `todos/change` with the new `tasks` on `hub` - return hub.emit('todos/change', tasks); - } - - return Component.extend({ - /** - * SIG `start` handler. - * Called when this component is started - */ - 'sig/start': function () { - // Get previously stored tasks from `STORAGE` under the key `todos-troopjs` - var storage = STORAGE.getItem('todos-troopjs'); - - // Emit `todos/change` with deserialized tasks or `[]` on `hub` - return hub.emit('todos/change', storage !== null ? JSON.parse(storage) : []); - }, - - /** - * HUB `todos/change` handler (memorized). - * Called whenever the task list is updated - * @param {Array} tasks Updated task array - */ - 'hub/todos/change(true)': function (tasks) { - var $element = this.$element; - // Get template HTML - var template = $element - .find('script[type="text/x-html-template"]') - .text(); - - $element - // `.remove` all `li` `.children` - .children('li') - .remove() - .end() - // `.append` the output from `tasks.map` - .append(tasks.map(function (task) { - var title = task.title; - var completed = task.completed; - - // Create template element and populate - return $(template) - .addClass(completed ? 'completed' : 'active') - .find('.toggle') - .prop('checked', completed) - .end() - .find('label') - .text(title) - .end(); - })); - - // Serialize `tasks` to JSON and store in `STORAGE` under the key `todos-troopjs` - STORAGE.setItem('todos-troopjs', JSON.stringify(tasks)); - }, - - /** - * HUB `todos/add` handler. - * Called when a new task is created - * @param {String} title Task title - */ - 'hub/todos/add': function (title) { - var $element = this.$element; - // Get template HTML - var template = $element - .find('script[type="text/x-html-template"]') - .text(); - - // Create template element, populate and `.appendTo` `$element` - $(template) - .addClass('active') - .find('label') - .text(title) - .end() - .appendTo($element); - - // Call `update`, yield `void 0` to not mutate arguments for next handler - return update.call(this) - .yield(void 0); - }, - - /** - * HUB `todos/complete` handler. - * Called whenever all tasks change their `completed` state in bulk - * @param {Boolean} toggle Completed state - */ - 'hub/todos/complete': function (toggle) { - // Find all `.toggle` elements, set `checked` property to `toggle`, trigger `change` DOM event - this.$element - .find('.toggle') - .prop('checked', toggle) - .change(); - - // Call `update`, yield `void 0` to not mutate arguments for next handler - return update.call(this) - .yield(void 0); - }, - - /** - * HUB `todos/clear` handler. - * Called whenever all completed tasks should be cleared - */ - 'hub/todos/clear': function () { - // Find `.destroy` elements that are a descendants of `li:has(.toggle:checked)`, trigger `click` DOM event - this.$element - .find('li:has(.toggle:checked) .destroy') - .click(); - }, - - /** - * HUB `todos/filter` handler. - * Called whenever the task list filter is updated - * @param {String} filter New filter - */ - 'hub/todos/filter(true)': function (filter) { - var $element = this.$element; - - // Toggle CSS classes depending on `filter` - $element - .toggleClass('filter-completed', filter === '/completed') - .toggleClass('filter-active', filter === '/active'); - }, - - /** - * DOM `change` handler (delegate filter `.toggle`) - * Called when "task completed" checkbox is toggled - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/change(.toggle)': function ($event) { - var $target = $($event.target); - var toggle = $target.prop('checked'); - - // Toggle CSS classes depending on `toggle` - $target - .closest('li') - .toggleClass('completed', toggle) - .toggleClass('active', !toggle); - - // Call `update` - update.call(this); - }, - - /** - * DOM `click` handler (delegate filter `.destroy`) - * Called whenever "task destroy" is clicked - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/click(.destroy)': function ($event) { - // `.remove` `.closest` `li` - $($event.target) - .closest('li') - .remove(); - - // Call `update` - update.call(this); - }, - - /** - * DOM `dblclick` handler (delegate filter `label`) - * Called whenever "task title" is edited - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/dblclick(label)': function ($event) { - var $target = $($event.target); - - $target - // Add class `editing` to `.closest` `li`, - .closest('li') - .addClass('editing') - // `.find` `.edit` and update `.val` with `$target.text()`, - .find('.edit') - .val($target.text()) - // `.focus` to trigger DOM event - .focus(); - }, - - /** - * DOM `keyup` handler (delegate filter `.edit`) - * Called each time a key is released while editing "task title" - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/keyup(.edit)': function ($event) { - var $target = $($event.target); - - switch ($event.keyCode) { - case ESC_KEY: - // Restore "task title" `.val` from `label` - $target.val(function () { - return $(this) - .closest('li') - .find('label') - .text(); - }); - // falls through - - case ENTER_KEY: - // Trigger `focusout` DOM event - $target.focusout(); - break; - } - }, - - /** - * DOM `focusout` handler (delegate filter `.edit`) - * Called when focus is removed while editing "task title" - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/focusout(.edit)': function ($event) { - // `.removeClass` `editing` from `.closest` `li` - $($event.target) - .closest('li') - .removeClass('editing'); - }, - - /** - * DOM `change` handler (delegate filter `.edit`) - * Called when "task title" is changed - * @param {Object} $event jQuery-like `$.Event` object - */ - 'dom/change(.edit)': function ($event) { - var $target = $($event.target); - // Get and `.trim` `.val` - var title = $target - .val() - .trim(); - - // If `title` is _not_ empty ... - if (title !== '') { - // Update `val` with trimmed `title`, update `.closest` `li` descendant `label` `.text` with `title` - $target - .val(title) - .closest('li') - .find('label') - .text(title); - - // Call `update` - update.call(this); - // ... otherwise - } else { - // Find `.closest` `li` ascendant, `.find` `.destroy`, trigger `click` DOM event - $target - .closest('li') - .find('.destroy') - .click(); - } - } - }); -}); diff --git a/examples/troopjs_require/js/toggle.js b/examples/troopjs_require/js/toggle.js deleted file mode 100644 index a1678e993f..0000000000 --- a/examples/troopjs_require/js/toggle.js +++ /dev/null @@ -1,33 +0,0 @@ -define([ - './component', - 'troopjs-hub/emitter', - 'poly/array' -], function (Component, hub) { - 'use strict'; - - /** - * Component for `toggle-all` checkbox - */ - - return Component.extend({ - /** - * HUB `todos/change` handler (memorized). - * Called whenever the task list is updated - * @param {Array} tasks Updated task array - */ - 'hub/todos/change(true)': function (tasks) { - // Set `this.$element` `checked` property based on all `tasks` `.completed` state - this.$element.prop('checked', tasks.every(function (task) { - return task.completed; - }, true)); - }, - - /** - * DOM `change` handler - */ - 'dom/change': function () { - // Emit `todos/complete` on `hub` with `this.$element` `checked` property - hub.emit('todos/complete', this.$element.prop('checked')); - } - }); -}); diff --git a/examples/troopjs_require/node_modules/jquery/dist/jquery.js b/examples/troopjs_require/node_modules/jquery/dist/jquery.js deleted file mode 100644 index eed17778c6..0000000000 --- a/examples/troopjs_require/node_modules/jquery/dist/jquery.js +++ /dev/null @@ -1,9210 +0,0 @@ -/*! - * jQuery JavaScript Library v2.1.4 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-04-28T16:01Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// - -var arr = []; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.4", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.0-pre - * http://sizzlejs.com/ - * - * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-12-16 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - nodeType = context.nodeType; - - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - if ( !seed && documentIsHTML ) { - - // Try to shortcut find operations when possible (e.g., not under DocumentFragment) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType !== 1 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - parent = doc.defaultView; - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Support tests - ---------------------------------------------------------------------- */ - documentIsHTML = !isXML( doc ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - // Inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // We once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android<4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android<4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// Support: Firefox, Chrome, Safari -// Create "bubbling" focus and blur events -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - thead: [ 1, "", "
            " ], - col: [ 2, "", "
            " ], - tr: [ 2, "", "
            " ], - td: [ 3, "", "
            " ], - - _default: [ 0, "", "" ] - }; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute("type"); - } - - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - }); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "