text: // Platform: browser
  // 3.4.0
  /*
   Licensed to the Apache Software Foundation (ASF) under one
   or more contributor license agreements.  See the NOTICE file
   distributed with this work for additional information
   regarding copyright ownership.  The ASF licenses this file
   to you 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() {
  var CORDOVA_JS_BUILD_LABEL = '3.4.0';
  try {eval("\n/*jshint -W079 */\n/*jshint -W020 */\n\nvar require,\n    define;\n\n(function () {\n    var modules = {},\n    // Stack of moduleIds currently being built.\n        requireStack = [],\n    // Map of module ID -> index into requireStack of modules currently being built.\n        inProgressModules = {},\n        SEPARATOR = \".\";\n\n\n\n    function build(module) {\n        var factory = module.factory,\n            localRequire = function (id) {\n                var resultantId = id;\n                //Its a relative path, so lop off the last portion and add the id (minus \"./\")\n                if (id.charAt(0) === \".\") {\n                    resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);\n                }\n                return require(resultantId);\n            };\n        module.exports = {};\n        delete module.factory;\n        factory(localRequire, module.exports, module);\n        return module.exports;\n    }\n\n    require = function (id) {\n        if (!modules[id]) {\n            throw \"module \" + id + \" not found\";\n        } else if (id in inProgressModules) {\n            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;\n            throw \"Cycle in require graph: \" + cycle;\n        }\n        if (modules[id].factory) {\n            try {\n                inProgressModules[id] = requireStack.length;\n                requireStack.push(id);\n                return build(modules[id]);\n            } finally {\n                delete inProgressModules[id];\n                requireStack.pop();\n            }\n        }\n        return modules[id].exports;\n    };\n\n    define = function (id, factory) {\n        if (modules[id]) {\n            throw \"module \" + id + \" already defined\";\n        }\n\n        modules[id] = {\n            id: id,\n            factory: factory\n        };\n    };\n\n    define.remove = function (id) {\n        delete modules[id];\n    };\n\n    define.moduleMap = modules;\n})();\n\n//Export for use in node\nif (typeof module === \"object\" && typeof require === \"function\") {\n    module.exports.require = require;\n    module.exports.define = define;\n}\n\n//@ sourceURL=src/scripts/require.js")} catch(e) {console.log("exception: in src/scripts/require.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova\", function(require, exports, module) {\n\n\nvar channel = require('cordova/channel');\nvar platform = require('cordova/platform');\n\n/**\n * Intercept calls to addEventListener + removeEventListener and handle deviceready,\n * resume, and pause events.\n */\nvar m_document_addEventListener = document.addEventListener;\nvar m_document_removeEventListener = document.removeEventListener;\nvar m_window_addEventListener = window.addEventListener;\nvar m_window_removeEventListener = window.removeEventListener;\n\n/**\n * Houses custom event handlers to intercept on document + window event listeners.\n */\nvar documentEventHandlers = {},\n    windowEventHandlers = {};\n\ndocument.addEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    if (typeof documentEventHandlers[e] != 'undefined') {\n        documentEventHandlers[e].subscribe(handler);\n    } else {\n        m_document_addEventListener.call(document, evt, handler, capture);\n    }\n};\n\nwindow.addEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    if (typeof windowEventHandlers[e] != 'undefined') {\n        windowEventHandlers[e].subscribe(handler);\n    } else {\n        m_window_addEventListener.call(window, evt, handler, capture);\n    }\n};\n\ndocument.removeEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    // If unsubscribing from an event that is handled by a plugin\n    if (typeof documentEventHandlers[e] != \"undefined\") {\n        documentEventHandlers[e].unsubscribe(handler);\n    } else {\n        m_document_removeEventListener.call(document, evt, handler, capture);\n    }\n};\n\nwindow.removeEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    // If unsubscribing from an event that is handled by a plugin\n    if (typeof windowEventHandlers[e] != \"undefined\") {\n        windowEventHandlers[e].unsubscribe(handler);\n    } else {\n        m_window_removeEventListener.call(window, evt, handler, capture);\n    }\n};\n\nfunction createEvent(type, data) {\n    var event = document.createEvent('Events');\n    event.initEvent(type, false, false);\n    if (data) {\n        for (var i in data) {\n            if (data.hasOwnProperty(i)) {\n                event[i] = data[i];\n            }\n        }\n    }\n    return event;\n}\n\n\nvar cordova = {\n    define:define,\n    require:require,\n    version:CORDOVA_JS_BUILD_LABEL,\n    platformId:platform.id,\n    /**\n     * Methods to add/remove your own addEventListener hijacking on document + window.\n     */\n    addWindowEventHandler:function(event) {\n        return (windowEventHandlers[event] = channel.create(event));\n    },\n    addStickyDocumentEventHandler:function(event) {\n        return (documentEventHandlers[event] = channel.createSticky(event));\n    },\n    addDocumentEventHandler:function(event) {\n        return (documentEventHandlers[event] = channel.create(event));\n    },\n    removeWindowEventHandler:function(event) {\n        delete windowEventHandlers[event];\n    },\n    removeDocumentEventHandler:function(event) {\n        delete documentEventHandlers[event];\n    },\n    /**\n     * Retrieve original event handlers that were replaced by Cordova\n     *\n     * @return object\n     */\n    getOriginalHandlers: function() {\n        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},\n        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};\n    },\n    /**\n     * Method to fire event from native code\n     * bNoDetach is required for events which cause an exception which needs to be caught in native code\n     */\n    fireDocumentEvent: function(type, data, bNoDetach) {\n        var evt = createEvent(type, data);\n        if (typeof documentEventHandlers[type] != 'undefined') {\n            if( bNoDetach ) {\n                documentEventHandlers[type].fire(evt);\n            }\n            else {\n                setTimeout(function() {\n                    // Fire deviceready on listeners that were registered before cordova.js was loaded.\n                    if (type == 'deviceready') {\n                        document.dispatchEvent(evt);\n                    }\n                    documentEventHandlers[type].fire(evt);\n                }, 0);\n            }\n        } else {\n            document.dispatchEvent(evt);\n        }\n    },\n    fireWindowEvent: function(type, data) {\n        var evt = createEvent(type,data);\n        if (typeof windowEventHandlers[type] != 'undefined') {\n            setTimeout(function() {\n                windowEventHandlers[type].fire(evt);\n            }, 0);\n        } else {\n            window.dispatchEvent(evt);\n        }\n    },\n\n    /**\n     * Plugin callback mechanism.\n     */\n    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.\n    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.\n    callbackId: Math.floor(Math.random() * 2000000000),\n    callbacks:  {},\n    callbackStatus: {\n        NO_RESULT: 0,\n        OK: 1,\n        CLASS_NOT_FOUND_EXCEPTION: 2,\n        ILLEGAL_ACCESS_EXCEPTION: 3,\n        INSTANTIATION_EXCEPTION: 4,\n        MALFORMED_URL_EXCEPTION: 5,\n        IO_EXCEPTION: 6,\n        INVALID_ACTION: 7,\n        JSON_EXCEPTION: 8,\n        ERROR: 9\n    },\n\n    /**\n     * Called by native code when returning successful result from an action.\n     */\n    callbackSuccess: function(callbackId, args) {\n        try {\n            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);\n        } catch (e) {\n            console.log(\"Error in error callback: \" + callbackId + \" = \"+e);\n        }\n    },\n\n    /**\n     * Called by native code when returning error result from an action.\n     */\n    callbackError: function(callbackId, args) {\n        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.\n        // Derive success from status.\n        try {\n            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);\n        } catch (e) {\n            console.log(\"Error in error callback: \" + callbackId + \" = \"+e);\n        }\n    },\n\n    /**\n     * Called by native code when returning the result from an action.\n     */\n    callbackFromNative: function(callbackId, success, status, args, keepCallback) {\n        var callback = cordova.callbacks[callbackId];\n        if (callback) {\n            if (success && status == cordova.callbackStatus.OK) {\n                callback.success && callback.success.apply(null, args);\n            } else if (!success) {\n                callback.fail && callback.fail.apply(null, args);\n            }\n\n            // Clear callback if not expecting any more results\n            if (!keepCallback) {\n                delete cordova.callbacks[callbackId];\n            }\n        }\n    },\n    addConstructor: function(func) {\n        channel.onCordovaReady.subscribe(function() {\n            try {\n                func();\n            } catch(e) {\n                console.log(\"Failed to run constructor: \" + e);\n            }\n        });\n    }\n};\n\n\nmodule.exports = cordova;\n\n});\n\n//@ sourceURL=src/cordova.js")} catch(e) {console.log("exception: in src/cordova.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/argscheck\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\nvar utils = require('cordova/utils');\n\nvar moduleExports = module.exports;\n\nvar typeMap = {\n    'A': 'Array',\n    'D': 'Date',\n    'N': 'Number',\n    'S': 'String',\n    'F': 'Function',\n    'O': 'Object'\n};\n\nfunction extractParamName(callee, argIndex) {\n    return (/.*?\\((.*?)\\)/).exec(callee)[1].split(', ')[argIndex];\n}\n\nfunction checkArgs(spec, functionName, args, opt_callee) {\n    if (!moduleExports.enableChecks) {\n        return;\n    }\n    var errMsg = null;\n    var typeName;\n    for (var i = 0; i < spec.length; ++i) {\n        var c = spec.charAt(i),\n            cUpper = c.toUpperCase(),\n            arg = args[i];\n        // Asterix means allow anything.\n        if (c == '*') {\n            continue;\n        }\n        typeName = utils.typeName(arg);\n        if ((arg === null || arg === undefined) && c == cUpper) {\n            continue;\n        }\n        if (typeName != typeMap[cUpper]) {\n            errMsg = 'Expected ' + typeMap[cUpper];\n            break;\n        }\n    }\n    if (errMsg) {\n        errMsg += ', but got ' + typeName + '.';\n        errMsg = 'Wrong type for parameter \"' + extractParamName(opt_callee || args.callee, i) + '\" of ' + functionName + ': ' + errMsg;\n        // Don't log when running unit tests.\n        if (typeof jasmine == 'undefined') {\n            console.error(errMsg);\n        }\n        throw TypeError(errMsg);\n    }\n}\n\nfunction getValue(value, defaultValue) {\n    return value === undefined ? defaultValue : value;\n}\n\nmoduleExports.checkArgs = checkArgs;\nmoduleExports.getValue = getValue;\nmoduleExports.enableChecks = true;\n\n\n});\n\n//@ sourceURL=src/common/argscheck.js")} catch(e) {console.log("exception: in src/common/argscheck.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/base64\", function(require, exports, module) {\n\nvar base64 = exports;\n\nbase64.fromArrayBuffer = function(arrayBuffer) {\n    var array = new Uint8Array(arrayBuffer);\n    return uint8ToBase64(array);\n};\n\n//------------------------------------------------------------------------------\n\n/* This code is based on the performance tests at http://jsperf.com/b64tests\n * This 12-bit-at-a-time algorithm was the best performing version on all\n * platforms tested.\n */\n\nvar b64_6bit = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar b64_12bit;\n\nvar b64_12bitTable = function() {\n    b64_12bit = [];\n    for (var i=0; i<64; i++) {\n        for (var j=0; j<64; j++) {\n            b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j];\n        }\n    }\n    b64_12bitTable = function() { return b64_12bit; };\n    return b64_12bit;\n};\n\nfunction uint8ToBase64(rawData) {\n    var numBytes = rawData.byteLength;\n    var output=\"\";\n    var segment;\n    var table = b64_12bitTable();\n    for (var i=0;i<numBytes-2;i+=3) {\n        segment = (rawData[i] << 16) + (rawData[i+1] << 8) + rawData[i+2];\n        output += table[segment >> 12];\n        output += table[segment & 0xfff];\n    }\n    if (numBytes - i == 2) {\n        segment = (rawData[i] << 16) + (rawData[i+1] << 8);\n        output += table[segment >> 12];\n        output += b64_6bit[(segment & 0xfff) >> 6];\n        output += '=';\n    } else if (numBytes - i == 1) {\n        segment = (rawData[i] << 16);\n        output += table[segment >> 12];\n        output += '==';\n    }\n    return output;\n}\n\n});\n\n//@ sourceURL=src/common/base64.js")} catch(e) {console.log("exception: in src/common/base64.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/builder\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\n\nfunction each(objects, func, context) {\n    for (var prop in objects) {\n        if (objects.hasOwnProperty(prop)) {\n            func.apply(context, [objects[prop], prop]);\n        }\n    }\n}\n\nfunction clobber(obj, key, value) {\n    exports.replaceHookForTesting(obj, key);\n    obj[key] = value;\n    // Getters can only be overridden by getters.\n    if (obj[key] !== value) {\n        utils.defineGetter(obj, key, function() {\n            return value;\n        });\n    }\n}\n\nfunction assignOrWrapInDeprecateGetter(obj, key, value, message) {\n    if (message) {\n        utils.defineGetter(obj, key, function() {\n            console.log(message);\n            delete obj[key];\n            clobber(obj, key, value);\n            return value;\n        });\n    } else {\n        clobber(obj, key, value);\n    }\n}\n\nfunction include(parent, objects, clobber, merge) {\n    each(objects, function (obj, key) {\n        try {\n            var result = obj.path ? require(obj.path) : {};\n\n            if (clobber) {\n                // Clobber if it doesn't exist.\n                if (typeof parent[key] === 'undefined') {\n                    assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n                } else if (typeof obj.path !== 'undefined') {\n                    // If merging, merge properties onto parent, otherwise, clobber.\n                    if (merge) {\n                        recursiveMerge(parent[key], result);\n                    } else {\n                        assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n                    }\n                }\n                result = parent[key];\n            } else {\n                // Overwrite if not currently defined.\n                if (typeof parent[key] == 'undefined') {\n                    assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n                } else {\n                    // Set result to what already exists, so we can build children into it if they exist.\n                    result = parent[key];\n                }\n            }\n\n            if (obj.children) {\n                include(result, obj.children, clobber, merge);\n            }\n        } catch(e) {\n            utils.alert('Exception building Cordova JS globals: ' + e + ' for key \"' + key + '\"');\n        }\n    });\n}\n\n/**\n * Merge properties from one object onto another recursively.  Properties from\n * the src object will overwrite existing target property.\n *\n * @param target Object to merge properties into.\n * @param src Object to merge properties from.\n */\nfunction recursiveMerge(target, src) {\n    for (var prop in src) {\n        if (src.hasOwnProperty(prop)) {\n            if (target.prototype && target.prototype.constructor === target) {\n                // If the target object is a constructor override off prototype.\n                clobber(target.prototype, prop, src[prop]);\n            } else {\n                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n                    recursiveMerge(target[prop], src[prop]);\n                } else {\n                    clobber(target, prop, src[prop]);\n                }\n            }\n        }\n    }\n}\n\nexports.buildIntoButDoNotClobber = function(objects, target) {\n    include(target, objects, false, false);\n};\nexports.buildIntoAndClobber = function(objects, target) {\n    include(target, objects, true, false);\n};\nexports.buildIntoAndMerge = function(objects, target) {\n    include(target, objects, true, true);\n};\nexports.recursiveMerge = recursiveMerge;\nexports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;\nexports.replaceHookForTesting = function() {};\n\n});\n\n//@ sourceURL=src/common/builder.js")} catch(e) {console.log("exception: in src/common/builder.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/channel\", function(require, exports, module) {\n\nvar utils = require('cordova/utils'),\n    nextGuid = 1;\n\n/**\n * Custom pub-sub \"channel\" that can have functions subscribed to it\n * This object is used to define and control firing of events for\n * cordova initialization, as well as for custom events thereafter.\n *\n * The order of events during page load and Cordova startup is as follows:\n *\n * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.\n * onNativeReady*              Internal event that indicates the Cordova native side is ready.\n * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.\n * onDeviceReady*              User event fired to indicate that Cordova is ready\n * onResume                    User event fired to indicate a start/resume lifecycle event\n * onPause                     User event fired to indicate a pause lifecycle event\n * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).\n *\n * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.\n * All listeners that subscribe after the event is fired will be executed right away.\n *\n * The only Cordova events that user code should register for are:\n *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript\n *      pause                 App has moved to background\n *      resume                App has returned to foreground\n *\n * Listeners can be registered as:\n *      document.addEventListener(\"deviceready\", myDeviceReadyListener, false);\n *      document.addEventListener(\"resume\", myResumeListener, false);\n *      document.addEventListener(\"pause\", myPauseListener, false);\n *\n * The DOM lifecycle events should be used for saving and restoring state\n *      window.onload\n *      window.onunload\n *\n */\n\n/**\n * Channel\n * @constructor\n * @param type  String the channel name\n */\nvar Channel = function(type, sticky) {\n    this.type = type;\n    // Map of guid -> function.\n    this.handlers = {};\n    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.\n    this.state = sticky ? 1 : 0;\n    // Used in sticky mode to remember args passed to fire().\n    this.fireArgs = null;\n    // Used by onHasSubscribersChange to know if there are any listeners.\n    this.numHandlers = 0;\n    // Function that is called when the first listener is subscribed, or when\n    // the last listener is unsubscribed.\n    this.onHasSubscribersChange = null;\n},\n    channel = {\n        /**\n         * Calls the provided function only after all of the channels specified\n         * have been fired. All channels must be sticky channels.\n         */\n        join: function(h, c) {\n            var len = c.length,\n                i = len,\n                f = function() {\n                    if (!(--i)) h();\n                };\n            for (var j=0; j<len; j++) {\n                if (c[j].state === 0) {\n                    throw Error('Can only use join with sticky channels.');\n                }\n                c[j].subscribe(f);\n            }\n            if (!len) h();\n        },\n        create: function(type) {\n            return channel[type] = new Channel(type, false);\n        },\n        createSticky: function(type) {\n            return channel[type] = new Channel(type, true);\n        },\n\n        /**\n         * cordova Channels that must fire before \"deviceready\" is fired.\n         */\n        deviceReadyChannelsArray: [],\n        deviceReadyChannelsMap: {},\n\n        /**\n         * Indicate that a feature needs to be initialized before it is ready to be used.\n         * This holds up Cordova's \"deviceready\" event until the feature has been initialized\n         * and Cordova.initComplete(feature) is called.\n         *\n         * @param feature {String}     The unique feature name\n         */\n        waitForInitialization: function(feature) {\n            if (feature) {\n                var c = channel[feature] || this.createSticky(feature);\n                this.deviceReadyChannelsMap[feature] = c;\n                this.deviceReadyChannelsArray.push(c);\n            }\n        },\n\n        /**\n         * Indicate that initialization code has completed and the feature is ready to be used.\n         *\n         * @param feature {String}     The unique feature name\n         */\n        initializationComplete: function(feature) {\n            var c = this.deviceReadyChannelsMap[feature];\n            if (c) {\n                c.fire();\n            }\n        }\n    };\n\nfunction forceFunction(f) {\n    if (typeof f != 'function') throw \"Function required as first argument!\";\n}\n\n/**\n * Subscribes the given function to the channel. Any time that\n * Channel.fire is called so too will the function.\n * Optionally specify an execution context for the function\n * and a guid that can be used to stop subscribing to the channel.\n * Returns the guid.\n */\nChannel.prototype.subscribe = function(f, c) {\n    // need a function to call\n    forceFunction(f);\n    if (this.state == 2) {\n        f.apply(c || this, this.fireArgs);\n        return;\n    }\n\n    var func = f,\n        guid = f.observer_guid;\n    if (typeof c == \"object\") { func = utils.close(c, f); }\n\n    if (!guid) {\n        // first time any channel has seen this subscriber\n        guid = '' + nextGuid++;\n    }\n    func.observer_guid = guid;\n    f.observer_guid = guid;\n\n    // Don't add the same handler more than once.\n    if (!this.handlers[guid]) {\n        this.handlers[guid] = func;\n        this.numHandlers++;\n        if (this.numHandlers == 1) {\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n/**\n * Unsubscribes the function with the given guid from the channel.\n */\nChannel.prototype.unsubscribe = function(f) {\n    // need a function to unsubscribe\n    forceFunction(f);\n\n    var guid = f.observer_guid,\n        handler = this.handlers[guid];\n    if (handler) {\n        delete this.handlers[guid];\n        this.numHandlers--;\n        if (this.numHandlers === 0) {\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n/**\n * Calls all functions subscribed to this channel.\n */\nChannel.prototype.fire = function(e) {\n    var fail = false,\n        fireArgs = Array.prototype.slice.call(arguments);\n    // Apply stickiness.\n    if (this.state == 1) {\n        this.state = 2;\n        this.fireArgs = fireArgs;\n    }\n    if (this.numHandlers) {\n        // Copy the values first so that it is safe to modify it from within\n        // callbacks.\n        var toCall = [];\n        for (var item in this.handlers) {\n            toCall.push(this.handlers[item]);\n        }\n        for (var i = 0; i < toCall.length; ++i) {\n            toCall[i].apply(this, fireArgs);\n        }\n        if (this.state == 2 && this.numHandlers) {\n            this.numHandlers = 0;\n            this.handlers = {};\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n\n// defining them here so they are ready super fast!\n// DOM event that is received when the web page is loaded and parsed.\nchannel.createSticky('onDOMContentLoaded');\n\n// Event to indicate the Cordova native side is ready.\nchannel.createSticky('onNativeReady');\n\n// Event to indicate that all Cordova JavaScript objects have been created\n// and it's time to run plugin constructors.\nchannel.createSticky('onCordovaReady');\n\n// Event to indicate that all automatically loaded JS plugins are loaded and ready.\nchannel.createSticky('onPluginsReady');\n\n// Event to indicate that Cordova is ready\nchannel.createSticky('onDeviceReady');\n\n// Event to indicate a resume lifecycle event\nchannel.create('onResume');\n\n// Event to indicate a pause lifecycle event\nchannel.create('onPause');\n\n// Event to indicate a destroy lifecycle event\nchannel.createSticky('onDestroy');\n\n// Channels that must fire before \"deviceready\" is fired.\nchannel.waitForInitialization('onCordovaReady');\nchannel.waitForInitialization('onDOMContentLoaded');\n\nmodule.exports = channel;\n\n});\n\n//@ sourceURL=src/common/channel.js")} catch(e) {console.log("exception: in src/common/channel.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/exec\", function(require, exports, module) {\n\nvar cordova = require('cordova');\nvar execProxy = require('cordova/exec/proxy');\n\nmodule.exports = function(success, fail, service, action, args) {\n\n    var proxy = execProxy.get(service, action);\n\n    if (proxy) {\n        var callbackId = service + cordova.callbackId++;\n\n        if (typeof success == \"function\" || typeof fail == \"function\") {\n            cordova.callbacks[callbackId] = {success:success, fail:fail};\n        }\n\n        try {\n            proxy(success, fail, args);\n        }\n        catch(e) {\n            // TODO throw maybe?\n            var msg = \"Exception calling :: \" + service + \" :: \" + action  + \" ::exception=\" + e;\n            console.log(msg);\n        }\n    }\n    else {\n        fail && fail(\"Missing Command Error\");\n    }\n};\n\n});\n\n//@ sourceURL=src/browser/exec.js")} catch(e) {console.log("exception: in src/browser/exec.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/exec/proxy\", function(require, exports, module) {\n\n\n// internal map of proxy function\nvar CommandProxyMap = {};\n\nmodule.exports = {\n\n    // example: cordova.commandProxy.add(\"Accelerometer\",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);\n    add:function(id,proxyObj) {\n        console.log(\"adding proxy for \" + id);\n        CommandProxyMap[id] = proxyObj;\n        return proxyObj;\n    },\n\n    // cordova.commandProxy.remove(\"Accelerometer\");\n    remove:function(id) {\n        var proxy = CommandProxyMap[id];\n        delete CommandProxyMap[id];\n        CommandProxyMap[id] = null;\n        return proxy;\n    },\n\n    get:function(service,action) {\n        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );\n    }\n};\n});\n\n//@ sourceURL=src/common/exec/proxy.js")} catch(e) {console.log("exception: in src/common/exec/proxy.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/init\", function(require, exports, module) {\n\nvar channel = require('cordova/channel');\nvar cordova = require('cordova');\nvar modulemapper = require('cordova/modulemapper');\nvar platform = require('cordova/platform');\nvar pluginloader = require('cordova/pluginloader');\n\nvar platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];\n\nfunction logUnfiredChannels(arr) {\n    for (var i = 0; i < arr.length; ++i) {\n        if (arr[i].state != 2) {\n            console.log('Channel not fired: ' + arr[i].type);\n        }\n    }\n}\n\nwindow.setTimeout(function() {\n    if (channel.onDeviceReady.state != 2) {\n        console.log('deviceready has not fired after 5 seconds.');\n        logUnfiredChannels(platformInitChannelsArray);\n        logUnfiredChannels(channel.deviceReadyChannelsArray);\n    }\n}, 5000);\n\n// Replace navigator before any modules are required(), to ensure it happens as soon as possible.\n// We replace it so that properties that can't be clobbered can instead be overridden.\nfunction replaceNavigator(origNavigator) {\n    var CordovaNavigator = function() {};\n    CordovaNavigator.prototype = origNavigator;\n    var newNavigator = new CordovaNavigator();\n    // This work-around really only applies to new APIs that are newer than Function.bind.\n    // Without it, APIs such as getGamepads() break.\n    if (CordovaNavigator.bind) {\n        for (var key in origNavigator) {\n            if (typeof origNavigator[key] == 'function') {\n                newNavigator[key] = origNavigator[key].bind(origNavigator);\n            }\n        }\n    }\n    return newNavigator;\n}\nif (window.navigator) {\n    window.navigator = replaceNavigator(window.navigator);\n}\n\nif (!window.console) {\n    window.console = {\n        log: function(){}\n    };\n}\nif (!window.console.warn) {\n    window.console.warn = function(msg) {\n        this.log(\"warn: \" + msg);\n    };\n}\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\n// Listen for DOMContentLoaded and notify our channel subscribers.\nif (document.readyState == 'complete' || document.readyState == 'interactive') {\n    channel.onDOMContentLoaded.fire();\n} else {\n    document.addEventListener('DOMContentLoaded', function() {\n        channel.onDOMContentLoaded.fire();\n    }, false);\n}\n\n// _nativeReady is global variable that the native side can set\n// to signify that the native code is ready. It is a global since\n// it may be called before any cordova JS is ready.\nif (window._nativeReady) {\n    channel.onNativeReady.fire();\n}\n\nmodulemapper.clobbers('cordova', 'cordova');\nmodulemapper.clobbers('cordova/exec', 'cordova.exec');\nmodulemapper.clobbers('cordova/exec', 'Cordova.exec');\n\n// Call the platform-specific initialization.\nplatform.bootstrap && platform.bootstrap();\n\npluginloader.load(function() {\n    channel.onPluginsReady.fire();\n});\n\n/**\n * Create all cordova objects once native side is ready.\n */\nchannel.join(function() {\n    modulemapper.mapModules(window);\n\n    platform.initialize && platform.initialize();\n\n    // Fire event to notify that all objects are created\n    channel.onCordovaReady.fire();\n\n    // Fire onDeviceReady event once page has fully loaded, all\n    // constructors have run and cordova info has been received from native\n    // side.\n    channel.join(function() {\n        require('cordova').fireDocumentEvent('deviceready');\n    }, channel.deviceReadyChannelsArray);\n\n}, platformInitChannelsArray);\n\n\n});\n\n//@ sourceURL=src/common/init.js")} catch(e) {console.log("exception: in src/common/init.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/modulemapper\", function(require, exports, module) {\n\nvar builder = require('cordova/builder'),\n    moduleMap = define.moduleMap,\n    symbolList,\n    deprecationMap;\n\nexports.reset = function() {\n    symbolList = [];\n    deprecationMap = {};\n};\n\nfunction addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {\n    if (!(moduleName in moduleMap)) {\n        throw new Error('Module ' + moduleName + ' does not exist.');\n    }\n    symbolList.push(strategy, moduleName, symbolPath);\n    if (opt_deprecationMessage) {\n        deprecationMap[symbolPath] = opt_deprecationMessage;\n    }\n}\n\n// Note: Android 2.3 does have Function.bind().\nexports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.runs = function(moduleName) {\n    addEntry('r', moduleName, null);\n};\n\nfunction prepareNamespace(symbolPath, context) {\n    if (!symbolPath) {\n        return context;\n    }\n    var parts = symbolPath.split('.');\n    var cur = context;\n    for (var i = 0, part; part = parts[i]; ++i) {\n        cur = cur[part] = cur[part] || {};\n    }\n    return cur;\n}\n\nexports.mapModules = function(context) {\n    var origSymbols = {};\n    context.CDV_origSymbols = origSymbols;\n    for (var i = 0, len = symbolList.length; i < len; i += 3) {\n        var strategy = symbolList[i];\n        var moduleName = symbolList[i + 1];\n        var module = require(moduleName);\n        // <runs/>\n        if (strategy == 'r') {\n            continue;\n        }\n        var symbolPath = symbolList[i + 2];\n        var lastDot = symbolPath.lastIndexOf('.');\n        var namespace = symbolPath.substr(0, lastDot);\n        var lastName = symbolPath.substr(lastDot + 1);\n\n        var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;\n        var parentObj = prepareNamespace(namespace, context);\n        var target = parentObj[lastName];\n\n        if (strategy == 'm' && target) {\n            builder.recursiveMerge(target, module);\n        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {\n            if (!(symbolPath in origSymbols)) {\n                origSymbols[symbolPath] = target;\n            }\n            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);\n        }\n    }\n};\n\nexports.getOriginalSymbol = function(context, symbolPath) {\n    var origSymbols = context.CDV_origSymbols;\n    if (origSymbols && (symbolPath in origSymbols)) {\n        return origSymbols[symbolPath];\n    }\n    var parts = symbolPath.split('.');\n    var obj = context;\n    for (var i = 0; i < parts.length; ++i) {\n        obj = obj && obj[parts[i]];\n    }\n    return obj;\n};\n\nexports.reset();\n\n\n});\n\n//@ sourceURL=src/common/modulemapper.js")} catch(e) {console.log("exception: in src/common/modulemapper.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/platform\", function(require, exports, module) {\n\nmodule.exports = {\n    id: 'browser',\n    cordovaVersion: '3.4.0',\n\n    bootstrap: function() {\n\n        var moduleMapper = require('cordova/modulemapper');\n        var channel = require('cordova/channel');\n\n        moduleMapper.clobbers('cordova/exec/proxy', 'cordova.commandProxy');\n\n        channel.onPluginsReady.subscribe(function () {\n            channel.onNativeReady.fire();\n        });\n\n        // FIXME is this the right place to clobber pause/resume? I am guessing not\n        // FIXME pause/resume should be deprecated IN CORDOVA for pagevisiblity api\n        document.addEventListener('webkitvisibilitychange', function() {\n            if (document.webkitHidden) {\n                channel.onPause.fire();\n            }\n            else {\n                channel.onResume.fire();\n            }\n        }, false);\n\n    // End of bootstrap\n    }\n};\n\n});\n\n//@ sourceURL=src/browser/platform.js")} catch(e) {console.log("exception: in src/browser/platform.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/pluginloader\", function(require, exports, module) {\n\nvar modulemapper = require('cordova/modulemapper');\nvar urlutil = require('cordova/urlutil');\n\n// Helper function to inject a <script> tag.\nfunction injectScript(url, onload, onerror) {\n    var script = document.createElement(\"script\");\n    // onload fires even when script fails loads with an error.\n    script.onload = onload;\n    script.onerror = onerror || onload;\n    script.src = url;\n    document.head.appendChild(script);\n}\n\nfunction onScriptLoadingComplete(moduleList, finishPluginLoading) {\n    // Loop through all the plugins and then through their clobbers and merges.\n    for (var i = 0, module; module = moduleList[i]; i++) {\n        if (module) {\n            try {\n                if (module.clobbers && module.clobbers.length) {\n                    for (var j = 0; j < module.clobbers.length; j++) {\n                        modulemapper.clobbers(module.id, module.clobbers[j]);\n                    }\n                }\n\n                if (module.merges && module.merges.length) {\n                    for (var k = 0; k < module.merges.length; k++) {\n                        modulemapper.merges(module.id, module.merges[k]);\n                    }\n                }\n\n                // Finally, if runs is truthy we want to simply require() the module.\n                // This can be skipped if it had any merges or clobbers, though,\n                // since the mapper will already have required the module.\n                if (module.runs && !(module.clobbers && module.clobbers.length) && !(module.merges && module.merges.length)) {\n                    modulemapper.runs(module.id);\n                }\n            }\n            catch(err) {\n                // error with module, most likely clobbers, should we continue?\n            }\n        }\n    }\n\n    finishPluginLoading();\n}\n\n// Handler for the cordova_plugins.js content.\n// See plugman's plugin_loader.js for the details of this object.\n// This function is only called if the really is a plugins array that isn't empty.\n// Otherwise the onerror response handler will just call finishPluginLoading().\nfunction handlePluginsObject(path, moduleList, finishPluginLoading) {\n    // Now inject the scripts.\n    var scriptCounter = moduleList.length;\n\n    if (!scriptCounter) {\n        finishPluginLoading();\n        return;\n    }\n    function scriptLoadedCallback() {\n        if (!--scriptCounter) {\n            onScriptLoadingComplete(moduleList, finishPluginLoading);\n        }\n    }\n\n    for (var i = 0; i < moduleList.length; i++) {\n        injectScript(path + moduleList[i].file, scriptLoadedCallback);\n    }\n}\n\nfunction injectPluginScript(pathPrefix, finishPluginLoading) {\n    var pluginPath = pathPrefix + 'cordova_plugins.js';\n\n    injectScript(pluginPath, function() {\n        try {\n            var moduleList = require(\"cordova/plugin_list\");\n            handlePluginsObject(pathPrefix, moduleList, finishPluginLoading);\n        }\n        catch (e) {\n            // Error loading cordova_plugins.js, file not found or something\n            // this is an acceptable error, pre-3.0.0, so we just move on.\n            finishPluginLoading();\n        }\n    }, finishPluginLoading); // also, add script load error handler for file not found\n}\n\nfunction findCordovaPath() {\n    var path = null;\n    var scripts = document.getElementsByTagName('script');\n    var term = 'cordova.js';\n    for (var n = scripts.length-1; n>-1; n--) {\n        var src = scripts[n].src;\n        if (src.indexOf(term) == (src.length - term.length)) {\n            path = src.substring(0, src.length - term.length);\n            break;\n        }\n    }\n    return path;\n}\n\n// Tries to load all plugins' js-modules.\n// This is an async process, but onDeviceReady is blocked on onPluginsReady.\n// onPluginsReady is fired when there are no plugins to load, or they are all done.\nexports.load = function(callback) {\n    var pathPrefix = findCordovaPath();\n    if (pathPrefix === null) {\n        console.log('Could not find cordova.js script tag. Plugin loading may fail.');\n        pathPrefix = '';\n    }\n    injectPluginScript(pathPrefix, callback);\n};\n\n\n});\n\n//@ sourceURL=src/common/pluginloader.js")} catch(e) {console.log("exception: in src/common/pluginloader.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/urlutil\", function(require, exports, module) {\n\n\n/**\n * For already absolute URLs, returns what is passed in.\n * For relative URLs, converts them to absolute ones.\n */\nexports.makeAbsolute = function makeAbsolute(url) {\n    var anchorEl = document.createElement('a');\n    anchorEl.href = url;\n    return anchorEl.href;\n};\n\n\n});\n\n//@ sourceURL=src/common/urlutil.js")} catch(e) {console.log("exception: in src/common/urlutil.js: " + e);console.log(e.stack);}
  try {eval("define(\"cordova/utils\", function(require, exports, module) {\n\nvar utils = exports;\n\n/**\n * Defines a property getter / setter for obj[key].\n */\nutils.defineGetterSetter = function(obj, key, getFunc, opt_setFunc) {\n    if (Object.defineProperty) {\n        var desc = {\n            get: getFunc,\n            configurable: true\n        };\n        if (opt_setFunc) {\n            desc.set = opt_setFunc;\n        }\n        Object.defineProperty(obj, key, desc);\n    } else {\n        obj.__defineGetter__(key, getFunc);\n        if (opt_setFunc) {\n            obj.__defineSetter__(key, opt_setFunc);\n        }\n    }\n};\n\n/**\n * Defines a property getter for obj[key].\n */\nutils.defineGetter = utils.defineGetterSetter;\n\nutils.arrayIndexOf = function(a, item) {\n    if (a.indexOf) {\n        return a.indexOf(item);\n    }\n    var len = a.length;\n    for (var i = 0; i < len; ++i) {\n        if (a[i] == item) {\n            return i;\n        }\n    }\n    return -1;\n};\n\n/**\n * Returns whether the item was found in the array.\n */\nutils.arrayRemove = function(a, item) {\n    var index = utils.arrayIndexOf(a, item);\n    if (index != -1) {\n        a.splice(index, 1);\n    }\n    return index != -1;\n};\n\nutils.typeName = function(val) {\n    return Object.prototype.toString.call(val).slice(8, -1);\n};\n\n/**\n * Returns an indication of whether the argument is an array or not\n */\nutils.isArray = function(a) {\n    return utils.typeName(a) == 'Array';\n};\n\n/**\n * Returns an indication of whether the argument is a Date or not\n */\nutils.isDate = function(d) {\n    return utils.typeName(d) == 'Date';\n};\n\n/**\n * Does a deep clone of the object.\n */\nutils.clone = function(obj) {\n    if(!obj || typeof obj == 'function' || utils.isDate(obj) || typeof obj != 'object') {\n        return obj;\n    }\n\n    var retVal, i;\n\n    if(utils.isArray(obj)){\n        retVal = [];\n        for(i = 0; i < obj.length; ++i){\n            retVal.push(utils.clone(obj[i]));\n        }\n        return retVal;\n    }\n\n    retVal = {};\n    for(i in obj){\n        if(!(i in retVal) || retVal[i] != obj[i]) {\n            retVal[i] = utils.clone(obj[i]);\n        }\n    }\n    return retVal;\n};\n\n/**\n * Returns a wrapped version of the function\n */\nutils.close = function(context, func, params) {\n    if (typeof params == 'undefined') {\n        return function() {\n            return func.apply(context, arguments);\n        };\n    } else {\n        return function() {\n            return func.apply(context, params);\n        };\n    }\n};\n\n/**\n * Create a UUID\n */\nutils.createUUID = function() {\n    return UUIDcreatePart(4) + '-' +\n        UUIDcreatePart(2) + '-' +\n        UUIDcreatePart(2) + '-' +\n        UUIDcreatePart(2) + '-' +\n        UUIDcreatePart(6);\n};\n\n/**\n * Extends a child object from a parent object using classical inheritance\n * pattern.\n */\nutils.extend = (function() {\n    // proxy used to establish prototype chain\n    var F = function() {};\n    // extend Child from Parent\n    return function(Child, Parent) {\n        F.prototype = Parent.prototype;\n        Child.prototype = new F();\n        Child.__super__ = Parent.prototype;\n        Child.prototype.constructor = Child;\n    };\n}());\n\n/**\n * Alerts a message in any available way: alert or console.log.\n */\nutils.alert = function(msg) {\n    if (window.alert) {\n        window.alert(msg);\n    } else if (console && console.log) {\n        console.log(msg);\n    }\n};\n\n\n//------------------------------------------------------------------------------\nfunction UUIDcreatePart(length) {\n    var uuidpart = \"\";\n    for (var i=0; i<length; i++) {\n        var uuidchar = parseInt((Math.random() * 256), 10).toString(16);\n        if (uuidchar.length == 1) {\n            uuidchar = \"0\" + uuidchar;\n        }\n        uuidpart += uuidchar;\n    }\n    return uuidpart;\n}\n\n\n});\n\n//@ sourceURL=src/common/utils.js")} catch(e) {console.log("exception: in src/common/utils.js: " + e);console.log(e.stack);}
  window.cordova = require('cordova');
  try {eval("\nrequire('cordova/init');\n\n//@ sourceURL=src/scripts/bootstrap.js")} catch(e) {console.log("exception: in src/scripts/bootstrap.js: " + e);console.log(e.stack);}
  })();