From 179caec38946fe8bc621070253055b833488cde0 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Tue, 9 Apr 2019 20:33:36 -0400 Subject: [PATCH] Update to new android cordova build Signed-off-by: Chris Cromer --- config.xml | 2 - node_modules/cordova-android/.eslintignore | 3 +- .../.github/PULL_REQUEST_TEMPLATE.md | 27 +- node_modules/cordova-android/.travis.yml | 37 +- node_modules/cordova-android/CONTRIBUTING.md | 1 - node_modules/cordova-android/README.md | 3 - node_modules/cordova-android/RELEASENOTES.md | 81 +- node_modules/cordova-android/VERSION | 2 +- node_modules/cordova-android/appveyor.yml | 58 +- .../cordova-android/bin/android_sdk_version | 4 +- node_modules/cordova-android/bin/check_reqs | 5 +- node_modules/cordova-android/bin/create | 12 +- .../cordova-android/bin/lib/create.js | 11 +- .../bin/templates/cordova/Api.js | 79 +- .../bin/templates/cordova/build | 25 +- .../bin/templates/cordova/clean | 18 +- .../bin/templates/cordova/lib/Adb.js | 8 +- .../templates/cordova/lib/AndroidManifest.js | 6 +- .../templates/cordova/lib/AndroidProject.js | 11 +- .../templates/cordova/lib/AndroidStudio.js | 11 - .../bin/templates/cordova/lib/android_sdk.js | 3 +- .../bin/templates/cordova/lib/build.js | 32 +- .../cordova/lib/builders/GenericBuilder.js | 124 - .../cordova/lib/builders/GradleBuilder.js | 331 - .../cordova/lib/builders/StudioBuilder.js | 303 - .../cordova/lib/builders/builders.js | 54 +- .../bin/templates/cordova/lib/check_reqs.js | 30 +- .../bin/templates/cordova/lib/device.js | 11 +- .../bin/templates/cordova/lib/emulator.js | 60 +- .../bin/templates/cordova/lib/install-device | 16 +- .../templates/cordova/lib/install-emulator | 14 +- .../bin/templates/cordova/lib/list-devices | 8 +- .../cordova/lib/list-emulator-images | 8 +- .../cordova/lib/list-started-emulators | 8 +- .../bin/templates/cordova/lib/log.js | 2 +- .../templates/cordova/lib/plugin-build.gradle | 7 +- .../templates/cordova/lib/pluginHandlers.js | 77 +- .../bin/templates/cordova/lib/prepare.js | 289 +- .../bin/templates/cordova/lib/retry.js | 20 +- .../bin/templates/cordova/lib/run.js | 15 +- .../bin/templates/cordova/lib/start-emulator | 15 +- .../cordova-android/bin/templates/cordova/log | 12 +- .../cordova-android/bin/templates/cordova/run | 29 +- .../bin/templates/cordova/version | 2 +- .../bin/templates/project/AndroidManifest.xml | 2 +- .../bin/templates/project/app/build.gradle | 41 +- .../templates/project/assets/www/cordova.js | 297 +- .../bin/templates/project/build.gradle | 20 +- .../bin/templates/project/gitignore | 9 +- .../bin/templates/project/legacy/build.gradle | 2 +- .../project/res/mipmap-hdpi/icon.png | Bin 3345 -> 0 bytes .../project/res/mipmap-ldpi/icon.png | Bin 1821 -> 0 bytes .../project/res/mipmap-mdpi/icon.png | Bin 2368 -> 0 bytes .../project/res/mipmap-xhdpi/icon.png | Bin 4085 -> 0 bytes .../project/res/mipmap-xxhdpi/icon.png | Bin 6421 -> 0 bytes .../project/res/mipmap-xxxhdpi/icon.png | Bin 7934 -> 0 bytes node_modules/cordova-android/bin/update | 8 +- .../cordova-android/framework/build.gradle | 27 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../framework/project.properties | 13 +- .../org/apache/cordova/CordovaWebView.java | 2 +- .../apache/cordova/CordovaWebViewImpl.java | 2 + .../src/org/apache/cordova/CoreAndroid.java | 21 +- .../cordova/engine/SystemCookieManager.java | 6 +- .../cordova/engine/SystemWebChromeClient.java | 3 + .../cordova/engine/SystemWebViewClient.java | 5 +- .../cordova-android/node_modules/.bin/nopt | 1 - .../cordova-android/node_modules/.bin/semver | 1 - .../cordova-android/node_modules/.bin/shjs | 1 - .../node_modules/abbrev/LICENSE | 46 - .../node_modules/abbrev/README.md | 23 - .../node_modules/abbrev/abbrev.js | 61 - .../node_modules/abbrev/package.json | 57 - .../android-versions/.jshintignore | 8 - .../node_modules/android-versions/.jshintrc | 29 - .../node_modules/android-versions/.travis.yml | 3 - .../node_modules/android-versions/README.md | 87 - .../node_modules/android-versions/index.js | 161 - .../android-versions/package.json | 67 - .../android-versions/tests/index.test.js | 118 - .../node_modules/ansi/.jshintrc | 4 - .../node_modules/ansi/.npmignore | 1 - .../node_modules/ansi/History.md | 23 - .../cordova-android/node_modules/ansi/LICENSE | 24 - .../node_modules/ansi/README.md | 98 - .../node_modules/ansi/examples/beep/index.js | 16 - .../node_modules/ansi/examples/clear/index.js | 15 - .../ansi/examples/cursorPosition.js | 32 - .../ansi/examples/progress/index.js | 87 - .../node_modules/ansi/lib/ansi.js | 405 - .../node_modules/ansi/lib/newlines.js | 71 - .../node_modules/ansi/package.json | 56 - .../node_modules/balanced-match/.npmignore | 5 - .../node_modules/balanced-match/LICENSE.md | 21 - .../node_modules/balanced-match/README.md | 91 - .../node_modules/balanced-match/index.js | 59 - .../node_modules/balanced-match/package.json | 78 - .../node_modules/base64-js/LICENSE | 21 - .../node_modules/base64-js/README.md | 32 - .../node_modules/base64-js/base64js.min.js | 1 - .../node_modules/base64-js/index.js | 114 - .../node_modules/base64-js/package.json | 66 - .../node_modules/base64-js/test/big-data.js | 24 - .../node_modules/base64-js/test/convert.js | 48 - .../node_modules/base64-js/test/url-safe.js | 18 - .../node_modules/big-integer/BigInteger.d.ts | 2385 ----- .../node_modules/big-integer/BigInteger.js | 1308 --- .../big-integer/BigInteger.min.js | 1 - .../node_modules/big-integer/LICENSE | 24 - .../node_modules/big-integer/README.md | 570 -- .../node_modules/big-integer/bower.json | 29 - .../node_modules/big-integer/package.json | 81 - .../node_modules/big-integer/tsconfig.json | 25 - .../node_modules/bplist-parser/.npmignore | 8 - .../node_modules/bplist-parser/README.md | 47 - .../bplist-parser/bplistParser.js | 357 - .../node_modules/bplist-parser/package.json | 59 - .../bplist-parser/test/airplay.bplist | Bin 341 -> 0 bytes .../bplist-parser/test/iTunes-small.bplist | Bin 24433 -> 0 bytes .../bplist-parser/test/int64.bplist | Bin 84 -> 0 bytes .../node_modules/bplist-parser/test/int64.xml | 10 - .../bplist-parser/test/parseTest.js | 159 - .../bplist-parser/test/sample1.bplist | Bin 605 -> 0 bytes .../bplist-parser/test/sample2.bplist | Bin 384 -> 0 bytes .../bplist-parser/test/uid.bplist | Bin 365 -> 0 bytes .../bplist-parser/test/utf16.bplist | Bin 1273 -> 0 bytes .../bplist-parser/test/utf16_chinese.plist | Bin 2362 -> 0 bytes .../node_modules/brace-expansion/LICENSE | 21 - .../node_modules/brace-expansion/README.md | 129 - .../node_modules/brace-expansion/index.js | 201 - .../node_modules/brace-expansion/package.json | 76 - .../node_modules/concat-map/.travis.yml | 4 - .../node_modules/concat-map/LICENSE | 18 - .../node_modules/concat-map/README.markdown | 62 - .../node_modules/concat-map/index.js | 13 - .../node_modules/concat-map/package.json | 89 - .../node_modules/concat-map/test/map.js | 39 - .../node_modules/cordova-common/.eslintignore | 1 - .../node_modules/cordova-common/.eslintrc.yml | 13 - .../.github/PULL_REQUEST_TEMPLATE.md | 22 - .../node_modules/cordova-common/.npmignore | 2 - .../node_modules/cordova-common/.ratignore | 4 - .../node_modules/cordova-common/.travis.yml | 17 - .../node_modules/cordova-common/README.md | 155 - .../cordova-common/RELEASENOTES.md | 153 - .../node_modules/cordova-common/appveyor.yml | 20 - .../cordova-common/cordova-common.js | 47 - .../node_modules/cordova-common/package.json | 81 - .../cordova-common/src/ActionStack.js | 85 - .../src/ConfigChanges/ConfigChanges.js | 426 - .../src/ConfigChanges/ConfigFile.js | 259 - .../src/ConfigChanges/ConfigKeeper.js | 64 - .../src/ConfigChanges/munge-util.js | 162 - .../src/ConfigParser/ConfigParser.js | 602 -- .../cordova-common/src/CordovaCheck.js | 76 - .../src/CordovaError/CordovaError.js | 92 - .../CordovaExternalToolErrorContext.js | 48 - .../cordova-common/src/CordovaLogger.js | 220 - .../cordova-common/src/FileUpdater.js | 415 - .../cordova-common/src/PlatformJson.js | 277 - .../src/PluginInfo/PluginInfo.js | 439 - .../src/PluginInfo/PluginInfoProvider.js | 82 - .../cordova-common/src/PluginManager.js | 149 - .../node_modules/cordova-common/src/events.js | 72 - .../cordova-common/src/superspawn.js | 189 - .../cordova-common/src/util/addProperty.js | 32 - .../cordova-common/src/util/plist-helpers.js | 96 - .../cordova-common/src/util/xml-helpers.js | 365 - .../cordova-registry-mapper/.npmignore | 1 - .../cordova-registry-mapper/.travis.yml | 7 - .../cordova-registry-mapper/README.md | 14 - .../cordova-registry-mapper/index.js | 204 - .../cordova-registry-mapper/package.json | 54 - .../cordova-registry-mapper/tests/test.js | 11 - .../node_modules/elementtree/.npmignore | 1 - .../node_modules/elementtree/.travis.yml | 10 - .../node_modules/elementtree/CHANGES.md | 39 - .../node_modules/elementtree/LICENSE.txt | 203 - .../node_modules/elementtree/Makefile | 21 - .../node_modules/elementtree/NOTICE | 5 - .../node_modules/elementtree/README.md | 141 - .../node_modules/elementtree/lib/constants.js | 20 - .../elementtree/lib/elementpath.js | 343 - .../elementtree/lib/elementtree.js | 611 -- .../node_modules/elementtree/lib/errors.js | 31 - .../node_modules/elementtree/lib/parser.js | 33 - .../elementtree/lib/parsers/index.js | 1 - .../elementtree/lib/parsers/sax.js | 56 - .../node_modules/elementtree/lib/sprintf.js | 86 - .../elementtree/lib/treebuilder.js | 60 - .../node_modules/elementtree/lib/utils.js | 72 - .../node_modules/elementtree/package.json | 81 - .../elementtree/tests/data/xml1.xml | 17 - .../elementtree/tests/data/xml2.xml | 14 - .../elementtree/tests/test-simple.js | 339 - .../cordova-android/node_modules/glob/LICENSE | 15 - .../node_modules/glob/README.md | 377 - .../node_modules/glob/common.js | 245 - .../cordova-android/node_modules/glob/glob.js | 752 -- .../node_modules/glob/package.json | 76 - .../cordova-android/node_modules/glob/sync.js | 460 - .../node_modules/inflight/LICENSE | 15 - .../node_modules/inflight/README.md | 37 - .../node_modules/inflight/inflight.js | 54 - .../node_modules/inflight/package.json | 59 - .../node_modules/inherits/LICENSE | 16 - .../node_modules/inherits/README.md | 42 - .../node_modules/inherits/inherits.js | 7 - .../node_modules/inherits/inherits_browser.js | 23 - .../node_modules/inherits/package.json | 62 - .../node_modules/minimatch/LICENSE | 15 - .../node_modules/minimatch/README.md | 209 - .../node_modules/minimatch/minimatch.js | 923 -- .../node_modules/minimatch/package.json | 65 - .../node_modules/nopt/.npmignore | 1 - .../cordova-android/node_modules/nopt/LICENSE | 23 - .../node_modules/nopt/README.md | 209 - .../node_modules/nopt/bin/nopt.js | 54 - .../node_modules/nopt/examples/my-program.js | 30 - .../node_modules/nopt/lib/nopt.js | 414 - .../node_modules/nopt/package.json | 60 - .../node_modules/nopt/test/basic.js | 251 - .../cordova-android/node_modules/once/LICENSE | 15 - .../node_modules/once/README.md | 79 - .../cordova-android/node_modules/once/once.js | 42 - .../node_modules/once/package.json | 68 - .../node_modules/path-is-absolute/index.js | 20 - .../node_modules/path-is-absolute/license | 21 - .../path-is-absolute/package.json | 76 - .../node_modules/path-is-absolute/readme.md | 59 - .../node_modules/plist/.jshintrc | 4 - .../node_modules/plist/.travis.yml | 43 - .../node_modules/plist/History.md | 149 - .../node_modules/plist/LICENSE | 24 - .../node_modules/plist/Makefile | 76 - .../node_modules/plist/README.md | 141 - .../node_modules/plist/dist/plist-build.js | 3982 -------- .../node_modules/plist/dist/plist-parse.js | 4055 --------- .../node_modules/plist/dist/plist.js | 7987 ---------------- .../plist/examples/browser/index.html | 14 - .../node_modules/plist/index.js | 13 - .../node_modules/plist/lib/build.js | 137 - .../node_modules/plist/lib/parse.js | 215 - .../node_modules/plist/package.json | 86 - .../properties-parser/README.markdown | 48 - .../node_modules/properties-parser/index.js | 354 - .../properties-parser/package.json | 57 - .../properties-parser/play-ground.js | 17 - .../cordova-android/node_modules/q/CHANGES.md | 786 -- .../cordova-android/node_modules/q/LICENSE | 18 - .../cordova-android/node_modules/q/README.md | 881 -- .../node_modules/q/package.json | 120 - .../cordova-android/node_modules/q/q.js | 2048 ----- .../cordova-android/node_modules/q/queue.js | 35 - .../cordova-android/node_modules/sax/AUTHORS | 9 - .../cordova-android/node_modules/sax/LICENSE | 23 - .../node_modules/sax/README.md | 213 - .../sax/examples/big-not-pretty.xml | 8002 ----------------- .../node_modules/sax/examples/example.js | 41 - .../node_modules/sax/examples/get-products.js | 58 - .../node_modules/sax/examples/hello-world.js | 4 - .../node_modules/sax/examples/not-pretty.xml | 8 - .../node_modules/sax/examples/pretty-print.js | 74 - .../node_modules/sax/examples/shopping.xml | 2 - .../node_modules/sax/examples/strict.dtd | 870 -- .../node_modules/sax/examples/switch-bench.js | 45 - .../node_modules/sax/examples/test.html | 15 - .../node_modules/sax/examples/test.xml | 1254 --- .../node_modules/sax/lib/sax.js | 1006 --- .../node_modules/sax/package.json | 89 - .../node_modules/sax/test/buffer-overrun.js | 25 - .../node_modules/sax/test/cdata-chunked.js | 11 - .../node_modules/sax/test/cdata-end-split.js | 15 - .../node_modules/sax/test/cdata-fake-end.js | 28 - .../node_modules/sax/test/cdata-multiple.js | 15 - .../node_modules/sax/test/cdata.js | 10 - .../node_modules/sax/test/index.js | 86 - .../node_modules/sax/test/issue-23.js | 43 - .../node_modules/sax/test/issue-30.js | 24 - .../node_modules/sax/test/issue-35.js | 15 - .../node_modules/sax/test/issue-47.js | 13 - .../node_modules/sax/test/issue-49.js | 31 - .../node_modules/sax/test/parser-position.js | 28 - .../node_modules/sax/test/script.js | 12 - .../sax/test/self-closing-child-strict.js | 40 - .../sax/test/self-closing-child.js | 40 - .../node_modules/sax/test/self-closing-tag.js | 25 - .../node_modules/sax/test/stray-ending.js | 17 - .../sax/test/trailing-non-whitespace.js | 17 - .../node_modules/sax/test/unquoted.js | 17 - .../node_modules/sax/test/xmlns-issue-41.js | 67 - .../node_modules/sax/test/xmlns-rebinding.js | 59 - .../node_modules/sax/test/xmlns-strict.js | 71 - .../node_modules/sax/test/xmlns-unbound.js | 15 - .../xmlns-xml-default-prefix-attribute.js | 35 - .../sax/test/xmlns-xml-default-prefix.js | 20 - .../sax/test/xmlns-xml-default-redefine.js | 40 - .../node_modules/semver/LICENSE | 15 - .../node_modules/semver/README.md | 388 - .../node_modules/semver/bin/semver | 143 - .../node_modules/semver/package.json | 55 - .../node_modules/semver/range.bnf | 16 - .../node_modules/semver/semver.js | 1324 --- .../node_modules/shelljs/.documentup.json | 6 - .../node_modules/shelljs/.jshintrc | 7 - .../node_modules/shelljs/.npmignore | 2 - .../node_modules/shelljs/.travis.yml | 6 - .../node_modules/shelljs/LICENSE | 26 - .../node_modules/shelljs/README.md | 579 -- .../node_modules/shelljs/RELEASE.md | 9 - .../node_modules/shelljs/bin/shjs | 51 - .../node_modules/shelljs/global.js | 3 - .../node_modules/shelljs/make.js | 56 - .../node_modules/shelljs/package.json | 67 - .../shelljs/scripts/generate-docs.js | 21 - .../node_modules/shelljs/scripts/run-tests.js | 50 - .../node_modules/shelljs/shell.js | 159 - .../node_modules/shelljs/src/cat.js | 43 - .../node_modules/shelljs/src/cd.js | 19 - .../node_modules/shelljs/src/chmod.js | 208 - .../node_modules/shelljs/src/common.js | 203 - .../node_modules/shelljs/src/cp.js | 204 - .../node_modules/shelljs/src/dirs.js | 191 - .../node_modules/shelljs/src/echo.js | 20 - .../node_modules/shelljs/src/error.js | 10 - .../node_modules/shelljs/src/exec.js | 216 - .../node_modules/shelljs/src/find.js | 51 - .../node_modules/shelljs/src/grep.js | 52 - .../node_modules/shelljs/src/ln.js | 53 - .../node_modules/shelljs/src/ls.js | 126 - .../node_modules/shelljs/src/mkdir.js | 68 - .../node_modules/shelljs/src/mv.js | 80 - .../node_modules/shelljs/src/popd.js | 1 - .../node_modules/shelljs/src/pushd.js | 1 - .../node_modules/shelljs/src/pwd.js | 11 - .../node_modules/shelljs/src/rm.js | 163 - .../node_modules/shelljs/src/sed.js | 43 - .../node_modules/shelljs/src/tempdir.js | 56 - .../node_modules/shelljs/src/test.js | 85 - .../node_modules/shelljs/src/to.js | 29 - .../node_modules/shelljs/src/toEnd.js | 29 - .../node_modules/shelljs/src/which.js | 83 - .../node_modules/underscore/LICENSE | 23 - .../node_modules/underscore/README.md | 28 - .../node_modules/underscore/package.json | 82 - .../node_modules/underscore/underscore-min.js | 5 - .../underscore/underscore-min.js.map | 1 - .../node_modules/underscore/underscore.js | 1692 ---- .../node_modules/unorm/LICENSE.md | 42 - .../node_modules/unorm/README.md | 118 - .../node_modules/unorm/lib/unorm.js | 442 - .../node_modules/unorm/package.json | 73 - .../node_modules/wrappy/LICENSE | 15 - .../node_modules/wrappy/README.md | 36 - .../node_modules/wrappy/package.json | 60 - .../node_modules/wrappy/wrappy.js | 33 - .../node_modules/xmlbuilder/.npmignore | 5 - .../node_modules/xmlbuilder/CHANGELOG.md | 395 - .../node_modules/xmlbuilder/LICENSE | 21 - .../node_modules/xmlbuilder/README.md | 85 - .../node_modules/xmlbuilder/lib/Utility.js | 139 - .../xmlbuilder/lib/XMLAttribute.js | 31 - .../node_modules/xmlbuilder/lib/XMLCData.js | 32 - .../node_modules/xmlbuilder/lib/XMLComment.js | 32 - .../xmlbuilder/lib/XMLDTDAttList.js | 50 - .../xmlbuilder/lib/XMLDTDElement.js | 35 - .../xmlbuilder/lib/XMLDTDEntity.js | 56 - .../xmlbuilder/lib/XMLDTDNotation.js | 37 - .../xmlbuilder/lib/XMLDeclaration.js | 40 - .../node_modules/xmlbuilder/lib/XMLDocType.js | 107 - .../xmlbuilder/lib/XMLDocument.js | 48 - .../xmlbuilder/lib/XMLDocumentCB.js | 402 - .../node_modules/xmlbuilder/lib/XMLElement.js | 111 - .../node_modules/xmlbuilder/lib/XMLNode.js | 432 - .../lib/XMLProcessingInstruction.js | 35 - .../node_modules/xmlbuilder/lib/XMLRaw.js | 32 - .../xmlbuilder/lib/XMLStreamWriter.js | 278 - .../xmlbuilder/lib/XMLStringWriter.js | 302 - .../xmlbuilder/lib/XMLStringifier.js | 192 - .../node_modules/xmlbuilder/lib/XMLText.js | 32 - .../xmlbuilder/lib/XMLWriterBase.js | 68 - .../node_modules/xmlbuilder/lib/index.js | 53 - .../node_modules/xmlbuilder/package.json | 66 - .../node_modules/xmldom/.npmignore | 5 - .../node_modules/xmldom/.travis.yml | 22 - .../node_modules/xmldom/LICENSE | 8 - .../node_modules/xmldom/__package__.js | 4 - .../node_modules/xmldom/changelog | 14 - .../node_modules/xmldom/component.json | 10 - .../node_modules/xmldom/dom-parser.js | 251 - .../node_modules/xmldom/dom.js | 1244 --- .../node_modules/xmldom/package.json | 96 - .../node_modules/xmldom/readme.md | 219 - .../node_modules/xmldom/sax.js | 633 -- node_modules/cordova-android/package.json | 133 +- .../cordova-android/spec/.eslintrc.yml | 4 +- .../android_studio_project/app/build.gradle | 10 +- .../org.test.plugins.dummyplugin/plugin.xml | 2 + .../spec/unit/AndroidStudio.spec.js | 11 - .../cordova-android/spec/unit/Api.spec.js | 14 +- .../spec/unit/android_sdk.spec.js | 166 +- .../spec/unit/builders/GradleBuilder.spec.js | 28 - .../cordova-android/spec/unit/create.spec.js | 6 +- .../spec/unit/emulator.spec.js | 736 +- .../spec/unit/pluginHandlers/handlers.spec.js | 128 +- .../cordova-android/spec/unit/run.spec.js | 193 +- node_modules/cordova-android/test/README.md | 10 +- .../cordova-android/test/app/build.gradle | 8 +- .../test/app/src/main/assets/www/cordova.js | 2 - .../test/run_java_unit_tests.js | 40 +- package-lock.json | 1367 ++- package.json | 6 +- plugins/android.json | 2 +- plugins/browser.json | 18 - 414 files changed, 2292 insertions(+), 69850 deletions(-) delete mode 100644 node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js delete mode 100644 node_modules/cordova-android/bin/templates/cordova/lib/builders/GenericBuilder.js delete mode 100644 node_modules/cordova-android/bin/templates/cordova/lib/builders/GradleBuilder.js delete mode 100644 node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-hdpi/icon.png delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-ldpi/icon.png delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-mdpi/icon.png delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-xhdpi/icon.png delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-xxhdpi/icon.png delete mode 100644 node_modules/cordova-android/bin/templates/project/res/mipmap-xxxhdpi/icon.png delete mode 120000 node_modules/cordova-android/node_modules/.bin/nopt delete mode 120000 node_modules/cordova-android/node_modules/.bin/semver delete mode 120000 node_modules/cordova-android/node_modules/.bin/shjs delete mode 100644 node_modules/cordova-android/node_modules/abbrev/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/abbrev/README.md delete mode 100644 node_modules/cordova-android/node_modules/abbrev/abbrev.js delete mode 100644 node_modules/cordova-android/node_modules/abbrev/package.json delete mode 100644 node_modules/cordova-android/node_modules/android-versions/.jshintignore delete mode 100644 node_modules/cordova-android/node_modules/android-versions/.jshintrc delete mode 100644 node_modules/cordova-android/node_modules/android-versions/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/android-versions/README.md delete mode 100644 node_modules/cordova-android/node_modules/android-versions/index.js delete mode 100644 node_modules/cordova-android/node_modules/android-versions/package.json delete mode 100644 node_modules/cordova-android/node_modules/android-versions/tests/index.test.js delete mode 100644 node_modules/cordova-android/node_modules/ansi/.jshintrc delete mode 100644 node_modules/cordova-android/node_modules/ansi/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/ansi/History.md delete mode 100644 node_modules/cordova-android/node_modules/ansi/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/ansi/README.md delete mode 100755 node_modules/cordova-android/node_modules/ansi/examples/beep/index.js delete mode 100755 node_modules/cordova-android/node_modules/ansi/examples/clear/index.js delete mode 100755 node_modules/cordova-android/node_modules/ansi/examples/cursorPosition.js delete mode 100644 node_modules/cordova-android/node_modules/ansi/examples/progress/index.js delete mode 100644 node_modules/cordova-android/node_modules/ansi/lib/ansi.js delete mode 100644 node_modules/cordova-android/node_modules/ansi/lib/newlines.js delete mode 100644 node_modules/cordova-android/node_modules/ansi/package.json delete mode 100644 node_modules/cordova-android/node_modules/balanced-match/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/balanced-match/LICENSE.md delete mode 100644 node_modules/cordova-android/node_modules/balanced-match/README.md delete mode 100644 node_modules/cordova-android/node_modules/balanced-match/index.js delete mode 100644 node_modules/cordova-android/node_modules/balanced-match/package.json delete mode 100644 node_modules/cordova-android/node_modules/base64-js/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/base64-js/README.md delete mode 100644 node_modules/cordova-android/node_modules/base64-js/base64js.min.js delete mode 100644 node_modules/cordova-android/node_modules/base64-js/index.js delete mode 100644 node_modules/cordova-android/node_modules/base64-js/package.json delete mode 100644 node_modules/cordova-android/node_modules/base64-js/test/big-data.js delete mode 100644 node_modules/cordova-android/node_modules/base64-js/test/convert.js delete mode 100644 node_modules/cordova-android/node_modules/base64-js/test/url-safe.js delete mode 100644 node_modules/cordova-android/node_modules/big-integer/BigInteger.d.ts delete mode 100644 node_modules/cordova-android/node_modules/big-integer/BigInteger.js delete mode 100644 node_modules/cordova-android/node_modules/big-integer/BigInteger.min.js delete mode 100644 node_modules/cordova-android/node_modules/big-integer/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/big-integer/README.md delete mode 100644 node_modules/cordova-android/node_modules/big-integer/bower.json delete mode 100644 node_modules/cordova-android/node_modules/big-integer/package.json delete mode 100644 node_modules/cordova-android/node_modules/big-integer/tsconfig.json delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/README.md delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/bplistParser.js delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/package.json delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/airplay.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/iTunes-small.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/int64.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/int64.xml delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/parseTest.js delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/sample1.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/sample2.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/uid.bplist delete mode 100644 node_modules/cordova-android/node_modules/bplist-parser/test/utf16.bplist delete mode 100755 node_modules/cordova-android/node_modules/bplist-parser/test/utf16_chinese.plist delete mode 100644 node_modules/cordova-android/node_modules/brace-expansion/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/brace-expansion/README.md delete mode 100644 node_modules/cordova-android/node_modules/brace-expansion/index.js delete mode 100644 node_modules/cordova-android/node_modules/brace-expansion/package.json delete mode 100644 node_modules/cordova-android/node_modules/concat-map/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/concat-map/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/concat-map/README.markdown delete mode 100644 node_modules/cordova-android/node_modules/concat-map/index.js delete mode 100644 node_modules/cordova-android/node_modules/concat-map/package.json delete mode 100644 node_modules/cordova-android/node_modules/concat-map/test/map.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.eslintignore delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.eslintrc.yml delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.github/PULL_REQUEST_TEMPLATE.md delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.ratignore delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/README.md delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/RELEASENOTES.md delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/appveyor.yml delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/cordova-common.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/package.json delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ActionStack.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/munge-util.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/ConfigParser/ConfigParser.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/CordovaCheck.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaError.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/CordovaLogger.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/FileUpdater.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/PlatformJson.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfo.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/PluginManager.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/events.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/superspawn.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/util/addProperty.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/util/plist-helpers.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-common/src/util/xml-helpers.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/README.md delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/index.js delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/package.json delete mode 100644 node_modules/cordova-android/node_modules/cordova-registry-mapper/tests/test.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/elementtree/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/elementtree/CHANGES.md delete mode 100644 node_modules/cordova-android/node_modules/elementtree/LICENSE.txt delete mode 100755 node_modules/cordova-android/node_modules/elementtree/Makefile delete mode 100644 node_modules/cordova-android/node_modules/elementtree/NOTICE delete mode 100644 node_modules/cordova-android/node_modules/elementtree/README.md delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/constants.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/elementpath.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/elementtree.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/errors.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/parser.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/parsers/index.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/parsers/sax.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/sprintf.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/treebuilder.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/lib/utils.js delete mode 100644 node_modules/cordova-android/node_modules/elementtree/package.json delete mode 100644 node_modules/cordova-android/node_modules/elementtree/tests/data/xml1.xml delete mode 100644 node_modules/cordova-android/node_modules/elementtree/tests/data/xml2.xml delete mode 100644 node_modules/cordova-android/node_modules/elementtree/tests/test-simple.js delete mode 100644 node_modules/cordova-android/node_modules/glob/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/glob/README.md delete mode 100644 node_modules/cordova-android/node_modules/glob/common.js delete mode 100644 node_modules/cordova-android/node_modules/glob/glob.js delete mode 100644 node_modules/cordova-android/node_modules/glob/package.json delete mode 100644 node_modules/cordova-android/node_modules/glob/sync.js delete mode 100644 node_modules/cordova-android/node_modules/inflight/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/inflight/README.md delete mode 100644 node_modules/cordova-android/node_modules/inflight/inflight.js delete mode 100644 node_modules/cordova-android/node_modules/inflight/package.json delete mode 100644 node_modules/cordova-android/node_modules/inherits/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/inherits/README.md delete mode 100644 node_modules/cordova-android/node_modules/inherits/inherits.js delete mode 100644 node_modules/cordova-android/node_modules/inherits/inherits_browser.js delete mode 100644 node_modules/cordova-android/node_modules/inherits/package.json delete mode 100644 node_modules/cordova-android/node_modules/minimatch/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/minimatch/README.md delete mode 100644 node_modules/cordova-android/node_modules/minimatch/minimatch.js delete mode 100644 node_modules/cordova-android/node_modules/minimatch/package.json delete mode 100644 node_modules/cordova-android/node_modules/nopt/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/nopt/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/nopt/README.md delete mode 100755 node_modules/cordova-android/node_modules/nopt/bin/nopt.js delete mode 100755 node_modules/cordova-android/node_modules/nopt/examples/my-program.js delete mode 100644 node_modules/cordova-android/node_modules/nopt/lib/nopt.js delete mode 100644 node_modules/cordova-android/node_modules/nopt/package.json delete mode 100644 node_modules/cordova-android/node_modules/nopt/test/basic.js delete mode 100644 node_modules/cordova-android/node_modules/once/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/once/README.md delete mode 100644 node_modules/cordova-android/node_modules/once/once.js delete mode 100644 node_modules/cordova-android/node_modules/once/package.json delete mode 100644 node_modules/cordova-android/node_modules/path-is-absolute/index.js delete mode 100644 node_modules/cordova-android/node_modules/path-is-absolute/license delete mode 100644 node_modules/cordova-android/node_modules/path-is-absolute/package.json delete mode 100644 node_modules/cordova-android/node_modules/path-is-absolute/readme.md delete mode 100644 node_modules/cordova-android/node_modules/plist/.jshintrc delete mode 100644 node_modules/cordova-android/node_modules/plist/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/plist/History.md delete mode 100644 node_modules/cordova-android/node_modules/plist/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/plist/Makefile delete mode 100644 node_modules/cordova-android/node_modules/plist/README.md delete mode 100644 node_modules/cordova-android/node_modules/plist/dist/plist-build.js delete mode 100644 node_modules/cordova-android/node_modules/plist/dist/plist-parse.js delete mode 100644 node_modules/cordova-android/node_modules/plist/dist/plist.js delete mode 100644 node_modules/cordova-android/node_modules/plist/examples/browser/index.html delete mode 100644 node_modules/cordova-android/node_modules/plist/index.js delete mode 100644 node_modules/cordova-android/node_modules/plist/lib/build.js delete mode 100644 node_modules/cordova-android/node_modules/plist/lib/parse.js delete mode 100644 node_modules/cordova-android/node_modules/plist/package.json delete mode 100644 node_modules/cordova-android/node_modules/properties-parser/README.markdown delete mode 100644 node_modules/cordova-android/node_modules/properties-parser/index.js delete mode 100644 node_modules/cordova-android/node_modules/properties-parser/package.json delete mode 100644 node_modules/cordova-android/node_modules/properties-parser/play-ground.js delete mode 100644 node_modules/cordova-android/node_modules/q/CHANGES.md delete mode 100644 node_modules/cordova-android/node_modules/q/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/q/README.md delete mode 100644 node_modules/cordova-android/node_modules/q/package.json delete mode 100644 node_modules/cordova-android/node_modules/q/q.js delete mode 100644 node_modules/cordova-android/node_modules/q/queue.js delete mode 100644 node_modules/cordova-android/node_modules/sax/AUTHORS delete mode 100644 node_modules/cordova-android/node_modules/sax/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/sax/README.md delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/big-not-pretty.xml delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/example.js delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/get-products.js delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/hello-world.js delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/not-pretty.xml delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/pretty-print.js delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/shopping.xml delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/strict.dtd delete mode 100755 node_modules/cordova-android/node_modules/sax/examples/switch-bench.js delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/test.html delete mode 100644 node_modules/cordova-android/node_modules/sax/examples/test.xml delete mode 100644 node_modules/cordova-android/node_modules/sax/lib/sax.js delete mode 100644 node_modules/cordova-android/node_modules/sax/package.json delete mode 100644 node_modules/cordova-android/node_modules/sax/test/buffer-overrun.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/cdata-chunked.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/cdata-end-split.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/cdata-fake-end.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/cdata-multiple.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/cdata.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/index.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/issue-23.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/issue-30.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/issue-35.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/issue-47.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/issue-49.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/parser-position.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/script.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/self-closing-child-strict.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/self-closing-child.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/self-closing-tag.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/stray-ending.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/trailing-non-whitespace.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/unquoted.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-issue-41.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-rebinding.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-strict.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-unbound.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix.js delete mode 100644 node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-redefine.js delete mode 100644 node_modules/cordova-android/node_modules/semver/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/semver/README.md delete mode 100755 node_modules/cordova-android/node_modules/semver/bin/semver delete mode 100644 node_modules/cordova-android/node_modules/semver/package.json delete mode 100644 node_modules/cordova-android/node_modules/semver/range.bnf delete mode 100644 node_modules/cordova-android/node_modules/semver/semver.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/.documentup.json delete mode 100644 node_modules/cordova-android/node_modules/shelljs/.jshintrc delete mode 100644 node_modules/cordova-android/node_modules/shelljs/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/shelljs/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/shelljs/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/shelljs/README.md delete mode 100644 node_modules/cordova-android/node_modules/shelljs/RELEASE.md delete mode 100755 node_modules/cordova-android/node_modules/shelljs/bin/shjs delete mode 100644 node_modules/cordova-android/node_modules/shelljs/global.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/make.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/package.json delete mode 100755 node_modules/cordova-android/node_modules/shelljs/scripts/generate-docs.js delete mode 100755 node_modules/cordova-android/node_modules/shelljs/scripts/run-tests.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/shell.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/cat.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/cd.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/chmod.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/common.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/cp.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/dirs.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/echo.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/error.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/exec.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/find.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/grep.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/ln.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/ls.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/mkdir.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/mv.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/popd.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/pushd.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/pwd.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/rm.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/sed.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/tempdir.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/test.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/to.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/toEnd.js delete mode 100644 node_modules/cordova-android/node_modules/shelljs/src/which.js delete mode 100644 node_modules/cordova-android/node_modules/underscore/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/underscore/README.md delete mode 100644 node_modules/cordova-android/node_modules/underscore/package.json delete mode 100644 node_modules/cordova-android/node_modules/underscore/underscore-min.js delete mode 100644 node_modules/cordova-android/node_modules/underscore/underscore-min.js.map delete mode 100644 node_modules/cordova-android/node_modules/underscore/underscore.js delete mode 100644 node_modules/cordova-android/node_modules/unorm/LICENSE.md delete mode 100644 node_modules/cordova-android/node_modules/unorm/README.md delete mode 100644 node_modules/cordova-android/node_modules/unorm/lib/unorm.js delete mode 100644 node_modules/cordova-android/node_modules/unorm/package.json delete mode 100644 node_modules/cordova-android/node_modules/wrappy/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/wrappy/README.md delete mode 100644 node_modules/cordova-android/node_modules/wrappy/package.json delete mode 100644 node_modules/cordova-android/node_modules/wrappy/wrappy.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/CHANGELOG.md delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/README.md delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/Utility.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLAttribute.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLCData.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLComment.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDAttList.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDElement.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDEntity.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDNotation.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDeclaration.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocType.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocument.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocumentCB.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLElement.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLNode.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLRaw.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStreamWriter.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringWriter.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringifier.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLText.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLWriterBase.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/lib/index.js delete mode 100644 node_modules/cordova-android/node_modules/xmlbuilder/package.json delete mode 100644 node_modules/cordova-android/node_modules/xmldom/.npmignore delete mode 100644 node_modules/cordova-android/node_modules/xmldom/.travis.yml delete mode 100644 node_modules/cordova-android/node_modules/xmldom/LICENSE delete mode 100644 node_modules/cordova-android/node_modules/xmldom/__package__.js delete mode 100644 node_modules/cordova-android/node_modules/xmldom/changelog delete mode 100644 node_modules/cordova-android/node_modules/xmldom/component.json delete mode 100644 node_modules/cordova-android/node_modules/xmldom/dom-parser.js delete mode 100644 node_modules/cordova-android/node_modules/xmldom/dom.js delete mode 100644 node_modules/cordova-android/node_modules/xmldom/package.json delete mode 100644 node_modules/cordova-android/node_modules/xmldom/readme.md delete mode 100644 node_modules/cordova-android/node_modules/xmldom/sax.js delete mode 100644 node_modules/cordova-android/spec/unit/AndroidStudio.spec.js delete mode 100644 node_modules/cordova-android/spec/unit/builders/GradleBuilder.spec.js delete mode 100644 plugins/browser.json diff --git a/config.xml b/config.xml index 63c95ae..a551d2e 100644 --- a/config.xml +++ b/config.xml @@ -36,6 +36,4 @@ - - diff --git a/node_modules/cordova-android/.eslintignore b/node_modules/cordova-android/.eslintignore index 5027e1b..0d61c6c 100644 --- a/node_modules/cordova-android/.eslintignore +++ b/node_modules/cordova-android/.eslintignore @@ -1 +1,2 @@ -bin/templates/project/assets/www/cordova.js \ No newline at end of file +bin/templates/project/assets/www/cordova.js +test/app diff --git a/node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md index 91582f4..712b2ff 100644 --- a/node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md +++ b/node_modules/cordova-android/.github/PULL_REQUEST_TEMPLATE.md @@ -1,6 +1,5 @@ + -### What testing has been done on this change? + +### Description + + + + +### Testing + + ### Checklist -- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database -- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. -- [ ] Added automated test coverage as appropriate for this change. + +- [ ] I've run the tests to see all new and existing tests pass +- [ ] I added automated test coverage as appropriate for this change +- [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`) +- [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/)) +- [ ] I've updated the documentation if necessary diff --git a/node_modules/cordova-android/.travis.yml b/node_modules/cordova-android/.travis.yml index e0b8928..dc4e7ae 100644 --- a/node_modules/cordova-android/.travis.yml +++ b/node_modules/cordova-android/.travis.yml @@ -2,27 +2,36 @@ language: android sudo: false jdk: - oraclejdk8 -env: - global: - - ANDROID_TOOLS=${ANDROID_HOME}/tools -before_install: - - nvm install 6 - # ensure at least gradle 3.3 is in place. - - wget http://services.gradle.org/distributions/gradle-3.3-bin.zip - - unzip gradle-3.3-bin.zip - - export GRADLE_HOME=$PWD/gradle-3.3 - - export PATH=${GRADLE_HOME}/bin:${ANDROID_HOME}:${ANDROID_HOME}/emulator:${ANDROID_TOOLS}:${ANDROID_TOOLS}/bin:${ANDROID_HOME}/platform-tools:$PATH - - node --version - - gradle --version - - echo y | android --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository + android: components: - - tools + - build-tools-28.0.3 +env: + global: + # Keep gradle from crapping all over the log + - TERM=dumb + matrix: + - nodejs_version=6 + - nodejs_version=8 + - nodejs_version=10 + install: + # Install a sdkmanager version that supports the --licenses switch and + # accept any Android SDK licenses. The output redirection prevents us from + # hitting the travis log size limit of 4MB which would fail the build. + - yes | sdkmanager tools > /dev/null + - yes | sdkmanager --licenses > /dev/null + + - nvm install $nodejs_version - npm install - npm install -g codecov + script: + - gradle --version + - node --version + - npm --version - npm test - npm run cover + after_script: - codecov diff --git a/node_modules/cordova-android/CONTRIBUTING.md b/node_modules/cordova-android/CONTRIBUTING.md index 07f5651..9a4461b 100644 --- a/node_modules/cordova-android/CONTRIBUTING.md +++ b/node_modules/cordova-android/CONTRIBUTING.md @@ -30,7 +30,6 @@ For instructions on this, start with the [contribution overview](http://cordova.apache.org/contribute/). The details are explained there, but the important items are: - - Sign and submit an Apache ICLA (Contributor License Agreement). - Have a Jira issue open that corresponds to your contribution. - Run the tests so your patch doesn't break existing functionality. diff --git a/node_modules/cordova-android/README.md b/node_modules/cordova-android/README.md index 2b97582..a54f2f6 100644 --- a/node_modules/cordova-android/README.md +++ b/node_modules/cordova-android/README.md @@ -31,9 +31,6 @@ at the core, applications written with web technology: HTML, CSS and JavaScript. [Apache Cordova](https://cordova.apache.org) is a project of The Apache Software Foundation (ASF). -:warning: Report issues on the [Apache Cordova issue tracker](https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Android%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC) - - ## Requires - Java JDK 1.8 or greater diff --git a/node_modules/cordova-android/RELEASENOTES.md b/node_modules/cordova-android/RELEASENOTES.md index dab263b..c84dab9 100644 --- a/node_modules/cordova-android/RELEASENOTES.md +++ b/node_modules/cordova-android/RELEASENOTES.md @@ -20,37 +20,58 @@ --> ## Release Notes for Cordova (Android) ## -### 7.1.4 (Nov 22, 2018) - -* Update android-versions to `1.4.0`, with added support for Android Pie ([#573](https://github.com/apache/cordova-android/pull/573)) -* Output current package name if package name can't be validated ([#567](https://github.com/apache/cordova-android/pull/567)) -* Resolve issue with plugin `target-dir="*app*"` subdirs ([#572](https://github.com/apache/cordova-android/pull/572)) - -### 7.1.3 (Nov 19, 2018) - +### 8.0.0 (Feb 13, 2019) +* [GH-669](https://github.com/apache/cordova-android/pull/669) Added Missing License Headers +* [GH-655](https://github.com/apache/cordova-android/pull/655) Use custom Gradle properties to read minSdkVersion value from `config.xml` +* [GH-656](https://github.com/apache/cordova-android/pull/656) Quick fix to support **Android**_SDK_ROOT +* [GH-632](https://github.com/apache/cordova-android/pull/632) Ignore more Gradle build artifacts in **Android** project +* [GH-642](https://github.com/apache/cordova-android/pull/642) **Android** tools 3.3 & **Gradle** 4.10.3 update +* [GH-654](https://github.com/apache/cordova-android/pull/654) Quick updates to top-level `project.properties` +* [GH-635](https://github.com/apache/cordova-android/pull/635) Ignore **Android** Studio `.idea` files in project +* [GH-624](https://github.com/apache/cordova-android/pull/624) Add missing log to Java version check +* [GH-630](https://github.com/apache/cordova-android/pull/630) Update `emulator.js` to fix issue [GH-608](https://github.com/apache/cordova-android/pull/608) +* [GH-626](https://github.com/apache/cordova-android/pull/626) Added `package-lock.json` to `.gitignore` +* [GH-620](https://github.com/apache/cordova-android/pull/620) Fix requirements error messages for JDK 8 +* [GH-619](https://github.com/apache/cordova-android/pull/619) javac error message fixes in requirements check +* [GH-612](https://github.com/apache/cordova-android/pull/612) Android Platform Release Preparation (Cordova 9) +* [GH-607](https://github.com/apache/cordova-android/pull/607) Copy `node_modules` if the directory exists +* [GH-582](https://github.com/apache/cordova-android/pull/582) Improve Test `README` +* [GH-589](https://github.com/apache/cordova-android/pull/589) Rewrite install dir resolution for legacy plugins +* [GH-572](https://github.com/apache/cordova-android/pull/572) Resolve issue with plugin `target-dir="app*"` subdirs +* [GH-567](https://github.com/apache/cordova-android/pull/567) Output current package name if package name can't be validated +* [GH-507](https://github.com/apache/cordova-android/pull/507) Gradle Updates +* [GH-559](https://github.com/apache/cordova-android/pull/559) Eslint ignore version file +* [GH-550](https://github.com/apache/cordova-android/pull/550) Fix for old plugins with non-Java sources +* [GH-558](https://github.com/apache/cordova-android/pull/558) Update `cordova.js` from `cordova-js@4.2.3` +* [GH-553](https://github.com/apache/cordova-android/pull/553) Check for `build-extras.gradle` in the app-parent directory +* [GH-551](https://github.com/apache/cordova-android/pull/551) Add missing cast for `cdvMinSdkVersion` +* [GH-539](https://github.com/apache/cordova-android/pull/539) Fix destination path fallback +* [GH-544](https://github.com/apache/cordova-android/pull/544) Remove obsolete check for JellyBean +* [GH-465](https://github.com/apache/cordova-android/pull/465) Removes Gradle property in-line command arguments for `gradle.properties` +* [GH-523](https://github.com/apache/cordova-android/pull/523) Always put the Google repo above jcenter +* [GH-486](https://github.com/apache/cordova-android/pull/486) Change deprecated "compile" to "implementation" * [GH-495](https://github.com/apache/cordova-android/pull/495) Incorrect default sdk version issue fix -* [GH-496](https://github.com/apache/cordova-android/pull/496) update comments in `build.gradle` -* [GH-539](https://github.com/apache/cordova-android/pull/539) Fix dest overwrite, in case of of plugin `source-file` element with `target-dir` that does not need remapping -* [GH-540](https://github.com/apache/cordova-android/issues/540) support plugin `source-file` element with any app `target-dir` value -* [GH-547](https://github.com/apache/cordova-android/issues/547) Compatibility of old plugins with non-Java `source-file` entries (individual files) -* [GH-551](https://github.com/apache/cordova-android/pull/551) add missing cast for cdvMinSdkVersion to `build.gradle` -* [GH-552](https://github.com/apache/cordova-android/issues/552) check for `build-extras.gradle` in the parent app directory - -### 7.1.2 (Nov 08, 2018) -* [CB-14127](https://issues.apache.org/jira/browse/CB-14127): Always put the Google repo above jcenter -* [CB-14165](https://issues.apache.org/jira/browse/CB-14165): Emulator: handle "device still connecting" error (#457) -* [CB-14125](https://issues.apache.org/jira/browse/CB-14125): Increase old plugin compatibility -* [CB-13830](https://issues.apache.org/jira/browse/CB-13830): Add handlers for plugins that use non-Java source files, such as Camera -* [CB-14038](https://issues.apache.org/jira/browse/CB-14038): fix false positive detecting project type - -### 7.1.1 (Jul 11, 2018) -* Fix unsafe property access in run.js (#445) -* Emit log event instead of logging directly (#452) -* [CB-14101](https://issues.apache.org/jira/browse/CB-14101) Fix Java version check for Java >= 9 (#446) -* [CB-14127](https://issues.apache.org/jira/browse/CB-14127) (android) Move google maven repo ahead of jcenter -* [CB-13923](https://issues.apache.org/jira/browse/CB-13923) (android) fix -1 length for compressed files -* [CB-14145](https://issues.apache.org/jira/browse/CB-14145) use cordova-common@2.2.5 and update other dependencies to resolve `npm audit` warnings -* [CB-9366](https://issues.apache.org/jira/browse/CB-9366) log error.stack in cordova.js +* [GH-493](https://github.com/apache/cordova-android/pull/493) Remove bundled dependencies +* [GH-490](https://github.com/apache/cordova-android/pull/490) Fixes build & run related bugs from builder refactor +* [GH-464](https://github.com/apache/cordova-android/pull/464) Unit tests for **Android**_sdk and **Android**Project +* [GH-448](https://github.com/apache/cordova-android/pull/448) [CB-13685](https://issues.apache.org/jira/browse/CB-13685) Adaptive Icon Support +* [GH-487](https://github.com/apache/cordova-android/pull/487) Do not attempt an activity intent AND a url load into the webview, return from the internal webview load. +* [GH-461](https://github.com/apache/cordova-android/pull/461) Remove old builders code +* [GH-463](https://github.com/apache/cordova-android/pull/463) Emulator: Add unit tests and remove Q +* [GH-462](https://github.com/apache/cordova-android/pull/462) Device: Add unit tests and remove Q +* [GH-457](https://github.com/apache/cordova-android/pull/457) Emulator: handle "device still connecting" error +* [GH-445](https://github.com/apache/cordova-android/pull/445) Run and retryPromise improvements and tests +* [GH-453](https://github.com/apache/cordova-android/pull/453) Lint JS files w/out extension too +* [GH-452](https://github.com/apache/cordova-android/pull/452) Emit log event instead of logging directly +* [GH-449](https://github.com/apache/cordova-android/pull/449) Increase old plugin compatibility +* [GH-442](https://github.com/apache/cordova-android/pull/442) Fixes and cleanup for Java tests and CI +* [GH-446](https://github.com/apache/cordova-android/pull/446) [CB-14101](https://issues.apache.org/jira/browse/CB-14101) Fix Java version check for Java >= 9 +* [CB-14127](https://issues.apache.org/jira/browse/CB-14127) Move google maven repo ahead of jcenter +* [CB-14038](https://issues.apache.org/jira/browse/CB-14038) Fix false positive detecting project type +* [CB-14008](https://issues.apache.org/jira/browse/CB-14008) Updating Gradle Libraries to work with **Android** Studio 3.1.0 +* [CB-13975](https://issues.apache.org/jira/browse/CB-13975) Fix to fire pause event when cdvStartInBackground=true +* [CB-13830](https://issues.apache.org/jira/browse/CB-13830) Add handlers for plugins that use non-Java source files, such as Camera +* [CB-13923](https://issues.apache.org/jira/browse/CB-13923) Fix -1 length for compressed files ### 7.1.0 (Feb 20, 2018) * [CB-13879](https://issues.apache.org/jira/browse/CB-13879) updated gradle tools dependency to 3.0.1 for project template diff --git a/node_modules/cordova-android/VERSION b/node_modules/cordova-android/VERSION index b7f8ee4..ae9a76b 100644 --- a/node_modules/cordova-android/VERSION +++ b/node_modules/cordova-android/VERSION @@ -1 +1 @@ -7.1.4 +8.0.0 diff --git a/node_modules/cordova-android/appveyor.yml b/node_modules/cordova-android/appveyor.yml index 92b5ad9..f466697 100644 --- a/node_modules/cordova-android/appveyor.yml +++ b/node_modules/cordova-android/appveyor.yml @@ -1,38 +1,36 @@ -image: - - Previous Visual Studio 2015 - environment: - ANDROID_HOME: "C:\\android" - matrix: - - nodejs_version: "4" - - nodejs_version: "6" - - nodejs_version: "8" + ANDROID_HOME: "C:\\android" -init: - - mkdir "%ANDROID_HOME% - - cd "%ANDROID_HOME%" - - appveyor DownloadFile "https://dl.google.com/android/repository/tools_r25.2.3-windows.zip" - - 7z x "tools_r25.2.3-windows.zip" > nul - - cd "C:\projects\cordova-android" + # If the gradle daemon is used, the build hangs after generating the wrapper + GRADLE_OPTS: -Dorg.gradle.daemon=false + + # URL for SDK Tools, Revision 26.1.1 (September 2017) + SDK_TOOLS_URL: https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip + + matrix: + - nodejs_version: 6 + - nodejs_version: 8 + - nodejs_version: 10 install: - - choco install gradle -version 3.4.1 - - gradle -version - - echo y | "%ANDROID_HOME%\tools\android.bat" --silent update sdk --no-ui --all --filter platform-tools,tools,build-tools-26.0.2,android-26,android-25,extra-google-m2repository,extra-android-m2repository - # on windows we need to accept sublicenses for the new tooling, wee. 30 is an arbitrary number, - # but should be the maximum number of licenses we explicitly need to type "Y ENTER" for. - # also, the sdkmanager in all its glory leaks a bit of output to stderr, and powershell - # and appveyor interpret that as errors, and blows up. so, when piping in our "Y ENTER" - # responses, we invoke cmd so we can redirect stderr to stdout, and tell it to --update itself. - - ps: for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | cmd /c 'C:\android\tools\bin\sdkmanager.bat 2>&1' --update - - ps: Install-Product node $env:nodejs_version - - npm install - # below is a workaround on using gradle installed via choco on appveyor - - set path=C:\ProgramData\chocolatey\lib\gradle\tools\gradle-3.4.1\bin;%path% + # Install Android SDK Tools + - mkdir "%ANDROID_HOME%" + - appveyor DownloadFile "%SDK_TOOLS_URL%" -FileName "%TMP%/sdk-tools.zip" + - 7z x "%TMP%/sdk-tools.zip" -o"%ANDROID_HOME%" > nul + - set PATH=%PATH%;"%ANDROID_HOME%\tools\bin" + + - yes 2> nul | sdkmanager --licenses > nul + - sdkmanager "build-tools;28.0.3" + + - choco install gradle --version 3.4.1 + + - ps: Install-Product node $env:nodejs_version + - npm install build: off test_script: - - node --version - - npm --version - - npm test + - gradle --version + - node --version + - npm --version + - npm test diff --git a/node_modules/cordova-android/bin/android_sdk_version b/node_modules/cordova-android/bin/android_sdk_version index e0ce1ec..99e2baf 100755 --- a/node_modules/cordova-android/bin/android_sdk_version +++ b/node_modules/cordova-android/bin/android_sdk_version @@ -21,9 +21,7 @@ var android_sdk = require('./templates/cordova/lib/android_sdk'); -android_sdk.print_newest_available_sdk_target().done(null, function(err) { +android_sdk.print_newest_available_sdk_target().done(null, function (err) { console.error(err); process.exit(2); }); - - diff --git a/node_modules/cordova-android/bin/check_reqs b/node_modules/cordova-android/bin/check_reqs index 628628f..39b6ca5 100755 --- a/node_modules/cordova-android/bin/check_reqs +++ b/node_modules/cordova-android/bin/check_reqs @@ -22,9 +22,10 @@ var check_reqs = require('./templates/cordova/lib/check_reqs'); check_reqs.run().done( - function success() { + function success () { console.log('Looks like your environment fully supports cordova-android development!'); - }, function fail(err) { + }, + function fail (err) { console.log(err); process.exit(2); } diff --git a/node_modules/cordova-android/bin/create b/node_modules/cordova-android/bin/create index b1e4d5a..fbab242 100755 --- a/node_modules/cordova-android/bin/create +++ b/node_modules/cordova-android/bin/create @@ -23,12 +23,12 @@ var ConfigParser = require('cordova-common').ConfigParser; var Api = require('./templates/cordova/Api'); var argv = require('nopt')({ - 'help' : Boolean, - 'cli' : Boolean, - 'shared' : Boolean, - 'link' : Boolean, - 'activity-name' : [String, undefined] -}, { 'd' : '--verbose' }); + 'help': Boolean, + 'cli': Boolean, + 'shared': Boolean, + 'link': Boolean, + 'activity-name': [String, undefined] +}, { 'd': '--verbose' }); if (argv.help || argv.argv.remain.length === 0) { console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'create')) + ' [] [--activity-name ] [--link]'); diff --git a/node_modules/cordova-android/bin/lib/create.js b/node_modules/cordova-android/bin/lib/create.js index 30226f6..d6451a7 100755 --- a/node_modules/cordova-android/bin/lib/create.js +++ b/node_modules/cordova-android/bin/lib/create.js @@ -141,9 +141,9 @@ function writeProjectProperties (projectPath, target_api) { } // This makes no sense, what if you're building with a different build system? -function prepBuildFiles (projectPath, builder) { +function prepBuildFiles (projectPath) { var buildModule = require(path.resolve(projectPath, 'cordova/lib/builders/builders')); - buildModule.getBuilder(builder).prepBuildFiles(); + buildModule.getBuilder().prepBuildFiles(); } function copyBuildRules (projectPath, isLegacy) { @@ -168,7 +168,10 @@ function copyScripts (projectPath) { shell.rm('-rf', destScriptsDir); // Copy in the new ones. shell.cp('-r', srcScriptsDir, projectPath); - shell.cp('-r', path.join(ROOT, 'node_modules'), destScriptsDir); + + let nodeModulesDir = path.join(ROOT, 'node_modules'); + if (fs.existsSync(nodeModulesDir)) shell.cp('-r', nodeModulesDir, destScriptsDir); + shell.cp(path.join(bin, 'check_reqs*'), destScriptsDir); shell.cp(path.join(bin, 'android_sdk_version*'), destScriptsDir); var check_reqs = path.join(destScriptsDir, 'check_reqs'); @@ -329,7 +332,7 @@ exports.create = function (project_path, config, options, events) { }); // Link it to local android install. exports.writeProjectProperties(project_path, target_api); - exports.prepBuildFiles(project_path, 'studio'); + exports.prepBuildFiles(project_path); events.emit('log', generateDoneMessage('create', options.link)); }).thenResolve(project_path); }; diff --git a/node_modules/cordova-android/bin/templates/cordova/Api.js b/node_modules/cordova-android/bin/templates/cordova/Api.js index ae4d17b..be6b76b 100644 --- a/node_modules/cordova-android/bin/templates/cordova/Api.js +++ b/node_modules/cordova-android/bin/templates/cordova/Api.js @@ -21,7 +21,6 @@ var path = require('path'); var Q = require('q'); var AndroidProject = require('./lib/AndroidProject'); -var AndroidStudio = require('./lib/AndroidStudio'); var PluginManager = require('cordova-common').PluginManager; var CordovaLogger = require('cordova-common').CordovaLogger; @@ -56,41 +55,27 @@ function setupEvents (externalEventEmitter) { function Api (platform, platformRootDir, events) { this.platform = PLATFORM; this.root = path.resolve(__dirname, '..'); - this.builder = 'gradle'; setupEvents(events); - var self = this; + const appMain = path.join(this.root, 'app', 'src', 'main'); + const appRes = path.join(appMain, 'res'); this.locations = { - root: self.root, - www: path.join(self.root, 'assets/www'), - res: path.join(self.root, 'res'), - platformWww: path.join(self.root, 'platform_www'), - configXml: path.join(self.root, 'res/xml/config.xml'), - defaultConfigXml: path.join(self.root, 'cordova/defaults.xml'), - strings: path.join(self.root, 'res/values/strings.xml'), - manifest: path.join(self.root, 'AndroidManifest.xml'), - build: path.join(self.root, 'build'), - javaSrc: path.join(self.root, 'src'), + root: this.root, + www: path.join(appMain, 'assets', 'www'), + res: appRes, + platformWww: path.join(this.root, 'platform_www'), + configXml: path.join(appRes, 'xml', 'config.xml'), + defaultConfigXml: path.join(this.root, 'cordova', 'defaults.xml'), + strings: path.join(appRes, 'values', 'strings.xml'), + manifest: path.join(appMain, 'AndroidManifest.xml'), + build: path.join(this.root, 'build'), + javaSrc: path.join(appMain, 'java'), // NOTE: Due to platformApi spec we need to return relative paths here cordovaJs: 'bin/templates/project/assets/www/cordova.js', cordovaJsSrc: 'cordova-js-src' }; - - // XXX Override some locations for Android Studio projects - if (AndroidStudio.isAndroidStudioProject(self.root) === true) { - selfEvents.emit('log', 'Android Studio project detected'); - this.builder = 'studio'; - this.android_studio = true; - this.locations.configXml = path.join(self.root, 'app/src/main/res/xml/config.xml'); - this.locations.strings = path.join(self.root, 'app/src/main/res/values/strings.xml'); - this.locations.manifest = path.join(self.root, 'app/src/main/AndroidManifest.xml'); - // We could have Java Source, we could have other languages - this.locations.javaSrc = path.join(self.root, 'app/src/main/java/'); - this.locations.www = path.join(self.root, 'app/src/main/assets/www'); - this.locations.res = path.join(self.root, 'app/src/main/res'); - } } /** @@ -223,33 +208,13 @@ Api.prototype.addPlugin = function (plugin, installOptions) { installOptions.variables.PACKAGE_NAME = project.getPackageName(); } - if (this.android_studio === true) { - installOptions.android_studio = true; - } - return Q().then(function () { - // CB-11964: Do a clean when installing the plugin code to get around - // the Gradle bug introduced by the Android Gradle Plugin Version 2.2 - // TODO: Delete when the next version of Android Gradle plugin comes out - // Since clean doesn't just clean the build, it also wipes out www, we need - // to pass additional options. - - // Do some basic argument parsing - var opts = {}; - - // Skip cleaning prepared files when not invoking via cordova CLI. - opts.noPrepare = true; - - if (!AndroidStudio.isAndroidStudioProject(self.root) && !project.isClean()) { - return self.clean(opts); - } - }).then(function () { return PluginManager.get(self.platform, self.locations, project).addPlugin(plugin, installOptions); }).then(function () { if (plugin.getFrameworks(this.platform).length === 0) return; selfEvents.emit('verbose', 'Updating build files since android plugin contained '); // This should pick the correct builder, not just get gradle - require('./lib/builders/builders').getBuilder(this.builder).prepBuildFiles(); + require('./lib/builders/builders').getBuilder().prepBuildFiles(); }.bind(this)) // CB-11022 Return truthy value to prevent running prepare after .thenResolve(true); @@ -271,9 +236,8 @@ Api.prototype.addPlugin = function (plugin, installOptions) { Api.prototype.removePlugin = function (plugin, uninstallOptions) { var project = AndroidProject.getProjectFile(this.root); - if (uninstallOptions && uninstallOptions.usePlatformWww === true && this.android_studio === true) { + if (uninstallOptions && uninstallOptions.usePlatformWww === true) { uninstallOptions.usePlatformWww = false; - uninstallOptions.android_studio = true; } return PluginManager.get(this.platform, this.locations, project) @@ -282,7 +246,7 @@ Api.prototype.removePlugin = function (plugin, uninstallOptions) { if (plugin.getFrameworks(this.platform).length === 0) return; selfEvents.emit('verbose', 'Updating build files since android plugin contained '); - require('./lib/builders/builders').getBuilder(this.builder).prepBuildFiles(); + require('./lib/builders/builders').getBuilder().prepBuildFiles(); }.bind(this)) // CB-11022 Return truthy value to prevent running prepare after .thenResolve(true); @@ -335,9 +299,7 @@ Api.prototype.removePlugin = function (plugin, uninstallOptions) { */ Api.prototype.build = function (buildOptions) { var self = this; - if (this.android_studio) { - buildOptions.studio = true; - } + return require('./lib/check_reqs').run().then(function () { return require('./lib/build').run.call(self, buildOptions); }).then(function (buildResults) { @@ -381,12 +343,9 @@ Api.prototype.run = function (runOptions) { */ Api.prototype.clean = function (cleanOptions) { var self = this; - if (this.android_studio) { - // This will lint, checking for null won't - if (typeof cleanOptions === 'undefined') { - cleanOptions = {}; - } - cleanOptions.studio = true; + // This will lint, checking for null won't + if (typeof cleanOptions === 'undefined') { + cleanOptions = {}; } return require('./lib/check_reqs').run().then(function () { diff --git a/node_modules/cordova-android/bin/templates/cordova/build b/node_modules/cordova-android/bin/templates/cordova/build index 222e84a..d703547 100755 --- a/node_modules/cordova-android/bin/templates/cordova/build +++ b/node_modules/cordova-android/bin/templates/cordova/build @@ -19,24 +19,25 @@ under the License. */ -var args = process.argv; +var args = process.argv; var Api = require('./Api'); var nopt = require('nopt'); var path = require('path'); // Support basic help commands -if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) +if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(args[2]) >= 0) { require('./lib/build').help(); +} // Do some basic argument parsing var buildOpts = nopt({ - 'verbose' : Boolean, - 'silent' : Boolean, - 'debug' : Boolean, - 'release' : Boolean, + 'verbose': Boolean, + 'silent': Boolean, + 'debug': Boolean, + 'release': Boolean, 'nobuild': Boolean, - 'buildConfig' : path -}, { 'd' : '--verbose' }); + 'buildConfig': path +}, { 'd': '--verbose' }); // Make buildOptions compatible with PlatformApi build method spec buildOpts.argv = buildOpts.argv.original; @@ -44,7 +45,7 @@ buildOpts.argv = buildOpts.argv.original; require('./loggingHelper').adjustLoggerLevel(buildOpts); new Api().build(buildOpts) -.catch(function(err) { - console.error(err.stack); - process.exit(2); -}); + .catch(function (err) { + console.error(err.stack); + process.exit(2); + }); diff --git a/node_modules/cordova-android/bin/templates/cordova/clean b/node_modules/cordova-android/bin/templates/cordova/clean index 22065cc..9db5847 100755 --- a/node_modules/cordova-android/bin/templates/cordova/clean +++ b/node_modules/cordova-android/bin/templates/cordova/clean @@ -20,11 +20,11 @@ */ var Api = require('./Api'); -var path = require('path'); +var path = require('path'); var nopt = require('nopt'); // Support basic help commands -if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { +if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { console.log('Usage: ' + path.relative(process.cwd(), process.argv[1])); console.log('Cleans the project directory.'); process.exit(0); @@ -32,9 +32,9 @@ if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= // Do some basic argument parsing var opts = nopt({ - 'verbose' : Boolean, - 'silent' : Boolean -}, { 'd' : '--verbose' }); + 'verbose': Boolean, + 'silent': Boolean +}, { 'd': '--verbose' }); // Make buildOptions compatible with PlatformApi clean method spec opts.argv = opts.argv.original; @@ -45,7 +45,7 @@ opts.noPrepare = true; require('./loggingHelper').adjustLoggerLevel(opts); new Api().clean(opts) -.catch(function(err) { - console.error(err.stack); - process.exit(2); -}); + .catch(function (err) { + console.error(err.stack); + process.exit(2); + }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/Adb.js b/node_modules/cordova-android/bin/templates/cordova/lib/Adb.js index 038c67c..b6ad8f1 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/Adb.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/Adb.js @@ -44,7 +44,7 @@ function isEmulator (line) { * devices/emulators */ Adb.devices = function (opts) { - return spawn('adb', ['devices'], {cwd: os.tmpdir()}).then(function (output) { + return spawn('adb', ['devices'], { cwd: os.tmpdir() }).then(function (output) { return output.split('\n').filter(function (line) { // Filter out either real devices or emulators, depending on options return (line && opts && opts.emulators) ? isEmulator(line) : isDevice(line); @@ -58,7 +58,7 @@ Adb.install = function (target, packagePath, opts) { events.emit('verbose', 'Installing apk ' + packagePath + ' on target ' + target + '...'); var args = ['-s', target, 'install']; if (opts && opts.replace) args.push('-r'); - return spawn('adb', args.concat(packagePath), {cwd: os.tmpdir()}).then(function (output) { + return spawn('adb', args.concat(packagePath), { cwd: os.tmpdir() }).then(function (output) { // 'adb install' seems to always returns no error, even if installation fails // so we catching output to detect installation failure if (output.match(/Failure/)) { @@ -77,14 +77,14 @@ Adb.install = function (target, packagePath, opts) { Adb.uninstall = function (target, packageId) { events.emit('verbose', 'Uninstalling package ' + packageId + ' from target ' + target + '...'); - return spawn('adb', ['-s', target, 'uninstall', packageId], {cwd: os.tmpdir()}); + return spawn('adb', ['-s', target, 'uninstall', packageId], { cwd: os.tmpdir() }); }; Adb.shell = function (target, shellCommand) { events.emit('verbose', 'Running adb shell command "' + shellCommand + '" on target ' + target + '...'); var args = ['-s', target, 'shell']; shellCommand = shellCommand.split(/\s+/); - return spawn('adb', args.concat(shellCommand), {cwd: os.tmpdir()}).catch(function (output) { + return spawn('adb', args.concat(shellCommand), { cwd: os.tmpdir() }).catch(function (output) { return Q.reject(new CordovaError('Failed to execute shell command "' + shellCommand + '"" on device: ' + output)); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidManifest.js b/node_modules/cordova-android/bin/templates/cordova/lib/AndroidManifest.js index 5b7077a..4fe1c2b 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidManifest.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/AndroidManifest.js @@ -51,15 +51,11 @@ AndroidManifest.prototype.setVersionCode = function (versionCode) { }; AndroidManifest.prototype.getPackageId = function () { - /* jshint -W069 */ return this.doc.getroot().attrib['package']; - /* jshint +W069 */ }; AndroidManifest.prototype.setPackageId = function (pkgId) { - /* jshint -W069 */ this.doc.getroot().attrib['package'] = pkgId; - /* jshint +W069 */ return this; }; @@ -150,7 +146,7 @@ AndroidManifest.prototype.setDebuggable = function (value) { * manifest will be written to file it has been read from. */ AndroidManifest.prototype.write = function (destPath) { - fs.writeFileSync(destPath || this.path, this.doc.write({indent: 4}), 'utf-8'); + fs.writeFileSync(destPath || this.path, this.doc.write({ indent: 4 }), 'utf-8'); }; module.exports = AndroidManifest; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidProject.js b/node_modules/cordova-android/bin/templates/cordova/lib/AndroidProject.js index bf55cad..3c2586a 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidProject.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/AndroidProject.js @@ -21,7 +21,6 @@ var fs = require('fs'); var path = require('path'); var properties_parser = require('properties-parser'); var AndroidManifest = require('./AndroidManifest'); -var AndroidStudio = require('./AndroidStudio'); var pluginHandlers = require('./pluginHandlers'); var projectFileCache = {}; @@ -62,10 +61,7 @@ function AndroidProject (projectDir) { this._dirty = false; this.projectDir = projectDir; this.platformWww = path.join(this.projectDir, 'platform_www'); - this.www = path.join(this.projectDir, 'assets/www'); - if (AndroidStudio.isAndroidStudioProject(projectDir) === true) { - this.www = path.join(this.projectDir, 'app/src/main/assets/www'); - } + this.www = path.join(this.projectDir, 'app/src/main/assets/www'); } AndroidProject.getProjectFile = function (projectDir) { @@ -92,10 +88,7 @@ AndroidProject.purgeCache = function (projectDir) { * @return {String} The name of the package */ AndroidProject.prototype.getPackageName = function () { - var manifestPath = path.join(this.projectDir, 'AndroidManifest.xml'); - if (AndroidStudio.isAndroidStudioProject(this.projectDir) === true) { - manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml'); - } + var manifestPath = path.join(this.projectDir, 'app/src/main/AndroidManifest.xml'); return new AndroidManifest(manifestPath).getPackageId(); }; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js b/node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js deleted file mode 100644 index 68d4d8f..0000000 --- a/node_modules/cordova-android/bin/templates/cordova/lib/AndroidStudio.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * This is a simple routine that checks if project is an Android Studio Project - * - * @param {String} root Root folder of the project - */ - -/* jshint esnext: false */ - -module.exports.isAndroidStudioProject = function isAndroidStudioProject (root) { - return true; -}; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/android_sdk.js b/node_modules/cordova-android/bin/templates/cordova/lib/android_sdk.js index 148f9f3..1c0ab20 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/android_sdk.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/android_sdk.js @@ -17,7 +17,6 @@ under the License. */ -var Q = require('q'); var superspawn = require('cordova-common').superspawn; var suffix_number_regex = /(\d+)$/; @@ -95,7 +94,7 @@ module.exports.list_targets = function () { } else throw err; }).then(function (targets) { if (targets.length === 0) { - return Q.reject(new Error('No android targets (SDKs) installed!')); + return Promise.reject(new Error('No android targets (SDKs) installed!')); } return targets; }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/build.js b/node_modules/cordova-android/bin/templates/cordova/lib/build.js index e33cfae..2f0ba69 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/build.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/build.js @@ -31,11 +31,10 @@ var events = require('cordova-common').events; var spawn = require('cordova-common').superspawn.spawn; var CordovaError = require('cordova-common').CordovaError; +module.exports.parseBuildOptions = parseOpts; function parseOpts (options, resolvedTarget, projectRoot) { options = options || {}; options.argv = nopt({ - gradle: Boolean, - studio: Boolean, prepenv: Boolean, versionCode: String, minSdkVersion: String, @@ -50,26 +49,13 @@ function parseOpts (options, resolvedTarget, projectRoot) { // Android Studio Build method is the default var ret = { buildType: options.release ? 'release' : 'debug', - buildMethod: process.env.ANDROID_BUILD || 'studio', prepEnv: options.argv.prepenv, arch: resolvedTarget && resolvedTarget.arch, extraArgs: [] }; - if (options.argv.gradle || options.argv.studio) { - ret.buildMethod = options.argv.studio ? 'studio' : 'gradle'; - } - - // This comes from cordova/run - if (options.studio) ret.buildMethod = 'studio'; - if (options.gradle) ret.buildMethod = 'gradle'; - - if (options.nobuild) ret.buildMethod = 'none'; - if (options.argv.versionCode) { ret.extraArgs.push('-PcdvVersionCode=' + options.argv.versionCode); } - if (options.argv.minSdkVersion) { ret.extraArgs.push('-PcdvMinSdkVersion=' + options.argv.minSdkVersion); } - if (options.argv.gradleArg) { ret.extraArgs = ret.extraArgs.concat(options.argv.gradleArg); } @@ -129,7 +115,8 @@ function parseOpts (options, resolvedTarget, projectRoot) { */ module.exports.runClean = function (options) { var opts = parseOpts(options, null, this.root); - var builder = builders.getBuilder(opts.buildMethod); + var builder = builders.getBuilder(); + return builder.prepEnv(opts).then(function () { return builder.clean(opts); }); @@ -149,8 +136,8 @@ module.exports.runClean = function (options) { */ module.exports.run = function (options, optResolvedTarget) { var opts = parseOpts(options, optResolvedTarget, this.root); - console.log(opts.buildMethod); - var builder = builders.getBuilder(opts.buildMethod); + var builder = builders.getBuilder(); + return builder.prepEnv(opts).then(function () { if (opts.prepEnv) { events.emit('verbose', 'Build file successfully prepared.'); @@ -161,8 +148,7 @@ module.exports.run = function (options, optResolvedTarget) { events.emit('log', 'Built the following apk(s): \n\t' + apkPaths.join('\n\t')); return { apkPaths: apkPaths, - buildType: opts.buildType, - buildMethod: opts.buildMethod + buildType: opts.buildType }; }); }); @@ -276,12 +262,10 @@ module.exports.help = function () { console.log('Flags:'); console.log(' \'--debug\': will build project in debug mode (default)'); console.log(' \'--release\': will build project for release'); - console.log(' \'--ant\': will build project with ant'); - console.log(' \'--gradle\': will build project with gradle (default)'); console.log(' \'--nobuild\': will skip build process (useful when using run command)'); console.log(' \'--prepenv\': don\'t build, but copy in build scripts where necessary'); - console.log(' \'--versionCode=#\': Override versionCode for this build. Useful for uploading multiple APKs. Requires --gradle.'); - console.log(' \'--minSdkVersion=#\': Override minSdkVersion for this build. Useful for uploading multiple APKs. Requires --gradle.'); + console.log(' \'--versionCode=#\': Override versionCode for this build. Useful for uploading multiple APKs.'); + console.log(' \'--minSdkVersion=#\': Override minSdkVersion for this build. Useful for uploading multiple APKs.'); console.log(' \'--gradleArg=\': Extra args to pass to the gradle command. Use one flag per arg. Ex. --gradleArg=-PcdvBuildMultipleApks=true'); console.log(''); console.log('Signed APK flags (overwrites debug/release-signing.proprties) :'); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/builders/GenericBuilder.js b/node_modules/cordova-android/bin/templates/cordova/lib/builders/GenericBuilder.js deleted file mode 100644 index 892aa38..0000000 --- a/node_modules/cordova-android/bin/templates/cordova/lib/builders/GenericBuilder.js +++ /dev/null @@ -1,124 +0,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. -*/ -/* eslint no-self-assign: 0 */ -/* eslint no-unused-vars: 0 */ - -var Q = require('q'); -var fs = require('fs'); -var path = require('path'); -var shell = require('shelljs'); -var events = require('cordova-common').events; - -function GenericBuilder (projectDir) { - this.root = projectDir || path.resolve(__dirname, '../../..'); - this.binDirs = { - studio: path.join(this.root, 'app', 'build', 'outputs', 'apk'), - gradle: path.join(this.root, 'build', 'outputs', 'apk') - }; -} - -GenericBuilder.prototype.prepEnv = function () { - return Q(); -}; - -GenericBuilder.prototype.build = function () { - events.emit('log', 'Skipping build...'); - return Q(null); -}; - -GenericBuilder.prototype.clean = function () { - return Q(); -}; - -GenericBuilder.prototype.findOutputApks = function (build_type, arch) { - var self = this; - return Object.keys(this.binDirs).reduce(function (result, builderName) { - var binDir = self.binDirs[builderName]; - return result.concat(findOutputApksHelper(binDir, build_type, builderName === 'ant' ? null : arch)); - }, []).sort(apkSorter); -}; - -module.exports = GenericBuilder; - -function apkSorter (fileA, fileB) { - // De-prioritize arch specific builds - var archSpecificRE = /-x86|-arm/; - if (archSpecificRE.exec(fileA)) { - return 1; - } else if (archSpecificRE.exec(fileB)) { - return -1; - } - - // De-prioritize unsigned builds - var unsignedRE = /-unsigned/; - if (unsignedRE.exec(fileA)) { - return 1; - } else if (unsignedRE.exec(fileB)) { - return -1; - } - - var timeDiff = fs.statSync(fileB).mtime - fs.statSync(fileA).mtime; - return timeDiff === 0 ? fileA.length - fileB.length : timeDiff; -} - -function findOutputApksHelper (dir, build_type, arch) { - var shellSilent = shell.config.silent; - shell.config.silent = true; - - // list directory recursively - var ret = shell.ls('-R', dir).map(function (file) { - // ls does not include base directory - return path.join(dir, file); - }).filter(function (file) { - // find all APKs - return file.match(/\.apk?$/i); - }).filter(function (candidate) { - var apkName = path.basename(candidate); - // Need to choose between release and debug .apk. - if (build_type === 'debug') { - return /-debug/.exec(apkName) && !/-unaligned|-unsigned/.exec(apkName); - } - if (build_type === 'release') { - return /-release/.exec(apkName) && !/-unaligned/.exec(apkName); - } - return true; - }).sort(apkSorter); - - shellSilent = shellSilent; - - if (ret.length === 0) { - return ret; - } - // Assume arch-specific build if newest apk has -x86 or -arm. - var archSpecific = !!/-x86|-arm/.exec(path.basename(ret[0])); - // And show only arch-specific ones (or non-arch-specific) - ret = ret.filter(function (p) { - /* jshint -W018 */ - return !!/-x86|-arm/.exec(path.basename(p)) === archSpecific; - /* jshint +W018 */ - }); - - if (archSpecific && ret.length > 1 && arch) { - ret = ret.filter(function (p) { - return path.basename(p).indexOf('-' + arch) !== -1; - }); - } - - return ret; -} diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/builders/GradleBuilder.js b/node_modules/cordova-android/bin/templates/cordova/lib/builders/GradleBuilder.js deleted file mode 100644 index b955db1..0000000 --- a/node_modules/cordova-android/bin/templates/cordova/lib/builders/GradleBuilder.js +++ /dev/null @@ -1,331 +0,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. -*/ - -var Q = require('q'); -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var shell = require('shelljs'); -var superspawn = require('cordova-common').superspawn; -var CordovaError = require('cordova-common').CordovaError; -var events = require('cordova-common').events; -var check_reqs = require('../check_reqs'); - -var GenericBuilder = require('./GenericBuilder'); - -var MARKER = 'YOUR CHANGES WILL BE ERASED!'; -var SIGNING_PROPERTIES = '-signing.properties'; -var TEMPLATE = - '# This file is automatically generated.\n' + - '# Do not modify this file -- ' + MARKER + '\n'; - -function GradleBuilder (projectRoot) { - GenericBuilder.call(this, projectRoot); - - this.binDirs = { gradle: this.binDirs.gradle }; -} - -util.inherits(GradleBuilder, GenericBuilder); - -GradleBuilder.prototype.getArgs = function (cmd, opts) { - if (cmd === 'release') { - cmd = 'cdvBuildRelease'; - } else if (cmd === 'debug') { - cmd = 'cdvBuildDebug'; - } - var args = [cmd, '-b', path.join(this.root, 'build.gradle')]; - if (opts.arch) { - args.push('-PcdvBuildArch=' + opts.arch); - } - - // 10 seconds -> 6 seconds - args.push('-Dorg.gradle.daemon=true'); - // to allow dex in process - args.push('-Dorg.gradle.jvmargs=-Xmx2048m'); - // allow NDK to be used - required by Gradle 1.5 plugin - args.push('-Pandroid.useDeprecatedNdk=true'); - args.push.apply(args, opts.extraArgs); - // Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet): - // args.push('-Dorg.gradle.parallel=true'); - return args; -}; - -/* - * This returns a promise - */ - -GradleBuilder.prototype.runGradleWrapper = function (gradle_cmd, gradle_file) { - var gradlePath = path.join(this.root, 'gradlew'); - gradle_file = path.join(this.root, (gradle_file || 'wrapper.gradle')); - if (fs.existsSync(gradlePath)) { - // Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows - } else { - return superspawn.spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', gradle_file], { stdio: 'pipe' }) - .progress(function (stdio) { - suppressJavaOptionsInfo(stdio); - }); - } -}; - -/* - * We need to kill this in a fire. - */ - -GradleBuilder.prototype.readProjectProperties = function () { - function findAllUniq (data, r) { - var s = {}; - var m; - while ((m = r.exec(data))) { - s[m[1]] = 1; - } - return Object.keys(s); - } - - var data = fs.readFileSync(path.join(this.root, 'project.properties'), 'utf8'); - return { - libs: findAllUniq(data, /^\s*android\.library\.reference\.\d+=(.*)(?:\s|$)/mg), - gradleIncludes: findAllUniq(data, /^\s*cordova\.gradle\.include\.\d+=(.*)(?:\s|$)/mg), - systemLibs: findAllUniq(data, /^\s*cordova\.system\.library\.\d+=(.*)(?:\s|$)/mg) - }; -}; - -GradleBuilder.prototype.extractRealProjectNameFromManifest = function () { - var manifestPath = path.join(this.root, 'AndroidManifest.xml'); - var manifestData = fs.readFileSync(manifestPath, 'utf8'); - var m = /= 0) { - return check_reqs.check_android_target(error).then(function () { - // If due to some odd reason - check_android_target succeeds - // we should still fail here. - return Q.reject(error); - }); - } - return Q.reject(error); - }); -}; - -GradleBuilder.prototype.clean = function (opts) { - var builder = this; - var wrapper = path.join(this.root, 'gradlew'); - var args = builder.getArgs('clean', opts); - return Q().then(function () { - return superspawn.spawn(wrapper, args, { stdio: 'inherit' }); - }).then(function () { - shell.rm('-rf', path.join(builder.root, 'out')); - - ['debug', 'release'].forEach(function (config) { - var propertiesFilePath = path.join(builder.root, config + SIGNING_PROPERTIES); - if (isAutoGenerated(propertiesFilePath)) { - shell.rm('-f', propertiesFilePath); - } - }); - }); -}; - -module.exports = GradleBuilder; - -function suppressJavaOptionsInfo (stdio) { - if (stdio.stderr) { - /* - * Workaround for the issue with Java printing some unwanted information to - * stderr instead of stdout. - * This function suppresses 'Picked up _JAVA_OPTIONS' message from being - * printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for - * explanation. - */ - var suppressThisLine = /^Picked up _JAVA_OPTIONS: /i.test(stdio.stderr.toString()); - if (suppressThisLine) { - return; - } - process.stderr.write(stdio.stderr); - } else { - process.stdout.write(stdio.stdout); - } -} - -function isAutoGenerated (file) { - return fs.existsSync(file) && fs.readFileSync(file, 'utf8').indexOf(MARKER) > 0; -} diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js b/node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js deleted file mode 100644 index 1689e16..0000000 --- a/node_modules/cordova-android/bin/templates/cordova/lib/builders/StudioBuilder.js +++ /dev/null @@ -1,303 +0,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. -*/ - -var Q = require('q'); -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var shell = require('shelljs'); -var spawn = require('cordova-common').superspawn.spawn; -var events = require('cordova-common').events; -var CordovaError = require('cordova-common').CordovaError; -var check_reqs = require('../check_reqs'); - -var GenericBuilder = require('./GenericBuilder'); - -var MARKER = 'YOUR CHANGES WILL BE ERASED!'; -var SIGNING_PROPERTIES = '-signing.properties'; -var TEMPLATE = - '# This file is automatically generated.\n' + - '# Do not modify this file -- ' + MARKER + '\n'; - -function StudioBuilder (projectRoot) { - GenericBuilder.call(this, projectRoot); - - this.binDirs = {gradle: this.binDirs.studio}; -} - -util.inherits(StudioBuilder, GenericBuilder); - -StudioBuilder.prototype.getArgs = function (cmd, opts) { - if (cmd === 'release') { - cmd = 'cdvBuildRelease'; - } else if (cmd === 'debug') { - cmd = 'cdvBuildDebug'; - } - var args = [cmd, '-b', path.join(this.root, 'build.gradle')]; - if (opts.arch) { - args.push('-PcdvBuildArch=' + opts.arch); - } - - // 10 seconds -> 6 seconds - args.push('-Dorg.gradle.daemon=true'); - // to allow dex in process - args.push('-Dorg.gradle.jvmargs=-Xmx2048m'); - // allow NDK to be used - required by Gradle 1.5 plugin - // args.push('-Pandroid.useDeprecatedNdk=true'); - args.push.apply(args, opts.extraArgs); - // Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet): - // args.push('-Dorg.gradle.parallel=true'); - return args; -}; - -/* - * This returns a promise - */ - -StudioBuilder.prototype.runGradleWrapper = function (gradle_cmd) { - var gradlePath = path.join(this.root, 'gradlew'); - var wrapperGradle = path.join(this.root, 'wrapper.gradle'); - if (fs.existsSync(gradlePath)) { - // Literally do nothing, for some reason this works, while !fs.existsSync didn't on Windows - } else { - return spawn(gradle_cmd, ['-p', this.root, 'wrapper', '-b', wrapperGradle], {stdio: 'inherit'}); - } -}; - -StudioBuilder.prototype.readProjectProperties = function () { - - function findAllUniq (data, r) { - var s = {}; - var m; - while ((m = r.exec(data))) { - s[m[1]] = 1; - } - return Object.keys(s); - } - - var data = fs.readFileSync(path.join(this.root, 'project.properties'), 'utf8'); - return { - libs: findAllUniq(data, /^\s*android\.library\.reference\.\d+=(.*)(?:\s|$)/mg), - gradleIncludes: findAllUniq(data, /^\s*cordova\.gradle\.include\.\d+=(.*)(?:\s|$)/mg), - systemLibs: findAllUniq(data, /^\s*cordova\.system\.library\.\d+=(.*)(?:\s|$)/mg) - }; -}; - -StudioBuilder.prototype.extractRealProjectNameFromManifest = function () { - var manifestPath = path.join(this.root, 'app', 'src', 'main', 'AndroidManifest.xml'); - var manifestData = fs.readFileSync(manifestPath, 'utf8'); - var m = /= 0) { - return check_reqs.check_android_target(error).then(function () { - // If due to some odd reason - check_android_target succeeds - // we should still fail here. - return Q.reject(error); - }); - } - return Q.reject(error); - }); -}; - -StudioBuilder.prototype.clean = function (opts) { - var builder = this; - var wrapper = path.join(this.root, 'gradlew'); - var args = builder.getArgs('clean', opts); - return Q().then(function () { - return spawn(wrapper, args, {stdio: 'inherit'}); - }) - .then(function () { - shell.rm('-rf', path.join(builder.root, 'out')); - - ['debug', 'release'].forEach(function (config) { - var propertiesFilePath = path.join(builder.root, config + SIGNING_PROPERTIES); - if (isAutoGenerated(propertiesFilePath)) { - shell.rm('-f', propertiesFilePath); - } - }); - }); -}; - -module.exports = StudioBuilder; - -function isAutoGenerated (file) { - return fs.existsSync(file) && fs.readFileSync(file, 'utf8').indexOf(MARKER) > 0; -} diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/builders/builders.js b/node_modules/cordova-android/bin/templates/cordova/lib/builders/builders.js index aedf9be..42fc19d 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/builders/builders.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/builders/builders.js @@ -1,46 +1,34 @@ /* - 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 + 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 + 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. + 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. */ -var CordovaError = require('cordova-common').CordovaError; - -var knownBuilders = { - gradle: 'GradleBuilder', - studio: 'StudioBuilder', - none: 'GenericBuilder' -}; +const CordovaError = require('cordova-common').CordovaError; /** - * Helper method that instantiates and returns a builder for specified build - * type. + * Helper method that instantiates and returns a builder for specified build type. * - * @param {String} builderType Builder name to construct and return. Must - * be one of 'ant', 'gradle' or 'none' - * - * @return {Builder} A builder instance for specified build type. + * @return {Builder} A builder instance for specified build type. */ -module.exports.getBuilder = function (builderType, projectRoot) { - if (!knownBuilders[builderType]) { throw new CordovaError('Builder ' + builderType + ' is not supported.'); } - +module.exports.getBuilder = function () { try { - var Builder = require('./' + knownBuilders[builderType]); - return new Builder(projectRoot); + const Builder = require('./ProjectBuilder'); + return new Builder(); } catch (err) { - throw new CordovaError('Failed to instantiate ' + knownBuilders[builderType] + ' builder: ' + err); + throw new CordovaError('Failed to instantiate ProjectBuilder builder: ' + err); } }; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/check_reqs.js b/node_modules/cordova-android/bin/templates/cordova/lib/check_reqs.js index d9c5f99..6435e01 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/check_reqs.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/check_reqs.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint sub:true */ - var shelljs = require('shelljs'); var child_process = require('child_process'); var Q = require('q'); @@ -205,10 +203,12 @@ module.exports.check_java = function () { return match && match[1]; }, () => { var msg = - 'Failed to run "javac -version", make sure that you have a JDK installed.\n' + - 'You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.\n'; + 'Failed to run "javac -version", make sure that you have a JDK version 8 installed.\n' + + 'You can get it from the following location:\n' + + 'https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html'; if (process.env['JAVA_HOME']) { - msg += 'Your JAVA_HOME is invalid: ' + process.env['JAVA_HOME'] + '\n'; + msg += '\n\n'; + msg += 'Your JAVA_HOME is invalid: ' + process.env['JAVA_HOME']; } throw new CordovaError(msg); }); @@ -231,6 +231,14 @@ module.exports.check_android = function () { // First ensure ANDROID_HOME is set // If we have no hints (nothing in PATH), try a few default locations if (!hasAndroidHome && !androidCmdPath && !adbInPath && !avdmanagerInPath) { + if (process.env['ANDROID_SDK_ROOT']) { + // Quick fix to set ANDROID_HOME according to ANDROID_SDK_ROOT + // if ANDROID_HOME is **not** defined and + // ANDROID_SDK_ROOT **is** defined + // according to environment variables as documented in: + // https://developer.android.com/studio/command-line/variables + maybeSetAndroidHome(path.join(process.env['ANDROID_SDK_ROOT'])); + } if (module.exports.isWindows()) { // Android Studio 1.0 installer maybeSetAndroidHome(path.join(process.env['LOCALAPPDATA'], 'Android', 'sdk')); @@ -355,15 +363,19 @@ module.exports.check_android_target = function (originalError) { // Returns a promise. module.exports.run = function () { return Q.all([this.check_java(), this.check_android()]).then(function (values) { - console.log('ANDROID_HOME=' + process.env['ANDROID_HOME']); - console.log('JAVA_HOME=' + process.env['JAVA_HOME']); + console.log('Checking Java JDK and Android SDK versions'); + console.log('ANDROID_SDK_ROOT=' + process.env['ANDROID_SDK_ROOT'] + ' (recommended setting)'); + console.log('ANDROID_HOME=' + process.env['ANDROID_HOME'] + ' (DEPRECATED)'); if (!String(values[0]).startsWith('1.8.')) { - throw new CordovaError('Requirements check failed for JDK 1.8'); + throw new CordovaError( + 'Requirements check failed for JDK 8 (\'1.8.*\')! Detected version: ' + values[0] + '\n' + + 'Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.' + ); } if (!values[1]) { - throw new CordovaError('Requirements check failed for Android SDK'); + throw new CordovaError('Requirements check failed for Android SDK! Android SDK was not detected.'); } }); }; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/device.js b/node_modules/cordova-android/bin/templates/cordova/lib/device.js index 84b5094..1559e9b 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/device.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/device.js @@ -19,7 +19,6 @@ under the License. */ -var Q = require('q'); var build = require('./build'); var path = require('path'); var Adb = require('./Adb'); @@ -53,13 +52,13 @@ module.exports.list = function (lookHarder) { module.exports.resolveTarget = function (target) { return this.list(true).then(function (device_list) { if (!device_list || !device_list.length) { - return Q.reject(new CordovaError('Failed to deploy to device, no devices found.')); + return Promise.reject(new CordovaError('Failed to deploy to device, no devices found.')); } // default device target = target || device_list[0]; if (device_list.indexOf(target) < 0) { - return Q.reject('ERROR: Unable to find target \'' + target + '\'.'); + return Promise.reject(new CordovaError('ERROR: Unable to find target \'' + target + '\'.')); } return build.detectArchitecture(target).then(function (arch) { @@ -74,7 +73,7 @@ module.exports.resolveTarget = function (target) { * Returns a promise. */ module.exports.install = function (target, buildResults) { - return Q().then(function () { + return Promise.resolve().then(function () { if (target && typeof target === 'object') { return target; } @@ -87,7 +86,7 @@ module.exports.install = function (target, buildResults) { events.emit('log', 'Using apk: ' + apk_path); events.emit('log', 'Package name: ' + pkgName); - return Adb.install(resolvedTarget.target, apk_path, {replace: true}).catch(function (error) { + return Adb.install(resolvedTarget.target, apk_path, { replace: true }).catch(function (error) { // CB-9557 CB-10157 only uninstall and reinstall app if the one that // is already installed on device was signed w/different certificate if (!/INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES/.test(error.toString())) { throw error; } @@ -98,7 +97,7 @@ module.exports.install = function (target, buildResults) { // This promise is always resolved, even if 'adb uninstall' fails to uninstall app // or the app doesn't installed at all, so no error catching needed. return Adb.uninstall(resolvedTarget.target, pkgName).then(function () { - return Adb.install(resolvedTarget.target, apk_path, {replace: true}); + return Adb.install(resolvedTarget.target, apk_path, { replace: true }); }); }).then(function () { // unlock screen diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/emulator.js b/node_modules/cordova-android/bin/templates/cordova/lib/emulator.js index 63ed302..fcdc170 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/emulator.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/emulator.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint sub:true */ - var android_versions = require('android-versions'); var retry = require('./retry'); var build = require('./build'); @@ -34,7 +32,6 @@ var shelljs = require('shelljs'); var android_sdk = require('./android_sdk'); var check_reqs = require('./check_reqs'); -var Q = require('q'); var os = require('os'); var fs = require('fs'); var child_process = require('child_process'); @@ -170,15 +167,13 @@ module.exports.list_images_using_android = function () { } */ module.exports.list_images = function () { - return Q.fcall(function () { + return Promise.resolve().then(function () { if (forgivingWhichSync('avdmanager')) { return module.exports.list_images_using_avdmanager(); } else if (forgivingWhichSync('android')) { return module.exports.list_images_using_android(); } else { - return Q().then(function () { - throw new CordovaError('Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?'); - }); + return Promise.reject(new CordovaError('Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?')); } }).then(function (avds) { // In case we're missing the Android OS version string from the target description, add it. @@ -228,13 +223,13 @@ module.exports.best_image = function () { // Returns a promise. module.exports.list_started = function () { - return Adb.devices({emulators: true}); + return Adb.devices({ emulators: true }); }; // Returns a promise. // TODO: we should remove this, there's a more robust method under android_sdk.js module.exports.list_targets = function () { - return superspawn.spawn('android', ['list', 'targets'], {cwd: os.tmpdir()}).then(function (output) { + return superspawn.spawn('android', ['list', 'targets'], { cwd: os.tmpdir() }).then(function (output) { var target_out = output.split('\n'); var targets = []; for (var i = target_out.length; i >= 0; i--) { @@ -277,8 +272,8 @@ module.exports.get_available_port = function () { module.exports.start = function (emulator_ID, boot_timeout) { var self = this; - return Q().then(function () { - if (emulator_ID) return Q(emulator_ID); + return Promise.resolve().then(function () { + if (emulator_ID) return Promise.resolve(emulator_ID); return self.best_image().then(function (best) { if (best && best.name) { @@ -287,7 +282,7 @@ module.exports.start = function (emulator_ID, boot_timeout) { } var androidCmd = check_reqs.getAbsoluteAndroidCmd(); - return Q.reject(new CordovaError('No emulator images (avds) found.\n' + + return Promise.reject(new CordovaError('No emulator images (avds) found.\n' + '1. Download desired System Image by running: ' + androidCmd + ' sdk\n' + '2. Create an AVD by running: ' + androidCmd + ' avd\n' + 'HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver\n')); @@ -308,7 +303,7 @@ module.exports.start = function (emulator_ID, boot_timeout) { return self.wait_for_emulator(port); }); }).then(function (emulatorId) { - if (!emulatorId) { return Q.reject(new CordovaError('Failed to start emulator')); } + if (!emulatorId) { return Promise.reject(new CordovaError('Failed to start emulator')); } // wait for emulator to boot up process.stdout.write('Waiting for emulator to boot (this may take a while)...'); @@ -334,7 +329,7 @@ module.exports.start = function (emulator_ID, boot_timeout) { */ module.exports.wait_for_emulator = function (port) { var self = this; - return Q().then(function () { + return Promise.resolve().then(function () { var emulator_id = 'emulator-' + port; return Adb.shell(emulator_id, 'getprop dev.bootcomplete').then(function (output) { if (output.indexOf('1') >= 0) { @@ -345,7 +340,8 @@ module.exports.wait_for_emulator = function (port) { if ((error && error.message && (error.message.indexOf('not found') > -1)) || (error.message.indexOf('device offline') > -1) || - (error.message.indexOf('device still connecting') > -1)) { + (error.message.indexOf('device still connecting') > -1) || + (error.message.indexOf('device still authorizing') > -1)) { // emulator not yet started, continue waiting return self.wait_for_emulator(port); } else { @@ -371,10 +367,13 @@ module.exports.wait_for_boot = function (emulator_id, time_remaining) { } else { process.stdout.write('.'); - // Check at regular intervals - return Q.delay(time_remaining < CHECK_BOOTED_INTERVAL ? time_remaining : CHECK_BOOTED_INTERVAL).then(function () { - var updated_time = time_remaining >= 0 ? Math.max(time_remaining - CHECK_BOOTED_INTERVAL, 0) : time_remaining; - return self.wait_for_boot(emulator_id, updated_time); + return new Promise(resolve => { + const delay = time_remaining < CHECK_BOOTED_INTERVAL ? time_remaining : CHECK_BOOTED_INTERVAL; + + setTimeout(() => { + const updated_time = time_remaining >= 0 ? Math.max(time_remaining - CHECK_BOOTED_INTERVAL, 0) : time_remaining; + resolve(self.wait_for_boot(emulator_id, updated_time)); + }, delay); }); } }); @@ -400,7 +399,7 @@ module.exports.create_image = function (name, target) { // TODO: This seems like another error case, even though it always happens. console.error('ERROR : Unable to create an avd emulator, no targets found.'); console.error('Ensure you have targets available by running the "android" command'); - return Q.reject(); + return Promise.reject(new CordovaError()); }, function (error) { console.error('ERROR : Failed to create emulator image : '); console.error(error); @@ -411,17 +410,17 @@ module.exports.create_image = function (name, target) { module.exports.resolveTarget = function (target) { return this.list_started().then(function (emulator_list) { if (emulator_list.length < 1) { - return Q.reject('No running Android emulators found, please start an emulator before deploying your project.'); + return Promise.reject(new CordovaError('No running Android emulators found, please start an emulator before deploying your project.')); } // default emulator target = target || emulator_list[0]; if (emulator_list.indexOf(target) < 0) { - return Q.reject('Unable to find target \'' + target + '\'. Failed to deploy to emulator.'); + return Promise.reject(new CordovaError('Unable to find target \'' + target + '\'. Failed to deploy to emulator.')); } return build.detectArchitecture(target).then(function (arch) { - return {target: target, arch: arch, isEmulator: true}; + return { target: target, arch: arch, isEmulator: true }; }); }); }; @@ -436,15 +435,12 @@ module.exports.install = function (givenTarget, buildResults) { var target; // We need to find the proper path to the Android Manifest - var manifestPath = path.join(__dirname, '..', '..', 'app', 'src', 'main', 'AndroidManifest.xml'); - if (buildResults.buildMethod === 'gradle') { - manifestPath = path.join(__dirname, '../../AndroidManifest.xml'); - } - var manifest = new AndroidManifest(manifestPath); - var pkgName = manifest.getPackageId(); + const manifestPath = path.join(__dirname, '..', '..', 'app', 'src', 'main', 'AndroidManifest.xml'); + const manifest = new AndroidManifest(manifestPath); + const pkgName = manifest.getPackageId(); // resolve the target emulator - return Q().then(function () { + return Promise.resolve().then(function () { if (givenTarget && typeof givenTarget === 'object') { return givenTarget; } else { @@ -459,7 +455,7 @@ module.exports.install = function (givenTarget, buildResults) { }).then(function () { // This promise is always resolved, even if 'adb uninstall' fails to uninstall app // or the app doesn't installed at all, so no error catching needed. - return Q.when().then(function () { + return Promise.resolve().then(function () { var apk_path = build.findBestApkForArchitecture(buildResults, target.arch); var execOptions = { @@ -479,7 +475,7 @@ module.exports.install = function (givenTarget, buildResults) { events.emit('verbose', 'Installing apk ' + apk + ' on ' + target + '...'); var command = 'adb -s ' + target + ' install -r "' + apk + '"'; - return Q.promise(function (resolve, reject) { + return new Promise(function (resolve, reject) { child_process.exec(command, opts, function (err, stdout, stderr) { if (err) reject(new CordovaError('Error executing "' + command + '": ' + stderr)); // adb does not return an error code even if installation fails. Instead it puts a specific diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/install-device b/node_modules/cordova-android/bin/templates/cordova/lib/install-device index fc4b784..0387388 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/install-device +++ b/node_modules/cordova-android/bin/templates/cordova/lib/install-device @@ -19,23 +19,23 @@ under the License. */ -var device = require('./device'), - args = process.argv; +var device = require('./device'); +var args = process.argv; -if(args.length > 2) { +if (args.length > 2) { var install_target; - if (args[2].substring(0, 9) == '--target=') { + if (args[2].substring(0, 9) === '--target=') { install_target = args[2].substring(9, args[2].length); - device.install(install_target).done(null, function(err) { + device.install(install_target).catch(function (err) { console.error('ERROR: ' + err); process.exit(2); }); - } else { + } else { console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); process.exit(2); - } + } } else { - device.install().done(null, function(err) { + device.install().catch(function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/install-emulator b/node_modules/cordova-android/bin/templates/cordova/lib/install-emulator index aa2a34f..2d46dbe 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/install-emulator +++ b/node_modules/cordova-android/bin/templates/cordova/lib/install-emulator @@ -19,20 +19,20 @@ under the License. */ -var emulator = require('./emulator'), - args = process.argv; +var emulator = require('./emulator'); +var args = process.argv; var install_target; -if(args.length > 2) { - if (args[2].substring(0, 9) == '--target=') { +if (args.length > 2) { + if (args[2].substring(0, 9) === '--target=') { install_target = args[2].substring(9, args[2].length); - } else { + } else { console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); process.exit(2); - } + } } -emulator.install(install_target).done(null, function(err) { +emulator.install(install_target).catch(function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/list-devices b/node_modules/cordova-android/bin/templates/cordova/lib/list-devices index 8e22c7f..339c665 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/list-devices +++ b/node_modules/cordova-android/bin/templates/cordova/lib/list-devices @@ -22,12 +22,12 @@ var devices = require('./device'); // Usage support for when args are given -require('./check_reqs').check_android().then(function() { - devices.list().done(function(device_list) { - device_list && device_list.forEach(function(dev) { +require('./check_reqs').check_android().then(function () { + devices.list().then(function (device_list) { + device_list && device_list.forEach(function (dev) { console.log(dev); }); - }, function(err) { + }, function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images b/node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images index 25e5c81..03cfb19 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images +++ b/node_modules/cordova-android/bin/templates/cordova/lib/list-emulator-images @@ -22,12 +22,12 @@ var emulators = require('./emulator'); // Usage support for when args are given -require('./check_reqs').check_android().then(function() { - emulators.list_images().done(function(emulator_list) { - emulator_list && emulator_list.forEach(function(emu) { +require('./check_reqs').check_android().then(function () { + emulators.list_images().then(function (emulator_list) { + emulator_list && emulator_list.forEach(function (emu) { console.log(emu.name); }); - }, function(err) { + }, function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators b/node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators index 43ebda2..2a83e03 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators +++ b/node_modules/cordova-android/bin/templates/cordova/lib/list-started-emulators @@ -22,12 +22,12 @@ var emulators = require('./emulator'); // Usage support for when args are given -require('./check_reqs').check_android().then(function() { - emulators.list_started().done(function(emulator_list) { - emulator_list && emulator_list.forEach(function(emu) { +require('./check_reqs').check_android().then(function () { + emulators.list_started().then(function (emulator_list) { + emulator_list && emulator_list.forEach(function (emu) { console.log(emu); }); - }, function(err) { + }, function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/log.js b/node_modules/cordova-android/bin/templates/cordova/lib/log.js index ef2dd5c..ec69f8c 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/log.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/log.js @@ -31,7 +31,7 @@ var ROOT = path.join(__dirname, '..', '..'); */ module.exports.run = function () { var d = Q.defer(); - var adb = child_process.spawn('adb', ['logcat'], {cwd: os.tmpdir()}); + var adb = child_process.spawn('adb', ['logcat'], { cwd: os.tmpdir() }); adb.stdout.on('data', function (data) { var lines = data ? data.toString().split('\n') : []; diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/plugin-build.gradle b/node_modules/cordova-android/bin/templates/cordova/lib/plugin-build.gradle index fdef1f7..032b870 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/plugin-build.gradle +++ b/node_modules/cordova-android/bin/templates/cordova/lib/plugin-build.gradle @@ -20,9 +20,7 @@ buildscript { repositories { - maven { - url "https://maven.google.com" - } + google() jcenter() } @@ -38,7 +36,7 @@ buildscript { apply plugin: 'com.android.library' dependencies { - compile fileTree(dir: 'libs', include: '*.jar') + implementation fileTree(dir: 'libs', include: '*.jar') debugCompile project(path: ":CordovaLib", configuration: "debug") releaseCompile project(path: ":CordovaLib", configuration: "release") } @@ -46,7 +44,6 @@ dependencies { android { compileSdkVersion cdvCompileSdkVersion buildToolsVersion cdvBuildToolsVersion - publishNonDefault true compileOptions { sourceCompatibility JavaVersion.VERSION_1_6 diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js b/node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js index f5be4b4..6d1a733 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/pluginHandlers.js @@ -14,8 +14,6 @@ * */ -/* jshint unused: vars */ - var fs = require('fs'); var path = require('path'); var shell = require('shelljs'); @@ -28,14 +26,7 @@ var handlers = { if (!obj.src) throw new CordovaError(generateAttributeError('src', 'source-file', plugin.id)); if (!obj.targetDir) throw new CordovaError(generateAttributeError('target-dir', 'source-file', plugin.id)); - var dest = path.join(obj.targetDir, path.basename(obj.src)); - - // TODO: This code needs to be replaced, since the core plugins need to be re-mapped to a different location in - // a later plugins release. This is for legacy plugins to work with Cordova. - - if (options && options.android_studio === true) { - dest = getInstallDestination(obj); - } + var dest = getInstallDestination(obj); if (options && options.force) { copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); @@ -44,11 +35,7 @@ var handlers = { } }, uninstall: function (obj, plugin, project, options) { - var dest = path.join(obj.targetDir, path.basename(obj.src)); - - if (options && options.android_studio === true) { - dest = getInstallDestination(obj); - } + var dest = getInstallDestination(obj); // TODO: Add Koltin extension to uninstall, since they are handled like Java files if (obj.src.endsWith('java')) { @@ -61,33 +48,21 @@ var handlers = { }, 'lib-file': { install: function (obj, plugin, project, options) { - var dest = path.join('libs', path.basename(obj.src)); - if (options && options.android_studio === true) { - dest = path.join('app/libs', path.basename(obj.src)); - } + var dest = path.join('app/libs', path.basename(obj.src)); copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); }, uninstall: function (obj, plugin, project, options) { - var dest = path.join('libs', path.basename(obj.src)); - if (options && options.android_studio === true) { - dest = path.join('app/libs', path.basename(obj.src)); - } + var dest = path.join('app/libs', path.basename(obj.src)); removeFile(project.projectDir, dest); } }, 'resource-file': { install: function (obj, plugin, project, options) { - var dest = path.normalize(obj.target); - if (options && options.android_studio === true) { - dest = path.join('app/src/main', dest); - } + var dest = path.join('app', 'src', 'main', obj.target); copyFile(plugin.dir, obj.src, project.projectDir, dest, !!(options && options.link)); }, uninstall: function (obj, plugin, project, options) { - var dest = path.normalize(obj.target); - if (options && options.android_studio === true) { - dest = path.join('app/src/main', dest); - } + var dest = path.join('app', 'src', 'main', obj.target); removeFile(project.projectDir, dest); } }, @@ -319,27 +294,41 @@ function generateAttributeError (attribute, element, id) { function getInstallDestination (obj) { var APP_MAIN_PREFIX = 'app/src/main'; + var PATH_SEPARATOR = '/'; - if (obj.targetDir.startsWith('app')) { + var PATH_SEP_MATCH = '\\' + PATH_SEPARATOR; + var PATH_SEP_OR_EOL_MATCH = '(\\' + PATH_SEPARATOR + '|$)'; + + var appReg = new RegExp('^app' + PATH_SEP_OR_EOL_MATCH); + var libsReg = new RegExp('^libs' + PATH_SEP_OR_EOL_MATCH); + var srcReg = new RegExp('^src' + PATH_SEP_OR_EOL_MATCH); + var srcMainReg = new RegExp('^src' + PATH_SEP_MATCH + 'main' + PATH_SEP_OR_EOL_MATCH); + + if (appReg.test(obj.targetDir)) { // If any source file is using the new app directory structure, // don't penalize it return path.join(obj.targetDir, path.basename(obj.src)); - } else if (obj.src.endsWith('.java')) { - return path.join(APP_MAIN_PREFIX, 'java', obj.targetDir.substring(4), path.basename(obj.src)); - } else if (obj.src.endsWith('.aidl')) { - return path.join(APP_MAIN_PREFIX, 'aidl', obj.targetDir.substring(4), path.basename(obj.src)); - } else if (obj.targetDir.includes('libs')) { - if (obj.src.endsWith('.so')) { - return path.join(APP_MAIN_PREFIX, 'jniLibs', obj.targetDir.substring(5), path.basename(obj.src)); - } else { + } else { + // Plugin using deprecated target directory structure (GH-580) + if (obj.src.endsWith('.java')) { + return path.join(APP_MAIN_PREFIX, 'java', obj.targetDir.replace(srcReg, ''), + path.basename(obj.src)); + } else if (obj.src.endsWith('.aidl')) { + return path.join(APP_MAIN_PREFIX, 'aidl', obj.targetDir.replace(srcReg, ''), + path.basename(obj.src)); + } else if (libsReg.test(obj.targetDir)) { + if (obj.src.endsWith('.so')) { + return path.join(APP_MAIN_PREFIX, 'jniLibs', obj.targetDir.replace(libsReg, ''), + path.basename(obj.src)); + } else { + return path.join('app', obj.targetDir, path.basename(obj.src)); + } + } else if (srcMainReg.test(obj.targetDir)) { return path.join('app', obj.targetDir, path.basename(obj.src)); } - } else if (obj.targetDir.includes('src/main')) { - return path.join('app', obj.targetDir, path.basename(obj.src)); - } else { + // For all other source files not using the new app directory structure, // add 'app/src/main' to the targetDir return path.join(APP_MAIN_PREFIX, obj.targetDir, path.basename(obj.src)); } - } diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/prepare.js b/node_modules/cordova-android/bin/templates/cordova/lib/prepare.js index ac63f8a..49e0a7d 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/prepare.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/prepare.js @@ -33,6 +33,8 @@ var PlatformJson = require('cordova-common').PlatformJson; var PlatformMunger = require('cordova-common').ConfigChanges.PlatformMunger; var PluginInfoProvider = require('cordova-common').PluginInfoProvider; +const GradlePropertiesParser = require('./config/GradlePropertiesParser'); + module.exports.prepare = function (cordovaProject, options) { var self = this; @@ -41,6 +43,15 @@ module.exports.prepare = function (cordovaProject, options) { this._config = updateConfigFilesFrom(cordovaProject.projectConfig, munger, this.locations); + // Get the min SDK version from config.xml + const minSdkVersion = this._config.getPreference('android-minSdkVersion', 'android'); + + let gradlePropertiesUserConfig = {}; + if (minSdkVersion) gradlePropertiesUserConfig.cdvMinSdkVersion = minSdkVersion; + + let gradlePropertiesParser = new GradlePropertiesParser(this.locations.root); + gradlePropertiesParser.configure(gradlePropertiesUserConfig); + // Update own www dir with project's www assets and plugins' assets and js-files return Q.when(updateWww(cordovaProject, this.locations)).then(function () { // update project according to config.xml changes. @@ -178,7 +189,7 @@ function updateProjectAccordingTo (platformConfig, locations) { strings.find('string[@name="launcher_name"]').text = shortName.replace(/\'/g, '\\\''); } - fs.writeFileSync(locations.strings, strings.write({indent: 4}), 'utf-8'); + fs.writeFileSync(locations.strings, strings.write({ indent: 4 }), 'utf-8'); events.emit('verbose', 'Wrote out android application name "' + name + '" to ' + locations.strings); // Java packages cannot support dashes @@ -265,6 +276,14 @@ function getImageResourcePath (resourcesDir, type, density, name, sourceName) { return resourcePath; } +function getAdaptiveImageResourcePath (resourcesDir, type, density, name, sourceName) { + if (/\.9\.png$/.test(sourceName)) { + name = name.replace(/\.png$/, '.9.png'); + } + var resourcePath = path.join(resourcesDir, (density ? type + '-' + density + '-v26' : type), name); + return resourcePath; +} + function updateSplashes (cordovaProject, platformResourcesDir) { var resources = cordovaProject.projectConfig.getSplashScreens('android'); @@ -314,20 +333,197 @@ function cleanSplashes (projectRoot, projectConfig, platformResourcesDir) { } function updateIcons (cordovaProject, platformResourcesDir) { - var icons = cordovaProject.projectConfig.getIcons('android'); + let icons = cordovaProject.projectConfig.getIcons('android'); - // if there are icon elements in config.xml + // Skip if there are no app defined icons in config.xml if (icons.length === 0) { events.emit('verbose', 'This app does not have launcher icons defined'); return; } - var resourceMap = mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'icon.png'); + // 1. loop icons determin if there is an error in the setup. + // 2. during initial loop, also setup for legacy support. + let errorMissingAttributes = []; + let errorLegacyIconNeeded = []; + let hasAdaptive = false; + icons.forEach((icon, key) => { + if ( + (icon.background && !icon.foreground) + || (!icon.background && icon.foreground) + || (!icon.background && !icon.foreground && !icon.src) + ) { + errorMissingAttributes.push(icon.density ? icon.density : 'size=' + (icon.height || icon.width)); + } - var android_icons = {}; - var default_icon; + if (icon.foreground) { + hasAdaptive = true; + + if ( + !icon.src + && ( + icon.foreground.startsWith('@color') + || path.extname(path.basename(icon.foreground)) === '.xml' + ) + ) { + errorLegacyIconNeeded.push(icon.density ? icon.density : 'size=' + (icon.height || icon.width)); + } else if (!icon.src) { + icons[key].src = icon.foreground; + } + } + }); + + let errorMessage = []; + if (errorMissingAttributes.length > 0) { + errorMessage.push('One of the following attributes are set but missing the other for the density type: ' + errorMissingAttributes.join(', ') + '. Please ensure that all require attributes are defined.'); + } + + if (errorLegacyIconNeeded.length > 0) { + errorMessage.push('For the following icons with the density of: ' + errorLegacyIconNeeded.join(', ') + ', adaptive foreground with a defined color or vector can not be used as a standard fallback icon for older Android devices. To support older Android environments, please provide a value for the src attribute.'); + } + + if (errorMessage.length > 0) { + throw new CordovaError(errorMessage.join(' ')); + } + + let resourceMap = Object.assign( + {}, + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher.png'), + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher_foreground.png'), + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher_background.png'), + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher_foreground.xml'), + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher_background.xml'), + mapImageResources(cordovaProject.root, platformResourcesDir, 'mipmap', 'ic_launcher.xml') + ); + + let preparedIcons = prepareIcons(icons); + + if (hasAdaptive) { + resourceMap = updateIconResourceForAdaptive(preparedIcons, resourceMap, platformResourcesDir); + } + + resourceMap = updateIconResourceForLegacy(preparedIcons, resourceMap, platformResourcesDir); + + events.emit('verbose', 'Updating icons at ' + platformResourcesDir); + FileUpdater.updatePaths(resourceMap, { rootDir: cordovaProject.root }, logFileOp); +} + +function updateIconResourceForAdaptive (preparedIcons, resourceMap, platformResourcesDir) { + let android_icons = preparedIcons.android_icons; + let default_icon = preparedIcons.default_icon; + + // The source paths for icons and splashes are relative to + // project's config.xml location, so we use it as base path. + let background; + let foreground; + let targetPathBackground; + let targetPathForeground; + + for (let density in android_icons) { + let backgroundVal = '@mipmap/ic_launcher_background'; + let foregroundVal = '@mipmap/ic_launcher_foreground'; + + background = android_icons[density].background; + foreground = android_icons[density].foreground; + + if (background.startsWith('@color')) { + // Colors Use Case + backgroundVal = background; // Example: @color/background_foobar_1 + } else if (path.extname(path.basename(background)) === '.xml') { + // Vector Use Case + targetPathBackground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', density, 'ic_launcher_background.xml', path.basename(android_icons[density].background)); + resourceMap[targetPathBackground] = android_icons[density].background; + } else if (path.extname(path.basename(background)) === '.png') { + // Images Use Case + targetPathBackground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', density, 'ic_launcher_background.png', path.basename(android_icons[density].background)); + resourceMap[targetPathBackground] = android_icons[density].background; + } + + if (foreground.startsWith('@color')) { + // Colors Use Case + foregroundVal = foreground; + } else if (path.extname(path.basename(foreground)) === '.xml') { + // Vector Use Case + targetPathForeground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', density, 'ic_launcher_foreground.xml', path.basename(android_icons[density].foreground)); + resourceMap[targetPathForeground] = android_icons[density].foreground; + } else if (path.extname(path.basename(foreground)) === '.png') { + // Images Use Case + targetPathForeground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', density, 'ic_launcher_foreground.png', path.basename(android_icons[density].foreground)); + resourceMap[targetPathForeground] = android_icons[density].foreground; + } + + // create an XML for DPI and set color + const icLauncherTemplate = ` + + + +`; + + let launcherXmlPath = path.join(platformResourcesDir, 'mipmap-' + density + '-v26', 'ic_launcher.xml'); + + // Remove the XML from the resourceMap so the file does not get removed. + delete resourceMap[launcherXmlPath]; + + fs.writeFileSync(path.resolve(launcherXmlPath), icLauncherTemplate); + } + + // There's no "default" drawable, so assume default == mdpi. + if (default_icon && !android_icons.mdpi) { + let defaultTargetPathBackground; + let defaultTargetPathForeground; + + if (background.startsWith('@color')) { + // Colors Use Case + targetPathBackground = default_icon.background; + } else if (path.extname(path.basename(background)) === '.xml') { + // Vector Use Case + defaultTargetPathBackground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', 'mdpi', 'ic_launcher_background.xml', path.basename(default_icon.background)); + resourceMap[defaultTargetPathBackground] = default_icon.background; + } else if (path.extname(path.basename(background)) === '.png') { + // Images Use Case + defaultTargetPathBackground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', 'mdpi', 'ic_launcher_background.png', path.basename(default_icon.background)); + resourceMap[defaultTargetPathBackground] = default_icon.background; + } + + if (foreground.startsWith('@color')) { + // Colors Use Case + targetPathForeground = default_icon.foreground; + } else if (path.extname(path.basename(foreground)) === '.xml') { + // Vector Use Case + defaultTargetPathForeground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', 'mdpi', 'ic_launcher_foreground.xml', path.basename(default_icon.foreground)); + resourceMap[defaultTargetPathForeground] = default_icon.foreground; + } else if (path.extname(path.basename(foreground)) === '.png') { + // Images Use Case + defaultTargetPathForeground = getAdaptiveImageResourcePath(platformResourcesDir, 'mipmap', 'mdpi', 'ic_launcher_foreground.png', path.basename(default_icon.foreground)); + resourceMap[defaultTargetPathForeground] = default_icon.foreground; + } + } + + return resourceMap; +} + +function updateIconResourceForLegacy (preparedIcons, resourceMap, platformResourcesDir) { + let android_icons = preparedIcons.android_icons; + let default_icon = preparedIcons.default_icon; + + // The source paths for icons and splashes are relative to + // project's config.xml location, so we use it as base path. + for (var density in android_icons) { + var targetPath = getImageResourcePath(platformResourcesDir, 'mipmap', density, 'ic_launcher.png', path.basename(android_icons[density].src)); + resourceMap[targetPath] = android_icons[density].src; + } + + // There's no "default" drawable, so assume default == mdpi. + if (default_icon && !android_icons.mdpi) { + var defaultTargetPath = getImageResourcePath(platformResourcesDir, 'mipmap', 'mdpi', 'ic_launcher.png', path.basename(default_icon.src)); + resourceMap[defaultTargetPath] = default_icon.src; + } + + return resourceMap; +} + +function prepareIcons (icons) { // http://developer.android.com/design/style/iconography.html - var sizeToDensityMap = { + const SIZE_TO_DENSITY_MAP = { 36: 'ldpi', 48: 'mdpi', 72: 'hdpi', @@ -335,11 +531,15 @@ function updateIcons (cordovaProject, platformResourcesDir) { 144: 'xxhdpi', 192: 'xxxhdpi' }; + + let android_icons = {}; + let default_icon; + // find the best matching icon for a given density or size // @output android_icons var parseIcon = function (icon, icon_size) { // do I have a platform icon for that density already - var density = icon.density || sizeToDensityMap[icon_size]; + var density = icon.density || SIZE_TO_DENSITY_MAP[icon_size]; if (!density) { // invalid icon defition ( or unsupported size) return; @@ -355,12 +555,34 @@ function updateIcons (cordovaProject, platformResourcesDir) { for (var i = 0; i < icons.length; i++) { var icon = icons[i]; var size = icon.width; + if (!size) { size = icon.height; } + if (!size && !icon.density) { if (default_icon) { - events.emit('verbose', 'Found extra default icon: ' + icon.src + ' (ignoring in favor of ' + default_icon.src + ')'); + let found = {}; + let favor = {}; + + // populating found icon. + if (icon.background && icon.foreground) { + found.background = icon.background; + found.foreground = icon.foreground; + } + if (icon.src) { + found.src = icon.src; + } + + if (default_icon.background && default_icon.foreground) { + favor.background = default_icon.background; + favor.foreground = default_icon.foreground; + } + if (default_icon.src) { + favor.src = default_icon.src; + } + + events.emit('verbose', 'Found extra default icon: ' + JSON.stringify(found) + ' and ignoring in favor of ' + JSON.stringify(favor) + '.'); } else { default_icon = icon; } @@ -369,36 +591,35 @@ function updateIcons (cordovaProject, platformResourcesDir) { } } - // The source paths for icons and splashes are relative to - // project's config.xml location, so we use it as base path. - for (var density in android_icons) { - var targetPath = getImageResourcePath( - platformResourcesDir, 'mipmap', density, 'icon.png', path.basename(android_icons[density].src)); - resourceMap[targetPath] = android_icons[density].src; - } - - // There's no "default" drawable, so assume default == mdpi. - if (default_icon && !android_icons.mdpi) { - var defaultTargetPath = getImageResourcePath( - platformResourcesDir, 'mipmap', 'mdpi', 'icon.png', path.basename(default_icon.src)); - resourceMap[defaultTargetPath] = default_icon.src; - } - - events.emit('verbose', 'Updating icons at ' + platformResourcesDir); - FileUpdater.updatePaths( - resourceMap, { rootDir: cordovaProject.root }, logFileOp); + return { + android_icons: android_icons, + default_icon: default_icon + }; } function cleanIcons (projectRoot, projectConfig, platformResourcesDir) { var icons = projectConfig.getIcons('android'); - if (icons.length > 0) { - var resourceMap = mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'icon.png'); - events.emit('verbose', 'Cleaning icons at ' + platformResourcesDir); - // No source paths are specified in the map, so updatePaths() will delete the target files. - FileUpdater.updatePaths( - resourceMap, { rootDir: projectRoot, all: true }, logFileOp); + // Skip if there are no app defined icons in config.xml + if (icons.length === 0) { + events.emit('verbose', 'This app does not have launcher icons defined'); + return; } + + let resourceMap = Object.assign( + {}, + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher.png'), + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher_foreground.png'), + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher_background.png'), + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher_foreground.xml'), + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher_background.xml'), + mapImageResources(projectRoot, platformResourcesDir, 'mipmap', 'ic_launcher.xml') + ); + + events.emit('verbose', 'Cleaning icons at ' + platformResourcesDir); + + // No source paths are specified in the map, so updatePaths() will delete the target files. + FileUpdater.updatePaths(resourceMap, { rootDir: projectRoot, all: true }, logFileOp); } /** @@ -446,7 +667,7 @@ function cleanFileResources (projectRoot, projectConfig, platformDir) { FileUpdater.updatePaths( resourceMap, { - rootDir: projectRoot, all: true}, logFileOp); + rootDir: projectRoot, all: true }, logFileOp); } } diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/retry.js b/node_modules/cordova-android/bin/templates/cordova/lib/retry.js index c464b9d..b2b9a44 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/retry.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/retry.js @@ -19,8 +19,6 @@ under the License. */ -/* jshint node: true */ - 'use strict'; var events = require('cordova-common').events; @@ -29,21 +27,20 @@ var events = require('cordova-common').events; * Retry a promise-returning function a number of times, propagating its * results on success or throwing its error on a failed final attempt. * - * @arg {Number} attemts_left - The number of times to retry the passed call. + * @arg {Number} attemptsLeft - The number of times to retry the passed call. * @arg {Function} promiseFunction - A function that returns a promise. * @arg {...} - Arguments to pass to promiseFunction. * * @returns {Promise} */ -module.exports.retryPromise = function (attemts_left, promiseFunction) { +module.exports.retryPromise = function (attemptsLeft, promiseFunction) { // NOTE: - // get all trailing arguments, by skipping the first two (attemts_left and + // get all trailing arguments, by skipping the first two (attemptsLeft and // promiseFunction) because they shouldn't get passed to promiseFunction var promiseFunctionArguments = Array.prototype.slice.call(arguments, 2); return promiseFunction.apply(undefined, promiseFunctionArguments).then( - // on success pass results through function onFulfilled (value) { return value; @@ -51,17 +48,16 @@ module.exports.retryPromise = function (attemts_left, promiseFunction) { // on rejection either retry, or throw the error function onRejected (error) { + attemptsLeft -= 1; - attemts_left -= 1; - - if (attemts_left < 1) { + if (attemptsLeft < 1) { throw error; } - events.emit('verbose', 'A retried call failed. Retrying ' + attemts_left + ' more time(s).'); + events.emit('verbose', 'A retried call failed. Retrying ' + attemptsLeft + ' more time(s).'); - // retry call self again with the same arguments, except attemts_left is now lower - var fullArguments = [attemts_left, promiseFunction].concat(promiseFunctionArguments); + // retry call self again with the same arguments, except attemptsLeft is now lower + var fullArguments = [attemptsLeft, promiseFunction].concat(promiseFunctionArguments); return module.exports.retryPromise.apply(undefined, fullArguments); } ); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/run.js b/node_modules/cordova-android/bin/templates/cordova/lib/run.js index 4d7927c..221467b 100644 --- a/node_modules/cordova-android/bin/templates/cordova/lib/run.js +++ b/node_modules/cordova-android/bin/templates/cordova/lib/run.js @@ -19,10 +19,7 @@ under the License. */ -/* jshint loopfunc:true */ - var path = require('path'); -var build = require('./build'); var emulator = require('./emulator'); var device = require('./device'); var Q = require('q'); @@ -52,6 +49,7 @@ function getInstallTarget (runOptions) { * @return {Promise} */ module.exports.run = function (runOptions) { + runOptions = runOptions || {}; var self = this; var install_target = getInstallTarget(runOptions); @@ -103,16 +101,17 @@ module.exports.run = function (runOptions) { }); }); }).then(function (resolvedTarget) { - // Better just call self.build, but we're doing some processing of - // build results (according to platformApi spec) so they are in different - // format than emulator.install expects. - // TODO: Update emulator/device.install to handle this change - return build.run.call(self, runOptions, resolvedTarget).then(function (buildResults) { + return new Promise((resolve) => { + const builder = require('./builders/builders').getBuilder(); + const buildOptions = require('./build').parseBuildOptions(runOptions, null, self.root); + resolve(builder.fetchBuildResults(buildOptions.buildType, buildOptions.arch)); + }).then(function (buildResults) { if (resolvedTarget && resolvedTarget.isEmulator) { return emulator.wait_for_boot(resolvedTarget.target).then(function () { return emulator.install(resolvedTarget, buildResults); }); } + return device.install(resolvedTarget, buildResults); }); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/lib/start-emulator b/node_modules/cordova-android/bin/templates/cordova/lib/start-emulator index f96bdc3..20c92b7 100755 --- a/node_modules/cordova-android/bin/templates/cordova/lib/start-emulator +++ b/node_modules/cordova-android/bin/templates/cordova/lib/start-emulator @@ -19,21 +19,20 @@ under the License. */ -var emulator = require('./emulator'), - args = process.argv; +var emulator = require('./emulator'); +var args = process.argv; var install_target; -if(args.length > 2) { - if (args[2].substring(0, 9) == '--target=') { +if (args.length > 2) { + if (args[2].substring(0, 9) === '--target=') { install_target = args[2].substring(9, args[2].length); - } else { + } else { console.error('ERROR : argument \'' + args[2] + '\' not recognized.'); process.exit(2); - } + } } -emulator.start(install_target).done(null, function(err) { +emulator.start(install_target).catch(function (err) { console.error('ERROR: ' + err); process.exit(2); }); - diff --git a/node_modules/cordova-android/bin/templates/cordova/log b/node_modules/cordova-android/bin/templates/cordova/log index 47f0605..6829f28 100755 --- a/node_modules/cordova-android/bin/templates/cordova/log +++ b/node_modules/cordova-android/bin/templates/cordova/log @@ -19,17 +19,17 @@ under the License. */ -var log = require('./lib/log'), - reqs = require('./lib/check_reqs'), - args = process.argv; +var log = require('./lib/log'); +var reqs = require('./lib/check_reqs'); +var args = process.argv; // Usage support for when args are given -if(args.length > 2) { +if (args.length > 2) { log.help(); } else { - reqs.run().done(function() { + reqs.run().done(function () { return log.run(); - }, function(err) { + }, function (err) { console.error('ERROR: ' + err); process.exit(2); }); diff --git a/node_modules/cordova-android/bin/templates/cordova/run b/node_modules/cordova-android/bin/templates/cordova/run index 9544c1d..a3d6f53 100755 --- a/node_modules/cordova-android/bin/templates/cordova/run +++ b/node_modules/cordova-android/bin/templates/cordova/run @@ -24,22 +24,23 @@ var nopt = require('nopt'); var path = require('path'); // Support basic help commands -if(['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) +if (['--help', '/?', '-h', 'help', '-help', '/help'].indexOf(process.argv[2]) >= 0) { require('./lib/run').help(); +} // Do some basic argument parsing var runOpts = nopt({ - 'verbose' : Boolean, - 'silent' : Boolean, - 'debug' : Boolean, - 'release' : Boolean, + 'verbose': Boolean, + 'silent': Boolean, + 'debug': Boolean, + 'release': Boolean, 'nobuild': Boolean, - 'buildConfig' : path, - 'archs' : String, - 'device' : Boolean, + 'buildConfig': path, + 'archs': String, + 'device': Boolean, 'emulator': Boolean, - 'target' : String -}, { 'd' : '--verbose' }); + 'target': String +}, { 'd': '--verbose' }); // Make runOptions compatible with PlatformApi run method spec runOpts.argv = runOpts.argv.remain; @@ -47,7 +48,7 @@ runOpts.argv = runOpts.argv.remain; require('./loggingHelper').adjustLoggerLevel(runOpts); new Api().run(runOpts) -.catch(function(err) { - console.error(err, err.stack); - process.exit(2); -}); + .catch(function (err) { + console.error(err, err.stack); + process.exit(2); + }); diff --git a/node_modules/cordova-android/bin/templates/cordova/version b/node_modules/cordova-android/bin/templates/cordova/version index 42d31ce..299fce6 100755 --- a/node_modules/cordova-android/bin/templates/cordova/version +++ b/node_modules/cordova-android/bin/templates/cordova/version @@ -20,7 +20,7 @@ */ // Coho updates this line: -var VERSION = "7.1.4"; +var VERSION = "8.0.0"; module.exports.version = VERSION; diff --git a/node_modules/cordova-android/bin/templates/project/AndroidManifest.xml b/node_modules/cordova-android/bin/templates/project/AndroidManifest.xml index e0c53aa..9c36963 100644 --- a/node_modules/cordova-android/bin/templates/project/AndroidManifest.xml +++ b/node_modules/cordova-android/bin/templates/project/AndroidManifest.xml @@ -30,7 +30,7 @@ - - if (strategy === 'r') { - continue; - } - var symbolPath = symbolList[i + 2]; - var lastDot = symbolPath.lastIndexOf('.'); - var namespace = symbolPath.substr(0, lastDot); - var lastName = symbolPath.substr(lastDot + 1); - - var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; - var parentObj = prepareNamespace(namespace, context); - var target = parentObj[lastName]; - - if (strategy === 'm' && target) { - builder.recursiveMerge(target, module); - } else if ((strategy === 'd' && !target) || (strategy !== 'd')) { - if (!(symbolPath in origSymbols)) { - origSymbols[symbolPath] = target; - } - builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); - } - } -}; - -exports.getOriginalSymbol = function (context, symbolPath) { - var origSymbols = context.CDV_origSymbols; - if (origSymbols && (symbolPath in origSymbols)) { - return origSymbols[symbolPath]; - } - var parts = symbolPath.split('.'); - var obj = context; - for (var i = 0; i < parts.length; ++i) { - obj = obj && obj[parts[i]]; - } - return obj; -}; - -exports.reset(); - -}); - -// file: /Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/platform.js +// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { // The last resume event that was received that had the result of a plugin call. @@ -1750,7 +1516,7 @@ function onMessageFromNative(msg) { }); -// file: /Users/brodybits/Documents/cordova/cordova-android/cordova-js-src/plugin/android/app.js +// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/plugin/android/app.js define("cordova/plugin/android/app", function(require, exports, module) { var exec = require('cordova/exec'); @@ -1953,53 +1719,6 @@ exports.load = function (callback) { }); -// file: src/common/pluginloader_b.js -define("cordova/pluginloader_b", function(require, exports, module) { - -var modulemapper = require('cordova/modulemapper'); - -// Handler for the cordova_plugins.js content. -// See plugman's plugin_loader.js for the details of this object. -function handlePluginsObject (moduleList) { - // if moduleList is not defined or empty, we've nothing to do - if (!moduleList || !moduleList.length) { - return; - } - - // Loop through all the modules and then through their clobbers and merges. - for (var i = 0, module; module = moduleList[i]; i++) { // eslint-disable-line no-cond-assign - if (module.clobbers && module.clobbers.length) { - for (var j = 0; j < module.clobbers.length; j++) { - modulemapper.clobbers(module.id, module.clobbers[j]); - } - } - - if (module.merges && module.merges.length) { - for (var k = 0; k < module.merges.length; k++) { - modulemapper.merges(module.id, module.merges[k]); - } - } - - // Finally, if runs is truthy we want to simply require() the module. - if (module.runs) { - modulemapper.runs(module.id); - } - } -} - -// Loads all plugins' js-modules. Plugin loading is syncronous in browserified bundle -// but the method accepts callback to be compatible with non-browserify flow. -// onDeviceReady is blocked on onPluginsReady. onPluginsReady is fired when there are -// no plugins to load, or they are all done. -exports.load = function (callback) { - var moduleList = require('cordova/plugin_list'); - handlePluginsObject(moduleList); - - callback(); -}; - -}); - // file: src/common/urlutil.js define("cordova/urlutil", function(require, exports, module) { @@ -2186,4 +1905,4 @@ window.cordova = require('cordova'); require('cordova/init'); -})(); +})(); \ No newline at end of file diff --git a/node_modules/cordova-android/bin/templates/project/build.gradle b/node_modules/cordova-android/bin/templates/project/build.gradle index 569004f..bea8a74 100644 --- a/node_modules/cordova-android/bin/templates/project/build.gradle +++ b/node_modules/cordova-android/bin/templates/project/build.gradle @@ -20,32 +20,30 @@ buildscript { repositories { - maven { - url "https://maven.google.com" - } + google() jcenter() } - dependencies { + dependencies { // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files - classpath 'com.android.tools.build:gradle:3.0.1' + + classpath 'com.android.tools.build:gradle:3.3.0' } } allprojects { repositories { - maven { - url "https://maven.google.com" - } + google() jcenter() } + //This replaces project.properties w.r.t. build settings project.ext { - defaultBuildToolsVersion="27.0.1" //String + defaultBuildToolsVersion="28.0.3" //String defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4 - defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default - defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default + defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default + defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default } } diff --git a/node_modules/cordova-android/bin/templates/project/gitignore b/node_modules/cordova-android/bin/templates/project/gitignore index 6e52445..427a160 100644 --- a/node_modules/cordova-android/bin/templates/project/gitignore +++ b/node_modules/cordova-android/bin/templates/project/gitignore @@ -10,5 +10,12 @@ ant-gen # Eclipse builds gen out -# Gradle builds +# Gradle build artifacts +.gradle +.gradletasknamecache /build +/CordovaLib/build +/app/build +gradle-app.setting +# Android Studio +.idea diff --git a/node_modules/cordova-android/bin/templates/project/legacy/build.gradle b/node_modules/cordova-android/bin/templates/project/legacy/build.gradle index ef22971..2b48a75 100644 --- a/node_modules/cordova-android/bin/templates/project/legacy/build.gradle +++ b/node_modules/cordova-android/bin/templates/project/legacy/build.gradle @@ -245,7 +245,7 @@ android { } dependencies { - compile fileTree(dir: 'libs', include: '*.jar') + implementation fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START // SUB-PROJECT DEPENDENCIES END } diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-hdpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-hdpi/icon.png deleted file mode 100644 index 53842612476cfe0d35e54ca3db1238f50df14293..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3345 zcmb7{cT^L57RLiYj1drlrvy+yL}vGj~4sd+)E!{LYj}Lj!F_I0qa8fiUXoXc~iO zo!^rp5ea(#XM*RNlPhlf-ubz@^=_20I%v_#$6+1}pX+}s2U z*4EZmS5}snmlqco7eJez|MBC;+}zyv@84%x0%l7y8kB*LJXJ?O( zk3j}2!4OP=W#B;5)6>VtM_@N#2#3RadV2c$`o8q`c6N4F)YOy7WYYWh@7}$utE(#_ zmUne^5i4r$KS4Qq1Uy0c+PZi@a`ZH|w2Mq2oZ%J|SJo3&&=!)@6qHftm)77BRq_wR zcm{_1ghaXdhq?NMI6n`zuyp~Bk5%;UDC(HXYZ+hHG?Y;{kW@v+B&AMGO|i1Fg3|~J zk2SM)#J)-!8X8j5zxyI8A-AYh)6n7%ekpLC5pj53(+47ox@b(&ODqm~*G5*`48|^y znq7!X%OzywCZ=X3;4`MCCew0@xr7xc6iR=8e|vlTz(D`!&!55d%E{jx85tQL9|Knh zUfalMESt5*#Kc#yEI98?K;MLP07eu5uI1JU%WHvae+vM9L1?w=CJF!;4bC8t4~0b) zT3cJ2o11O1sTsRR;j6pPz5PFZ`ec<^mbiaxvANIsJPOR-O3Zd&-^)4zm|qgWY<+z_ zI9%Z|(Ae16(9mFNVtG|cRq(15gNfaT4#_nlINC-VWy@iDZAteP= z?wMPLhlhisWn^TitE+>GqoZSXb~XsKw6r-nImUPHfeZo;hXdjNve-0{Ca}S=hp~YP zM1Gpm+uOUA4DN(~n6Wbe%$(xfNhkw4XHi%%Qv%TZBmcj#o$lM;1=s$jzW}_!*=%6o z)DAkW|ELOoCHH>Am%kza2=4hW@BD58T0H<{0A|0b zYThvQrWxqdpbb`osP#IHKi^e-@V55I$`=!?N~bO^8P;u0a-CtNOT2uuU%E+LxD&-C z<`J22`C3$V@mO4OkSjxfrEtR7J-#8w%F^x8?vh#Gq5B+#iQgO4UySbDpnbrl%+Ms3 zz@e;Yz}4M1uD~B_NOhwC^A6LsNtNuLy2ti>9!<(QhfU!EA$ zcrQN%f9#XAvQLHG$uaE};r5(P(>fPMqoi#13~IaVQqAhcgRph2g|FeRU%qvINz}wE zc3@%xs3Ut#itEfpUpz?rsk}xKAv!xdi-@eQR+(+usE~;{Rp6#271Tb9NB^uoyv?U+ z^jg#CNV48iLR?PgOn2@#v}+?G$vAIF+&t}m9ohH>$AJy$LKHAc@b7!LICa}!L_pNj)btqouTcoqu z9S+-Jr);U(SAV_#F{3S`%0=@2JcI}4k^#)bWxvV%LjmVBI>4rdb@o7P+?@nLngP1wl zlX{H`zq|Q-mA@iz|LTn5pmToSvXCrW_u&b*OGzgDnJiNdK1Z-qVMtDzOUb6EHxl{$L$2X~P^ZYVLwu%!cJhw+sIDP9!fezQKqgrMn;niBfb~t}) zC0LT2+h)Wf8%G@>#!WU=A>hYK{T2t>)J@`IF|6JdWk1+2rZ{uY?-RY6|4Wl(QIkJK ztz?=EXZmIODP`{VMb}PtS8?DT-&vFgU%+jab*{u2>Cc>}_|Emj=VRzuzc1}14q$G< z#a+w)fQokQL1l|LYvm%0FcHyc1ShMCbelmWK8S+3l*fgARNY4NPDur3f^oDB9xCkN z#%Er625lA}8(CMfZ554~sCTc;658z`nMht!ee&Y&9}s=)c%7APRr_lsJnI1FfUwHi z<*B~$qdSy5_=P@_4uM}qoK3Z)36ICv@Qu-PcHKUxa*CSclqkgs=3cDEU{I9MaDn11 z2lR_!DRNT}QPcNO#dCInZ|ruz2kyDV%B;Zc4Q#s7(9@a<+aewO$+VvIKQ$c78Fu0J z&wIVuft(!K!pQStiK9-}Q}mxoL&yrZ^p)l^c}K4b85UG+nb-6yE+T&k{e}V;fYPEYGi@#2c-b_ zLoy#5_CO-6J-WJ>ahnZ~$RzK@^W>HmiA^q_|+r`r?J=@#PvsVI!;T6#?&aG)UXJ|Yai zF|l>L#Ph2>o2cxDz{QzGYc&!hHssJ5nGlWk*C_{@6wT{)6O}Dab1|I<;{x6hgirqd z$7<_rJ9eJaOIe0;n{G;+LP8u^Cl^GrDLvOS;WhV6HP2JW-k0RGMbZyE=24RTlMlX) zGKUf+bOccW^GhKF#@4Ce2Wq<4kn1hbO?j0fKe0C|W|~x+vq@*QIO{Iw_npMt;(*5M zHXoUzVAkrJex~IuVl*9+cH9@_^gEs=;_;TMmB^UR^jma?Pf>IyST-MU{3`Gg!#KoO z97^uIWUo>vg0a3@W%U&ctAfOd2m9lVv}}0R5YfV^B8ytXvGgu?Dv@8eaq_0|;RvHQ zb6*2&U5$5R?%;@no;Ejo8>?ilFe24h)`{UO!HIxC@bHlL)>v3AhK|Kdz3Di2mSVl@N zYZRED>R~HA@Z)XX-K{;uk@mG{Cp4_>s0a6!cG@_Y#CjJB#a(su-pIP!opV^n5>JLO jULDVwxEMiC+&vSW_By-L`Sz3FpM$zL4K&NtABOx3iWtIV diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-ldpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-ldpi/icon.png deleted file mode 100644 index c5fcaeb648c732c2ca619d032eeb033c0df2ada2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1821 zcmV+&2jcjNP)>-t%$s!mMPtiK$@7#m;=kT49v_kHkO7hL4nHedu8h5?$Uaf+gV zBuShoiku(_w54;Smx5@bEX!bHFY2zaP24`bukmyc{VD|KqR_KZv!{Y+lBz0!P!wYf zju*PNY_=R=Bzva!#lQsj=ty{O|{lh?#t^r|C=<<~-x_If5P;p7As0$o3r&zCD zyQZY%6s2cmC@n2r2?>e7;2pCrwe);AXn!VJIOO`%U%HIV9c}1!5-LPGgW-rlbDVT zx&J0}jnwWSFT(s_W*J%JjP8{aQp%u*mdx@w(mK}3LLBU z>_24R?L6W>9XfW3G^$FK2CCPvErpE?NRct|x_RxYa&vQ#va+(2nVEUs1IPgwVYx+E zN#_s%7jVdA&X{AQlXEzSLx6nTq%%^rx-Egxd*9Y2jVdlKQh8aa!60R1WE`&usD**p z%FsI<5JcS&42Z{pOD}8ji6G6Ly_i&4=aD+~>o=U>>URFNn(R5H&p!H&d8F4qt*VZF zhU>zG^D4;C2gHV_Qd3h`cmOef0C9_4GyLc#0s}B%{Vrum+MHRaK_ez`&0XNCTdS#_ zY12Z!T7&V1y4~&5*IVnj=NlC*zfS3o&1y@S~M9wMF$8A1#szz?! zr<;;?XBVsUfKhZ8fw%_;a73^68Eepb?u%LgF|mQCehdUDF)ohvc+L5BhUV@?SUHYi`*qJ&eX-Zfk>0#y|;HVXS`E^ab{Cz{skkl(AL2tbJ5kP>^ z0Mrm5ij9p$iiwFi?{!l1w*U}Ct|@G~0vKMV1ZJgJ8&8}^H`%=5-9>7UzWJ`U-Wf4d zA9fkUcYr8r#sd2RqUh*oMMXs^GBPsCD-bU`_g@Ua_(cE_(55dlhIS@JoOi?E5+ZfD z#dqHRKm`T{Dl;SPF-SxN;@l3eK>R5K1PBxLL^sjO1ZJiX#0|j88~wBD6$^KG7H6m# zK*GYp6cQ4Grh5gVxENZ97a?*Wd6QEEOj-gE92tbIe-(&y(^a?wNKjA^!l7VjoCr+A}@`zUr*Ko!SV*1uAkn{OrX=!O9Ajrl$ zP_!#4GzSeBx!+6F2y)LFj!Bh4pn!k?ojG&nk=H+Hz&QF*et!N2cL1BJY;3E|5rSCz zTG!x0czC$g2&)Ik>C>l?PM$oONlaq9feeNVKXbeMNuqeqVh5Yr81Fz6?aenpYldj|0xfN3*k$+^C< zUAuO{e+|T4Bg>X8E#sLsoq9f?j<{|xXy3kl>xfBgO$7BOoZ*>QUVZKGk|j$D{QUfq(e~}zgHXSI{l0fQ1dAK!X9nb~UpcDp zsFS0ijwU;r>uB*4E&n@Z_wy`!uvZuMCI+#HN$iS%p!}ty7oObsiKA~F)o@hz$tI2d zN%3r5_F_-=CI+#HX+`~X+am*mm>bFOv;SuOioJ>9t{pef|CRm>@X8mfi&qH)00000 LNkvXXu0mjfLN8_f diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-mdpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-mdpi/icon.png deleted file mode 100644 index a18167be1a88d3e724a28d4fe6299fc7ed48c71d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2368 zcmaJ?c{tQtA0NvQy=bINa&J+Vn1~vNER7j!h_T;fiKHk?m>ELDSYk$8+f>%E@4^UW zj~RusB$JFRV{Z`QM&|zB_kEuG$NR^7p68tNJ?DHspY#2GzR!8iV=GHz5n(A|5C|k< zYJ$c9^M!x+LwvyK_C<&W0`Y;Y%xw*g{mp@$|I-8n1pYbY<>meM?b|=g{~F)Ff8XBT z2JGbIWHOoD-QB&pxj8>Szqq)_;c))Pxvi~jVq&7Mu5MvrVQy}YPN(nh@7LDW0(MnZ z6@`)s_{YY^!Zo#IWY2QBT!8%G;Gm(QVQFcpy1E)bB_$>G_V)hz^$Wlb3=CkgSb#Gx zFR!Jg1-LXPCkHrMSy=&i*48*BB_)92>FH@@g()s6wsUY~u~-1r)YKF}%Vx9t`udnm zCg4V;QcFuqfgJ{ek&==^B9XGPvI2r}06Zcp7KaU?P$-R!jV>PENF-80K|w@B1P+Jq z?CbzR0)zk%xE%;j8DUsoU;lk$qq4G69*zPc0Z>4`fJCoey#myG`?e1VnEsy>-oJm} z)ZEEaD z368YXGqWEV8KKc=K$)21<5BU+L19FERKjH=jHEpL)2A`k;rR zl!{JJM4Tb!21G{9*~>p5H2OY{;C?4iNnQWlyLU+$*}fr>s=8)3eS--JsWmU^%d2Wr zpXG-{#@o1fo7lONQlA9|g+Wf9Q;=1yu5T_auWD#)rsNjAXlP8&Dkv|6RW$jSOLu`lV4^7+X=_3+O2gWw-j;|Xo1g>= zE5{NJ`>#3CUn~dMKA9aKZ}3Y zM*D4YbHQKdm?zvk-4ob2_gDB!5@0zEA-r%{XD7 zfV%7I)mA<6PaLO01W*fI{FCCQnHJ*8X!saQuAkn~L8*>vj56ps@vmz!c1q`I5k=h; z2Ib+xp+j?p6|WoXjbuBTgw#-YJB_v>&)V`B>Cp;FV^I(FPI}WM+xYHt=j?1t#ZgwZ zh7?;MB3m@kuvJQn)SAO<5qcJJ;2U2ckj9vrcd??`|;?CYiGkPN)6mE z$}qlZ!$j|mtzWRe$>P1KIWzIu83#6fX+Yqwki8cF-oG5ne?rkQYqu2qY`IzwlXR-z z$!c6g&OETWm9P6HaY@adE`lWLBwFr3AiL5~=!Ye8U}?v~gb(q@)2GMeR|f?Y?! zG#dO9cmJ=u4|vS;^D5Zend1t4KdZJ;}Bt+6|2%$H4no&z1826Z(%YT*kcxDX~B#Lm80uv zzbay5(q*ktsOWg6ix45c}F zJs4kqW)Y$G!$>*PRS0)~Mr!KtCCT-2B_>mw55{|#nv%iUEFK)C@a?*9o9C{h?d-zC zi!14apB)k={$Ir;gYit`y7&^ zZZn$K<71cSXZA31Sgde?!Zh`&$EQD0xK?(0`$id>U#cABcUD?gO%p;-Oz=wWbIH-G zAjYlLn0@?XshgnR&&s{})zHvKk%*MHSu7O6g|nJjJ0Wo4;oB-m1lno>%Gt>sQ6? zPcBY%Hf)0BT#cX#xOt0A$5hOx2cg<$KYHz}pa zh7Fk!1+>vUvBS^RW(k)so`Ly>+0GG{&VaRrNRMSkP^f|e1(I1%khkL3**nNWNc3qi zc-Z^kV3tm5*C!u`qN!B1w5!{JZ<(W)0Qg);2Qv$8d{>O I4cwys27c0^*Z=?k diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-xhdpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-xhdpi/icon.png deleted file mode 100644 index 9e3eec364b5bcfd360da42c262f410a1a75e3efb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4085 zcmb7HcTiK?w@yL{O#+IFpmZr$frvopO^PTYy@U>es2~Ukp$C)%LYEFokrqG&>7W$p zNHz3ME;ULgAU(h1z3sGv`F;>1v&0;9vlOKggD1Xu0d0ot^FP?{95wO-@d(tgIX#9|I|wOy1eq+1}pX+}vDW zUtjz6$A13&xw^W#xVU(FdI~6)mzM#&wzft?Lj&lK4i5pczrP=-0|*Wd4uBLW4)~>| zB~DIG052>oY;0^CA0Gh>Q2gZN?pzwJ{mOiVH$udJ-}Mu&R^VLSrD9Nm2-R36A_8OmtrOWo0vRMmwm z-4j)~cT-MF1aYUcvlF;<#GAArY>fY_NK^=JW@biJ7pZ*TR9@Toj6$iZszOJ^2ZTif z{l_G|{rdH5b93{ns01RBI5#)f($b=#Zz-*5^vKoQ(#c)h$c98B0S)L`I1&hihQ>x* zLdM|WprN(1j;Xz=y-QnLTYY_fU0vPS*x10pKzDcd#Kc5zZ!dsv$Y}KR^ax9-0whpG z(#S#7&O=n&RN%JC?95DGU!VVn8rSX-QBXZ+FcySlnQfBw8op=6v;u0QsjpipWk6qSOS>gwu_jtB&MOE0eG5#xU{rX=S9$$FJBPE4Ioub$W^y~2HcRVe@WNW)RdQ( z1A?-$vZ<-5(a})=03!r2B_$UuaZmGvhs@O@x*365jaBezP^d=V>eXrD;IUa*Qvsu zAP^&7TV2%%1)d%CH4}Z5{OE{Z0m;dF?HI5PAX9e*t?oLVsducsiOWdRp^1Oz>ma*NS$g(IEgFM}xrQLul zXPpJY-^7~*aG5kP4b1F6J$r$$Sobb6tOjk9vVO-jpKPU~S@|bc%bmqPqOLTac*_5Z z%~&T%v&6TB_qcK?<$C!v*->?yNp##gShkqmHAW!&zQrNX_t^P_*RinZCb1~Z-0fO; z8bq%K9i86%J~E>57M>p+;{TRerO4$pb`dvH!x8=b>Ex(19VqVnn`oVkZ;$;}dhBge zn6r1OSI0qV&trskYxbG4?I4`dftMKPQV>y)Es)vu*I+vAH3&6lc!o+rtAa|)KnCM- z6TKdonS6)3dClB5Bhi+sJDUFzV{Gy@Fk80S;vp~idy+=;XDR{kcvoT?)U5Uvg`t)N zIwA6c@UPA1+n%I>ilX^1*ITT>TBm&2w$SnlH~DzJGC8x@IymsBeVopj#ZIIU7hKSp z^fIFNCEfi3COkqxpC6_8qHhmki9^8*C^ZP1Z$qGOq9c9uShenN-K#wGy9q^>uXAQ= z2ZnWze&dkPw*wEwNY(>rlodBKb_-0$7ssn@q+4K!zY;DJAkdoDa|K4fnx!4g{rBGd z^e^*jF?La?xK=qFCk`8vM{;WAlAU_X2CH4EKRzPpPFA~e2G7o#9u;>qE&tdwnfblc zAoPx<#tj>$(b?nuWrkVaI;8abC#TfDWdl9^T-d=R%a(5pJ%x2rGC^!27L9*V&cJ`B*yIq%5nwM@5EgYY|#N4WPvZTrqc_5B4)$|s6 zRk;1ZZvuvjDXD2|`Ls%OgX{b#jK-kXrj~G5p6@d{6*z4OGa1|)zM~Ut=;_IL@>K^e zn3qfy=;~TRgzPT-&V#17on01rrS^Sla;j|oR;s)lZKqchr-h}~W7FH@P#$RB%NyRS zs<7Sj8W_YuG2%i-)y{C>Db;Bpy!F~S#FRzWoVL4MIxQ4~xfXh_tOi-geZ|*~>7c!q zF1H*0>d~MyTzWS7d~W?j;A$qcLiUHOtkeu2p4zDw#|3=TOr-1&HAx-T%d zH=HauUpTpvc}H}v%6+0-z^v|T%wbsfCyfztxvv+`F;_F<^Ql{hBoq>5stLUnSm<6|QP8{DFGmaap^du1B!cNhopXcTmd88M z-Dk4+G)|~QGvn4xTRTU!b9D9hq!hc%a~U%wH1nDQ4yS(NS6uv^!ft?j`xa@ksT0I` z<}qTnGxnn-PY>tt;addqyn*m8^REo!MqU~hya()V^VTma^)fC8W}!gMj^!S(MIMwj z9yb28{Cg4_i<@5ZsLLl7;ug`B41`zfDQ?lh2}*o?f4>p2ah+~~m`E##XWwzM@|G05Sm`U_rjwwoB zH=-|dUGwJRYHzxyQ6eT*mD7BvNkl=S;n-_Vl8&30|Ceo8>Hl>4+E3+B~noh^VhOVV!OLEQ%$L zC$!@3pf2uwF1cW1@c=am=S9y=T^TsMT3Vv~rM@0{7-x|oHxHE~#!_G~-;i39MuCsE z6@m&(Py$Y?UfddSl;?Ek@{ZJQyKmm^&@l`FKW zy)}h7IMwT|Dr_LrU-~WYW0ZO_VpCATNwVc!SBg$8I>T>3tLb-!tI$fn~=!c zMehlv*QoEQob-OQN<2O%3)foid>Z#g(#5NSl@-NfGJ6@~6JT8BW>En+s}SnvPfsq) z#fn>rjq~$m^u3kYz?vH6re4%Vib>K#^2-?^hH6v~g#Rx1>+rsdvJzG3BWa6k_4ARY zBS@)?i~JsmjAXt1HO&@F5P}Xt{hJPUXmB^&r3!iC(N4*#w*Kg(p|7+*W1p6)uF66q z`JN{RFR_Q&idzViq$`NTHojC+3>rI<$t-p+BA7w{XnMcT9JUS zXmR4~E@A}*7KbalUH#jQ*`JN)GbYHG*D z$oSJO2wU7EjS;WbN|(;PauMn90%uEVq2sN>^2T4($&Rb(#a)C)mc-l94<%WJO{7EO zXdq*ICoX@561XRJ%eUE3bif&CN(so$?#O6Yg+OAfF%2U+QYvnXL;nMTM>qfg diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-xxhdpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-xxhdpi/icon.png deleted file mode 100644 index a569289659e332826e030396820e94ffcd1b1dd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6421 zcmV+w8S3VVP)gxOZ z`|0WF=;-L@=jZ0;=H=z(W+}hgO($dn?)6>z>($LV* z&(F`!&d#{JzkP;|f{T)XiIIPYk9>rTdV-61fr)m1h;)92aeISkb9|Sap+HSpQd?t9 zRbNU~VMbJ7MN(ZvP+K)aP*Y!NjFg;ne1&g$f^B$#Yj%HTaeJ+;tr;*uK1)|LL{l)08Vr;ImwbHb@m7@Ts zx{&t#CpAN^uC8LAt^fZ1f9CI@`2T|X|06Lz3ne(dzP`f3!Xz_5NtmdAgowPnyikIX zy1Keh(A*y^I8SbVK)uX4#L~F9xV^o-xw*MSU~fNwl0aN(7S!Rkwzk{b+q1K?v9YnR zu&}hWw1$R;000HAudl1CtEi}`tgNh#j*g6sjGUaDqN1Xjnwp!No1dSbl9G~%iHU@S zg_M+(r>CcokdT*`mx6+Vetv#{fPs8`e0h0!c6N58q@;6mb8&HTZ*OmHZEb35YG-F> zVPRohTwG*iWK>jCQBhG(Pfza|I}ZQ=72-)mK~#7F?3M+VEjtKBq1@fuZT?gIROrg* z$#v@aZp+ep)`px803a9;5Mlcwt~1z z!-$CEBuUaV&9W?K3PZV4ZPY0s?DHOKI0(n!5a!eALy5NSx~}i~ff&bevWyX zt)fJqj#$xXzJ{@P5%dksYaW>>m5F$f#L%RpsdV&TjEn2K(vh9oAxFa?97TA3!JbJo z+dzjln-@I62!9*cXxLWH-;_5aN-c0;PB#}AlL2hep5TlhW$DR zDhd4hIn~`Y-I<=5otvLoSX^9MUS3gr80@bRYDb&9zGZc7ePeS|sZy)g*48xI@mBN^ zoBrN5S=ml$nV|lPL4I)oC_06HYkPZVyPE*9?uJjhdj_M)Y_V8vcDsH5V3hzBCS*NV zwtYyjNLD#LKTG`qlVazvrM(&hS4%6`Plqo_03J} z=2mY~8w_wr1E8=)Io2ZCk9wQR=MZ-ni6-ygfpq%qhn>gA)YH@ROHiwQb-ryXl}a^j zB3P90dBgrR0|F9M$(11(@d1M}0p<{$eBBcHLIONId;nYONvk|I6arb^&YI9gqDMH> z%5h2y1|m^QiUz@>o=!Pej$q{O(#Z@15|c;@1c%;^*I3PbX0OqB zib0d?kUh;6r8hMUit_&q1c#orP89{x0LW-G8SSc1P2dqd!kJd0L*O4sXBf~tfY3yL zb_hVI83Q6j4u86t?vN}YyW85iQXPUpu1qo+hyrMa0KuZaa_Ck0KKF2lSfo5_Vnw3~ zi8HOFV8n=}c~>R_p!b@sDDprUdtu4|M7tUmQ6Qh=AlKR|y&yX)i*$&SiW-E9NqR`9 z*XyW3Z0MhYPNxLOM1ah;@TVr}o{canA{g0&twAkhr}Z>9Z@+}HBh-< zUbM$T%|N7a5F)eBm|bnbP0N_j+6_enV+GgW*xXd8=EkuvOkYKLi1OdL+-IV6IvwHp zEyM8|^~mAC2bui6t-HHHNL+nK24uwqqpY<{s*Z18JPd;g7&&|~9Pqd@_f7|9Ovpta zdGak5i_bqB`Zh*{b$eWRjxT#FxFW{B0?$vO+J?S=_T&V876k-+LXk+sg^~sW`qNYP za99&Q@K}A>TYxC;^N}+YOIngDj4P1JK+!e>G+v+QSp=oB?1Ta1uO{g|8r^<+-*Ep96i#X!igzl zrZ5;~K^TSR(=d}sl3C?etTnR~GgHXan7K8C@%!|>ofU+$zCrUnzj*_1v^&F2ofV!o zn=NLsUN4o)K}IUqQ}Ie|Fz67UG(dUHomCBS+&6t5QN~SBK%i0}lfM)c7W@T8h|5km zXyd}PFGnmqV=gK#DJ|2R;d;qtQ%V>fwI6yZG zDk>`qV)r17%YJ$<5nMcb#!^*XU1Ju@cK|^bdWSuBj3>Ex=R#|BTYE<*3R$~|P`5UX3>Mk| zaT)75TvpSb%zFYYee$- z6hb78x@&1nI!YQ_>K|-(``_GL;sHFpb^EbJB!jfC;9)Pf{o$j7M=%(4!HqRLTcf`t z5t|=B>1nB~xgdpz`hc#!Oa1>yM<1ed>((tp5Vnh~5^{I*w12=;_wN3dkV7@;hOOm1FY-jzftEIuGq&jlfi9)$ptB0Jqh2N+Xr z1tE3`an^b{(g7V1iaUIiE?zu}9c6@$J6sT+-UO*&LUy69alq6V7D7sg*o=*-#x`+S zx6-RH93~w=y*YJ%__1&R>ot>KB?$+7 z3_N56Xg?^WFSUjl~cpRR2i9N zW$^!D6zWqn1>5ZDfR9QwrNrKqT`SGm=DCHoK_9hR?XC9D%)>tCTrP}J?(~D+!S)B! zB8`TY(P%V0UP70g2*EnkQr#*ZAEp@}9*Ib`A;bol3Ej?N*C^t#+G7i_mC*rw{vG%4%clf`l#(X zKHd@e&Wf4;Z+%bw|K@poehj+s`2v0-ZW9y;h>PlaYa5EJOhSDl!Ug3R!03!FE-v}7 zZKY9lz1k%mz+0D(GNfXzRNZfXQnkz%#0&WRcq9@kh$JMl6hDP^QN|?H_g6t&oIM=W znVMSgSjlC>T6;Lm&Arc6REYu`7^LK99Zx%+J%@HD5_%rET{x9Q@9ii=m36*&QB;Qi zMWb;=)GeFJsWSuM*2?yA9nLDJjyHBwJ}MDU17N}MW0oggR4xDgR007S4M|rQY^4-6 zPEj&*QBj#}9REK)JU6a57dPh6L7yenD%J_%_NsQK1NiwU^Z3zd0|g_9k9ofQ{O{0z zVZ(!5>>GDL$-25^7!WcytT=2VrGx1pFO|P?*gmd<^L~p%2YKZia_$sg5Q8>2Mt}c1 zcBR-4(&)!2SGp)WbHj~IHhVf4&(hNCpzR#CcZ@jiy?mVU`1$$!1|Aba4GYjFfnzj zbBcc33>hr2Sy(VGyz$1GW`BdW!Pkee0UiHq{@Nxg0dx`*oi-9X*1m5+&5fjt5gqg~ z8jUYsdSXJXr#)w#s}9nAGAZE`8@(M;ph>li! z?QJ=!V!MsWfwk*fSgn7JdO5lT5Sx^glsASyR+iB3KCjS+(b4|nnsJe92jB2$q!A2lm)xa>(_5yf4s(7$#abGm!}qez=+&61!f%N zM@2mfIuYCvN|A`#DNiLrNY}$b|rg2A< z2-EWz=y-??@b>k_?+JZ(-e3Da=jN4^%KAm|y5du@?sL_P5)YCAtoT z%9^<9Ou~*kBFXvJ#DJ3Z)zqiocpOG@z>)mOkqF%+gko<8nRAC}Pr!lto0Z)G%@NkWF$MHCw&b_@A z0{XB+L-?tAl}5#3VnqFm^%q|(BI4ZvP)OAMu)&BvdSV=c^wzHIfP`UyMN6^3LKLD` zRNY~ct|tNX-c8~C?pA@jo=jQ~y0UX@zn5h>9Ek=T+~pb`N8O-z`(pSZ7WXHTaUY{; zR|^U{#^|5z1N8n~s>aU_yRvigS0d?8q*95rgW4SGEtcYr&zZT;W^%cF>c*?!5Km|? zeXzcMPe_qu7#dz6BJB<- zOdGh*%jp{p^|_GoClbj*$?q0=$6(tW@IZGL`=FTb_B5`h2*glFsIlwwgIpkAp4;a;UPx=)u~ zJHjR9O7&*z`6=uM4Hso@gVGcX>{Xvy%|@*x2b>b0Y3J?C^u!3I2-4K{_%1SNWPD1e zGpWZxW$Ijo3NQ#jslT}7s4$(0%u3UEdTupq<@>-MfYeAkC2>^+wM<%9pb4zQRx4-S42=+kmBAZF%O64*EJwLs?yuSYL zyLyFQUS7ZhplZ34_sgkpB;>nt99ljZPgfW9sF`Y!hQY}9*!=RQ>1^xJ;kf}&G%ovd z#d5VyM9^b@Jwq)P>S`&UOWXrU60e0H53HYzYl~E~QMJ!BIkd1&K>GO=0Bs*TuJ)bj zHc+Wt15vXDruWnW4&#AANdgLb?ZS^_(b8N82pTvTiKyN5`uSDEEr2c+pwvC~Du}8; z0uw}kw#D9%n(PU0NR39FcyfL@lO-URjR9@45KWA=9U2-m7!{M$OfLfHw;ggQ7zt-H zG7$l(TCLUUwR#<7q&ht*!e{ZdTD4j(mx}oU42oxC6;?6^WCD<$fYulK0QFXkfF=lt z972Y?QY98mF``@{4<=B(s}fWMPR^fzK@S({kocGIBLS@dh_xAjph0b~Fm(eRIfQF* zFAa+rk>3xdLVlnMgK6wdL@~bN9Yi zN?(Md*?0!W{6r$*2iO4NyJY!3lgd8CBI!NR?s1&#S`lhiGW5MxhiGxMGsL>g_{q9^ z>~Q^c7m(7C7?3a#X%G%j<{sY_Pi3>w@I@sU68GJL?P&Wqvtezi9clm#ZhJ06X0U5fC(BFaiiq z)b?YO)0ot&%%Yv6A1~SR2!y0yx>AWmA{R`tzM?Njph`L&l$_o>JL5Ur`ps-arZE`# zF4I03r*yNh$as53M8efyH$Ktp#44Ad;2=p5F7*UNao_ItFrIDeCljj}R>y}2Bb`1l z8Rr&Zkr_mXC%B2p+hF8U zjokr@mez=9d-w1d7tGGpa}l2K-2aKbdgbxp@N(&}og5$TSbhT!R_mN@1{K4$?+euD zG9t5x5iNtrgnJ=w?HsVj0nnLWt8BI(PXKecyKS+anT>``BwCM1s}+N^orhG5re+w? zDsE7`{e)}IE!*34HKTSN?C$OW#(MV2Y%*@1t{^~+2L^SH`C3nm3(O*gXmMo?NTyq} za)rKj{f1}!$S2UiozvCjMHV0`*t+Huqq;n(^NC20M~N-3o^G-m&wvG)6@9`}?>oHk zy(avS0W@nX3`gJQ;VyM(a|jlxMAI;74iE78e=BE|5J3zCQ5bi_<^JcSx-#APW+M;Q z?L~ef73|8!h704}%bSA4z1ZyNK9jUpB@K2ILdZ~>M(9VqC@pZ>Epbd9F7s&by1$3a zzOJG(bm%|yaXlztC|w+h9f96B`~c7J54bA@pX)kSPJQaYM|G~<;7wj%Ek>%r z*2{GGBfL=>r~ufMT0JCaj*+mIfF;{0R{u@Ke_Zs6m7 diff --git a/node_modules/cordova-android/bin/templates/project/res/mipmap-xxxhdpi/icon.png b/node_modules/cordova-android/bin/templates/project/res/mipmap-xxxhdpi/icon.png deleted file mode 100644 index 3c322f2ea76baa18ada8a8bffceecec84fd35702..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7934 zcmV<>mYP`~Uy{{r&yt=jZzR`uOFMdn$jHph z%DtgQF<_vGZ{EICH=^Yh!=+t1I>xw*OW^78BJ>%YIh z_4W1a?Ck35>c+;#@bK{Cj>E&lI7LyBk&)u!;yp@Mo}ZtDgoI{hW`2Ht zmzS5)($dh-&_hpJaCw4vcXx4ngo=ua)YR19-`|Onnxv$qUteF=*4A=za)ytWlbfM2 zK1wb-Nr#7rKuuYQkeG~>oNac0Zf)vRY;1CTg@uikU|?WyaBz#0n`CZxnxUsBGe3iagqNPB zWpH_Wgp8G(qn@R!Vr+JTi;_uHUpPosr>CbXIYwY>bTUCtOjlxhgNt8jb5UGpkC&d5 zl$4H^oljb1TwGjvd3kevg;ZZ^Q(kCdVq%GjiAGXhc7KR;baY*3aV0Q2TV-#VnwnQ( zYmAJHb$*9gV{NIbs(^ril9`~Pp`m+wd!3z~qobpakB?(xV=G5hEmmgs{{O14vt?yv z?*9LRf`ckQOe|t^Eo^?n`~N1az%7E7ft#fM|Nol$|EBu?x%>ZR_Ws@d|Jc~rg7*C^ zc#Gxz|25$5f2+1hdx@Vp?I*?7Q}Ft)`~P$J z{y|t|Uv`30h?XXsuqW8)j`{vXVQoioeko2}ud=mrlbv?I%toiUOt;7>jiN*A_Wb_; z(9zMFouP2o<95#5NtdW~w!|6i_f6B{z{JM={{LXy>EYnum+wh7000}gNkl(}6VJa&s1mA#Dxpbpl~5&A2~|RsP$e|ODj^UZc7A@|V~;~SJ3Cib zS9e3lSd8(2T8t&?>3#QhqJQdDPdC%ibZ?|vQ@#reA?#vW>jslKle_p(n&!`GdrohD zTyQ*2pw~@r`E`Qc)igpj(hMUm-aV$Df{^cC?BD=`^J*p!cuE70a8F-^ae>4IIrAay zCm_@k|DP45^vVb)Xc~ag^&c3SSey_D`Uc*XB2}6Yv>kT7l%o436a^?u$g1J~b9v!+LDC8wzOc2iV_qg58F zicpA<7j*x&6&Y2A5Dvfv%PUGtD+)yjfzJcP3W^p>E4qRbguKWLSQJTHfDrh+U?oLq zX+;UR3DE$INm0*F$YX*{k@n1lz|#gcMG@Eu0k0y(Oo$ATqA&N419rYul%9Dv511&I zEsifWw6$^#HkwMY>vNH{Z&;18h(^-{LX;ar31W|Qi6r{G%@&F-!30Uxh{2NADIs(# z#ol}GdVBMoGv{lw`&sgK_x%}4`tLvIe`e;JZ{eQwQGjooqA=%gWFR?3Zr*`R)2C1G zBE`l=4U#Wdq!^9rN(ch^`}+?d1q1{v^H53AaOaXz_S;RHa&wQa+mf7= zw08CCqNL$+H-HN=G3#&n`H6{{IXO!gE?l3zSg$u4jhS8EEJfbR6uEjj|7y`ol#81# z6%6bJ{)5cG+O?}U=f%5`0gzmXfzK1I_)R9$-;m!bMIKX~93fhZ1OpL`#biLN02)a1 z8AAOacLO-+uPgvK00YL|fhuc}ho3Ve#HYwdmx2bs0U1cf2<0{U*sQ5wAkdPZn3>5N z*i!-gHYsxVa&m;^6h$ z!;QfvMFZoh33vmR>F)h(Qxv9gdW4YQGj{7LFd(m^l%b=;)%ZgqzD`V(n*cL}1~yg@ zKc6Cx;ZBYaSs&E63JnzS1~zX9jf`BfWXb#4vsXk##l^+3Z4NfLr$t41-)!5qvvl9SLx&F^J63DXS9CGU5E#G`fNWAU z_5To|kVfFQF_5%+^%nFYIA9h^_ZT5~zy#bf|W5T=qMS2w3dNGJd{v2_!yU8h!oQZgVk zfuaIb0+kenIW@N972unoO1%OH%w|hI*Tt*?pt7t`)hGQ~ z8fQfa3Xr8RAT)t!V9N&#RGWA6Cu+UGUzQmdrkWx@XGI7LkR?S(u@jI1+X&%aMh4^) zHHZ>aR#u25P)SigFXu!E3m_TTMFzg5Ca8iYu&n?ZzzUReCu%gXo*5{^E>KI+AdOQZ zX613a}OUMFU(DBuf!0k}9wd z4OH)^^PIH-P)-!`+omYgt_W$=_35$?i0p@^8aI^{x&~nNzqhJ6^fXk3#E6YZH zBN`~IoP{;uioj|x+@1)zL=05ZEdL!J)L&83pQNu*-=$SlR2En)>~;uEpo<**wFi{F zu_$b4Bs@oe-h*a?R-mG0+Y=$LP;XTQ0hNrW{31!%-+|K7(*6djsDz`(;T*Ap=`6HS zuP;NH3dhFBt<>q3FJHclY0jL4gamex=W17kra~ochj;7_r2&P$BhgRoo7aSymb$(;pH$G(2{Eaq%{W&-m$P z&RAvydeqp)Se$=;`tcrhxLvDIUw3acz2Ct>qX-z0LHLWN9nrDbL9k(1l+$kl@-h*B zY~k-ZoAe9-`TN+lk@=}c$UU+VfjMrO877>jJxgRyg#$-%@vefRh4P~e@~5Yp7(A*_ zW%kj*oKM`+A^%6@(@!-*Lnjlm#4WMYj0^LgLhJ|+Du^!!eBvj3z$Sdq!ayEhyn^rg z)OqgXatZTRlk0pWmca>KP77mSC9~skso>kSZ2H;hjrf%^2TJ(<5`X~TY>pj|NpQ^Al)Mnqv+-g}Pe*J0#zJ7`v^SOy52FVSwDT+! zqP`62DpLdzd@3lV^Zd*6ovC=RKy(E=-uxasdJNOQr={c3ukEcD%dGfI{gZpcAmd^_s8>{crHRAyvPn`qb9!0IgLF zL*p`(jOrquI4ojl$BvU3A~gCz7SV26`kQYkL}8|ypH zooYMN-pUMU6=NPB9>Na~Pte#IA|LdGOtkU{IExjp^YNBxXNtk{H6P9Q`^n+ zFLHsLJr_vu_*}DdF)sd)pu1rJruU+lTn-P_Ri_6-<7{9%G7?Ct`5jvnwq?w@?V z{gei|^WhD|@a4_nGu z1ty3p)hQ>xKf^}{A$C914|nIoBN!MEFRhTQTMu5p{NtUbKYCBTd~uD?k)7b-d2Hu? zqY?J5!up;^rGA<)){<~uc`tA zr<+dnp1gAD8lV@+=%uCjJiO3o!lMr?LU$TYoW*4bBP1Kh^5?=s_>1NSxY&I!h|a;|?ZNCFz)jss9m@=8m;nKvq1PTjWzx}2+iVpf$-sJl8Gn(8 z4+^zELYfdEJj4(9$iL+Mb7_UAmGau)*0!7~v(@GqHJB(5}+nERK0JJqD=ef;{t z4WJg_QRU_3Mx6f`#I0++^|+ilp1qZQho>~D>a{8IwF9PqD*p6+~jkREQ%f;Kbw zePY~8A6z*JJ8}2x3kLvtznR!kyAuIlGSCi3iPLX8>Pt8SDFIye5g+)cEOW#Q4i|UC z7sCUhi@%jg`?zMk@!<92-gj5eyt-fp=5m7H&7{|AMFY((?PsnwoqE*sYyxLsM>roI zpa;zlbjUlhP{g;ow_LHJYZJjEJ?8z`g;#g4HniRT`6*yqb~AVjDnF49on)Z?&D*xK zk8ics86im4_&(krXo8?=+^3|Kf_7?)Nc=N?1uYW z3xm%GB_=M`QiQNyOQ4HSp2i-Iq4p&M(cz1f_{6_p!GeJfdCeL!ln)QPGmZ*O1NLf^ z(5yEe{C2VpTHr~3A_(B|S0)JQMFWPqmiF6c9(B}92DYQp{b}Kp=>dP@#Cby;5}}bp zx$pozC@%0zVuwN9`sBi^+ud(}etM5#6Fa<&$;s9-(UK1t>bdnRoJC7wNMs;?zzn44 z@h1k)^>Rpre1{VL67j~KJ_Iy*zaXJo%Wqt`_3JAr06;IzL3a2JN=JO@)KF4a-_qLh ztQr5t5yK1|4iK{s67hqB12hhakc$T&9^o@gGtA{AYS(>MSI{doc38;-{QB51)YR05tKg3w z-KB9*gft#JKJl-dve=l7lP}ZTymryjwcE!>P0i}Le0UHa6zQl4Y5H;DiDmdYUHDQ{ zwv12oyfTJ;j<(nA8eud0qsNaQJ=IYW(#+!VS0cV{dBE=UY@R;DTH2Bl7$285y5@)Z zN_xT{|HU|8heQZRh*fy#GXeg`(h;Ah=lMy)J~|*n&nI$|5BR|U#Y7i}LvL zQV+^A=_&byul--OeLlyJ^q{|lYaA9K&p0kTh!0BGWRj=f4g(qb8T{-cJt#=yun2j* z=fgv<)DwO%DH^~Im50ldPyA@0&wp9DlApwuH|n#c^Bh78I3W?|IT|K0aSn-shQwgF zA|?clKi_mWuH2jWCf00w?l$RxkU&szWB3dBXWri5`Ko|Yy7U5ayxQZ9=hQi0)mOzu zYyF;`Zm^V%K7X7f>_>}1@Dr>YqFhAi*q!`lAY8)QfB)?R9lj!e!QQFYx7YFU`z8tf z!u#@!@|T9hF^_DoD4GUoc)(uo>71xvgc`cGIQ{VB^bHdFCHC6%MR+)Uz24SZ#|WA7 zeDuqnMUo7D+2}8b(f0w8j_rr=FnBy3-%oXX{C>nLeHMx68_VdA%ST_@FF%OB2oJ&Q z#j#@DdZC|NtRg&uK2ZL`Ty5bY`XW4xzsGw3YITVaS@dF6`Y?}#zBnEi^vl@``ttCA zJ>YKu>JuTn<*@ll`d}~UKR-MiCVby|M2IP9(1j%r^GHfplfHI%yj;SpiN0?gPN%s@ zQ@HxkcL9>{i0nwhQ=o4)n|-~N3eXM^V45TLa{9}U(f3s!9{S`8hJR*wc7z}R*H2yf z(qn{zzK9M`ZFumdlX1U4^DuA+dO)7he@=wN8=qfVr9DHZN=RmciG)iMp3O%W-I>f@ zBDkl-fTV-i3+fErW-H#ZPh+PoKs!L--?Auec^oPska!&k_$p|5M0lnWf!BL`Y7Tfk zASxFi_JH^BB?J(j6(KT_33#cKHVrl|;B__`wJ(X$*UY|iHV{n)_S9G|mP^>Z0(|&! z=}j-8prSf%s31TuTXfQnZ9@ev0?DYVc$cc_*g7v1H5s@d0l}HF@UYAIs)a15M1XdH zkf0ay9fH1SdDc}z_Cm>p;!CpgWqH30q|-4qnp6;>>&}Pa;qdjgkOD%j5fW1n{YGC;n#S}3kVQ(TuX$wJZ?a%X-?WN z2Pi^H=<kF!a3d-Qg00E4DZ(Cm0?k~OO z{3Bm}QJ1yDBUY`f_>+LP)?<g39W+L2C*k14i0b4L@$Sh8KdWs)UID z*_Z7CdyVjbJ@ESM>;wwZSjz0(5&^SAuiCf;+Uv2_8U_KqZLj)t21&y?oKe->d*Xk3 zvQbUTlRP~=g9o8pOtp7QFw@sJQnY|jON5|67|_?%+#}oS##J>G`33xUPY0e3PigR} z=g}*>yHN1ueJ&QAmO0?-8+_H)OBQHPL=8_QsARz4#Jo|~?wb|${V#ul|IO{}BjMrE zCy1U$|NiFo^z7u%FCir>6=3M<5*BDoL{BA17+@MT%62PyB^LSfuCRXMTC_Lr;a_2?p%Ly59{`qKH(0@EU z1)Q9JzCArX`7@H+o02%-wa%Lc`-&5hmIE3IYNZ63M(2;$C7Z3O=zFSw+ne+A#DG?K z#EP3bJ!cmD83|o=N(6ZBhE}@zU;$r_Yl+a$4->R9I<&Yg*=#w~2r7UHcx@AvE7+HZ zhqpZO-Scyvq01wuBtlb@WAhWdj73LORfM46VF?d4`ImWwcz}w_uKJ}YK$#ZoopSc( zB90I_E+CTemIHU#n%YNAr83r73L2hhgG33BHBYWu^WpxUV-n>(j{>*L0?xxD{Q*Mto5GS+PADoap% z9$P{d3DB>ZT=JAVCW0q2j!xG3Q2 zI_{kv*w{80!&}zF$;Po_hBVi*hDuhkv1UslK?|ER`qU8@prp}9|MDj(INc=;gwG|M zmmvP`hH!hkOZ?GHe2LJ$fCL~z-p*;)y1}@1yy)I(yjKJ@M+gRR0VW8TJhX0wI}E%8 zxBzTq$O0%J38aB=Te<|qUjjs)=${b(_m|k36&>ibyHEuCbBk_P1QUHDr6K@oh|s+n zZWIE@0o1_jY*dYr0+K*30H+n<3^)OO;tvC8cT6=v4){m_Rj~yEN{jK+-9$qrlMrh7 zo&eMU1i%8O;5|wB1tQ=CE-n0t>rZ0;B|`ku3JeI~l;|i$5#j=@s}NAEVy)u|jY+7j zOuzz)*c`tOB15o%6fg-8@dYyQsev!JfC$(V{T%qi08FD0Fe?O9F%5AQ^5Y;r33Zu< zgn%WVz0*q>!a|UR2TCqY8ZO^65U3DM8)(88!%#hj?IN-%tE{dN&;$* z5co3zJVLY(AM6{)w})*GSU?IAkdVzn14KZEs#F0LxQH_PoPXS`pPF_pEgL$*$9xu| z2$6u=BgA{@!YpK2_2=i-jK~mKKnjo|NPrCxkxWLbK{ARvve|5aPDm41#J}4E1BSQ9 zu@Y}t-8(u_#I;9A%tEw~-Jz8Tcl5x5&1t6KD8nS|K?Gz}3%ZHe6aDLWiuezZ0hAzG ziQ9)(>N5*L0Bc5dJBP>+S+KsbX`ga>yCLB^6AWHK1+Z5g5`?R(U@(KxkEgu)S@2(2 zh5<;Bf7ODOc%|!kvk+egcq_5Oiog#G`bhyiaLnqx=2Sd>1QCQF$CWmM92tfqV&Coc zIH&A3*8&36!3@~ZVG=TR(MnuRs=jlW2gdzXp21PF)TyEhR-%IZKrK8--lHP zdX;Qu#$lfxu=#u&MBjk?F#dNIGJq0<5|AA6R^CqYDrOmi1c-x(1W1yg$|D2;4;9Q0jkPyJ!p`a; zdz@YT!22SOE4w)I9E*z}?>=0;+p*{xo7#ui_;dc;fXdH>iA`d8{>0!6S4;DI>=11+Q* z!Cocg&7S&pe11Pas#&8pPBpG&GEKIe$HSMJ!d7gF&bjHw<1aQ|_OMN`U9b$p0!2^^C)6_9Q(ySpT4X5$Ly#<1 zwuzySH#qs(*NK~rCnQ?QKJ?+plF|J7063>DkdDa`+5i9m07*qoM6N<$f>MA-8UO$Q diff --git a/node_modules/cordova-android/bin/update b/node_modules/cordova-android/bin/update index c51b7ff..419d34e 100755 --- a/node_modules/cordova-android/bin/update +++ b/node_modules/cordova-android/bin/update @@ -18,13 +18,13 @@ specific language governing permissions and limitations under the License. */ -var path = require('path'); +var path = require('path'); var Api = require('./templates/cordova/Api'); -var args = require('nopt')({ +var args = require('nopt')({ 'link': Boolean, 'shared': Boolean, 'help': Boolean -}, { 'd' : '--verbose' }); +}, { 'd': '--verbose' }); if (args.help || args.argv.remain.length === 0) { console.log('Usage: ' + path.relative(process.cwd(), path.join(__dirname, 'update')) + ' [--link]'); @@ -34,4 +34,4 @@ if (args.help || args.argv.remain.length === 0) { require('./templates/cordova/loggingHelper').adjustLoggerLevel(args); -Api.updatePlatform(args.argv.remain[0], {link: (args.link || args.shared)}).done(); +Api.updatePlatform(args.argv.remain[0], { link: (args.link || args.shared) }).done(); diff --git a/node_modules/cordova-android/framework/build.gradle b/node_modules/cordova-android/framework/build.gradle index 4f7f171..b92c9a3 100644 --- a/node_modules/cordova-android/framework/build.gradle +++ b/node_modules/cordova-android/framework/build.gradle @@ -24,15 +24,15 @@ ext { buildscript { repositories { - maven { - url "https://maven.google.com" - } + google() jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:3.0.1' - classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' + // The gradle plugin and the maven plugin have to be updated after each version of Android + // studio comes out + classpath 'com.android.tools.build:gradle:3.3.0' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3' } } @@ -42,12 +42,11 @@ apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.jfrog.bintray' group = 'org.apache.cordova' -version = '7.1.4' +version = '8.0.0' android { compileSdkVersion cdvCompileSdkVersion buildToolsVersion cdvBuildToolsVersion - publishNonDefault true compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -94,9 +93,9 @@ install { } } scm { - connection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' - developerConnection 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' - url 'https://git-wip-us.apache.org/repos/asf?p=cordova-android' + connection 'scm:git:https://github.com/apache/cordova-android.git' + developerConnection 'scm:git:git@github.com:apache/cordova-android.git' + url 'https://github.com/apache/cordova-android' } } @@ -122,16 +121,16 @@ bintray { name = 'cordova-android' userOrg = 'cordova' licenses = ['Apache-2.0'] - vcsUrl = 'https://git-wip-us.apache.org/repos/asf?p=cordova-android.git' + vcsUrl = 'https://github.com/apache/cordova-android' websiteUrl = 'https://cordova.apache.org' - issueTrackerUrl = 'https://issues.apache.org/jira/browse/CB' + issueTrackerUrl = 'https://github.com/apache/cordova-android/issues' publicDownloadNumbers = true licenses = ['Apache-2.0'] labels = ['android', 'cordova', 'phonegap'] version { - name = '7.1.4' + name = '8.0.0' released = new Date() - vcsTag = '7.1.4' + vcsTag = '8.0.0' } } } diff --git a/node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties b/node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties index c3a5fda..d4c7ae1 100644 --- a/node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties +++ b/node_modules/cordova-android/framework/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip diff --git a/node_modules/cordova-android/framework/project.properties b/node_modules/cordova-android/framework/project.properties index 0a372ee..cbb644c 100644 --- a/node_modules/cordova-android/framework/project.properties +++ b/node_modules/cordova-android/framework/project.properties @@ -1,16 +1,11 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. +# This file was originally created by the Android Tools, but is now +# used by cordova-android to manage the project configuration. # Indicates whether an apk should be generated for each density. split.density=false + # Project target. -target=android-27 +target=android-28 apk-configurations= renderscript.opt.level=O0 android.library=true diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java b/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java index f4cab35..20aea80 100644 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebView.java @@ -31,7 +31,7 @@ import android.webkit.WebChromeClient.CustomViewCallback; * are not expected to implement it. */ public interface CordovaWebView { - public static final String CORDOVA_VERSION = "7.1.4"; + public static final String CORDOVA_VERSION = "8.0.0"; void init(CordovaInterface cordova, List pluginEntries, CordovaPreferences preferences); diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebViewImpl.java b/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebViewImpl.java index fb99c34..1db2e95 100644 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebViewImpl.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/CordovaWebViewImpl.java @@ -216,8 +216,10 @@ public class CordovaWebViewImpl implements CordovaWebView { // TODO: What about params? // Load new URL loadUrlIntoView(url, true); + return; } else { LOG.w(TAG, "showWebPage: Refusing to load URL into webview since it is not in the whitelist. URL=" + url); + return; } } if (!pluginManager.shouldOpenExternalUrl(url)) { diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java b/node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java index e384f8d..3945cdd 100755 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/CoreAndroid.java @@ -43,6 +43,7 @@ public class CoreAndroid extends CordovaPlugin { private BroadcastReceiver telephonyReceiver; private CallbackContext messageChannel; private PluginResult pendingResume; + private PluginResult pendingPause; private final Object messageChannelLock = new Object(); /** @@ -113,6 +114,10 @@ public class CoreAndroid extends CordovaPlugin { else if (action.equals("messageChannel")) { synchronized(messageChannelLock) { messageChannel = callbackContext; + if (pendingPause != null) { + sendEventMessage(pendingPause); + pendingPause = null; + } if (pendingResume != null) { sendEventMessage(pendingResume); pendingResume = null; @@ -139,7 +144,7 @@ public class CoreAndroid extends CordovaPlugin { public void clearCache() { cordova.getActivity().runOnUiThread(new Runnable() { public void run() { - webView.clearCache(true); + webView.clearCache(); } }); } @@ -321,7 +326,19 @@ public class CoreAndroid extends CordovaPlugin { } catch (JSONException e) { LOG.e(TAG, "Failed to create event message", e); } - sendEventMessage(new PluginResult(PluginResult.Status.OK, obj)); + PluginResult result = new PluginResult(PluginResult.Status.OK, obj); + + if (messageChannel == null) { + LOG.i(TAG, "Request to send event before messageChannel initialised: " + action); + if ("pause".equals(action)) { + pendingPause = result; + } else if ("resume".equals(action)) { + // When starting normally onPause then onResume is called + pendingPause = null; + } + } else { + sendEventMessage(result); + } } private void sendEventMessage(PluginResult payload) { diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemCookieManager.java b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemCookieManager.java index acf795f..3e5df51 100644 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemCookieManager.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemCookieManager.java @@ -58,7 +58,11 @@ class SystemCookieManager implements ICordovaCookieManager { } public void clearCookies() { - cookieManager.removeAllCookie(); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { + cookieManager.removeAllCookies(null); + } else { + cookieManager.removeAllCookie(); + } } public void flush() { diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java index a27fc6a..72846f0 100755 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebChromeClient.java @@ -142,6 +142,7 @@ public class SystemWebChromeClient extends WebChromeClient { * Handle database quota exceeded notification. */ @Override + @SuppressWarnings("deprecation") public void onExceededDatabaseQuota(String url, String databaseIdentifier, long currentQuota, long estimatedSize, long totalUsedQuota, WebStorage.QuotaUpdater quotaUpdater) { @@ -180,11 +181,13 @@ public class SystemWebChromeClient extends WebChromeClient { // API level 7 is required for this, see if we could lower this using something else @Override + @SuppressWarnings("deprecation") public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) { parentEngine.getCordovaWebView().showCustomView(view, callback); } @Override + @SuppressWarnings("deprecation") public void onHideCustomView() { parentEngine.getCordovaWebView().hideCustomView(); } diff --git a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebViewClient.java b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebViewClient.java index 0b6a577..616cef1 100755 --- a/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebViewClient.java +++ b/node_modules/cordova-android/framework/src/org/apache/cordova/engine/SystemWebViewClient.java @@ -74,7 +74,8 @@ public class SystemWebViewClient extends WebViewClient { * @param url The url to be loaded. * @return true to override, false for default behavior */ - @Override + @Override + @SuppressWarnings("deprecation") public boolean shouldOverrideUrlLoading(WebView view, String url) { return parentEngine.client.onNavigationAttempt(url); } @@ -186,6 +187,7 @@ public class SystemWebViewClient extends WebViewClient { * @param failingUrl The url that failed to load. */ @Override + @SuppressWarnings("deprecation") public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { // Ignore error due to stopLoading(). if (!isCurrentlyLoading) { @@ -316,6 +318,7 @@ public class SystemWebViewClient extends WebViewClient { } @Override + @SuppressWarnings("deprecation") public WebResourceResponse shouldInterceptRequest(WebView view, String url) { try { // Check the against the whitelist and lock out access to the WebView directory diff --git a/node_modules/cordova-android/node_modules/.bin/nopt b/node_modules/cordova-android/node_modules/.bin/nopt deleted file mode 120000 index 6b6566e..0000000 --- a/node_modules/cordova-android/node_modules/.bin/nopt +++ /dev/null @@ -1 +0,0 @@ -../nopt/bin/nopt.js \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/.bin/semver b/node_modules/cordova-android/node_modules/.bin/semver deleted file mode 120000 index 317eb29..0000000 --- a/node_modules/cordova-android/node_modules/.bin/semver +++ /dev/null @@ -1 +0,0 @@ -../semver/bin/semver \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/.bin/shjs b/node_modules/cordova-android/node_modules/.bin/shjs deleted file mode 120000 index a044997..0000000 --- a/node_modules/cordova-android/node_modules/.bin/shjs +++ /dev/null @@ -1 +0,0 @@ -../shelljs/bin/shjs \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/abbrev/LICENSE b/node_modules/cordova-android/node_modules/abbrev/LICENSE deleted file mode 100644 index 9bcfa9d..0000000 --- a/node_modules/cordova-android/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,46 +0,0 @@ -This software is dual-licensed under the ISC and MIT licenses. -You may use this software under EITHER of the following licenses. - ----------- - -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - ----------- - -Copyright Isaac Z. Schlueter and Contributors -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/abbrev/README.md b/node_modules/cordova-android/node_modules/abbrev/README.md deleted file mode 100644 index 99746fe..0000000 --- a/node_modules/cordova-android/node_modules/abbrev/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# abbrev-js - -Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). - -Usage: - - var abbrev = require("abbrev"); - abbrev("foo", "fool", "folding", "flop"); - - // returns: - { fl: 'flop' - , flo: 'flop' - , flop: 'flop' - , fol: 'folding' - , fold: 'folding' - , foldi: 'folding' - , foldin: 'folding' - , folding: 'folding' - , foo: 'foo' - , fool: 'fool' - } - -This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/node_modules/cordova-android/node_modules/abbrev/abbrev.js b/node_modules/cordova-android/node_modules/abbrev/abbrev.js deleted file mode 100644 index 7b1dc5d..0000000 --- a/node_modules/cordova-android/node_modules/abbrev/abbrev.js +++ /dev/null @@ -1,61 +0,0 @@ -module.exports = exports = abbrev.abbrev = abbrev - -abbrev.monkeyPatch = monkeyPatch - -function monkeyPatch () { - Object.defineProperty(Array.prototype, 'abbrev', { - value: function () { return abbrev(this) }, - enumerable: false, configurable: true, writable: true - }) - - Object.defineProperty(Object.prototype, 'abbrev', { - value: function () { return abbrev(Object.keys(this)) }, - enumerable: false, configurable: true, writable: true - }) -} - -function abbrev (list) { - if (arguments.length !== 1 || !Array.isArray(list)) { - list = Array.prototype.slice.call(arguments, 0) - } - for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { - args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - args = args.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - var abbrevs = {} - , prev = "" - for (var i = 0, l = args.length ; i < l ; i ++) { - var current = args[i] - , next = args[i + 1] || "" - , nextMatches = true - , prevMatches = true - if (current === next) continue - for (var j = 0, cl = current.length ; j < cl ; j ++) { - var curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j ++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (var a = current.substr(0, j) ; j <= cl ; j ++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} diff --git a/node_modules/cordova-android/node_modules/abbrev/package.json b/node_modules/cordova-android/node_modules/abbrev/package.json deleted file mode 100644 index 0033da1..0000000 --- a/node_modules/cordova-android/node_modules/abbrev/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "abbrev@1", - "_id": "abbrev@1.1.1", - "_inBundle": true, - "_integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "_location": "/cordova-android/abbrev", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "abbrev@1", - "name": "abbrev", - "escapedName": "abbrev", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/nopt" - ], - "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8", - "_spec": "abbrev@1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/nopt", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/abbrev-js/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Like ruby's abbrev module, but in js", - "devDependencies": { - "tap": "^10.1" - }, - "files": [ - "abbrev.js" - ], - "homepage": "https://github.com/isaacs/abbrev-js#readme", - "license": "ISC", - "main": "abbrev.js", - "name": "abbrev", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test.js --100" - }, - "version": "1.1.1" -} diff --git a/node_modules/cordova-android/node_modules/android-versions/.jshintignore b/node_modules/cordova-android/node_modules/android-versions/.jshintignore deleted file mode 100644 index 2e98972..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/.jshintignore +++ /dev/null @@ -1,8 +0,0 @@ -.git/ -node_modules/ -coverage/ -build/ -assets/ -dist/ -docs/ -tests/ \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/android-versions/.jshintrc b/node_modules/cordova-android/node_modules/android-versions/.jshintrc deleted file mode 100644 index 427d629..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/.jshintrc +++ /dev/null @@ -1,29 +0,0 @@ -{ - "esversion": 6, - "indent": 2, - "forin": true, - "noarg": true, - "bitwise": true, - "nonew": true, - "strict": true, - - "browser": true, - "devel": true, - "node": false, - "jquery": false, - "esnext": false, - "moz": false, - "es3": false, - - "asi": true, - - "eqnull": true, - "debug": true, - "boss": true, - "evil": true, - "loopfunc": true, - "laxbreak": true, - - "unused": true, - "undef": true -} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/android-versions/.travis.yml b/node_modules/cordova-android/node_modules/android-versions/.travis.yml deleted file mode 100644 index 4c19fbe..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - "6.1.0" \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/android-versions/README.md b/node_modules/cordova-android/node_modules/android-versions/README.md deleted file mode 100644 index 79d63bc..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/README.md +++ /dev/null @@ -1,87 +0,0 @@ -Android Versions -================ - -A node module to get Android versions by API level, NDK level, semantic version, or version name. - -Versions are referenced from [source.android.com/source/build-numbers.html](https://source.android.com/source/build-numbers.html#platform-code-names-versions-api-levels-and-ndk-releases). The version for "Current Development Build" (`"CUR_DEVELOPMENT"`) is not included in the list of `VERSIONS`. - -[![NPM version][npm-image]][npm-url] -[![build status][travis-image]][travis-url] - -[npm-image]: https://img.shields.io/npm/v/android-versions.svg?style=flat-square -[npm-url]: https://npmjs.org/package/android-versions -[travis-image]: https://img.shields.io/travis/dvoiss/android-versions.svg?style=flat-square -[travis-url]: https://travis-ci.org/dvoiss/android-versions - -## Install - -```bash -# NPM -npm install android-versions --save -# YARN -yarn add android-versions -``` - -## Usage - -View the tests for more advanced usage. - -```javascript -const android = require('android-versions') -``` - -#### Get by API level: -```javascript -console.log(android.get(23)) - -=> { api: 23, ndk: 8, semver: "6.0", name: "Marshmallow", versionCode: "M" } -``` - -#### Get by version: - -```javascript -console.log(android.get("2.3.3")) - -=> { api: 10, ndk: 5, semver: "2.3.3", name: "Gingerbread", versionCode: "GINGERBREAD_MR1" } -``` - -#### Get all by predicate: - -``` -android.getAll((version) => { - return version.ndk > 5 && version.api < 15 -}).map((version) => version.versionCode) - -=> [ "HONEYCOMB_MR1", "HONEYCOMB_MR2", "ICE_CREAM_SANDWICH" ] -``` - -#### Access a specific version with all info: - -``` -android.LOLLIPOP - -=> { api: 21, ndk: 8, semver: "5.0", name: "Lollipop", versionCode: "LOLLIPOP" } -``` - -#### Access the complete reference of Android versions with all info: - -```javascript -android.VERSIONS - -=> { - BASE: { api: 1, ndk: 0, semver: "1.0", name: "(no code name)", versionCode: "BASE" }, - ... - N: { api: 24, ndk: 8, semver: "7.0", name: "Nougat", versionCode: "N" } - ... -} -``` - -## Test - -```bash -npm run test -``` - -## License - -MIT \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/android-versions/index.js b/node_modules/cordova-android/node_modules/android-versions/index.js deleted file mode 100644 index 81c7f53..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/index.js +++ /dev/null @@ -1,161 +0,0 @@ -/** - * Copyright (c) 2016, David Voiss - * - * Permission to use, copy, modify, and/or distribute this software for any purpose - * with or without fee is hereby granted, provided that the above copyright notice - * and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, - * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS - * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF - * THIS SOFTWARE. -*/ - -/* jshint node: true */ -"use strict"; - -/** - * A module to get Android versions by API level, NDK level, semantic version, or version name. - * - * Versions are referenced from here: - * {@link https://source.android.com/source/build-numbers.html#platform-code-names-versions-api-levels-and-ndk-releases} - * {@link https://github.com/android/platform_frameworks_base/blob/master/core/java/android/os/Build.java} - * - * The version for "Current Development Build" ("CUR_DEVELOPMENT") is not included. - * - * @module android-versions - */ - -var VERSIONS = { - BASE: { api: 1, ndk: 0, semver: "1.0", name: "(no code name)", }, - BASE_1_1: { api: 2, ndk: 0, semver: "1.1", name: "(no code name)", }, - CUPCAKE: { api: 3, ndk: 1, semver: "1.5", name: "Cupcake", }, - DONUT: { api: 4, ndk: 2, semver: "1.6", name: "Donut", }, - ECLAIR: { api: 5, ndk: 2, semver: "2.0", name: "Eclair", }, - ECLAIR_0_1: { api: 6, ndk: 2, semver: "2.0.1", name: "Eclair", }, - ECLAIR_MR1: { api: 7, ndk: 3, semver: "2.1", name: "Eclair", }, - FROYO: { api: 8, ndk: 4, semver: "2.2.x", name: "Froyo", }, - GINGERBREAD: { api: 9, ndk: 5, semver: "2.3.0 - 2.3.2", name: "Gingerbread", }, - GINGERBREAD_MR1: { api: 10, ndk: 5, semver: "2.3.3 - 2.3.7", name: "Gingerbread", }, - HONEYCOMB: { api: 11, ndk: 5, semver: "3.0", name: "Honeycomb", }, - HONEYCOMB_MR1: { api: 12, ndk: 6, semver: "3.1", name: "Honeycomb", }, - HONEYCOMB_MR2: { api: 13, ndk: 6, semver: "3.2.x", name: "Honeycomb", }, - ICE_CREAM_SANDWICH: { api: 14, ndk: 7, semver: "4.0.1 - 4.0.2", name: "Ice Cream Sandwich", }, - ICE_CREAM_SANDWICH_MR1: { api: 15, ndk: 8, semver: "4.0.3 - 4.0.4", name: "Ice Cream Sandwich", }, - JELLY_BEAN: { api: 16, ndk: 8, semver: "4.1.x", name: "Jellybean", }, - JELLY_BEAN_MR1: { api: 17, ndk: 8, semver: "4.2.x", name: "Jellybean", }, - JELLY_BEAN_MR2: { api: 18, ndk: 8, semver: "4.3.x", name: "Jellybean", }, - KITKAT: { api: 19, ndk: 8, semver: "4.4.0 - 4.4.4", name: "KitKat", }, - KITKAT_WATCH: { api: 20, ndk: 8, semver: "4.4", name: "KitKat Watch", }, - LOLLIPOP: { api: 21, ndk: 8, semver: "5.0", name: "Lollipop", }, - LOLLIPOP_MR1: { api: 22, ndk: 8, semver: "5.1", name: "Lollipop", }, - M: { api: 23, ndk: 8, semver: "6.0", name: "Marshmallow", }, - N: { api: 24, ndk: 8, semver: "7.0", name: "Nougat", }, - N_MR1: { api: 25, ndk: 8, semver: "7.1", name: "Nougat", }, - O: { api: 26, ndk: 8, semver: "8.0.0", name: "Oreo", }, - O_MR1: { api: 27, ndk: 8, semver: "8.1.0", name: "Oreo", }, - P: { api: 28, ndk: 8, semver: "9", name: "Pie", } -} - -// Add a key to each version of Android for the "versionCode". -// This is the same key we use in the VERSIONS map above. -Object.keys(VERSIONS).forEach(function(version) { - VERSIONS[version].versionCode = version -}) - -var semver = require('semver'); - -// semver format requires .. but we allow just . format. -// Coerce . to ..0 -function formatSemver(semver) { - if (semver.match(/^\d+.\d+$/)) { - return semver + '.0' - } else { - return semver - } -} - -// The default predicate compares against API level, semver, name, or code. -function getFromDefaultPredicate(arg) { - // Coerce arg to string for comparisons below. - arg = arg.toString() - - return getFromPredicate(function(version) { - // Check API level before all else. - if (arg === version.api.toString()) { - return true - } - - var argSemver = formatSemver(arg) - var versionSemver = formatSemver(version.semver) - - if (semver.valid(argSemver) && semver.satisfies(argSemver, versionSemver)) { - return true - } - - // Compare version name and code. - return arg === version.name || arg === version.versionCode - }) -} - -// The function to allow passing a predicate. -function getFromPredicate(predicate) { - if (predicate === null) { - return null - } - - return Object.keys(VERSIONS).filter(function(version) { - return predicate(VERSIONS[version]) - }).map(function(key) { return VERSIONS[key] }) -} - -/** - * The Android version codes available as keys for easier look-up. - */ -Object.keys(VERSIONS).forEach(function(name) { - exports[name] = VERSIONS[name] -}) - -/** - * The complete reference of Android versions for easier look-up. - */ -exports.VERSIONS = VERSIONS - -/** - * Retrieve a single Android version. - * - * @param {object | Function} arg - The value or predicate to use to retrieve values. - * - * @return {object} An object representing the version found or null if none found. - */ -exports.get = function(arg) { - var result = exports.getAll(arg) - - if (result === null || result.length === 0) { - return null - } - - return result[0] -} - -/** - * Retrieve all Android versions that meet the criteria of the argument. - * - * @param {object | Function} arg - The value or predicate to use to retrieve values. - * - * @return {object} An object representing the version found or null if none found. - */ -exports.getAll = function(arg) { - if (arg === null) { - return null - } - - if (typeof arg === "function") { - return getFromPredicate(arg) - } else { - return getFromDefaultPredicate(arg) - } -} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/android-versions/package.json b/node_modules/cordova-android/node_modules/android-versions/package.json deleted file mode 100644 index 173abf2..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "android-versions@1", - "_id": "android-versions@1.4.0", - "_inBundle": true, - "_integrity": "sha512-GnomfYsBq+nZh3c3UH/4r9Jt6FuTxdhUJbeHIdYOH5xBhQ8I0ZzC2/RM5IFFIjrzuNWSHb8JWP1lPK0/a26jrg==", - "_location": "/cordova-android/android-versions", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "android-versions@1", - "name": "android-versions", - "escapedName": "android-versions", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/cordova-android" - ], - "_resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.4.0.tgz", - "_shasum": "807ea2941d7e5780e6dd61c5d9b7b6f3c0706e09", - "_spec": "android-versions@1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "author": { - "name": "dvoiss" - }, - "bugs": { - "url": "https://github.com/dvoiss/android-versions/issues" - }, - "bundleDependencies": false, - "dependencies": { - "semver": "^5.4.1" - }, - "deprecated": false, - "description": "Get the name, API level, version level, NDK level, or version code from any version of Android.", - "devDependencies": { - "jshint": "^2.9.2", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/dvoiss/android-versions#readme", - "keywords": [ - "android", - "version", - "versions", - "ndk", - "nougat", - "marshmallow", - "api", - "level" - ], - "license": "MIT", - "main": "index.js", - "name": "android-versions", - "pre-commit": [ - "jshint" - ], - "repository": { - "type": "git", - "url": "git+https://github.com/dvoiss/android-versions.git" - }, - "scripts": { - "jshint": "jshint .", - "test": "tape tests/**/*.js" - }, - "version": "1.4.0" -} diff --git a/node_modules/cordova-android/node_modules/android-versions/tests/index.test.js b/node_modules/cordova-android/node_modules/android-versions/tests/index.test.js deleted file mode 100644 index 477ab8b..0000000 --- a/node_modules/cordova-android/node_modules/android-versions/tests/index.test.js +++ /dev/null @@ -1,118 +0,0 @@ -"use strict"; - -const test = require('tape') -const android = require('..') - -test('get specific version by API level', (t) => { - t.plan(1) - t.equal(android.get(24).name, "Nougat") -}) - -test('getAll versions by API level', (t) => { - t.plan(1) - t.equal(android.getAll(24)[0].name, "Nougat") -}) - -test('get specific version by predicate', (t) => { - t.plan(2) - - let actual = android.get((version) => { - return version.name.indexOf("on") !== -1 - }) - t.equal(actual.name, "Donut") - - actual = android.get((version) => { - return version.ndk > 5 && version.api < 15 - }) - t.equal(actual.versionCode, "HONEYCOMB_MR1") -}) - -test('getAll versions by predicate', (t) => { - t.plan(3) - - let actual = android.getAll((version) => { - return version.name.indexOf("on") !== -1 - }).map((version) => version.name) - t.deepEqual(actual, ["Donut", "Honeycomb", "Honeycomb", "Honeycomb"]) - - actual = android.getAll((version) => { - return version.ndk > 5 && version.api < 15 - }).map((version) => version.versionCode) - t.deepEqual(actual, ["HONEYCOMB_MR1", "HONEYCOMB_MR2", "ICE_CREAM_SANDWICH"]) - - actual = android.getAll((version) => { - return version.api > 22 - }).map((version) => version.versionCode) - t.deepEqual(actual, ["M", "N", "N_MR1", "O", "O_MR1", "P"]) -}) - -test('get version by semantic version', (t) => { - t.plan(4) - t.equal(android.get("6.0").versionCode, android.M.versionCode) - t.equal(android.get("6.0.0").versionCode, android.M.versionCode) - t.equal(android.get("2.3").versionCode, android.GINGERBREAD.versionCode) - t.equal(android.get("2.3.3").versionCode, android.GINGERBREAD_MR1.versionCode) -}) - -test('support major version only', (t) => { - t.plan(2) - t.equal(android.get("9.0").versionCode, android.P.versionCode) - t.equal(android.get("9.0.0").versionCode, android.P.versionCode) -}) - -test('support version ranges', (t) => { - t.plan(7) - let tests = [ "4.4", "4.4.0", "4.4.1", "4.4.2", "4.4.3", "4.4.4" ] - tests.forEach((versionCode) => { - t.equal(android.get(versionCode).versionCode, android.KITKAT.versionCode) - }) - t.equal(android.get("4.4.5"), null) -}) - -test('support x-ranges', (t) => { - t.plan(12) - let tests = [ - "4.1", "4.1.0", "4.1.1", "4.1.2", "4.1.3", "4.1.4", - "4.1.5", "4.1.6", "4.1.7", "4.1.8", "4.1.9", "4.1.10" - ] - tests.forEach((versionCode) => { - t.equal(android.get(versionCode).versionCode, android.JELLY_BEAN.versionCode) - }) -}) - -test('access version codes object', (t) => { - t.plan(1) - t.ok(android.VERSIONS) -}) - -test('access specific versions directly', (t) => { - t.plan(28) - t.ok(android.BASE) - t.ok(android.BASE_1_1) - t.ok(android.CUPCAKE) - t.ok(android.DONUT) - t.ok(android.ECLAIR) - t.ok(android.ECLAIR_0_1) - t.ok(android.ECLAIR_MR1) - t.ok(android.FROYO) - t.ok(android.GINGERBREAD) - t.ok(android.GINGERBREAD_MR1) - t.ok(android.HONEYCOMB) - t.ok(android.HONEYCOMB_MR1) - t.ok(android.HONEYCOMB_MR2) - t.ok(android.ICE_CREAM_SANDWICH) - t.ok(android.ICE_CREAM_SANDWICH_MR1) - t.ok(android.JELLY_BEAN) - t.ok(android.JELLY_BEAN_MR1) - t.ok(android.JELLY_BEAN_MR2) - t.ok(android.KITKAT) - t.ok(android.KITKAT_WATCH) - t.ok(android.LOLLIPOP) - t.ok(android.LOLLIPOP_MR1) - t.ok(android.M) - t.ok(android.N) - t.ok(android.N_MR1) - t.ok(android.O) - t.ok(android.O_MR1) - t.ok(android.P) -}) diff --git a/node_modules/cordova-android/node_modules/ansi/.jshintrc b/node_modules/cordova-android/node_modules/ansi/.jshintrc deleted file mode 100644 index 248c542..0000000 --- a/node_modules/cordova-android/node_modules/ansi/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "laxcomma": true, - "asi": true -} diff --git a/node_modules/cordova-android/node_modules/ansi/.npmignore b/node_modules/cordova-android/node_modules/ansi/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/cordova-android/node_modules/ansi/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/cordova-android/node_modules/ansi/History.md b/node_modules/cordova-android/node_modules/ansi/History.md deleted file mode 100644 index aea8aaf..0000000 --- a/node_modules/cordova-android/node_modules/ansi/History.md +++ /dev/null @@ -1,23 +0,0 @@ - -0.3.1 / 2016-01-14 -================== - - * add MIT LICENSE file (#23, @kasicka) - * preserve chaining after redundant style-method calls (#19, @drewblaisdell) - * package: add "license" field (#16, @BenjaminTsai) - -0.3.0 / 2014-05-09 -================== - - * package: remove "test" script and "devDependencies" - * package: remove "engines" section - * pacakge: remove "bin" section - * package: beautify - * examples: remove `starwars` example (#15) - * Documented goto, horizontalAbsolute, and eraseLine methods in README.md (#12, @Jammerwoch) - * add `.jshintrc` file - -< 0.3.0 -======= - - * Prehistoric diff --git a/node_modules/cordova-android/node_modules/ansi/LICENSE b/node_modules/cordova-android/node_modules/ansi/LICENSE deleted file mode 100644 index 2ea4dc5..0000000 --- a/node_modules/cordova-android/node_modules/ansi/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/ansi/README.md b/node_modules/cordova-android/node_modules/ansi/README.md deleted file mode 100644 index 6ce1940..0000000 --- a/node_modules/cordova-android/node_modules/ansi/README.md +++ /dev/null @@ -1,98 +0,0 @@ -ansi.js -========= -### Advanced ANSI formatting tool for Node.js - -`ansi.js` is a module for Node.js that provides an easy-to-use API for -writing ANSI escape codes to `Stream` instances. ANSI escape codes are used to do -fancy things in a terminal window, like render text in colors, delete characters, -lines, the entire window, or hide and show the cursor, and lots more! - -#### Features: - - * 256 color support for the terminal! - * Make a beep sound from your terminal! - * Works with *any* writable `Stream` instance. - * Allows you to move the cursor anywhere on the terminal window. - * Allows you to delete existing contents from the terminal window. - * Allows you to hide and show the cursor. - * Converts CSS color codes and RGB values into ANSI escape codes. - * Low-level; you are in control of when escape codes are used, it's not abstracted. - - -Installation ------------- - -Install with `npm`: - -``` bash -$ npm install ansi -``` - - -Example -------- - -``` js -var ansi = require('ansi') - , cursor = ansi(process.stdout) - -// You can chain your calls forever: -cursor - .red() // Set font color to red - .bg.grey() // Set background color to grey - .write('Hello World!') // Write 'Hello World!' to stdout - .bg.reset() // Reset the bgcolor before writing the trailing \n, - // to avoid Terminal glitches - .write('\n') // And a final \n to wrap things up - -// Rendering modes are persistent: -cursor.hex('#660000').bold().underline() - -// You can use the regular logging functions, text will be green: -console.log('This is blood red, bold text') - -// To reset just the foreground color: -cursor.fg.reset() - -console.log('This will still be bold') - -// to go to a location (x,y) on the console -// note: 1-indexed, not 0-indexed: -cursor.goto(10, 5).write('Five down, ten over') - -// to clear the current line: -cursor.horizontalAbsolute(0).eraseLine().write('Starting again') - -// to go to a different column on the current line: -cursor.horizontalAbsolute(5).write('column five') - -// Clean up after yourself! -cursor.reset() -``` - - -License -------- - -(The MIT License) - -Copyright (c) 2012 Nathan Rajlich <nathan@tootallnate.net> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/ansi/examples/beep/index.js b/node_modules/cordova-android/node_modules/ansi/examples/beep/index.js deleted file mode 100755 index c1ec929..0000000 --- a/node_modules/cordova-android/node_modules/ansi/examples/beep/index.js +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env node - -/** - * Invokes the terminal "beep" sound once per second on every exact second. - */ - -process.title = 'beep' - -var cursor = require('../../')(process.stdout) - -function beep () { - cursor.beep() - setTimeout(beep, 1000 - (new Date()).getMilliseconds()) -} - -setTimeout(beep, 1000 - (new Date()).getMilliseconds()) diff --git a/node_modules/cordova-android/node_modules/ansi/examples/clear/index.js b/node_modules/cordova-android/node_modules/ansi/examples/clear/index.js deleted file mode 100755 index 6ac21ff..0000000 --- a/node_modules/cordova-android/node_modules/ansi/examples/clear/index.js +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env node - -/** - * Like GNU ncurses "clear" command. - * https://github.com/mscdex/node-ncurses/blob/master/deps/ncurses/progs/clear.c - */ - -process.title = 'clear' - -function lf () { return '\n' } - -require('../../')(process.stdout) - .write(Array.apply(null, Array(process.stdout.getWindowSize()[1])).map(lf).join('')) - .eraseData(2) - .goto(1, 1) diff --git a/node_modules/cordova-android/node_modules/ansi/examples/cursorPosition.js b/node_modules/cordova-android/node_modules/ansi/examples/cursorPosition.js deleted file mode 100755 index 50f9644..0000000 --- a/node_modules/cordova-android/node_modules/ansi/examples/cursorPosition.js +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node - -var tty = require('tty') -var cursor = require('../')(process.stdout) - -// listen for the queryPosition report on stdin -process.stdin.resume() -raw(true) - -process.stdin.once('data', function (b) { - var match = /\[(\d+)\;(\d+)R$/.exec(b.toString()) - if (match) { - var xy = match.slice(1, 3).reverse().map(Number) - console.error(xy) - } - - // cleanup and close stdin - raw(false) - process.stdin.pause() -}) - - -// send the query position request code to stdout -cursor.queryPosition() - -function raw (mode) { - if (process.stdin.setRawMode) { - process.stdin.setRawMode(mode) - } else { - tty.setRawMode(mode) - } -} diff --git a/node_modules/cordova-android/node_modules/ansi/examples/progress/index.js b/node_modules/cordova-android/node_modules/ansi/examples/progress/index.js deleted file mode 100644 index d28dbda..0000000 --- a/node_modules/cordova-android/node_modules/ansi/examples/progress/index.js +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node - -var assert = require('assert') - , ansi = require('../../') - -function Progress (stream, width) { - this.cursor = ansi(stream) - this.delta = this.cursor.newlines - this.width = width | 0 || 10 - this.open = '[' - this.close = ']' - this.complete = '█' - this.incomplete = '_' - - // initial render - this.progress = 0 -} - -Object.defineProperty(Progress.prototype, 'progress', { - get: get - , set: set - , configurable: true - , enumerable: true -}) - -function get () { - return this._progress -} - -function set (v) { - this._progress = Math.max(0, Math.min(v, 100)) - - var w = this.width - this.complete.length - this.incomplete.length - , n = w * (this._progress / 100) | 0 - , i = w - n - , com = c(this.complete, n) - , inc = c(this.incomplete, i) - , delta = this.cursor.newlines - this.delta - - assert.equal(com.length + inc.length, w) - - if (delta > 0) { - this.cursor.up(delta) - this.delta = this.cursor.newlines - } - - this.cursor - .horizontalAbsolute(0) - .eraseLine(2) - .fg.white() - .write(this.open) - .fg.grey() - .bold() - .write(com) - .resetBold() - .write(inc) - .fg.white() - .write(this.close) - .fg.reset() - .write('\n') -} - -function c (char, length) { - return Array.apply(null, Array(length)).map(function () { - return char - }).join('') -} - - - - -// Usage -var width = parseInt(process.argv[2], 10) || process.stdout.getWindowSize()[0] / 2 - , p = new Progress(process.stdout, width) - -;(function tick () { - p.progress += Math.random() * 5 - p.cursor - .eraseLine(2) - .write('Progress: ') - .bold().write(p.progress.toFixed(2)) - .write('%') - .resetBold() - .write('\n') - if (p.progress < 100) - setTimeout(tick, 100) -})() diff --git a/node_modules/cordova-android/node_modules/ansi/lib/ansi.js b/node_modules/cordova-android/node_modules/ansi/lib/ansi.js deleted file mode 100644 index b1714e3..0000000 --- a/node_modules/cordova-android/node_modules/ansi/lib/ansi.js +++ /dev/null @@ -1,405 +0,0 @@ - -/** - * References: - * - * - http://en.wikipedia.org/wiki/ANSI_escape_code - * - http://www.termsys.demon.co.uk/vtansi.htm - * - */ - -/** - * Module dependencies. - */ - -var emitNewlineEvents = require('./newlines') - , prefix = '\x1b[' // For all escape codes - , suffix = 'm' // Only for color codes - -/** - * The ANSI escape sequences. - */ - -var codes = { - up: 'A' - , down: 'B' - , forward: 'C' - , back: 'D' - , nextLine: 'E' - , previousLine: 'F' - , horizontalAbsolute: 'G' - , eraseData: 'J' - , eraseLine: 'K' - , scrollUp: 'S' - , scrollDown: 'T' - , savePosition: 's' - , restorePosition: 'u' - , queryPosition: '6n' - , hide: '?25l' - , show: '?25h' -} - -/** - * Rendering ANSI codes. - */ - -var styles = { - bold: 1 - , italic: 3 - , underline: 4 - , inverse: 7 -} - -/** - * The negating ANSI code for the rendering modes. - */ - -var reset = { - bold: 22 - , italic: 23 - , underline: 24 - , inverse: 27 -} - -/** - * The standard, styleable ANSI colors. - */ - -var colors = { - white: 37 - , black: 30 - , blue: 34 - , cyan: 36 - , green: 32 - , magenta: 35 - , red: 31 - , yellow: 33 - , grey: 90 - , brightBlack: 90 - , brightRed: 91 - , brightGreen: 92 - , brightYellow: 93 - , brightBlue: 94 - , brightMagenta: 95 - , brightCyan: 96 - , brightWhite: 97 -} - - -/** - * Creates a Cursor instance based off the given `writable stream` instance. - */ - -function ansi (stream, options) { - if (stream._ansicursor) { - return stream._ansicursor - } else { - return stream._ansicursor = new Cursor(stream, options) - } -} -module.exports = exports = ansi - -/** - * The `Cursor` class. - */ - -function Cursor (stream, options) { - if (!(this instanceof Cursor)) { - return new Cursor(stream, options) - } - if (typeof stream != 'object' || typeof stream.write != 'function') { - throw new Error('a valid Stream instance must be passed in') - } - - // the stream to use - this.stream = stream - - // when 'enabled' is false then all the functions are no-ops except for write() - this.enabled = options && options.enabled - if (typeof this.enabled === 'undefined') { - this.enabled = stream.isTTY - } - this.enabled = !!this.enabled - - // then `buffering` is true, then `write()` calls are buffered in - // memory until `flush()` is invoked - this.buffering = !!(options && options.buffering) - this._buffer = [] - - // controls the foreground and background colors - this.fg = this.foreground = new Colorer(this, 0) - this.bg = this.background = new Colorer(this, 10) - - // defaults - this.Bold = false - this.Italic = false - this.Underline = false - this.Inverse = false - - // keep track of the number of "newlines" that get encountered - this.newlines = 0 - emitNewlineEvents(stream) - stream.on('newline', function () { - this.newlines++ - }.bind(this)) -} -exports.Cursor = Cursor - -/** - * Helper function that calls `write()` on the underlying Stream. - * Returns `this` instead of the write() return value to keep - * the chaining going. - */ - -Cursor.prototype.write = function (data) { - if (this.buffering) { - this._buffer.push(arguments) - } else { - this.stream.write.apply(this.stream, arguments) - } - return this -} - -/** - * Buffer `write()` calls into memory. - * - * @api public - */ - -Cursor.prototype.buffer = function () { - this.buffering = true - return this -} - -/** - * Write out the in-memory buffer. - * - * @api public - */ - -Cursor.prototype.flush = function () { - this.buffering = false - var str = this._buffer.map(function (args) { - if (args.length != 1) throw new Error('unexpected args length! ' + args.length); - return args[0]; - }).join(''); - this._buffer.splice(0); // empty - this.write(str); - return this -} - - -/** - * The `Colorer` class manages both the background and foreground colors. - */ - -function Colorer (cursor, base) { - this.current = null - this.cursor = cursor - this.base = base -} -exports.Colorer = Colorer - -/** - * Write an ANSI color code, ensuring that the same code doesn't get rewritten. - */ - -Colorer.prototype._setColorCode = function setColorCode (code) { - var c = String(code) - if (this.current === c) return - this.cursor.enabled && this.cursor.write(prefix + c + suffix) - this.current = c - return this -} - - -/** - * Set up the positional ANSI codes. - */ - -Object.keys(codes).forEach(function (name) { - var code = String(codes[name]) - Cursor.prototype[name] = function () { - var c = code - if (arguments.length > 0) { - c = toArray(arguments).map(Math.round).join(';') + code - } - this.enabled && this.write(prefix + c) - return this - } -}) - -/** - * Set up the functions for the rendering ANSI codes. - */ - -Object.keys(styles).forEach(function (style) { - var name = style[0].toUpperCase() + style.substring(1) - , c = styles[style] - , r = reset[style] - - Cursor.prototype[style] = function () { - if (this[name]) return this - this.enabled && this.write(prefix + c + suffix) - this[name] = true - return this - } - - Cursor.prototype['reset' + name] = function () { - if (!this[name]) return this - this.enabled && this.write(prefix + r + suffix) - this[name] = false - return this - } -}) - -/** - * Setup the functions for the standard colors. - */ - -Object.keys(colors).forEach(function (color) { - var code = colors[color] - - Colorer.prototype[color] = function () { - this._setColorCode(this.base + code) - return this.cursor - } - - Cursor.prototype[color] = function () { - return this.foreground[color]() - } -}) - -/** - * Makes a beep sound! - */ - -Cursor.prototype.beep = function () { - this.enabled && this.write('\x07') - return this -} - -/** - * Moves cursor to specific position - */ - -Cursor.prototype.goto = function (x, y) { - x = x | 0 - y = y | 0 - this.enabled && this.write(prefix + y + ';' + x + 'H') - return this -} - -/** - * Resets the color. - */ - -Colorer.prototype.reset = function () { - this._setColorCode(this.base + 39) - return this.cursor -} - -/** - * Resets all ANSI formatting on the stream. - */ - -Cursor.prototype.reset = function () { - this.enabled && this.write(prefix + '0' + suffix) - this.Bold = false - this.Italic = false - this.Underline = false - this.Inverse = false - this.foreground.current = null - this.background.current = null - return this -} - -/** - * Sets the foreground color with the given RGB values. - * The closest match out of the 216 colors is picked. - */ - -Colorer.prototype.rgb = function (r, g, b) { - var base = this.base + 38 - , code = rgb(r, g, b) - this._setColorCode(base + ';5;' + code) - return this.cursor -} - -/** - * Same as `cursor.fg.rgb(r, g, b)`. - */ - -Cursor.prototype.rgb = function (r, g, b) { - return this.foreground.rgb(r, g, b) -} - -/** - * Accepts CSS color codes for use with ANSI escape codes. - * For example: `#FF000` would be bright red. - */ - -Colorer.prototype.hex = function (color) { - return this.rgb.apply(this, hex(color)) -} - -/** - * Same as `cursor.fg.hex(color)`. - */ - -Cursor.prototype.hex = function (color) { - return this.foreground.hex(color) -} - - -// UTIL FUNCTIONS // - -/** - * Translates a 255 RGB value to a 0-5 ANSI RGV value, - * then returns the single ANSI color code to use. - */ - -function rgb (r, g, b) { - var red = r / 255 * 5 - , green = g / 255 * 5 - , blue = b / 255 * 5 - return rgb5(red, green, blue) -} - -/** - * Turns rgb 0-5 values into a single ANSI color code to use. - */ - -function rgb5 (r, g, b) { - var red = Math.round(r) - , green = Math.round(g) - , blue = Math.round(b) - return 16 + (red*36) + (green*6) + blue -} - -/** - * Accepts a hex CSS color code string (# is optional) and - * translates it into an Array of 3 RGB 0-255 values, which - * can then be used with rgb(). - */ - -function hex (color) { - var c = color[0] === '#' ? color.substring(1) : color - , r = c.substring(0, 2) - , g = c.substring(2, 4) - , b = c.substring(4, 6) - return [parseInt(r, 16), parseInt(g, 16), parseInt(b, 16)] -} - -/** - * Turns an array-like object into a real array. - */ - -function toArray (a) { - var i = 0 - , l = a.length - , rtn = [] - for (; i 0) { - var len = data.length - , i = 0 - // now try to calculate any deltas - if (typeof data == 'string') { - for (; i` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/balanced-match/index.js b/node_modules/cordova-android/node_modules/balanced-match/index.js deleted file mode 100644 index 1685a76..0000000 --- a/node_modules/cordova-android/node_modules/balanced-match/index.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/node_modules/cordova-android/node_modules/balanced-match/package.json b/node_modules/cordova-android/node_modules/balanced-match/package.json deleted file mode 100644 index d7f8fab..0000000 --- a/node_modules/cordova-android/node_modules/balanced-match/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "balanced-match@^1.0.0", - "_id": "balanced-match@1.0.0", - "_inBundle": true, - "_integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "_location": "/cordova-android/balanced-match", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "balanced-match@^1.0.0", - "name": "balanced-match", - "escapedName": "balanced-match", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767", - "_spec": "balanced-match@^1.0.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/brace-expansion", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/balanced-match/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "license": "MIT", - "main": "index.js", - "name": "balanced-match", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "scripts": { - "bench": "make bench", - "test": "make test" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.0.0" -} diff --git a/node_modules/cordova-android/node_modules/base64-js/LICENSE b/node_modules/cordova-android/node_modules/base64-js/LICENSE deleted file mode 100644 index 96d3f68..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/base64-js/README.md b/node_modules/cordova-android/node_modules/base64-js/README.md deleted file mode 100644 index e546d86..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/README.md +++ /dev/null @@ -1,32 +0,0 @@ -base64-js -========= - -`base64-js` does basic base64 encoding/decoding in pure JS. - -[![build status](https://secure.travis-ci.org/beatgammit/base64-js.png)](http://travis-ci.org/beatgammit/base64-js) - -[![testling badge](https://ci.testling.com/beatgammit/base64-js.png)](https://ci.testling.com/beatgammit/base64-js) - -Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data. - -Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does. - -## install - -With [npm](https://npmjs.org) do: - -`npm install base64-js` - -## methods - -`var base64 = require('base64-js')` - -`base64` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument. - -* `byteLength` - Takes a base64 string and returns length of byte array -* `toByteArray` - Takes a base64 string and returns a byte array -* `fromByteArray` - Takes a byte array and returns a base64 string - -## license - -MIT diff --git a/node_modules/cordova-android/node_modules/base64-js/base64js.min.js b/node_modules/cordova-android/node_modules/base64-js/base64js.min.js deleted file mode 100644 index 22ad807..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/base64js.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(r){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=r()}else if(typeof define==="function"&&define.amd){define([],r)}else{var e;if(typeof window!=="undefined"){e=window}else if(typeof global!=="undefined"){e=global}else if(typeof self!=="undefined"){e=self}else{e=this}e.base64js=r()}})(function(){var r,e,t;return function r(e,t,n){function o(i,a){if(!t[i]){if(!e[i]){var u=typeof require=="function"&&require;if(!a&&u)return u(i,!0);if(f)return f(i,!0);var d=new Error("Cannot find module '"+i+"'");throw d.code="MODULE_NOT_FOUND",d}var c=t[i]={exports:{}};e[i][0].call(c.exports,function(r){var t=e[i][1][r];return o(t?t:r)},c,c.exports,r,e,t,n)}return t[i].exports}var f=typeof require=="function"&&require;for(var i=0;i0){throw new Error("Invalid string. Length must be a multiple of 4")}return r[e-2]==="="?2:r[e-1]==="="?1:0}function c(r){return r.length*3/4-d(r)}function v(r){var e,t,n,i,a,u;var c=r.length;a=d(r);u=new f(c*3/4-a);n=a>0?c-4:c;var v=0;for(e=0,t=0;e>16&255;u[v++]=i>>8&255;u[v++]=i&255}if(a===2){i=o[r.charCodeAt(e)]<<2|o[r.charCodeAt(e+1)]>>4;u[v++]=i&255}else if(a===1){i=o[r.charCodeAt(e)]<<10|o[r.charCodeAt(e+1)]<<4|o[r.charCodeAt(e+2)]>>2;u[v++]=i>>8&255;u[v++]=i&255}return u}function l(r){return n[r>>18&63]+n[r>>12&63]+n[r>>6&63]+n[r&63]}function h(r,e,t){var n;var o=[];for(var f=e;fd?d:u+a))}if(o===1){e=r[t-1];f+=n[e>>2];f+=n[e<<4&63];f+="=="}else if(o===2){e=(r[t-2]<<8)+r[t-1];f+=n[e>>10];f+=n[e>>4&63];f+=n[e<<2&63];f+="="}i.push(f);return i.join("")}},{}]},{},[])("/")}); diff --git a/node_modules/cordova-android/node_modules/base64-js/index.js b/node_modules/cordova-android/node_modules/base64-js/index.js deleted file mode 100644 index 8e806ac..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/index.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict' - -exports.byteLength = byteLength -exports.toByteArray = toByteArray -exports.fromByteArray = fromByteArray - -var lookup = [] -var revLookup = [] -var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array - -var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' -for (var i = 0, len = code.length; i < len; ++i) { - lookup[i] = code[i] - revLookup[code.charCodeAt(i)] = i -} - -revLookup['-'.charCodeAt(0)] = 62 -revLookup['_'.charCodeAt(0)] = 63 - -function placeHoldersCount (b64) { - var len = b64.length - if (len % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - return b64[len - 2] === '=' ? 2 : b64[len - 1] === '=' ? 1 : 0 -} - -function byteLength (b64) { - // base64 is 4/3 + up to two characters of the original data - return b64.length * 3 / 4 - placeHoldersCount(b64) -} - -function toByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - var len = b64.length - placeHolders = placeHoldersCount(b64) - - arr = new Arr(len * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? len - 4 : len - - var L = 0 - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] - arr[L++] = (tmp >> 16) & 0xFF - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - if (placeHolders === 2) { - tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) - arr[L++] = tmp & 0xFF - } else if (placeHolders === 1) { - tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) - arr[L++] = (tmp >> 8) & 0xFF - arr[L++] = tmp & 0xFF - } - - return arr -} - -function tripletToBase64 (num) { - return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] -} - -function encodeChunk (uint8, start, end) { - var tmp - var output = [] - for (var i = start; i < end; i += 3) { - tmp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output.push(tripletToBase64(tmp)) - } - return output.join('') -} - -function fromByteArray (uint8) { - var tmp - var len = uint8.length - var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes - var output = '' - var parts = [] - var maxChunkLength = 16383 // must be multiple of 3 - - // go through the array every three bytes, we'll deal with trailing stuff later - for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { - parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - if (extraBytes === 1) { - tmp = uint8[len - 1] - output += lookup[tmp >> 2] - output += lookup[(tmp << 4) & 0x3F] - output += '==' - } else if (extraBytes === 2) { - tmp = (uint8[len - 2] << 8) + (uint8[len - 1]) - output += lookup[tmp >> 10] - output += lookup[(tmp >> 4) & 0x3F] - output += lookup[(tmp << 2) & 0x3F] - output += '=' - } - - parts.push(output) - - return parts.join('') -} diff --git a/node_modules/cordova-android/node_modules/base64-js/package.json b/node_modules/cordova-android/node_modules/base64-js/package.json deleted file mode 100644 index ac0b810..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "base64-js@1.2.0", - "_id": "base64-js@1.2.0", - "_inBundle": true, - "_integrity": "sha1-o5mS1yNYSBGYK+XikLtqU9hnAPE=", - "_location": "/cordova-android/base64-js", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "base64-js@1.2.0", - "name": "base64-js", - "escapedName": "base64-js", - "rawSpec": "1.2.0", - "saveSpec": null, - "fetchSpec": "1.2.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/plist" - ], - "_resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.0.tgz", - "_shasum": "a39992d723584811982be5e290bb6a53d86700f1", - "_spec": "base64-js@1.2.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/plist", - "author": { - "name": "T. Jameson Little", - "email": "t.jameson.little@gmail.com" - }, - "bugs": { - "url": "https://github.com/beatgammit/base64-js/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Base64 encoding/decoding in pure JS", - "devDependencies": { - "benchmark": "^2.1.0", - "browserify": "^13.0.0", - "standard": "*", - "tape": "4.x", - "uglify-js": "^2.6.2" - }, - "files": [ - "test", - "index.js", - "base64js.min.js" - ], - "homepage": "https://github.com/beatgammit/base64-js", - "keywords": [ - "base64" - ], - "license": "MIT", - "main": "index.js", - "name": "base64-js", - "repository": { - "type": "git", - "url": "git://github.com/beatgammit/base64-js.git" - }, - "scripts": { - "build": "browserify -s base64js -r ./ | uglifyjs -m > base64js.min.js", - "lint": "standard", - "test": "npm run lint && npm run unit", - "unit": "tape test/*.js" - }, - "version": "1.2.0" -} diff --git a/node_modules/cordova-android/node_modules/base64-js/test/big-data.js b/node_modules/cordova-android/node_modules/base64-js/test/big-data.js deleted file mode 100644 index be16ebe..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/test/big-data.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tape') -var b64 = require('../') - -test('convert big data to base64', function (t) { - var b64str, arr, i, length - var big = new Uint8Array(64 * 1024 * 1024) - for (i = 0, length = big.length; i < length; ++i) { - big[i] = i % 256 - } - b64str = b64.fromByteArray(big) - arr = b64.toByteArray(b64str) - t.ok(equal(arr, big)) - t.end() -}) - -function equal (a, b) { - var i - var length = a.length - if (length !== b.length) return false - for (i = 0; i < length; ++i) { - if (a[i] !== b[i]) return false - } - return true -} diff --git a/node_modules/cordova-android/node_modules/base64-js/test/convert.js b/node_modules/cordova-android/node_modules/base64-js/test/convert.js deleted file mode 100644 index d68e105..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/test/convert.js +++ /dev/null @@ -1,48 +0,0 @@ -var test = require('tape') -var b64 = require('../') -var checks = [ - 'a', - 'aa', - 'aaa', - 'hi', - 'hi!', - 'hi!!', - 'sup', - 'sup?', - 'sup?!' -] - -test('convert to base64 and back', function (t) { - t.plan(checks.length * 2) - - for (var i = 0; i < checks.length; i++) { - var check = checks[i] - var b64Str, arr, str - - b64Str = b64.fromByteArray(map(check, function (char) { return char.charCodeAt(0) })) - - arr = b64.toByteArray(b64Str) - str = map(arr, function (byte) { return String.fromCharCode(byte) }).join('') - - t.equal(check, str, 'Checked ' + check) - t.equal(b64.byteLength(b64Str), arr.length, 'Checked length for ' + check) - } -}) - -function map (arr, callback) { - var res = [] - var kValue, mappedValue - - for (var k = 0, len = arr.length; k < len; k++) { - if ((typeof arr === 'string' && !!arr.charAt(k))) { - kValue = arr.charAt(k) - mappedValue = callback(kValue, k, arr) - res[k] = mappedValue - } else if (typeof arr !== 'string' && k in arr) { - kValue = arr[k] - mappedValue = callback(kValue, k, arr) - res[k] = mappedValue - } - } - return res -} diff --git a/node_modules/cordova-android/node_modules/base64-js/test/url-safe.js b/node_modules/cordova-android/node_modules/base64-js/test/url-safe.js deleted file mode 100644 index 3203b33..0000000 --- a/node_modules/cordova-android/node_modules/base64-js/test/url-safe.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tape') -var b64 = require('../') - -test('decode url-safe style base64 strings', function (t) { - var expected = [0xff, 0xff, 0xbe, 0xff, 0xef, 0xbf, 0xfb, 0xef, 0xff] - - var actual = b64.toByteArray('//++/++/++//') - for (var i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - actual = b64.toByteArray('__--_--_--__') - for (i = 0; i < actual.length; i++) { - t.equal(actual[i], expected[i]) - } - - t.end() -}) diff --git a/node_modules/cordova-android/node_modules/big-integer/BigInteger.d.ts b/node_modules/cordova-android/node_modules/big-integer/BigInteger.d.ts deleted file mode 100644 index a367aa1..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/BigInteger.d.ts +++ /dev/null @@ -1,2385 +0,0 @@ -/** - * Type definitions for BigInteger.js - * Definitions by: Tommy Frazier - */ -export = bigInt; -export as namespace bigInt; - -declare var bigInt: bigInt.BigIntegerStatic; - -declare namespace bigInt { - type BigNumber = number | string | BigInteger; - - interface BigIntegerStatic { - /** - * Equivalent to bigInt(0). - */ - (): BigInteger; - - /** - * Parse a Javascript number into a bigInt. - */ - (number: number): BigInteger; - - /** - * Parse a string into a bigInt. - */ - (string: string, base?: BigNumber): BigInteger; - - /** - * no-op. - */ - (bigInt: BigInteger): BigInteger; - - /** - * Constructs a bigInt from an array of digits in specified base. - * The optional isNegative flag will make the number negative. - */ - fromArray: (digits: BigNumber[], base?: BigNumber, isNegative?: boolean) => BigInteger; - - /** - * Finds the greatest common denominator of a and b. - */ - gcd: (a: BigNumber, b: BigNumber) => BigInteger; - - - /** - * Returns true if x is a BigInteger, false otherwise. - */ - isInstance: (x: any) => boolean; - - /** - * Finds the least common multiple of a and b. - */ - lcm: (a: BigNumber, b: BigNumber) => BigInteger; - - /** - * Returns the largest of a and b. - */ - max: (a: BigNumber, b: BigNumber) => BigInteger; - - /** - * Returns the smallest of a and b. - */ - min: (a: BigNumber, b: BigNumber) => BigInteger; - - /** - * Equivalent to bigInt(-1). - */ - minusOne: BigInteger; - - /** - * Equivalent to bigInt(1). - */ - one: BigInteger; - - /** - * Returns a random number between min and max. - */ - randBetween: (min: BigNumber, max: BigNumber) => BigInteger; - - /** - * Equivalent to bigInt(0). - */ - zero: BigInteger; - } - - interface BigInteger { - /** - * Returns the absolute value of a bigInt. - */ - abs(): BigInteger; - - /** - * Performs addition. - */ - add(number: BigNumber): BigInteger; - - /** - * Performs the bitwise AND operation. - */ - and(number: BigNumber): BigInteger; - - /** - * Returns the number of digits required to represent a bigInt in binary. - */ - bitLength(): BigInteger; - - /** - * Performs a comparison between two numbers. If the numbers are equal, it returns 0. - * If the first number is greater, it returns 1. If the first number is lesser, it returns -1. - */ - compare(number: BigNumber): number; - - /** - * Performs a comparison between the absolute value of two numbers. - */ - compareAbs(number: BigNumber): number; - - /** - * Alias for the compare method. - */ - compareTo(number: BigNumber): number; - - /** - * Performs integer division, disregarding the remainder. - */ - divide(number: BigNumber): BigInteger; - - /** - * Performs division and returns an object with two properties: quotient and remainder. - * The sign of the remainder will match the sign of the dividend. - */ - divmod(number: BigNumber): {quotient: BigInteger, remainder: BigInteger}; - - /** - * Alias for the equals method. - */ - eq(number: BigNumber): boolean; - - /** - * Checks if two numbers are equal. - */ - equals(number: BigNumber): boolean; - - /** - * Alias for the greaterOrEquals method. - */ - geq(number: BigNumber): boolean; - - /** - * Checks if the first number is greater than the second. - */ - greater(number: BigNumber): boolean; - - /** - * Checks if the first number is greater than or equal to the second. - */ - greaterOrEquals(number: BigNumber): boolean; - - /** - * Alias for the greater method. - */ - gt(number: BigNumber): boolean; - - /** - * Returns true if the first number is divisible by the second number, false otherwise. - */ - isDivisibleBy(number: BigNumber): boolean; - - /** - * Returns true if the number is even, false otherwise. - */ - isEven(): boolean; - - /** - * Returns true if the number is negative, false otherwise. - * Returns false for 0 and true for -0. - */ - isNegative(): boolean; - - /** - * Returns true if the number is odd, false otherwise. - */ - isOdd(): boolean; - - /** - * Return true if the number is positive, false otherwise. - * Returns true for 0 and false for -0. - */ - isPositive(): boolean; - - /** - * Returns true if the number is prime, false otherwise. - */ - isPrime(): boolean; - - /** - * Returns true if the number is very likely to be prime, false otherwise. - */ - isProbablePrime(iterations?: number): boolean; - - /** - * Returns true if the number is 1 or -1, false otherwise. - */ - isUnit(): boolean; - - /** - * Return true if the number is 0 or -0, false otherwise. - */ - isZero(): boolean; - - /** - * Alias for the lesserOrEquals method. - */ - leq(number: BigNumber): boolean; - - /** - * Checks if the first number is lesser than the second. - */ - lesser(number: BigNumber): boolean; - - /** - * Checks if the first number is less than or equal to the second. - */ - lesserOrEquals(number: BigNumber): boolean; - - /** - * Alias for the lesser method. - */ - lt(number: BigNumber): boolean; - - /** - * Alias for the subtract method. - */ - minus(number: BigNumber): BigInteger; - - /** - * Performs division and returns the remainder, disregarding the quotient. - * The sign of the remainder will match the sign of the dividend. - */ - mod(number: BigNumber): BigInteger; - - /** - * Finds the multiplicative inverse of the number modulo mod. - */ - modInv(number: BigNumber): BigInteger; - - /** - * Takes the number to the power exp modulo mod. - */ - modPow(exp: BigNumber, mod: BigNumber): BigInteger; - - /** - * Performs multiplication. - */ - multiply(number: BigNumber): BigInteger; - - /** - * Reverses the sign of the number. - */ - negate(): BigInteger; - - /** - * Alias for the notEquals method. - */ - neq(number: BigNumber): boolean; - - /** - * Adds one to the number. - */ - next(): BigInteger; - - /** - * Performs the bitwise NOT operation. - */ - not(): BigInteger; - - /** - * Checks if two numbers are not equal. - */ - notEquals(number: BigNumber): boolean; - - /** - * Performs the bitwise OR operation. - */ - or(number: BigNumber): BigInteger; - - /** - * Alias for the divide method. - */ - over(number: BigNumber): BigInteger; - - /** - * Alias for the add method. - */ - plus(number: BigNumber): BigInteger; - - /** - * Performs exponentiation. If the exponent is less than 0, pow returns 0. - * bigInt.zero.pow(0) returns 1. - */ - pow(number: BigNumber): BigInteger; - - /** - * Subtracts one from the number. - */ - prev(): BigInteger; - - /** - * Alias for the mod method. - */ - remainder(number: BigNumber): BigInteger; - - /** - * Shifts the number left by n places in its binary representation. - * If a negative number is provided, it will shift right. - * - * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. - */ - shiftLeft(number: BigNumber): BigInteger; - - /** - * Shifts the number right by n places in its binary representation. - * If a negative number is provided, it will shift left. - * - * Throws an error if number is outside of the range [-9007199254740992, 9007199254740992]. - */ - shiftRight(number: BigNumber): BigInteger; - - /** - * Squares the number. - */ - square(): BigInteger; - - /** - * Performs subtraction. - */ - subtract(number: BigNumber): BigInteger; - - /** - * Alias for the multiply method. - */ - times(number: BigNumber): BigInteger; - - /** - * - * Converts a bigInt to an object representing it as an array of integers module the given radix. - */ - toArray(radix: number): BaseArray; - - /** - * Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range. - */ - toJSNumber(): number; - - /** - * Converts a bigInt to a string. - */ - toString(radix?: number): string; - - /** - * Converts a bigInt to a string. This method is called behind the scenes in JSON.stringify. - */ - toJSON(): string; - - /** - * Converts a bigInt to a native Javascript number. This override allows you to use native - * arithmetic operators without explicit conversion. - */ - valueOf(): number; - - /** - * Performs the bitwise XOR operation. - */ - xor(number: BigNumber): BigInteger; - } - - // Array constant accessors - interface BigIntegerStatic { - '-999': BigInteger; - '-998': BigInteger; - '-997': BigInteger; - '-996': BigInteger; - '-995': BigInteger; - '-994': BigInteger; - '-993': BigInteger; - '-992': BigInteger; - '-991': BigInteger; - '-990': BigInteger; - '-989': BigInteger; - '-988': BigInteger; - '-987': BigInteger; - '-986': BigInteger; - '-985': BigInteger; - '-984': BigInteger; - '-983': BigInteger; - '-982': BigInteger; - '-981': BigInteger; - '-980': BigInteger; - '-979': BigInteger; - '-978': BigInteger; - '-977': BigInteger; - '-976': BigInteger; - '-975': BigInteger; - '-974': BigInteger; - '-973': BigInteger; - '-972': BigInteger; - '-971': BigInteger; - '-970': BigInteger; - '-969': BigInteger; - '-968': BigInteger; - '-967': BigInteger; - '-966': BigInteger; - '-965': BigInteger; - '-964': BigInteger; - '-963': BigInteger; - '-962': BigInteger; - '-961': BigInteger; - '-960': BigInteger; - '-959': BigInteger; - '-958': BigInteger; - '-957': BigInteger; - '-956': BigInteger; - '-955': BigInteger; - '-954': BigInteger; - '-953': BigInteger; - '-952': BigInteger; - '-951': BigInteger; - '-950': BigInteger; - '-949': BigInteger; - '-948': BigInteger; - '-947': BigInteger; - '-946': BigInteger; - '-945': BigInteger; - '-944': BigInteger; - '-943': BigInteger; - '-942': BigInteger; - '-941': BigInteger; - '-940': BigInteger; - '-939': BigInteger; - '-938': BigInteger; - '-937': BigInteger; - '-936': BigInteger; - '-935': BigInteger; - '-934': BigInteger; - '-933': BigInteger; - '-932': BigInteger; - '-931': BigInteger; - '-930': BigInteger; - '-929': BigInteger; - '-928': BigInteger; - '-927': BigInteger; - '-926': BigInteger; - '-925': BigInteger; - '-924': BigInteger; - '-923': BigInteger; - '-922': BigInteger; - '-921': BigInteger; - '-920': BigInteger; - '-919': BigInteger; - '-918': BigInteger; - '-917': BigInteger; - '-916': BigInteger; - '-915': BigInteger; - '-914': BigInteger; - '-913': BigInteger; - '-912': BigInteger; - '-911': BigInteger; - '-910': BigInteger; - '-909': BigInteger; - '-908': BigInteger; - '-907': BigInteger; - '-906': BigInteger; - '-905': BigInteger; - '-904': BigInteger; - '-903': BigInteger; - '-902': BigInteger; - '-901': BigInteger; - '-900': BigInteger; - '-899': BigInteger; - '-898': BigInteger; - '-897': BigInteger; - '-896': BigInteger; - '-895': BigInteger; - '-894': BigInteger; - '-893': BigInteger; - '-892': BigInteger; - '-891': BigInteger; - '-890': BigInteger; - '-889': BigInteger; - '-888': BigInteger; - '-887': BigInteger; - '-886': BigInteger; - '-885': BigInteger; - '-884': BigInteger; - '-883': BigInteger; - '-882': BigInteger; - '-881': BigInteger; - '-880': BigInteger; - '-879': BigInteger; - '-878': BigInteger; - '-877': BigInteger; - '-876': BigInteger; - '-875': BigInteger; - '-874': BigInteger; - '-873': BigInteger; - '-872': BigInteger; - '-871': BigInteger; - '-870': BigInteger; - '-869': BigInteger; - '-868': BigInteger; - '-867': BigInteger; - '-866': BigInteger; - '-865': BigInteger; - '-864': BigInteger; - '-863': BigInteger; - '-862': BigInteger; - '-861': BigInteger; - '-860': BigInteger; - '-859': BigInteger; - '-858': BigInteger; - '-857': BigInteger; - '-856': BigInteger; - '-855': BigInteger; - '-854': BigInteger; - '-853': BigInteger; - '-852': BigInteger; - '-851': BigInteger; - '-850': BigInteger; - '-849': BigInteger; - '-848': BigInteger; - '-847': BigInteger; - '-846': BigInteger; - '-845': BigInteger; - '-844': BigInteger; - '-843': BigInteger; - '-842': BigInteger; - '-841': BigInteger; - '-840': BigInteger; - '-839': BigInteger; - '-838': BigInteger; - '-837': BigInteger; - '-836': BigInteger; - '-835': BigInteger; - '-834': BigInteger; - '-833': BigInteger; - '-832': BigInteger; - '-831': BigInteger; - '-830': BigInteger; - '-829': BigInteger; - '-828': BigInteger; - '-827': BigInteger; - '-826': BigInteger; - '-825': BigInteger; - '-824': BigInteger; - '-823': BigInteger; - '-822': BigInteger; - '-821': BigInteger; - '-820': BigInteger; - '-819': BigInteger; - '-818': BigInteger; - '-817': BigInteger; - '-816': BigInteger; - '-815': BigInteger; - '-814': BigInteger; - '-813': BigInteger; - '-812': BigInteger; - '-811': BigInteger; - '-810': BigInteger; - '-809': BigInteger; - '-808': BigInteger; - '-807': BigInteger; - '-806': BigInteger; - '-805': BigInteger; - '-804': BigInteger; - '-803': BigInteger; - '-802': BigInteger; - '-801': BigInteger; - '-800': BigInteger; - '-799': BigInteger; - '-798': BigInteger; - '-797': BigInteger; - '-796': BigInteger; - '-795': BigInteger; - '-794': BigInteger; - '-793': BigInteger; - '-792': BigInteger; - '-791': BigInteger; - '-790': BigInteger; - '-789': BigInteger; - '-788': BigInteger; - '-787': BigInteger; - '-786': BigInteger; - '-785': BigInteger; - '-784': BigInteger; - '-783': BigInteger; - '-782': BigInteger; - '-781': BigInteger; - '-780': BigInteger; - '-779': BigInteger; - '-778': BigInteger; - '-777': BigInteger; - '-776': BigInteger; - '-775': BigInteger; - '-774': BigInteger; - '-773': BigInteger; - '-772': BigInteger; - '-771': BigInteger; - '-770': BigInteger; - '-769': BigInteger; - '-768': BigInteger; - '-767': BigInteger; - '-766': BigInteger; - '-765': BigInteger; - '-764': BigInteger; - '-763': BigInteger; - '-762': BigInteger; - '-761': BigInteger; - '-760': BigInteger; - '-759': BigInteger; - '-758': BigInteger; - '-757': BigInteger; - '-756': BigInteger; - '-755': BigInteger; - '-754': BigInteger; - '-753': BigInteger; - '-752': BigInteger; - '-751': BigInteger; - '-750': BigInteger; - '-749': BigInteger; - '-748': BigInteger; - '-747': BigInteger; - '-746': BigInteger; - '-745': BigInteger; - '-744': BigInteger; - '-743': BigInteger; - '-742': BigInteger; - '-741': BigInteger; - '-740': BigInteger; - '-739': BigInteger; - '-738': BigInteger; - '-737': BigInteger; - '-736': BigInteger; - '-735': BigInteger; - '-734': BigInteger; - '-733': BigInteger; - '-732': BigInteger; - '-731': BigInteger; - '-730': BigInteger; - '-729': BigInteger; - '-728': BigInteger; - '-727': BigInteger; - '-726': BigInteger; - '-725': BigInteger; - '-724': BigInteger; - '-723': BigInteger; - '-722': BigInteger; - '-721': BigInteger; - '-720': BigInteger; - '-719': BigInteger; - '-718': BigInteger; - '-717': BigInteger; - '-716': BigInteger; - '-715': BigInteger; - '-714': BigInteger; - '-713': BigInteger; - '-712': BigInteger; - '-711': BigInteger; - '-710': BigInteger; - '-709': BigInteger; - '-708': BigInteger; - '-707': BigInteger; - '-706': BigInteger; - '-705': BigInteger; - '-704': BigInteger; - '-703': BigInteger; - '-702': BigInteger; - '-701': BigInteger; - '-700': BigInteger; - '-699': BigInteger; - '-698': BigInteger; - '-697': BigInteger; - '-696': BigInteger; - '-695': BigInteger; - '-694': BigInteger; - '-693': BigInteger; - '-692': BigInteger; - '-691': BigInteger; - '-690': BigInteger; - '-689': BigInteger; - '-688': BigInteger; - '-687': BigInteger; - '-686': BigInteger; - '-685': BigInteger; - '-684': BigInteger; - '-683': BigInteger; - '-682': BigInteger; - '-681': BigInteger; - '-680': BigInteger; - '-679': BigInteger; - '-678': BigInteger; - '-677': BigInteger; - '-676': BigInteger; - '-675': BigInteger; - '-674': BigInteger; - '-673': BigInteger; - '-672': BigInteger; - '-671': BigInteger; - '-670': BigInteger; - '-669': BigInteger; - '-668': BigInteger; - '-667': BigInteger; - '-666': BigInteger; - '-665': BigInteger; - '-664': BigInteger; - '-663': BigInteger; - '-662': BigInteger; - '-661': BigInteger; - '-660': BigInteger; - '-659': BigInteger; - '-658': BigInteger; - '-657': BigInteger; - '-656': BigInteger; - '-655': BigInteger; - '-654': BigInteger; - '-653': BigInteger; - '-652': BigInteger; - '-651': BigInteger; - '-650': BigInteger; - '-649': BigInteger; - '-648': BigInteger; - '-647': BigInteger; - '-646': BigInteger; - '-645': BigInteger; - '-644': BigInteger; - '-643': BigInteger; - '-642': BigInteger; - '-641': BigInteger; - '-640': BigInteger; - '-639': BigInteger; - '-638': BigInteger; - '-637': BigInteger; - '-636': BigInteger; - '-635': BigInteger; - '-634': BigInteger; - '-633': BigInteger; - '-632': BigInteger; - '-631': BigInteger; - '-630': BigInteger; - '-629': BigInteger; - '-628': BigInteger; - '-627': BigInteger; - '-626': BigInteger; - '-625': BigInteger; - '-624': BigInteger; - '-623': BigInteger; - '-622': BigInteger; - '-621': BigInteger; - '-620': BigInteger; - '-619': BigInteger; - '-618': BigInteger; - '-617': BigInteger; - '-616': BigInteger; - '-615': BigInteger; - '-614': BigInteger; - '-613': BigInteger; - '-612': BigInteger; - '-611': BigInteger; - '-610': BigInteger; - '-609': BigInteger; - '-608': BigInteger; - '-607': BigInteger; - '-606': BigInteger; - '-605': BigInteger; - '-604': BigInteger; - '-603': BigInteger; - '-602': BigInteger; - '-601': BigInteger; - '-600': BigInteger; - '-599': BigInteger; - '-598': BigInteger; - '-597': BigInteger; - '-596': BigInteger; - '-595': BigInteger; - '-594': BigInteger; - '-593': BigInteger; - '-592': BigInteger; - '-591': BigInteger; - '-590': BigInteger; - '-589': BigInteger; - '-588': BigInteger; - '-587': BigInteger; - '-586': BigInteger; - '-585': BigInteger; - '-584': BigInteger; - '-583': BigInteger; - '-582': BigInteger; - '-581': BigInteger; - '-580': BigInteger; - '-579': BigInteger; - '-578': BigInteger; - '-577': BigInteger; - '-576': BigInteger; - '-575': BigInteger; - '-574': BigInteger; - '-573': BigInteger; - '-572': BigInteger; - '-571': BigInteger; - '-570': BigInteger; - '-569': BigInteger; - '-568': BigInteger; - '-567': BigInteger; - '-566': BigInteger; - '-565': BigInteger; - '-564': BigInteger; - '-563': BigInteger; - '-562': BigInteger; - '-561': BigInteger; - '-560': BigInteger; - '-559': BigInteger; - '-558': BigInteger; - '-557': BigInteger; - '-556': BigInteger; - '-555': BigInteger; - '-554': BigInteger; - '-553': BigInteger; - '-552': BigInteger; - '-551': BigInteger; - '-550': BigInteger; - '-549': BigInteger; - '-548': BigInteger; - '-547': BigInteger; - '-546': BigInteger; - '-545': BigInteger; - '-544': BigInteger; - '-543': BigInteger; - '-542': BigInteger; - '-541': BigInteger; - '-540': BigInteger; - '-539': BigInteger; - '-538': BigInteger; - '-537': BigInteger; - '-536': BigInteger; - '-535': BigInteger; - '-534': BigInteger; - '-533': BigInteger; - '-532': BigInteger; - '-531': BigInteger; - '-530': BigInteger; - '-529': BigInteger; - '-528': BigInteger; - '-527': BigInteger; - '-526': BigInteger; - '-525': BigInteger; - '-524': BigInteger; - '-523': BigInteger; - '-522': BigInteger; - '-521': BigInteger; - '-520': BigInteger; - '-519': BigInteger; - '-518': BigInteger; - '-517': BigInteger; - '-516': BigInteger; - '-515': BigInteger; - '-514': BigInteger; - '-513': BigInteger; - '-512': BigInteger; - '-511': BigInteger; - '-510': BigInteger; - '-509': BigInteger; - '-508': BigInteger; - '-507': BigInteger; - '-506': BigInteger; - '-505': BigInteger; - '-504': BigInteger; - '-503': BigInteger; - '-502': BigInteger; - '-501': BigInteger; - '-500': BigInteger; - '-499': BigInteger; - '-498': BigInteger; - '-497': BigInteger; - '-496': BigInteger; - '-495': BigInteger; - '-494': BigInteger; - '-493': BigInteger; - '-492': BigInteger; - '-491': BigInteger; - '-490': BigInteger; - '-489': BigInteger; - '-488': BigInteger; - '-487': BigInteger; - '-486': BigInteger; - '-485': BigInteger; - '-484': BigInteger; - '-483': BigInteger; - '-482': BigInteger; - '-481': BigInteger; - '-480': BigInteger; - '-479': BigInteger; - '-478': BigInteger; - '-477': BigInteger; - '-476': BigInteger; - '-475': BigInteger; - '-474': BigInteger; - '-473': BigInteger; - '-472': BigInteger; - '-471': BigInteger; - '-470': BigInteger; - '-469': BigInteger; - '-468': BigInteger; - '-467': BigInteger; - '-466': BigInteger; - '-465': BigInteger; - '-464': BigInteger; - '-463': BigInteger; - '-462': BigInteger; - '-461': BigInteger; - '-460': BigInteger; - '-459': BigInteger; - '-458': BigInteger; - '-457': BigInteger; - '-456': BigInteger; - '-455': BigInteger; - '-454': BigInteger; - '-453': BigInteger; - '-452': BigInteger; - '-451': BigInteger; - '-450': BigInteger; - '-449': BigInteger; - '-448': BigInteger; - '-447': BigInteger; - '-446': BigInteger; - '-445': BigInteger; - '-444': BigInteger; - '-443': BigInteger; - '-442': BigInteger; - '-441': BigInteger; - '-440': BigInteger; - '-439': BigInteger; - '-438': BigInteger; - '-437': BigInteger; - '-436': BigInteger; - '-435': BigInteger; - '-434': BigInteger; - '-433': BigInteger; - '-432': BigInteger; - '-431': BigInteger; - '-430': BigInteger; - '-429': BigInteger; - '-428': BigInteger; - '-427': BigInteger; - '-426': BigInteger; - '-425': BigInteger; - '-424': BigInteger; - '-423': BigInteger; - '-422': BigInteger; - '-421': BigInteger; - '-420': BigInteger; - '-419': BigInteger; - '-418': BigInteger; - '-417': BigInteger; - '-416': BigInteger; - '-415': BigInteger; - '-414': BigInteger; - '-413': BigInteger; - '-412': BigInteger; - '-411': BigInteger; - '-410': BigInteger; - '-409': BigInteger; - '-408': BigInteger; - '-407': BigInteger; - '-406': BigInteger; - '-405': BigInteger; - '-404': BigInteger; - '-403': BigInteger; - '-402': BigInteger; - '-401': BigInteger; - '-400': BigInteger; - '-399': BigInteger; - '-398': BigInteger; - '-397': BigInteger; - '-396': BigInteger; - '-395': BigInteger; - '-394': BigInteger; - '-393': BigInteger; - '-392': BigInteger; - '-391': BigInteger; - '-390': BigInteger; - '-389': BigInteger; - '-388': BigInteger; - '-387': BigInteger; - '-386': BigInteger; - '-385': BigInteger; - '-384': BigInteger; - '-383': BigInteger; - '-382': BigInteger; - '-381': BigInteger; - '-380': BigInteger; - '-379': BigInteger; - '-378': BigInteger; - '-377': BigInteger; - '-376': BigInteger; - '-375': BigInteger; - '-374': BigInteger; - '-373': BigInteger; - '-372': BigInteger; - '-371': BigInteger; - '-370': BigInteger; - '-369': BigInteger; - '-368': BigInteger; - '-367': BigInteger; - '-366': BigInteger; - '-365': BigInteger; - '-364': BigInteger; - '-363': BigInteger; - '-362': BigInteger; - '-361': BigInteger; - '-360': BigInteger; - '-359': BigInteger; - '-358': BigInteger; - '-357': BigInteger; - '-356': BigInteger; - '-355': BigInteger; - '-354': BigInteger; - '-353': BigInteger; - '-352': BigInteger; - '-351': BigInteger; - '-350': BigInteger; - '-349': BigInteger; - '-348': BigInteger; - '-347': BigInteger; - '-346': BigInteger; - '-345': BigInteger; - '-344': BigInteger; - '-343': BigInteger; - '-342': BigInteger; - '-341': BigInteger; - '-340': BigInteger; - '-339': BigInteger; - '-338': BigInteger; - '-337': BigInteger; - '-336': BigInteger; - '-335': BigInteger; - '-334': BigInteger; - '-333': BigInteger; - '-332': BigInteger; - '-331': BigInteger; - '-330': BigInteger; - '-329': BigInteger; - '-328': BigInteger; - '-327': BigInteger; - '-326': BigInteger; - '-325': BigInteger; - '-324': BigInteger; - '-323': BigInteger; - '-322': BigInteger; - '-321': BigInteger; - '-320': BigInteger; - '-319': BigInteger; - '-318': BigInteger; - '-317': BigInteger; - '-316': BigInteger; - '-315': BigInteger; - '-314': BigInteger; - '-313': BigInteger; - '-312': BigInteger; - '-311': BigInteger; - '-310': BigInteger; - '-309': BigInteger; - '-308': BigInteger; - '-307': BigInteger; - '-306': BigInteger; - '-305': BigInteger; - '-304': BigInteger; - '-303': BigInteger; - '-302': BigInteger; - '-301': BigInteger; - '-300': BigInteger; - '-299': BigInteger; - '-298': BigInteger; - '-297': BigInteger; - '-296': BigInteger; - '-295': BigInteger; - '-294': BigInteger; - '-293': BigInteger; - '-292': BigInteger; - '-291': BigInteger; - '-290': BigInteger; - '-289': BigInteger; - '-288': BigInteger; - '-287': BigInteger; - '-286': BigInteger; - '-285': BigInteger; - '-284': BigInteger; - '-283': BigInteger; - '-282': BigInteger; - '-281': BigInteger; - '-280': BigInteger; - '-279': BigInteger; - '-278': BigInteger; - '-277': BigInteger; - '-276': BigInteger; - '-275': BigInteger; - '-274': BigInteger; - '-273': BigInteger; - '-272': BigInteger; - '-271': BigInteger; - '-270': BigInteger; - '-269': BigInteger; - '-268': BigInteger; - '-267': BigInteger; - '-266': BigInteger; - '-265': BigInteger; - '-264': BigInteger; - '-263': BigInteger; - '-262': BigInteger; - '-261': BigInteger; - '-260': BigInteger; - '-259': BigInteger; - '-258': BigInteger; - '-257': BigInteger; - '-256': BigInteger; - '-255': BigInteger; - '-254': BigInteger; - '-253': BigInteger; - '-252': BigInteger; - '-251': BigInteger; - '-250': BigInteger; - '-249': BigInteger; - '-248': BigInteger; - '-247': BigInteger; - '-246': BigInteger; - '-245': BigInteger; - '-244': BigInteger; - '-243': BigInteger; - '-242': BigInteger; - '-241': BigInteger; - '-240': BigInteger; - '-239': BigInteger; - '-238': BigInteger; - '-237': BigInteger; - '-236': BigInteger; - '-235': BigInteger; - '-234': BigInteger; - '-233': BigInteger; - '-232': BigInteger; - '-231': BigInteger; - '-230': BigInteger; - '-229': BigInteger; - '-228': BigInteger; - '-227': BigInteger; - '-226': BigInteger; - '-225': BigInteger; - '-224': BigInteger; - '-223': BigInteger; - '-222': BigInteger; - '-221': BigInteger; - '-220': BigInteger; - '-219': BigInteger; - '-218': BigInteger; - '-217': BigInteger; - '-216': BigInteger; - '-215': BigInteger; - '-214': BigInteger; - '-213': BigInteger; - '-212': BigInteger; - '-211': BigInteger; - '-210': BigInteger; - '-209': BigInteger; - '-208': BigInteger; - '-207': BigInteger; - '-206': BigInteger; - '-205': BigInteger; - '-204': BigInteger; - '-203': BigInteger; - '-202': BigInteger; - '-201': BigInteger; - '-200': BigInteger; - '-199': BigInteger; - '-198': BigInteger; - '-197': BigInteger; - '-196': BigInteger; - '-195': BigInteger; - '-194': BigInteger; - '-193': BigInteger; - '-192': BigInteger; - '-191': BigInteger; - '-190': BigInteger; - '-189': BigInteger; - '-188': BigInteger; - '-187': BigInteger; - '-186': BigInteger; - '-185': BigInteger; - '-184': BigInteger; - '-183': BigInteger; - '-182': BigInteger; - '-181': BigInteger; - '-180': BigInteger; - '-179': BigInteger; - '-178': BigInteger; - '-177': BigInteger; - '-176': BigInteger; - '-175': BigInteger; - '-174': BigInteger; - '-173': BigInteger; - '-172': BigInteger; - '-171': BigInteger; - '-170': BigInteger; - '-169': BigInteger; - '-168': BigInteger; - '-167': BigInteger; - '-166': BigInteger; - '-165': BigInteger; - '-164': BigInteger; - '-163': BigInteger; - '-162': BigInteger; - '-161': BigInteger; - '-160': BigInteger; - '-159': BigInteger; - '-158': BigInteger; - '-157': BigInteger; - '-156': BigInteger; - '-155': BigInteger; - '-154': BigInteger; - '-153': BigInteger; - '-152': BigInteger; - '-151': BigInteger; - '-150': BigInteger; - '-149': BigInteger; - '-148': BigInteger; - '-147': BigInteger; - '-146': BigInteger; - '-145': BigInteger; - '-144': BigInteger; - '-143': BigInteger; - '-142': BigInteger; - '-141': BigInteger; - '-140': BigInteger; - '-139': BigInteger; - '-138': BigInteger; - '-137': BigInteger; - '-136': BigInteger; - '-135': BigInteger; - '-134': BigInteger; - '-133': BigInteger; - '-132': BigInteger; - '-131': BigInteger; - '-130': BigInteger; - '-129': BigInteger; - '-128': BigInteger; - '-127': BigInteger; - '-126': BigInteger; - '-125': BigInteger; - '-124': BigInteger; - '-123': BigInteger; - '-122': BigInteger; - '-121': BigInteger; - '-120': BigInteger; - '-119': BigInteger; - '-118': BigInteger; - '-117': BigInteger; - '-116': BigInteger; - '-115': BigInteger; - '-114': BigInteger; - '-113': BigInteger; - '-112': BigInteger; - '-111': BigInteger; - '-110': BigInteger; - '-109': BigInteger; - '-108': BigInteger; - '-107': BigInteger; - '-106': BigInteger; - '-105': BigInteger; - '-104': BigInteger; - '-103': BigInteger; - '-102': BigInteger; - '-101': BigInteger; - '-100': BigInteger; - '-99': BigInteger; - '-98': BigInteger; - '-97': BigInteger; - '-96': BigInteger; - '-95': BigInteger; - '-94': BigInteger; - '-93': BigInteger; - '-92': BigInteger; - '-91': BigInteger; - '-90': BigInteger; - '-89': BigInteger; - '-88': BigInteger; - '-87': BigInteger; - '-86': BigInteger; - '-85': BigInteger; - '-84': BigInteger; - '-83': BigInteger; - '-82': BigInteger; - '-81': BigInteger; - '-80': BigInteger; - '-79': BigInteger; - '-78': BigInteger; - '-77': BigInteger; - '-76': BigInteger; - '-75': BigInteger; - '-74': BigInteger; - '-73': BigInteger; - '-72': BigInteger; - '-71': BigInteger; - '-70': BigInteger; - '-69': BigInteger; - '-68': BigInteger; - '-67': BigInteger; - '-66': BigInteger; - '-65': BigInteger; - '-64': BigInteger; - '-63': BigInteger; - '-62': BigInteger; - '-61': BigInteger; - '-60': BigInteger; - '-59': BigInteger; - '-58': BigInteger; - '-57': BigInteger; - '-56': BigInteger; - '-55': BigInteger; - '-54': BigInteger; - '-53': BigInteger; - '-52': BigInteger; - '-51': BigInteger; - '-50': BigInteger; - '-49': BigInteger; - '-48': BigInteger; - '-47': BigInteger; - '-46': BigInteger; - '-45': BigInteger; - '-44': BigInteger; - '-43': BigInteger; - '-42': BigInteger; - '-41': BigInteger; - '-40': BigInteger; - '-39': BigInteger; - '-38': BigInteger; - '-37': BigInteger; - '-36': BigInteger; - '-35': BigInteger; - '-34': BigInteger; - '-33': BigInteger; - '-32': BigInteger; - '-31': BigInteger; - '-30': BigInteger; - '-29': BigInteger; - '-28': BigInteger; - '-27': BigInteger; - '-26': BigInteger; - '-25': BigInteger; - '-24': BigInteger; - '-23': BigInteger; - '-22': BigInteger; - '-21': BigInteger; - '-20': BigInteger; - '-19': BigInteger; - '-18': BigInteger; - '-17': BigInteger; - '-16': BigInteger; - '-15': BigInteger; - '-14': BigInteger; - '-13': BigInteger; - '-12': BigInteger; - '-11': BigInteger; - '-10': BigInteger; - '-9': BigInteger; - '-8': BigInteger; - '-7': BigInteger; - '-6': BigInteger; - '-5': BigInteger; - '-4': BigInteger; - '-3': BigInteger; - '-2': BigInteger; - '-1': BigInteger; - '0': BigInteger; - '1': BigInteger; - '2': BigInteger; - '3': BigInteger; - '4': BigInteger; - '5': BigInteger; - '6': BigInteger; - '7': BigInteger; - '8': BigInteger; - '9': BigInteger; - '10': BigInteger; - '11': BigInteger; - '12': BigInteger; - '13': BigInteger; - '14': BigInteger; - '15': BigInteger; - '16': BigInteger; - '17': BigInteger; - '18': BigInteger; - '19': BigInteger; - '20': BigInteger; - '21': BigInteger; - '22': BigInteger; - '23': BigInteger; - '24': BigInteger; - '25': BigInteger; - '26': BigInteger; - '27': BigInteger; - '28': BigInteger; - '29': BigInteger; - '30': BigInteger; - '31': BigInteger; - '32': BigInteger; - '33': BigInteger; - '34': BigInteger; - '35': BigInteger; - '36': BigInteger; - '37': BigInteger; - '38': BigInteger; - '39': BigInteger; - '40': BigInteger; - '41': BigInteger; - '42': BigInteger; - '43': BigInteger; - '44': BigInteger; - '45': BigInteger; - '46': BigInteger; - '47': BigInteger; - '48': BigInteger; - '49': BigInteger; - '50': BigInteger; - '51': BigInteger; - '52': BigInteger; - '53': BigInteger; - '54': BigInteger; - '55': BigInteger; - '56': BigInteger; - '57': BigInteger; - '58': BigInteger; - '59': BigInteger; - '60': BigInteger; - '61': BigInteger; - '62': BigInteger; - '63': BigInteger; - '64': BigInteger; - '65': BigInteger; - '66': BigInteger; - '67': BigInteger; - '68': BigInteger; - '69': BigInteger; - '70': BigInteger; - '71': BigInteger; - '72': BigInteger; - '73': BigInteger; - '74': BigInteger; - '75': BigInteger; - '76': BigInteger; - '77': BigInteger; - '78': BigInteger; - '79': BigInteger; - '80': BigInteger; - '81': BigInteger; - '82': BigInteger; - '83': BigInteger; - '84': BigInteger; - '85': BigInteger; - '86': BigInteger; - '87': BigInteger; - '88': BigInteger; - '89': BigInteger; - '90': BigInteger; - '91': BigInteger; - '92': BigInteger; - '93': BigInteger; - '94': BigInteger; - '95': BigInteger; - '96': BigInteger; - '97': BigInteger; - '98': BigInteger; - '99': BigInteger; - '100': BigInteger; - '101': BigInteger; - '102': BigInteger; - '103': BigInteger; - '104': BigInteger; - '105': BigInteger; - '106': BigInteger; - '107': BigInteger; - '108': BigInteger; - '109': BigInteger; - '110': BigInteger; - '111': BigInteger; - '112': BigInteger; - '113': BigInteger; - '114': BigInteger; - '115': BigInteger; - '116': BigInteger; - '117': BigInteger; - '118': BigInteger; - '119': BigInteger; - '120': BigInteger; - '121': BigInteger; - '122': BigInteger; - '123': BigInteger; - '124': BigInteger; - '125': BigInteger; - '126': BigInteger; - '127': BigInteger; - '128': BigInteger; - '129': BigInteger; - '130': BigInteger; - '131': BigInteger; - '132': BigInteger; - '133': BigInteger; - '134': BigInteger; - '135': BigInteger; - '136': BigInteger; - '137': BigInteger; - '138': BigInteger; - '139': BigInteger; - '140': BigInteger; - '141': BigInteger; - '142': BigInteger; - '143': BigInteger; - '144': BigInteger; - '145': BigInteger; - '146': BigInteger; - '147': BigInteger; - '148': BigInteger; - '149': BigInteger; - '150': BigInteger; - '151': BigInteger; - '152': BigInteger; - '153': BigInteger; - '154': BigInteger; - '155': BigInteger; - '156': BigInteger; - '157': BigInteger; - '158': BigInteger; - '159': BigInteger; - '160': BigInteger; - '161': BigInteger; - '162': BigInteger; - '163': BigInteger; - '164': BigInteger; - '165': BigInteger; - '166': BigInteger; - '167': BigInteger; - '168': BigInteger; - '169': BigInteger; - '170': BigInteger; - '171': BigInteger; - '172': BigInteger; - '173': BigInteger; - '174': BigInteger; - '175': BigInteger; - '176': BigInteger; - '177': BigInteger; - '178': BigInteger; - '179': BigInteger; - '180': BigInteger; - '181': BigInteger; - '182': BigInteger; - '183': BigInteger; - '184': BigInteger; - '185': BigInteger; - '186': BigInteger; - '187': BigInteger; - '188': BigInteger; - '189': BigInteger; - '190': BigInteger; - '191': BigInteger; - '192': BigInteger; - '193': BigInteger; - '194': BigInteger; - '195': BigInteger; - '196': BigInteger; - '197': BigInteger; - '198': BigInteger; - '199': BigInteger; - '200': BigInteger; - '201': BigInteger; - '202': BigInteger; - '203': BigInteger; - '204': BigInteger; - '205': BigInteger; - '206': BigInteger; - '207': BigInteger; - '208': BigInteger; - '209': BigInteger; - '210': BigInteger; - '211': BigInteger; - '212': BigInteger; - '213': BigInteger; - '214': BigInteger; - '215': BigInteger; - '216': BigInteger; - '217': BigInteger; - '218': BigInteger; - '219': BigInteger; - '220': BigInteger; - '221': BigInteger; - '222': BigInteger; - '223': BigInteger; - '224': BigInteger; - '225': BigInteger; - '226': BigInteger; - '227': BigInteger; - '228': BigInteger; - '229': BigInteger; - '230': BigInteger; - '231': BigInteger; - '232': BigInteger; - '233': BigInteger; - '234': BigInteger; - '235': BigInteger; - '236': BigInteger; - '237': BigInteger; - '238': BigInteger; - '239': BigInteger; - '240': BigInteger; - '241': BigInteger; - '242': BigInteger; - '243': BigInteger; - '244': BigInteger; - '245': BigInteger; - '246': BigInteger; - '247': BigInteger; - '248': BigInteger; - '249': BigInteger; - '250': BigInteger; - '251': BigInteger; - '252': BigInteger; - '253': BigInteger; - '254': BigInteger; - '255': BigInteger; - '256': BigInteger; - '257': BigInteger; - '258': BigInteger; - '259': BigInteger; - '260': BigInteger; - '261': BigInteger; - '262': BigInteger; - '263': BigInteger; - '264': BigInteger; - '265': BigInteger; - '266': BigInteger; - '267': BigInteger; - '268': BigInteger; - '269': BigInteger; - '270': BigInteger; - '271': BigInteger; - '272': BigInteger; - '273': BigInteger; - '274': BigInteger; - '275': BigInteger; - '276': BigInteger; - '277': BigInteger; - '278': BigInteger; - '279': BigInteger; - '280': BigInteger; - '281': BigInteger; - '282': BigInteger; - '283': BigInteger; - '284': BigInteger; - '285': BigInteger; - '286': BigInteger; - '287': BigInteger; - '288': BigInteger; - '289': BigInteger; - '290': BigInteger; - '291': BigInteger; - '292': BigInteger; - '293': BigInteger; - '294': BigInteger; - '295': BigInteger; - '296': BigInteger; - '297': BigInteger; - '298': BigInteger; - '299': BigInteger; - '300': BigInteger; - '301': BigInteger; - '302': BigInteger; - '303': BigInteger; - '304': BigInteger; - '305': BigInteger; - '306': BigInteger; - '307': BigInteger; - '308': BigInteger; - '309': BigInteger; - '310': BigInteger; - '311': BigInteger; - '312': BigInteger; - '313': BigInteger; - '314': BigInteger; - '315': BigInteger; - '316': BigInteger; - '317': BigInteger; - '318': BigInteger; - '319': BigInteger; - '320': BigInteger; - '321': BigInteger; - '322': BigInteger; - '323': BigInteger; - '324': BigInteger; - '325': BigInteger; - '326': BigInteger; - '327': BigInteger; - '328': BigInteger; - '329': BigInteger; - '330': BigInteger; - '331': BigInteger; - '332': BigInteger; - '333': BigInteger; - '334': BigInteger; - '335': BigInteger; - '336': BigInteger; - '337': BigInteger; - '338': BigInteger; - '339': BigInteger; - '340': BigInteger; - '341': BigInteger; - '342': BigInteger; - '343': BigInteger; - '344': BigInteger; - '345': BigInteger; - '346': BigInteger; - '347': BigInteger; - '348': BigInteger; - '349': BigInteger; - '350': BigInteger; - '351': BigInteger; - '352': BigInteger; - '353': BigInteger; - '354': BigInteger; - '355': BigInteger; - '356': BigInteger; - '357': BigInteger; - '358': BigInteger; - '359': BigInteger; - '360': BigInteger; - '361': BigInteger; - '362': BigInteger; - '363': BigInteger; - '364': BigInteger; - '365': BigInteger; - '366': BigInteger; - '367': BigInteger; - '368': BigInteger; - '369': BigInteger; - '370': BigInteger; - '371': BigInteger; - '372': BigInteger; - '373': BigInteger; - '374': BigInteger; - '375': BigInteger; - '376': BigInteger; - '377': BigInteger; - '378': BigInteger; - '379': BigInteger; - '380': BigInteger; - '381': BigInteger; - '382': BigInteger; - '383': BigInteger; - '384': BigInteger; - '385': BigInteger; - '386': BigInteger; - '387': BigInteger; - '388': BigInteger; - '389': BigInteger; - '390': BigInteger; - '391': BigInteger; - '392': BigInteger; - '393': BigInteger; - '394': BigInteger; - '395': BigInteger; - '396': BigInteger; - '397': BigInteger; - '398': BigInteger; - '399': BigInteger; - '400': BigInteger; - '401': BigInteger; - '402': BigInteger; - '403': BigInteger; - '404': BigInteger; - '405': BigInteger; - '406': BigInteger; - '407': BigInteger; - '408': BigInteger; - '409': BigInteger; - '410': BigInteger; - '411': BigInteger; - '412': BigInteger; - '413': BigInteger; - '414': BigInteger; - '415': BigInteger; - '416': BigInteger; - '417': BigInteger; - '418': BigInteger; - '419': BigInteger; - '420': BigInteger; - '421': BigInteger; - '422': BigInteger; - '423': BigInteger; - '424': BigInteger; - '425': BigInteger; - '426': BigInteger; - '427': BigInteger; - '428': BigInteger; - '429': BigInteger; - '430': BigInteger; - '431': BigInteger; - '432': BigInteger; - '433': BigInteger; - '434': BigInteger; - '435': BigInteger; - '436': BigInteger; - '437': BigInteger; - '438': BigInteger; - '439': BigInteger; - '440': BigInteger; - '441': BigInteger; - '442': BigInteger; - '443': BigInteger; - '444': BigInteger; - '445': BigInteger; - '446': BigInteger; - '447': BigInteger; - '448': BigInteger; - '449': BigInteger; - '450': BigInteger; - '451': BigInteger; - '452': BigInteger; - '453': BigInteger; - '454': BigInteger; - '455': BigInteger; - '456': BigInteger; - '457': BigInteger; - '458': BigInteger; - '459': BigInteger; - '460': BigInteger; - '461': BigInteger; - '462': BigInteger; - '463': BigInteger; - '464': BigInteger; - '465': BigInteger; - '466': BigInteger; - '467': BigInteger; - '468': BigInteger; - '469': BigInteger; - '470': BigInteger; - '471': BigInteger; - '472': BigInteger; - '473': BigInteger; - '474': BigInteger; - '475': BigInteger; - '476': BigInteger; - '477': BigInteger; - '478': BigInteger; - '479': BigInteger; - '480': BigInteger; - '481': BigInteger; - '482': BigInteger; - '483': BigInteger; - '484': BigInteger; - '485': BigInteger; - '486': BigInteger; - '487': BigInteger; - '488': BigInteger; - '489': BigInteger; - '490': BigInteger; - '491': BigInteger; - '492': BigInteger; - '493': BigInteger; - '494': BigInteger; - '495': BigInteger; - '496': BigInteger; - '497': BigInteger; - '498': BigInteger; - '499': BigInteger; - '500': BigInteger; - '501': BigInteger; - '502': BigInteger; - '503': BigInteger; - '504': BigInteger; - '505': BigInteger; - '506': BigInteger; - '507': BigInteger; - '508': BigInteger; - '509': BigInteger; - '510': BigInteger; - '511': BigInteger; - '512': BigInteger; - '513': BigInteger; - '514': BigInteger; - '515': BigInteger; - '516': BigInteger; - '517': BigInteger; - '518': BigInteger; - '519': BigInteger; - '520': BigInteger; - '521': BigInteger; - '522': BigInteger; - '523': BigInteger; - '524': BigInteger; - '525': BigInteger; - '526': BigInteger; - '527': BigInteger; - '528': BigInteger; - '529': BigInteger; - '530': BigInteger; - '531': BigInteger; - '532': BigInteger; - '533': BigInteger; - '534': BigInteger; - '535': BigInteger; - '536': BigInteger; - '537': BigInteger; - '538': BigInteger; - '539': BigInteger; - '540': BigInteger; - '541': BigInteger; - '542': BigInteger; - '543': BigInteger; - '544': BigInteger; - '545': BigInteger; - '546': BigInteger; - '547': BigInteger; - '548': BigInteger; - '549': BigInteger; - '550': BigInteger; - '551': BigInteger; - '552': BigInteger; - '553': BigInteger; - '554': BigInteger; - '555': BigInteger; - '556': BigInteger; - '557': BigInteger; - '558': BigInteger; - '559': BigInteger; - '560': BigInteger; - '561': BigInteger; - '562': BigInteger; - '563': BigInteger; - '564': BigInteger; - '565': BigInteger; - '566': BigInteger; - '567': BigInteger; - '568': BigInteger; - '569': BigInteger; - '570': BigInteger; - '571': BigInteger; - '572': BigInteger; - '573': BigInteger; - '574': BigInteger; - '575': BigInteger; - '576': BigInteger; - '577': BigInteger; - '578': BigInteger; - '579': BigInteger; - '580': BigInteger; - '581': BigInteger; - '582': BigInteger; - '583': BigInteger; - '584': BigInteger; - '585': BigInteger; - '586': BigInteger; - '587': BigInteger; - '588': BigInteger; - '589': BigInteger; - '590': BigInteger; - '591': BigInteger; - '592': BigInteger; - '593': BigInteger; - '594': BigInteger; - '595': BigInteger; - '596': BigInteger; - '597': BigInteger; - '598': BigInteger; - '599': BigInteger; - '600': BigInteger; - '601': BigInteger; - '602': BigInteger; - '603': BigInteger; - '604': BigInteger; - '605': BigInteger; - '606': BigInteger; - '607': BigInteger; - '608': BigInteger; - '609': BigInteger; - '610': BigInteger; - '611': BigInteger; - '612': BigInteger; - '613': BigInteger; - '614': BigInteger; - '615': BigInteger; - '616': BigInteger; - '617': BigInteger; - '618': BigInteger; - '619': BigInteger; - '620': BigInteger; - '621': BigInteger; - '622': BigInteger; - '623': BigInteger; - '624': BigInteger; - '625': BigInteger; - '626': BigInteger; - '627': BigInteger; - '628': BigInteger; - '629': BigInteger; - '630': BigInteger; - '631': BigInteger; - '632': BigInteger; - '633': BigInteger; - '634': BigInteger; - '635': BigInteger; - '636': BigInteger; - '637': BigInteger; - '638': BigInteger; - '639': BigInteger; - '640': BigInteger; - '641': BigInteger; - '642': BigInteger; - '643': BigInteger; - '644': BigInteger; - '645': BigInteger; - '646': BigInteger; - '647': BigInteger; - '648': BigInteger; - '649': BigInteger; - '650': BigInteger; - '651': BigInteger; - '652': BigInteger; - '653': BigInteger; - '654': BigInteger; - '655': BigInteger; - '656': BigInteger; - '657': BigInteger; - '658': BigInteger; - '659': BigInteger; - '660': BigInteger; - '661': BigInteger; - '662': BigInteger; - '663': BigInteger; - '664': BigInteger; - '665': BigInteger; - '666': BigInteger; - '667': BigInteger; - '668': BigInteger; - '669': BigInteger; - '670': BigInteger; - '671': BigInteger; - '672': BigInteger; - '673': BigInteger; - '674': BigInteger; - '675': BigInteger; - '676': BigInteger; - '677': BigInteger; - '678': BigInteger; - '679': BigInteger; - '680': BigInteger; - '681': BigInteger; - '682': BigInteger; - '683': BigInteger; - '684': BigInteger; - '685': BigInteger; - '686': BigInteger; - '687': BigInteger; - '688': BigInteger; - '689': BigInteger; - '690': BigInteger; - '691': BigInteger; - '692': BigInteger; - '693': BigInteger; - '694': BigInteger; - '695': BigInteger; - '696': BigInteger; - '697': BigInteger; - '698': BigInteger; - '699': BigInteger; - '700': BigInteger; - '701': BigInteger; - '702': BigInteger; - '703': BigInteger; - '704': BigInteger; - '705': BigInteger; - '706': BigInteger; - '707': BigInteger; - '708': BigInteger; - '709': BigInteger; - '710': BigInteger; - '711': BigInteger; - '712': BigInteger; - '713': BigInteger; - '714': BigInteger; - '715': BigInteger; - '716': BigInteger; - '717': BigInteger; - '718': BigInteger; - '719': BigInteger; - '720': BigInteger; - '721': BigInteger; - '722': BigInteger; - '723': BigInteger; - '724': BigInteger; - '725': BigInteger; - '726': BigInteger; - '727': BigInteger; - '728': BigInteger; - '729': BigInteger; - '730': BigInteger; - '731': BigInteger; - '732': BigInteger; - '733': BigInteger; - '734': BigInteger; - '735': BigInteger; - '736': BigInteger; - '737': BigInteger; - '738': BigInteger; - '739': BigInteger; - '740': BigInteger; - '741': BigInteger; - '742': BigInteger; - '743': BigInteger; - '744': BigInteger; - '745': BigInteger; - '746': BigInteger; - '747': BigInteger; - '748': BigInteger; - '749': BigInteger; - '750': BigInteger; - '751': BigInteger; - '752': BigInteger; - '753': BigInteger; - '754': BigInteger; - '755': BigInteger; - '756': BigInteger; - '757': BigInteger; - '758': BigInteger; - '759': BigInteger; - '760': BigInteger; - '761': BigInteger; - '762': BigInteger; - '763': BigInteger; - '764': BigInteger; - '765': BigInteger; - '766': BigInteger; - '767': BigInteger; - '768': BigInteger; - '769': BigInteger; - '770': BigInteger; - '771': BigInteger; - '772': BigInteger; - '773': BigInteger; - '774': BigInteger; - '775': BigInteger; - '776': BigInteger; - '777': BigInteger; - '778': BigInteger; - '779': BigInteger; - '780': BigInteger; - '781': BigInteger; - '782': BigInteger; - '783': BigInteger; - '784': BigInteger; - '785': BigInteger; - '786': BigInteger; - '787': BigInteger; - '788': BigInteger; - '789': BigInteger; - '790': BigInteger; - '791': BigInteger; - '792': BigInteger; - '793': BigInteger; - '794': BigInteger; - '795': BigInteger; - '796': BigInteger; - '797': BigInteger; - '798': BigInteger; - '799': BigInteger; - '800': BigInteger; - '801': BigInteger; - '802': BigInteger; - '803': BigInteger; - '804': BigInteger; - '805': BigInteger; - '806': BigInteger; - '807': BigInteger; - '808': BigInteger; - '809': BigInteger; - '810': BigInteger; - '811': BigInteger; - '812': BigInteger; - '813': BigInteger; - '814': BigInteger; - '815': BigInteger; - '816': BigInteger; - '817': BigInteger; - '818': BigInteger; - '819': BigInteger; - '820': BigInteger; - '821': BigInteger; - '822': BigInteger; - '823': BigInteger; - '824': BigInteger; - '825': BigInteger; - '826': BigInteger; - '827': BigInteger; - '828': BigInteger; - '829': BigInteger; - '830': BigInteger; - '831': BigInteger; - '832': BigInteger; - '833': BigInteger; - '834': BigInteger; - '835': BigInteger; - '836': BigInteger; - '837': BigInteger; - '838': BigInteger; - '839': BigInteger; - '840': BigInteger; - '841': BigInteger; - '842': BigInteger; - '843': BigInteger; - '844': BigInteger; - '845': BigInteger; - '846': BigInteger; - '847': BigInteger; - '848': BigInteger; - '849': BigInteger; - '850': BigInteger; - '851': BigInteger; - '852': BigInteger; - '853': BigInteger; - '854': BigInteger; - '855': BigInteger; - '856': BigInteger; - '857': BigInteger; - '858': BigInteger; - '859': BigInteger; - '860': BigInteger; - '861': BigInteger; - '862': BigInteger; - '863': BigInteger; - '864': BigInteger; - '865': BigInteger; - '866': BigInteger; - '867': BigInteger; - '868': BigInteger; - '869': BigInteger; - '870': BigInteger; - '871': BigInteger; - '872': BigInteger; - '873': BigInteger; - '874': BigInteger; - '875': BigInteger; - '876': BigInteger; - '877': BigInteger; - '878': BigInteger; - '879': BigInteger; - '880': BigInteger; - '881': BigInteger; - '882': BigInteger; - '883': BigInteger; - '884': BigInteger; - '885': BigInteger; - '886': BigInteger; - '887': BigInteger; - '888': BigInteger; - '889': BigInteger; - '890': BigInteger; - '891': BigInteger; - '892': BigInteger; - '893': BigInteger; - '894': BigInteger; - '895': BigInteger; - '896': BigInteger; - '897': BigInteger; - '898': BigInteger; - '899': BigInteger; - '900': BigInteger; - '901': BigInteger; - '902': BigInteger; - '903': BigInteger; - '904': BigInteger; - '905': BigInteger; - '906': BigInteger; - '907': BigInteger; - '908': BigInteger; - '909': BigInteger; - '910': BigInteger; - '911': BigInteger; - '912': BigInteger; - '913': BigInteger; - '914': BigInteger; - '915': BigInteger; - '916': BigInteger; - '917': BigInteger; - '918': BigInteger; - '919': BigInteger; - '920': BigInteger; - '921': BigInteger; - '922': BigInteger; - '923': BigInteger; - '924': BigInteger; - '925': BigInteger; - '926': BigInteger; - '927': BigInteger; - '928': BigInteger; - '929': BigInteger; - '930': BigInteger; - '931': BigInteger; - '932': BigInteger; - '933': BigInteger; - '934': BigInteger; - '935': BigInteger; - '936': BigInteger; - '937': BigInteger; - '938': BigInteger; - '939': BigInteger; - '940': BigInteger; - '941': BigInteger; - '942': BigInteger; - '943': BigInteger; - '944': BigInteger; - '945': BigInteger; - '946': BigInteger; - '947': BigInteger; - '948': BigInteger; - '949': BigInteger; - '950': BigInteger; - '951': BigInteger; - '952': BigInteger; - '953': BigInteger; - '954': BigInteger; - '955': BigInteger; - '956': BigInteger; - '957': BigInteger; - '958': BigInteger; - '959': BigInteger; - '960': BigInteger; - '961': BigInteger; - '962': BigInteger; - '963': BigInteger; - '964': BigInteger; - '965': BigInteger; - '966': BigInteger; - '967': BigInteger; - '968': BigInteger; - '969': BigInteger; - '970': BigInteger; - '971': BigInteger; - '972': BigInteger; - '973': BigInteger; - '974': BigInteger; - '975': BigInteger; - '976': BigInteger; - '977': BigInteger; - '978': BigInteger; - '979': BigInteger; - '980': BigInteger; - '981': BigInteger; - '982': BigInteger; - '983': BigInteger; - '984': BigInteger; - '985': BigInteger; - '986': BigInteger; - '987': BigInteger; - '988': BigInteger; - '989': BigInteger; - '990': BigInteger; - '991': BigInteger; - '992': BigInteger; - '993': BigInteger; - '994': BigInteger; - '995': BigInteger; - '996': BigInteger; - '997': BigInteger; - '998': BigInteger; - '999': BigInteger; - } - - interface BaseArray { - value: number[], - isNegative: boolean - } -} diff --git a/node_modules/cordova-android/node_modules/big-integer/BigInteger.js b/node_modules/cordova-android/node_modules/big-integer/BigInteger.js deleted file mode 100644 index e560954..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/BigInteger.js +++ /dev/null @@ -1,1308 +0,0 @@ -var bigInt = (function (undefined) { - "use strict"; - - var BASE = 1e7, - LOG_BASE = 7, - MAX_INT = 9007199254740992, - MAX_INT_ARR = smallToArray(MAX_INT), - LOG_MAX_INT = Math.log(MAX_INT); - - function Integer(v, radix) { - if (typeof v === "undefined") return Integer[0]; - if (typeof radix !== "undefined") return +radix === 10 ? parseValue(v) : parseBase(v, radix); - return parseValue(v); - } - - function BigInteger(value, sign) { - this.value = value; - this.sign = sign; - this.isSmall = false; - } - BigInteger.prototype = Object.create(Integer.prototype); - - function SmallInteger(value) { - this.value = value; - this.sign = value < 0; - this.isSmall = true; - } - SmallInteger.prototype = Object.create(Integer.prototype); - - function isPrecise(n) { - return -MAX_INT < n && n < MAX_INT; - } - - function smallToArray(n) { // For performance reasons doesn't reference BASE, need to change this function if BASE changes - if (n < 1e7) - return [n]; - if (n < 1e14) - return [n % 1e7, Math.floor(n / 1e7)]; - return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; - } - - function arrayToSmall(arr) { // If BASE changes this function may need to change - trim(arr); - var length = arr.length; - if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { - switch (length) { - case 0: return 0; - case 1: return arr[0]; - case 2: return arr[0] + arr[1] * BASE; - default: return arr[0] + (arr[1] + arr[2] * BASE) * BASE; - } - } - return arr; - } - - function trim(v) { - var i = v.length; - while (v[--i] === 0); - v.length = i + 1; - } - - function createArray(length) { // function shamelessly stolen from Yaffle's library https://github.com/Yaffle/BigInteger - var x = new Array(length); - var i = -1; - while (++i < length) { - x[i] = 0; - } - return x; - } - - function truncate(n) { - if (n > 0) return Math.floor(n); - return Math.ceil(n); - } - - function add(a, b) { // assumes a and b are arrays with a.length >= b.length - var l_a = a.length, - l_b = b.length, - r = new Array(l_a), - carry = 0, - base = BASE, - sum, i; - for (i = 0; i < l_b; i++) { - sum = a[i] + b[i] + carry; - carry = sum >= base ? 1 : 0; - r[i] = sum - carry * base; - } - while (i < l_a) { - sum = a[i] + carry; - carry = sum === base ? 1 : 0; - r[i++] = sum - carry * base; - } - if (carry > 0) r.push(carry); - return r; - } - - function addAny(a, b) { - if (a.length >= b.length) return add(a, b); - return add(b, a); - } - - function addSmall(a, carry) { // assumes a is array, carry is number with 0 <= carry < MAX_INT - var l = a.length, - r = new Array(l), - base = BASE, - sum, i; - for (i = 0; i < l; i++) { - sum = a[i] - base + carry; - carry = Math.floor(sum / base); - r[i] = sum - carry * base; - carry += 1; - } - while (carry > 0) { - r[i++] = carry % base; - carry = Math.floor(carry / base); - } - return r; - } - - BigInteger.prototype.add = function (v) { - var n = parseValue(v); - if (this.sign !== n.sign) { - return this.subtract(n.negate()); - } - var a = this.value, b = n.value; - if (n.isSmall) { - return new BigInteger(addSmall(a, Math.abs(b)), this.sign); - } - return new BigInteger(addAny(a, b), this.sign); - }; - BigInteger.prototype.plus = BigInteger.prototype.add; - - SmallInteger.prototype.add = function (v) { - var n = parseValue(v); - var a = this.value; - if (a < 0 !== n.sign) { - return this.subtract(n.negate()); - } - var b = n.value; - if (n.isSmall) { - if (isPrecise(a + b)) return new SmallInteger(a + b); - b = smallToArray(Math.abs(b)); - } - return new BigInteger(addSmall(b, Math.abs(a)), a < 0); - }; - SmallInteger.prototype.plus = SmallInteger.prototype.add; - - function subtract(a, b) { // assumes a and b are arrays with a >= b - var a_l = a.length, - b_l = b.length, - r = new Array(a_l), - borrow = 0, - base = BASE, - i, difference; - for (i = 0; i < b_l; i++) { - difference = a[i] - borrow - b[i]; - if (difference < 0) { - difference += base; - borrow = 1; - } else borrow = 0; - r[i] = difference; - } - for (i = b_l; i < a_l; i++) { - difference = a[i] - borrow; - if (difference < 0) difference += base; - else { - r[i++] = difference; - break; - } - r[i] = difference; - } - for (; i < a_l; i++) { - r[i] = a[i]; - } - trim(r); - return r; - } - - function subtractAny(a, b, sign) { - var value; - if (compareAbs(a, b) >= 0) { - value = subtract(a, b); - } else { - value = subtract(b, a); - sign = !sign; - } - value = arrayToSmall(value); - if (typeof value === "number") { - if (sign) value = -value; - return new SmallInteger(value); - } - return new BigInteger(value, sign); - } - - function subtractSmall(a, b, sign) { // assumes a is array, b is number with 0 <= b < MAX_INT - var l = a.length, - r = new Array(l), - carry = -b, - base = BASE, - i, difference; - for (i = 0; i < l; i++) { - difference = a[i] + carry; - carry = Math.floor(difference / base); - difference %= base; - r[i] = difference < 0 ? difference + base : difference; - } - r = arrayToSmall(r); - if (typeof r === "number") { - if (sign) r = -r; - return new SmallInteger(r); - } return new BigInteger(r, sign); - } - - BigInteger.prototype.subtract = function (v) { - var n = parseValue(v); - if (this.sign !== n.sign) { - return this.add(n.negate()); - } - var a = this.value, b = n.value; - if (n.isSmall) - return subtractSmall(a, Math.abs(b), this.sign); - return subtractAny(a, b, this.sign); - }; - BigInteger.prototype.minus = BigInteger.prototype.subtract; - - SmallInteger.prototype.subtract = function (v) { - var n = parseValue(v); - var a = this.value; - if (a < 0 !== n.sign) { - return this.add(n.negate()); - } - var b = n.value; - if (n.isSmall) { - return new SmallInteger(a - b); - } - return subtractSmall(b, Math.abs(a), a >= 0); - }; - SmallInteger.prototype.minus = SmallInteger.prototype.subtract; - - BigInteger.prototype.negate = function () { - return new BigInteger(this.value, !this.sign); - }; - SmallInteger.prototype.negate = function () { - var sign = this.sign; - var small = new SmallInteger(-this.value); - small.sign = !sign; - return small; - }; - - BigInteger.prototype.abs = function () { - return new BigInteger(this.value, false); - }; - SmallInteger.prototype.abs = function () { - return new SmallInteger(Math.abs(this.value)); - }; - - function multiplyLong(a, b) { - var a_l = a.length, - b_l = b.length, - l = a_l + b_l, - r = createArray(l), - base = BASE, - product, carry, i, a_i, b_j; - for (i = 0; i < a_l; ++i) { - a_i = a[i]; - for (var j = 0; j < b_l; ++j) { - b_j = b[j]; - product = a_i * b_j + r[i + j]; - carry = Math.floor(product / base); - r[i + j] = product - carry * base; - r[i + j + 1] += carry; - } - } - trim(r); - return r; - } - - function multiplySmall(a, b) { // assumes a is array, b is number with |b| < BASE - var l = a.length, - r = new Array(l), - base = BASE, - carry = 0, - product, i; - for (i = 0; i < l; i++) { - product = a[i] * b + carry; - carry = Math.floor(product / base); - r[i] = product - carry * base; - } - while (carry > 0) { - r[i++] = carry % base; - carry = Math.floor(carry / base); - } - return r; - } - - function shiftLeft(x, n) { - var r = []; - while (n-- > 0) r.push(0); - return r.concat(x); - } - - function multiplyKaratsuba(x, y) { - var n = Math.max(x.length, y.length); - - if (n <= 30) return multiplyLong(x, y); - n = Math.ceil(n / 2); - - var b = x.slice(n), - a = x.slice(0, n), - d = y.slice(n), - c = y.slice(0, n); - - var ac = multiplyKaratsuba(a, c), - bd = multiplyKaratsuba(b, d), - abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); - - var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); - trim(product); - return product; - } - - // The following function is derived from a surface fit of a graph plotting the performance difference - // between long multiplication and karatsuba multiplication versus the lengths of the two arrays. - function useKaratsuba(l1, l2) { - return -0.012 * l1 - 0.012 * l2 + 0.000015 * l1 * l2 > 0; - } - - BigInteger.prototype.multiply = function (v) { - var n = parseValue(v), - a = this.value, b = n.value, - sign = this.sign !== n.sign, - abs; - if (n.isSmall) { - if (b === 0) return Integer[0]; - if (b === 1) return this; - if (b === -1) return this.negate(); - abs = Math.abs(b); - if (abs < BASE) { - return new BigInteger(multiplySmall(a, abs), sign); - } - b = smallToArray(abs); - } - if (useKaratsuba(a.length, b.length)) // Karatsuba is only faster for certain array sizes - return new BigInteger(multiplyKaratsuba(a, b), sign); - return new BigInteger(multiplyLong(a, b), sign); - }; - - BigInteger.prototype.times = BigInteger.prototype.multiply; - - function multiplySmallAndArray(a, b, sign) { // a >= 0 - if (a < BASE) { - return new BigInteger(multiplySmall(b, a), sign); - } - return new BigInteger(multiplyLong(b, smallToArray(a)), sign); - } - SmallInteger.prototype._multiplyBySmall = function (a) { - if (isPrecise(a.value * this.value)) { - return new SmallInteger(a.value * this.value); - } - return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); - }; - BigInteger.prototype._multiplyBySmall = function (a) { - if (a.value === 0) return Integer[0]; - if (a.value === 1) return this; - if (a.value === -1) return this.negate(); - return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); - }; - SmallInteger.prototype.multiply = function (v) { - return parseValue(v)._multiplyBySmall(this); - }; - SmallInteger.prototype.times = SmallInteger.prototype.multiply; - - function square(a) { - //console.assert(2 * BASE * BASE < MAX_INT); - var l = a.length, - r = createArray(l + l), - base = BASE, - product, carry, i, a_i, a_j; - for (i = 0; i < l; i++) { - a_i = a[i]; - carry = 0 - a_i * a_i; - for (var j = i; j < l; j++) { - a_j = a[j]; - product = 2 * (a_i * a_j) + r[i + j] + carry; - carry = Math.floor(product / base); - r[i + j] = product - carry * base; - } - r[i + l] = carry; - } - trim(r); - return r; - } - - BigInteger.prototype.square = function () { - return new BigInteger(square(this.value), false); - }; - - SmallInteger.prototype.square = function () { - var value = this.value * this.value; - if (isPrecise(value)) return new SmallInteger(value); - return new BigInteger(square(smallToArray(Math.abs(this.value))), false); - }; - - function divMod1(a, b) { // Left over from previous version. Performs faster than divMod2 on smaller input sizes. - var a_l = a.length, - b_l = b.length, - base = BASE, - result = createArray(b.length), - divisorMostSignificantDigit = b[b_l - 1], - // normalization - lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), - remainder = multiplySmall(a, lambda), - divisor = multiplySmall(b, lambda), - quotientDigit, shift, carry, borrow, i, l, q; - if (remainder.length <= a_l) remainder.push(0); - divisor.push(0); - divisorMostSignificantDigit = divisor[b_l - 1]; - for (shift = a_l - b_l; shift >= 0; shift--) { - quotientDigit = base - 1; - if (remainder[shift + b_l] !== divisorMostSignificantDigit) { - quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); - } - // quotientDigit <= base - 1 - carry = 0; - borrow = 0; - l = divisor.length; - for (i = 0; i < l; i++) { - carry += quotientDigit * divisor[i]; - q = Math.floor(carry / base); - borrow += remainder[shift + i] - (carry - q * base); - carry = q; - if (borrow < 0) { - remainder[shift + i] = borrow + base; - borrow = -1; - } else { - remainder[shift + i] = borrow; - borrow = 0; - } - } - while (borrow !== 0) { - quotientDigit -= 1; - carry = 0; - for (i = 0; i < l; i++) { - carry += remainder[shift + i] - base + divisor[i]; - if (carry < 0) { - remainder[shift + i] = carry + base; - carry = 0; - } else { - remainder[shift + i] = carry; - carry = 1; - } - } - borrow += carry; - } - result[shift] = quotientDigit; - } - // denormalization - remainder = divModSmall(remainder, lambda)[0]; - return [arrayToSmall(result), arrayToSmall(remainder)]; - } - - function divMod2(a, b) { // Implementation idea shamelessly stolen from Silent Matt's library http://silentmatt.com/biginteger/ - // Performs faster than divMod1 on larger input sizes. - var a_l = a.length, - b_l = b.length, - result = [], - part = [], - base = BASE, - guess, xlen, highx, highy, check; - while (a_l) { - part.unshift(a[--a_l]); - trim(part); - if (compareAbs(part, b) < 0) { - result.push(0); - continue; - } - xlen = part.length; - highx = part[xlen - 1] * base + part[xlen - 2]; - highy = b[b_l - 1] * base + b[b_l - 2]; - if (xlen > b_l) { - highx = (highx + 1) * base; - } - guess = Math.ceil(highx / highy); - do { - check = multiplySmall(b, guess); - if (compareAbs(check, part) <= 0) break; - guess--; - } while (guess); - result.push(guess); - part = subtract(part, check); - } - result.reverse(); - return [arrayToSmall(result), arrayToSmall(part)]; - } - - function divModSmall(value, lambda) { - var length = value.length, - quotient = createArray(length), - base = BASE, - i, q, remainder, divisor; - remainder = 0; - for (i = length - 1; i >= 0; --i) { - divisor = remainder * base + value[i]; - q = truncate(divisor / lambda); - remainder = divisor - q * lambda; - quotient[i] = q | 0; - } - return [quotient, remainder | 0]; - } - - function divModAny(self, v) { - var value, n = parseValue(v); - var a = self.value, b = n.value; - var quotient; - if (b === 0) throw new Error("Cannot divide by zero"); - if (self.isSmall) { - if (n.isSmall) { - return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; - } - return [Integer[0], self]; - } - if (n.isSmall) { - if (b === 1) return [self, Integer[0]]; - if (b == -1) return [self.negate(), Integer[0]]; - var abs = Math.abs(b); - if (abs < BASE) { - value = divModSmall(a, abs); - quotient = arrayToSmall(value[0]); - var remainder = value[1]; - if (self.sign) remainder = -remainder; - if (typeof quotient === "number") { - if (self.sign !== n.sign) quotient = -quotient; - return [new SmallInteger(quotient), new SmallInteger(remainder)]; - } - return [new BigInteger(quotient, self.sign !== n.sign), new SmallInteger(remainder)]; - } - b = smallToArray(abs); - } - var comparison = compareAbs(a, b); - if (comparison === -1) return [Integer[0], self]; - if (comparison === 0) return [Integer[self.sign === n.sign ? 1 : -1], Integer[0]]; - - // divMod1 is faster on smaller input sizes - if (a.length + b.length <= 200) - value = divMod1(a, b); - else value = divMod2(a, b); - - quotient = value[0]; - var qSign = self.sign !== n.sign, - mod = value[1], - mSign = self.sign; - if (typeof quotient === "number") { - if (qSign) quotient = -quotient; - quotient = new SmallInteger(quotient); - } else quotient = new BigInteger(quotient, qSign); - if (typeof mod === "number") { - if (mSign) mod = -mod; - mod = new SmallInteger(mod); - } else mod = new BigInteger(mod, mSign); - return [quotient, mod]; - } - - BigInteger.prototype.divmod = function (v) { - var result = divModAny(this, v); - return { - quotient: result[0], - remainder: result[1] - }; - }; - SmallInteger.prototype.divmod = BigInteger.prototype.divmod; - - BigInteger.prototype.divide = function (v) { - return divModAny(this, v)[0]; - }; - SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; - - BigInteger.prototype.mod = function (v) { - return divModAny(this, v)[1]; - }; - SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; - - BigInteger.prototype.pow = function (v) { - var n = parseValue(v), - a = this.value, - b = n.value, - value, x, y; - if (b === 0) return Integer[1]; - if (a === 0) return Integer[0]; - if (a === 1) return Integer[1]; - if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; - if (n.sign) { - return Integer[0]; - } - if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); - if (this.isSmall) { - if (isPrecise(value = Math.pow(a, b))) - return new SmallInteger(truncate(value)); - } - x = this; - y = Integer[1]; - while (true) { - if (b & 1 === 1) { - y = y.times(x); - --b; - } - if (b === 0) break; - b /= 2; - x = x.square(); - } - return y; - }; - SmallInteger.prototype.pow = BigInteger.prototype.pow; - - BigInteger.prototype.modPow = function (exp, mod) { - exp = parseValue(exp); - mod = parseValue(mod); - if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); - var r = Integer[1], - base = this.mod(mod); - while (exp.isPositive()) { - if (base.isZero()) return Integer[0]; - if (exp.isOdd()) r = r.multiply(base).mod(mod); - exp = exp.divide(2); - base = base.square().mod(mod); - } - return r; - }; - SmallInteger.prototype.modPow = BigInteger.prototype.modPow; - - function compareAbs(a, b) { - if (a.length !== b.length) { - return a.length > b.length ? 1 : -1; - } - for (var i = a.length - 1; i >= 0; i--) { - if (a[i] !== b[i]) return a[i] > b[i] ? 1 : -1; - } - return 0; - } - - BigInteger.prototype.compareAbs = function (v) { - var n = parseValue(v), - a = this.value, - b = n.value; - if (n.isSmall) return 1; - return compareAbs(a, b); - }; - SmallInteger.prototype.compareAbs = function (v) { - var n = parseValue(v), - a = Math.abs(this.value), - b = n.value; - if (n.isSmall) { - b = Math.abs(b); - return a === b ? 0 : a > b ? 1 : -1; - } - return -1; - }; - - BigInteger.prototype.compare = function (v) { - // See discussion about comparison with Infinity: - // https://github.com/peterolson/BigInteger.js/issues/61 - if (v === Infinity) { - return -1; - } - if (v === -Infinity) { - return 1; - } - - var n = parseValue(v), - a = this.value, - b = n.value; - if (this.sign !== n.sign) { - return n.sign ? 1 : -1; - } - if (n.isSmall) { - return this.sign ? -1 : 1; - } - return compareAbs(a, b) * (this.sign ? -1 : 1); - }; - BigInteger.prototype.compareTo = BigInteger.prototype.compare; - - SmallInteger.prototype.compare = function (v) { - if (v === Infinity) { - return -1; - } - if (v === -Infinity) { - return 1; - } - - var n = parseValue(v), - a = this.value, - b = n.value; - if (n.isSmall) { - return a == b ? 0 : a > b ? 1 : -1; - } - if (a < 0 !== n.sign) { - return a < 0 ? -1 : 1; - } - return a < 0 ? 1 : -1; - }; - SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; - - BigInteger.prototype.equals = function (v) { - return this.compare(v) === 0; - }; - SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; - - BigInteger.prototype.notEquals = function (v) { - return this.compare(v) !== 0; - }; - SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; - - BigInteger.prototype.greater = function (v) { - return this.compare(v) > 0; - }; - SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; - - BigInteger.prototype.lesser = function (v) { - return this.compare(v) < 0; - }; - SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; - - BigInteger.prototype.greaterOrEquals = function (v) { - return this.compare(v) >= 0; - }; - SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; - - BigInteger.prototype.lesserOrEquals = function (v) { - return this.compare(v) <= 0; - }; - SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; - - BigInteger.prototype.isEven = function () { - return (this.value[0] & 1) === 0; - }; - SmallInteger.prototype.isEven = function () { - return (this.value & 1) === 0; - }; - - BigInteger.prototype.isOdd = function () { - return (this.value[0] & 1) === 1; - }; - SmallInteger.prototype.isOdd = function () { - return (this.value & 1) === 1; - }; - - BigInteger.prototype.isPositive = function () { - return !this.sign; - }; - SmallInteger.prototype.isPositive = function () { - return this.value > 0; - }; - - BigInteger.prototype.isNegative = function () { - return this.sign; - }; - SmallInteger.prototype.isNegative = function () { - return this.value < 0; - }; - - BigInteger.prototype.isUnit = function () { - return false; - }; - SmallInteger.prototype.isUnit = function () { - return Math.abs(this.value) === 1; - }; - - BigInteger.prototype.isZero = function () { - return false; - }; - SmallInteger.prototype.isZero = function () { - return this.value === 0; - }; - BigInteger.prototype.isDivisibleBy = function (v) { - var n = parseValue(v); - var value = n.value; - if (value === 0) return false; - if (value === 1) return true; - if (value === 2) return this.isEven(); - return this.mod(n).equals(Integer[0]); - }; - SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; - - function isBasicPrime(v) { - var n = v.abs(); - if (n.isUnit()) return false; - if (n.equals(2) || n.equals(3) || n.equals(5)) return true; - if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; - if (n.lesser(25)) return true; - // we don't know if it's prime: let the other functions figure it out - } - - BigInteger.prototype.isPrime = function () { - var isPrime = isBasicPrime(this); - if (isPrime !== undefined) return isPrime; - var n = this.abs(), - nPrev = n.prev(); - var a = [2, 3, 5, 7, 11, 13, 17, 19], - b = nPrev, - d, t, i, x; - while (b.isEven()) b = b.divide(2); - for (i = 0; i < a.length; i++) { - x = bigInt(a[i]).modPow(b, n); - if (x.equals(Integer[1]) || x.equals(nPrev)) continue; - for (t = true, d = b; t && d.lesser(nPrev); d = d.multiply(2)) { - x = x.square().mod(n); - if (x.equals(nPrev)) t = false; - } - if (t) return false; - } - return true; - }; - SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; - - BigInteger.prototype.isProbablePrime = function (iterations) { - var isPrime = isBasicPrime(this); - if (isPrime !== undefined) return isPrime; - var n = this.abs(); - var t = iterations === undefined ? 5 : iterations; - // use the Fermat primality test - for (var i = 0; i < t; i++) { - var a = bigInt.randBetween(2, n.minus(2)); - if (!a.modPow(n.prev(), n).isUnit()) return false; // definitely composite - } - return true; // large chance of being prime - }; - SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; - - BigInteger.prototype.modInv = function (n) { - var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; - while (!newR.equals(bigInt.zero)) { - q = r.divide(newR); - lastT = t; - lastR = r; - t = newT; - r = newR; - newT = lastT.subtract(q.multiply(newT)); - newR = lastR.subtract(q.multiply(newR)); - } - if (!r.equals(1)) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); - if (t.compare(0) === -1) { - t = t.add(n); - } - if (this.isNegative()) { - return t.negate(); - } - return t; - }; - - SmallInteger.prototype.modInv = BigInteger.prototype.modInv; - - BigInteger.prototype.next = function () { - var value = this.value; - if (this.sign) { - return subtractSmall(value, 1, this.sign); - } - return new BigInteger(addSmall(value, 1), this.sign); - }; - SmallInteger.prototype.next = function () { - var value = this.value; - if (value + 1 < MAX_INT) return new SmallInteger(value + 1); - return new BigInteger(MAX_INT_ARR, false); - }; - - BigInteger.prototype.prev = function () { - var value = this.value; - if (this.sign) { - return new BigInteger(addSmall(value, 1), true); - } - return subtractSmall(value, 1, this.sign); - }; - SmallInteger.prototype.prev = function () { - var value = this.value; - if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); - return new BigInteger(MAX_INT_ARR, true); - }; - - var powersOfTwo = [1]; - while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); - var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; - - function shift_isSmall(n) { - return ((typeof n === "number" || typeof n === "string") && +Math.abs(n) <= BASE) || - (n instanceof BigInteger && n.value.length <= 1); - } - - BigInteger.prototype.shiftLeft = function (n) { - if (!shift_isSmall(n)) { - throw new Error(String(n) + " is too large for shifting."); - } - n = +n; - if (n < 0) return this.shiftRight(-n); - var result = this; - if (result.isZero()) return result; - while (n >= powers2Length) { - result = result.multiply(highestPower2); - n -= powers2Length - 1; - } - return result.multiply(powersOfTwo[n]); - }; - SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; - - BigInteger.prototype.shiftRight = function (n) { - var remQuo; - if (!shift_isSmall(n)) { - throw new Error(String(n) + " is too large for shifting."); - } - n = +n; - if (n < 0) return this.shiftLeft(-n); - var result = this; - while (n >= powers2Length) { - if (result.isZero() || (result.isNegative() && result.isUnit())) return result; - remQuo = divModAny(result, highestPower2); - result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; - n -= powers2Length - 1; - } - remQuo = divModAny(result, powersOfTwo[n]); - return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; - }; - SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; - - function bitwise(x, y, fn) { - y = parseValue(y); - var xSign = x.isNegative(), ySign = y.isNegative(); - var xRem = xSign ? x.not() : x, - yRem = ySign ? y.not() : y; - var xDigit = 0, yDigit = 0; - var xDivMod = null, yDivMod = null; - var result = []; - while (!xRem.isZero() || !yRem.isZero()) { - xDivMod = divModAny(xRem, highestPower2); - xDigit = xDivMod[1].toJSNumber(); - if (xSign) { - xDigit = highestPower2 - 1 - xDigit; // two's complement for negative numbers - } - - yDivMod = divModAny(yRem, highestPower2); - yDigit = yDivMod[1].toJSNumber(); - if (ySign) { - yDigit = highestPower2 - 1 - yDigit; // two's complement for negative numbers - } - - xRem = xDivMod[0]; - yRem = yDivMod[0]; - result.push(fn(xDigit, yDigit)); - } - var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0); - for (var i = result.length - 1; i >= 0; i -= 1) { - sum = sum.multiply(highestPower2).add(bigInt(result[i])); - } - return sum; - } - - BigInteger.prototype.not = function () { - return this.negate().prev(); - }; - SmallInteger.prototype.not = BigInteger.prototype.not; - - BigInteger.prototype.and = function (n) { - return bitwise(this, n, function (a, b) { return a & b; }); - }; - SmallInteger.prototype.and = BigInteger.prototype.and; - - BigInteger.prototype.or = function (n) { - return bitwise(this, n, function (a, b) { return a | b; }); - }; - SmallInteger.prototype.or = BigInteger.prototype.or; - - BigInteger.prototype.xor = function (n) { - return bitwise(this, n, function (a, b) { return a ^ b; }); - }; - SmallInteger.prototype.xor = BigInteger.prototype.xor; - - var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; - function roughLOB(n) { // get lowestOneBit (rough) - // SmallInteger: return Min(lowestOneBit(n), 1 << 30) - // BigInteger: return Min(lowestOneBit(n), 1 << 14) [BASE=1e7] - var v = n.value, x = typeof v === "number" ? v | LOBMASK_I : v[0] + v[1] * BASE | LOBMASK_BI; - return x & -x; - } - - function integerLogarithm(value, base) { - if (base.compareTo(value) <= 0) { - var tmp = integerLogarithm(value, base.square(base)); - var p = tmp.p; - var e = tmp.e; - var t = p.multiply(base); - return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p: p, e: e * 2 }; - } - return { p: bigInt(1), e: 0 }; - } - - BigInteger.prototype.bitLength = function () { - var n = this; - if (n.compareTo(bigInt(0)) < 0) { - n = n.negate().subtract(bigInt(1)); - } - if (n.compareTo(bigInt(0)) === 0) { - return bigInt(0); - } - return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1)); - } - SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength; - - function max(a, b) { - a = parseValue(a); - b = parseValue(b); - return a.greater(b) ? a : b; - } - function min(a, b) { - a = parseValue(a); - b = parseValue(b); - return a.lesser(b) ? a : b; - } - function gcd(a, b) { - a = parseValue(a).abs(); - b = parseValue(b).abs(); - if (a.equals(b)) return a; - if (a.isZero()) return b; - if (b.isZero()) return a; - var c = Integer[1], d, t; - while (a.isEven() && b.isEven()) { - d = Math.min(roughLOB(a), roughLOB(b)); - a = a.divide(d); - b = b.divide(d); - c = c.multiply(d); - } - while (a.isEven()) { - a = a.divide(roughLOB(a)); - } - do { - while (b.isEven()) { - b = b.divide(roughLOB(b)); - } - if (a.greater(b)) { - t = b; b = a; a = t; - } - b = b.subtract(a); - } while (!b.isZero()); - return c.isUnit() ? a : a.multiply(c); - } - function lcm(a, b) { - a = parseValue(a).abs(); - b = parseValue(b).abs(); - return a.divide(gcd(a, b)).multiply(b); - } - function randBetween(a, b) { - a = parseValue(a); - b = parseValue(b); - var low = min(a, b), high = max(a, b); - var range = high.subtract(low).add(1); - if (range.isSmall) return low.add(Math.floor(Math.random() * range)); - var length = range.value.length - 1; - var result = [], restricted = true; - for (var i = length; i >= 0; i--) { - var top = restricted ? range.value[i] : BASE; - var digit = truncate(Math.random() * top); - result.unshift(digit); - if (digit < top) restricted = false; - } - result = arrayToSmall(result); - return low.add(typeof result === "number" ? new SmallInteger(result) : new BigInteger(result, false)); - } - var parseBase = function (text, base) { - var length = text.length; - var i; - var absBase = Math.abs(base); - for (var i = 0; i < length; i++) { - var c = text[i].toLowerCase(); - if (c === "-") continue; - if (/[a-z0-9]/.test(c)) { - if (/[0-9]/.test(c) && +c >= absBase) { - if (c === "1" && absBase === 1) continue; - throw new Error(c + " is not a valid digit in base " + base + "."); - } else if (c.charCodeAt(0) - 87 >= absBase) { - throw new Error(c + " is not a valid digit in base " + base + "."); - } - } - } - if (2 <= base && base <= 36) { - if (length <= LOG_MAX_INT / Math.log(base)) { - var result = parseInt(text, base); - if (isNaN(result)) { - throw new Error(c + " is not a valid digit in base " + base + "."); - } - return new SmallInteger(parseInt(text, base)); - } - } - base = parseValue(base); - var digits = []; - var isNegative = text[0] === "-"; - for (i = isNegative ? 1 : 0; i < text.length; i++) { - var c = text[i].toLowerCase(), - charCode = c.charCodeAt(0); - if (48 <= charCode && charCode <= 57) digits.push(parseValue(c)); - else if (97 <= charCode && charCode <= 122) digits.push(parseValue(c.charCodeAt(0) - 87)); - else if (c === "<") { - var start = i; - do { i++; } while (text[i] !== ">"); - digits.push(parseValue(text.slice(start + 1, i))); - } - else throw new Error(c + " is not a valid character"); - } - return parseBaseFromArray(digits, base, isNegative); - }; - - function parseBaseFromArray(digits, base, isNegative) { - var val = Integer[0], pow = Integer[1], i; - for (i = digits.length - 1; i >= 0; i--) { - val = val.add(digits[i].times(pow)); - pow = pow.times(base); - } - return isNegative ? val.negate() : val; - } - - function stringify(digit) { - if (digit <= 35) { - return "0123456789abcdefghijklmnopqrstuvwxyz".charAt(digit); - } - return "<" + digit + ">"; - } - - function toBase(n, base) { - base = bigInt(base); - if (base.isZero()) { - if (n.isZero()) return { value: [0], isNegative: false }; - throw new Error("Cannot convert nonzero numbers to base 0."); - } - if (base.equals(-1)) { - if (n.isZero()) return { value: [0], isNegative: false }; - if (n.isNegative()) - return { - value: [].concat.apply([], Array.apply(null, Array(-n)) - .map(Array.prototype.valueOf, [1, 0]) - ), - isNegative: false - }; - - var arr = Array.apply(null, Array(+n - 1)) - .map(Array.prototype.valueOf, [0, 1]); - arr.unshift([1]); - return { - value: [].concat.apply([], arr), - isNegative: false - }; - } - - var neg = false; - if (n.isNegative() && base.isPositive()) { - neg = true; - n = n.abs(); - } - if (base.equals(1)) { - if (n.isZero()) return { value: [0], isNegative: false }; - - return { - value: Array.apply(null, Array(+n)) - .map(Number.prototype.valueOf, 1), - isNegative: neg - }; - } - var out = []; - var left = n, divmod; - while (left.isNegative() || left.compareAbs(base) >= 0) { - divmod = left.divmod(base); - left = divmod.quotient; - var digit = divmod.remainder; - if (digit.isNegative()) { - digit = base.minus(digit).abs(); - left = left.next(); - } - out.push(digit.toJSNumber()); - } - out.push(left.toJSNumber()); - return { value: out.reverse(), isNegative: neg }; - } - - function toBaseString(n, base) { - var arr = toBase(n, base); - return (arr.isNegative ? "-" : "") + arr.value.map(stringify).join(''); - } - - BigInteger.prototype.toArray = function (radix) { - return toBase(this, radix); - }; - - SmallInteger.prototype.toArray = function (radix) { - return toBase(this, radix); - }; - - BigInteger.prototype.toString = function (radix) { - if (radix === undefined) radix = 10; - if (radix !== 10) return toBaseString(this, radix); - var v = this.value, l = v.length, str = String(v[--l]), zeros = "0000000", digit; - while (--l >= 0) { - digit = String(v[l]); - str += zeros.slice(digit.length) + digit; - } - var sign = this.sign ? "-" : ""; - return sign + str; - }; - - SmallInteger.prototype.toString = function (radix) { - if (radix === undefined) radix = 10; - if (radix != 10) return toBaseString(this, radix); - return String(this.value); - }; - BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function () { return this.toString(); } - - BigInteger.prototype.valueOf = function () { - return parseInt(this.toString(), 10); - }; - BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; - - SmallInteger.prototype.valueOf = function () { - return this.value; - }; - SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; - - function parseStringValue(v) { - if (isPrecise(+v)) { - var x = +v; - if (x === truncate(x)) - return new SmallInteger(x); - throw new Error("Invalid integer: " + v); - } - var sign = v[0] === "-"; - if (sign) v = v.slice(1); - var split = v.split(/e/i); - if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); - if (split.length === 2) { - var exp = split[1]; - if (exp[0] === "+") exp = exp.slice(1); - exp = +exp; - if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); - var text = split[0]; - var decimalPlace = text.indexOf("."); - if (decimalPlace >= 0) { - exp -= text.length - decimalPlace - 1; - text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); - } - if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); - text += (new Array(exp + 1)).join("0"); - v = text; - } - var isValid = /^([0-9][0-9]*)$/.test(v); - if (!isValid) throw new Error("Invalid integer: " + v); - var r = [], max = v.length, l = LOG_BASE, min = max - l; - while (max > 0) { - r.push(+v.slice(min, max)); - min -= l; - if (min < 0) min = 0; - max -= l; - } - trim(r); - return new BigInteger(r, sign); - } - - function parseNumberValue(v) { - if (isPrecise(v)) { - if (v !== truncate(v)) throw new Error(v + " is not an integer."); - return new SmallInteger(v); - } - return parseStringValue(v.toString()); - } - - function parseValue(v) { - if (typeof v === "number") { - return parseNumberValue(v); - } - if (typeof v === "string") { - return parseStringValue(v); - } - return v; - } - // Pre-define numbers in range [-999,999] - for (var i = 0; i < 1000; i++) { - Integer[i] = new SmallInteger(i); - if (i > 0) Integer[-i] = new SmallInteger(-i); - } - // Backwards compatibility - Integer.one = Integer[1]; - Integer.zero = Integer[0]; - Integer.minusOne = Integer[-1]; - Integer.max = max; - Integer.min = min; - Integer.gcd = gcd; - Integer.lcm = lcm; - Integer.isInstance = function (x) { return x instanceof BigInteger || x instanceof SmallInteger; }; - Integer.randBetween = randBetween; - - Integer.fromArray = function (digits, base, isNegative) { - return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); - }; - - return Integer; -})(); - -// Node.js check -if (typeof module !== "undefined" && module.hasOwnProperty("exports")) { - module.exports = bigInt; -} - -//amd check -if (typeof define === "function" && define.amd) { - define("big-integer", [], function () { - return bigInt; - }); -} diff --git a/node_modules/cordova-android/node_modules/big-integer/BigInteger.min.js b/node_modules/cordova-android/node_modules/big-integer/BigInteger.min.js deleted file mode 100644 index 8ec9160..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/BigInteger.min.js +++ /dev/null @@ -1 +0,0 @@ -var bigInt=function(undefined){"use strict";var BASE=1e7,LOG_BASE=7,MAX_INT=9007199254740992,MAX_INT_ARR=smallToArray(MAX_INT),LOG_MAX_INT=Math.log(MAX_INT);function Integer(v,radix){if(typeof v==="undefined")return Integer[0];if(typeof radix!=="undefined")return+radix===10?parseValue(v):parseBase(v,radix);return parseValue(v)}function BigInteger(value,sign){this.value=value;this.sign=sign;this.isSmall=false}BigInteger.prototype=Object.create(Integer.prototype);function SmallInteger(value){this.value=value;this.sign=value<0;this.isSmall=true}SmallInteger.prototype=Object.create(Integer.prototype);function isPrecise(n){return-MAX_INT0)return Math.floor(n);return Math.ceil(n)}function add(a,b){var l_a=a.length,l_b=b.length,r=new Array(l_a),carry=0,base=BASE,sum,i;for(i=0;i=base?1:0;r[i]=sum-carry*base}while(i0)r.push(carry);return r}function addAny(a,b){if(a.length>=b.length)return add(a,b);return add(b,a)}function addSmall(a,carry){var l=a.length,r=new Array(l),base=BASE,sum,i;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}BigInteger.prototype.add=function(v){var n=parseValue(v);if(this.sign!==n.sign){return this.subtract(n.negate())}var a=this.value,b=n.value;if(n.isSmall){return new BigInteger(addSmall(a,Math.abs(b)),this.sign)}return new BigInteger(addAny(a,b),this.sign)};BigInteger.prototype.plus=BigInteger.prototype.add;SmallInteger.prototype.add=function(v){var n=parseValue(v);var a=this.value;if(a<0!==n.sign){return this.subtract(n.negate())}var b=n.value;if(n.isSmall){if(isPrecise(a+b))return new SmallInteger(a+b);b=smallToArray(Math.abs(b))}return new BigInteger(addSmall(b,Math.abs(a)),a<0)};SmallInteger.prototype.plus=SmallInteger.prototype.add;function subtract(a,b){var a_l=a.length,b_l=b.length,r=new Array(a_l),borrow=0,base=BASE,i,difference;for(i=0;i=0){value=subtract(a,b)}else{value=subtract(b,a);sign=!sign}value=arrayToSmall(value);if(typeof value==="number"){if(sign)value=-value;return new SmallInteger(value)}return new BigInteger(value,sign)}function subtractSmall(a,b,sign){var l=a.length,r=new Array(l),carry=-b,base=BASE,i,difference;for(i=0;i=0)};SmallInteger.prototype.minus=SmallInteger.prototype.subtract;BigInteger.prototype.negate=function(){return new BigInteger(this.value,!this.sign)};SmallInteger.prototype.negate=function(){var sign=this.sign;var small=new SmallInteger(-this.value);small.sign=!sign;return small};BigInteger.prototype.abs=function(){return new BigInteger(this.value,false)};SmallInteger.prototype.abs=function(){return new SmallInteger(Math.abs(this.value))};function multiplyLong(a,b){var a_l=a.length,b_l=b.length,l=a_l+b_l,r=createArray(l),base=BASE,product,carry,i,a_i,b_j;for(i=0;i0){r[i++]=carry%base;carry=Math.floor(carry/base)}return r}function shiftLeft(x,n){var r=[];while(n-- >0)r.push(0);return r.concat(x)}function multiplyKaratsuba(x,y){var n=Math.max(x.length,y.length);if(n<=30)return multiplyLong(x,y);n=Math.ceil(n/2);var b=x.slice(n),a=x.slice(0,n),d=y.slice(n),c=y.slice(0,n);var ac=multiplyKaratsuba(a,c),bd=multiplyKaratsuba(b,d),abcd=multiplyKaratsuba(addAny(a,b),addAny(c,d));var product=addAny(addAny(ac,shiftLeft(subtract(subtract(abcd,ac),bd),n)),shiftLeft(bd,2*n));trim(product);return product}function useKaratsuba(l1,l2){return-.012*l1-.012*l2+15e-6*l1*l2>0}BigInteger.prototype.multiply=function(v){var n=parseValue(v),a=this.value,b=n.value,sign=this.sign!==n.sign,abs;if(n.isSmall){if(b===0)return Integer[0];if(b===1)return this;if(b===-1)return this.negate();abs=Math.abs(b);if(abs=0;shift--){quotientDigit=base-1;if(remainder[shift+b_l]!==divisorMostSignificantDigit){quotientDigit=Math.floor((remainder[shift+b_l]*base+remainder[shift+b_l-1])/divisorMostSignificantDigit)}carry=0;borrow=0;l=divisor.length;for(i=0;ib_l){highx=(highx+1)*base}guess=Math.ceil(highx/highy);do{check=multiplySmall(b,guess);if(compareAbs(check,part)<=0)break;guess--}while(guess);result.push(guess);part=subtract(part,check)}result.reverse();return[arrayToSmall(result),arrayToSmall(part)]}function divModSmall(value,lambda){var length=value.length,quotient=createArray(length),base=BASE,i,q,remainder,divisor;remainder=0;for(i=length-1;i>=0;--i){divisor=remainder*base+value[i];q=truncate(divisor/lambda);remainder=divisor-q*lambda;quotient[i]=q|0}return[quotient,remainder|0]}function divModAny(self,v){var value,n=parseValue(v);var a=self.value,b=n.value;var quotient;if(b===0)throw new Error("Cannot divide by zero");if(self.isSmall){if(n.isSmall){return[new SmallInteger(truncate(a/b)),new SmallInteger(a%b)]}return[Integer[0],self]}if(n.isSmall){if(b===1)return[self,Integer[0]];if(b==-1)return[self.negate(),Integer[0]];var abs=Math.abs(b);if(absb.length?1:-1}for(var i=a.length-1;i>=0;i--){if(a[i]!==b[i])return a[i]>b[i]?1:-1}return 0}BigInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall)return 1;return compareAbs(a,b)};SmallInteger.prototype.compareAbs=function(v){var n=parseValue(v),a=Math.abs(this.value),b=n.value;if(n.isSmall){b=Math.abs(b);return a===b?0:a>b?1:-1}return-1};BigInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(this.sign!==n.sign){return n.sign?1:-1}if(n.isSmall){return this.sign?-1:1}return compareAbs(a,b)*(this.sign?-1:1)};BigInteger.prototype.compareTo=BigInteger.prototype.compare;SmallInteger.prototype.compare=function(v){if(v===Infinity){return-1}if(v===-Infinity){return 1}var n=parseValue(v),a=this.value,b=n.value;if(n.isSmall){return a==b?0:a>b?1:-1}if(a<0!==n.sign){return a<0?-1:1}return a<0?1:-1};SmallInteger.prototype.compareTo=SmallInteger.prototype.compare;BigInteger.prototype.equals=function(v){return this.compare(v)===0};SmallInteger.prototype.eq=SmallInteger.prototype.equals=BigInteger.prototype.eq=BigInteger.prototype.equals;BigInteger.prototype.notEquals=function(v){return this.compare(v)!==0};SmallInteger.prototype.neq=SmallInteger.prototype.notEquals=BigInteger.prototype.neq=BigInteger.prototype.notEquals;BigInteger.prototype.greater=function(v){return this.compare(v)>0};SmallInteger.prototype.gt=SmallInteger.prototype.greater=BigInteger.prototype.gt=BigInteger.prototype.greater;BigInteger.prototype.lesser=function(v){return this.compare(v)<0};SmallInteger.prototype.lt=SmallInteger.prototype.lesser=BigInteger.prototype.lt=BigInteger.prototype.lesser;BigInteger.prototype.greaterOrEquals=function(v){return this.compare(v)>=0};SmallInteger.prototype.geq=SmallInteger.prototype.greaterOrEquals=BigInteger.prototype.geq=BigInteger.prototype.greaterOrEquals;BigInteger.prototype.lesserOrEquals=function(v){return this.compare(v)<=0};SmallInteger.prototype.leq=SmallInteger.prototype.lesserOrEquals=BigInteger.prototype.leq=BigInteger.prototype.lesserOrEquals;BigInteger.prototype.isEven=function(){return(this.value[0]&1)===0};SmallInteger.prototype.isEven=function(){return(this.value&1)===0};BigInteger.prototype.isOdd=function(){return(this.value[0]&1)===1};SmallInteger.prototype.isOdd=function(){return(this.value&1)===1};BigInteger.prototype.isPositive=function(){return!this.sign};SmallInteger.prototype.isPositive=function(){return this.value>0};BigInteger.prototype.isNegative=function(){return this.sign};SmallInteger.prototype.isNegative=function(){return this.value<0};BigInteger.prototype.isUnit=function(){return false};SmallInteger.prototype.isUnit=function(){return Math.abs(this.value)===1};BigInteger.prototype.isZero=function(){return false};SmallInteger.prototype.isZero=function(){return this.value===0};BigInteger.prototype.isDivisibleBy=function(v){var n=parseValue(v);var value=n.value;if(value===0)return false;if(value===1)return true;if(value===2)return this.isEven();return this.mod(n).equals(Integer[0])};SmallInteger.prototype.isDivisibleBy=BigInteger.prototype.isDivisibleBy;function isBasicPrime(v){var n=v.abs();if(n.isUnit())return false;if(n.equals(2)||n.equals(3)||n.equals(5))return true;if(n.isEven()||n.isDivisibleBy(3)||n.isDivisibleBy(5))return false;if(n.lesser(25))return true}BigInteger.prototype.isPrime=function(){var isPrime=isBasicPrime(this);if(isPrime!==undefined)return isPrime;var n=this.abs(),nPrev=n.prev();var a=[2,3,5,7,11,13,17,19],b=nPrev,d,t,i,x;while(b.isEven())b=b.divide(2);for(i=0;i-MAX_INT)return new SmallInteger(value-1);return new BigInteger(MAX_INT_ARR,true)};var powersOfTwo=[1];while(2*powersOfTwo[powersOfTwo.length-1]<=BASE)powersOfTwo.push(2*powersOfTwo[powersOfTwo.length-1]);var powers2Length=powersOfTwo.length,highestPower2=powersOfTwo[powers2Length-1];function shift_isSmall(n){return(typeof n==="number"||typeof n==="string")&&+Math.abs(n)<=BASE||n instanceof BigInteger&&n.value.length<=1}BigInteger.prototype.shiftLeft=function(n){if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftRight(-n);var result=this;if(result.isZero())return result;while(n>=powers2Length){result=result.multiply(highestPower2);n-=powers2Length-1}return result.multiply(powersOfTwo[n])};SmallInteger.prototype.shiftLeft=BigInteger.prototype.shiftLeft;BigInteger.prototype.shiftRight=function(n){var remQuo;if(!shift_isSmall(n)){throw new Error(String(n)+" is too large for shifting.")}n=+n;if(n<0)return this.shiftLeft(-n);var result=this;while(n>=powers2Length){if(result.isZero()||result.isNegative()&&result.isUnit())return result;remQuo=divModAny(result,highestPower2);result=remQuo[1].isNegative()?remQuo[0].prev():remQuo[0];n-=powers2Length-1}remQuo=divModAny(result,powersOfTwo[n]);return remQuo[1].isNegative()?remQuo[0].prev():remQuo[0]};SmallInteger.prototype.shiftRight=BigInteger.prototype.shiftRight;function bitwise(x,y,fn){y=parseValue(y);var xSign=x.isNegative(),ySign=y.isNegative();var xRem=xSign?x.not():x,yRem=ySign?y.not():y;var xDigit=0,yDigit=0;var xDivMod=null,yDivMod=null;var result=[];while(!xRem.isZero()||!yRem.isZero()){xDivMod=divModAny(xRem,highestPower2);xDigit=xDivMod[1].toJSNumber();if(xSign){xDigit=highestPower2-1-xDigit}yDivMod=divModAny(yRem,highestPower2);yDigit=yDivMod[1].toJSNumber();if(ySign){yDigit=highestPower2-1-yDigit}xRem=xDivMod[0];yRem=yDivMod[0];result.push(fn(xDigit,yDigit))}var sum=fn(xSign?1:0,ySign?1:0)!==0?bigInt(-1):bigInt(0);for(var i=result.length-1;i>=0;i-=1){sum=sum.multiply(highestPower2).add(bigInt(result[i]))}return sum}BigInteger.prototype.not=function(){return this.negate().prev()};SmallInteger.prototype.not=BigInteger.prototype.not;BigInteger.prototype.and=function(n){return bitwise(this,n,function(a,b){return a&b})};SmallInteger.prototype.and=BigInteger.prototype.and;BigInteger.prototype.or=function(n){return bitwise(this,n,function(a,b){return a|b})};SmallInteger.prototype.or=BigInteger.prototype.or;BigInteger.prototype.xor=function(n){return bitwise(this,n,function(a,b){return a^b})};SmallInteger.prototype.xor=BigInteger.prototype.xor;var LOBMASK_I=1<<30,LOBMASK_BI=(BASE&-BASE)*(BASE&-BASE)|LOBMASK_I;function roughLOB(n){var v=n.value,x=typeof v==="number"?v|LOBMASK_I:v[0]+v[1]*BASE|LOBMASK_BI;return x&-x}function integerLogarithm(value,base){if(base.compareTo(value)<=0){var tmp=integerLogarithm(value,base.square(base));var p=tmp.p;var e=tmp.e;var t=p.multiply(base);return t.compareTo(value)<=0?{p:t,e:e*2+1}:{p:p,e:e*2}}return{p:bigInt(1),e:0}}BigInteger.prototype.bitLength=function(){var n=this;if(n.compareTo(bigInt(0))<0){n=n.negate().subtract(bigInt(1))}if(n.compareTo(bigInt(0))===0){return bigInt(0)}return bigInt(integerLogarithm(n,bigInt(2)).e).add(bigInt(1))};SmallInteger.prototype.bitLength=BigInteger.prototype.bitLength;function max(a,b){a=parseValue(a);b=parseValue(b);return a.greater(b)?a:b}function min(a,b){a=parseValue(a);b=parseValue(b);return a.lesser(b)?a:b}function gcd(a,b){a=parseValue(a).abs();b=parseValue(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var c=Integer[1],d,t;while(a.isEven()&&b.isEven()){d=Math.min(roughLOB(a),roughLOB(b));a=a.divide(d);b=b.divide(d);c=c.multiply(d)}while(a.isEven()){a=a.divide(roughLOB(a))}do{while(b.isEven()){b=b.divide(roughLOB(b))}if(a.greater(b)){t=b;b=a;a=t}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function lcm(a,b){a=parseValue(a).abs();b=parseValue(b).abs();return a.divide(gcd(a,b)).multiply(b)}function randBetween(a,b){a=parseValue(a);b=parseValue(b);var low=min(a,b),high=max(a,b);var range=high.subtract(low).add(1);if(range.isSmall)return low.add(Math.floor(Math.random()*range));var length=range.value.length-1;var result=[],restricted=true;for(var i=length;i>=0;i--){var top=restricted?range.value[i]:BASE;var digit=truncate(Math.random()*top);result.unshift(digit);if(digit=absBase){if(c==="1"&&absBase===1)continue;throw new Error(c+" is not a valid digit in base "+base+".")}else if(c.charCodeAt(0)-87>=absBase){throw new Error(c+" is not a valid digit in base "+base+".")}}}if(2<=base&&base<=36){if(length<=LOG_MAX_INT/Math.log(base)){var result=parseInt(text,base);if(isNaN(result)){throw new Error(c+" is not a valid digit in base "+base+".")}return new SmallInteger(parseInt(text,base))}}base=parseValue(base);var digits=[];var isNegative=text[0]==="-";for(i=isNegative?1:0;i");digits.push(parseValue(text.slice(start+1,i)))}else throw new Error(c+" is not a valid character")}return parseBaseFromArray(digits,base,isNegative)};function parseBaseFromArray(digits,base,isNegative){var val=Integer[0],pow=Integer[1],i;for(i=digits.length-1;i>=0;i--){val=val.add(digits[i].times(pow));pow=pow.times(base)}return isNegative?val.negate():val}function stringify(digit){if(digit<=35){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(digit)}return"<"+digit+">"}function toBase(n,base){base=bigInt(base);if(base.isZero()){if(n.isZero())return{value:[0],isNegative:false};throw new Error("Cannot convert nonzero numbers to base 0.")}if(base.equals(-1)){if(n.isZero())return{value:[0],isNegative:false};if(n.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-n)).map(Array.prototype.valueOf,[1,0])),isNegative:false};var arr=Array.apply(null,Array(+n-1)).map(Array.prototype.valueOf,[0,1]);arr.unshift([1]);return{value:[].concat.apply([],arr),isNegative:false}}var neg=false;if(n.isNegative()&&base.isPositive()){neg=true;n=n.abs()}if(base.equals(1)){if(n.isZero())return{value:[0],isNegative:false};return{value:Array.apply(null,Array(+n)).map(Number.prototype.valueOf,1),isNegative:neg}}var out=[];var left=n,divmod;while(left.isNegative()||left.compareAbs(base)>=0){divmod=left.divmod(base);left=divmod.quotient;var digit=divmod.remainder;if(digit.isNegative()){digit=base.minus(digit).abs();left=left.next()}out.push(digit.toJSNumber())}out.push(left.toJSNumber());return{value:out.reverse(),isNegative:neg}}function toBaseString(n,base){var arr=toBase(n,base);return(arr.isNegative?"-":"")+arr.value.map(stringify).join("")}BigInteger.prototype.toArray=function(radix){return toBase(this,radix)};SmallInteger.prototype.toArray=function(radix){return toBase(this,radix)};BigInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!==10)return toBaseString(this,radix);var v=this.value,l=v.length,str=String(v[--l]),zeros="0000000",digit;while(--l>=0){digit=String(v[l]);str+=zeros.slice(digit.length)+digit}var sign=this.sign?"-":"";return sign+str};SmallInteger.prototype.toString=function(radix){if(radix===undefined)radix=10;if(radix!=10)return toBaseString(this,radix);return String(this.value)};BigInteger.prototype.toJSON=SmallInteger.prototype.toJSON=function(){return this.toString()};BigInteger.prototype.valueOf=function(){return parseInt(this.toString(),10)};BigInteger.prototype.toJSNumber=BigInteger.prototype.valueOf;SmallInteger.prototype.valueOf=function(){return this.value};SmallInteger.prototype.toJSNumber=SmallInteger.prototype.valueOf;function parseStringValue(v){if(isPrecise(+v)){var x=+v;if(x===truncate(x))return new SmallInteger(x);throw new Error("Invalid integer: "+v)}var sign=v[0]==="-";if(sign)v=v.slice(1);var split=v.split(/e/i);if(split.length>2)throw new Error("Invalid integer: "+split.join("e"));if(split.length===2){var exp=split[1];if(exp[0]==="+")exp=exp.slice(1);exp=+exp;if(exp!==truncate(exp)||!isPrecise(exp))throw new Error("Invalid integer: "+exp+" is not a valid exponent.");var text=split[0];var decimalPlace=text.indexOf(".");if(decimalPlace>=0){exp-=text.length-decimalPlace-1;text=text.slice(0,decimalPlace)+text.slice(decimalPlace+1)}if(exp<0)throw new Error("Cannot include negative exponent part for integers");text+=new Array(exp+1).join("0");v=text}var isValid=/^([0-9][0-9]*)$/.test(v);if(!isValid)throw new Error("Invalid integer: "+v);var r=[],max=v.length,l=LOG_BASE,min=max-l;while(max>0){r.push(+v.slice(min,max));min-=l;if(min<0)min=0;max-=l}trim(r);return new BigInteger(r,sign)}function parseNumberValue(v){if(isPrecise(v)){if(v!==truncate(v))throw new Error(v+" is not an integer.");return new SmallInteger(v)}return parseStringValue(v.toString())}function parseValue(v){if(typeof v==="number"){return parseNumberValue(v)}if(typeof v==="string"){return parseStringValue(v)}return v}for(var i=0;i<1e3;i++){Integer[i]=new SmallInteger(i);if(i>0)Integer[-i]=new SmallInteger(-i)}Integer.one=Integer[1];Integer.zero=Integer[0];Integer.minusOne=Integer[-1];Integer.max=max;Integer.min=min;Integer.gcd=gcd;Integer.lcm=lcm;Integer.isInstance=function(x){return x instanceof BigInteger||x instanceof SmallInteger};Integer.randBetween=randBetween;Integer.fromArray=function(digits,base,isNegative){return parseBaseFromArray(digits.map(parseValue),parseValue(base||10),isNegative)};return Integer}();if(typeof module!=="undefined"&&module.hasOwnProperty("exports")){module.exports=bigInt}if(typeof define==="function"&&define.amd){define("big-integer",[],function(){return bigInt})} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/big-integer/LICENSE b/node_modules/cordova-android/node_modules/big-integer/LICENSE deleted file mode 100644 index cf1ab25..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -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. - -For more information, please refer to diff --git a/node_modules/cordova-android/node_modules/big-integer/README.md b/node_modules/cordova-android/node_modules/big-integer/README.md deleted file mode 100644 index 55ab8d3..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/README.md +++ /dev/null @@ -1,570 +0,0 @@ -# BigInteger.js [![Build Status][travis-img]][travis-url] [![Coverage Status][coveralls-img]][coveralls-url] [![Monthly Downloads][downloads-img]][downloads-url] - -[travis-url]: https://travis-ci.org/peterolson/BigInteger.js -[travis-img]: https://travis-ci.org/peterolson/BigInteger.js.svg?branch=master -[coveralls-url]: https://coveralls.io/github/peterolson/BigInteger.js?branch=master -[coveralls-img]: https://coveralls.io/repos/peterolson/BigInteger.js/badge.svg?branch=master&service=github -[downloads-url]: https://www.npmjs.com/package/big-integer -[downloads-img]: https://img.shields.io/npm/dm/big-integer.svg - -**BigInteger.js** is an arbitrary-length integer library for Javascript, allowing arithmetic operations on integers of unlimited size, notwithstanding memory and time limitations. - -## Installation - -If you are using a browser, you can download [BigInteger.js from GitHub](http://peterolson.github.com/BigInteger.js/BigInteger.min.js) or just hotlink to it: - - - -If you are using node, you can install BigInteger with [npm](https://npmjs.org/). - - npm install big-integer - -Then you can include it in your code: - - var bigInt = require("big-integer"); - - -## Usage -### `bigInt(number, [base])` - -You can create a bigInt by calling the `bigInt` function. You can pass in - - - a string, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. - - a Javascript number, which it will parse as an bigInt and throw an `"Invalid integer"` error if the parsing fails. - - another bigInt. - - nothing, and it will return `bigInt.zero`. - - If you provide a second parameter, then it will parse `number` as a number in base `base`. Note that `base` can be any bigInt (even negative or zero). The letters "a-z" and "A-Z" will be interpreted as the numbers 10 to 35. Higher digits can be specified in angle brackets (`<` and `>`). - -Examples: - - var zero = bigInt(); - var ninetyThree = bigInt(93); - var largeNumber = bigInt("75643564363473453456342378564387956906736546456235345"); - var googol = bigInt("1e100"); - var bigNumber = bigInt(largeNumber); - - var maximumByte = bigInt("FF", 16); - var fiftyFiveGoogol = bigInt("<55>0", googol); - -Note that Javascript numbers larger than `9007199254740992` and smaller than `-9007199254740992` are not precisely represented numbers and will not produce exact results. If you are dealing with numbers outside that range, it is better to pass in strings. - -### Method Chaining - -Note that bigInt operations return bigInts, which allows you to chain methods, for example: - - var salary = bigInt(dollarsPerHour).times(hoursWorked).plus(randomBonuses) - -### Constants - -There are three named constants already stored that you do not have to construct with the `bigInt` function yourself: - - - `bigInt.one`, equivalent to `bigInt(1)` - - `bigInt.zero`, equivalent to `bigInt(0)` - - `bigInt.minusOne`, equivalent to `bigInt(-1)` - -The numbers from -999 to 999 are also already prestored and can be accessed using `bigInt[index]`, for example: - - - `bigInt[-999]`, equivalent to `bigInt(-999)` - - `bigInt[256]`, equivalent to `bigInt(256)` - -### Methods - -#### `abs()` - -Returns the absolute value of a bigInt. - - - `bigInt(-45).abs()` => `45` - - `bigInt(45).abs()` => `45` - -#### `add(number)` - -Performs addition. - - - `bigInt(5).add(7)` => `12` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) - -#### `and(number)` - -Performs the bitwise AND operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). - - - `bigInt(6).and(3)` => `2` - - `bigInt(6).and(-3)` => `4` - -#### `bitLength()` - -Returns the number of digits required to represent a bigInt in binary. - - - `bigInt(5)` => `3` (since 5 is `101` in binary, which is three digits long) - -#### `compare(number)` - -Performs a comparison between two numbers. If the numbers are equal, it returns `0`. If the first number is greater, it returns `1`. If the first number is lesser, it returns `-1`. - - - `bigInt(5).compare(5)` => `0` - - `bigInt(5).compare(4)` => `1` - - `bigInt(4).compare(5)` => `-1` - -#### `compareAbs(number)` - -Performs a comparison between the absolute value of two numbers. - - - `bigInt(5).compareAbs(-5)` => `0` - - `bigInt(5).compareAbs(4)` => `1` - - `bigInt(4).compareAbs(-5)` => `-1` - -#### `compareTo(number)` - -Alias for the `compare` method. - -#### `divide(number)` - -Performs integer division, disregarding the remainder. - - - `bigInt(59).divide(5)` => `11` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) - -#### `divmod(number)` - -Performs division and returns an object with two properties: `quotient` and `remainder`. The sign of the remainder will match the sign of the dividend. - - - `bigInt(59).divmod(5)` => `{quotient: bigInt(11), remainder: bigInt(4) }` - - `bigInt(-5).divmod(2)` => `{quotient: bigInt(-2), remainder: bigInt(-1) }` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) - -#### `eq(number)` - -Alias for the `equals` method. - -#### `equals(number)` - -Checks if two numbers are equal. - - - `bigInt(5).equals(5)` => `true` - - `bigInt(4).equals(7)` => `false` - -#### `geq(number)` - -Alias for the `greaterOrEquals` method. - - -#### `greater(number)` - -Checks if the first number is greater than the second. - - - `bigInt(5).greater(6)` => `false` - - `bigInt(5).greater(5)` => `false` - - `bigInt(5).greater(4)` => `true` - -#### `greaterOrEquals(number)` - -Checks if the first number is greater than or equal to the second. - - - `bigInt(5).greaterOrEquals(6)` => `false` - - `bigInt(5).greaterOrEquals(5)` => `true` - - `bigInt(5).greaterOrEquals(4)` => `true` - -#### `gt(number)` - -Alias for the `greater` method. - -#### `isDivisibleBy(number)` - -Returns `true` if the first number is divisible by the second number, `false` otherwise. - - - `bigInt(999).isDivisibleBy(333)` => `true` - - `bigInt(99).isDivisibleBy(5)` => `false` - -#### `isEven()` - -Returns `true` if the number is even, `false` otherwise. - - - `bigInt(6).isEven()` => `true` - - `bigInt(3).isEven()` => `false` - -#### `isNegative()` - -Returns `true` if the number is negative, `false` otherwise. -Returns `false` for `0` and `-0`. - - - `bigInt(-23).isNegative()` => `true` - - `bigInt(50).isNegative()` => `false` - -#### `isOdd()` - -Returns `true` if the number is odd, `false` otherwise. - - - `bigInt(13).isOdd()` => `true` - - `bigInt(40).isOdd()` => `false` - -#### `isPositive()` - -Return `true` if the number is positive, `false` otherwise. -Returns `false` for `0` and `-0`. - - - `bigInt(54).isPositive()` => `true` - - `bigInt(-1).isPositive()` => `false` - -#### `isPrime()` - -Returns `true` if the number is prime, `false` otherwise. - - - `bigInt(5).isPrime()` => `true` - - `bigInt(6).isPrime()` => `false` - -#### `isProbablePrime([iterations])` - -Returns `true` if the number is very likely to be prime, `false` otherwise. -Argument is optional and determines the amount of iterations of the test (default: `5`). The more iterations, the lower chance of getting a false positive. -This uses the [Fermat primality test](https://en.wikipedia.org/wiki/Fermat_primality_test). - - - `bigInt(5).isProbablePrime()` => `true` - - `bigInt(49).isProbablePrime()` => `false` - - `bigInt(1729).isProbablePrime(50)` => `false` - -Note that this function is not deterministic, since it relies on random sampling of factors, so the result for some numbers is not always the same. [Carmichael numbers](https://en.wikipedia.org/wiki/Carmichael_number) are particularly prone to give unreliable results. - -For example, `bigInt(1729).isProbablePrime()` returns `false` about 76% of the time and `true` about 24% of the time. The correct result is `false`. - -#### `isUnit()` - -Returns `true` if the number is `1` or `-1`, `false` otherwise. - - - `bigInt.one.isUnit()` => `true` - - `bigInt.minusOne.isUnit()` => `true` - - `bigInt(5).isUnit()` => `false` - -#### `isZero()` - -Return `true` if the number is `0` or `-0`, `false` otherwise. - - - `bigInt.zero.isZero()` => `true` - - `bigInt("-0").isZero()` => `true` - - `bigInt(50).isZero()` => `false` - -#### `leq(number)` - -Alias for the `lesserOrEquals` method. - -#### `lesser(number)` - -Checks if the first number is lesser than the second. - - - `bigInt(5).lesser(6)` => `true` - - `bigInt(5).lesser(5)` => `false` - - `bigInt(5).lesser(4)` => `false` - -#### `lesserOrEquals(number)` - -Checks if the first number is less than or equal to the second. - - - `bigInt(5).lesserOrEquals(6)` => `true` - - `bigInt(5).lesserOrEquals(5)` => `true` - - `bigInt(5).lesserOrEquals(4)` => `false` - -#### `lt(number)` - -Alias for the `lesser` method. - -#### `minus(number)` - -Alias for the `subtract` method. - - - `bigInt(3).minus(5)` => `-2` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) - -#### `mod(number)` - -Performs division and returns the remainder, disregarding the quotient. The sign of the remainder will match the sign of the dividend. - - - `bigInt(59).mod(5)` => `4` - - `bigInt(-5).mod(2)` => `-1` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) - -#### `modInv(mod)` - -Finds the [multiplicative inverse](https://en.wikipedia.org/wiki/Modular_multiplicative_inverse) of the number modulo `mod`. - - - `bigInt(3).modInv(11)` => `4` - - `bigInt(42).modInv(2017)` => `1969` - -#### `modPow(exp, mod)` - -Takes the number to the power `exp` modulo `mod`. - - - `bigInt(10).modPow(3, 30)` => `10` - -#### `multiply(number)` - -Performs multiplication. - - - `bigInt(111).multiply(111)` => `12321` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) - -#### `neq(number)` - -Alias for the `notEquals` method. - -#### `next()` - -Adds one to the number. - - - `bigInt(6).next()` => `7` - -#### `not()` - -Performs the bitwise NOT operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). - - - `bigInt(10).not()` => `-11` - - `bigInt(0).not()` => `-1` - -#### `notEquals(number)` - -Checks if two numbers are not equal. - - - `bigInt(5).notEquals(5)` => `false` - - `bigInt(4).notEquals(7)` => `true` - -#### `or(number)` - -Performs the bitwise OR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). - - - `bigInt(13).or(10)` => `15` - - `bigInt(13).or(-8)` => `-3` - -#### `over(number)` - -Alias for the `divide` method. - - - `bigInt(59).over(5)` => `11` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) - -#### `plus(number)` - -Alias for the `add` method. - - - `bigInt(5).plus(7)` => `12` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Addition) - -#### `pow(number)` - -Performs exponentiation. If the exponent is less than `0`, `pow` returns `0`. `bigInt.zero.pow(0)` returns `1`. - - - `bigInt(16).pow(16)` => `18446744073709551616` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Exponentiation) - -#### `prev(number)` - -Subtracts one from the number. - - - `bigInt(6).prev()` => `5` - -#### `remainder(number)` - -Alias for the `mod` method. - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Division) - -#### `shiftLeft(n)` - -Shifts the number left by `n` places in its binary representation. If a negative number is provided, it will shift right. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. - - - `bigInt(8).shiftLeft(2)` => `32` - - `bigInt(8).shiftLeft(-2)` => `2` - -#### `shiftRight(n)` - -Shifts the number right by `n` places in its binary representation. If a negative number is provided, it will shift left. Throws an error if `n` is outside of the range `[-9007199254740992, 9007199254740992]`. - - - `bigInt(8).shiftRight(2)` => `2` - - `bigInt(8).shiftRight(-2)` => `32` - -#### `square()` - -Squares the number - - - `bigInt(3).square()` => `9` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Squaring) - -#### `subtract(number)` - -Performs subtraction. - - - `bigInt(3).subtract(5)` => `-2` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Subtraction) - -#### `times(number)` - -Alias for the `multiply` method. - - - `bigInt(111).times(111)` => `12321` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#Multiplication) - -#### `toArray(radix)` - -Converts a bigInt into an object with the properties "value" and "isNegative." "Value" is an array of integers modulo the given radix. "isNegative" is a boolean that represents the sign of the result. - - - `bigInt("1e9").toArray(10)` => { - value: [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], - isNegative: false - } - - `bigInt("1e9").toArray(16)` => { - value: [3, 11, 9, 10, 12, 10, 0, 0], - isNegative: false - } - - `bigInt(567890).toArray(100)` => { - value: [56, 78, 90], - isNegative: false - } - -Negative bases are supported. - - - `bigInt(12345).toArray(-10)` => { - value: [2, 8, 4, 6, 5], - isNegative: false - } - -Base 1 and base -1 are also supported. - - - `bigInt(-15).toArray(1)` => { - value: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], - isNegative: true - } - - `bigInt(-15).toArray(-1)` => { - value: [1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, - 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], - isNegative: false - } - -Base 0 is only allowed for the number zero. - - - `bigInt(0).toArray(0)` => { - value: [0], - isNegative: false - } - - `bigInt(1).toArray(0)` => `Error: Cannot convert nonzero numbers to base 0.` - -#### `toJSNumber()` - -Converts a bigInt into a native Javascript number. Loses precision for numbers outside the range `[-9007199254740992, 9007199254740992]`. - - - `bigInt("18446744073709551616").toJSNumber()` => `18446744073709552000` - -#### `xor(number)` - -Performs the bitwise XOR operation. The operands are treated as if they were represented using [two's complement representation](http://en.wikipedia.org/wiki/Two%27s_complement). - - - `bigInt(12).xor(5)` => `9` - - `bigInt(12).xor(-5)` => `-9` - -### Static Methods - -#### `fromArray(digits, base = 10, isNegative?)` - -Constructs a bigInt from an array of digits in base `base`. The optional `isNegative` flag will make the number negative. - - - `bigInt.fromArray([1, 2, 3, 4, 5], 10)` => `12345` - - `bigInt.fromArray([1, 0, 0], 2, true)` => `-4` - -#### `gcd(a, b)` - -Finds the greatest common denominator of `a` and `b`. - - - `bigInt.gcd(42,56)` => `14` - -#### `isInstance(x)` - -Returns `true` if `x` is a BigInteger, `false` otherwise. - - - `bigInt.isInstance(bigInt(14))` => `true` - - `bigInt.isInstance(14)` => `false` - -#### `lcm(a,b)` - -Finds the least common multiple of `a` and `b`. - - - `bigInt.lcm(21, 6)` => `42` - -#### `max(a,b)` - -Returns the largest of `a` and `b`. - - - `bigInt.max(77, 432)` => `432` - -#### `min(a,b)` - -Returns the smallest of `a` and `b`. - - - `bigInt.min(77, 432)` => `77` - -#### `randBetween(min, max)` - -Returns a random number between `min` and `max`. - - - `bigInt.randBetween("-1e100", "1e100")` => (for example) `8494907165436643479673097939554427056789510374838494147955756275846226209006506706784609314471378745` - - -### Override Methods - -#### `toString(radix = 10)` - -Converts a bigInt to a string. There is an optional radix parameter (which defaults to 10) that converts the number to the given radix. Digits in the range `10-35` will use the letters `a-z`. - - - `bigInt("1e9").toString()` => `"1000000000"` - - `bigInt("1e9").toString(16)` => `"3b9aca00"` - -**Note that arithmetical operators will trigger the `valueOf` function rather than the `toString` function.** When converting a bigInteger to a string, you should use the `toString` method or the `String` function instead of adding the empty string. - - - `bigInt("999999999999999999").toString()` => `"999999999999999999"` - - `String(bigInt("999999999999999999"))` => `"999999999999999999"` - - `bigInt("999999999999999999") + ""` => `1000000000000000000` - -Bases larger than 36 are supported. If a digit is greater than or equal to 36, it will be enclosed in angle brackets. - - - `bigInt(567890).toString(100)` => `"<56><78><90>"` - -Negative bases are also supported. - - - `bigInt(12345).toString(-10)` => `"28465"` - -Base 1 and base -1 are also supported. - - - `bigInt(-15).toString(1)` => `"-111111111111111"` - - `bigInt(-15).toString(-1)` => `"101010101010101010101010101010"` - -Base 0 is only allowed for the number zero. - - - `bigInt(0).toString(0)` => `0` - - `bigInt(1).toString(0)` => `Error: Cannot convert nonzero numbers to base 0.` - -[View benchmarks for this method](http://peterolson.github.io/BigInteger.js/benchmark/#toString) - -#### `valueOf()` - -Converts a bigInt to a native Javascript number. This override allows you to use native arithmetic operators without explicit conversion: - - - `bigInt("100") + bigInt("200") === 300; //true` - -## Contributors - -To contribute, just fork the project, make some changes, and submit a pull request. Please verify that the unit tests pass before submitting. - -The unit tests are contained in the `spec/spec.js` file. You can run them locally by opening the `spec/SpecRunner.html` or file or running `npm test`. You can also [run the tests online from GitHub](http://peterolson.github.io/BigInteger.js/spec/SpecRunner.html). - -There are performance benchmarks that can be viewed from the `benchmarks/index.html` page. You can [run them online from GitHub](http://peterolson.github.io/BigInteger.js/benchmark/). - -## License - -This project is public domain. For more details, read about the [Unlicense](http://unlicense.org/). diff --git a/node_modules/cordova-android/node_modules/big-integer/bower.json b/node_modules/cordova-android/node_modules/big-integer/bower.json deleted file mode 100644 index 22dc58f..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/bower.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "big-integer", - "description": "An arbitrary length integer library for Javascript", - "main": "./BigInteger.js", - "authors": [ - "Peter Olson" - ], - "license": "Unlicense", - "keywords": [ - "math", - "big", - "bignum", - "bigint", - "biginteger", - "integer", - "arbitrary", - "precision", - "arithmetic" - ], - "homepage": "https://github.com/peterolson/BigInteger.js", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "coverage", - "tests" - ] -} diff --git a/node_modules/cordova-android/node_modules/big-integer/package.json b/node_modules/cordova-android/node_modules/big-integer/package.json deleted file mode 100644 index 867c19e..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "big-integer@^1.6.7", - "_id": "big-integer@1.6.32", - "_inBundle": true, - "_integrity": "sha512-ljKJdR3wk9thHfLj4DtrNiOSTxvGFaMjWrG4pW75juXC4j7+XuKJVFdg4kgFMYp85PVkO05dFMj2dk2xVsH4xw==", - "_location": "/cordova-android/big-integer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "big-integer@^1.6.7", - "name": "big-integer", - "escapedName": "big-integer", - "rawSpec": "^1.6.7", - "saveSpec": null, - "fetchSpec": "^1.6.7" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/bplist-parser" - ], - "_resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.32.tgz", - "_shasum": "5867458b25ecd5bcb36b627c30bb501a13c07e89", - "_spec": "big-integer@^1.6.7", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/bplist-parser", - "author": { - "name": "Peter Olson", - "email": "peter.e.c.olson+npm@gmail.com" - }, - "bin": {}, - "bugs": { - "url": "https://github.com/peterolson/BigInteger.js/issues" - }, - "bundleDependencies": false, - "contributors": [], - "deprecated": false, - "description": "An arbitrary length integer library for Javascript", - "devDependencies": { - "@types/lodash": "^4.14.109", - "@types/node": "^7.0.65", - "coveralls": "^2.11.4", - "jasmine": "2.1.x", - "jasmine-core": "^2.3.4", - "karma": "^0.13.22", - "karma-cli": "^1.0.1", - "karma-coverage": "^0.4.2", - "karma-jasmine": "^0.3.6", - "karma-phantomjs-launcher": "^1.0.4", - "lodash": "^4.17.4", - "typescript": "^2.3.3", - "uglifyjs": "^2.4.10" - }, - "engines": { - "node": ">=0.6" - }, - "homepage": "https://github.com/peterolson/BigInteger.js#readme", - "keywords": [ - "math", - "big", - "bignum", - "bigint", - "biginteger", - "integer", - "arbitrary", - "precision", - "arithmetic" - ], - "license": "Unlicense", - "main": "./BigInteger", - "name": "big-integer", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/peterolson/BigInteger.js.git" - }, - "scripts": { - "minify": "uglifyjs BigInteger.js -o BigInteger.min.js", - "test": "tsc && karma start my.conf.js && node spec/tsDefinitions.js" - }, - "typings": "./BigInteger.d.ts", - "version": "1.6.32" -} diff --git a/node_modules/cordova-android/node_modules/big-integer/tsconfig.json b/node_modules/cordova-android/node_modules/big-integer/tsconfig.json deleted file mode 100644 index 62636e8..0000000 --- a/node_modules/cordova-android/node_modules/big-integer/tsconfig.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "lib": [ - "es6" - ], - "noImplicitAny": true, - "noImplicitThis": true, - "strictNullChecks": false, - "baseUrl": "./", - "moduleResolution": "node", - "allowJs": true, - "typeRoots": [ - "./" - ], - "types": [ - "node" - ], - "forceConsistentCasingInFileNames": true - }, - "files": [ - "BigInteger.d.ts", - "spec/tsDefinitions.ts" - ] -} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/bplist-parser/.npmignore b/node_modules/cordova-android/node_modules/bplist-parser/.npmignore deleted file mode 100644 index a9b46ea..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -/build/* -node_modules -*.node -*.sh -*.swp -.lock* -npm-debug.log -.idea diff --git a/node_modules/cordova-android/node_modules/bplist-parser/README.md b/node_modules/cordova-android/node_modules/bplist-parser/README.md deleted file mode 100644 index 37e5e1c..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/README.md +++ /dev/null @@ -1,47 +0,0 @@ -bplist-parser -============= - -Binary Mac OS X Plist (property list) parser. - -## Installation - -```bash -$ npm install bplist-parser -``` - -## Quick Examples - -```javascript -var bplist = require('bplist-parser'); - -bplist.parseFile('myPlist.bplist', function(err, obj) { - if (err) throw err; - - console.log(JSON.stringify(obj)); -}); -``` - -## License - -(The MIT License) - -Copyright (c) 2012 Near Infinity Corporation - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/bplist-parser/bplistParser.js b/node_modules/cordova-android/node_modules/bplist-parser/bplistParser.js deleted file mode 100644 index f8335bc..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/bplistParser.js +++ /dev/null @@ -1,357 +0,0 @@ -'use strict'; - -// adapted from http://code.google.com/p/plist/source/browse/trunk/src/com/dd/plist/BinaryPropertyListParser.java - -var fs = require('fs'); -var bigInt = require("big-integer"); -var debug = false; - -exports.maxObjectSize = 100 * 1000 * 1000; // 100Meg -exports.maxObjectCount = 32768; - -// EPOCH = new SimpleDateFormat("yyyy MM dd zzz").parse("2001 01 01 GMT").getTime(); -// ...but that's annoying in a static initializer because it can throw exceptions, ick. -// So we just hardcode the correct value. -var EPOCH = 978307200000; - -// UID object definition -var UID = exports.UID = function(id) { - this.UID = id; -} - -var parseFile = exports.parseFile = function (fileNameOrBuffer, callback) { - function tryParseBuffer(buffer) { - var err = null; - var result; - try { - result = parseBuffer(buffer); - } catch (ex) { - err = ex; - } - callback(err, result); - } - - if (Buffer.isBuffer(fileNameOrBuffer)) { - return tryParseBuffer(fileNameOrBuffer); - } else { - fs.readFile(fileNameOrBuffer, function (err, data) { - if (err) { return callback(err); } - tryParseBuffer(data); - }); - } -}; - -var parseBuffer = exports.parseBuffer = function (buffer) { - var result = {}; - - // check header - var header = buffer.slice(0, 'bplist'.length).toString('utf8'); - if (header !== 'bplist') { - throw new Error("Invalid binary plist. Expected 'bplist' at offset 0."); - } - - // Handle trailer, last 32 bytes of the file - var trailer = buffer.slice(buffer.length - 32, buffer.length); - // 6 null bytes (index 0 to 5) - var offsetSize = trailer.readUInt8(6); - if (debug) { - console.log("offsetSize: " + offsetSize); - } - var objectRefSize = trailer.readUInt8(7); - if (debug) { - console.log("objectRefSize: " + objectRefSize); - } - var numObjects = readUInt64BE(trailer, 8); - if (debug) { - console.log("numObjects: " + numObjects); - } - var topObject = readUInt64BE(trailer, 16); - if (debug) { - console.log("topObject: " + topObject); - } - var offsetTableOffset = readUInt64BE(trailer, 24); - if (debug) { - console.log("offsetTableOffset: " + offsetTableOffset); - } - - if (numObjects > exports.maxObjectCount) { - throw new Error("maxObjectCount exceeded"); - } - - // Handle offset table - var offsetTable = []; - - for (var i = 0; i < numObjects; i++) { - var offsetBytes = buffer.slice(offsetTableOffset + i * offsetSize, offsetTableOffset + (i + 1) * offsetSize); - offsetTable[i] = readUInt(offsetBytes, 0); - if (debug) { - console.log("Offset for Object #" + i + " is " + offsetTable[i] + " [" + offsetTable[i].toString(16) + "]"); - } - } - - // Parses an object inside the currently parsed binary property list. - // For the format specification check - // - // Apple's binary property list parser implementation. - function parseObject(tableOffset) { - var offset = offsetTable[tableOffset]; - var type = buffer[offset]; - var objType = (type & 0xF0) >> 4; //First 4 bits - var objInfo = (type & 0x0F); //Second 4 bits - switch (objType) { - case 0x0: - return parseSimple(); - case 0x1: - return parseInteger(); - case 0x8: - return parseUID(); - case 0x2: - return parseReal(); - case 0x3: - return parseDate(); - case 0x4: - return parseData(); - case 0x5: // ASCII - return parsePlistString(); - case 0x6: // UTF-16 - return parsePlistString(true); - case 0xA: - return parseArray(); - case 0xD: - return parseDictionary(); - default: - throw new Error("Unhandled type 0x" + objType.toString(16)); - } - - function parseSimple() { - //Simple - switch (objInfo) { - case 0x0: // null - return null; - case 0x8: // false - return false; - case 0x9: // true - return true; - case 0xF: // filler byte - return null; - default: - throw new Error("Unhandled simple type 0x" + objType.toString(16)); - } - } - - function bufferToHexString(buffer) { - var str = ''; - var i; - for (i = 0; i < buffer.length; i++) { - if (buffer[i] != 0x00) { - break; - } - } - for (; i < buffer.length; i++) { - var part = '00' + buffer[i].toString(16); - str += part.substr(part.length - 2); - } - return str; - } - - function parseInteger() { - var length = Math.pow(2, objInfo); - if (length > 4) { - var data = buffer.slice(offset + 1, offset + 1 + length); - var str = bufferToHexString(data); - return bigInt(str, 16); - } if (length < exports.maxObjectSize) { - return readUInt(buffer.slice(offset + 1, offset + 1 + length)); - } else { - throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); - } - } - - function parseUID() { - var length = objInfo + 1; - if (length < exports.maxObjectSize) { - return new UID(readUInt(buffer.slice(offset + 1, offset + 1 + length))); - } else { - throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); - } - } - - function parseReal() { - var length = Math.pow(2, objInfo); - if (length < exports.maxObjectSize) { - var realBuffer = buffer.slice(offset + 1, offset + 1 + length); - if (length === 4) { - return realBuffer.readFloatBE(0); - } - else if (length === 8) { - return realBuffer.readDoubleBE(0); - } - } else { - throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); - } - } - - function parseDate() { - if (objInfo != 0x3) { - console.error("Unknown date type :" + objInfo + ". Parsing anyway..."); - } - var dateBuffer = buffer.slice(offset + 1, offset + 9); - return new Date(EPOCH + (1000 * dateBuffer.readDoubleBE(0))); - } - - function parseData() { - var dataoffset = 1; - var length = objInfo; - if (objInfo == 0xF) { - var int_type = buffer[offset + 1]; - var intType = (int_type & 0xF0) / 0x10; - if (intType != 0x1) { - console.error("0x4: UNEXPECTED LENGTH-INT TYPE! " + intType); - } - var intInfo = int_type & 0x0F; - var intLength = Math.pow(2, intInfo); - dataoffset = 2 + intLength; - if (intLength < 3) { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } else { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } - } - if (length < exports.maxObjectSize) { - return buffer.slice(offset + dataoffset, offset + dataoffset + length); - } else { - throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); - } - } - - function parsePlistString (isUtf16) { - isUtf16 = isUtf16 || 0; - var enc = "utf8"; - var length = objInfo; - var stroffset = 1; - if (objInfo == 0xF) { - var int_type = buffer[offset + 1]; - var intType = (int_type & 0xF0) / 0x10; - if (intType != 0x1) { - console.err("UNEXPECTED LENGTH-INT TYPE! " + intType); - } - var intInfo = int_type & 0x0F; - var intLength = Math.pow(2, intInfo); - var stroffset = 2 + intLength; - if (intLength < 3) { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } else { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } - } - // length is String length -> to get byte length multiply by 2, as 1 character takes 2 bytes in UTF-16 - length *= (isUtf16 + 1); - if (length < exports.maxObjectSize) { - var plistString = new Buffer(buffer.slice(offset + stroffset, offset + stroffset + length)); - if (isUtf16) { - plistString = swapBytes(plistString); - enc = "ucs2"; - } - return plistString.toString(enc); - } else { - throw new Error("To little heap space available! Wanted to read " + length + " bytes, but only " + exports.maxObjectSize + " are available."); - } - } - - function parseArray() { - var length = objInfo; - var arrayoffset = 1; - if (objInfo == 0xF) { - var int_type = buffer[offset + 1]; - var intType = (int_type & 0xF0) / 0x10; - if (intType != 0x1) { - console.error("0xa: UNEXPECTED LENGTH-INT TYPE! " + intType); - } - var intInfo = int_type & 0x0F; - var intLength = Math.pow(2, intInfo); - arrayoffset = 2 + intLength; - if (intLength < 3) { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } else { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } - } - if (length * objectRefSize > exports.maxObjectSize) { - throw new Error("To little heap space available!"); - } - var array = []; - for (var i = 0; i < length; i++) { - var objRef = readUInt(buffer.slice(offset + arrayoffset + i * objectRefSize, offset + arrayoffset + (i + 1) * objectRefSize)); - array[i] = parseObject(objRef); - } - return array; - } - - function parseDictionary() { - var length = objInfo; - var dictoffset = 1; - if (objInfo == 0xF) { - var int_type = buffer[offset + 1]; - var intType = (int_type & 0xF0) / 0x10; - if (intType != 0x1) { - console.error("0xD: UNEXPECTED LENGTH-INT TYPE! " + intType); - } - var intInfo = int_type & 0x0F; - var intLength = Math.pow(2, intInfo); - dictoffset = 2 + intLength; - if (intLength < 3) { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } else { - length = readUInt(buffer.slice(offset + 2, offset + 2 + intLength)); - } - } - if (length * 2 * objectRefSize > exports.maxObjectSize) { - throw new Error("To little heap space available!"); - } - if (debug) { - console.log("Parsing dictionary #" + tableOffset); - } - var dict = {}; - for (var i = 0; i < length; i++) { - var keyRef = readUInt(buffer.slice(offset + dictoffset + i * objectRefSize, offset + dictoffset + (i + 1) * objectRefSize)); - var valRef = readUInt(buffer.slice(offset + dictoffset + (length * objectRefSize) + i * objectRefSize, offset + dictoffset + (length * objectRefSize) + (i + 1) * objectRefSize)); - var key = parseObject(keyRef); - var val = parseObject(valRef); - if (debug) { - console.log(" DICT #" + tableOffset + ": Mapped " + key + " to " + val); - } - dict[key] = val; - } - return dict; - } - } - - return [ parseObject(topObject) ]; -}; - -function readUInt(buffer, start) { - start = start || 0; - - var l = 0; - for (var i = start; i < buffer.length; i++) { - l <<= 8; - l |= buffer[i] & 0xFF; - } - return l; -} - -// we're just going to toss the high order bits because javascript doesn't have 64-bit ints -function readUInt64BE(buffer, start) { - var data = buffer.slice(start, start + 8); - return data.readUInt32BE(4, 8); -} - -function swapBytes(buffer) { - var len = buffer.length; - for (var i = 0; i < len; i += 2) { - var a = buffer[i]; - buffer[i] = buffer[i+1]; - buffer[i+1] = a; - } - return buffer; -} diff --git a/node_modules/cordova-android/node_modules/bplist-parser/package.json b/node_modules/cordova-android/node_modules/bplist-parser/package.json deleted file mode 100644 index a5ffdff..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "bplist-parser@^0.1.0", - "_id": "bplist-parser@0.1.1", - "_inBundle": true, - "_integrity": "sha1-1g1dzCDLptx+HymbNdPh+V2vuuY=", - "_location": "/cordova-android/bplist-parser", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "bplist-parser@^0.1.0", - "name": "bplist-parser", - "escapedName": "bplist-parser", - "rawSpec": "^0.1.0", - "saveSpec": null, - "fetchSpec": "^0.1.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.1.1.tgz", - "_shasum": "d60d5dcc20cba6dc7e1f299b35d3e1f95dafbae6", - "_spec": "bplist-parser@^0.1.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Joe Ferner", - "email": "joe.ferner@nearinfinity.com" - }, - "bugs": { - "url": "https://github.com/nearinfinity/node-bplist-parser/issues" - }, - "bundleDependencies": false, - "dependencies": { - "big-integer": "^1.6.7" - }, - "deprecated": false, - "description": "Binary plist parser.", - "devDependencies": { - "nodeunit": "~0.9.1" - }, - "homepage": "https://github.com/nearinfinity/node-bplist-parser#readme", - "keywords": [ - "bplist", - "plist", - "parser" - ], - "license": "MIT", - "main": "bplistParser.js", - "name": "bplist-parser", - "repository": { - "type": "git", - "url": "git+https://github.com/nearinfinity/node-bplist-parser.git" - }, - "scripts": { - "test": "./node_modules/nodeunit/bin/nodeunit test" - }, - "version": "0.1.1" -} diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/airplay.bplist b/node_modules/cordova-android/node_modules/bplist-parser/test/airplay.bplist deleted file mode 100644 index 931adea120d583e59d640bf218696d3a07a1455d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 341 zcmYc)$jK}&F)+Bv$i&RT%Er#Y$;B-oC?qT*Di)DaT9jClnV%OgAdr)vn39?jl9`(t zl$e*ES{yGRT#%DknUt8E?NpkUmRjVRTToINFCc^}>QH=U7HCd!YHD_3QcfzuN@a(wn|ao77^*Mixx~oJ z#~)f;l2}v%7gc6}0!|K2We1@q9tK@&Yi0Wn5K+#B;y_Ijl9N7$ zsu@}sIvJ)itYX;Au$5sK!vThq43`)#GhAV~%5ab2Il~KvR}AkNen8A*Vuac#1*M@B GBO?InLtPpG diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/iTunes-small.bplist b/node_modules/cordova-android/node_modules/bplist-parser/test/iTunes-small.bplist deleted file mode 100644 index b7edb14a00912ef3e673c0a5d8e0d0f1a7a5cad3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 24433 zcmeI4349aP+VIaZwUh##LMauAOk29pHT%+*wpqKTThg*qLz~h-+tjuopdbhcBH#kZ zA|kkfh$4!(;esNlxF8}RE+Dv}Uawvk-2I+2lLQ*!yB}4``}=-xpgEZ{lg#A*Jm;Ke zn~ZO5^0arzTId_Q9=yrIt3;qkTz zHSV@{Xh+!Gu8zrV?)F-~f2n7Do2zY_P{DS!ceqI z23?8 zcd%vzKZP};_^GTJ!(YRiar{iyT)|Ig&3JwmYwG#ySku7IWlbZ0J!>ZN3s}>{FJw&% zzlb%h{1Vo*@i&9U8MOwp!emh>v^Is!YBu$F7nEWOx+k2jOW54aU&D` zwP-e)gXW?6=mvBnT8wT&x1gnHIa+~Mq1(|N=uWgA-Hq-=8_@me0rVi+g0`YZ(PQXw z^dx#3J%gS@JJE~iCA0^=O2(*Q zDTV<&iVa}7S*@rU4&`;=R^b7hG{f2%I8)J|kpS7x85Uq(woCa^U zY0Yw#)n>A(O;(e_rY?^pJI)yW!6T&;<8Igp?ZV{a)0@!ULD%Qglh8NM-XGK}ZNl_@ zJ`X%Ah~4?U{d`XK-;eG3a{pK8{_o*${bvu}_V@pta|`|t@wNVQoU6an;TK`tcOGwl zf~|)!!4z|0wS0uR$<+>itEsORG9=NsJig*ZkNL@V0ip9f+V zF4zK#u?wHXLnP$%C%GZ+(Y4R%d_`A6gvi~+PwLa@in@9|{9g!l?R)ind@V3~0(Y59>JP6D1<#;d_m_Z%T8Q$aJiUE!IfeX1v|v_2d)+q z9(XuE6~>53Z&WLc2A#qv*IR8?!~d|!^`cF1Fv~^5Usso8|K#a!&pL_1&a?K5lPhL< zAvQj`WsHO!xTn=aF zu5c*ia`;oipBnzO@TYeu6ws%DJ_YnCpicpPO6XHUpA!0%(5Hkx74)f~PX&D{=u<(T z8v4}Gr-nWQ`-6Ui-l2r^DB(OxIFAy}qlEJ);XFz>j}p$Kg!3rjJW4o^63(N9^C*?t zDg*r2ABFj20lon*#5dwacrjjrZ^Ad@Tkx%TDPD%6@N#?`UV&HQRd_YN9j1*n_zt`l z--*}3zxDVoc)lCogYU)n;SG2rz8`PG58%!CLHrQjf*;0P@gw+AybV8AZEPApxp|EE zEEwB5AW2*!H6u)(4$%M}VfHpRgH_eeUbK3ll3|nu>|)8p8Y{lEd+R+79(R2$A8CWq z2VXq}lut}<>8LJnx3syPEa41g75)khsp3L9Vniv_NwAWRv7O2gMzOh6Izp_>5ZI~4 zik;#~tDWZ24p(z4oR8V*PKRf@dz91L0Z}ohr`bJ5swya(+&mtxSlVz-YjrzEx?OEB zYa6F}+Oq@`RDKA?cA?Ze#XY9j)9eun-7WQPo~isgxLT{xoL&l56sin^GTl10qs`wbt3GtpghEP zVVUg0YhjyRIyA<1cw(2IDObTON2{v^QvC4B47q_OH@vXBCV1*Hnp;(@tVP-_NIL~_ z7fj=Nja9Eym@S~527|()=1Jc@8|w&sMOA4Ve8tGkmcB^8;4^VG@Y92vUh z@2KhHqMAN|pTtjzYWg(ZfuF(8;^*-5cqe`Vzle9?m+)>-(>?sUGqFb~lSJ%{@4{~6 zs|J|EU7ikTs#`idP0%{M&EB>)?^P1ser&HG?gRf(+5>d0a=lukuz=sMG(!U4B+-3> z(X}W0>FQP=0J^*P@eMrpH^IIlf_)Y5#jlBAU&n9YH}O9F7T%BF#s}~__#i%n4+GeD zJA>`BsVD$;em8>E07;{#C5e$O^D?aNrY0y>k*Mx5Khcp8W_pux;^$2VmAnJ4$xlXCoLRpDPYcPnT{(&0{ z0iw3!2|vX2Uax>&=56OE@|TDZqyNjgbhZ`gUn0J*@xSpmBEE0&fADwsd;A0b5ud_8 z;hzEAFG1j5S{wj3ryIfP09;W6JTZd9U2JwWFg+Yq)F5aD=nxEmPG!~Uv}&WlX45E) zYL!)-Al>h-?u$aAck)eqXqQp_CZhTs|AGHxs0bpM5JCw@LdYc~l=Q&cNLUc6?;--I z7Ih;kJ+K++oea+fUN&^?Y_+j9d0Dk&l5a+Y{Q~S2>|ho6_K2EiGguW`tHP+%K`on3 z#HW($K+~2K@hyChzc*Y-ID<%fk=~?_2r+{2B$D(c{YVt)Pol{H5<@N}0|Dh_K`6gp z8$h|Z8&Mj7oU|r0g|oZr8Om~|h7MOty~HxgcL1!~^=_fOL14Q8rrE657%dQ#R4FtT zy-mgAzI$#>tzj!>6iZi2a3euC$)cTnD<9TX-6S%67rC4aCIX2SvBr^jGK3_MM3O|3 z$xxC4KvVg3W6HelCZWn*Uk~#PyNrOn^ke@3-MQUIS0QH{8{J8at%I#EHcyM2K^-gh z3J$NpdVr-`Zqv)<2DM42H!H!h71_z}>vPmVp2j%iJg=I%<>?Z_wNnBT+od$m4Gj>DBC^lOdpx)-X;z3NZ<0z z_J|${_$j;r%p8-#ppaW^3Z>1cW}|y!Z39466(00MP5rY0G*p?(PvLw0O{kS3)GFd2 zP7!J~sUgG32r`n4BBRL|GM0=Zwd4wb>heMT6|Mpg1Q${+xPY)~vCpG!~Ouue69Oj(Slf zjOTTW`D-8{$-wjr0&`jo&xU0Ixq&PsHv*JJWHDJnZX!36Tga_sDOmYdmZN- zhkqG`E67T+imV0fb81hcCJ zo+TsN;bv-L7vYS99RjnRp%ZLphRLEb+pIRFMy*z9pfFb)V(G84AvPcju35yEasOw4 ztvZ*V#exVAbq(A7WD|LSYzAx(l849^@-W#-9wCpCZR9bsojgvS0Blco#ujm+R{-0z z3yh5g3p9#$=5QEWT0F3Nw!dEJ~9IE@QC>?sq@9 z>`hk#xL-H(*ZD#PUD3Cv$qw=ic^1GuN1i7;$qVE~vWvV#c9T8iW%3Gn6~OHc23H#Z z*Ls1$F^9I$%}lsruc&0hVM~D5010w8;LvJqMyU5T>1}W$8~6~JwG2`WD{U3EE5FY- zFkP!Y;pehYKo_;^b@B#zlk5XXZ;}1vZE}FTLk^NdUje3n1z|c~ z9Kdwb1;)f&f5}vEbhz4>jo@r_u_4Lg^Uw_Ubg&q7scZ5C(OIbFFK3p6c(A|@6*Hw^ zNpv&{;z0mbZ-A_c+M-Y^G)kM^BrODGs}|Jq1JC_Fp!{_RzrYtUIKO4`-{c$eE%^_q z;&s+Cq)$F4U|wyIT}JQp`o+~ z4Wm8rHX7a;PQ;0^0XS1Gtm=u*e4%GT<5i-fnHwPy!N`pD^$B7RgQ7CaH7cD&XVk!r z5qc@cl>hTafReYKU*vP;&kG9eP5aOY$^(>0+L!jDQM5merUPgUy%eAf^g;1uhaxJk z4M6$l(?FdpO$DJnf$P7J$WuCSeV22mNkoDK$b0*$3{G@cHj2{e%= z(PTh3Gzi@ZE`YA>0_&4#lX|DJS*z4lFB%dfZLke6>X~l?H?gS=Hmw})xV1r8LnXo( zwtxVPevA2=nZph9d$6B)=KOw^Of5}iej-hy=`@38GDn-rsRFPlsfwzphH9yf>ZyTd z0i0||+!@>4qCIGx+6uSnx?Aep^?4#QVaFUm1*=b=uUr9UGyidBaDD(J8LDSoLv5y< zsUG8X20x&tv+Au@jb33=Ypn*ePRU|HE0>4Db;i%U3a(S4h#v=vz4q}h_}rYXQ5;5d zX&%iNDH^GXnyH0asf`xULRv(NX$dU_iuNE}KMxGxx&X1rbK+v^)_HCZOzjb8PVLYO z7)=_TR$+oF1+!jmQR-DZWf(tY7_Y7IV>F-a4;bB<{4Srf)P>RkpF)7Y(pO>5|II)aX*qv&WlhK{A<0B3Cw&QtdUaCWEmvFHy(n&G+7JGot42}Z)UAZ`Ib zs~PfxHlspqF+l;S#=!J&`9~)Kps;tOAE0I8Bmg*ZFTdLthv=Ffy6AXXN9#p!ZrVWZ zpc7~#_0WlQ5^bW*w1s*BTx(}=y=R_YIxj%Z^_+V6fAc%$ZZO}icY1|=yZBDy@t-9GwHQ-7M%^; zuItRL&$OQc3U>iwxaZ`?+)oy>g{Hg>p5Qk^8sJAn{N`CC+b5K_vEL4n`T?fVpf~Cj z3X@5xHft@Atp@LE`Jwk2%$=ovnAsFUkL0^D{#Bm~+BKMS={$NpoiD;%KyRQ6>5X&| zT}+qIo9NB-7J4gP3NV)i!8~s>yNzHgBr z?iAQAD5`)RY+5wgta61$V+BV+XE0htpod>(Kwr@Nffnrk7)JGNoB7v#nd`0ry^XG* zE9oi`=xTa9T|@7nYw4YI9bHfFqIc7K=)C~+z968}_5^_5(2a{Rb6@SEVeD-5Ft^Oa zcru*~cn@%E1MCt^ZZX9GFm-yRQl-}$Y$laPWwMyXHD-koV8+j4ztA8q)mhF^(9SRB z^KbZa+g*dXk={=?(Fa7Bo9TmO34Mrep%2ro^bz_f-9{gy+X3d|K`?)YT4$gCe^oca zWKOO>S_zyqV9OX38ns1ZHdt*6(eYooLR^by2i9Wc=)u5g?hJmP&m}z_NIH8NU#Ix3 zZxw!0T!o*aPtzSDsb}c3^f~%G-AP}dFVbD~C1A8Wh|#yL0Y*!^kr8uML7&>#3Vb?l z;%yeYneI6z`yAI8@h}JhKyU?ODc)w$^?==Mf`l8z6(+bdO0F}SAqXX^+|_j_`l3rx zrtYP^mY0MeUt8^Z_)kqZF+#dLl4qJfc0(X?K*n~m2wTK{-eO=kK2TXymX ze2(sEJ^XK_q)&L z9~9FNU01;`MHT#t{)>Js^87dbhU}!@(*Mx!==byo`XfC>f1*$bMWsThfM3^(`z}EA znr^`k942pbgrgkCg>aW}pMRC}!D!K1bz-h&<(f2xY2F$?CQ}%T&)L=dk+UYa&K*Dqj8Co?*PH9ZMKFEh zzyc@Na(%geTol)zi{=J!F&qS?I4LM4?C?SAJ>%^Fq;8zh{*nb{%A_Kn<+Iw@j-a%b+-f#kta6A=nM^93 z$;fkk_xy@~gl{qL%LYHa?9V;{dVlQTKNRWxKiO=)RK#g5OXo7UOirv<;uM^cOyX3W zn$vJvPRHp<8)x7kNX2Cb5&ZIWy;3*2wNlXYoaGC=S+7=^p?FxXR9F>Ci=Gc*)Rc_c z7kBxo4J$kaBa^S=k9Aq+hH<%E9w&yRI3s7`%$$X@ayG7jE98o}Vy*;;m3Ai9i<=+N zxo(W0u&{YYP%M3%zcUa_muqwir9la$hH8z{st_Hnm3M4rV|D%@Kezl3Y``s7%^wfa zwnb;TeFf}Zu8b=`owS#3Ug0Y6U0fws#W}?B>g1}q8g4i@f*Z+=;zo00xUn2WpSapl zj!B+Y-`yeNOLk9)2=sKd;U;zmvy?Xc=aUlWz72ydoYoN)Z0I_mg_+K(HfmL{AgHVm zRX16rczXQkBpw4mRY@pZCKRf_xSqelw_tG;*^AA~TEAv?&Shx{zYCB^5`l!`xf!S}{5BzvBE($;SmJUB#QHttO8=3{b zVz~l61iw+qexGt5+K&#vkE~|k5?qbPz%6Xea6{U1-#t|u@cmGR9YXp*6>)#49UcTl zu<=m#ngX|@DWH5)4@H}KP=#oNx7{CpJWicKW!W6hQP63m;p38zs%Lvm{A>1fe&N*S|jfMd?o~sA_ znZ&hnZQNDdG;St0i<`&I=N55GxTV~3ZZ)@tThHCiZR9p_Tez*d9DHZN>R*iB)#ge?o(&~r<8TzGtVPPjGP7G4-$ z5Z_=KLos;I=o!(sMX!jyCwfElQv+Uz(ZrO+l*f#Vam938`qRKk1LqE$H*m$k z)dL?Kq!@J1pq+zW7<6dR5m|&RN)|1=%2H)=nNp^c8DzP#e3?~NAS;!X z$sDq3*(livJJBP zWe>?7mOUnWT((2@tn979)q`Ii{EE;aOckyXW(jkJ1;QfXW?`AIQdlFb6Ydc<3Y&$8 zg>AwU!VckiVVCf-@S3nsI3OGr-WQGu9}AxgUkTp`-wQtpzr~_hF1AN(uUI}dDt18Z zz}VTb^JACA-X42T?1Qn}V|T{B8G9o3WbD^*A#r`;2E`@CDdO_tO5!TwM#nYAwZ~13 zTO7AKZcW^yaXaE(irW+STHJ?m$KqS!=f$s#UmbsE{KohP;vbHGEdKHMC*z-u-#H|C zNXih^keng8L-L2bKIFuZABX%j_L9GN&K(UsVc*qAsmu{rTT;=#nDiJvEak@!`TH|gr6B}q3YEl*mTv_9#+ zqz957Oxlw4NOJGwh~${$*yQ-+gyaX3wOl<*WjrGLtRluJ_vrOZj0m$D>fMars_+f!3hO{vwX!&Aqkx>Fldn^W6T zJ5r~lPD?$IdNB1w>Q|{hq@GIsIc-+jlC_c>A0zk3uaVD`&yg>Z-y~lqUnRd?eusRW{7*%g zB1#dh7_3NEq$tu9TNE!T4l9l*jw(J^e5v?GNtB_=FlD&1kJ6>AQ#L6lE3Z;st(>9! zUWHWsRMD!-RDvo_HAI!9nxdMjnyp%>TBKT{`b~}1QR)HeLF!m_ygEUhte&Hur(U97 zpS(B|9rZH(sG-VoxW`t&xW{jp*^OR;f-74Mfx^=qyb(?itb=!4M=$_I&qmR)K z)W_@7^ci}&{yzOy{Vx4({a*b6{UQDP`j7M{^q=TIH{=M zC1jbh3bKl_O0vqb?#Q|`Yh%{dtVgpR%T{DtvWI7n%C60>&u++W%$}6}RQ8VSm$Ki; z-j}^UrzB@&PE(FIrz2-t&eb_Ha%Sbcne$f8k(?7bpX7WtZ1S*W!!``tG;GVTZNs(? zdt%trxjl1x<@V3LJXgq#%UzMXK6hL0cjmsB`%>=9c}aP>dHH!oc~yDNyqdg2 zd0*sxmG^DlFL}S`ll;*9u>A1+KKaf0-u$Wgv-9WV&olNiUT#!CbX9LO8ZE{mW0|qS zSY@m>?l3-U++*Bl+;2Q!sy5Y{+Dsj$X{PH;^Gpj(H<@lREj8U{`oVO{jLc!?aC2|- z3iBrOX7g6_Q|4#PFPQh3Uor1BzhOzYWLoqVqXm2e%RbA;mQ$9WEq_=;tv#&~)+lSV zHO6|Gb-MK$>pbfc>&@0%ZGuf>E3_5c%55WTqit8%+_niekFCkJ*Y>*YpzWybBio4r zZ^3m1%L`T%tSPv+U}M391&#w8D%+dEutQX9}My+*SB`;l9Fm z3Xc@NU-)6+M@2bBxkUv<6-8A=&Y~}hLyBXHFDn*`6N;0HhZd(5FD+hPyta5l@%_aQ zlngCVmRL&)N=i$rOGcE8Eg4@@U(!(GDcM!ByX4K1!zD*b-Y=~$onE@Q^rq5frFWFB zE4{aLQ|ac?E%s=8j6K$#Vo$SY*dMe%Z-2qQ$G*@0w*9dE1N%|?NA{1)^2&^5#bu7N z>ayWw2g*JxJ6ZO1*{QN$%Kj|p$}cGoE3YqaDEF36EuUU~P5Cbsy(=OrqAFw+LPbJF zN<~^lX2rsaMHR~{)>f>mxT`XuQeRn8X|JrR99=oCvaYhRa$;q3gehj)z?-psJ^9o vY4!4&xEgIuQB6rrMa{^XF*UB5hMLBjiD3G`gTU{)um{KP-96(`)BJw`4aDSS diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/int64.bplist b/node_modules/cordova-android/node_modules/bplist-parser/test/int64.bplist deleted file mode 100644 index 6da9c046165aa3b5327da20d50c021b1c2474fa8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 84 zcmYc)$jK}&F)+Bq$jrnNQk7biFTfC)nO9#K9{hA_oy; NWQ5AG!W2PieE?iB4ru@Y diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/int64.xml b/node_modules/cordova-android/node_modules/bplist-parser/test/int64.xml deleted file mode 100644 index cc6cb03..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/test/int64.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - zero - 0 - int64item - 12345678901234567890 - - diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/parseTest.js b/node_modules/cordova-android/node_modules/bplist-parser/test/parseTest.js deleted file mode 100644 index 67e7bfa..0000000 --- a/node_modules/cordova-android/node_modules/bplist-parser/test/parseTest.js +++ /dev/null @@ -1,159 +0,0 @@ -'use strict'; - -// tests are adapted from https://github.com/TooTallNate/node-plist - -var path = require('path'); -var nodeunit = require('nodeunit'); -var bplist = require('../'); - -module.exports = { - 'iTunes Small': function (test) { - var file = path.join(__dirname, "iTunes-small.bplist"); - var startTime1 = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime1) + 'ms'); - var dict = dicts[0]; - test.equal(dict['Application Version'], "9.0.3"); - test.equal(dict['Library Persistent ID'], "6F81D37F95101437"); - test.done(); - }); - }, - - 'sample1': function (test) { - var file = path.join(__dirname, "sample1.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - var dict = dicts[0]; - test.equal(dict['CFBundleIdentifier'], 'com.apple.dictionary.MySample'); - test.done(); - }); - }, - - 'sample2': function (test) { - var file = path.join(__dirname, "sample2.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - var dict = dicts[0]; - test.equal(dict['PopupMenu'][2]['Key'], "\n #import \n\n#import \n\nint main(int argc, char *argv[])\n{\n return macruby_main(\"rb_main.rb\", argc, argv);\n}\n"); - test.done(); - }); - }, - - 'airplay': function (test) { - var file = path.join(__dirname, "airplay.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - - var dict = dicts[0]; - test.equal(dict['duration'], 5555.0495000000001); - test.equal(dict['position'], 4.6269989039999997); - test.done(); - }); - }, - - 'utf16': function (test) { - var file = path.join(__dirname, "utf16.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - - var dict = dicts[0]; - test.equal(dict['CFBundleName'], 'sellStuff'); - test.equal(dict['CFBundleShortVersionString'], '2.6.1'); - test.equal(dict['NSHumanReadableCopyright'], '©2008-2012, sellStuff, Inc.'); - test.done(); - }); - }, - - 'utf16chinese': function (test) { - var file = path.join(__dirname, "utf16_chinese.plist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - - var dict = dicts[0]; - test.equal(dict['CFBundleName'], '天翼阅读'); - test.equal(dict['CFBundleDisplayName'], '天翼阅读'); - test.done(); - }); - }, - - - - 'uid': function (test) { - var file = path.join(__dirname, "uid.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - - var dict = dicts[0]; - test.deepEqual(dict['$objects'][1]['NS.keys'], [{UID:2}, {UID:3}, {UID:4}]); - test.deepEqual(dict['$objects'][1]['NS.objects'], [{UID: 5}, {UID:6}, {UID:7}]); - test.deepEqual(dict['$top']['root'], {UID:1}); - test.done(); - }); - }, - - 'int64': function (test) { - var file = path.join(__dirname, "int64.bplist"); - var startTime = new Date(); - - bplist.parseFile(file, function (err, dicts) { - if (err) { - throw err; - } - - var endTime = new Date(); - console.log('Parsed "' + file + '" in ' + (endTime - startTime) + 'ms'); - var dict = dicts[0]; - test.equal(dict['zero'], '0'); - test.equal(dict['int64item'], '12345678901234567890'); - test.done(); - }); - } -}; diff --git a/node_modules/cordova-android/node_modules/bplist-parser/test/sample1.bplist b/node_modules/cordova-android/node_modules/bplist-parser/test/sample1.bplist deleted file mode 100644 index 5b808ff2e4be8741f9cc0ad57263fffca75e3d2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcmY*V&rTFE81J`=Afgm>K|tar9y~c2xEPPHBf1Gggdsu{Y|896yA7RA)9Csz=NK64SfK+yDTuheChAkufIPBT8iBI{yEfc+#If&cxk&lXUjs z+&rUm&9&7+wIv34gfi19D!YXpkts%}hg_@eP>~2UdqZf0r^x91@EUb9W8b35-C|^o zP#s2Rf@Tzm*gA-tvYF}9h)&l!%?c4A@eWw1QEpjb+`7F+4k-AnVhk$k} z&hox?Aqy1?-fL>-Xi(zj(x#J`N_qvb10El;v|q!!D+xwtubX1J*Pz$6sdPE7Gu}xq z$rxEAFUSUYPfo}u@`d~+e_;Y1!&7(#+pr7Aa0(ycGkk?_@Ev}@FF1#PqR!n)uZ|pt(tOY<*1I zyr20SI><;{2aQ&qOf$`M{D#-nO3m?|J&y*YZ*NP-C6~&63!~|pzO(-)rCa?Mp$s)R ifMYm=K3u~9MlgXXPedc4}pD6p)7M4pT|aNh~g2%*)5$ zz|_Fpz_M6SNVtKufvthPfg=Q{*bqb*g9xJ#pdLdIVGJUSF3HHs$wxu-=OyN*MnIUU z#qk2de!;$_C5cHnsVaaBL;H@M+SEWKZY=dM1~B89ELoG0)`@nGKLC^5s7+z`B(on!kQfQjel9ql#A|%BhDYS&dAFZc})Z{wq7iiEBA_(^^jQ<*9;qX2-TcH*SOCutVlkO zCESSgnGu8@cbLW!hnz621()YiV>mK1J#m*BNDVfy?}VO-k&8{Pz%(L9_r}d1cQg~v zhegVpgb_Qmw@}KMnVb@*@3yM^0uU2d44cs5T_015g0RzywND%`WSo6L;V+?D#oFn`&KK*9!RtW-VRGD_Tp_%DLs8 z={G>r5*Xa>DY?l zx)dvX6?f8CD1BfnCN)@J(K_mW?vH%oP%n9VkvYIN_77IBO}KV@T|HmO=9aVhoThWY ziHJHaiZYTi)m-Jz!Q!X#C~nc&66r zMn6X#WfgT)rv00;0FHs%pv}wtHTV|%0Dc0$foI?)_*a-0RG}!`7aZY{a3DMueii-_ zUI_n*GvX!jx>y%o@f-1xcp&~PJ{5n5N8xdJ63)T1@Ep7hm*5J#0XJX`Zo~V~f;M~z zzk}byefSG}0-wS^;otBDdZR6&iD2mXuvJ%?Z&9;=5#*@uSb6~T(>~3g+7DZ4H zyy1-(8Hsk(8GUj_beM4*M}2U3v4{^oC^)0z_{Ja)GG4}ilWa&C_hong+xh5`HEXscCNa$tGma4Z#34||FHPT zmaV9~r&8TpUA6D27hZgMytjW-S<9<<0G04)G9x9oIA2+Qp{o!TU9)B3bMw zDwc}KB-&)3hH@$f@p9KTiT7YtH%eHuhwvoPwJbm1)eU3Qs!Nv3qGThxY;8hjhG=#g znQ)>F>WO3~ts=Xio23Sb#jbNwSISP*Ox3_vmcQARr;)M?O=3r!QF^E}CR zptdW^h5>4vcaMU2ovx>-74#%gYygVPY726UjJ^t1%C?hsmR~80LwI+Ym^cr469xAo z1LcTHY=W%`Sxlj_rWC~z;DaN0_Xv3?)y$$5Rm?+bq(HE_T^2VQM!&Av;IhDVk;tS5 zgqd*Yow7Jg@Ki5Yn7XQBa}%;~zQrdvW1v%0@DA6xUO%X3N@}9D#B@>D@SxPjW0F{g zimDCPyP!ZWNumaYDIf(8ngl>1hZ%sjLeBJ68ZPID_ zRKuuKzDX8FK7ebX?;WPJ-#qE!W1L5v2_?(vFexZSJ+bCdMbgf@B8UyoCEYjTtpVJM~vGE8vL_OaJ3$?D_?(`}k<#w()+>2jfSuObt*}#? z9pFwqNF=3*OV}Fj%M%!x;VDciM5`5Hnx-m3LWtxNIRy*hLMRYQ)I;vvC0FYMZjTtEm#aV(E=C?5)-LNE}o`)K;8qL=&-Jg3);@u?g@jmN{`P$W>- z!%~M{bh=zOu!am$1IqcPC?E*&a6Bj^viwp-^9SMy6QjJ}CP=Fit61JiP;Cm9jii@N z1w(U6Ff+XaJp*t-Ak}Z%h0F$c=FP5te0J>G(viy>UEQ2N`11qq;8~bdmIVaA9ynXn& ziRLe?9A_w9Z64WZ_UQ9)cQ*9}SW+6?gFWDeHRq<3?20|s);YD8c&{|tCwV$NeV!rD zxM#QLuxG||%5&E9v*(I;zPH;edWm5Z&mr7GRsGZalb&xtny+XZCouE!qA5ouBpHbgXKTp@62W93hQAPvUjk4Hp0f(6f3c#>=^qLdx$;8zRI3t z-(yd)pR#AzU)kR{nw!U6$KA;B++uDCw~R}0_j5^ZgxksO@aTmB> YxQpB+?y{%;_`Hp`=UDUId~tvN2l=KQ%m4rY diff --git a/node_modules/cordova-android/node_modules/brace-expansion/LICENSE b/node_modules/cordova-android/node_modules/brace-expansion/LICENSE deleted file mode 100644 index de32266..0000000 --- a/node_modules/cordova-android/node_modules/brace-expansion/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2013 Julian Gruber - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/brace-expansion/README.md b/node_modules/cordova-android/node_modules/brace-expansion/README.md deleted file mode 100644 index 6b4e0e1..0000000 --- a/node_modules/cordova-android/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/brace-expansion/index.js b/node_modules/cordova-android/node_modules/brace-expansion/index.js deleted file mode 100644 index 0478be8..0000000 --- a/node_modules/cordova-android/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,201 +0,0 @@ -var concatMap = require('concat-map'); -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function identity(e) { - return e; -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m || /\$$/.test(m.pre)) return [str]; - - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - var post = m.post.length - ? expand(m.post, false) - : ['']; - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = concatMap(n, function(el) { return expand(el, false) }); - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - - return expansions; -} - diff --git a/node_modules/cordova-android/node_modules/brace-expansion/package.json b/node_modules/cordova-android/node_modules/brace-expansion/package.json deleted file mode 100644 index f693c51..0000000 --- a/node_modules/cordova-android/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "brace-expansion@^1.1.7", - "_id": "brace-expansion@1.1.11", - "_inBundle": true, - "_integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "_location": "/cordova-android/brace-expansion", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "brace-expansion@^1.1.7", - "name": "brace-expansion", - "escapedName": "brace-expansion", - "rawSpec": "^1.1.7", - "saveSpec": null, - "fetchSpec": "^1.1.7" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/minimatch" - ], - "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd", - "_spec": "brace-expansion@^1.1.7", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/minimatch", - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "bugs": { - "url": "https://github.com/juliangruber/brace-expansion/issues" - }, - "bundleDependencies": false, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - }, - "deprecated": false, - "description": "Brace expansion as known from sh/bash", - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "keywords": [], - "license": "MIT", - "main": "index.js", - "name": "brace-expansion", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "scripts": { - "bench": "matcha test/perf/bench.js", - "gentest": "bash test/generate.sh", - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - }, - "version": "1.1.11" -} diff --git a/node_modules/cordova-android/node_modules/concat-map/.travis.yml b/node_modules/cordova-android/node_modules/concat-map/.travis.yml deleted file mode 100644 index f1d0f13..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/cordova-android/node_modules/concat-map/LICENSE b/node_modules/cordova-android/node_modules/concat-map/LICENSE deleted file mode 100644 index ee27ba4..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -This software is released under the MIT license: - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/concat-map/README.markdown b/node_modules/cordova-android/node_modules/concat-map/README.markdown deleted file mode 100644 index 408f70a..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/README.markdown +++ /dev/null @@ -1,62 +0,0 @@ -concat-map -========== - -Concatenative mapdashery. - -[![browser support](http://ci.testling.com/substack/node-concat-map.png)](http://ci.testling.com/substack/node-concat-map) - -[![build status](https://secure.travis-ci.org/substack/node-concat-map.png)](http://travis-ci.org/substack/node-concat-map) - -example -======= - -``` js -var concatMap = require('concat-map'); -var xs = [ 1, 2, 3, 4, 5, 6 ]; -var ys = concatMap(xs, function (x) { - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; -}); -console.dir(ys); -``` - -*** - -``` -[ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ] -``` - -methods -======= - -``` js -var concatMap = require('concat-map') -``` - -concatMap(xs, fn) ------------------ - -Return an array of concatenated elements by calling `fn(x, i)` for each element -`x` and each index `i` in the array `xs`. - -When `fn(x, i)` returns an array, its result will be concatenated with the -result array. If `fn(x, i)` returns anything else, that value will be pushed -onto the end of the result array. - -install -======= - -With [npm](http://npmjs.org) do: - -``` -npm install concat-map -``` - -license -======= - -MIT - -notes -===== - -This module was written while sitting high above the ground in a tree. diff --git a/node_modules/cordova-android/node_modules/concat-map/index.js b/node_modules/cordova-android/node_modules/concat-map/index.js deleted file mode 100644 index b29a781..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/index.js +++ /dev/null @@ -1,13 +0,0 @@ -module.exports = function (xs, fn) { - var res = []; - for (var i = 0; i < xs.length; i++) { - var x = fn(xs[i], i); - if (isArray(x)) res.push.apply(res, x); - else res.push(x); - } - return res; -}; - -var isArray = Array.isArray || function (xs) { - return Object.prototype.toString.call(xs) === '[object Array]'; -}; diff --git a/node_modules/cordova-android/node_modules/concat-map/package.json b/node_modules/cordova-android/node_modules/concat-map/package.json deleted file mode 100644 index b25d955..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/package.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "_from": "concat-map@0.0.1", - "_id": "concat-map@0.0.1", - "_inBundle": true, - "_integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "_location": "/cordova-android/concat-map", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "concat-map@0.0.1", - "name": "concat-map", - "escapedName": "concat-map", - "rawSpec": "0.0.1", - "saveSpec": null, - "fetchSpec": "0.0.1" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/brace-expansion" - ], - "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b", - "_spec": "concat-map@0.0.1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/brace-expansion", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "bugs": { - "url": "https://github.com/substack/node-concat-map/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "concatenative mapdashery", - "devDependencies": { - "tape": "~2.4.0" - }, - "directories": { - "example": "example", - "test": "test" - }, - "homepage": "https://github.com/substack/node-concat-map#readme", - "keywords": [ - "concat", - "concatMap", - "map", - "functional", - "higher-order" - ], - "license": "MIT", - "main": "index.js", - "name": "concat-map", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-concat-map.git" - }, - "scripts": { - "test": "tape test/*.js" - }, - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "version": "0.0.1" -} diff --git a/node_modules/cordova-android/node_modules/concat-map/test/map.js b/node_modules/cordova-android/node_modules/concat-map/test/map.js deleted file mode 100644 index fdbd702..0000000 --- a/node_modules/cordova-android/node_modules/concat-map/test/map.js +++ /dev/null @@ -1,39 +0,0 @@ -var concatMap = require('../'); -var test = require('tape'); - -test('empty or not', function (t) { - var xs = [ 1, 2, 3, 4, 5, 6 ]; - var ixes = []; - var ys = concatMap(xs, function (x, ix) { - ixes.push(ix); - return x % 2 ? [ x - 0.1, x, x + 0.1 ] : []; - }); - t.same(ys, [ 0.9, 1, 1.1, 2.9, 3, 3.1, 4.9, 5, 5.1 ]); - t.same(ixes, [ 0, 1, 2, 3, 4, 5 ]); - t.end(); -}); - -test('always something', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : [ x ]; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('scalars', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function (x) { - return x === 'b' ? [ 'B', 'B', 'B' ] : x; - }); - t.same(ys, [ 'a', 'B', 'B', 'B', 'c', 'd' ]); - t.end(); -}); - -test('undefs', function (t) { - var xs = [ 'a', 'b', 'c', 'd' ]; - var ys = concatMap(xs, function () {}); - t.same(ys, [ undefined, undefined, undefined, undefined ]); - t.end(); -}); diff --git a/node_modules/cordova-android/node_modules/cordova-common/.eslintignore b/node_modules/cordova-android/node_modules/cordova-common/.eslintignore deleted file mode 100644 index 161d0c6..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -spec/fixtures/* \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/cordova-common/.eslintrc.yml b/node_modules/cordova-android/node_modules/cordova-common/.eslintrc.yml deleted file mode 100644 index 21a8e7b..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.eslintrc.yml +++ /dev/null @@ -1,13 +0,0 @@ -root: true -extends: semistandard -rules: - indent: - - error - - 4 - camelcase: off - padded-blocks: off - operator-linebreak: off - no-throw-literal: off - no-unused-vars: - - error - - args: after-used diff --git a/node_modules/cordova-android/node_modules/cordova-common/.github/PULL_REQUEST_TEMPLATE.md b/node_modules/cordova-android/node_modules/cordova-common/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 91582f4..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,22 +0,0 @@ - - -### Platforms affected - - -### What does this PR do? - - -### What testing has been done on this change? - - -### Checklist -- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database -- [ ] Commit message follows the format: "CB-3232: (android) Fix bug with resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform affected. -- [ ] Added automated test coverage as appropriate for this change. diff --git a/node_modules/cordova-android/node_modules/cordova-common/.npmignore b/node_modules/cordova-android/node_modules/cordova-common/.npmignore deleted file mode 100644 index 5d14118..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -spec -coverage diff --git a/node_modules/cordova-android/node_modules/cordova-common/.ratignore b/node_modules/cordova-android/node_modules/cordova-common/.ratignore deleted file mode 100644 index f107416..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.ratignore +++ /dev/null @@ -1,4 +0,0 @@ -fixtures -coverage -jasmine.json -appveyor.yml diff --git a/node_modules/cordova-android/node_modules/cordova-common/.travis.yml b/node_modules/cordova-android/node_modules/cordova-common/.travis.yml deleted file mode 100644 index b4e310d..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: node_js -sudo: false -git: - depth: 10 -node_js: - - "4" - - "6" - - "8" - - "10" -install: - - npm install - - npm install -g codecov -script: - - npm test - - npm run cover -after_script: - - codecov diff --git a/node_modules/cordova-android/node_modules/cordova-common/README.md b/node_modules/cordova-android/node_modules/cordova-common/README.md deleted file mode 100644 index 422c98b..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/README.md +++ /dev/null @@ -1,155 +0,0 @@ - - -[![Build status](https://ci.appveyor.com/api/projects/status/wxkmo0jalsr8gane?svg=true)](https://ci.appveyor.com/project/ApacheSoftwareFoundation/cordova-common/branch/master) -[![Build Status](https://travis-ci.org/apache/cordova-common.svg?branch=master)](https://travis-ci.org/apache/cordova-common) -[![NPM](https://nodei.co/npm/cordova-common.png)](https://nodei.co/npm/cordova-common/) - -# cordova-common -Exposes shared functionality used by [cordova-lib](https://github.com/apache/cordova-lib/) and Cordova platforms. -## Exposed APIs - -### `events` - -Represents special instance of NodeJS EventEmitter which is intended to be used to post events to cordova-lib and cordova-cli - -Usage: -```js -var events = require('cordova-common').events; -events.emit('warn', 'Some warning message') -``` - -There are the following events supported by cordova-cli: `verbose`, `log`, `info`, `warn`, `error`. - -### `CordovaError` - -An error class used by Cordova to throw cordova-specific errors. The CordovaError class is inherited from Error, so CordovaError instances is also valid Error instances (`instanceof` check succeeds). - -Usage: - -```js -var CordovaError = require('cordova-common').CordovaError; -throw new CordovaError('Some error message', SOME_ERR_CODE); -``` - -See [CordovaError](src/CordovaError/CordovaError.js) for supported error codes. - -### `ConfigParser` - -Exposes functionality to deal with cordova project `config.xml` files. For ConfigParser API reference check [ConfigParser Readme](src/ConfigParser/README.md). - -Usage: -```js -var ConfigParser = require('cordova-common').ConfigParser; -var appConfig = new ConfigParser('path/to/cordova-app/config.xml'); -console.log(appconfig.name() + ':' + appConfig.version()); -``` - -### `PluginInfoProvider` and `PluginInfo` - -`PluginInfo` is a wrapper for cordova plugins' `plugin.xml` files. This class may be instantiated directly or via `PluginInfoProvider`. The difference is that `PluginInfoProvider` caches `PluginInfo` instances based on plugin source directory. - -Usage: -```js -var PluginInfo: require('cordova-common').PluginInfo; -var PluginInfoProvider: require('cordova-common').PluginInfoProvider; - -// The following instances are equal -var plugin1 = new PluginInfo('path/to/plugin_directory'); -var plugin2 = new PluginInfoProvider().get('path/to/plugin_directory'); - -console.log('The plugin ' + plugin1.id + ' has version ' + plugin1.version) -``` - -### `ActionStack` - -Utility module for dealing with sequential tasks. Provides a set of tasks that are needed to be done and reverts all tasks that are already completed if one of those tasks fail to complete. Used internally by cordova-lib and platform's plugin installation routines. - -Usage: -```js -var ActionStack = require('cordova-common').ActionStack; -var stack = new ActionStack() - -var action1 = stack.createAction(task1, [], task1_reverter, []); -var action2 = stack.createAction(task2, [], task2_reverter, []); - -stack.push(action1); -stack.push(action2); - -stack.process() -.then(function() { - // all actions succeded -}) -.catch(function(error){ - // One of actions failed with error -}) -``` - -### `superspawn` - -Module for spawning child processes with some advanced logic. - -Usage: -```js -var superspawn = require('cordova-common').superspawn; -superspawn.spawn('adb', ['devices']) -.progress(function(data){ - if (data.stderr) - console.error('"adb devices" raised an error: ' + data.stderr); -}) -.then(function(devices){ - // Do something... -}) -``` - -### `xmlHelpers` - -A set of utility methods for dealing with XML files. - -Usage: -```js -var xml = require('cordova-common').xmlHelpers; - -var xmlDoc1 = xml.parseElementtreeSync('some/xml/file'); -var xmlDoc2 = xml.parseElementtreeSync('another/xml/file'); - -xml.mergeXml(doc1, doc2); // doc2 now contains all the nodes from doc1 -``` - -### Other APIs - -The APIs listed below are also exposed but are intended to be only used internally by cordova plugin installation routines. - -``` -PlatformJson -ConfigChanges -ConfigKeeper -ConfigFile -mungeUtil -``` - -## Setup -* Clone this repository onto your local machine - `git clone https://github.com/apache/cordova-common.git` -* Navigate to cordova-common directory, install dependencies and npm-link - `cd cordova-common && npm install && npm link` -* Navigate to cordova-lib directory and link cordova-common - `cd && npm link cordova-common && npm install` diff --git a/node_modules/cordova-android/node_modules/cordova-common/RELEASENOTES.md b/node_modules/cordova-android/node_modules/cordova-common/RELEASENOTES.md deleted file mode 100644 index 1964047..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/RELEASENOTES.md +++ /dev/null @@ -1,153 +0,0 @@ - -# Cordova-common Release Notes - -### 2.2.5 (Jun 26, 2018) -* Use plist@2 (^2.1.0) to avoid engine warning message on Node.js 4 - -### 2.2.4 (June 15, 2018) - -* Revert change to update dependencies in package.json (needed to resolve issues with cordova-ios@4) -* Revert change to use strip-bom package to strip BOM -* Continue to use plist@^3.0.1 in package.json - -### 2.2.3 (June 1, 2018) -* Revert a minor refactoring that was incompatible with NodeJS 4.x. No change to functionality. - -### 2.2.2 (May 30, 2018) -* [CB-13979](https://issues.apache.org/jira/browse/CB-13979) More consistency for `config.xml` lookups -* [CB-14064](https://issues.apache.org/jira/browse/CB-14064) Remove Node 4 from CI matrix -* [CB-14088](https://issues.apache.org/jira/browse/CB-14088) Update dependencies -* [CB-11691](https://issues.apache.org/jira/browse/CB-11691) Fix for modifying binary plists -* [CB-13770](https://issues.apache.org/jira/browse/CB-13770) Warn when or not found -* [CB-13471](https://issues.apache.org/jira/browse/CB-13471) Fix tests and path issues for **Windows** -* [CB-13471](https://issues.apache.org/jira/browse/CB-13471) added unit test for config file provider -* [CB-13744](https://issues.apache.org/jira/browse/CB-13744) Recognize storyboards as XML files -* [CB-13674](https://issues.apache.org/jira/browse/CB-13674) Incremented package version to -dev - -### 2.2.1 (Dec 14, 2017) -* [CB-13674](https://issues.apache.org/jira/browse/CB-13674): updated dependencies - -### 2.2.0 (Nov 22, 2017) -* [CB-13471](https://issues.apache.org/jira/browse/CB-13471) File Provider fix belongs in cordova-common -* [CB-11244](https://issues.apache.org/jira/browse/CB-11244) Spot fix for upcoming `cordova-android@7` changes. https://github.com/apache/cordova-android/pull/389 - -### 2.1.1 (Oct 04, 2017) -* [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added `getFrameworks` to unit tests -* [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added variable replacing to framework tag - -### 2.1.0 (August 30, 2017) -* [CB-13145](https://issues.apache.org/jira/browse/CB-13145) added variable replacing to `framework` tag -* [CB-13211](https://issues.apache.org/jira/browse/CB-13211) Add `allows-arbitrary-loads-for-media` attribute parsing for `getAccesses` -* [CB-11968](https://issues.apache.org/jira/browse/CB-11968) Added support for `` in `config.xml` -* [CB-12895](https://issues.apache.org/jira/browse/CB-12895) set up `eslint` and removed `jshint` -* [CB-12785](https://issues.apache.org/jira/browse/CB-12785) added `.gitignore`, `travis`, and `appveyor` support -* [CB-12250](https://issues.apache.org/jira/browse/CB-12250) & [CB-12409](https://issues.apache.org/jira/browse/CB-12409) *iOS*: Fix bug with escaping properties from `plist` file -* [CB-12762](https://issues.apache.org/jira/browse/CB-12762) updated `common`, `fetch`, and `serve` `pkgJson` to point `pkgJson` repo items to github mirrors -* [CB-12766](https://issues.apache.org/jira/browse/CB-12766) Consistently write `JSON` with 2 spaces indentation - -### 2.0.3 (May 02, 2017) -* [CB-8978](https://issues.apache.org/jira/browse/CB-8978) Add option to get `resource-file` from `root` -* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add tests for `edit-config` in `config.xml` -* [CB-12665](https://issues.apache.org/jira/browse/CB-12665) removed `enginestrict` since it is deprecated - -### 2.0.2 (Apr 14, 2017) -* [CB-11233](https://issues.apache.org/jira/browse/CB-11233) - Support installing frameworks into 'Embedded Binaries' section of the Xcode project -* [CB-10438](https://issues.apache.org/jira/browse/CB-10438) - Install correct dependency version. Removed shell.remove, added pkg.json to dependency tests 1-3, and updated install.js (.replace) to fix tests in uninstall.spec.js and update to workw with jasmine 2.0 -* [CB-11120](https://issues.apache.org/jira/browse/CB-11120) - Allow short/display name in config.xml -* [CB-11346](https://issues.apache.org/jira/browse/CB-11346) - Remove known platforms check -* [CB-11977](https://issues.apache.org/jira/browse/CB-11977) - updated engines and enginescript for common, fetch, and serve - -### 2.0.1 (Mar 09, 2017) -* [CB-12557](https://issues.apache.org/jira/browse/CB-12557) add both stdout and stderr properties to the error object passed to superspawn reject handler. - -### 2.0.0 (Jan 17, 2017) -* [CB-8978](https://issues.apache.org/jira/browse/CB-8978) Add `resource-file` parsing to `config.xml` -* [CB-12018](https://issues.apache.org/jira/browse/CB-12018): updated `jshint` and updated tests to work with `jasmine@2` instead of `jasmine-node` -* [CB-12163](https://issues.apache.org/jira/browse/CB-12163) Add reference attrib to `resource-file` for **Windows** -* Move windows-specific logic to `cordova-windows` -* [CB-12189](https://issues.apache.org/jira/browse/CB-12189) Add implementation attribute to framework - -### 1.5.1 (Oct 12, 2016) -* [CB-12002](https://issues.apache.org/jira/browse/CB-12002) Add `getAllowIntents()` to `ConfigParser` -* [CB-11998](https://issues.apache.org/jira/browse/CB-11998) `cordova platform add` error with `cordova-common@1.5.0` - -### 1.5.0 (Oct 06, 2016) -* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) Add test case for different `edit-config` targets -* [CB-11908](https://issues.apache.org/jira/browse/CB-11908) Add `edit-config` to `config.xml` -* [CB-11936](https://issues.apache.org/jira/browse/CB-11936) Support four new **App Transport Security (ATS)** keys -* update `config.xml` location if it is a **Android Studio** project. -* use `array` methods and `object.keys` for iterating. avoiding `for-in` loops -* [CB-11517](https://issues.apache.org/jira/browse/CB-11517) Allow `.folder` matches -* [CB-11776](https://issues.apache.org/jira/browse/CB-11776) check `edit-config` target exists - -### 1.4.1 (Aug 09, 2016) -* Add general purpose `ConfigParser.getAttribute` API -* [CB-11653](https://issues.apache.org/jira/browse/CB-11653) moved `findProjectRoot` from `cordova-lib` to `cordova-common` -* [CB-11636](https://issues.apache.org/jira/browse/CB-11636) Handle attributes with quotes correctly -* [CB-11645](https://issues.apache.org/jira/browse/CB-11645) added check to see if `getEditConfig` exists before trying to use it -* [CB-9825](https://issues.apache.org/jira/browse/CB-9825) framework tag spec parsing - -### 1.4.0 (Jul 12, 2016) -* [CB-11023](https://issues.apache.org/jira/browse/CB-11023) Add edit-config functionality - -### 1.3.0 (May 12, 2016) -* [CB-11259](https://issues.apache.org/jira/browse/CB-11259): Improving prepare and build logging -* [CB-11194](https://issues.apache.org/jira/browse/CB-11194) Improve cordova load time -* [CB-1117](https://issues.apache.org/jira/browse/CB-1117) Add `FileUpdater` module to `cordova-common`. -* [CB-11131](https://issues.apache.org/jira/browse/CB-11131) Fix `TypeError: message.toUpperCase` is not a function in `CordovaLogger` - -### 1.2.0 (Apr 18, 2016) -* [CB-11022](https://issues.apache.org/jira/browse/CB-11022) Save modulesMetadata to both www and platform_www when necessary -* [CB-10833](https://issues.apache.org/jira/browse/CB-10833) Deduplicate common logic for plugin installation/uninstallation -* [CB-10822](https://issues.apache.org/jira/browse/CB-10822) Manage plugins/modules metadata using PlatformJson -* [CB-10940](https://issues.apache.org/jira/browse/CB-10940) Can't add Android platform from path -* [CB-10965](https://issues.apache.org/jira/browse/CB-10965) xml helper allows multiple instances to be merge in config.xml - -### 1.1.1 (Mar 18, 2016) -* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Update test to reflect merging of [CB-9264](https://issues.apache.org/jira/browse/CB-9264) fix -* [CB-10694](https://issues.apache.org/jira/browse/CB-10694) Platform-specific configuration preferences don't override global settings -* [CB-9264](https://issues.apache.org/jira/browse/CB-9264) Duplicate entries in `config.xml` -* [CB-10791](https://issues.apache.org/jira/browse/CB-10791) Add `adjustLoggerLevel` to `cordova-common.CordovaLogger` -* [CB-10662](https://issues.apache.org/jira/browse/CB-10662) Add tests for `ConfigParser.getStaticResources` -* [CB-10622](https://issues.apache.org/jira/browse/CB-10622) fix target attribute being ignored for images in `config.xml`. -* [CB-10583](https://issues.apache.org/jira/browse/CB-10583) Protect plugin preferences from adding extra Array properties. - -### 1.1.0 (Feb 16, 2016) -* [CB-10482](https://issues.apache.org/jira/browse/CB-10482) Remove references to windows8 from cordova-lib/cli -* [CB-10430](https://issues.apache.org/jira/browse/CB-10430) Adds forwardEvents method to easily connect two EventEmitters -* [CB-10176](https://issues.apache.org/jira/browse/CB-10176) Adds CordovaLogger class, based on logger module from cordova-cli -* [CB-10052](https://issues.apache.org/jira/browse/CB-10052) Expose child process' io streams via promise progress notification -* [CB-10497](https://issues.apache.org/jira/browse/CB-10497) Prefer .bat over .cmd on windows platform -* [CB-9984](https://issues.apache.org/jira/browse/CB-9984) Bumps plist version and fixes failing cordova-common test - -### 1.0.0 (Oct 29, 2015) - -* [CB-9890](https://issues.apache.org/jira/browse/CB-9890) Documents cordova-common -* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Correct cordova-lib -> cordova-common in README -* Pick ConfigParser changes from apache@0c3614e -* [CB-9743](https://issues.apache.org/jira/browse/CB-9743) Removes system frameworks handling from ConfigChanges -* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Cleans out code which has been moved to `cordova-common` -* Pick ConfigParser changes from apache@ddb027b -* Picking CordovaError changes from apache@a3b1fca -* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Adds tests and fixtures based on existing cordova-lib ones -* [CB-9598](https://issues.apache.org/jira/browse/CB-9598) Initial implementation for cordova-common - diff --git a/node_modules/cordova-android/node_modules/cordova-common/appveyor.yml b/node_modules/cordova-android/node_modules/cordova-common/appveyor.yml deleted file mode 100644 index 5302ae0..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/appveyor.yml +++ /dev/null @@ -1,20 +0,0 @@ -# appveyor file -# http://www.appveyor.com/docs/appveyor-yml - -environment: - matrix: - - nodejs_version: "4" - - nodejs_version: "6" - - nodejs_version: "8" - - nodejs_version: "10" - -install: - - ps: Install-Product node $env:nodejs_version - - npm install - -build: off - -test_script: - - node --version - - npm --version - - npm test diff --git a/node_modules/cordova-android/node_modules/cordova-common/cordova-common.js b/node_modules/cordova-android/node_modules/cordova-common/cordova-common.js deleted file mode 100644 index 801d510..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/cordova-common.js +++ /dev/null @@ -1,47 +0,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. -*/ - -var addProperty = require('./src/util/addProperty'); - -module.exports = { }; - -addProperty(module, 'events', './src/events'); -addProperty(module, 'superspawn', './src/superspawn'); - -addProperty(module, 'ActionStack', './src/ActionStack'); -addProperty(module, 'CordovaError', './src/CordovaError/CordovaError'); -addProperty(module, 'CordovaLogger', './src/CordovaLogger'); -addProperty(module, 'CordovaCheck', './src/CordovaCheck'); -addProperty(module, 'CordovaExternalToolErrorContext', './src/CordovaError/CordovaExternalToolErrorContext'); -addProperty(module, 'PlatformJson', './src/PlatformJson'); -addProperty(module, 'ConfigParser', './src/ConfigParser/ConfigParser'); -addProperty(module, 'FileUpdater', './src/FileUpdater'); - -addProperty(module, 'PluginInfo', './src/PluginInfo/PluginInfo'); -addProperty(module, 'PluginInfoProvider', './src/PluginInfo/PluginInfoProvider'); - -addProperty(module, 'PluginManager', './src/PluginManager'); - -addProperty(module, 'ConfigChanges', './src/ConfigChanges/ConfigChanges'); -addProperty(module, 'ConfigKeeper', './src/ConfigChanges/ConfigKeeper'); -addProperty(module, 'ConfigFile', './src/ConfigChanges/ConfigFile'); -addProperty(module, 'mungeUtil', './src/ConfigChanges/munge-util'); - -addProperty(module, 'xmlHelpers', './src/util/xml-helpers'); - diff --git a/node_modules/cordova-android/node_modules/cordova-common/package.json b/node_modules/cordova-android/node_modules/cordova-common/package.json deleted file mode 100644 index d8a74af..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "cordova-common@2.2.5", - "_id": "cordova-common@2.2.5", - "_inBundle": true, - "_integrity": "sha1-+TzvKtSUz8v1bEbj1hKqqctfzDI=", - "_location": "/cordova-android/cordova-common", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "cordova-common@2.2.5", - "name": "cordova-common", - "escapedName": "cordova-common", - "rawSpec": "2.2.5", - "saveSpec": null, - "fetchSpec": "2.2.5" - }, - "_requiredBy": [ - "/cordova-android" - ], - "_resolved": "https://registry.npmjs.org/cordova-common/-/cordova-common-2.2.5.tgz", - "_shasum": "f93cef2ad494cfcbf56c46e3d612aaa9cb5fcc32", - "_spec": "cordova-common@2.2.5", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "author": { - "name": "Apache Software Foundation" - }, - "bugs": { - "url": "https://issues.apache.org/jira/browse/CB", - "email": "dev@cordova.apache.org" - }, - "bundleDependencies": false, - "contributors": [], - "dependencies": { - "ansi": "^0.3.1", - "bplist-parser": "^0.1.0", - "cordova-registry-mapper": "^1.1.8", - "elementtree": "0.1.6", - "glob": "^5.0.13", - "minimatch": "^3.0.0", - "plist": "^2.1.0", - "q": "^1.4.1", - "shelljs": "^0.5.3", - "underscore": "^1.8.3", - "unorm": "^1.3.3" - }, - "deprecated": false, - "description": "Apache Cordova tools and platforms shared routines", - "devDependencies": { - "eslint": "^4.0.0", - "eslint-config-semistandard": "^11.0.0", - "eslint-config-standard": "^10.2.1", - "eslint-plugin-import": "^2.3.0", - "eslint-plugin-node": "^5.0.0", - "eslint-plugin-promise": "^3.5.0", - "eslint-plugin-standard": "^3.0.1", - "istanbul": "^0.4.5", - "jasmine": "^2.5.2", - "osenv": "^0.1.3", - "promise-matchers": "^0.9.6", - "rewire": "^2.5.1" - }, - "engines": { - "node": ">=4.0.0" - }, - "homepage": "https://github.com/apache/cordova-common#readme", - "license": "Apache-2.0", - "main": "cordova-common.js", - "name": "cordova-common", - "repository": { - "type": "git", - "url": "git+https://github.com/apache/cordova-common.git" - }, - "scripts": { - "cover": "istanbul cover --root src --print detail jasmine", - "eslint": "eslint src spec", - "jasmine": "jasmine JASMINE_CONFIG_PATH=spec/support/jasmine.json", - "test": "npm run eslint && npm run jasmine" - }, - "version": "2.2.5" -} diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ActionStack.js b/node_modules/cordova-android/node_modules/cordova-common/src/ActionStack.js deleted file mode 100644 index 6983c5c..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ActionStack.js +++ /dev/null @@ -1,85 +0,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. -*/ - -/* jshint quotmark:false */ - -var events = require('./events'); -var Q = require('q'); - -function ActionStack () { - this.stack = []; - this.completed = []; -} - -ActionStack.prototype = { - createAction: function (handler, action_params, reverter, revert_params) { - return { - handler: { - run: handler, - params: action_params - }, - reverter: { - run: reverter, - params: revert_params - } - }; - }, - push: function (tx) { - this.stack.push(tx); - }, - // Returns a promise. - process: function (platform) { - events.emit('verbose', 'Beginning processing of action stack for ' + platform + ' project...'); - - while (this.stack.length) { - var action = this.stack.shift(); - var handler = action.handler.run; - var action_params = action.handler.params; - - try { - handler.apply(null, action_params); - } catch (e) { - events.emit('warn', 'Error during processing of action! Attempting to revert...'); - this.stack.unshift(action); - var issue = 'Uh oh!\n'; - // revert completed tasks - while (this.completed.length) { - var undo = this.completed.shift(); - var revert = undo.reverter.run; - var revert_params = undo.reverter.params; - - try { - revert.apply(null, revert_params); - } catch (err) { - events.emit('warn', 'Error during reversion of action! We probably really messed up your project now, sorry! D:'); - issue += 'A reversion action failed: ' + err.message + '\n'; - } - } - e.message = issue + e.message; - return Q.reject(e); - } - this.completed.push(action); - } - events.emit('verbose', 'Action stack processing complete.'); - - return Q(); - } -}; - -module.exports = ActionStack; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js b/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js deleted file mode 100644 index e7ad0e2..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigChanges.js +++ /dev/null @@ -1,426 +0,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. -*/ - -/* - * This module deals with shared configuration / dependency "stuff". That is: - * - XML configuration files such as config.xml, AndroidManifest.xml or WMAppManifest.xml. - * - plist files in iOS - * Essentially, any type of shared resources that we need to handle with awareness - * of how potentially multiple plugins depend on a single shared resource, should be - * handled in this module. - * - * The implementation uses an object as a hash table, with "leaves" of the table tracking - * reference counts. - */ - -var path = require('path'); -var et = require('elementtree'); -var ConfigKeeper = require('./ConfigKeeper'); -var events = require('../events'); - -var mungeutil = require('./munge-util'); -var xml_helpers = require('../util/xml-helpers'); - -exports.PlatformMunger = PlatformMunger; - -exports.process = function (plugins_dir, project_dir, platform, platformJson, pluginInfoProvider) { - var munger = new PlatformMunger(platform, project_dir, platformJson, pluginInfoProvider); - munger.process(plugins_dir); - munger.save_all(); -}; - -/****************************************************************************** -* PlatformMunger class -* -* Can deal with config file of a single project. -* Parsed config files are cached in a ConfigKeeper object. -******************************************************************************/ -function PlatformMunger (platform, project_dir, platformJson, pluginInfoProvider) { - this.platform = platform; - this.project_dir = project_dir; - this.config_keeper = new ConfigKeeper(project_dir); - this.platformJson = platformJson; - this.pluginInfoProvider = pluginInfoProvider; -} - -// Write out all unsaved files. -PlatformMunger.prototype.save_all = PlatformMunger_save_all; -function PlatformMunger_save_all () { - this.config_keeper.save_all(); - this.platformJson.save(); -} - -// Apply a munge object to a single config file. -// The remove parameter tells whether to add the change or remove it. -PlatformMunger.prototype.apply_file_munge = PlatformMunger_apply_file_munge; -function PlatformMunger_apply_file_munge (file, munge, remove) { - var self = this; - - for (var selector in munge.parents) { - for (var xml_child in munge.parents[selector]) { - // this xml child is new, graft it (only if config file exists) - var config_file = self.config_keeper.get(self.project_dir, self.platform, file); - if (config_file.exists) { - if (remove) config_file.prune_child(selector, munge.parents[selector][xml_child]); - else config_file.graft_child(selector, munge.parents[selector][xml_child]); - } else { - events.emit('warn', 'config file ' + file + ' requested for changes not found at ' + config_file.filepath + ', ignoring'); - } - } - } -} - -PlatformMunger.prototype.remove_plugin_changes = remove_plugin_changes; -function remove_plugin_changes (pluginInfo, is_top_level) { - var self = this; - var platform_config = self.platformJson.root; - var plugin_vars = is_top_level ? - platform_config.installed_plugins[pluginInfo.id] : - platform_config.dependent_plugins[pluginInfo.id]; - var edit_config_changes = null; - if (pluginInfo.getEditConfigs) { - edit_config_changes = pluginInfo.getEditConfigs(self.platform); - } - - // get config munge, aka how did this plugin change various config files - var config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); - // global munge looks at all plugins' changes to config files - var global_munge = platform_config.config_munge; - var munge = mungeutil.decrement_munge(global_munge, config_munge); - - for (var file in munge.files) { - self.apply_file_munge(file, munge.files[file], /* remove = */ true); - } - - // Remove from installed_plugins - self.platformJson.removePlugin(pluginInfo.id, is_top_level); - return self; -} - -PlatformMunger.prototype.add_plugin_changes = add_plugin_changes; -function add_plugin_changes (pluginInfo, plugin_vars, is_top_level, should_increment, plugin_force) { - var self = this; - var platform_config = self.platformJson.root; - - var edit_config_changes = null; - if (pluginInfo.getEditConfigs) { - edit_config_changes = pluginInfo.getEditConfigs(self.platform); - } - - var config_munge; - - if (!edit_config_changes || edit_config_changes.length === 0) { - // get config munge, aka how should this plugin change various config files - config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars); - } else { - var isConflictingInfo = is_conflicting(edit_config_changes, platform_config.config_munge, self, plugin_force); - - if (isConflictingInfo.conflictWithConfigxml) { - throw new Error(pluginInfo.id + - ' cannot be added. changes in this plugin conflicts with changes in config.xml. Conflicts must be resolved before plugin can be added.'); - } - if (plugin_force) { - events.emit('warn', '--force is used. edit-config will overwrite conflicts if any. Conflicting plugins may not work as expected.'); - - // remove conflicting munges - var conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); - for (var conflict_file in conflict_munge.files) { - self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); - } - - // force add new munges - config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); - } else if (isConflictingInfo.conflictFound) { - throw new Error('There was a conflict trying to modify attributes with in plugin ' + pluginInfo.id + - '. The conflicting plugin, ' + isConflictingInfo.conflictingPlugin + ', already modified the same attributes. The conflict must be resolved before ' + - pluginInfo.id + ' can be added. You may use --force to add the plugin and overwrite the conflicting attributes.'); - } else { - // no conflicts, will handle edit-config - config_munge = self.generate_plugin_config_munge(pluginInfo, plugin_vars, edit_config_changes); - } - } - - self = munge_helper(should_increment, self, platform_config, config_munge); - - // Move to installed/dependent_plugins - self.platformJson.addPlugin(pluginInfo.id, plugin_vars || {}, is_top_level); - return self; -} - -// Handle edit-config changes from config.xml -PlatformMunger.prototype.add_config_changes = add_config_changes; -function add_config_changes (config, should_increment) { - var self = this; - var platform_config = self.platformJson.root; - - var config_munge; - var changes = []; - - if (config.getEditConfigs) { - var edit_config_changes = config.getEditConfigs(self.platform); - if (edit_config_changes) { - changes = changes.concat(edit_config_changes); - } - } - - if (config.getConfigFiles) { - var config_files_changes = config.getConfigFiles(self.platform); - if (config_files_changes) { - changes = changes.concat(config_files_changes); - } - } - - if (changes && changes.length > 0) { - var isConflictingInfo = is_conflicting(changes, platform_config.config_munge, self, true /* always force overwrite other edit-config */); - if (isConflictingInfo.conflictFound) { - var conflict_munge; - var conflict_file; - - if (Object.keys(isConflictingInfo.configxmlMunge.files).length !== 0) { - // silently remove conflicting config.xml munges so new munges can be added - conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.configxmlMunge); - for (conflict_file in conflict_munge.files) { - self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); - } - } - if (Object.keys(isConflictingInfo.conflictingMunge.files).length !== 0) { - events.emit('warn', 'Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes'); - - // remove conflicting plugin.xml munges - conflict_munge = mungeutil.decrement_munge(platform_config.config_munge, isConflictingInfo.conflictingMunge); - for (conflict_file in conflict_munge.files) { - self.apply_file_munge(conflict_file, conflict_munge.files[conflict_file], /* remove = */ true); - } - } - } - } - - // Add config.xml edit-config and config-file munges - config_munge = self.generate_config_xml_munge(config, changes, 'config.xml'); - self = munge_helper(should_increment, self, platform_config, config_munge); - - // Move to installed/dependent_plugins - return self; -} - -function munge_helper (should_increment, self, platform_config, config_munge) { - // global munge looks at all changes to config files - - // TODO: The should_increment param is only used by cordova-cli and is going away soon. - // If should_increment is set to false, avoid modifying the global_munge (use clone) - // and apply the entire config_munge because it's already a proper subset of the global_munge. - var munge, global_munge; - if (should_increment) { - global_munge = platform_config.config_munge; - munge = mungeutil.increment_munge(global_munge, config_munge); - } else { - global_munge = mungeutil.clone_munge(platform_config.config_munge); - munge = config_munge; - } - - for (var file in munge.files) { - self.apply_file_munge(file, munge.files[file]); - } - - return self; -} - -// Load the global munge from platform json and apply all of it. -// Used by cordova prepare to re-generate some config file from platform -// defaults and the global munge. -PlatformMunger.prototype.reapply_global_munge = reapply_global_munge; -function reapply_global_munge () { - var self = this; - - var platform_config = self.platformJson.root; - var global_munge = platform_config.config_munge; - for (var file in global_munge.files) { - self.apply_file_munge(file, global_munge.files[file]); - } - - return self; -} - -// generate_plugin_config_munge -// Generate the munge object from config.xml -PlatformMunger.prototype.generate_config_xml_munge = generate_config_xml_munge; -function generate_config_xml_munge (config, config_changes, type) { - var munge = { files: {} }; - var id; - - if (!config_changes) { - return munge; - } - - if (type === 'config.xml') { - id = type; - } else { - id = config.id; - } - - config_changes.forEach(function (change) { - change.xmls.forEach(function (xml) { - // 1. stringify each xml - var stringified = (new et.ElementTree(xml)).write({xml_declaration: false}); - // 2. add into munge - if (change.mode) { - mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, id: id }); - } else { - mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after }); - } - }); - }); - return munge; -} - -// generate_plugin_config_munge -// Generate the munge object from plugin.xml + vars -PlatformMunger.prototype.generate_plugin_config_munge = generate_plugin_config_munge; -function generate_plugin_config_munge (pluginInfo, vars, edit_config_changes) { - var self = this; - - vars = vars || {}; - var munge = { files: {} }; - var changes = pluginInfo.getConfigFiles(self.platform); - - if (edit_config_changes) { - Array.prototype.push.apply(changes, edit_config_changes); - } - - changes.forEach(function (change) { - change.xmls.forEach(function (xml) { - // 1. stringify each xml - var stringified = (new et.ElementTree(xml)).write({xml_declaration: false}); - // interp vars - if (vars) { - Object.keys(vars).forEach(function (key) { - var regExp = new RegExp('\\$' + key, 'g'); - stringified = stringified.replace(regExp, vars[key]); - }); - } - // 2. add into munge - if (change.mode) { - if (change.mode !== 'remove') { - mungeutil.deep_add(munge, change.file, change.target, { xml: stringified, count: 1, mode: change.mode, plugin: pluginInfo.id }); - } - } else { - mungeutil.deep_add(munge, change.target, change.parent, { xml: stringified, count: 1, after: change.after }); - } - }); - }); - return munge; -} - -function is_conflicting (editchanges, config_munge, self, force) { - var files = config_munge.files; - var conflictFound = false; - var conflictWithConfigxml = false; - var conflictingMunge = { files: {} }; - var configxmlMunge = { files: {} }; - var conflictingParent; - var conflictingPlugin; - - editchanges.forEach(function (editchange) { - if (files[editchange.file]) { - var parents = files[editchange.file].parents; - var target = parents[editchange.target]; - - // Check if the edit target will resolve to an existing target - if (!target || target.length === 0) { - var file_xml = self.config_keeper.get(self.project_dir, self.platform, editchange.file).data; - var resolveEditTarget = xml_helpers.resolveParent(file_xml, editchange.target); - var resolveTarget; - - if (resolveEditTarget) { - for (var parent in parents) { - resolveTarget = xml_helpers.resolveParent(file_xml, parent); - if (resolveEditTarget === resolveTarget) { - conflictingParent = parent; - target = parents[parent]; - break; - } - } - } - } else { - conflictingParent = editchange.target; - } - - if (target && target.length !== 0) { - // conflict has been found - conflictFound = true; - - if (editchange.id === 'config.xml') { - if (target[0].id === 'config.xml') { - // Keep track of config.xml/config.xml edit-config conflicts - mungeutil.deep_add(configxmlMunge, editchange.file, conflictingParent, target[0]); - } else { - // Keep track of config.xml x plugin.xml edit-config conflicts - mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); - } - } else { - if (target[0].id === 'config.xml') { - // plugin.xml cannot overwrite config.xml changes even if --force is used - conflictWithConfigxml = true; - return; - } - - if (force) { - // Need to find all conflicts when --force is used, track conflicting munges - mungeutil.deep_add(conflictingMunge, editchange.file, conflictingParent, target[0]); - } else { - // plugin cannot overwrite other plugin changes without --force - conflictingPlugin = target[0].plugin; - - } - } - } - } - }); - - return {conflictFound: conflictFound, - conflictingPlugin: conflictingPlugin, - conflictingMunge: conflictingMunge, - configxmlMunge: configxmlMunge, - conflictWithConfigxml: conflictWithConfigxml}; -} - -// Go over the prepare queue and apply the config munges for each plugin -// that has been (un)installed. -PlatformMunger.prototype.process = PlatformMunger_process; -function PlatformMunger_process (plugins_dir) { - var self = this; - var platform_config = self.platformJson.root; - - // Uninstallation first - platform_config.prepare_queue.uninstalled.forEach(function (u) { - var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); - self.remove_plugin_changes(pluginInfo, u.topLevel); - }); - - // Now handle installation - platform_config.prepare_queue.installed.forEach(function (u) { - var pluginInfo = self.pluginInfoProvider.get(path.join(plugins_dir, u.plugin)); - self.add_plugin_changes(pluginInfo, u.vars, u.topLevel, true, u.force); - }); - - // Empty out installed/ uninstalled queues. - platform_config.prepare_queue.uninstalled = []; - platform_config.prepare_queue.installed = []; -} -/** ** END of PlatformMunger ****/ diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js b/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js deleted file mode 100644 index 2e5ed5f..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigFile.js +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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. - * -*/ - -/* eslint no-control-regex: 0 */ - -var fs = require('fs'); -var path = require('path'); - -var modules = {}; -var addProperty = require('../util/addProperty'); - -// Use delay loading to ensure plist and other node modules to not get loaded -// on Android, Windows platforms -addProperty(module, 'bplist', 'bplist-parser', modules); -addProperty(module, 'et', 'elementtree', modules); -addProperty(module, 'glob', 'glob', modules); -addProperty(module, 'plist', 'plist', modules); -addProperty(module, 'plist_helpers', '../util/plist-helpers', modules); -addProperty(module, 'xml_helpers', '../util/xml-helpers', modules); - -/****************************************************************************** -* ConfigFile class -* -* Can load and keep various types of config files. Provides some functionality -* specific to some file types such as grafting XML children. In most cases it -* should be instantiated by ConfigKeeper. -* -* For plugin.xml files use as: -* plugin_config = self.config_keeper.get(plugin_dir, '', 'plugin.xml'); -* -* TODO: Consider moving it out to a separate file and maybe partially with -* overrides in platform handlers. -******************************************************************************/ -function ConfigFile (project_dir, platform, file_tag) { - this.project_dir = project_dir; - this.platform = platform; - this.file_tag = file_tag; - this.is_changed = false; - - this.load(); -} - -// ConfigFile.load() -ConfigFile.prototype.load = ConfigFile_load; -function ConfigFile_load () { - var self = this; - - // config file may be in a place not exactly specified in the target - var filepath = self.filepath = resolveConfigFilePath(self.project_dir, self.platform, self.file_tag); - - if (!filepath || !fs.existsSync(filepath)) { - self.exists = false; - return; - } - self.exists = true; - self.mtime = fs.statSync(self.filepath).mtime; - - var ext = path.extname(filepath); - // Windows8 uses an appxmanifest, and wp8 will likely use - // the same in a future release - if (ext === '.xml' || ext === '.appxmanifest' || ext === '.storyboard') { - self.type = 'xml'; - self.data = modules.xml_helpers.parseElementtreeSync(filepath); - } else { - // plist file - self.type = 'plist'; - // TODO: isBinaryPlist() reads the file and then parse re-reads it again. - // We always write out text plist, not binary. - // Do we still need to support binary plist? - // If yes, use plist.parseStringSync() and read the file once. - self.data = isBinaryPlist(filepath) ? - modules.bplist.parseBuffer(fs.readFileSync(filepath))[0] : - modules.plist.parse(fs.readFileSync(filepath, 'utf8')); - } -} - -ConfigFile.prototype.save = function ConfigFile_save () { - var self = this; - if (self.type === 'xml') { - fs.writeFileSync(self.filepath, self.data.write({indent: 4}), 'utf-8'); - } else { - // plist - var regExp = new RegExp('[ \t\r\n]+?', 'g'); - fs.writeFileSync(self.filepath, modules.plist.build(self.data).replace(regExp, '')); - } - self.is_changed = false; -}; - -ConfigFile.prototype.graft_child = function ConfigFile_graft_child (selector, xml_child) { - var self = this; - var filepath = self.filepath; - var result; - if (self.type === 'xml') { - var xml_to_graft = [modules.et.XML(xml_child.xml)]; - switch (xml_child.mode) { - case 'merge': - result = modules.xml_helpers.graftXMLMerge(self.data, xml_to_graft, selector, xml_child); - break; - case 'overwrite': - result = modules.xml_helpers.graftXMLOverwrite(self.data, xml_to_graft, selector, xml_child); - break; - case 'remove': - result = modules.xml_helpers.pruneXMLRemove(self.data, selector, xml_to_graft); - break; - default: - result = modules.xml_helpers.graftXML(self.data, xml_to_graft, selector, xml_child.after); - } - if (!result) { - throw new Error('Unable to graft xml at selector "' + selector + '" from "' + filepath + '" during config install'); - } - } else { - // plist file - result = modules.plist_helpers.graftPLIST(self.data, xml_child.xml, selector); - if (!result) { - throw new Error('Unable to graft plist "' + filepath + '" during config install'); - } - } - self.is_changed = true; -}; - -ConfigFile.prototype.prune_child = function ConfigFile_prune_child (selector, xml_child) { - var self = this; - var filepath = self.filepath; - var result; - if (self.type === 'xml') { - var xml_to_graft = [modules.et.XML(xml_child.xml)]; - switch (xml_child.mode) { - case 'merge': - case 'overwrite': - result = modules.xml_helpers.pruneXMLRestore(self.data, selector, xml_child); - break; - case 'remove': - result = modules.xml_helpers.pruneXMLRemove(self.data, selector, xml_to_graft); - break; - default: - result = modules.xml_helpers.pruneXML(self.data, xml_to_graft, selector); - } - } else { - // plist file - result = modules.plist_helpers.prunePLIST(self.data, xml_child.xml, selector); - } - if (!result) { - var err_msg = 'Pruning at selector "' + selector + '" from "' + filepath + '" went bad.'; - throw new Error(err_msg); - } - self.is_changed = true; -}; - -// Some config-file target attributes are not qualified with a full leading directory, or contain wildcards. -// Resolve to a real path in this function. -// TODO: getIOSProjectname is slow because of glob, try to avoid calling it several times per project. -function resolveConfigFilePath (project_dir, platform, file) { - var filepath = path.join(project_dir, file); - var matches; - - file = path.normalize(file); - - if (file.indexOf('*') > -1) { - // handle wildcards in targets using glob. - matches = modules.glob.sync(path.join(project_dir, '**', file)); - if (matches.length) filepath = matches[0]; - - // [CB-5989] multiple Info.plist files may exist. default to $PROJECT_NAME-Info.plist - if (matches.length > 1 && file.indexOf('-Info.plist') > -1) { - var plistName = getIOSProjectname(project_dir) + '-Info.plist'; - for (var i = 0; i < matches.length; i++) { - if (matches[i].indexOf(plistName) > -1) { - filepath = matches[i]; - break; - } - } - } - return filepath; - } - - // XXX this checks for android studio projects - // only if none of the options above are satisfied does this get called - // TODO: Move this out of cordova-common and into the platforms somehow - if (platform === 'android' && !fs.existsSync(filepath)) { - if (file === 'AndroidManifest.xml') { - filepath = path.join(project_dir, 'app', 'src', 'main', 'AndroidManifest.xml'); - } else if (file.endsWith('config.xml')) { - filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', 'config.xml'); - } else if (file.endsWith('strings.xml')) { - // Plugins really shouldn't mess with strings.xml, since it's able to be localized - filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'values', 'strings.xml'); - } else if (file.includes(path.join('res', 'xml'))) { - // Catch-all for all other stored XML configuration in legacy plugins - var config_file = path.basename(file); - filepath = path.join(project_dir, 'app', 'src', 'main', 'res', 'xml', config_file); - } - return filepath; - } - - // special-case config.xml target that is just "config.xml" for other platforms. This should - // be resolved to the real location of the file. - // TODO: Move this out of cordova-common into platforms - if (file === 'config.xml') { - if (platform === 'ubuntu') { - filepath = path.join(project_dir, 'config.xml'); - } else if (platform === 'ios') { - var iospath = module.exports.getIOSProjectname(project_dir); - filepath = path.join(project_dir, iospath, 'config.xml'); - } else { - matches = modules.glob.sync(path.join(project_dir, '**', 'config.xml')); - if (matches.length) filepath = matches[0]; - } - return filepath; - } - - // None of the special cases matched, returning project_dir/file. - return filepath; -} - -// Find out the real name of an iOS project -// TODO: glob is slow, need a better way or caching, or avoid using more than once. -function getIOSProjectname (project_dir) { - var matches = modules.glob.sync(path.join(project_dir, '*.xcodeproj')); - var iospath; - if (matches.length === 1) { - iospath = path.basename(matches[0], '.xcodeproj'); - } else { - var msg; - if (matches.length === 0) { - msg = 'Does not appear to be an xcode project, no xcode project file in ' + project_dir; - } else { - msg = 'There are multiple *.xcodeproj dirs in ' + project_dir; - } - throw new Error(msg); - } - return iospath; -} - -// determine if a plist file is binary -function isBinaryPlist (filename) { - // I wish there was a synchronous way to read only the first 6 bytes of a - // file. This is wasteful :/ - var buf = '' + fs.readFileSync(filename, 'utf8'); - // binary plists start with a magic header, "bplist" - return buf.substring(0, 6) === 'bplist'; -} - -module.exports = ConfigFile; -module.exports.isBinaryPlist = isBinaryPlist; -module.exports.getIOSProjectname = getIOSProjectname; -module.exports.resolveConfigFilePath = resolveConfigFilePath; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js b/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js deleted file mode 100644 index 0ef0435..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/ConfigKeeper.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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. - * -*/ -/* jshint sub:true */ - -var path = require('path'); -var ConfigFile = require('./ConfigFile'); - -/****************************************************************************** -* ConfigKeeper class -* -* Used to load and store config files to avoid re-parsing and writing them out -* multiple times. -* -* The config files are referred to by a fake path constructed as -* project_dir/platform/file -* where file is the name used for the file in config munges. -******************************************************************************/ -function ConfigKeeper (project_dir, plugins_dir) { - this.project_dir = project_dir; - this.plugins_dir = plugins_dir; - this._cached = {}; -} - -ConfigKeeper.prototype.get = function ConfigKeeper_get (project_dir, platform, file) { - var self = this; - - // This fixes a bug with older plugins - when specifying config xml instead of res/xml/config.xml - // https://issues.apache.org/jira/browse/CB-6414 - if (file === 'config.xml' && platform === 'android') { - file = 'res/xml/config.xml'; - } - var fake_path = path.join(project_dir, platform, file); - - if (self._cached[fake_path]) { - return self._cached[fake_path]; - } - // File was not cached, need to load. - var config_file = new ConfigFile(project_dir, platform, file); - self._cached[fake_path] = config_file; - return config_file; -}; - -ConfigKeeper.prototype.save_all = function ConfigKeeper_save_all () { - var self = this; - Object.keys(self._cached).forEach(function (fake_path) { - var config_file = self._cached[fake_path]; - if (config_file.is_changed) config_file.save(); - }); -}; - -module.exports = ConfigKeeper; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/munge-util.js b/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/munge-util.js deleted file mode 100644 index 62648d8..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigChanges/munge-util.js +++ /dev/null @@ -1,162 +0,0 @@ -/* - * 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. - * -*/ -/* jshint sub:true */ - -var _ = require('underscore'); - -// add the count of [key1][key2]...[keyN] to obj -// return true if it didn't exist before -exports.deep_add = function deep_add (obj, keys /* or key1, key2 .... */) { - if (!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments, 1); - } - - return exports.process_munge(obj, true/* createParents */, function (parentArray, k) { - var found = _.find(parentArray, function (element) { - return element.xml === k.xml; - }); - if (found) { - found.after = found.after || k.after; - found.count += k.count; - } else { - parentArray.push(k); - } - return !found; - }, keys); -}; - -// decrement the count of [key1][key2]...[keyN] from obj and remove if it reaches 0 -// return true if it was removed or not found -exports.deep_remove = function deep_remove (obj, keys /* or key1, key2 .... */) { - if (!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments, 1); - } - - var result = exports.process_munge(obj, false/* createParents */, function (parentArray, k) { - var index = -1; - var found = _.find(parentArray, function (element) { - index++; - return element.xml === k.xml; - }); - if (found) { - if (parentArray[index].oldAttrib) { - k.oldAttrib = _.extend({}, parentArray[index].oldAttrib); - } - found.count -= k.count; - if (found.count > 0) { - return false; - } else { - parentArray.splice(index, 1); - } - } - return undefined; - }, keys); - - return typeof result === 'undefined' ? true : result; -}; - -// search for [key1][key2]...[keyN] -// return the object or undefined if not found -exports.deep_find = function deep_find (obj, keys /* or key1, key2 .... */) { - if (!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments, 1); - } - - return exports.process_munge(obj, false/* createParents? */, function (parentArray, k) { - return _.find(parentArray, function (element) { - return element.xml === (k.xml || k); - }); - }, keys); -}; - -// Execute func passing it the parent array and the xmlChild key. -// When createParents is true, add the file and parent items they are missing -// When createParents is false, stop and return undefined if the file and/or parent items are missing - -exports.process_munge = function process_munge (obj, createParents, func, keys /* or key1, key2 .... */) { - if (!Array.isArray(keys)) { - keys = Array.prototype.slice.call(arguments, 1); - } - var k = keys[0]; - if (keys.length === 1) { - return func(obj, k); - } else if (keys.length === 2) { - if (!obj.parents[k] && !createParents) { - return undefined; - } - obj.parents[k] = obj.parents[k] || []; - return exports.process_munge(obj.parents[k], createParents, func, keys.slice(1)); - } else if (keys.length === 3) { - if (!obj.files[k] && !createParents) { - return undefined; - } - obj.files[k] = obj.files[k] || { parents: {} }; - return exports.process_munge(obj.files[k], createParents, func, keys.slice(1)); - } else { - throw new Error('Invalid key format. Must contain at most 3 elements (file, parent, xmlChild).'); - } -}; - -// All values from munge are added to base as -// base[file][selector][child] += munge[file][selector][child] -// Returns a munge object containing values that exist in munge -// but not in base. -exports.increment_munge = function increment_munge (base, munge) { - var diff = { files: {} }; - - for (var file in munge.files) { - for (var selector in munge.files[file].parents) { - for (var xml_child in munge.files[file].parents[selector]) { - var val = munge.files[file].parents[selector][xml_child]; - // if node not in base, add it to diff and base - // else increment it's value in base without adding to diff - var newlyAdded = exports.deep_add(base, [file, selector, val]); - if (newlyAdded) { - exports.deep_add(diff, file, selector, val); - } - } - } - } - return diff; -}; - -// Update the base munge object as -// base[file][selector][child] -= munge[file][selector][child] -// nodes that reached zero value are removed from base and added to the returned munge -// object. -exports.decrement_munge = function decrement_munge (base, munge) { - var zeroed = { files: {} }; - - for (var file in munge.files) { - for (var selector in munge.files[file].parents) { - for (var xml_child in munge.files[file].parents[selector]) { - var val = munge.files[file].parents[selector][xml_child]; - // if node not in base, add it to diff and base - // else increment it's value in base without adding to diff - var removed = exports.deep_remove(base, [file, selector, val]); - if (removed) { - exports.deep_add(zeroed, file, selector, val); - } - } - } - } - return zeroed; -}; - -// For better readability where used -exports.clone_munge = function clone_munge (munge) { - return exports.increment_munge({}, munge); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigParser/ConfigParser.js b/node_modules/cordova-android/node_modules/cordova-common/src/ConfigParser/ConfigParser.js deleted file mode 100644 index 1a98c3a..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/ConfigParser/ConfigParser.js +++ /dev/null @@ -1,602 +0,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. -*/ - -var et = require('elementtree'); -var xml = require('../util/xml-helpers'); -var CordovaError = require('../CordovaError/CordovaError'); -var fs = require('fs'); -var events = require('../events'); - -/** Wraps a config.xml file */ -function ConfigParser (path) { - this.path = path; - try { - this.doc = xml.parseElementtreeSync(path); - this.cdvNamespacePrefix = getCordovaNamespacePrefix(this.doc); - et.register_namespace(this.cdvNamespacePrefix, 'http://cordova.apache.org/ns/1.0'); - } catch (e) { - events.emit('error', 'Parsing ' + path + ' failed'); - throw e; - } - var r = this.doc.getroot(); - if (r.tag !== 'widget') { - throw new CordovaError(path + ' has incorrect root node name (expected "widget", was "' + r.tag + '")'); - } -} - -function getNodeTextSafe (el) { - return el && el.text && el.text.trim(); -} - -function findOrCreate (doc, name) { - var ret = doc.find(name); - if (!ret) { - ret = new et.Element(name); - doc.getroot().append(ret); - } - return ret; -} - -function getCordovaNamespacePrefix (doc) { - var rootAtribs = Object.getOwnPropertyNames(doc.getroot().attrib); - var prefix = 'cdv'; - for (var j = 0; j < rootAtribs.length; j++) { - if (rootAtribs[j].indexOf('xmlns:') === 0 && - doc.getroot().attrib[rootAtribs[j]] === 'http://cordova.apache.org/ns/1.0') { - var strings = rootAtribs[j].split(':'); - prefix = strings[1]; - break; - } - } - return prefix; -} - -/** - * Finds the value of an element's attribute - * @param {String} attributeName Name of the attribute to search for - * @param {Array} elems An array of ElementTree nodes - * @return {String} - */ -function findElementAttributeValue (attributeName, elems) { - - elems = Array.isArray(elems) ? elems : [ elems ]; - - var value = elems.filter(function (elem) { - return elem.attrib.name.toLowerCase() === attributeName.toLowerCase(); - }).map(function (filteredElems) { - return filteredElems.attrib.value; - }).pop(); - - return value || ''; -} - -function removeChildren (el, selector) { - const matches = el.findall(selector); - matches.forEach(child => el.remove(child)); -} - -ConfigParser.prototype = { - getAttribute: function (attr) { - return this.doc.getroot().attrib[attr]; - }, - - packageName: function () { - return this.getAttribute('id'); - }, - setPackageName: function (id) { - this.doc.getroot().attrib['id'] = id; - }, - android_packageName: function () { - return this.getAttribute('android-packageName'); - }, - android_activityName: function () { - return this.getAttribute('android-activityName'); - }, - ios_CFBundleIdentifier: function () { - return this.getAttribute('ios-CFBundleIdentifier'); - }, - name: function () { - return getNodeTextSafe(this.doc.find('name')); - }, - setName: function (name) { - var el = findOrCreate(this.doc, 'name'); - el.text = name; - }, - shortName: function () { - return this.doc.find('name').attrib['short'] || this.name(); - }, - setShortName: function (shortname) { - var el = findOrCreate(this.doc, 'name'); - if (!el.text) { - el.text = shortname; - } - el.attrib['short'] = shortname; - }, - description: function () { - return getNodeTextSafe(this.doc.find('description')); - }, - setDescription: function (text) { - var el = findOrCreate(this.doc, 'description'); - el.text = text; - }, - version: function () { - return this.getAttribute('version'); - }, - windows_packageVersion: function () { - return this.getAttribute('windows-packageVersion'); - }, - android_versionCode: function () { - return this.getAttribute('android-versionCode'); - }, - ios_CFBundleVersion: function () { - return this.getAttribute('ios-CFBundleVersion'); - }, - setVersion: function (value) { - this.doc.getroot().attrib['version'] = value; - }, - author: function () { - return getNodeTextSafe(this.doc.find('author')); - }, - getGlobalPreference: function (name) { - return findElementAttributeValue(name, this.doc.findall('preference')); - }, - setGlobalPreference: function (name, value) { - var pref = this.doc.find('preference[@name="' + name + '"]'); - if (!pref) { - pref = new et.Element('preference'); - pref.attrib.name = name; - this.doc.getroot().append(pref); - } - pref.attrib.value = value; - }, - getPlatformPreference: function (name, platform) { - return findElementAttributeValue(name, this.doc.findall('./platform[@name="' + platform + '"]/preference')); - }, - getPreference: function (name, platform) { - - var platformPreference = ''; - - if (platform) { - platformPreference = this.getPlatformPreference(name, platform); - } - - return platformPreference || this.getGlobalPreference(name); - - }, - /** - * Returns all resources for the platform specified. - * @param {String} platform The platform. - * @param {string} resourceName Type of static resources to return. - * "icon" and "splash" currently supported. - * @return {Array} Resources for the platform specified. - */ - getStaticResources: function (platform, resourceName) { - var ret = []; - var staticResources = []; - if (platform) { // platform specific icons - this.doc.findall('./platform[@name="' + platform + '"]/' + resourceName).forEach(function (elt) { - elt.platform = platform; // mark as platform specific resource - staticResources.push(elt); - }); - } - // root level resources - staticResources = staticResources.concat(this.doc.findall(resourceName)); - // parse resource elements - var that = this; - staticResources.forEach(function (elt) { - var res = {}; - res.src = elt.attrib.src; - res.target = elt.attrib.target || undefined; - res.density = elt.attrib['density'] || elt.attrib[that.cdvNamespacePrefix + ':density'] || elt.attrib['gap:density']; - res.platform = elt.platform || null; // null means icon represents default icon (shared between platforms) - res.width = +elt.attrib.width || undefined; - res.height = +elt.attrib.height || undefined; - - // default icon - if (!res.width && !res.height && !res.density) { - ret.defaultResource = res; - } - ret.push(res); - }); - - /** - * Returns resource with specified width and/or height. - * @param {number} width Width of resource. - * @param {number} height Height of resource. - * @return {Resource} Resource object or null if not found. - */ - ret.getBySize = function (width, height) { - return ret.filter(function (res) { - if (!res.width && !res.height) { - return false; - } - return ((!res.width || (width === res.width)) && - (!res.height || (height === res.height))); - })[0] || null; - }; - - /** - * Returns resource with specified density. - * @param {string} density Density of resource. - * @return {Resource} Resource object or null if not found. - */ - ret.getByDensity = function (density) { - return ret.filter(function (res) { - return res.density === density; - })[0] || null; - }; - - /** Returns default icons */ - ret.getDefault = function () { - return ret.defaultResource; - }; - - return ret; - }, - - /** - * Returns all icons for specific platform. - * @param {string} platform Platform name - * @return {Resource[]} Array of icon objects. - */ - getIcons: function (platform) { - return this.getStaticResources(platform, 'icon'); - }, - - /** - * Returns all splash images for specific platform. - * @param {string} platform Platform name - * @return {Resource[]} Array of Splash objects. - */ - getSplashScreens: function (platform) { - return this.getStaticResources(platform, 'splash'); - }, - - /** - * Returns all resource-files for a specific platform. - * @param {string} platform Platform name - * @param {boolean} includeGlobal Whether to return resource-files at the - * root level. - * @return {Resource[]} Array of resource file objects. - */ - getFileResources: function (platform, includeGlobal) { - var fileResources = []; - - if (platform) { // platform specific resources - fileResources = this.doc.findall('./platform[@name="' + platform + '"]/resource-file').map(function (tag) { - return { - platform: platform, - src: tag.attrib.src, - target: tag.attrib.target, - versions: tag.attrib.versions, - deviceTarget: tag.attrib['device-target'], - arch: tag.attrib.arch - }; - }); - } - - if (includeGlobal) { - this.doc.findall('resource-file').forEach(function (tag) { - fileResources.push({ - platform: platform || null, - src: tag.attrib.src, - target: tag.attrib.target, - versions: tag.attrib.versions, - deviceTarget: tag.attrib['device-target'], - arch: tag.attrib.arch - }); - }); - } - - return fileResources; - }, - - /** - * Returns all hook scripts for the hook type specified. - * @param {String} hook The hook type. - * @param {Array} platforms Platforms to look for scripts into (root scripts will be included as well). - * @return {Array} Script elements. - */ - getHookScripts: function (hook, platforms) { - var self = this; - var scriptElements = self.doc.findall('./hook'); - - if (platforms) { - platforms.forEach(function (platform) { - scriptElements = scriptElements.concat(self.doc.findall('./platform[@name="' + platform + '"]/hook')); - }); - } - - function filterScriptByHookType (el) { - return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; - } - - return scriptElements.filter(filterScriptByHookType); - }, - /** - * Returns a list of plugin (IDs). - * - * This function also returns any plugin's that - * were defined using the legacy tags. - * @return {string[]} Array of plugin IDs - */ - getPluginIdList: function () { - var plugins = this.doc.findall('plugin'); - var result = plugins.map(function (plugin) { - return plugin.attrib.name; - }); - var features = this.doc.findall('feature'); - features.forEach(function (element) { - var idTag = element.find('./param[@name="id"]'); - if (idTag) { - result.push(idTag.attrib.value); - } - }); - return result; - }, - getPlugins: function () { - return this.getPluginIdList().map(function (pluginId) { - return this.getPlugin(pluginId); - }, this); - }, - /** - * Adds a plugin element. Does not check for duplicates. - * @name addPlugin - * @function - * @param {object} attributes name and spec are supported - * @param {Array|object} variables name, value or arbitary object - */ - addPlugin: function (attributes, variables) { - if (!attributes && !attributes.name) return; - var el = new et.Element('plugin'); - el.attrib.name = attributes.name; - if (attributes.spec) { - el.attrib.spec = attributes.spec; - } - - // support arbitrary object as variables source - if (variables && typeof variables === 'object' && !Array.isArray(variables)) { - variables = Object.keys(variables) - .map(function (variableName) { - return {name: variableName, value: variables[variableName]}; - }); - } - - if (variables) { - variables.forEach(function (variable) { - el.append(new et.Element('variable', { name: variable.name, value: variable.value })); - }); - } - this.doc.getroot().append(el); - }, - /** - * Retrives the plugin with the given id or null if not found. - * - * This function also returns any plugin's that - * were defined using the legacy tags. - * @name getPlugin - * @function - * @param {String} id - * @returns {object} plugin including any variables - */ - getPlugin: function (id) { - if (!id) { - return undefined; - } - var pluginElement = this.doc.find('./plugin/[@name="' + id + '"]'); - if (pluginElement === null) { - var legacyFeature = this.doc.find('./feature/param[@name="id"][@value="' + id + '"]/..'); - if (legacyFeature) { - events.emit('log', 'Found deprecated feature entry for ' + id + ' in config.xml.'); - return featureToPlugin(legacyFeature); - } - return undefined; - } - var plugin = {}; - - plugin.name = pluginElement.attrib.name; - plugin.spec = pluginElement.attrib.spec || pluginElement.attrib.src || pluginElement.attrib.version; - plugin.variables = {}; - var variableElements = pluginElement.findall('variable'); - variableElements.forEach(function (varElement) { - var name = varElement.attrib.name; - var value = varElement.attrib.value; - if (name) { - plugin.variables[name] = value; - } - }); - return plugin; - }, - /** - * Remove the plugin entry with give name (id). - * - * This function also operates on any plugin's that - * were defined using the legacy tags. - * @name removePlugin - * @function - * @param id name of the plugin - */ - removePlugin: function (id) { - if (!id) return; - const root = this.doc.getroot(); - removeChildren(root, `./plugin/[@name="${id}"]`); - removeChildren(root, `./feature/param[@name="id"][@value="${id}"]/..`); - }, - - // Add any element to the root - addElement: function (name, attributes) { - var el = et.Element(name); - for (var a in attributes) { - el.attrib[a] = attributes[a]; - } - this.doc.getroot().append(el); - }, - - /** - * Adds an engine. Does not check for duplicates. - * @param {String} name the engine name - * @param {String} spec engine source location or version (optional) - */ - addEngine: function (name, spec) { - if (!name) return; - var el = et.Element('engine'); - el.attrib.name = name; - if (spec) { - el.attrib.spec = spec; - } - this.doc.getroot().append(el); - }, - /** - * Removes all the engines with given name - * @param {String} name the engine name. - */ - removeEngine: function (name) { - removeChildren(this.doc.getroot(), `./engine/[@name="${name}"]`); - }, - getEngines: function () { - var engines = this.doc.findall('./engine'); - return engines.map(function (engine) { - var spec = engine.attrib.spec || engine.attrib.version; - return { - 'name': engine.attrib.name, - 'spec': spec || null - }; - }); - }, - /* Get all the access tags */ - getAccesses: function () { - var accesses = this.doc.findall('./access'); - return accesses.map(function (access) { - var minimum_tls_version = access.attrib['minimum-tls-version']; /* String */ - var requires_forward_secrecy = access.attrib['requires-forward-secrecy']; /* Boolean */ - var requires_certificate_transparency = access.attrib['requires-certificate-transparency']; /* Boolean */ - var allows_arbitrary_loads_in_web_content = access.attrib['allows-arbitrary-loads-in-web-content']; /* Boolean */ - var allows_arbitrary_loads_in_media = access.attrib['allows-arbitrary-loads-in-media']; /* Boolean (DEPRECATED) */ - var allows_arbitrary_loads_for_media = access.attrib['allows-arbitrary-loads-for-media']; /* Boolean */ - var allows_local_networking = access.attrib['allows-local-networking']; /* Boolean */ - - return { - 'origin': access.attrib.origin, - 'minimum_tls_version': minimum_tls_version, - 'requires_forward_secrecy': requires_forward_secrecy, - 'requires_certificate_transparency': requires_certificate_transparency, - 'allows_arbitrary_loads_in_web_content': allows_arbitrary_loads_in_web_content, - 'allows_arbitrary_loads_in_media': allows_arbitrary_loads_in_media, - 'allows_arbitrary_loads_for_media': allows_arbitrary_loads_for_media, - 'allows_local_networking': allows_local_networking - }; - }); - }, - /* Get all the allow-navigation tags */ - getAllowNavigations: function () { - var allow_navigations = this.doc.findall('./allow-navigation'); - return allow_navigations.map(function (allow_navigation) { - var minimum_tls_version = allow_navigation.attrib['minimum-tls-version']; /* String */ - var requires_forward_secrecy = allow_navigation.attrib['requires-forward-secrecy']; /* Boolean */ - var requires_certificate_transparency = allow_navigation.attrib['requires-certificate-transparency']; /* Boolean */ - - return { - 'href': allow_navigation.attrib.href, - 'minimum_tls_version': minimum_tls_version, - 'requires_forward_secrecy': requires_forward_secrecy, - 'requires_certificate_transparency': requires_certificate_transparency - }; - }); - }, - /* Get all the allow-intent tags */ - getAllowIntents: function () { - var allow_intents = this.doc.findall('./allow-intent'); - return allow_intents.map(function (allow_intent) { - return { - 'href': allow_intent.attrib.href - }; - }); - }, - /* Get all edit-config tags */ - getEditConfigs: function (platform) { - var platform_edit_configs = this.doc.findall('./platform[@name="' + platform + '"]/edit-config'); - var edit_configs = this.doc.findall('edit-config').concat(platform_edit_configs); - - return edit_configs.map(function (tag) { - var editConfig = - { - file: tag.attrib['file'], - target: tag.attrib['target'], - mode: tag.attrib['mode'], - id: 'config.xml', - xmls: tag.getchildren() - }; - return editConfig; - }); - }, - - /* Get all config-file tags */ - getConfigFiles: function (platform) { - var platform_config_files = this.doc.findall('./platform[@name="' + platform + '"]/config-file'); - var config_files = this.doc.findall('config-file').concat(platform_config_files); - - return config_files.map(function (tag) { - var configFile = - { - target: tag.attrib['target'], - parent: tag.attrib['parent'], - after: tag.attrib['after'], - xmls: tag.getchildren(), - // To support demuxing via versions - versions: tag.attrib['versions'], - deviceTarget: tag.attrib['device-target'] - }; - return configFile; - }); - }, - - write: function () { - fs.writeFileSync(this.path, this.doc.write({indent: 4}), 'utf-8'); - } -}; - -function featureToPlugin (featureElement) { - var plugin = {}; - plugin.variables = []; - var pluginVersion, - pluginSrc; - - var nodes = featureElement.findall('param'); - nodes.forEach(function (element) { - var n = element.attrib.name; - var v = element.attrib.value; - if (n === 'id') { - plugin.name = v; - } else if (n === 'version') { - pluginVersion = v; - } else if (n === 'url' || n === 'installPath') { - pluginSrc = v; - } else { - plugin.variables[n] = v; - } - }); - - var spec = pluginSrc || pluginVersion; - if (spec) { - plugin.spec = spec; - } - - return plugin; -} -module.exports = ConfigParser; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaCheck.js b/node_modules/cordova-android/node_modules/cordova-common/src/CordovaCheck.js deleted file mode 100644 index 28f629d..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaCheck.js +++ /dev/null @@ -1,76 +0,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. -*/ - -var fs = require('fs'); -var path = require('path'); - -function isRootDir (dir) { - if (fs.existsSync(path.join(dir, 'www'))) { - if (fs.existsSync(path.join(dir, 'config.xml'))) { - // For sure is. - if (fs.existsSync(path.join(dir, 'platforms'))) { - return 2; - } else { - return 1; - } - } - // Might be (or may be under platforms/). - if (fs.existsSync(path.join(dir, 'www', 'config.xml'))) { - return 1; - } - } - return 0; -} - -// Runs up the directory chain looking for a .cordova directory. -// IF it is found we are in a Cordova project. -// Omit argument to use CWD. -function isCordova (dir) { - if (!dir) { - // Prefer PWD over cwd so that symlinked dirs within your PWD work correctly (CB-5687). - var pwd = process.env.PWD; - var cwd = process.cwd(); - if (pwd && pwd !== cwd && pwd !== 'undefined') { - return isCordova(pwd) || isCordova(cwd); - } - return isCordova(cwd); - } - var bestReturnValueSoFar = false; - for (var i = 0; i < 1000; ++i) { - var result = isRootDir(dir); - if (result === 2) { - return dir; - } - if (result === 1) { - bestReturnValueSoFar = dir; - } - var parentDir = path.normalize(path.join(dir, '..')); - // Detect fs root. - if (parentDir === dir) { - return bestReturnValueSoFar; - } - dir = parentDir; - } - console.error('Hit an unhandled case in CordovaCheck.isCordova'); - return false; -} - -module.exports = { - findProjectRoot: isCordova -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaError.js b/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaError.js deleted file mode 100644 index 24de6af..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaError.js +++ /dev/null @@ -1,92 +0,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. -*/ - -/* eslint no-proto: 0 */ - -var EOL = require('os').EOL; - -/** - * A derived exception class. See usage example in cli.js - * Based on: - * stackoverflow.com/questions/1382107/whats-a-good-way-to-extend-error-in-javascript/8460753#8460753 - * @param {String} message Error message - * @param {Number} [code=0] Error code - * @param {CordovaExternalToolErrorContext} [context] External tool error context object - * @constructor - */ -function CordovaError (message, code, context) { - Error.captureStackTrace(this, this.constructor); - this.name = this.constructor.name; - this.message = message; - this.code = code || CordovaError.UNKNOWN_ERROR; - this.context = context; -} -CordovaError.prototype.__proto__ = Error.prototype; - -// TODO: Extend error codes according the projects specifics -CordovaError.UNKNOWN_ERROR = 0; -CordovaError.EXTERNAL_TOOL_ERROR = 1; - -/** - * Translates instance's error code number into error code name, e.g. 0 -> UNKNOWN_ERROR - * @returns {string} Error code string name - */ -CordovaError.prototype.getErrorCodeName = function () { - for (var key in CordovaError) { - if (CordovaError.hasOwnProperty(key)) { - if (CordovaError[key] === this.code) { - return key; - } - } - } -}; - -/** - * Converts CordovaError instance to string representation - * @param {Boolean} [isVerbose] Set up verbose mode. Used to provide more - * details including information about error code name and context - * @return {String} Stringified error representation - */ -CordovaError.prototype.toString = function (isVerbose) { - var message = ''; - var codePrefix = ''; - - if (this.code !== CordovaError.UNKNOWN_ERROR) { - codePrefix = 'code: ' + this.code + (isVerbose ? (' (' + this.getErrorCodeName() + ')') : '') + ' '; - } - - if (this.code === CordovaError.EXTERNAL_TOOL_ERROR) { - if (typeof this.context !== 'undefined') { - if (isVerbose) { - message = codePrefix + EOL + this.context.toString(isVerbose) + '\n failed with an error: ' + - this.message + EOL + 'Stack trace: ' + this.stack; - } else { - message = codePrefix + '\'' + this.context.toString(isVerbose) + '\' ' + this.message; - } - } else { - message = 'External tool failed with an error: ' + this.message; - } - } else { - message = isVerbose ? codePrefix + this.stack : codePrefix + this.message; - } - - return message; -}; - -module.exports = CordovaError; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js b/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js deleted file mode 100644 index 30699b4..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaError/CordovaExternalToolErrorContext.js +++ /dev/null @@ -1,48 +0,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. - */ - -/* jshint proto:true */ - -var path = require('path'); - -/** - * @param {String} cmd Command full path - * @param {String[]} args Command args - * @param {String} [cwd] Command working directory - * @constructor - */ -function CordovaExternalToolErrorContext (cmd, args, cwd) { - this.cmd = cmd; - // Helper field for readability - this.cmdShortName = path.basename(cmd); - this.args = args; - this.cwd = cwd; -} - -CordovaExternalToolErrorContext.prototype.toString = function (isVerbose) { - if (isVerbose) { - return 'External tool \'' + this.cmdShortName + '\'' + - '\nCommand full path: ' + this.cmd + '\nCommand args: ' + this.args + - (typeof this.cwd !== 'undefined' ? '\nCommand cwd: ' + this.cwd : ''); - } - - return this.cmdShortName; -}; - -module.exports = CordovaExternalToolErrorContext; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaLogger.js b/node_modules/cordova-android/node_modules/cordova-common/src/CordovaLogger.js deleted file mode 100644 index ea6e9ce..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/CordovaLogger.js +++ /dev/null @@ -1,220 +0,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. - */ - -var ansi = require('ansi'); -var EventEmitter = require('events').EventEmitter; -var CordovaError = require('./CordovaError/CordovaError'); -var EOL = require('os').EOL; - -var INSTANCE; - -/** - * @class CordovaLogger - * - * Implements logging facility that anybody could use. Should not be - * instantiated directly, `CordovaLogger.get()` method should be used instead - * to acquire logger instance - */ -function CordovaLogger () { - this.levels = {}; - this.colors = {}; - this.stdout = process.stdout; - this.stderr = process.stderr; - - this.stdoutCursor = ansi(this.stdout); - this.stderrCursor = ansi(this.stderr); - - this.addLevel('verbose', 1000, 'grey'); - this.addLevel('normal', 2000); - this.addLevel('warn', 2000, 'yellow'); - this.addLevel('info', 3000, 'blue'); - this.addLevel('error', 5000, 'red'); - this.addLevel('results', 10000); - - this.setLevel('normal'); -} - -/** - * Static method to create new or acquire existing instance. - * - * @return {CordovaLogger} Logger instance - */ -CordovaLogger.get = function () { - return INSTANCE || (INSTANCE = new CordovaLogger()); -}; - -CordovaLogger.VERBOSE = 'verbose'; -CordovaLogger.NORMAL = 'normal'; -CordovaLogger.WARN = 'warn'; -CordovaLogger.INFO = 'info'; -CordovaLogger.ERROR = 'error'; -CordovaLogger.RESULTS = 'results'; - -/** - * Emits log message to process' stdout/stderr depending on message's severity - * and current log level. If severity is less than current logger's level, - * then the message is ignored. - * - * @param {String} logLevel The message's log level. The logger should have - * corresponding level added (via logger.addLevel), otherwise - * `CordovaLogger.NORMAL` level will be used. - * @param {String} message The message, that should be logged to process' - * stdio - * - * @return {CordovaLogger} Current instance, to allow calls chaining. - */ -CordovaLogger.prototype.log = function (logLevel, message) { - // if there is no such logLevel defined, or provided level has - // less severity than active level, then just ignore this call and return - if (!this.levels[logLevel] || this.levels[logLevel] < this.levels[this.logLevel]) { - // return instance to allow to chain calls - return this; - } - - var isVerbose = this.logLevel === 'verbose'; - var cursor = this.stdoutCursor; - - if (message instanceof Error || logLevel === CordovaLogger.ERROR) { - message = formatError(message, isVerbose); - cursor = this.stderrCursor; - } - - var color = this.colors[logLevel]; - if (color) { - cursor.bold().fg[color](); - } - - cursor.write(message).reset().write(EOL); - - return this; -}; - -/** - * Adds a new level to logger instance. This method also creates a shortcut - * method to log events with the level provided (i.e. after adding new level - * 'debug', the method `debug(message)`, equal to logger.log('debug', message), - * will be added to logger instance) - * - * @param {String} level A log level name. The levels with the following - * names added by default to every instance: 'verbose', 'normal', 'warn', - * 'info', 'error', 'results' - * @param {Number} severity A number that represents level's severity. - * @param {String} color A valid color name, that will be used to log - * messages with this level. Any CSS color code or RGB value is allowed - * (according to ansi documentation: - * https://github.com/TooTallNate/ansi.js#features) - * - * @return {CordovaLogger} Current instance, to allow calls chaining. - */ -CordovaLogger.prototype.addLevel = function (level, severity, color) { - - this.levels[level] = severity; - - if (color) { - this.colors[level] = color; - } - - // Define own method with corresponding name - if (!this[level]) { - this[level] = this.log.bind(this, level); - } - - return this; -}; - -/** - * Sets the current logger level to provided value. If logger doesn't have level - * with this name, `CordovaLogger.NORMAL` will be used. - * - * @param {String} logLevel Level name. The level with this name should be - * added to logger before. - * - * @return {CordovaLogger} Current instance, to allow calls chaining. - */ -CordovaLogger.prototype.setLevel = function (logLevel) { - this.logLevel = this.levels[logLevel] ? logLevel : CordovaLogger.NORMAL; - - return this; -}; - -/** - * Adjusts the current logger level according to the passed options. - * - * @param {Object|Array} opts An object or args array with options - * - * @return {CordovaLogger} Current instance, to allow calls chaining. - */ -CordovaLogger.prototype.adjustLevel = function (opts) { - if (opts.verbose || (Array.isArray(opts) && opts.indexOf('--verbose') !== -1)) { - this.setLevel('verbose'); - } else if (opts.silent || (Array.isArray(opts) && opts.indexOf('--silent') !== -1)) { - this.setLevel('error'); - } - - return this; -}; - -/** - * Attaches logger to EventEmitter instance provided. - * - * @param {EventEmitter} eventEmitter An EventEmitter instance to attach - * logger to. - * - * @return {CordovaLogger} Current instance, to allow calls chaining. - */ -CordovaLogger.prototype.subscribe = function (eventEmitter) { - - if (!(eventEmitter instanceof EventEmitter)) { throw new Error('Subscribe method only accepts an EventEmitter instance as argument'); } - - eventEmitter.on('verbose', this.verbose) - .on('log', this.normal) - .on('info', this.info) - .on('warn', this.warn) - .on('warning', this.warn) - // Set up event handlers for logging and results emitted as events. - .on('results', this.results); - - return this; -}; - -function formatError (error, isVerbose) { - var message = ''; - - if (error instanceof CordovaError) { - message = error.toString(isVerbose); - } else if (error instanceof Error) { - if (isVerbose) { - message = error.stack; - } else { - message = error.message; - } - } else { - // Plain text error message - message = error; - } - - if (typeof message === 'string' && message.toUpperCase().indexOf('ERROR:') !== 0) { - // Needed for backward compatibility with external tools - message = 'Error: ' + message; - } - - return message; -} - -module.exports = CordovaLogger; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/FileUpdater.js b/node_modules/cordova-android/node_modules/cordova-common/src/FileUpdater.js deleted file mode 100644 index ea5d9e2..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/FileUpdater.js +++ /dev/null @@ -1,415 +0,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. -*/ - -'use strict'; - -var fs = require('fs'); -var path = require('path'); -var shell = require('shelljs'); -var minimatch = require('minimatch'); - -/** - * Logging callback used in the FileUpdater methods. - * @callback loggingCallback - * @param {string} message A message describing a single file update operation. - */ - -/** - * Updates a target file or directory with a source file or directory. (Directory updates are - * not recursive.) Stats for target and source items must be passed in. This is an internal - * helper function used by other methods in this module. - * - * @param {?string} sourcePath Source file or directory to be used to update the - * destination. If the source is null, then the destination is deleted if it exists. - * @param {?fs.Stats} sourceStats An instance of fs.Stats for the source path, or null if - * the source does not exist. - * @param {string} targetPath Required destination file or directory to be updated. If it does - * not exist, it will be created. - * @param {?fs.Stats} targetStats An instance of fs.Stats for the target path, or null if - * the target does not exist. - * @param {Object} [options] Optional additional parameters for the update. - * @param {string} [options.rootDir] Optional root directory (such as a project) to which target - * and source path parameters are relative; may be omitted if the paths are absolute. The - * rootDir is always omitted from any logged paths, to make the logs easier to read. - * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. - * Otherwise, a file is copied if the source's last-modified time is greather than or - * equal to the target's last-modified time, or if the file sizes are different. - * @param {loggingCallback} [log] Optional logging callback that takes a string message - * describing any file operations that are performed. - * @return {boolean} true if any changes were made, or false if the force flag is not set - * and everything was up to date - */ -function updatePathWithStats (sourcePath, sourceStats, targetPath, targetStats, options, log) { - var updated = false; - - var rootDir = (options && options.rootDir) || ''; - var copyAll = (options && options.all) || false; - - var targetFullPath = path.join(rootDir || '', targetPath); - - if (sourceStats) { - var sourceFullPath = path.join(rootDir || '', sourcePath); - - if (targetStats) { - // The target exists. But if the directory status doesn't match the source, delete it. - if (targetStats.isDirectory() && !sourceStats.isDirectory()) { - log('rmdir ' + targetPath + ' (source is a file)'); - shell.rm('-rf', targetFullPath); - targetStats = null; - updated = true; - } else if (!targetStats.isDirectory() && sourceStats.isDirectory()) { - log('delete ' + targetPath + ' (source is a directory)'); - shell.rm('-f', targetFullPath); - targetStats = null; - updated = true; - } - } - - if (!targetStats) { - if (sourceStats.isDirectory()) { - // The target directory does not exist, so it should be created. - log('mkdir ' + targetPath); - shell.mkdir('-p', targetFullPath); - updated = true; - } else if (sourceStats.isFile()) { - // The target file does not exist, so it should be copied from the source. - log('copy ' + sourcePath + ' ' + targetPath + (copyAll ? '' : ' (new file)')); - shell.cp('-f', sourceFullPath, targetFullPath); - updated = true; - } - } else if (sourceStats.isFile() && targetStats.isFile()) { - // The source and target paths both exist and are files. - if (copyAll) { - // The caller specified all files should be copied. - log('copy ' + sourcePath + ' ' + targetPath); - shell.cp('-f', sourceFullPath, targetFullPath); - updated = true; - } else { - // Copy if the source has been modified since it was copied to the target, or if - // the file sizes are different. (The latter catches most cases in which something - // was done to the file after copying.) Comparison is >= rather than > to allow - // for timestamps lacking sub-second precision in some filesystems. - if (sourceStats.mtime.getTime() >= targetStats.mtime.getTime() || - sourceStats.size !== targetStats.size) { - log('copy ' + sourcePath + ' ' + targetPath + ' (updated file)'); - shell.cp('-f', sourceFullPath, targetFullPath); - updated = true; - } - } - } - } else if (targetStats) { - // The target exists but the source is null, so the target should be deleted. - if (targetStats.isDirectory()) { - log('rmdir ' + targetPath + (copyAll ? '' : ' (no source)')); - shell.rm('-rf', targetFullPath); - } else { - log('delete ' + targetPath + (copyAll ? '' : ' (no source)')); - shell.rm('-f', targetFullPath); - } - updated = true; - } - - return updated; -} - -/** - * Helper for updatePath and updatePaths functions. Queries stats for source and target - * and ensures target directory exists before copying a file. - */ -function updatePathInternal (sourcePath, targetPath, options, log) { - var rootDir = (options && options.rootDir) || ''; - var targetFullPath = path.join(rootDir, targetPath); - var targetStats = fs.existsSync(targetFullPath) ? fs.statSync(targetFullPath) : null; - var sourceStats = null; - - if (sourcePath) { - // A non-null source path was specified. It should exist. - var sourceFullPath = path.join(rootDir, sourcePath); - if (!fs.existsSync(sourceFullPath)) { - throw new Error('Source path does not exist: ' + sourcePath); - } - - sourceStats = fs.statSync(sourceFullPath); - - // Create the target's parent directory if it doesn't exist. - var parentDir = path.dirname(targetFullPath); - if (!fs.existsSync(parentDir)) { - shell.mkdir('-p', parentDir); - } - } - - return updatePathWithStats(sourcePath, sourceStats, targetPath, targetStats, options, log); -} - -/** - * Updates a target file or directory with a source file or directory. (Directory updates are - * not recursive.) - * - * @param {?string} sourcePath Source file or directory to be used to update the - * destination. If the source is null, then the destination is deleted if it exists. - * @param {string} targetPath Required destination file or directory to be updated. If it does - * not exist, it will be created. - * @param {Object} [options] Optional additional parameters for the update. - * @param {string} [options.rootDir] Optional root directory (such as a project) to which target - * and source path parameters are relative; may be omitted if the paths are absolute. The - * rootDir is always omitted from any logged paths, to make the logs easier to read. - * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. - * Otherwise, a file is copied if the source's last-modified time is greather than or - * equal to the target's last-modified time, or if the file sizes are different. - * @param {loggingCallback} [log] Optional logging callback that takes a string message - * describing any file operations that are performed. - * @return {boolean} true if any changes were made, or false if the force flag is not set - * and everything was up to date - */ -function updatePath (sourcePath, targetPath, options, log) { - if (sourcePath !== null && typeof sourcePath !== 'string') { - throw new Error('A source path (or null) is required.'); - } - - if (!targetPath || typeof targetPath !== 'string') { - throw new Error('A target path is required.'); - } - - log = log || function () { }; - - return updatePathInternal(sourcePath, targetPath, options, log); -} - -/** - * Updates files and directories based on a mapping from target paths to source paths. Targets - * with null sources in the map are deleted. - * - * @param {Object} pathMap A dictionary mapping from target paths to source paths. - * @param {Object} [options] Optional additional parameters for the update. - * @param {string} [options.rootDir] Optional root directory (such as a project) to which target - * and source path parameters are relative; may be omitted if the paths are absolute. The - * rootDir is always omitted from any logged paths, to make the logs easier to read. - * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. - * Otherwise, a file is copied if the source's last-modified time is greather than or - * equal to the target's last-modified time, or if the file sizes are different. - * @param {loggingCallback} [log] Optional logging callback that takes a string message - * describing any file operations that are performed. - * @return {boolean} true if any changes were made, or false if the force flag is not set - * and everything was up to date - */ -function updatePaths (pathMap, options, log) { - if (!pathMap || typeof pathMap !== 'object' || Array.isArray(pathMap)) { - throw new Error('An object mapping from target paths to source paths is required.'); - } - - log = log || function () { }; - - var updated = false; - - // Iterate in sorted order to ensure directories are created before files under them. - Object.keys(pathMap).sort().forEach(function (targetPath) { - var sourcePath = pathMap[targetPath]; - updated = updatePathInternal(sourcePath, targetPath, options, log) || updated; - }); - - return updated; -} - -/** - * Updates a target directory with merged files and subdirectories from source directories. - * - * @param {string|string[]} sourceDirs Required source directory or array of source directories - * to be merged into the target. The directories are listed in order of precedence; files in - * directories later in the array supersede files in directories earlier in the array - * (regardless of timestamps). - * @param {string} targetDir Required destination directory to be updated. If it does not exist, - * it will be created. If it exists, newer files from source directories will be copied over, - * and files missing in the source directories will be deleted. - * @param {Object} [options] Optional additional parameters for the update. - * @param {string} [options.rootDir] Optional root directory (such as a project) to which target - * and source path parameters are relative; may be omitted if the paths are absolute. The - * rootDir is always omitted from any logged paths, to make the logs easier to read. - * @param {boolean} [options.all] If true, all files are copied regardless of last-modified times. - * Otherwise, a file is copied if the source's last-modified time is greather than or - * equal to the target's last-modified time, or if the file sizes are different. - * @param {string|string[]} [options.include] Optional glob string or array of glob strings that - * are tested against both target and source relative paths to determine if they are included - * in the merge-and-update. If unspecified, all items are included. - * @param {string|string[]} [options.exclude] Optional glob string or array of glob strings that - * are tested against both target and source relative paths to determine if they are excluded - * from the merge-and-update. Exclusions override inclusions. If unspecified, no items are - * excluded. - * @param {loggingCallback} [log] Optional logging callback that takes a string message - * describing any file operations that are performed. - * @return {boolean} true if any changes were made, or false if the force flag is not set - * and everything was up to date - */ -function mergeAndUpdateDir (sourceDirs, targetDir, options, log) { - if (sourceDirs && typeof sourceDirs === 'string') { - sourceDirs = [ sourceDirs ]; - } else if (!Array.isArray(sourceDirs)) { - throw new Error('A source directory path or array of paths is required.'); - } - - if (!targetDir || typeof targetDir !== 'string') { - throw new Error('A target directory path is required.'); - } - - log = log || function () { }; - - var rootDir = (options && options.rootDir) || ''; - - var include = (options && options.include) || [ '**' ]; - if (typeof include === 'string') { - include = [ include ]; - } else if (!Array.isArray(include)) { - throw new Error('Include parameter must be a glob string or array of glob strings.'); - } - - var exclude = (options && options.exclude) || []; - if (typeof exclude === 'string') { - exclude = [ exclude ]; - } else if (!Array.isArray(exclude)) { - throw new Error('Exclude parameter must be a glob string or array of glob strings.'); - } - - // Scan the files in each of the source directories. - var sourceMaps = sourceDirs.map(function (sourceDir) { - return path.join(rootDir, sourceDir); - }).map(function (sourcePath) { - if (!fs.existsSync(sourcePath)) { - throw new Error('Source directory does not exist: ' + sourcePath); - } - return mapDirectory(rootDir, path.relative(rootDir, sourcePath), include, exclude); - }); - - // Scan the files in the target directory, if it exists. - var targetMap = {}; - var targetFullPath = path.join(rootDir, targetDir); - if (fs.existsSync(targetFullPath)) { - targetMap = mapDirectory(rootDir, targetDir, include, exclude); - } - - var pathMap = mergePathMaps(sourceMaps, targetMap, targetDir); - - var updated = false; - - // Iterate in sorted order to ensure directories are created before files under them. - Object.keys(pathMap).sort().forEach(function (subPath) { - var entry = pathMap[subPath]; - updated = updatePathWithStats( - entry.sourcePath, - entry.sourceStats, - entry.targetPath, - entry.targetStats, - options, - log) || updated; - }); - - return updated; -} - -/** - * Creates a dictionary map of all files and directories under a path. - */ -function mapDirectory (rootDir, subDir, include, exclude) { - var dirMap = { '': { subDir: subDir, stats: fs.statSync(path.join(rootDir, subDir)) } }; - mapSubdirectory(rootDir, subDir, '', include, exclude, dirMap); - return dirMap; - - function mapSubdirectory (rootDir, subDir, relativeDir, include, exclude, dirMap) { - var itemMapped = false; - var items = fs.readdirSync(path.join(rootDir, subDir, relativeDir)); - - items.forEach(function (item) { - var relativePath = path.join(relativeDir, item); - if (!matchGlobArray(relativePath, exclude)) { - // Stats obtained here (required at least to know where to recurse in directories) - // are saved for later, where the modified times may also be used. This minimizes - // the number of file I/O operations performed. - var fullPath = path.join(rootDir, subDir, relativePath); - var stats = fs.statSync(fullPath); - - if (stats.isDirectory()) { - // Directories are included if either something under them is included or they - // match an include glob. - if (mapSubdirectory(rootDir, subDir, relativePath, include, exclude, dirMap) || - matchGlobArray(relativePath, include)) { - dirMap[relativePath] = { subDir: subDir, stats: stats }; - itemMapped = true; - } - } else if (stats.isFile()) { - // Files are included only if they match an include glob. - if (matchGlobArray(relativePath, include)) { - dirMap[relativePath] = { subDir: subDir, stats: stats }; - itemMapped = true; - } - } - } - }); - return itemMapped; - } - - function matchGlobArray (path, globs) { - return globs.some(function (elem) { - return minimatch(path, elem, {dot: true}); - }); - } -} - -/** - * Merges together multiple source maps and a target map into a single mapping from - * relative paths to objects with target and source paths and stats. - */ -function mergePathMaps (sourceMaps, targetMap, targetDir) { - // Merge multiple source maps together, along with target path info. - // Entries in later source maps override those in earlier source maps. - // Target stats will be filled in below for targets that exist. - var pathMap = {}; - sourceMaps.forEach(function (sourceMap) { - Object.keys(sourceMap).forEach(function (sourceSubPath) { - var sourceEntry = sourceMap[sourceSubPath]; - pathMap[sourceSubPath] = { - targetPath: path.join(targetDir, sourceSubPath), - targetStats: null, - sourcePath: path.join(sourceEntry.subDir, sourceSubPath), - sourceStats: sourceEntry.stats - }; - }); - }); - - // Fill in target stats for targets that exist, and create entries - // for targets that don't have any corresponding sources. - Object.keys(targetMap).forEach(function (subPath) { - var entry = pathMap[subPath]; - if (entry) { - entry.targetStats = targetMap[subPath].stats; - } else { - pathMap[subPath] = { - targetPath: path.join(targetDir, subPath), - targetStats: targetMap[subPath].stats, - sourcePath: null, - sourceStats: null - }; - } - }); - - return pathMap; -} - -module.exports = { - updatePath: updatePath, - updatePaths: updatePaths, - mergeAndUpdateDir: mergeAndUpdateDir -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/PlatformJson.js b/node_modules/cordova-android/node_modules/cordova-common/src/PlatformJson.js deleted file mode 100644 index 7eaf1a2..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/PlatformJson.js +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 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. - * -*/ - -var fs = require('fs'); -var path = require('path'); -var shelljs = require('shelljs'); -var mungeutil = require('./ConfigChanges/munge-util'); -var pluginMappernto = require('cordova-registry-mapper').newToOld; -var pluginMapperotn = require('cordova-registry-mapper').oldToNew; - -function PlatformJson (filePath, platform, root) { - this.filePath = filePath; - this.platform = platform; - this.root = fix_munge(root || {}); -} - -PlatformJson.load = function (plugins_dir, platform) { - var filePath = path.join(plugins_dir, platform + '.json'); - var root = null; - if (fs.existsSync(filePath)) { - root = JSON.parse(fs.readFileSync(filePath, 'utf-8')); - } - return new PlatformJson(filePath, platform, root); -}; - -PlatformJson.prototype.save = function () { - shelljs.mkdir('-p', path.dirname(this.filePath)); - fs.writeFileSync(this.filePath, JSON.stringify(this.root, null, 2), 'utf-8'); -}; - -/** - * Indicates whether the specified plugin is installed as a top-level (not as - * dependency to others) - * @method function - * @param {String} pluginId A plugin id to check for. - * @return {Boolean} true if plugin installed as top-level, otherwise false. - */ -PlatformJson.prototype.isPluginTopLevel = function (pluginId) { - var installedPlugins = this.root.installed_plugins; - return installedPlugins[pluginId] || - installedPlugins[pluginMappernto[pluginId]] || - installedPlugins[pluginMapperotn[pluginId]]; -}; - -/** - * Indicates whether the specified plugin is installed as a dependency to other - * plugin. - * @method function - * @param {String} pluginId A plugin id to check for. - * @return {Boolean} true if plugin installed as a dependency, otherwise false. - */ -PlatformJson.prototype.isPluginDependent = function (pluginId) { - var dependentPlugins = this.root.dependent_plugins; - return dependentPlugins[pluginId] || - dependentPlugins[pluginMappernto[pluginId]] || - dependentPlugins[pluginMapperotn[pluginId]]; -}; - -/** - * Indicates whether plugin is installed either as top-level or as dependency. - * @method function - * @param {String} pluginId A plugin id to check for. - * @return {Boolean} true if plugin installed, otherwise false. - */ -PlatformJson.prototype.isPluginInstalled = function (pluginId) { - return this.isPluginTopLevel(pluginId) || - this.isPluginDependent(pluginId); -}; - -PlatformJson.prototype.addPlugin = function (pluginId, variables, isTopLevel) { - var pluginsList = isTopLevel ? - this.root.installed_plugins : - this.root.dependent_plugins; - - pluginsList[pluginId] = variables; - - return this; -}; - -/** - * @chaining - * Generates and adds metadata for provided plugin into associated .json file - * - * @param {PluginInfo} pluginInfo A pluginInfo instance to add metadata from - * @returns {this} Current PlatformJson instance to allow calls chaining - */ -PlatformJson.prototype.addPluginMetadata = function (pluginInfo) { - - var installedModules = this.root.modules || []; - - var installedPaths = installedModules.map(function (installedModule) { - return installedModule.file; - }); - - var modulesToInstall = pluginInfo.getJsModules(this.platform) - .map(function (module) { - return new ModuleMetadata(pluginInfo.id, module); - }) - .filter(function (metadata) { - // Filter out modules which are already added to metadata - return installedPaths.indexOf(metadata.file) === -1; - }); - - this.root.modules = installedModules.concat(modulesToInstall); - - this.root.plugin_metadata = this.root.plugin_metadata || {}; - this.root.plugin_metadata[pluginInfo.id] = pluginInfo.version; - - return this; -}; - -PlatformJson.prototype.removePlugin = function (pluginId, isTopLevel) { - var pluginsList = isTopLevel ? - this.root.installed_plugins : - this.root.dependent_plugins; - - delete pluginsList[pluginId]; - - return this; -}; - -/** - * @chaining - * Removes metadata for provided plugin from associated file - * - * @param {PluginInfo} pluginInfo A PluginInfo instance to which modules' metadata - * we need to remove - * - * @returns {this} Current PlatformJson instance to allow calls chaining - */ -PlatformJson.prototype.removePluginMetadata = function (pluginInfo) { - var modulesToRemove = pluginInfo.getJsModules(this.platform) - .map(function (jsModule) { - return ['plugins', pluginInfo.id, jsModule.src].join('/'); - }); - - var installedModules = this.root.modules || []; - this.root.modules = installedModules - .filter(function (installedModule) { - // Leave only those metadatas which 'file' is not in removed modules - return (modulesToRemove.indexOf(installedModule.file) === -1); - }); - - if (this.root.plugin_metadata) { - delete this.root.plugin_metadata[pluginInfo.id]; - } - - return this; -}; - -PlatformJson.prototype.addInstalledPluginToPrepareQueue = function (pluginDirName, vars, is_top_level, force) { - this.root.prepare_queue.installed.push({'plugin': pluginDirName, 'vars': vars, 'topLevel': is_top_level, 'force': force}); -}; - -PlatformJson.prototype.addUninstalledPluginToPrepareQueue = function (pluginId, is_top_level) { - this.root.prepare_queue.uninstalled.push({'plugin': pluginId, 'id': pluginId, 'topLevel': is_top_level}); -}; - -/** - * Moves plugin, specified by id to top-level plugins. If plugin is top-level - * already, then does nothing. - * @method function - * @param {String} pluginId A plugin id to make top-level. - * @return {PlatformJson} PlatformJson instance. - */ -PlatformJson.prototype.makeTopLevel = function (pluginId) { - var plugin = this.root.dependent_plugins[pluginId]; - if (plugin) { - delete this.root.dependent_plugins[pluginId]; - this.root.installed_plugins[pluginId] = plugin; - } - return this; -}; - -/** - * Generates a metadata for all installed plugins and js modules. The resultant - * string is ready to be written to 'cordova_plugins.js' - * - * @returns {String} cordova_plugins.js contents - */ -PlatformJson.prototype.generateMetadata = function () { - return [ - 'cordova.define(\'cordova/plugin_list\', function(require, exports, module) {', - 'module.exports = ' + JSON.stringify(this.root.modules, null, 2) + ';', - 'module.exports.metadata = ', - '// TOP OF METADATA', - JSON.stringify(this.root.plugin_metadata, null, 2) + ';', - '// BOTTOM OF METADATA', - '});' // Close cordova.define. - ].join('\n'); -}; - -/** - * @chaining - * Generates and then saves metadata to specified file. Doesn't check if file exists. - * - * @param {String} destination File metadata will be written to - * @return {PlatformJson} PlatformJson instance - */ -PlatformJson.prototype.generateAndSaveMetadata = function (destination) { - var meta = this.generateMetadata(); - shelljs.mkdir('-p', path.dirname(destination)); - fs.writeFileSync(destination, meta, 'utf-8'); - - return this; -}; - -// convert a munge from the old format ([file][parent][xml] = count) to the current one -function fix_munge (root) { - root.prepare_queue = root.prepare_queue || {installed: [], uninstalled: []}; - root.config_munge = root.config_munge || {files: {}}; - root.installed_plugins = root.installed_plugins || {}; - root.dependent_plugins = root.dependent_plugins || {}; - - var munge = root.config_munge; - if (!munge.files) { - var new_munge = { files: {} }; - for (var file in munge) { - for (var selector in munge[file]) { - for (var xml_child in munge[file][selector]) { - var val = parseInt(munge[file][selector][xml_child]); - for (var i = 0; i < val; i++) { - mungeutil.deep_add(new_munge, [file, selector, { xml: xml_child, count: val }]); - } - } - } - } - root.config_munge = new_munge; - } - - return root; -} - -/** - * @constructor - * @class ModuleMetadata - * - * Creates a ModuleMetadata object that represents module entry in 'cordova_plugins.js' - * file at run time - * - * @param {String} pluginId Plugin id where this module installed from - * @param (JsModule|Object) jsModule A js-module entry from PluginInfo class to generate metadata for - */ -function ModuleMetadata (pluginId, jsModule) { - - if (!pluginId) throw new TypeError('pluginId argument must be a valid plugin id'); - if (!jsModule.src && !jsModule.name) throw new TypeError('jsModule argument must contain src or/and name properties'); - - this.id = pluginId + '.' + (jsModule.name || jsModule.src.match(/([^\/]+)\.js/)[1]); /* eslint no-useless-escape: 0 */ - this.file = ['plugins', pluginId, jsModule.src].join('/'); - this.pluginId = pluginId; - - if (jsModule.clobbers && jsModule.clobbers.length > 0) { - this.clobbers = jsModule.clobbers.map(function (o) { return o.target; }); - } - if (jsModule.merges && jsModule.merges.length > 0) { - this.merges = jsModule.merges.map(function (o) { return o.target; }); - } - if (jsModule.runs) { - this.runs = true; - } -} - -module.exports = PlatformJson; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfo.js b/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfo.js deleted file mode 100644 index 7e9754d..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfo.js +++ /dev/null @@ -1,439 +0,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. -*/ - -/* -A class for holidng the information currently stored in plugin.xml -It should also be able to answer questions like whether the plugin -is compatible with a given engine version. - -TODO (kamrik): refactor this to not use sync functions and return promises. -*/ - -var path = require('path'); -var fs = require('fs'); -var xml_helpers = require('../util/xml-helpers'); -var CordovaError = require('../CordovaError/CordovaError'); - -function PluginInfo (dirname) { - var self = this; - - // METHODS - // Defined inside the constructor to avoid the "this" binding problems. - - // tag - // Example: - // Used to require a variable to be specified via --variable when installing the plugin. - // returns { key : default | null} - self.getPreferences = getPreferences; - function getPreferences (platform) { - return _getTags(self._et, 'preference', platform, _parsePreference) - .reduce(function (preferences, pref) { - preferences[pref.preference] = pref.default; - return preferences; - }, {}); - } - - function _parsePreference (prefTag) { - var name = prefTag.attrib.name.toUpperCase(); - var def = prefTag.attrib.default || null; - return {preference: name, default: def}; - } - - // - self.getAssets = getAssets; - function getAssets (platform) { - var assets = _getTags(self._et, 'asset', platform, _parseAsset); - return assets; - } - - function _parseAsset (tag) { - var src = tag.attrib.src; - var target = tag.attrib.target; - - if (!src || !target) { - var msg = - 'Malformed tag. Both "src" and "target" attributes' - + 'must be specified in\n' - + self.filepath - ; - throw new Error(msg); - } - - var asset = { - itemType: 'asset', - src: src, - target: target - }; - return asset; - } - - // - // Example: - // - self.getDependencies = getDependencies; - function getDependencies (platform) { - var deps = _getTags( - self._et, - 'dependency', - platform, - _parseDependency - ); - return deps; - } - - function _parseDependency (tag) { - var dep = - { id: tag.attrib.id, - version: tag.attrib.version || '', - url: tag.attrib.url || '', - subdir: tag.attrib.subdir || '', - commit: tag.attrib.commit - }; - - dep.git_ref = dep.commit; - - if (!dep.id) { - var msg = - ' tag is missing id attribute in ' - + self.filepath - ; - throw new CordovaError(msg); - } - return dep; - } - - // tag - self.getConfigFiles = getConfigFiles; - function getConfigFiles (platform) { - var configFiles = _getTags(self._et, 'config-file', platform, _parseConfigFile); - return configFiles; - } - - function _parseConfigFile (tag) { - var configFile = - { target: tag.attrib['target'], - parent: tag.attrib['parent'], - after: tag.attrib['after'], - xmls: tag.getchildren(), - // To support demuxing via versions - versions: tag.attrib['versions'], - deviceTarget: tag.attrib['device-target'] - }; - return configFile; - } - - self.getEditConfigs = getEditConfigs; - function getEditConfigs (platform) { - var editConfigs = _getTags(self._et, 'edit-config', platform, _parseEditConfigs); - return editConfigs; - } - - function _parseEditConfigs (tag) { - var editConfig = - { file: tag.attrib['file'], - target: tag.attrib['target'], - mode: tag.attrib['mode'], - xmls: tag.getchildren() - }; - return editConfig; - } - - // tags, both global and within a - // TODO (kamrik): Do we ever use under ? Example wanted. - self.getInfo = getInfo; - function getInfo (platform) { - var infos = _getTags( - self._et, - 'info', - platform, - function (elem) { return elem.text; } - ); - // Filter out any undefined or empty strings. - infos = infos.filter(Boolean); - return infos; - } - - // - // Examples: - // - // - self.getSourceFiles = getSourceFiles; - function getSourceFiles (platform) { - var sourceFiles = _getTagsInPlatform(self._et, 'source-file', platform, _parseSourceFile); - return sourceFiles; - } - - function _parseSourceFile (tag) { - return { - itemType: 'source-file', - src: tag.attrib.src, - framework: isStrTrue(tag.attrib.framework), - weak: isStrTrue(tag.attrib.weak), - compilerFlags: tag.attrib['compiler-flags'], - targetDir: tag.attrib['target-dir'] - }; - } - - // - // Example: - // - self.getHeaderFiles = getHeaderFiles; - function getHeaderFiles (platform) { - var headerFiles = _getTagsInPlatform(self._et, 'header-file', platform, function (tag) { - return { - itemType: 'header-file', - src: tag.attrib.src, - targetDir: tag.attrib['target-dir'] - }; - }); - return headerFiles; - } - - // - // Example: - // - self.getResourceFiles = getResourceFiles; - function getResourceFiles (platform) { - var resourceFiles = _getTagsInPlatform(self._et, 'resource-file', platform, function (tag) { - return { - itemType: 'resource-file', - src: tag.attrib.src, - target: tag.attrib.target, - versions: tag.attrib.versions, - deviceTarget: tag.attrib['device-target'], - arch: tag.attrib.arch, - reference: tag.attrib.reference - }; - }); - return resourceFiles; - } - - // - // Example: - // - self.getLibFiles = getLibFiles; - function getLibFiles (platform) { - var libFiles = _getTagsInPlatform(self._et, 'lib-file', platform, function (tag) { - return { - itemType: 'lib-file', - src: tag.attrib.src, - arch: tag.attrib.arch, - Include: tag.attrib.Include, - versions: tag.attrib.versions, - deviceTarget: tag.attrib['device-target'] || tag.attrib.target - }; - }); - return libFiles; - } - - // - // Example: - // - self.getHookScripts = getHookScripts; - function getHookScripts (hook, platforms) { - var scriptElements = self._et.findall('./hook'); - - if (platforms) { - platforms.forEach(function (platform) { - scriptElements = scriptElements.concat(self._et.findall('./platform[@name="' + platform + '"]/hook')); - }); - } - - function filterScriptByHookType (el) { - return el.attrib.src && el.attrib.type && el.attrib.type.toLowerCase() === hook; - } - - return scriptElements.filter(filterScriptByHookType); - } - - self.getJsModules = getJsModules; - function getJsModules (platform) { - var modules = _getTags(self._et, 'js-module', platform, _parseJsModule); - return modules; - } - - function _parseJsModule (tag) { - var ret = { - itemType: 'js-module', - name: tag.attrib.name, - src: tag.attrib.src, - clobbers: tag.findall('clobbers').map(function (tag) { return { target: tag.attrib.target }; }), - merges: tag.findall('merges').map(function (tag) { return { target: tag.attrib.target }; }), - runs: tag.findall('runs').length > 0 - }; - - return ret; - } - - self.getEngines = function () { - return self._et.findall('engines/engine').map(function (n) { - return { - name: n.attrib.name, - version: n.attrib.version, - platform: n.attrib.platform, - scriptSrc: n.attrib.scriptSrc - }; - }); - }; - - self.getPlatforms = function () { - return self._et.findall('platform').map(function (n) { - return { name: n.attrib.name }; - }); - }; - - self.getPlatformsArray = function () { - return self._et.findall('platform').map(function (n) { - return n.attrib.name; - }); - }; - - self.getFrameworks = function (platform, options) { - return _getTags(self._et, 'framework', platform, function (el) { - var src = el.attrib.src; - if (options) { - var vars = options.cli_variables || {}; - - if (Object.keys(vars).length === 0) { - // get variable defaults from plugin.xml for removal - vars = self.getPreferences(platform); - } - var regExp; - // Iterate over plugin variables. - // Replace them in framework src if they exist - Object.keys(vars).forEach(function (name) { - if (vars[name]) { - regExp = new RegExp('\\$' + name, 'g'); - src = src.replace(regExp, vars[name]); - } - }); - } - var ret = { - itemType: 'framework', - type: el.attrib.type, - parent: el.attrib.parent, - custom: isStrTrue(el.attrib.custom), - embed: isStrTrue(el.attrib.embed), - src: src, - spec: el.attrib.spec, - weak: isStrTrue(el.attrib.weak), - versions: el.attrib.versions, - targetDir: el.attrib['target-dir'], - deviceTarget: el.attrib['device-target'] || el.attrib.target, - arch: el.attrib.arch, - implementation: el.attrib.implementation - }; - return ret; - }); - }; - - self.getFilesAndFrameworks = getFilesAndFrameworks; - function getFilesAndFrameworks (platform, options) { - // Please avoid changing the order of the calls below, files will be - // installed in this order. - var items = [].concat( - self.getSourceFiles(platform), - self.getHeaderFiles(platform), - self.getResourceFiles(platform), - self.getFrameworks(platform, options), - self.getLibFiles(platform) - ); - return items; - } - /// // End of PluginInfo methods ///// - - /// // PluginInfo Constructor logic ///// - self.filepath = path.join(dirname, 'plugin.xml'); - if (!fs.existsSync(self.filepath)) { - throw new CordovaError('Cannot find plugin.xml for plugin "' + path.basename(dirname) + '". Please try adding it again.'); - } - - self.dir = dirname; - var et = self._et = xml_helpers.parseElementtreeSync(self.filepath); - var pelem = et.getroot(); - self.id = pelem.attrib.id; - self.version = pelem.attrib.version; - - // Optional fields - self.name = pelem.findtext('name'); - self.description = pelem.findtext('description'); - self.license = pelem.findtext('license'); - self.repo = pelem.findtext('repo'); - self.issue = pelem.findtext('issue'); - self.keywords = pelem.findtext('keywords'); - self.info = pelem.findtext('info'); - if (self.keywords) { - self.keywords = self.keywords.split(',').map(function (s) { return s.trim(); }); - } - self.getKeywordsAndPlatforms = function () { - var ret = self.keywords || []; - return ret.concat('ecosystem:cordova').concat(addCordova(self.getPlatformsArray())); - }; -} // End of PluginInfo constructor. - -// Helper function used to prefix every element of an array with cordova- -// Useful when we want to modify platforms to be cordova-platform -function addCordova (someArray) { - var newArray = someArray.map(function (element) { - return 'cordova-' + element; - }); - return newArray; -} - -// Helper function used by most of the getSomething methods of PluginInfo. -// Get all elements of a given name. Both in root and in platform sections -// for the given platform. If transform is given and is a function, it is -// applied to each element. -function _getTags (pelem, tag, platform, transform) { - var platformTag = pelem.find('./platform[@name="' + platform + '"]'); - var tagsInRoot = pelem.findall(tag); - tagsInRoot = tagsInRoot || []; - var tagsInPlatform = platformTag ? platformTag.findall(tag) : []; - var tags = tagsInRoot.concat(tagsInPlatform); - if (typeof transform === 'function') { - tags = tags.map(transform); - } - return tags; -} - -// Same as _getTags() but only looks inside a platform section. -function _getTagsInPlatform (pelem, tag, platform, transform) { - var platformTag = pelem.find('./platform[@name="' + platform + '"]'); - var tags = platformTag ? platformTag.findall(tag) : []; - if (typeof transform === 'function') { - tags = tags.map(transform); - } - return tags; -} - -// Check if x is a string 'true'. -function isStrTrue (x) { - return String(x).toLowerCase() === 'true'; -} - -module.exports = PluginInfo; -// Backwards compat: -PluginInfo.PluginInfo = PluginInfo; -PluginInfo.loadPluginsDir = function (dir) { - var PluginInfoProvider = require('./PluginInfoProvider'); - return new PluginInfoProvider().getAllWithinSearchPath(dir); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js b/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js deleted file mode 100644 index 5d3f329..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/PluginInfo/PluginInfoProvider.js +++ /dev/null @@ -1,82 +0,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. -*/ - -/* jshint sub:true, laxcomma:true, laxbreak:true */ - -var fs = require('fs'); -var path = require('path'); -var PluginInfo = require('./PluginInfo'); -var events = require('../events'); - -function PluginInfoProvider () { - this._cache = {}; - this._getAllCache = {}; -} - -PluginInfoProvider.prototype.get = function (dirName) { - var absPath = path.resolve(dirName); - if (!this._cache[absPath]) { - this._cache[absPath] = new PluginInfo(dirName); - } - return this._cache[absPath]; -}; - -// Normally you don't need to put() entries, but it's used -// when copying plugins, and in unit tests. -PluginInfoProvider.prototype.put = function (pluginInfo) { - var absPath = path.resolve(pluginInfo.dir); - this._cache[absPath] = pluginInfo; -}; - -// Used for plugin search path processing. -// Given a dir containing multiple plugins, create a PluginInfo object for -// each of them and return as array. -// Should load them all in parallel and return a promise, but not yet. -PluginInfoProvider.prototype.getAllWithinSearchPath = function (dirName) { - var absPath = path.resolve(dirName); - if (!this._getAllCache[absPath]) { - this._getAllCache[absPath] = getAllHelper(absPath, this); - } - return this._getAllCache[absPath]; -}; - -function getAllHelper (absPath, provider) { - if (!fs.existsSync(absPath)) { - return []; - } - // If dir itself is a plugin, return it in an array with one element. - if (fs.existsSync(path.join(absPath, 'plugin.xml'))) { - return [provider.get(absPath)]; - } - var subdirs = fs.readdirSync(absPath); - var plugins = []; - subdirs.forEach(function (subdir) { - var d = path.join(absPath, subdir); - if (fs.existsSync(path.join(d, 'plugin.xml'))) { - try { - plugins.push(provider.get(d)); - } catch (e) { - events.emit('warn', 'Error parsing ' + path.join(d, 'plugin.xml.\n' + e.stack)); - } - } - }); - return plugins; -} - -module.exports = PluginInfoProvider; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/PluginManager.js b/node_modules/cordova-android/node_modules/cordova-common/src/PluginManager.js deleted file mode 100644 index 0097db4..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/PluginManager.js +++ /dev/null @@ -1,149 +0,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. -*/ - -var Q = require('q'); -var fs = require('fs'); -var path = require('path'); - -var ActionStack = require('./ActionStack'); -var PlatformJson = require('./PlatformJson'); -var CordovaError = require('./CordovaError/CordovaError'); -var PlatformMunger = require('./ConfigChanges/ConfigChanges').PlatformMunger; -var PluginInfoProvider = require('./PluginInfo/PluginInfoProvider'); - -/** - * @constructor - * @class PluginManager - * Represents an entity for adding/removing plugins for platforms - * - * @param {String} platform Platform name - * @param {Object} locations - Platform files and directories - * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from - */ -function PluginManager (platform, locations, ideProject) { - this.platform = platform; - this.locations = locations; - this.project = ideProject; - - var platformJson = PlatformJson.load(locations.root, platform); - this.munger = new PlatformMunger(platform, locations.root, platformJson, new PluginInfoProvider()); -} - -/** - * @constructs PluginManager - * A convenience shortcut to new PluginManager(...) - * - * @param {String} platform Platform name - * @param {Object} locations - Platform files and directories - * @param {IDEProject} ideProject The IDE project to add/remove plugin changes to/from - * @returns new PluginManager instance - */ -PluginManager.get = function (platform, locations, ideProject) { - return new PluginManager(platform, locations, ideProject); -}; - -PluginManager.INSTALL = 'install'; -PluginManager.UNINSTALL = 'uninstall'; - -module.exports = PluginManager; - -/** - * Describes and implements common plugin installation/uninstallation routine. The flow is the following: - * * Validate and set defaults for options. Note that options are empty by default. Everything - * needed for platform IDE project must be passed from outside. Plugin variables (which - * are the part of the options) also must be already populated with 'PACKAGE_NAME' variable. - * * Collect all plugin's native and web files, get installers/uninstallers and process - * all these via ActionStack. - * * Save the IDE project, so the changes made by installers are persisted. - * * Generate config changes munge for plugin and apply it to all required files - * * Generate metadata for plugin and plugin modules and save it to 'cordova_plugins.js' - * - * @param {PluginInfo} plugin A PluginInfo structure representing plugin to install - * @param {Object} [options={}] An installation options. It is expected but is not necessary - * that options would contain 'variables' inner object with 'PACKAGE_NAME' field set by caller. - * - * @returns {Promise} Returns a Q promise, either resolved in case of success, rejected otherwise. - */ -PluginManager.prototype.doOperation = function (operation, plugin, options) { - if (operation !== PluginManager.INSTALL && operation !== PluginManager.UNINSTALL) { return Q.reject(new CordovaError('The parameter is incorrect. The opeation must be either "add" or "remove"')); } - - if (!plugin || plugin.constructor.name !== 'PluginInfo') { return Q.reject(new CordovaError('The parameter is incorrect. The first parameter should be a PluginInfo instance')); } - - // Set default to empty object to play safe when accesing properties - options = options || {}; - - var self = this; - var actions = new ActionStack(); - - // gather all files need to be handled during operation ... - plugin.getFilesAndFrameworks(this.platform, options) - .concat(plugin.getAssets(this.platform)) - .concat(plugin.getJsModules(this.platform)) - // ... put them into stack ... - .forEach(function (item) { - var installer = self.project.getInstaller(item.itemType); - var uninstaller = self.project.getUninstaller(item.itemType); - var actionArgs = [item, plugin, self.project, options]; - - var action; - if (operation === PluginManager.INSTALL) { - action = actions.createAction.apply(actions, [installer, actionArgs, uninstaller, actionArgs]); /* eslint no-useless-call: 0 */ - } else /* op === PluginManager.UNINSTALL */{ - action = actions.createAction.apply(actions, [uninstaller, actionArgs, installer, actionArgs]); /* eslint no-useless-call: 0 */ - } - actions.push(action); - }); - - // ... and run through the action stack - return actions.process(this.platform) - .then(function () { - if (self.project.write) { - self.project.write(); - } - - if (operation === PluginManager.INSTALL) { - // Ignore passed `is_top_level` option since platform itself doesn't know - // anything about managing dependencies - it's responsibility of caller. - self.munger.add_plugin_changes(plugin, options.variables, /* is_top_level= */true, /* should_increment= */true, options.force); - self.munger.platformJson.addPluginMetadata(plugin); - } else { - self.munger.remove_plugin_changes(plugin, /* is_top_level= */true); - self.munger.platformJson.removePluginMetadata(plugin); - } - - // Save everything (munge and plugin/modules metadata) - self.munger.save_all(); - - var metadata = self.munger.platformJson.generateMetadata(); - fs.writeFileSync(path.join(self.locations.www, 'cordova_plugins.js'), metadata, 'utf-8'); - - // CB-11022 save plugin metadata to both www and platform_www if options.usePlatformWww is specified - if (options.usePlatformWww) { - fs.writeFileSync(path.join(self.locations.platformWww, 'cordova_plugins.js'), metadata, 'utf-8'); - } - }); -}; - -PluginManager.prototype.addPlugin = function (plugin, installOptions) { - return this.doOperation(PluginManager.INSTALL, plugin, installOptions); -}; - -PluginManager.prototype.removePlugin = function (plugin, uninstallOptions) { - return this.doOperation(PluginManager.UNINSTALL, plugin, uninstallOptions); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/events.js b/node_modules/cordova-android/node_modules/cordova-common/src/events.js deleted file mode 100644 index 7038643..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/events.js +++ /dev/null @@ -1,72 +0,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. -*/ - -var EventEmitter = require('events').EventEmitter; - -var INSTANCE = new EventEmitter(); -INSTANCE.setMaxListeners(20); -var EVENTS_RECEIVER; - -module.exports = INSTANCE; - -/** - * Sets up current instance to forward emitted events to another EventEmitter - * instance. - * - * @param {EventEmitter} [eventEmitter] The emitter instance to forward - * events to. Falsy value, when passed, disables forwarding. - */ -module.exports.forwardEventsTo = function (eventEmitter) { - - // If no argument is specified disable events forwarding - if (!eventEmitter) { - EVENTS_RECEIVER = undefined; - return; - } - - if (!(eventEmitter instanceof EventEmitter)) { throw new Error('Cordova events can be redirected to another EventEmitter instance only'); } - - // CB-10940 Skipping forwarding to self to avoid infinite recursion. - // This is the case when the modules are npm-linked. - if (this !== eventEmitter) { - EVENTS_RECEIVER = eventEmitter; - } else { - // Reset forwarding if we are subscribing to self - EVENTS_RECEIVER = undefined; - } -}; - -var emit = INSTANCE.emit; - -/** - * This method replaces original 'emit' method to allow events forwarding. - * - * @return {eventEmitter} Current instance to allow calls chaining, as - * original 'emit' does - */ -module.exports.emit = function () { - - var args = Array.prototype.slice.call(arguments); - - if (EVENTS_RECEIVER) { - EVENTS_RECEIVER.emit.apply(EVENTS_RECEIVER, args); - } - - return emit.apply(this, args); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/superspawn.js b/node_modules/cordova-android/node_modules/cordova-common/src/superspawn.js deleted file mode 100644 index 424934e..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/superspawn.js +++ /dev/null @@ -1,189 +0,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. -*/ - -var child_process = require('child_process'); -var fs = require('fs'); -var path = require('path'); -var _ = require('underscore'); -var Q = require('q'); -var shell = require('shelljs'); -var events = require('./events'); -var iswin32 = process.platform === 'win32'; - -// On Windows, spawn() for batch files requires absolute path & having the extension. -function resolveWindowsExe (cmd) { - var winExtensions = ['.exe', '.bat', '.cmd', '.js', '.vbs']; - function isValidExe (c) { - return winExtensions.indexOf(path.extname(c)) !== -1 && fs.existsSync(c); - } - if (isValidExe(cmd)) { - return cmd; - } - cmd = shell.which(cmd) || cmd; - if (!isValidExe(cmd)) { - winExtensions.some(function (ext) { - if (fs.existsSync(cmd + ext)) { - cmd = cmd + ext; - return true; - } - }); - } - return cmd; -} - -function maybeQuote (a) { - if (/^[^"].*[ &].*[^"]/.test(a)) return '"' + a + '"'; - return a; -} - -/** - * A special implementation for child_process.spawn that handles - * Windows-specific issues with batch files and spaces in paths. Returns a - * promise that succeeds only for return code 0. It is also possible to - * subscribe on spawned process' stdout and stderr streams using progress - * handler for resultant promise. - * - * @example spawn('mycommand', [], {stdio: 'pipe'}) .progress(function (stdio){ - * if (stdio.stderr) { console.error(stdio.stderr); } }) - * .then(function(result){ // do other stuff }) - * - * @param {String} cmd A command to spawn - * @param {String[]} [args=[]] An array of arguments, passed to spawned - * process - * @param {Object} [opts={}] A configuration object - * @param {String|String[]|Object} opts.stdio Property that configures how - * spawned process' stdio will behave. Has the same meaning and possible - * values as 'stdio' options for child_process.spawn method - * (https://nodejs.org/api/child_process.html#child_process_options_stdio). - * @param {Object} [env={}] A map of extra environment variables - * @param {String} [cwd=process.cwd()] Working directory for the command - * @param {Boolean} [chmod=false] If truthy, will attempt to set the execute - * bit before executing on non-Windows platforms - * - * @return {Promise} A promise that is either fulfilled if the spawned - * process is exited with zero error code or rejected otherwise. If the - * 'stdio' option set to 'default' or 'pipe', the promise also emits progress - * messages with the following contents: - * { - * 'stdout': ..., - * 'stderr': ... - * } - */ -exports.spawn = function (cmd, args, opts) { - args = args || []; - opts = opts || {}; - var spawnOpts = {}; - var d = Q.defer(); - - if (iswin32) { - cmd = resolveWindowsExe(cmd); - // If we couldn't find the file, likely we'll end up failing, - // but for things like "del", cmd will do the trick. - if (path.extname(cmd) !== '.exe') { - var cmdArgs = '"' + [cmd].concat(args).map(maybeQuote).join(' ') + '"'; - // We need to use /s to ensure that spaces are parsed properly with cmd spawned content - args = [['/s', '/c', cmdArgs].join(' ')]; - cmd = 'cmd'; - spawnOpts.windowsVerbatimArguments = true; - } else if (!fs.existsSync(cmd)) { - // We need to use /s to ensure that spaces are parsed properly with cmd spawned content - args = ['/s', '/c', cmd].concat(args).map(maybeQuote); - } - } - - if (opts.stdio !== 'default') { - // Ignore 'default' value for stdio because it corresponds to child_process's default 'pipe' option - spawnOpts.stdio = opts.stdio; - } - - if (opts.cwd) { - spawnOpts.cwd = opts.cwd; - } - - if (opts.env) { - spawnOpts.env = _.extend(_.extend({}, process.env), opts.env); - } - - if (opts.chmod && !iswin32) { - try { - // This fails when module is installed in a system directory (e.g. via sudo npm install) - fs.chmodSync(cmd, '755'); - } catch (e) { - // If the perms weren't set right, then this will come as an error upon execution. - } - } - - events.emit(opts.printCommand ? 'log' : 'verbose', 'Running command: ' + maybeQuote(cmd) + ' ' + args.map(maybeQuote).join(' ')); - - var child = child_process.spawn(cmd, args, spawnOpts); - var capturedOut = ''; - var capturedErr = ''; - - if (child.stdout) { - child.stdout.setEncoding('utf8'); - child.stdout.on('data', function (data) { - capturedOut += data; - d.notify({'stdout': data}); - }); - } - - if (child.stderr) { - child.stderr.setEncoding('utf8'); - child.stderr.on('data', function (data) { - capturedErr += data; - d.notify({'stderr': data}); - }); - } - - child.on('close', whenDone); - child.on('error', whenDone); - function whenDone (arg) { - child.removeListener('close', whenDone); - child.removeListener('error', whenDone); - var code = typeof arg === 'number' ? arg : arg && arg.code; - - events.emit('verbose', 'Command finished with error code ' + code + ': ' + cmd + ' ' + args); - if (code === 0) { - d.resolve(capturedOut.trim()); - } else { - var errMsg = cmd + ': Command failed with exit code ' + code; - if (capturedErr) { - errMsg += ' Error output:\n' + capturedErr.trim(); - } - var err = new Error(errMsg); - if (capturedErr) { - err.stderr = capturedErr; - } - if (capturedOut) { - err.stdout = capturedOut; - } - err.code = code; - d.reject(err); - } - } - - return d.promise; -}; - -exports.maybeSpawn = function (cmd, args, opts) { - if (fs.existsSync(cmd)) { - return exports.spawn(cmd, args, opts); - } - return Q(null); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/util/addProperty.js b/node_modules/cordova-android/node_modules/cordova-common/src/util/addProperty.js deleted file mode 100644 index 3e48174..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/util/addProperty.js +++ /dev/null @@ -1,32 +0,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. -*/ - -module.exports = function addProperty (module, property, modulePath, obj) { - - obj = obj || module.exports; - // Add properties as getter to delay load the modules on first invocation - Object.defineProperty(obj, property, { - configurable: true, - get: function () { - var delayLoadedModule = module.require(modulePath); - obj[property] = delayLoadedModule; - return delayLoadedModule; - } - }); -}; diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/util/plist-helpers.js b/node_modules/cordova-android/node_modules/cordova-common/src/util/plist-helpers.js deleted file mode 100644 index 5ec4c1d..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/util/plist-helpers.js +++ /dev/null @@ -1,96 +0,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. -*/ -/* eslint no-useless-escape: 0 */ - -// contains PLIST utility functions -var __ = require('underscore'); -var plist = require('plist'); - -// adds node to doc at selector -module.exports.graftPLIST = graftPLIST; -function graftPLIST (doc, xml, selector) { - var obj = plist.parse('' + xml + ''); - - var node = doc[selector]; - if (node && Array.isArray(node) && Array.isArray(obj)) { - node = node.concat(obj); - for (var i = 0; i < node.length; i++) { - for (var j = i + 1; j < node.length; ++j) { - if (nodeEqual(node[i], node[j])) { node.splice(j--, 1); } - } - } - doc[selector] = node; - } else { - // plist uses objects for . If we have two dicts we merge them instead of - // overriding the old one. See CB-6472 - if (node && __.isObject(node) && __.isObject(obj) && !__.isDate(node) && !__.isDate(obj)) { // arrays checked above - __.extend(obj, node); - } - doc[selector] = obj; - } - - return true; -} - -// removes node from doc at selector -module.exports.prunePLIST = prunePLIST; -function prunePLIST (doc, xml, selector) { - var obj = plist.parse('' + xml + ''); - - pruneOBJECT(doc, selector, obj); - - return true; -} - -function pruneOBJECT (doc, selector, fragment) { - if (Array.isArray(fragment) && Array.isArray(doc[selector])) { - var empty = true; - for (var i in fragment) { - for (var j in doc[selector]) { - empty = pruneOBJECT(doc[selector], j, fragment[i]) && empty; - } - } - if (empty) { - delete doc[selector]; - return true; - } - } else if (nodeEqual(doc[selector], fragment)) { - delete doc[selector]; - return true; - } - - return false; -} - -function nodeEqual (node1, node2) { - if (typeof node1 !== typeof node2) { return false; } else if (typeof node1 === 'string') { - node2 = escapeRE(node2).replace(/\\\$\S+/gm, '(.*?)'); - return new RegExp('^' + node2 + '$').test(node1); - } else { - for (var key in node2) { - if (!nodeEqual(node1[key], node2[key])) return false; - } - return true; - } -} - -// escape string for use in regex -function escapeRE (str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'); -} diff --git a/node_modules/cordova-android/node_modules/cordova-common/src/util/xml-helpers.js b/node_modules/cordova-android/node_modules/cordova-common/src/util/xml-helpers.js deleted file mode 100644 index 6b5d70f..0000000 --- a/node_modules/cordova-android/node_modules/cordova-common/src/util/xml-helpers.js +++ /dev/null @@ -1,365 +0,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. -*/ - -/** - * contains XML utility functions, some of which are specific to elementtree - */ - -var fs = require('fs'); -var path = require('path'); -var _ = require('underscore'); -var et = require('elementtree'); - -/* eslint-disable no-useless-escape */ -var ROOT = /^\/([^\/]*)/; -var ABSOLUTE = /^\/([^\/]*)\/(.*)/; -/* eslint-enable no-useless-escape */ - -module.exports = { - // compare two et.XML nodes, see if they match - // compares tagName, text, attributes and children (recursively) - equalNodes: function (one, two) { - if (one.tag !== two.tag) { - return false; - } else if (one.text.trim() !== two.text.trim()) { - return false; - } else if (one._children.length !== two._children.length) { - return false; - } - - if (!attribMatch(one, two)) return false; - - for (var i = 0; i < one._children.length; i++) { - if (!module.exports.equalNodes(one._children[i], two._children[i])) { - return false; - } - } - - return true; - }, - - // adds node to doc at selector, creating parent if it doesn't exist - graftXML: function (doc, nodes, selector, after) { - var parent = module.exports.resolveParent(doc, selector); - if (!parent) { - // Try to create the parent recursively if necessary - try { - var parentToCreate = et.XML('<' + path.basename(selector) + '>'); - var parentSelector = path.dirname(selector); - - this.graftXML(doc, [parentToCreate], parentSelector); - } catch (e) { - return false; - } - parent = module.exports.resolveParent(doc, selector); - if (!parent) return false; - } - - nodes.forEach(function (node) { - // check if child is unique first - if (uniqueChild(node, parent)) { - var children = parent.getchildren(); - var insertIdx = after ? findInsertIdx(children, after) : children.length; - - // TODO: replace with parent.insert after the bug in ElementTree is fixed - parent.getchildren().splice(insertIdx, 0, node); - } - }); - - return true; - }, - - // adds new attributes to doc at selector - // Will only merge if attribute has not been modified already or --force is used - graftXMLMerge: function (doc, nodes, selector, xml) { - var target = module.exports.resolveParent(doc, selector); - if (!target) return false; - - // saves the attributes of the original xml before making changes - xml.oldAttrib = _.extend({}, target.attrib); - - nodes.forEach(function (node) { - var attributes = node.attrib; - for (var attribute in attributes) { - target.attrib[attribute] = node.attrib[attribute]; - } - }); - - return true; - }, - - // overwrite all attributes to doc at selector with new attributes - // Will only overwrite if attribute has not been modified already or --force is used - graftXMLOverwrite: function (doc, nodes, selector, xml) { - var target = module.exports.resolveParent(doc, selector); - if (!target) return false; - - // saves the attributes of the original xml before making changes - xml.oldAttrib = _.extend({}, target.attrib); - - // remove old attributes from target - var targetAttributes = target.attrib; - for (var targetAttribute in targetAttributes) { - delete targetAttributes[targetAttribute]; - } - - // add new attributes to target - nodes.forEach(function (node) { - var attributes = node.attrib; - for (var attribute in attributes) { - target.attrib[attribute] = node.attrib[attribute]; - } - }); - - return true; - }, - - // removes node from doc at selector - pruneXML: function (doc, nodes, selector) { - var parent = module.exports.resolveParent(doc, selector); - if (!parent) return false; - - nodes.forEach(function (node) { - var matchingKid = null; - if ((matchingKid = findChild(node, parent)) !== null) { - // stupid elementtree takes an index argument it doesn't use - // and does not conform to the python lib - parent.remove(matchingKid); - } - }); - - return true; - }, - - // restores attributes from doc at selector - pruneXMLRestore: function (doc, selector, xml) { - var target = module.exports.resolveParent(doc, selector); - if (!target) return false; - - if (xml.oldAttrib) { - target.attrib = _.extend({}, xml.oldAttrib); - } - - return true; - }, - - pruneXMLRemove: function (doc, selector, nodes) { - var target = module.exports.resolveParent(doc, selector); - if (!target) return false; - - nodes.forEach(function (node) { - var attributes = node.attrib; - for (var attribute in attributes) { - if (target.attrib[attribute]) { - delete target.attrib[attribute]; - } - } - }); - - return true; - - }, - - parseElementtreeSync: function (filename) { - var contents = fs.readFileSync(filename, 'utf-8'); - if (contents) { - // Windows is the BOM. Skip the Byte Order Mark. - contents = contents.substring(contents.indexOf('<')); - } - return new et.ElementTree(et.XML(contents)); - }, - - resolveParent: function (doc, selector) { - var parent, tagName, subSelector; - - // handle absolute selector (which elementtree doesn't like) - if (ROOT.test(selector)) { - tagName = selector.match(ROOT)[1]; - // test for wildcard "any-tag" root selector - if (tagName === '*' || tagName === doc._root.tag) { - parent = doc._root; - - // could be an absolute path, but not selecting the root - if (ABSOLUTE.test(selector)) { - subSelector = selector.match(ABSOLUTE)[2]; - parent = parent.find(subSelector); - } - } else { - return false; - } - } else { - parent = doc.find(selector); - } - return parent; - } -}; - -function findChild (node, parent) { - var matchingKids = parent.findall(node.tag); - var i; - var j; - - for (i = 0, j = matchingKids.length; i < j; i++) { - if (module.exports.equalNodes(node, matchingKids[i])) { - return matchingKids[i]; - } - } - return null; -} - -function uniqueChild (node, parent) { - var matchingKids = parent.findall(node.tag); - var i = 0; - - if (matchingKids.length === 0) { - return true; - } else { - for (i; i < matchingKids.length; i++) { - if (module.exports.equalNodes(node, matchingKids[i])) { - return false; - } - } - return true; - } -} - -// Find the index at which to insert an entry. After is a ;-separated priority list -// of tags after which the insertion should be made. E.g. If we need to -// insert an element C, and the rule is that the order of children has to be -// As, Bs, Cs. After will be equal to "C;B;A". -function findInsertIdx (children, after) { - var childrenTags = children.map(function (child) { return child.tag; }); - var afters = after.split(';'); - var afterIndexes = afters.map(function (current) { return childrenTags.lastIndexOf(current); }); - var foundIndex = _.find(afterIndexes, function (index) { return index !== -1; }); - - // add to the beginning if no matching nodes are found - return typeof foundIndex === 'undefined' ? 0 : foundIndex + 1; -} - -var BLACKLIST = ['platform', 'feature', 'plugin', 'engine']; -var SINGLETONS = ['content', 'author', 'name']; -function mergeXml (src, dest, platform, clobber) { - // Do nothing for blacklisted tags. - if (BLACKLIST.indexOf(src.tag) !== -1) return; - - // Handle attributes - Object.getOwnPropertyNames(src.attrib).forEach(function (attribute) { - if (clobber || !dest.attrib[attribute]) { - dest.attrib[attribute] = src.attrib[attribute]; - } - }); - // Handle text - if (src.text && (clobber || !dest.text)) { - dest.text = src.text; - } - // Handle children - src.getchildren().forEach(mergeChild); - - // Handle platform - if (platform) { - src.findall('platform[@name="' + platform + '"]').forEach(function (platformElement) { - platformElement.getchildren().forEach(mergeChild); - }); - } - - // Handle duplicate preference tags (by name attribute) - removeDuplicatePreferences(dest); - - function mergeChild (srcChild) { - var srcTag = srcChild.tag; - var destChild = new et.Element(srcTag); - var foundChild; - var query = srcTag + ''; - var shouldMerge = true; - - if (BLACKLIST.indexOf(srcTag) !== -1) return; - - if (SINGLETONS.indexOf(srcTag) !== -1) { - foundChild = dest.find(query); - if (foundChild) { - destChild = foundChild; - dest.remove(destChild); - } - } else { - // Check for an exact match and if you find one don't add - var mergeCandidates = dest.findall(query) - .filter(function (foundChild) { - return foundChild && textMatch(srcChild, foundChild) && attribMatch(srcChild, foundChild); - }); - - if (mergeCandidates.length > 0) { - destChild = mergeCandidates[0]; - dest.remove(destChild); - shouldMerge = false; - } - } - - mergeXml(srcChild, destChild, platform, clobber && shouldMerge); - dest.append(destChild); - } - - function removeDuplicatePreferences (xml) { - // reduce preference tags to a hashtable to remove dupes - var prefHash = xml.findall('preference[@name][@value]').reduce(function (previousValue, currentValue) { - previousValue[ currentValue.attrib.name ] = currentValue.attrib.value; - return previousValue; - }, {}); - - // remove all preferences - xml.findall('preference[@name][@value]').forEach(function (pref) { - xml.remove(pref); - }); - - // write new preferences - Object.keys(prefHash).forEach(function (key) { - var element = et.SubElement(xml, 'preference'); - element.set('name', key); - element.set('value', this[key]); - }, prefHash); - } -} - -// Expose for testing. -module.exports.mergeXml = mergeXml; - -function textMatch (elm1, elm2) { - var text1 = elm1.text ? elm1.text.replace(/\s+/, '') : ''; - var text2 = elm2.text ? elm2.text.replace(/\s+/, '') : ''; - return (text1 === '' || text1 === text2); -} - -function attribMatch (one, two) { - var oneAttribKeys = Object.keys(one.attrib); - var twoAttribKeys = Object.keys(two.attrib); - - if (oneAttribKeys.length !== twoAttribKeys.length) { - return false; - } - - for (var i = 0; i < oneAttribKeys.length; i++) { - var attribName = oneAttribKeys[i]; - - if (one.attrib[attribName] !== two.attrib[attribName]) { - return false; - } - } - - return true; -} diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/.npmignore b/node_modules/cordova-android/node_modules/cordova-registry-mapper/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/.travis.yml b/node_modules/cordova-android/node_modules/cordova-registry-mapper/.travis.yml deleted file mode 100644 index ae381fc..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js -sudo: false -node_js: - - "0.10" -install: npm install -script: - - npm test diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/README.md b/node_modules/cordova-android/node_modules/cordova-registry-mapper/README.md deleted file mode 100644 index 3b93e5f..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/README.md +++ /dev/null @@ -1,14 +0,0 @@ -[![Build Status](https://travis-ci.org/stevengill/cordova-registry-mapper.svg?branch=master)](https://travis-ci.org/stevengill/cordova-registry-mapper) - -#Cordova Registry Mapper - -This module is used to map Cordova plugin ids to package names and vice versa. - -When Cordova users add plugins to their projects using ids -(e.g. `cordova plugin add org.apache.cordova.device`), -this module will map that id to the corresponding package name so `cordova-lib` knows what to fetch from **npm**. - -This module was created so the Apache Cordova project could migrate its plugins from -the [Cordova Registry](http://registry.cordova.io/) -to [npm](https://registry.npmjs.com/) -instead of having to maintain a registry. diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/index.js b/node_modules/cordova-android/node_modules/cordova-registry-mapper/index.js deleted file mode 100644 index 4550774..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/index.js +++ /dev/null @@ -1,204 +0,0 @@ -var map = { - 'org.apache.cordova.battery-status':'cordova-plugin-battery-status', - 'org.apache.cordova.camera':'cordova-plugin-camera', - 'org.apache.cordova.console':'cordova-plugin-console', - 'org.apache.cordova.contacts':'cordova-plugin-contacts', - 'org.apache.cordova.device':'cordova-plugin-device', - 'org.apache.cordova.device-motion':'cordova-plugin-device-motion', - 'org.apache.cordova.device-orientation':'cordova-plugin-device-orientation', - 'org.apache.cordova.dialogs':'cordova-plugin-dialogs', - 'org.apache.cordova.file':'cordova-plugin-file', - 'org.apache.cordova.file-transfer':'cordova-plugin-file-transfer', - 'org.apache.cordova.geolocation':'cordova-plugin-geolocation', - 'org.apache.cordova.globalization':'cordova-plugin-globalization', - 'org.apache.cordova.inappbrowser':'cordova-plugin-inappbrowser', - 'org.apache.cordova.media':'cordova-plugin-media', - 'org.apache.cordova.media-capture':'cordova-plugin-media-capture', - 'org.apache.cordova.network-information':'cordova-plugin-network-information', - 'org.apache.cordova.splashscreen':'cordova-plugin-splashscreen', - 'org.apache.cordova.statusbar':'cordova-plugin-statusbar', - 'org.apache.cordova.vibration':'cordova-plugin-vibration', - 'org.apache.cordova.test-framework':'cordova-plugin-test-framework', - 'com.msopentech.websql' : 'cordova-plugin-websql', - 'com.msopentech.indexeddb' : 'cordova-plugin-indexeddb', - 'com.microsoft.aad.adal' : 'cordova-plugin-ms-adal', - 'com.microsoft.capptain' : 'capptain-cordova', - 'com.microsoft.services.aadgraph' : 'cordova-plugin-ms-aad-graph', - 'com.microsoft.services.files' : 'cordova-plugin-ms-files', - 'om.microsoft.services.outlook' : 'cordova-plugin-ms-outlook', - 'com.pbakondy.sim' : 'cordova-plugin-sim', - 'android.support.v4' : 'cordova-plugin-android-support-v4', - 'android.support.v7-appcompat' : 'cordova-plugin-android-support-v7-appcompat', - 'com.google.playservices' : 'cordova-plugin-googleplayservices', - 'com.google.cordova.admob' : 'cordova-plugin-admobpro', - 'com.rjfun.cordova.extension' : 'cordova-plugin-extension', - 'com.rjfun.cordova.plugin.admob' : 'cordova-plugin-admob', - 'com.rjfun.cordova.flurryads' : 'cordova-plugin-flurry', - 'com.rjfun.cordova.facebookads' : 'cordova-plugin-facebookads', - 'com.rjfun.cordova.httpd' : 'cordova-plugin-httpd', - 'com.rjfun.cordova.iad' : 'cordova-plugin-iad', - 'com.rjfun.cordova.iflyspeech' : 'cordova-plugin-iflyspeech', - 'com.rjfun.cordova.lianlianpay' : 'cordova-plugin-lianlianpay', - 'com.rjfun.cordova.mobfox' : 'cordova-plugin-mobfox', - 'com.rjfun.cordova.mopub' : 'cordova-plugin-mopub', - 'com.rjfun.cordova.mmedia' : 'cordova-plugin-mmedia', - 'com.rjfun.cordova.nativeaudio' : 'cordova-plugin-nativeaudio', - 'com.rjfun.cordova.plugin.paypalmpl' : 'cordova-plugin-paypalmpl', - 'com.rjfun.cordova.smartadserver' : 'cordova-plugin-smartadserver', - 'com.rjfun.cordova.sms' : 'cordova-plugin-sms', - 'com.rjfun.cordova.wifi' : 'cordova-plugin-wifi', - 'com.ohh2ahh.plugins.appavailability' : 'cordova-plugin-appavailability', - 'org.adapt-it.cordova.fonts' : 'cordova-plugin-fonts', - 'de.martinreinhardt.cordova.plugins.barcodeScanner' : 'cordova-plugin-barcodescanner', - 'de.martinreinhardt.cordova.plugins.urlhandler' : 'cordova-plugin-urlhandler', - 'de.martinreinhardt.cordova.plugins.email' : 'cordova-plugin-email', - 'de.martinreinhardt.cordova.plugins.certificates' : 'cordova-plugin-certificates', - 'de.martinreinhardt.cordova.plugins.sqlite' : 'cordova-plugin-sqlite', - 'fr.smile.cordova.fileopener' : 'cordova-plugin-fileopener', - 'org.smile.websqldatabase.initializer' : 'cordova-plugin-websqldatabase-initializer', - 'org.smile.websqldatabase.wpdb' : 'cordova-plugin-websqldatabase', - 'org.jboss.aerogear.cordova.push' : 'aerogear-cordova-push', - 'org.jboss.aerogear.cordova.oauth2' : 'aerogear-cordova-oauth2', - 'org.jboss.aerogear.cordova.geo' : 'aerogear-cordova-geo', - 'org.jboss.aerogear.cordova.crypto' : 'aerogear-cordova-crypto', - 'org.jboss.aerogaer.cordova.otp' : 'aerogear-cordova-otp', - 'uk.co.ilee.applewatch' : 'cordova-plugin-apple-watch', - 'uk.co.ilee.directions' : 'cordova-plugin-directions', - 'uk.co.ilee.gamecenter' : 'cordova-plugin-game-center', - 'uk.co.ilee.jailbreakdetection' : 'cordova-plugin-jailbreak-detection', - 'uk.co.ilee.nativetransitions' : 'cordova-plugin-native-transitions', - 'uk.co.ilee.pedometer' : 'cordova-plugin-pedometer', - 'uk.co.ilee.shake' : 'cordova-plugin-shake', - 'uk.co.ilee.touchid' : 'cordova-plugin-touchid', - 'com.knowledgecode.cordova.websocket' : 'cordova-plugin-websocket', - 'com.elixel.plugins.settings' : 'cordova-plugin-settings', - 'com.cowbell.cordova.geofence' : 'cordova-plugin-geofence', - 'com.blackberry.community.preventsleep' : 'cordova-plugin-preventsleep', - 'com.blackberry.community.gamepad' : 'cordova-plugin-gamepad', - 'com.blackberry.community.led' : 'cordova-plugin-led', - 'com.blackberry.community.thumbnail' : 'cordova-plugin-thumbnail', - 'com.blackberry.community.mediakeys' : 'cordova-plugin-mediakeys', - 'com.blackberry.community.simplebtlehrplugin' : 'cordova-plugin-bluetoothheartmonitor', - 'com.blackberry.community.simplebeaconplugin' : 'cordova-plugin-bluetoothibeacon', - 'com.blackberry.community.simplebtsppplugin' : 'cordova-plugin-bluetoothspp', - 'com.blackberry.community.clipboard' : 'cordova-plugin-clipboard', - 'com.blackberry.community.curl' : 'cordova-plugin-curl', - 'com.blackberry.community.qt' : 'cordova-plugin-qtbridge', - 'com.blackberry.community.upnp' : 'cordova-plugin-upnp', - 'com.blackberry.community.PasswordCrypto' : 'cordova-plugin-password-crypto', - 'com.blackberry.community.deviceinfoplugin' : 'cordova-plugin-deviceinfo', - 'com.blackberry.community.gsecrypto' : 'cordova-plugin-bb-crypto', - 'com.blackberry.community.mongoose' : 'cordova-plugin-mongoose', - 'com.blackberry.community.sysdialog' : 'cordova-plugin-bb-sysdialog', - 'com.blackberry.community.screendisplay' : 'cordova-plugin-screendisplay', - 'com.blackberry.community.messageplugin' : 'cordova-plugin-bb-messageretrieve', - 'com.blackberry.community.emailsenderplugin' : 'cordova-plugin-emailsender', - 'com.blackberry.community.audiometadata' : 'cordova-plugin-audiometadata', - 'com.blackberry.community.deviceemails' : 'cordova-plugin-deviceemails', - 'com.blackberry.community.audiorecorder' : 'cordova-plugin-audiorecorder', - 'com.blackberry.community.vibration' : 'cordova-plugin-vibrate-intense', - 'com.blackberry.community.SMSPlugin' : 'cordova-plugin-bb-sms', - 'com.blackberry.community.extractZipFile' : 'cordova-plugin-bb-zip', - 'com.blackberry.community.lowlatencyaudio' : 'cordova-plugin-bb-nativeaudio', - 'com.blackberry.community.barcodescanner' : 'phonegap-plugin-barcodescanner', - 'com.blackberry.app' : 'cordova-plugin-bb-app', - 'com.blackberry.bbm.platform' : 'cordova-plugin-bbm', - 'com.blackberry.connection' : 'cordova-plugin-bb-connection', - 'com.blackberry.identity' : 'cordova-plugin-bb-identity', - 'com.blackberry.invoke.card' : 'cordova-plugin-bb-card', - 'com.blackberry.invoke' : 'cordova-plugin-bb-invoke', - 'com.blackberry.invoked' : 'cordova-plugin-bb-invoked', - 'com.blackberry.io.filetransfer' : 'cordova-plugin-bb-filetransfer', - 'com.blackberry.io' : 'cordova-plugin-bb-io', - 'com.blackberry.notification' : 'cordova-plugin-bb-notification', - 'com.blackberry.payment' : 'cordova-plugin-bb-payment', - 'com.blackberry.pim.calendar' : 'cordova-plugin-bb-calendar', - 'com.blackberry.pim.contacts' : 'cordova-plugin-bb-contacts', - 'com.blackberry.pim.lib' : 'cordova-plugin-bb-pimlib', - 'com.blackberry.push' : 'cordova-plugin-bb-push', - 'com.blackberry.screenshot' : 'cordova-plugin-screenshot', - 'com.blackberry.sensors' : 'cordova-plugin-bb-sensors', - 'com.blackberry.system' : 'cordova-plugin-bb-system', - 'com.blackberry.ui.contextmenu' : 'cordova-plugin-bb-ctxmenu', - 'com.blackberry.ui.cover' : 'cordova-plugin-bb-cover', - 'com.blackberry.ui.dialog' : 'cordova-plugin-bb-dialog', - 'com.blackberry.ui.input' : 'cordova-plugin-touch-keyboard', - 'com.blackberry.ui.toast' : 'cordova-plugin-toast', - 'com.blackberry.user.identity' : 'cordova-plugin-bb-idservice', - 'com.blackberry.utils' : 'cordova-plugin-bb-utils', - 'net.yoik.cordova.plugins.screenorientation' : 'cordova-plugin-screen-orientation', - 'com.phonegap.plugins.barcodescanner' : 'phonegap-plugin-barcodescanner', - 'com.manifoldjs.hostedwebapp' : 'cordova-plugin-hostedwebapp', - 'com.initialxy.cordova.themeablebrowser' : 'cordova-plugin-themeablebrowser', - 'gr.denton.photosphere' : 'cordova-plugin-panoramaviewer', - 'nl.x-services.plugins.actionsheet' : 'cordova-plugin-actionsheet', - 'nl.x-services.plugins.socialsharing' : 'cordova-plugin-x-socialsharing', - 'nl.x-services.plugins.googleplus' : 'cordova-plugin-googleplus', - 'nl.x-services.plugins.insomnia' : 'cordova-plugin-insomnia', - 'nl.x-services.plugins.toast' : 'cordova-plugin-x-toast', - 'nl.x-services.plugins.calendar' : 'cordova-plugin-calendar', - 'nl.x-services.plugins.launchmyapp' : 'cordova-plugin-customurlscheme', - 'nl.x-services.plugins.flashlight' : 'cordova-plugin-flashlight', - 'nl.x-services.plugins.sslcertificatechecker' : 'cordova-plugin-sslcertificatechecker', - 'com.bridge.open' : 'cordova-open', - 'com.bridge.safe' : 'cordova-safe', - 'com.disusered.open' : 'cordova-open', - 'com.disusered.safe' : 'cordova-safe', - 'me.apla.cordova.app-preferences' : 'cordova-plugin-app-preferences', - 'com.konotor.cordova' : 'cordova-plugin-konotor', - 'io.intercom.cordova' : 'cordova-plugin-intercom', - 'com.onesignal.plugins.onesignal' : 'onesignal-cordova-plugin', - 'com.danjarvis.document-contract': 'cordova-plugin-document-contract', - 'com.eface2face.iosrtc' : 'cordova-plugin-iosrtc', - 'com.mobileapptracking.matplugin' : 'cordova-plugin-tune', - 'com.marianhello.cordova.background-geolocation' : 'cordova-plugin-mauron85-background-geolocation', - 'fr.louisbl.cordova.locationservices' : 'cordova-plugin-locationservices', - 'fr.louisbl.cordova.gpslocation' : 'cordova-plugin-gpslocation', - 'com.hiliaox.weibo' : 'cordova-plugin-weibo', - 'com.uxcam.cordova.plugin' : 'cordova-uxcam', - 'de.fastr.phonegap.plugins.downloader' : 'cordova-plugin-fastrde-downloader', - 'de.fastr.phonegap.plugins.injectView' : 'cordova-plugin-fastrde-injectview', - 'de.fastr.phonegap.plugins.CheckGPS' : 'cordova-plugin-fastrde-checkgps', - 'de.fastr.phonegap.plugins.md5chksum' : 'cordova-plugin-fastrde-md5', - 'io.repro.cordova' : 'cordova-plugin-repro', - 're.notifica.cordova': 'cordova-plugin-notificare-push', - 'com.megster.cordova.ble': 'cordova-plugin-ble-central', - 'com.megster.cordova.bluetoothserial': 'cordova-plugin-bluetooth-serial', - 'com.megster.cordova.rfduino': 'cordova-plugin-rfduino', - 'cz.velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', - 'cz.Velda.cordova.plugin.devicefeedback': 'cordova-plugin-velda-devicefeedback', - 'org.scriptotek.appinfo': 'cordova-plugin-appinfo', - 'com.yezhiming.cordova.appinfo': 'cordova-plugin-appinfo', - 'pl.makingwaves.estimotebeacons': 'cordova-plugin-estimote', - 'com.evothings.ble': 'cordova-plugin-ble', - 'com.appsee.plugin' : 'cordova-plugin-appsee', - 'am.armsoft.plugins.listpicker': 'cordova-plugin-listpicker', - 'com.pushbots.push': 'pushbots-cordova-plugin', - 'com.admob.google': 'cordova-admob', - 'admob.ads.google': 'cordova-admob-ads', - 'admob.google.plugin': 'admob-google', - 'com.admob.admobads': 'admob-ads', - 'com.connectivity.monitor': 'cordova-connectivity-monitor', - 'com.ios.libgoogleadmobads': 'cordova-libgoogleadmobads', - 'com.google.play.services': 'cordova-google-play-services', - 'android.support.v13': 'cordova-android-support-v13', - 'android.support.v4': 'cordova-android-support-v4', // Duplicated key ;) - 'com.analytics.google': 'cordova-plugin-analytics', - 'com.analytics.adid.google': 'cordova-plugin-analytics-adid', - 'com.chariotsolutions.nfc.plugin': 'phonegap-nfc', - 'com.samz.mixpanel': 'cordova-plugin-mixpanel', - 'de.appplant.cordova.common.RegisterUserNotificationSettings': 'cordova-plugin-registerusernotificationsettings', - 'plugin.google.maps': 'cordova-plugin-googlemaps', - 'xu.li.cordova.wechat': 'cordova-plugin-wechat', - 'es.keensoft.fullscreenimage': 'cordova-plugin-fullscreenimage', - 'com.arcoirislabs.plugin.mqtt' : 'cordova-plugin-mqtt' -}; - -module.exports.oldToNew = map; - -var reverseMap = {}; -Object.keys(map).forEach(function(elem){ - reverseMap[map[elem]] = elem; -}); - -module.exports.newToOld = reverseMap; diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/package.json b/node_modules/cordova-android/node_modules/cordova-registry-mapper/package.json deleted file mode 100644 index 180ffd6..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/package.json +++ /dev/null @@ -1,54 +0,0 @@ -{ - "_from": "cordova-registry-mapper@^1.1.8", - "_id": "cordova-registry-mapper@1.1.15", - "_inBundle": true, - "_integrity": "sha1-4kS5GFuBdUc7/2B5MkkFEV+D3Hw=", - "_location": "/cordova-android/cordova-registry-mapper", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "cordova-registry-mapper@^1.1.8", - "name": "cordova-registry-mapper", - "escapedName": "cordova-registry-mapper", - "rawSpec": "^1.1.8", - "saveSpec": null, - "fetchSpec": "^1.1.8" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/cordova-registry-mapper/-/cordova-registry-mapper-1.1.15.tgz", - "_shasum": "e244b9185b8175473bff6079324905115f83dc7c", - "_spec": "cordova-registry-mapper@^1.1.8", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Steve Gill" - }, - "bugs": { - "url": "https://github.com/stevengill/cordova-registry-mapper/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Maps old plugin ids to new plugin names for fetching from npm", - "devDependencies": { - "tape": "^3.5.0" - }, - "homepage": "https://github.com/stevengill/cordova-registry-mapper#readme", - "keywords": [ - "cordova", - "plugins" - ], - "license": "Apache version 2.0", - "main": "index.js", - "name": "cordova-registry-mapper", - "repository": { - "type": "git", - "url": "git+https://github.com/stevengill/cordova-registry-mapper.git" - }, - "scripts": { - "test": "node tests/test.js" - }, - "version": "1.1.15" -} diff --git a/node_modules/cordova-android/node_modules/cordova-registry-mapper/tests/test.js b/node_modules/cordova-android/node_modules/cordova-registry-mapper/tests/test.js deleted file mode 100644 index 35343be..0000000 --- a/node_modules/cordova-android/node_modules/cordova-registry-mapper/tests/test.js +++ /dev/null @@ -1,11 +0,0 @@ -var test = require('tape'); -var oldToNew = require('../index').oldToNew; -var newToOld = require('../index').newToOld; - -test('plugin mappings exist', function(t) { - t.plan(2); - - t.equal('cordova-plugin-device', oldToNew['org.apache.cordova.device']); - - t.equal('org.apache.cordova.device', newToOld['cordova-plugin-device']); -}) diff --git a/node_modules/cordova-android/node_modules/elementtree/.npmignore b/node_modules/cordova-android/node_modules/elementtree/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/cordova-android/node_modules/elementtree/.travis.yml b/node_modules/cordova-android/node_modules/elementtree/.travis.yml deleted file mode 100644 index 6f27c96..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js - -node_js: - - 0.6 - -script: make test - -notifications: - email: - - tomaz+travisci@tomaz.me diff --git a/node_modules/cordova-android/node_modules/elementtree/CHANGES.md b/node_modules/cordova-android/node_modules/elementtree/CHANGES.md deleted file mode 100644 index 50d415d..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/CHANGES.md +++ /dev/null @@ -1,39 +0,0 @@ -elementtree v0.1.6 (in development) - -* Add support for CData elements. (#14) - [hermannpencole] - -elementtree v0.1.5 - 2012-11-14 - -* Fix a bug in the find() and findtext() method which could manifest itself - under some conditions. - [metagriffin] - -elementtree v0.1.4 - 2012-10-15 - -* Allow user to use namespaced attributes when using find* functions. - [Andrew Lunny] - -elementtree v0.1.3 - 2012-09-21 - -* Improve the output of text content in the tags (strip unnecessary line break - characters). - -[Darryl Pogue] - -elementtree v0.1.2 - 2012-09-04 - - * Allow user to pass 'indent' option to ElementTree.write method. If this - option is specified (e.g. {'indent': 4}). XML will be pretty printed. - [Darryl Pogue, Tomaz Muraus] - - * Bump sax dependency version. - -elementtree v0.1.1 - 2011-09-23 - - * Improve special character escaping. - [Ryan Phillips] - -elementtree v0.1.0 - 2011-09-05 - - * Initial release. diff --git a/node_modules/cordova-android/node_modules/elementtree/LICENSE.txt b/node_modules/cordova-android/node_modules/elementtree/LICENSE.txt deleted file mode 100644 index 6b0b127..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/LICENSE.txt +++ /dev/null @@ -1,203 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - 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. - diff --git a/node_modules/cordova-android/node_modules/elementtree/Makefile b/node_modules/cordova-android/node_modules/elementtree/Makefile deleted file mode 100755 index ab7c4e0..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -TESTS := \ - tests/test-simple.js - - - -PATH := ./node_modules/.bin:$(PATH) - -WHISKEY := $(shell bash -c 'PATH=$(PATH) type -p whiskey') - -default: test - -test: - NODE_PATH=`pwd`/lib/ ${WHISKEY} --scope-leaks --sequential --real-time --tests "${TESTS}" - -tap: - NODE_PATH=`pwd`/lib/ ${WHISKEY} --test-reporter tap --sequential --real-time --tests "${TESTS}" - -coverage: - NODE_PATH=`pwd`/lib/ ${WHISKEY} --sequential --coverage --coverage-reporter html --coverage-dir coverage_html --tests "${TESTS}" - -.PHONY: default test coverage tap scope diff --git a/node_modules/cordova-android/node_modules/elementtree/NOTICE b/node_modules/cordova-android/node_modules/elementtree/NOTICE deleted file mode 100644 index 28ad70a..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -node-elementtree -Copyright (c) 2011, Rackspace, Inc. - -The ElementTree toolkit is Copyright (c) 1999-2007 by Fredrik Lundh - diff --git a/node_modules/cordova-android/node_modules/elementtree/README.md b/node_modules/cordova-android/node_modules/elementtree/README.md deleted file mode 100644 index 738420c..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/README.md +++ /dev/null @@ -1,141 +0,0 @@ -node-elementtree -==================== - -node-elementtree is a [Node.js](http://nodejs.org) XML parser and serializer based upon the [Python ElementTree v1.3](http://effbot.org/zone/element-index.htm) module. - -Installation -==================== - - $ npm install elementtree - -Using the library -==================== - -For the usage refer to the Python ElementTree library documentation - [http://effbot.org/zone/element-index.htm#usage](http://effbot.org/zone/element-index.htm#usage). - -Supported XPath expressions in `find`, `findall` and `findtext` methods are listed on [http://effbot.org/zone/element-xpath.htm](http://effbot.org/zone/element-xpath.htm). - -Example 1 – Creating An XML Document -==================== - -This example shows how to build a valid XML document that can be published to -Atom Hopper. Atom Hopper is used internally as a bridge from products all the -way to collecting revenue, called “Usage.” MaaS and other products send similar -events to it every time user performs an action on a resource -(e.g. creates,updates or deletes). Below is an example of leveraging the API -to create a new XML document. - -```javascript -var et = require('elementtree'); -var XML = et.XML; -var ElementTree = et.ElementTree; -var element = et.Element; -var subElement = et.SubElement; - -var date, root, tenantId, serviceName, eventType, usageId, dataCenter, region, -checks, resourceId, category, startTime, resourceName, etree, xml; - -date = new Date(); - -root = element('entry'); -root.set('xmlns', 'http://www.w3.org/2005/Atom'); - -tenantId = subElement(root, 'TenantId'); -tenantId.text = '12345'; - -serviceName = subElement(root, 'ServiceName'); -serviceName.text = 'MaaS'; - -resourceId = subElement(root, 'ResourceID'); -resourceId.text = 'enAAAA'; - -usageId = subElement(root, 'UsageID'); -usageId.text = '550e8400-e29b-41d4-a716-446655440000'; - -eventType = subElement(root, 'EventType'); -eventType.text = 'create'; - -category = subElement(root, 'category'); -category.set('term', 'monitoring.entity.create'); - -dataCenter = subElement(root, 'DataCenter'); -dataCenter.text = 'global'; - -region = subElement(root, 'Region'); -region.text = 'global'; - -startTime = subElement(root, 'StartTime'); -startTime.text = date; - -resourceName = subElement(root, 'ResourceName'); -resourceName.text = 'entity'; - -etree = new ElementTree(root); -xml = etree.write({'xml_declaration': false}); -console.log(xml); -``` - -As you can see, both et.Element and et.SubElement are factory methods which -return a new instance of Element and SubElement class, respectively. -When you create a new element (tag) you can use set method to set an attribute. -To set the tag value, assign a value to the .text attribute. - -This example would output a document that looks like this: - -```xml - - 12345 - MaaS - enAAAA - 550e8400-e29b-41d4-a716-446655440000 - create - - global - global - Sun Apr 29 2012 16:37:32 GMT-0700 (PDT) - entity - -``` - -Example 2 – Parsing An XML Document -==================== - -This example shows how to parse an XML document and use simple XPath selectors. -For demonstration purposes, we will use the XML document located at -https://gist.github.com/2554343. - -Behind the scenes, node-elementtree uses Isaac’s sax library for parsing XML, -but the library has a concept of “parsers,” which means it’s pretty simple to -add support for a different parser. - -```javascript -var fs = require('fs'); - -var et = require('elementtree'); - -var XML = et.XML; -var ElementTree = et.ElementTree; -var element = et.Element; -var subElement = et.SubElement; - -var data, etree; - -data = fs.readFileSync('document.xml').toString(); -etree = et.parse(data); - -console.log(etree.findall('./entry/TenantId').length); // 2 -console.log(etree.findtext('./entry/ServiceName')); // MaaS -console.log(etree.findall('./entry/category')[0].get('term')); // monitoring.entity.create -console.log(etree.findall('*/category/[@term="monitoring.entity.update"]').length); // 1 -``` - -Build status -==================== - -[![Build Status](https://secure.travis-ci.org/racker/node-elementtree.png)](http://travis-ci.org/racker/node-elementtree) - - -License -==================== - -node-elementtree is distributed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0.html). diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/constants.js b/node_modules/cordova-android/node_modules/elementtree/lib/constants.js deleted file mode 100644 index b057faf..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/constants.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var DEFAULT_PARSER = 'sax'; - -exports.DEFAULT_PARSER = DEFAULT_PARSER; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/elementpath.js b/node_modules/cordova-android/node_modules/elementtree/lib/elementpath.js deleted file mode 100644 index 2e93f47..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/elementpath.js +++ /dev/null @@ -1,343 +0,0 @@ -/** - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var sprintf = require('./sprintf').sprintf; - -var utils = require('./utils'); -var SyntaxError = require('./errors').SyntaxError; - -var _cache = {}; - -var RE = new RegExp( - "(" + - "'[^']*'|\"[^\"]*\"|" + - "::|" + - "//?|" + - "\\.\\.|" + - "\\(\\)|" + - "[/.*:\\[\\]\\(\\)@=])|" + - "((?:\\{[^}]+\\})?[^/\\[\\]\\(\\)@=\\s]+)|" + - "\\s+", 'g' -); - -var xpath_tokenizer = utils.findall.bind(null, RE); - -function prepare_tag(next, token) { - var tag = token[0]; - - function select(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - elem._children.forEach(function(e) { - if (e.tag === tag) { - rv.push(e); - } - }); - } - - return rv; - } - - return select; -} - -function prepare_star(next, token) { - function select(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - elem._children.forEach(function(e) { - rv.push(e); - }); - } - - return rv; - } - - return select; -} - -function prepare_dot(next, token) { - function select(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - rv.push(elem); - } - - return rv; - } - - return select; -} - -function prepare_iter(next, token) { - var tag; - token = next(); - - if (token[1] === '*') { - tag = '*'; - } - else if (!token[1]) { - tag = token[0] || ''; - } - else { - throw new SyntaxError(token); - } - - function select(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - elem.iter(tag, function(e) { - if (e !== elem) { - rv.push(e); - } - }); - } - - return rv; - } - - return select; -} - -function prepare_dot_dot(next, token) { - function select(context, result) { - var i, len, elem, rv = [], parent_map = context.parent_map; - - if (!parent_map) { - context.parent_map = parent_map = {}; - - context.root.iter(null, function(p) { - p._children.forEach(function(e) { - parent_map[e] = p; - }); - }); - } - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - - if (parent_map.hasOwnProperty(elem)) { - rv.push(parent_map[elem]); - } - } - - return rv; - } - - return select; -} - - -function prepare_predicate(next, token) { - var tag, key, value, select; - token = next(); - - if (token[1] === '@') { - // attribute - token = next(); - - if (token[1]) { - throw new SyntaxError(token, 'Invalid attribute predicate'); - } - - key = token[0]; - token = next(); - - if (token[1] === ']') { - select = function(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - - if (elem.get(key)) { - rv.push(elem); - } - } - - return rv; - }; - } - else if (token[1] === '=') { - value = next()[1]; - - if (value[0] === '"' || value[value.length - 1] === '\'') { - value = value.slice(1, value.length - 1); - } - else { - throw new SyntaxError(token, 'Ivalid comparison target'); - } - - token = next(); - select = function(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - - if (elem.get(key) === value) { - rv.push(elem); - } - } - - return rv; - }; - } - - if (token[1] !== ']') { - throw new SyntaxError(token, 'Invalid attribute predicate'); - } - } - else if (!token[1]) { - tag = token[0] || ''; - token = next(); - - if (token[1] !== ']') { - throw new SyntaxError(token, 'Invalid node predicate'); - } - - select = function(context, result) { - var i, len, elem, rv = []; - - for (i = 0, len = result.length; i < len; i++) { - elem = result[i]; - - if (elem.find(tag)) { - rv.push(elem); - } - } - - return rv; - }; - } - else { - throw new SyntaxError(null, 'Invalid predicate'); - } - - return select; -} - - - -var ops = { - "": prepare_tag, - "*": prepare_star, - ".": prepare_dot, - "..": prepare_dot_dot, - "//": prepare_iter, - "[": prepare_predicate, -}; - -function _SelectorContext(root) { - this.parent_map = null; - this.root = root; -} - -function findall(elem, path) { - var selector, result, i, len, token, value, select, context; - - if (_cache.hasOwnProperty(path)) { - selector = _cache[path]; - } - else { - // TODO: Use smarter cache purging approach - if (Object.keys(_cache).length > 100) { - _cache = {}; - } - - if (path.charAt(0) === '/') { - throw new SyntaxError(null, 'Cannot use absolute path on element'); - } - - result = xpath_tokenizer(path); - selector = []; - - function getToken() { - return result.shift(); - } - - token = getToken(); - while (true) { - var c = token[1] || ''; - value = ops[c](getToken, token); - - if (!value) { - throw new SyntaxError(null, sprintf('Invalid path: %s', path)); - } - - selector.push(value); - token = getToken(); - - if (!token) { - break; - } - else if (token[1] === '/') { - token = getToken(); - } - - if (!token) { - break; - } - } - - _cache[path] = selector; - } - - // Execute slector pattern - result = [elem]; - context = new _SelectorContext(elem); - - for (i = 0, len = selector.length; i < len; i++) { - select = selector[i]; - result = select(context, result); - } - - return result || []; -} - -function find(element, path) { - var resultElements = findall(element, path); - - if (resultElements && resultElements.length > 0) { - return resultElements[0]; - } - - return null; -} - -function findtext(element, path, defvalue) { - var resultElements = findall(element, path); - - if (resultElements && resultElements.length > 0) { - return resultElements[0].text; - } - - return defvalue; -} - - -exports.find = find; -exports.findall = findall; -exports.findtext = findtext; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/elementtree.js b/node_modules/cordova-android/node_modules/elementtree/lib/elementtree.js deleted file mode 100644 index 61d9276..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/elementtree.js +++ /dev/null @@ -1,611 +0,0 @@ -/** - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var sprintf = require('./sprintf').sprintf; - -var utils = require('./utils'); -var ElementPath = require('./elementpath'); -var TreeBuilder = require('./treebuilder').TreeBuilder; -var get_parser = require('./parser').get_parser; -var constants = require('./constants'); - -var element_ids = 0; - -function Element(tag, attrib) -{ - this._id = element_ids++; - this.tag = tag; - this.attrib = {}; - this.text = null; - this.tail = null; - this._children = []; - - if (attrib) { - this.attrib = utils.merge(this.attrib, attrib); - } -} - -Element.prototype.toString = function() -{ - return sprintf("", this.tag, this._id); -}; - -Element.prototype.makeelement = function(tag, attrib) -{ - return new Element(tag, attrib); -}; - -Element.prototype.len = function() -{ - return this._children.length; -}; - -Element.prototype.getItem = function(index) -{ - return this._children[index]; -}; - -Element.prototype.setItem = function(index, element) -{ - this._children[index] = element; -}; - -Element.prototype.delItem = function(index) -{ - this._children.splice(index, 1); -}; - -Element.prototype.getSlice = function(start, stop) -{ - return this._children.slice(start, stop); -}; - -Element.prototype.setSlice = function(start, stop, elements) -{ - var i; - var k = 0; - for (i = start; i < stop; i++, k++) { - this._children[i] = elements[k]; - } -}; - -Element.prototype.delSlice = function(start, stop) -{ - this._children.splice(start, stop - start); -}; - -Element.prototype.append = function(element) -{ - this._children.push(element); -}; - -Element.prototype.extend = function(elements) -{ - this._children.concat(elements); -}; - -Element.prototype.insert = function(index, element) -{ - this._children[index] = element; -}; - -Element.prototype.remove = function(element) -{ - this._children = this._children.filter(function(e) { - /* TODO: is this the right way to do this? */ - if (e._id === element._id) { - return false; - } - return true; - }); -}; - -Element.prototype.getchildren = function() { - return this._children; -}; - -Element.prototype.find = function(path) -{ - return ElementPath.find(this, path); -}; - -Element.prototype.findtext = function(path, defvalue) -{ - return ElementPath.findtext(this, path, defvalue); -}; - -Element.prototype.findall = function(path, defvalue) -{ - return ElementPath.findall(this, path, defvalue); -}; - -Element.prototype.clear = function() -{ - this.attrib = {}; - this._children = []; - this.text = null; - this.tail = null; -}; - -Element.prototype.get = function(key, defvalue) -{ - if (this.attrib[key] !== undefined) { - return this.attrib[key]; - } - else { - return defvalue; - } -}; - -Element.prototype.set = function(key, value) -{ - this.attrib[key] = value; -}; - -Element.prototype.keys = function() -{ - return Object.keys(this.attrib); -}; - -Element.prototype.items = function() -{ - return utils.items(this.attrib); -}; - -/* - * In python this uses a generator, but in v8 we don't have em, - * so we use a callback instead. - **/ -Element.prototype.iter = function(tag, callback) -{ - var self = this; - var i, child; - - if (tag === "*") { - tag = null; - } - - if (tag === null || this.tag === tag) { - callback(self); - } - - for (i = 0; i < this._children.length; i++) { - child = this._children[i]; - child.iter(tag, function(e) { - callback(e); - }); - } -}; - -Element.prototype.itertext = function(callback) -{ - this.iter(null, function(e) { - if (e.text) { - callback(e.text); - } - - if (e.tail) { - callback(e.tail); - } - }); -}; - - -function SubElement(parent, tag, attrib) { - var element = parent.makeelement(tag, attrib); - parent.append(element); - return element; -} - -function Comment(text) { - var element = new Element(Comment); - if (text) { - element.text = text; - } - return element; -} - -function CData(text) { - var element = new Element(CData); - if (text) { - element.text = text; - } - return element; -} - -function ProcessingInstruction(target, text) -{ - var element = new Element(ProcessingInstruction); - element.text = target; - if (text) { - element.text = element.text + " " + text; - } - return element; -} - -function QName(text_or_uri, tag) -{ - if (tag) { - text_or_uri = sprintf("{%s}%s", text_or_uri, tag); - } - this.text = text_or_uri; -} - -QName.prototype.toString = function() { - return this.text; -}; - -function ElementTree(element) -{ - this._root = element; -} - -ElementTree.prototype.getroot = function() { - return this._root; -}; - -ElementTree.prototype._setroot = function(element) { - this._root = element; -}; - -ElementTree.prototype.parse = function(source, parser) { - if (!parser) { - parser = get_parser(constants.DEFAULT_PARSER); - parser = new parser.XMLParser(new TreeBuilder()); - } - - parser.feed(source); - this._root = parser.close(); - return this._root; -}; - -ElementTree.prototype.iter = function(tag, callback) { - this._root.iter(tag, callback); -}; - -ElementTree.prototype.find = function(path) { - return this._root.find(path); -}; - -ElementTree.prototype.findtext = function(path, defvalue) { - return this._root.findtext(path, defvalue); -}; - -ElementTree.prototype.findall = function(path) { - return this._root.findall(path); -}; - -/** - * Unlike ElementTree, we don't write to a file, we return you a string. - */ -ElementTree.prototype.write = function(options) { - var sb = []; - options = utils.merge({ - encoding: 'utf-8', - xml_declaration: null, - default_namespace: null, - method: 'xml'}, options); - - if (options.xml_declaration !== false) { - sb.push("\n"); - } - - if (options.method === "text") { - _serialize_text(sb, self._root, encoding); - } - else { - var qnames, namespaces, indent, indent_string; - var x = _namespaces(this._root, options.encoding, options.default_namespace); - qnames = x[0]; - namespaces = x[1]; - - if (options.hasOwnProperty('indent')) { - indent = 0; - indent_string = new Array(options.indent + 1).join(' '); - } - else { - indent = false; - } - - if (options.method === "xml") { - _serialize_xml(function(data) { - sb.push(data); - }, this._root, options.encoding, qnames, namespaces, indent, indent_string); - } - else { - /* TODO: html */ - throw new Error("unknown serialization method "+ options.method); - } - } - - return sb.join(""); -}; - -var _namespace_map = { - /* "well-known" namespace prefixes */ - "http://www.w3.org/XML/1998/namespace": "xml", - "http://www.w3.org/1999/xhtml": "html", - "http://www.w3.org/1999/02/22-rdf-syntax-ns#": "rdf", - "http://schemas.xmlsoap.org/wsdl/": "wsdl", - /* xml schema */ - "http://www.w3.org/2001/XMLSchema": "xs", - "http://www.w3.org/2001/XMLSchema-instance": "xsi", - /* dublic core */ - "http://purl.org/dc/elements/1.1/": "dc", -}; - -function register_namespace(prefix, uri) { - if (/ns\d+$/.test(prefix)) { - throw new Error('Prefix format reserved for internal use'); - } - - if (_namespace_map.hasOwnProperty(uri) && _namespace_map[uri] === prefix) { - delete _namespace_map[uri]; - } - - _namespace_map[uri] = prefix; -} - - -function _escape(text, encoding, isAttribute, isText) { - if (text) { - text = text.toString(); - text = text.replace(/&/g, '&'); - text = text.replace(//g, '>'); - if (!isText) { - text = text.replace(/\n/g, ' '); - text = text.replace(/\r/g, ' '); - } - if (isAttribute) { - text = text.replace(/"/g, '"'); - } - } - return text; -} - -/* TODO: benchmark single regex */ -function _escape_attrib(text, encoding) { - return _escape(text, encoding, true); -} - -function _escape_cdata(text, encoding) { - return _escape(text, encoding, false); -} - -function _escape_text(text, encoding) { - return _escape(text, encoding, false, true); -} - -function _namespaces(elem, encoding, default_namespace) { - var qnames = {}; - var namespaces = {}; - - if (default_namespace) { - namespaces[default_namespace] = ""; - } - - function encode(text) { - return text; - } - - function add_qname(qname) { - if (qname[0] === "{") { - var tmp = qname.substring(1).split("}", 2); - var uri = tmp[0]; - var tag = tmp[1]; - var prefix = namespaces[uri]; - - if (prefix === undefined) { - prefix = _namespace_map[uri]; - if (prefix === undefined) { - prefix = "ns" + Object.keys(namespaces).length; - } - if (prefix !== "xml") { - namespaces[uri] = prefix; - } - } - - if (prefix) { - qnames[qname] = sprintf("%s:%s", prefix, tag); - } - else { - qnames[qname] = tag; - } - } - else { - if (default_namespace) { - throw new Error('cannot use non-qualified names with default_namespace option'); - } - - qnames[qname] = qname; - } - } - - - elem.iter(null, function(e) { - var i; - var tag = e.tag; - var text = e.text; - var items = e.items(); - - if (tag instanceof QName && qnames[tag.text] === undefined) { - add_qname(tag.text); - } - else if (typeof(tag) === "string") { - add_qname(tag); - } - else if (tag !== null && tag !== Comment && tag !== CData && tag !== ProcessingInstruction) { - throw new Error('Invalid tag type for serialization: '+ tag); - } - - if (text instanceof QName && qnames[text.text] === undefined) { - add_qname(text.text); - } - - items.forEach(function(item) { - var key = item[0], - value = item[1]; - if (key instanceof QName) { - key = key.text; - } - - if (qnames[key] === undefined) { - add_qname(key); - } - - if (value instanceof QName && qnames[value.text] === undefined) { - add_qname(value.text); - } - }); - }); - return [qnames, namespaces]; -} - -function _serialize_xml(write, elem, encoding, qnames, namespaces, indent, indent_string) { - var tag = elem.tag; - var text = elem.text; - var items; - var i; - - var newlines = indent || (indent === 0); - write(Array(indent + 1).join(indent_string)); - - if (tag === Comment) { - write(sprintf("", _escape_cdata(text, encoding))); - } - else if (tag === ProcessingInstruction) { - write(sprintf("", _escape_cdata(text, encoding))); - } - else if (tag === CData) { - text = text || ''; - write(sprintf("", text)); - } - else { - tag = qnames[tag]; - if (tag === undefined) { - if (text) { - write(_escape_text(text, encoding)); - } - elem.iter(function(e) { - _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); - }); - } - else { - write("<" + tag); - items = elem.items(); - - if (items || namespaces) { - items.sort(); // lexical order - - items.forEach(function(item) { - var k = item[0], - v = item[1]; - - if (k instanceof QName) { - k = k.text; - } - - if (v instanceof QName) { - v = qnames[v.text]; - } - else { - v = _escape_attrib(v, encoding); - } - write(sprintf(" %s=\"%s\"", qnames[k], v)); - }); - - if (namespaces) { - items = utils.items(namespaces); - items.sort(function(a, b) { return a[1] < b[1]; }); - - items.forEach(function(item) { - var k = item[1], - v = item[0]; - - if (k) { - k = ':' + k; - } - - write(sprintf(" xmlns%s=\"%s\"", k, _escape_attrib(v, encoding))); - }); - } - } - - if (text || elem.len()) { - if (text && text.toString().match(/^\s*$/)) { - text = null; - } - - write(">"); - if (!text && newlines) { - write("\n"); - } - - if (text) { - write(_escape_text(text, encoding)); - } - elem._children.forEach(function(e) { - _serialize_xml(write, e, encoding, qnames, null, newlines ? indent + 1 : false, indent_string); - }); - - if (!text && indent) { - write(Array(indent + 1).join(indent_string)); - } - write(""); - } - else { - write(" />"); - } - } - } - - if (newlines) { - write("\n"); - } -} - -function parse(source, parser) { - var tree = new ElementTree(); - tree.parse(source, parser); - return tree; -} - -function tostring(element, options) { - return new ElementTree(element).write(options); -} - -exports.PI = ProcessingInstruction; -exports.Comment = Comment; -exports.CData = CData; -exports.ProcessingInstruction = ProcessingInstruction; -exports.SubElement = SubElement; -exports.QName = QName; -exports.ElementTree = ElementTree; -exports.ElementPath = ElementPath; -exports.Element = function(tag, attrib) { - return new Element(tag, attrib); -}; - -exports.XML = function(data) { - var et = new ElementTree(); - return et.parse(data); -}; - -exports.parse = parse; -exports.register_namespace = register_namespace; -exports.tostring = tostring; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/errors.js b/node_modules/cordova-android/node_modules/elementtree/lib/errors.js deleted file mode 100644 index e8742be..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/errors.js +++ /dev/null @@ -1,31 +0,0 @@ -/** - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var util = require('util'); - -var sprintf = require('./sprintf').sprintf; - -function SyntaxError(token, msg) { - msg = msg || sprintf('Syntax Error at token %s', token.toString()); - this.token = token; - this.message = msg; - Error.call(this, msg); -} - -util.inherits(SyntaxError, Error); - -exports.SyntaxError = SyntaxError; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/parser.js b/node_modules/cordova-android/node_modules/elementtree/lib/parser.js deleted file mode 100644 index 7307ee4..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/parser.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2011 Rackspace - * - * 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. - * - */ - -/* TODO: support node-expat C++ module optionally */ - -var util = require('util'); -var parsers = require('./parsers/index'); - -function get_parser(name) { - if (name === 'sax') { - return parsers.sax; - } - else { - throw new Error('Invalid parser: ' + name); - } -} - - -exports.get_parser = get_parser; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/parsers/index.js b/node_modules/cordova-android/node_modules/elementtree/lib/parsers/index.js deleted file mode 100644 index 5eac5c8..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/parsers/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.sax = require('./sax'); diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/parsers/sax.js b/node_modules/cordova-android/node_modules/elementtree/lib/parsers/sax.js deleted file mode 100644 index 69b0a59..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/parsers/sax.js +++ /dev/null @@ -1,56 +0,0 @@ -var util = require('util'); - -var sax = require('sax'); - -var TreeBuilder = require('./../treebuilder').TreeBuilder; - -function XMLParser(target) { - this.parser = sax.parser(true); - - this.target = (target) ? target : new TreeBuilder(); - - this.parser.onopentag = this._handleOpenTag.bind(this); - this.parser.ontext = this._handleText.bind(this); - this.parser.oncdata = this._handleCdata.bind(this); - this.parser.ondoctype = this._handleDoctype.bind(this); - this.parser.oncomment = this._handleComment.bind(this); - this.parser.onclosetag = this._handleCloseTag.bind(this); - this.parser.onerror = this._handleError.bind(this); -} - -XMLParser.prototype._handleOpenTag = function(tag) { - this.target.start(tag.name, tag.attributes); -}; - -XMLParser.prototype._handleText = function(text) { - this.target.data(text); -}; - -XMLParser.prototype._handleCdata = function(text) { - this.target.data(text); -}; - -XMLParser.prototype._handleDoctype = function(text) { -}; - -XMLParser.prototype._handleComment = function(comment) { -}; - -XMLParser.prototype._handleCloseTag = function(tag) { - this.target.end(tag); -}; - -XMLParser.prototype._handleError = function(err) { - throw err; -}; - -XMLParser.prototype.feed = function(chunk) { - this.parser.write(chunk); -}; - -XMLParser.prototype.close = function() { - this.parser.close(); - return this.target.close(); -}; - -exports.XMLParser = XMLParser; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/sprintf.js b/node_modules/cordova-android/node_modules/elementtree/lib/sprintf.js deleted file mode 100644 index f802c1b..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/sprintf.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var cache = {}; - - -// Do any others need escaping? -var TO_ESCAPE = { - '\'': '\\\'', - '\n': '\\n' -}; - - -function populate(formatter) { - var i, type, - key = formatter, - prev = 0, - arg = 1, - builder = 'return \''; - - for (i = 0; i < formatter.length; i++) { - if (formatter[i] === '%') { - type = formatter[i + 1]; - - switch (type) { - case 's': - builder += formatter.slice(prev, i) + '\' + arguments[' + arg + '] + \''; - prev = i + 2; - arg++; - break; - case 'j': - builder += formatter.slice(prev, i) + '\' + JSON.stringify(arguments[' + arg + ']) + \''; - prev = i + 2; - arg++; - break; - case '%': - builder += formatter.slice(prev, i + 1); - prev = i + 2; - i++; - break; - } - - - } else if (TO_ESCAPE[formatter[i]]) { - builder += formatter.slice(prev, i) + TO_ESCAPE[formatter[i]]; - prev = i + 1; - } - } - - builder += formatter.slice(prev) + '\';'; - cache[key] = new Function(builder); -} - - -/** - * A fast version of sprintf(), which currently only supports the %s and %j. - * This caches a formatting function for each format string that is used, so - * you should only use this sprintf() will be called many times with a single - * format string and a limited number of format strings will ever be used (in - * general this means that format strings should be string literals). - * - * @param {String} formatter A format string. - * @param {...String} var_args Values that will be formatted by %s and %j. - * @return {String} The formatted output. - */ -exports.sprintf = function(formatter, var_args) { - if (!cache[formatter]) { - populate(formatter); - } - - return cache[formatter].apply(null, arguments); -}; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/treebuilder.js b/node_modules/cordova-android/node_modules/elementtree/lib/treebuilder.js deleted file mode 100644 index 393a98f..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/treebuilder.js +++ /dev/null @@ -1,60 +0,0 @@ -function TreeBuilder(element_factory) { - this._data = []; - this._elem = []; - this._last = null; - this._tail = null; - if (!element_factory) { - /* evil circular dep */ - element_factory = require('./elementtree').Element; - } - this._factory = element_factory; -} - -TreeBuilder.prototype.close = function() { - return this._last; -}; - -TreeBuilder.prototype._flush = function() { - if (this._data) { - if (this._last !== null) { - var text = this._data.join(""); - if (this._tail) { - this._last.tail = text; - } - else { - this._last.text = text; - } - } - this._data = []; - } -}; - -TreeBuilder.prototype.data = function(data) { - this._data.push(data); -}; - -TreeBuilder.prototype.start = function(tag, attrs) { - this._flush(); - var elem = this._factory(tag, attrs); - this._last = elem; - - if (this._elem.length) { - this._elem[this._elem.length - 1].append(elem); - } - - this._elem.push(elem); - - this._tail = null; -}; - -TreeBuilder.prototype.end = function(tag) { - this._flush(); - this._last = this._elem.pop(); - if (this._last.tag !== tag) { - throw new Error("end tag mismatch"); - } - this._tail = 1; - return this._last; -}; - -exports.TreeBuilder = TreeBuilder; diff --git a/node_modules/cordova-android/node_modules/elementtree/lib/utils.js b/node_modules/cordova-android/node_modules/elementtree/lib/utils.js deleted file mode 100644 index b08a670..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/lib/utils.js +++ /dev/null @@ -1,72 +0,0 @@ -/** - * Copyright 2011 Rackspace - * - * 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. - * - */ - -/** - * @param {Object} hash. - * @param {Array} ignored. - */ -function items(hash, ignored) { - ignored = ignored || null; - var k, rv = []; - - function is_ignored(key) { - if (!ignored || ignored.length === 0) { - return false; - } - - return ignored.indexOf(key); - } - - for (k in hash) { - if (hash.hasOwnProperty(k) && !(is_ignored(ignored))) { - rv.push([k, hash[k]]); - } - } - - return rv; -} - - -function findall(re, str) { - var match, matches = []; - - while ((match = re.exec(str))) { - matches.push(match); - } - - return matches; -} - -function merge(a, b) { - var c = {}, attrname; - - for (attrname in a) { - if (a.hasOwnProperty(attrname)) { - c[attrname] = a[attrname]; - } - } - for (attrname in b) { - if (b.hasOwnProperty(attrname)) { - c[attrname] = b[attrname]; - } - } - return c; -} - -exports.items = items; -exports.findall = findall; -exports.merge = merge; diff --git a/node_modules/cordova-android/node_modules/elementtree/package.json b/node_modules/cordova-android/node_modules/elementtree/package.json deleted file mode 100644 index 4dcc9d9..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/package.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "_from": "elementtree@0.1.6", - "_id": "elementtree@0.1.6", - "_inBundle": true, - "_integrity": "sha1-KsTEbqMFFsjEy9teOsdBjlkt4gw=", - "_location": "/cordova-android/elementtree", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "elementtree@0.1.6", - "name": "elementtree", - "escapedName": "elementtree", - "rawSpec": "0.1.6", - "saveSpec": null, - "fetchSpec": "0.1.6" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/elementtree/-/elementtree-0.1.6.tgz", - "_shasum": "2ac4c46ea30516c8c4cbdb5e3ac7418e592de20c", - "_spec": "elementtree@0.1.6", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "author": { - "name": "Rackspace US, Inc." - }, - "bugs": { - "url": "https://github.com/racker/node-elementtree/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Paul Querna", - "email": "paul.querna@rackspace.com" - }, - { - "name": "Tomaz Muraus", - "email": "tomaz.muraus@rackspace.com" - } - ], - "dependencies": { - "sax": "0.3.5" - }, - "deprecated": false, - "description": "XML Serialization and Parsing module based on Python's ElementTree.", - "devDependencies": { - "whiskey": "0.8.x" - }, - "directories": { - "lib": "lib" - }, - "engines": { - "node": ">= 0.4.0" - }, - "homepage": "https://github.com/racker/node-elementtree", - "keywords": [ - "xml", - "sax", - "parser", - "seralization", - "elementtree" - ], - "licenses": [ - { - "type": "Apache", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - ], - "main": "lib/elementtree.js", - "name": "elementtree", - "repository": { - "type": "git", - "url": "git://github.com/racker/node-elementtree.git" - }, - "scripts": { - "test": "make test" - }, - "version": "0.1.6" -} diff --git a/node_modules/cordova-android/node_modules/elementtree/tests/data/xml1.xml b/node_modules/cordova-android/node_modules/elementtree/tests/data/xml1.xml deleted file mode 100644 index 72c33ae..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/tests/data/xml1.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - dd - test_object_1 - 4281c348eaf83e70ddce0e07221c3d28 - 14 - application/octetstream - 2009-02-03T05:26:32.612278 - - - test_object_2 - b039efe731ad111bc1b0ef221c3849d0 - 64 - application/octetstream - 2009-02-03T05:26:32.612278 - - diff --git a/node_modules/cordova-android/node_modules/elementtree/tests/data/xml2.xml b/node_modules/cordova-android/node_modules/elementtree/tests/data/xml2.xml deleted file mode 100644 index 5f94bbd..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/tests/data/xml2.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - Hello World - - - - - - - - diff --git a/node_modules/cordova-android/node_modules/elementtree/tests/test-simple.js b/node_modules/cordova-android/node_modules/elementtree/tests/test-simple.js deleted file mode 100644 index 1fc04b8..0000000 --- a/node_modules/cordova-android/node_modules/elementtree/tests/test-simple.js +++ /dev/null @@ -1,339 +0,0 @@ -/** - * Copyright 2011 Rackspace - * - * 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. - * - */ - -var fs = require('fs'); -var path = require('path'); - -var sprintf = require('./../lib/sprintf').sprintf; -var et = require('elementtree'); -var XML = et.XML; -var ElementTree = et.ElementTree; -var Element = et.Element; -var SubElement = et.SubElement; -var SyntaxError = require('./../lib/errors').SyntaxError; - -function readFile(name) { - return fs.readFileSync(path.join(__dirname, '/data/', name), 'utf8'); -} - -exports['test_simplest'] = function(test, assert) { - /* Ported from */ - var Element = et.Element; - var root = Element('root'); - root.append(Element('one')); - root.append(Element('two')); - root.append(Element('three')); - assert.equal(3, root.len()); - assert.equal('one', root.getItem(0).tag); - assert.equal('two', root.getItem(1).tag); - assert.equal('three', root.getItem(2).tag); - test.finish(); -}; - - -exports['test_attribute_values'] = function(test, assert) { - var XML = et.XML; - var root = XML(''); - assert.equal('Alpha', root.attrib['alpha']); - assert.equal('Beta', root.attrib['beta']); - assert.equal('Gamma', root.attrib['gamma']); - test.finish(); -}; - - -exports['test_findall'] = function(test, assert) { - var XML = et.XML; - var root = XML(''); - - assert.equal(root.findall("c").length, 1); - assert.equal(root.findall(".//c").length, 2); - assert.equal(root.findall(".//b").length, 3); - assert.equal(root.findall(".//b")[0]._children.length, 1); - assert.equal(root.findall(".//b")[1]._children.length, 0); - assert.equal(root.findall(".//b")[2]._children.length, 0); - assert.deepEqual(root.findall('.//b')[0], root.getchildren()[0]); - - test.finish(); -}; - -exports['test_find'] = function(test, assert) { - var a = Element('a'); - var b = SubElement(a, 'b'); - var c = SubElement(a, 'c'); - - assert.deepEqual(a.find('./b/..'), a); - test.finish(); -}; - -exports['test_elementtree_find_qname'] = function(test, assert) { - var tree = new et.ElementTree(XML('')); - assert.deepEqual(tree.find(new et.QName('c')), tree.getroot()._children[2]); - test.finish(); -}; - -exports['test_attrib_ns_clear'] = function(test, assert) { - var attribNS = '{http://foo/bar}x'; - - var par = Element('par'); - par.set(attribNS, 'a'); - var child = SubElement(par, 'child'); - child.set(attribNS, 'b'); - - assert.equal('a', par.get(attribNS)); - assert.equal('b', child.get(attribNS)); - - par.clear(); - assert.equal(null, par.get(attribNS)); - assert.equal('b', child.get(attribNS)); - test.finish(); -}; - -exports['test_create_tree_and_parse_simple'] = function(test, assert) { - var i = 0; - var e = new Element('bar', {}); - var expected = "\n" + - 'ponies'; - - SubElement(e, "blah", {a: 11}); - SubElement(e, "blah", {a: 12}); - var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); - se.text = 'ponies'; - - se.itertext(function(text) { - assert.equal(text, 'ponies'); - i++; - }); - - assert.equal(i, 1); - var etree = new ElementTree(e); - var xml = etree.write(); - assert.equal(xml, expected); - test.finish(); -}; - -exports['test_write_with_options'] = function(test, assert) { - var i = 0; - var e = new Element('bar', {}); - var expected1 = "\n" + - '\n' + - ' \n' + - ' test\n' + - ' \n' + - ' \n' + - ' ponies\n' + - '\n'; - var expected2 = "\n" + - '\n' + - ' \n' + - ' test\n' + - ' \n' + - ' \n' + - ' ponies\n' + - '\n'; - - var expected3 = "\n" + - '\n' + - ' \n' + - ' Hello World\n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' \n' + - ' Test & Test & Test\n' + - ' \n' + - '\n'; - - var se1 = SubElement(e, "blah", {a: 11}); - var se2 = SubElement(se1, "baz", {d: 11}); - se2.text = 'test'; - SubElement(e, "blah", {a: 12}); - var se = et.SubElement(e, "gag", {a: '13', b: 'abc'}); - se.text = 'ponies'; - - se.itertext(function(text) { - assert.equal(text, 'ponies'); - i++; - }); - - assert.equal(i, 1); - var etree = new ElementTree(e); - var xml1 = etree.write({'indent': 4}); - var xml2 = etree.write({'indent': 2}); - assert.equal(xml1, expected1); - assert.equal(xml2, expected2); - - var file = readFile('xml2.xml'); - var etree2 = et.parse(file); - var xml3 = etree2.write({'indent': 4}); - assert.equal(xml3, expected3); - test.finish(); -}; - -exports['test_parse_and_find_2'] = function(test, assert) { - var data = readFile('xml1.xml'); - var etree = et.parse(data); - - assert.equal(etree.findall('./object').length, 2); - assert.equal(etree.findall('[@name]').length, 1); - assert.equal(etree.findall('[@name="test_container_1"]').length, 1); - assert.equal(etree.findall('[@name=\'test_container_1\']').length, 1); - assert.equal(etree.findall('./object')[0].findtext('name'), 'test_object_1'); - assert.equal(etree.findtext('./object/name'), 'test_object_1'); - assert.equal(etree.findall('.//bytes').length, 2); - assert.equal(etree.findall('*/bytes').length, 2); - assert.equal(etree.findall('*/foobar').length, 0); - - test.finish(); -}; - -exports['test_namespaced_attribute'] = function(test, assert) { - var data = readFile('xml1.xml'); - var etree = et.parse(data); - - assert.equal(etree.findall('*/bytes[@android:type="cool"]').length, 1); - - test.finish(); -} - -exports['test_syntax_errors'] = function(test, assert) { - var expressions = [ './/@bar', '[@bar', '[@foo=bar]', '[@', '/bar' ]; - var errCount = 0; - var data = readFile('xml1.xml'); - var etree = et.parse(data); - - expressions.forEach(function(expression) { - try { - etree.findall(expression); - } - catch (err) { - errCount++; - } - }); - - assert.equal(errCount, expressions.length); - test.finish(); -}; - -exports['test_register_namespace'] = function(test, assert){ - var prefix = 'TESTPREFIX'; - var namespace = 'http://seriously.unknown/namespace/URI'; - var errCount = 0; - - var etree = Element(sprintf('{%s}test', namespace)); - assert.equal(et.tostring(etree, { 'xml_declaration': false}), - sprintf('', namespace)); - - et.register_namespace(prefix, namespace); - var etree = Element(sprintf('{%s}test', namespace)); - assert.equal(et.tostring(etree, { 'xml_declaration': false}), - sprintf('<%s:test xmlns:%s="%s" />', prefix, prefix, namespace)); - - try { - et.register_namespace('ns25', namespace); - } - catch (err) { - errCount++; - } - - assert.equal(errCount, 1, 'Reserved prefix used, but exception was not thrown'); - test.finish(); -}; - -exports['test_tostring'] = function(test, assert) { - var a = Element('a'); - var b = SubElement(a, 'b'); - var c = SubElement(a, 'c'); - c.text = 543; - - assert.equal(et.tostring(a, { 'xml_declaration': false }), '543'); - assert.equal(et.tostring(c, { 'xml_declaration': false }), '543'); - test.finish(); -}; - -exports['test_escape'] = function(test, assert) { - var a = Element('a'); - var b = SubElement(a, 'b'); - b.text = '&&&&<>"\n\r'; - - assert.equal(et.tostring(a, { 'xml_declaration': false }), '&&&&<>\"\n\r'); - test.finish(); -}; - -exports['test_find_null'] = function(test, assert) { - var root = Element('root'); - var node = SubElement(root, 'node'); - var leaf = SubElement(node, 'leaf'); - leaf.text = 'ipsum'; - - assert.equal(root.find('node/leaf'), leaf); - assert.equal(root.find('no-such-node/leaf'), null); - test.finish(); -}; - -exports['test_findtext_null'] = function(test, assert) { - var root = Element('root'); - var node = SubElement(root, 'node'); - var leaf = SubElement(node, 'leaf'); - leaf.text = 'ipsum'; - - assert.equal(root.findtext('node/leaf'), 'ipsum'); - assert.equal(root.findtext('no-such-node/leaf'), null); - test.finish(); -}; - -exports['test_remove'] = function(test, assert) { - var root = Element('root'); - var node1 = SubElement(root, 'node1'); - var node2 = SubElement(root, 'node2'); - var node3 = SubElement(root, 'node3'); - - assert.equal(root.len(), 3); - - root.remove(node2); - - assert.equal(root.len(), 2); - assert.equal(root.getItem(0).tag, 'node1') - assert.equal(root.getItem(1).tag, 'node3') - - test.finish(); -}; - -exports['test_cdata_write'] = function(test, assert) { - var root, etree, xml, values, value, i; - - values = [ - 'if(0>1) then true;', - 'ponies hello', - '' - ]; - - for (i = 0; i < values.length; i++) { - value = values[i]; - - root = Element('root'); - root.append(et.CData(value)); - etree = new ElementTree(root); - xml = etree.write({'xml_declaration': false}); - - assert.equal(xml, sprintf('', value)); - } - - test.finish(); -}; diff --git a/node_modules/cordova-android/node_modules/glob/LICENSE b/node_modules/cordova-android/node_modules/glob/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/cordova-android/node_modules/glob/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/glob/README.md b/node_modules/cordova-android/node_modules/glob/README.md deleted file mode 100644 index 063cf95..0000000 --- a/node_modules/cordova-android/node_modules/glob/README.md +++ /dev/null @@ -1,377 +0,0 @@ -[![Build Status](https://travis-ci.org/isaacs/node-glob.svg?branch=master)](https://travis-ci.org/isaacs/node-glob/) [![Dependency Status](https://david-dm.org/isaacs/node-glob.svg)](https://david-dm.org/isaacs/node-glob) [![devDependency Status](https://david-dm.org/isaacs/node-glob/dev-status.svg)](https://david-dm.org/isaacs/node-glob#info=devDependencies) [![optionalDependency Status](https://david-dm.org/isaacs/node-glob/optional-status.svg)](https://david-dm.org/isaacs/node-glob#info=optionalDependencies) - -# Glob - -Match files using the patterns the shell uses, like stars and stuff. - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -![](oh-my-glob.gif) - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Glob Primer - -"Globs" are the patterns you type when you do stuff like `ls *.js` on -the command line, or put `build/*` in a `.gitignore` file. - -Before parsing the path part patterns, braced sections are expanded -into a set. Braced sections start with `{` and end with `}`, with any -number of comma-delimited sections within. Braced sections may contain -slash characters, so `a{/b/c,bcd}` would expand into `a/b/c` and `abcd`. - -The following characters have special magic meaning when used in a -path portion: - -* `*` Matches 0 or more characters in a single path portion -* `?` Matches 1 character -* `[...]` Matches a range of characters, similar to a RegExp range. - If the first character of the range is `!` or `^` then it matches - any character not in the range. -* `!(pattern|pattern|pattern)` Matches anything that does not match - any of the patterns provided. -* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the - patterns provided. -* `+(pattern|pattern|pattern)` Matches one or more occurrences of the - patterns provided. -* `*(a|b|c)` Matches zero or more occurrences of the patterns provided -* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns - provided -* `**` If a "globstar" is alone in a path portion, then it matches - zero or more directories and subdirectories searching for matches. - It does not crawl symlinked directories. - -### Dots - -If a file or directory path portion has a `.` as the first character, -then it will not match any glob pattern unless that pattern's -corresponding path part also has a `.` as its first character. - -For example, the pattern `a/.*/c` would match the file at `a/.b/c`. -However the pattern `a/*/c` would not, because `*` does not start with -a dot character. - -You can make glob treat dots as normal characters by setting -`dot:true` in the options. - -### Basename Matching - -If you set `matchBase:true` in the options, and the pattern has no -slashes in it, then it will seek for any file anywhere in the tree -with a matching basename. For example, `*.js` would match -`test/simple/basic.js`. - -### Negation - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird, and for the time being, this should be -avoided. The behavior is deprecated in version 5, and will be removed -entirely in version 6. - -### Empty Sets - -If no matching files are found, then an empty array is returned. This -differs from the shell, where the pattern itself is returned. For -example: - - $ echo a*s*d*f - a*s*d*f - -To get the bash-style behavior, set the `nonull:true` in the options. - -### See Also: - -* `man sh` -* `man bash` (Search for "Pattern Matching") -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob.hasMagic(pattern, [options]) - -Returns `true` if there are any special characters in the pattern, and -`false` otherwise. - -Note that the options affect the results. If `noext:true` is set in -the options object, then `+(a|b)` will not be considered a magic -pattern. If the pattern has a brace expansion, like `a/{b/c,x/y}` -then that is considered magical, unless `nobrace:true` is set in the -options. - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options]) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instantiating the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. -* `cache` Convenience object. Each field has the following possible - values: - * `false` - Path does not exist - * `true` - Path exists - * `'DIR'` - Path exists, and is not a directory - * `'FILE'` - Path exists, and is a directory - * `[file, entries, ...]` - Path exists, is a directory, and the - array value is the results of `fs.readdir` -* `statCache` Cache of `fs.stat` results, to prevent statting the same - path multiple times. -* `symlinks` A record of which paths are symbolic links, which is - relevant in resolving `**` patterns. -* `realpathCache` An optional object which is passed to `fs.realpath` - to minimize unnecessary syscalls. It is stored on the instantiated - Glob object, and may be re-used. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `pause` Temporarily stop the search -* `resume` Resume the search -* `abort` Stop the search forever - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the Glob object, as well. - -If you are running many `glob` operations, you can pass a Glob object -as the `options` argument to a subsequent operation to shortcut some -`stat` and `readdir` calls. At the very least, you may pass in shared -`symlinks`, `statCache`, `realpathCache`, and `cache` options, so that -parallel glob operations will be sped up by sharing information about -the filesystem. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `dot` Include `.dot` files in normal matches and `globstar` matches. - Note that an explicit dot in a portion of the pattern will always - match dot files. -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. -* `silent` When an unusual error is encountered when attempting to - read a directory, a warning will be printed to stderr. Set the - `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered when attempting to - read a directory, the process will just continue on in search of - other matches. Set the `strict` option to raise an error in these - cases. -* `cache` See `cache` property above. Pass in a previously generated - cache object to save some fs calls. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary - to set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `symlinks` A cache of known symbolic links. You may pass in a - previously generated `symlinks` object to save `lstat` calls when - resolving `**` matches. -* `sync` DEPRECATED: use `glob.sync(pattern, opts)` instead. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. Set this - flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `debug` Set to enable debug logging in minimatch and glob. -* `nobrace` Do not expand `{a,b}` and `{1..3}` brace sets. -* `noglobstar` Do not match `**` against multiple filenames. (Ie, - treat it as a normal `*` instead.) -* `noext` Do not match `+(a|b)` "extglob" patterns. -* `nocase` Perform a case-insensitive match. Note: on - case-insensitive filesystems, non-magic patterns will match by - default, since `stat` and `readdir` will not raise errors. -* `matchBase` Perform a basename-only match if the pattern does not - contain any slash characters. That is, `*.js` would be treated as - equivalent to `**/*.js`, matching all js files in all directories. -* `nodir` Do not match directories, only files. (Note: to match - *only* directories, simply put a `/` at the end of the pattern.) -* `ignore` Add a pattern or an array of patterns to exclude matches. -* `follow` Follow symlinked directories when expanding `**` patterns. - Note that this can result in a lot of duplicate references in the - presence of cyclic links. -* `realpath` Set to true to call `fs.realpath` on all of the results. - In the case of a symlink that cannot be resolved, the full absolute - path to the matched entry is returned (though it will usually be a - broken symlink) -* `nonegate` Suppress deprecated `negate` behavior. (See below.) - Default=true -* `nocomment` Suppress deprecated `comment` behavior. (See below.) - Default=true - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.3, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -Note that symlinked directories are not crawled as part of a `**`, -though their contents may match against subsequent portions of the -pattern. This prevents infinite loops and duplicates and the like. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -### Comments and Negation - -**Note**: In version 5 of this module, negation and comments are -**disabled** by default. You can explicitly set `nonegate:false` or -`nocomment:false` to re-enable them. They are going away entirely in -version 6. - -The intent for negation would be for a pattern starting with `!` to -match everything that *doesn't* match the supplied pattern. However, -the implementation is weird. It is better to use the `ignore` option -to set a pattern or set of patterns to exclude from matches. If you -want the "everything except *x*" type of behavior, you can use `**` as -the main pattern, and set an `ignore` for the things to exclude. - -The comments feature is added in minimatch, primarily to more easily -support use cases like ignore files, where a `#` at the start of a -line makes the pattern "empty". However, in the context of a -straightforward filesystem globber, "comments" don't make much sense. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the cache or statCache objects are reused between glob -calls. - -Users are thus advised not to use a glob result as a guarantee of -filesystem state in the face of rapid changes. For the vast majority -of operations, this is never a problem. - -## Contributing - -Any change to behavior (including bugfixes) must come with a test. - -Patches that fail tests or reduce performance will be rejected. - -``` -# to run tests -npm test - -# to re-generate test fixtures -npm run test-regen - -# to benchmark against bash/zsh -npm run bench - -# to profile javascript -npm run prof -``` diff --git a/node_modules/cordova-android/node_modules/glob/common.js b/node_modules/cordova-android/node_modules/glob/common.js deleted file mode 100644 index e36a631..0000000 --- a/node_modules/cordova-android/node_modules/glob/common.js +++ /dev/null @@ -1,245 +0,0 @@ -exports.alphasort = alphasort -exports.alphasorti = alphasorti -exports.setopts = setopts -exports.ownProp = ownProp -exports.makeAbs = makeAbs -exports.finish = finish -exports.mark = mark -exports.isIgnored = isIgnored -exports.childrenIgnored = childrenIgnored - -function ownProp (obj, field) { - return Object.prototype.hasOwnProperty.call(obj, field) -} - -var path = require("path") -var minimatch = require("minimatch") -var isAbsolute = require("path-is-absolute") -var Minimatch = minimatch.Minimatch - -function alphasorti (a, b) { - return a.toLowerCase().localeCompare(b.toLowerCase()) -} - -function alphasort (a, b) { - return a.localeCompare(b) -} - -function setupIgnores (self, options) { - self.ignore = options.ignore || [] - - if (!Array.isArray(self.ignore)) - self.ignore = [self.ignore] - - if (self.ignore.length) { - self.ignore = self.ignore.map(ignoreMap) - } -} - -function ignoreMap (pattern) { - var gmatcher = null - if (pattern.slice(-3) === '/**') { - var gpattern = pattern.replace(/(\/\*\*)+$/, '') - gmatcher = new Minimatch(gpattern) - } - - return { - matcher: new Minimatch(pattern), - gmatcher: gmatcher - } -} - -function setopts (self, pattern, options) { - if (!options) - options = {} - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - self.silent = !!options.silent - self.pattern = pattern - self.strict = options.strict !== false - self.realpath = !!options.realpath - self.realpathCache = options.realpathCache || Object.create(null) - self.follow = !!options.follow - self.dot = !!options.dot - self.mark = !!options.mark - self.nodir = !!options.nodir - if (self.nodir) - self.mark = true - self.sync = !!options.sync - self.nounique = !!options.nounique - self.nonull = !!options.nonull - self.nosort = !!options.nosort - self.nocase = !!options.nocase - self.stat = !!options.stat - self.noprocess = !!options.noprocess - - self.maxLength = options.maxLength || Infinity - self.cache = options.cache || Object.create(null) - self.statCache = options.statCache || Object.create(null) - self.symlinks = options.symlinks || Object.create(null) - - setupIgnores(self, options) - - self.changedCwd = false - var cwd = process.cwd() - if (!ownProp(options, "cwd")) - self.cwd = cwd - else { - self.cwd = options.cwd - self.changedCwd = path.resolve(options.cwd) !== cwd - } - - self.root = options.root || path.resolve(self.cwd, "/") - self.root = path.resolve(self.root) - if (process.platform === "win32") - self.root = self.root.replace(/\\/g, "/") - - self.nomount = !!options.nomount - - // disable comments and negation unless the user explicitly - // passes in false as the option. - options.nonegate = options.nonegate === false ? false : true - options.nocomment = options.nocomment === false ? false : true - deprecationWarning(options) - - self.minimatch = new Minimatch(pattern, options) - self.options = self.minimatch.options -} - -// TODO(isaacs): remove entirely in v6 -// exported to reset in tests -exports.deprecationWarned -function deprecationWarning(options) { - if (!options.nonegate || !options.nocomment) { - if (process.noDeprecation !== true && !exports.deprecationWarned) { - var msg = 'glob WARNING: comments and negation will be disabled in v6' - if (process.throwDeprecation) - throw new Error(msg) - else if (process.traceDeprecation) - console.trace(msg) - else - console.error(msg) - - exports.deprecationWarned = true - } - } -} - -function finish (self) { - var nou = self.nounique - var all = nou ? [] : Object.create(null) - - for (var i = 0, l = self.matches.length; i < l; i ++) { - var matches = self.matches[i] - if (!matches || Object.keys(matches).length === 0) { - if (self.nonull) { - // do like the shell, and spit out the literal glob - var literal = self.minimatch.globSet[i] - if (nou) - all.push(literal) - else - all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) - all.push.apply(all, m) - else - m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) - all = Object.keys(all) - - if (!self.nosort) - all = all.sort(self.nocase ? alphasorti : alphasort) - - // at *some* point we statted all of these - if (self.mark) { - for (var i = 0; i < all.length; i++) { - all[i] = self._mark(all[i]) - } - if (self.nodir) { - all = all.filter(function (e) { - return !(/\/$/.test(e)) - }) - } - } - - if (self.ignore.length) - all = all.filter(function(m) { - return !isIgnored(self, m) - }) - - self.found = all -} - -function mark (self, p) { - var abs = makeAbs(self, p) - var c = self.cache[abs] - var m = p - if (c) { - var isDir = c === 'DIR' || Array.isArray(c) - var slash = p.slice(-1) === '/' - - if (isDir && !slash) - m += '/' - else if (!isDir && slash) - m = m.slice(0, -1) - - if (m !== p) { - var mabs = makeAbs(self, m) - self.statCache[mabs] = self.statCache[abs] - self.cache[mabs] = self.cache[abs] - } - } - - return m -} - -// lotta situps... -function makeAbs (self, f) { - var abs = f - if (f.charAt(0) === '/') { - abs = path.join(self.root, f) - } else if (isAbsolute(f) || f === '') { - abs = f - } else if (self.changedCwd) { - abs = path.resolve(self.cwd, f) - } else { - abs = path.resolve(f) - } - return abs -} - - -// Return true, if pattern ends with globstar '**', for the accompanying parent directory. -// Ex:- If node_modules/** is the pattern, add 'node_modules' to ignore list along with it's contents -function isIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return item.matcher.match(path) || !!(item.gmatcher && item.gmatcher.match(path)) - }) -} - -function childrenIgnored (self, path) { - if (!self.ignore.length) - return false - - return self.ignore.some(function(item) { - return !!(item.gmatcher && item.gmatcher.match(path)) - }) -} diff --git a/node_modules/cordova-android/node_modules/glob/glob.js b/node_modules/cordova-android/node_modules/glob/glob.js deleted file mode 100644 index 022d2ac..0000000 --- a/node_modules/cordova-android/node_modules/glob/glob.js +++ /dev/null @@ -1,752 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern, false) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern, inGlobStar) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// -// If inGlobStar and PREFIX is symlink and points to dir -// set ENTRIES = [] -// else readdir(PREFIX) as ENTRIES -// If fail, END -// -// with ENTRIES -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $], false) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// // Mark that this entry is a globstar match -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $], true) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - -module.exports = glob - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var inherits = require('inherits') -var EE = require('events').EventEmitter -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var globSync = require('./sync.js') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var inflight = require('inflight') -var util = require('util') -var childrenIgnored = common.childrenIgnored -var isIgnored = common.isIgnored - -var once = require('once') - -function glob (pattern, options, cb) { - if (typeof options === 'function') cb = options, options = {} - if (!options) options = {} - - if (options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return globSync(pattern, options) - } - - return new Glob(pattern, options, cb) -} - -glob.sync = globSync -var GlobSync = glob.GlobSync = globSync.GlobSync - -// old api surface -glob.glob = glob - -glob.hasMagic = function (pattern, options_) { - var options = util._extend({}, options_) - options.noprocess = true - - var g = new Glob(pattern, options) - var set = g.minimatch.set - if (set.length > 1) - return true - - for (var j = 0; j < set[0].length; j++) { - if (typeof set[0][j] !== 'string') - return true - } - - return false -} - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - - if (options && options.sync) { - if (cb) - throw new TypeError('callback provided to sync glob') - return new GlobSync(pattern, options) - } - - if (!(this instanceof Glob)) - return new Glob(pattern, options, cb) - - setopts(this, pattern, options) - this._didRealPath = false - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - if (typeof cb === 'function') { - cb = once(cb) - this.on('error', cb) - this.on('end', function (matches) { - cb(null, matches) - }) - } - - var self = this - var n = this.minimatch.set.length - this._processing = 0 - this.matches = new Array(n) - - this._emitQueue = [] - this._processQueue = [] - this.paused = false - - if (this.noprocess) - return this - - if (n === 0) - return done() - - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false, done) - } - - function done () { - --self._processing - if (self._processing <= 0) - self._finish() - } -} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - if (this.aborted) - return - - if (this.realpath && !this._didRealpath) - return this._realpath() - - common.finish(this) - this.emit('end', this.found) -} - -Glob.prototype._realpath = function () { - if (this._didRealpath) - return - - this._didRealpath = true - - var n = this.matches.length - if (n === 0) - return this._finish() - - var self = this - for (var i = 0; i < this.matches.length; i++) - this._realpathSet(i, next) - - function next () { - if (--n === 0) - self._finish() - } -} - -Glob.prototype._realpathSet = function (index, cb) { - var matchset = this.matches[index] - if (!matchset) - return cb() - - var found = Object.keys(matchset) - var self = this - var n = found.length - - if (n === 0) - return cb() - - var set = this.matches[index] = Object.create(null) - found.forEach(function (p, i) { - // If there's a problem with the stat, then it means that - // one or more of the links in the realpath couldn't be - // resolved. just return the abs value in that case. - p = self._makeAbs(p) - fs.realpath(p, self.realpathCache, function (er, real) { - if (!er) - set[real] = true - else if (er.syscall === 'stat') - set[p] = true - else - self.emit('error', er) // srsly wtf right here - - if (--n === 0) { - self.matches[index] = set - cb() - } - }) - }) -} - -Glob.prototype._mark = function (p) { - return common.mark(this, p) -} - -Glob.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit('abort') -} - -Glob.prototype.pause = function () { - if (!this.paused) { - this.paused = true - this.emit('pause') - } -} - -Glob.prototype.resume = function () { - if (this.paused) { - this.emit('resume') - this.paused = false - if (this._emitQueue.length) { - var eq = this._emitQueue.slice(0) - this._emitQueue.length = 0 - for (var i = 0; i < eq.length; i ++) { - var e = eq[i] - this._emitMatch(e[0], e[1]) - } - } - if (this._processQueue.length) { - var pq = this._processQueue.slice(0) - this._processQueue.length = 0 - for (var i = 0; i < pq.length; i ++) { - var p = pq[i] - this._processing-- - this._process(p[0], p[1], p[2], p[3]) - } - } - } -} - -Glob.prototype._process = function (pattern, index, inGlobStar, cb) { - assert(this instanceof Glob) - assert(typeof cb === 'function') - - if (this.aborted) - return - - this._processing++ - if (this.paused) { - this._processQueue.push([pattern, index, inGlobStar, cb]) - return - } - - //console.error('PROCESS %d', this._processing, pattern) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index, cb) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip _processing - if (childrenIgnored(this, read)) - return cb() - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb) -} - -Glob.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - return self._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - -Glob.prototype._processReaddir2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return cb() - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - //console.error('prd2', prefix, entries, remain[0]._glob, matchedEntries) - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return cb() - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this._emitMatch(index, e) - } - // This was the last one, and no stats were needed - return cb() - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) { - if (prefix !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - this._process([e].concat(remain), index, inGlobStar, cb) - } - cb() -} - -Glob.prototype._emitMatch = function (index, e) { - if (this.aborted) - return - - if (this.matches[index][e]) - return - - if (isIgnored(this, e)) - return - - if (this.paused) { - this._emitQueue.push([index, e]) - return - } - - var abs = this._makeAbs(e) - - if (this.nodir) { - var c = this.cache[abs] - if (c === 'DIR' || Array.isArray(c)) - return - } - - if (this.mark) - e = this._mark(e) - - this.matches[index][e] = true - - var st = this.statCache[abs] - if (st) - this.emit('stat', e, st) - - this.emit('match', e) -} - -Glob.prototype._readdirInGlobStar = function (abs, cb) { - if (this.aborted) - return - - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false, cb) - - var lstatkey = 'lstat\0' + abs - var self = this - var lstatcb = inflight(lstatkey, lstatcb_) - - if (lstatcb) - fs.lstat(abs, lstatcb) - - function lstatcb_ (er, lstat) { - if (er) - return cb() - - var isSym = lstat.isSymbolicLink() - self.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) { - self.cache[abs] = 'FILE' - cb() - } else - self._readdir(abs, false, cb) - } -} - -Glob.prototype._readdir = function (abs, inGlobStar, cb) { - if (this.aborted) - return - - cb = inflight('readdir\0'+abs+'\0'+inGlobStar, cb) - if (!cb) - return - - //console.error('RD %j %j', +inGlobStar, abs) - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs, cb) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return cb() - - if (Array.isArray(c)) - return cb(null, c) - } - - var self = this - fs.readdir(abs, readdirCb(this, abs, cb)) -} - -function readdirCb (self, abs, cb) { - return function (er, entries) { - if (er) - self._readdirError(abs, er, cb) - else - self._readdirEntries(abs, entries, cb) - } -} - -Glob.prototype._readdirEntries = function (abs, entries, cb) { - if (this.aborted) - return - - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - return cb(null, entries) -} - -Glob.prototype._readdirError = function (f, er, cb) { - if (this.aborted) - return - - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) { - this.emit('error', er) - // If the error is handled, then we abort - // if not, we threw out of here - this.abort() - } - if (!this.silent) - console.error('glob error', er) - break - } - - return cb() -} - -Glob.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar, cb) { - var self = this - this._readdir(abs, inGlobStar, function (er, entries) { - self._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb) - }) -} - - -Glob.prototype._processGlobStar2 = function (prefix, read, abs, remain, index, inGlobStar, entries, cb) { - //console.error('pgs2', prefix, remain[0], entries) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return cb() - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false, cb) - - var isSym = this.symlinks[abs] - var len = entries.length - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return cb() - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true, cb) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true, cb) - } - - cb() -} - -Glob.prototype._processSimple = function (prefix, index, cb) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var self = this - this._stat(prefix, function (er, exists) { - self._processSimple2(prefix, index, er, exists, cb) - }) -} -Glob.prototype._processSimple2 = function (prefix, index, er, exists, cb) { - - //console.error('ps2', prefix, exists) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return cb() - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this._emitMatch(index, prefix) - cb() -} - -// Returns either 'DIR', 'FILE', or false -Glob.prototype._stat = function (f, cb) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return cb() - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return cb(null, c) - - if (needDir && c === 'FILE') - return cb() - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (stat !== undefined) { - if (stat === false) - return cb(null, stat) - else { - var type = stat.isDirectory() ? 'DIR' : 'FILE' - if (needDir && type === 'FILE') - return cb() - else - return cb(null, type, stat) - } - } - - var self = this - var statcb = inflight('stat\0' + abs, lstatcb_) - if (statcb) - fs.lstat(abs, statcb) - - function lstatcb_ (er, lstat) { - if (lstat && lstat.isSymbolicLink()) { - // If it's a symlink, then treat it as the target, unless - // the target does not exist, then treat it as a file. - return fs.stat(abs, function (er, stat) { - if (er) - self._stat2(f, abs, null, lstat, cb) - else - self._stat2(f, abs, er, stat, cb) - }) - } else { - self._stat2(f, abs, er, lstat, cb) - } - } -} - -Glob.prototype._stat2 = function (f, abs, er, stat, cb) { - if (er) { - this.statCache[abs] = false - return cb() - } - - var needDir = f.slice(-1) === '/' - this.statCache[abs] = stat - - if (abs.slice(-1) === '/' && !stat.isDirectory()) - return cb(null, false, stat) - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return cb() - - return cb(null, c, stat) -} diff --git a/node_modules/cordova-android/node_modules/glob/package.json b/node_modules/cordova-android/node_modules/glob/package.json deleted file mode 100644 index 4f1aac1..0000000 --- a/node_modules/cordova-android/node_modules/glob/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "glob@^5.0.13", - "_id": "glob@5.0.15", - "_inBundle": true, - "_integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "_location": "/cordova-android/glob", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "glob@^5.0.13", - "name": "glob", - "escapedName": "glob", - "rawSpec": "^5.0.13", - "saveSpec": null, - "fetchSpec": "^5.0.13" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "_shasum": "1bc936b9e02f4a603fcc222ecf7633d30b8b93b1", - "_spec": "glob@^5.0.13", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "bundleDependencies": false, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "deprecated": false, - "description": "a little globber", - "devDependencies": { - "mkdirp": "0", - "rimraf": "^2.2.8", - "tap": "^1.1.4", - "tick": "0.0.6" - }, - "engines": { - "node": "*" - }, - "files": [ - "glob.js", - "sync.js", - "common.js" - ], - "homepage": "https://github.com/isaacs/node-glob#readme", - "license": "ISC", - "main": "glob.js", - "name": "glob", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "scripts": { - "bench": "bash benchmark.sh", - "benchclean": "node benchclean.js", - "prepublish": "npm run benchclean", - "prof": "bash prof.sh && cat profile.txt", - "profclean": "rm -f v8.log profile.txt", - "test": "tap test/*.js --cov", - "test-regen": "npm run profclean && TEST_REGEN=1 node test/00-setup.js" - }, - "version": "5.0.15" -} diff --git a/node_modules/cordova-android/node_modules/glob/sync.js b/node_modules/cordova-android/node_modules/glob/sync.js deleted file mode 100644 index 09883d2..0000000 --- a/node_modules/cordova-android/node_modules/glob/sync.js +++ /dev/null @@ -1,460 +0,0 @@ -module.exports = globSync -globSync.GlobSync = GlobSync - -var fs = require('fs') -var minimatch = require('minimatch') -var Minimatch = minimatch.Minimatch -var Glob = require('./glob.js').Glob -var util = require('util') -var path = require('path') -var assert = require('assert') -var isAbsolute = require('path-is-absolute') -var common = require('./common.js') -var alphasort = common.alphasort -var alphasorti = common.alphasorti -var setopts = common.setopts -var ownProp = common.ownProp -var childrenIgnored = common.childrenIgnored - -function globSync (pattern, options) { - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - return new GlobSync(pattern, options).found -} - -function GlobSync (pattern, options) { - if (!pattern) - throw new Error('must provide pattern') - - if (typeof options === 'function' || arguments.length === 3) - throw new TypeError('callback provided to sync glob\n'+ - 'See: https://github.com/isaacs/node-glob/issues/167') - - if (!(this instanceof GlobSync)) - return new GlobSync(pattern, options) - - setopts(this, pattern, options) - - if (this.noprocess) - return this - - var n = this.minimatch.set.length - this.matches = new Array(n) - for (var i = 0; i < n; i ++) { - this._process(this.minimatch.set[i], i, false) - } - this._finish() -} - -GlobSync.prototype._finish = function () { - assert(this instanceof GlobSync) - if (this.realpath) { - var self = this - this.matches.forEach(function (matchset, index) { - var set = self.matches[index] = Object.create(null) - for (var p in matchset) { - try { - p = self._makeAbs(p) - var real = fs.realpathSync(p, self.realpathCache) - set[real] = true - } catch (er) { - if (er.syscall === 'stat') - set[self._makeAbs(p)] = true - else - throw er - } - } - }) - } - common.finish(this) -} - - -GlobSync.prototype._process = function (pattern, index, inGlobStar) { - assert(this instanceof GlobSync) - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === 'string') { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // See if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - this._processSimple(pattern.join('/'), index) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's 'absolute' like /foo/bar, - // or 'relative' like '../baz' - prefix = pattern.slice(0, n).join('/') - break - } - - var remain = pattern.slice(n) - - // get the list of entries. - var read - if (prefix === null) - read = '.' - else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) { - if (!prefix || !isAbsolute(prefix)) - prefix = '/' + prefix - read = prefix - } else - read = prefix - - var abs = this._makeAbs(read) - - //if ignored, skip processing - if (childrenIgnored(this, read)) - return - - var isGlobStar = remain[0] === minimatch.GLOBSTAR - if (isGlobStar) - this._processGlobStar(prefix, read, abs, remain, index, inGlobStar) - else - this._processReaddir(prefix, read, abs, remain, index, inGlobStar) -} - - -GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index, inGlobStar) { - var entries = this._readdir(abs, inGlobStar) - - // if the abs isn't a dir, then nothing can match! - if (!entries) - return - - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = remain[0] - var negate = !!this.minimatch.negate - var rawGlob = pn._glob - var dotOk = this.dot || rawGlob.charAt(0) === '.' - - var matchedEntries = [] - for (var i = 0; i < entries.length; i++) { - var e = entries[i] - if (e.charAt(0) !== '.' || dotOk) { - var m - if (negate && !prefix) { - m = !e.match(pn) - } else { - m = e.match(pn) - } - if (m) - matchedEntries.push(e) - } - } - - var len = matchedEntries.length - // If there are no matched entries, then nothing matches. - if (len === 0) - return - - // if this is the last remaining pattern bit, then no need for - // an additional stat *unless* the user has specified mark or - // stat explicitly. We know they exist, since readdir returned - // them. - - if (remain.length === 1 && !this.mark && !this.stat) { - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - if (prefix) { - if (prefix.slice(-1) !== '/') - e = prefix + '/' + e - else - e = prefix + e - } - - if (e.charAt(0) === '/' && !this.nomount) { - e = path.join(this.root, e) - } - this.matches[index][e] = true - } - // This was the last one, and no stats were needed - return - } - - // now test all matched entries as stand-ins for that part - // of the pattern. - remain.shift() - for (var i = 0; i < len; i ++) { - var e = matchedEntries[i] - var newPattern - if (prefix) - newPattern = [prefix, e] - else - newPattern = [e] - this._process(newPattern.concat(remain), index, inGlobStar) - } -} - - -GlobSync.prototype._emitMatch = function (index, e) { - var abs = this._makeAbs(e) - if (this.mark) - e = this._mark(e) - - if (this.matches[index][e]) - return - - if (this.nodir) { - var c = this.cache[this._makeAbs(e)] - if (c === 'DIR' || Array.isArray(c)) - return - } - - this.matches[index][e] = true - if (this.stat) - this._stat(e) -} - - -GlobSync.prototype._readdirInGlobStar = function (abs) { - // follow all symlinked directories forever - // just proceed as if this is a non-globstar situation - if (this.follow) - return this._readdir(abs, false) - - var entries - var lstat - var stat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - // lstat failed, doesn't exist - return null - } - - var isSym = lstat.isSymbolicLink() - this.symlinks[abs] = isSym - - // If it's not a symlink or a dir, then it's definitely a regular file. - // don't bother doing a readdir in that case. - if (!isSym && !lstat.isDirectory()) - this.cache[abs] = 'FILE' - else - entries = this._readdir(abs, false) - - return entries -} - -GlobSync.prototype._readdir = function (abs, inGlobStar) { - var entries - - if (inGlobStar && !ownProp(this.symlinks, abs)) - return this._readdirInGlobStar(abs) - - if (ownProp(this.cache, abs)) { - var c = this.cache[abs] - if (!c || c === 'FILE') - return null - - if (Array.isArray(c)) - return c - } - - try { - return this._readdirEntries(abs, fs.readdirSync(abs)) - } catch (er) { - this._readdirError(abs, er) - return null - } -} - -GlobSync.prototype._readdirEntries = function (abs, entries) { - // if we haven't asked to stat everything, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. - if (!this.mark && !this.stat) { - for (var i = 0; i < entries.length; i ++) { - var e = entries[i] - if (abs === '/') - e = abs + e - else - e = abs + '/' + e - this.cache[e] = true - } - } - - this.cache[abs] = entries - - // mark and cache dir-ness - return entries -} - -GlobSync.prototype._readdirError = function (f, er) { - // handle errors, and cache the information - switch (er.code) { - case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205 - case 'ENOTDIR': // totally normal. means it *does* exist. - this.cache[this._makeAbs(f)] = 'FILE' - break - - case 'ENOENT': // not terribly unusual - case 'ELOOP': - case 'ENAMETOOLONG': - case 'UNKNOWN': - this.cache[this._makeAbs(f)] = false - break - - default: // some unusual error. Treat as failure. - this.cache[this._makeAbs(f)] = false - if (this.strict) - throw er - if (!this.silent) - console.error('glob error', er) - break - } -} - -GlobSync.prototype._processGlobStar = function (prefix, read, abs, remain, index, inGlobStar) { - - var entries = this._readdir(abs, inGlobStar) - - // no entries means not a dir, so it can never have matches - // foo.txt/** doesn't match foo.txt - if (!entries) - return - - // test without the globstar, and with every child both below - // and replacing the globstar. - var remainWithoutGlobStar = remain.slice(1) - var gspref = prefix ? [ prefix ] : [] - var noGlobStar = gspref.concat(remainWithoutGlobStar) - - // the noGlobStar pattern exits the inGlobStar state - this._process(noGlobStar, index, false) - - var len = entries.length - var isSym = this.symlinks[abs] - - // If it's a symlink, and we're in a globstar, then stop - if (isSym && inGlobStar) - return - - for (var i = 0; i < len; i++) { - var e = entries[i] - if (e.charAt(0) === '.' && !this.dot) - continue - - // these two cases enter the inGlobStar state - var instead = gspref.concat(entries[i], remainWithoutGlobStar) - this._process(instead, index, true) - - var below = gspref.concat(entries[i], remain) - this._process(below, index, true) - } -} - -GlobSync.prototype._processSimple = function (prefix, index) { - // XXX review this. Shouldn't it be doing the mounting etc - // before doing stat? kinda weird? - var exists = this._stat(prefix) - - if (!this.matches[index]) - this.matches[index] = Object.create(null) - - // If it doesn't exist, then just mark the lack of results - if (!exists) - return - - if (prefix && isAbsolute(prefix) && !this.nomount) { - var trail = /[\/\\]$/.test(prefix) - if (prefix.charAt(0) === '/') { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - if (trail) - prefix += '/' - } - } - - if (process.platform === 'win32') - prefix = prefix.replace(/\\/g, '/') - - // Mark this as a match - this.matches[index][prefix] = true -} - -// Returns either 'DIR', 'FILE', or false -GlobSync.prototype._stat = function (f) { - var abs = this._makeAbs(f) - var needDir = f.slice(-1) === '/' - - if (f.length > this.maxLength) - return false - - if (!this.stat && ownProp(this.cache, abs)) { - var c = this.cache[abs] - - if (Array.isArray(c)) - c = 'DIR' - - // It exists, but maybe not how we need it - if (!needDir || c === 'DIR') - return c - - if (needDir && c === 'FILE') - return false - - // otherwise we have to stat, because maybe c=true - // if we know it exists, but not what it is. - } - - var exists - var stat = this.statCache[abs] - if (!stat) { - var lstat - try { - lstat = fs.lstatSync(abs) - } catch (er) { - return false - } - - if (lstat.isSymbolicLink()) { - try { - stat = fs.statSync(abs) - } catch (er) { - stat = lstat - } - } else { - stat = lstat - } - } - - this.statCache[abs] = stat - - var c = stat.isDirectory() ? 'DIR' : 'FILE' - this.cache[abs] = this.cache[abs] || c - - if (needDir && c !== 'DIR') - return false - - return c -} - -GlobSync.prototype._mark = function (p) { - return common.mark(this, p) -} - -GlobSync.prototype._makeAbs = function (f) { - return common.makeAbs(this, f) -} diff --git a/node_modules/cordova-android/node_modules/inflight/LICENSE b/node_modules/cordova-android/node_modules/inflight/LICENSE deleted file mode 100644 index 05eeeb8..0000000 --- a/node_modules/cordova-android/node_modules/inflight/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/inflight/README.md b/node_modules/cordova-android/node_modules/inflight/README.md deleted file mode 100644 index 6dc8929..0000000 --- a/node_modules/cordova-android/node_modules/inflight/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# inflight - -Add callbacks to requests in flight to avoid async duplication - -## USAGE - -```javascript -var inflight = require('inflight') - -// some request that does some stuff -function req(key, callback) { - // key is any random string. like a url or filename or whatever. - // - // will return either a falsey value, indicating that the - // request for this key is already in flight, or a new callback - // which when called will call all callbacks passed to inflightk - // with the same key - callback = inflight(key, callback) - - // If we got a falsey value back, then there's already a req going - if (!callback) return - - // this is where you'd fetch the url or whatever - // callback is also once()-ified, so it can safely be assigned - // to multiple events etc. First call wins. - setTimeout(function() { - callback(null, key) - }, 100) -} - -// only assigns a single setTimeout -// when it dings, all cbs get called -req('foo', cb1) -req('foo', cb2) -req('foo', cb3) -req('foo', cb4) -``` diff --git a/node_modules/cordova-android/node_modules/inflight/inflight.js b/node_modules/cordova-android/node_modules/inflight/inflight.js deleted file mode 100644 index 48202b3..0000000 --- a/node_modules/cordova-android/node_modules/inflight/inflight.js +++ /dev/null @@ -1,54 +0,0 @@ -var wrappy = require('wrappy') -var reqs = Object.create(null) -var once = require('once') - -module.exports = wrappy(inflight) - -function inflight (key, cb) { - if (reqs[key]) { - reqs[key].push(cb) - return null - } else { - reqs[key] = [cb] - return makeres(key) - } -} - -function makeres (key) { - return once(function RES () { - var cbs = reqs[key] - var len = cbs.length - var args = slice(arguments) - - // XXX It's somewhat ambiguous whether a new callback added in this - // pass should be queued for later execution if something in the - // list of callbacks throws, or if it should just be discarded. - // However, it's such an edge case that it hardly matters, and either - // choice is likely as surprising as the other. - // As it happens, we do go ahead and schedule it for later execution. - try { - for (var i = 0; i < len; i++) { - cbs[i].apply(null, args) - } - } finally { - if (cbs.length > len) { - // added more in the interim. - // de-zalgo, just in case, but don't call again. - cbs.splice(0, len) - process.nextTick(function () { - RES.apply(null, args) - }) - } else { - delete reqs[key] - } - } - }) -} - -function slice (args) { - var length = args.length - var array = [] - - for (var i = 0; i < length; i++) array[i] = args[i] - return array -} diff --git a/node_modules/cordova-android/node_modules/inflight/package.json b/node_modules/cordova-android/node_modules/inflight/package.json deleted file mode 100644 index 6fb0823..0000000 --- a/node_modules/cordova-android/node_modules/inflight/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "_from": "inflight@^1.0.4", - "_id": "inflight@1.0.6", - "_inBundle": true, - "_integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "_location": "/cordova-android/inflight", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "inflight@^1.0.4", - "name": "inflight", - "escapedName": "inflight", - "rawSpec": "^1.0.4", - "saveSpec": null, - "fetchSpec": "^1.0.4" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/glob" - ], - "_resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "_shasum": "49bd6331d7d02d0c09bc910a1075ba8165b56df9", - "_spec": "inflight@^1.0.4", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/inflight/issues" - }, - "bundleDependencies": false, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - }, - "deprecated": false, - "description": "Add callbacks to requests in flight to avoid async duplication", - "devDependencies": { - "tap": "^7.1.2" - }, - "files": [ - "inflight.js" - ], - "homepage": "https://github.com/isaacs/inflight", - "license": "ISC", - "main": "inflight.js", - "name": "inflight", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/inflight.git" - }, - "scripts": { - "test": "tap test.js --100" - }, - "version": "1.0.6" -} diff --git a/node_modules/cordova-android/node_modules/inherits/LICENSE b/node_modules/cordova-android/node_modules/inherits/LICENSE deleted file mode 100644 index dea3013..0000000 --- a/node_modules/cordova-android/node_modules/inherits/LICENSE +++ /dev/null @@ -1,16 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - diff --git a/node_modules/cordova-android/node_modules/inherits/README.md b/node_modules/cordova-android/node_modules/inherits/README.md deleted file mode 100644 index b1c5665..0000000 --- a/node_modules/cordova-android/node_modules/inherits/README.md +++ /dev/null @@ -1,42 +0,0 @@ -Browser-friendly inheritance fully compatible with standard node.js -[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). - -This package exports standard `inherits` from node.js `util` module in -node environment, but also provides alternative browser-friendly -implementation through [browser -field](https://gist.github.com/shtylman/4339901). Alternative -implementation is a literal copy of standard one located in standalone -module to avoid requiring of `util`. It also has a shim for old -browsers with no `Object.create` support. - -While keeping you sure you are using standard `inherits` -implementation in node.js environment, it allows bundlers such as -[browserify](https://github.com/substack/node-browserify) to not -include full `util` package to your client code if all you need is -just `inherits` function. It worth, because browser shim for `util` -package is large and `inherits` is often the single function you need -from it. - -It's recommended to use this package instead of -`require('util').inherits` for any code that has chances to be used -not only in node.js but in browser too. - -## usage - -```js -var inherits = require('inherits'); -// then use exactly as the standard one -``` - -## note on version ~1.0 - -Version ~1.0 had completely different motivation and is not compatible -neither with 2.0 nor with standard node.js `inherits`. - -If you are using version ~1.0 and planning to switch to ~2.0, be -careful: - -* new version uses `super_` instead of `super` for referencing - superclass -* new version overwrites current prototype while old one preserves any - existing fields on it diff --git a/node_modules/cordova-android/node_modules/inherits/inherits.js b/node_modules/cordova-android/node_modules/inherits/inherits.js deleted file mode 100644 index 3b94763..0000000 --- a/node_modules/cordova-android/node_modules/inherits/inherits.js +++ /dev/null @@ -1,7 +0,0 @@ -try { - var util = require('util'); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = require('./inherits_browser.js'); -} diff --git a/node_modules/cordova-android/node_modules/inherits/inherits_browser.js b/node_modules/cordova-android/node_modules/inherits/inherits_browser.js deleted file mode 100644 index c1e78a7..0000000 --- a/node_modules/cordova-android/node_modules/inherits/inherits_browser.js +++ /dev/null @@ -1,23 +0,0 @@ -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 - } -} diff --git a/node_modules/cordova-android/node_modules/inherits/package.json b/node_modules/cordova-android/node_modules/inherits/package.json deleted file mode 100644 index 41a09ac..0000000 --- a/node_modules/cordova-android/node_modules/inherits/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "_from": "inherits@2", - "_id": "inherits@2.0.3", - "_inBundle": true, - "_integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "_location": "/cordova-android/inherits", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "inherits@2", - "name": "inherits", - "escapedName": "inherits", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/glob" - ], - "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "_shasum": "633c2c83e3da42a502f52466022480f4208261de", - "_spec": "inherits@2", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/glob", - "browser": "./inherits_browser.js", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", - "devDependencies": { - "tap": "^7.1.0" - }, - "files": [ - "inherits.js", - "inherits_browser.js" - ], - "homepage": "https://github.com/isaacs/inherits#readme", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented", - "inherits", - "browser", - "browserify" - ], - "license": "ISC", - "main": "./inherits.js", - "name": "inherits", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/inherits.git" - }, - "scripts": { - "test": "node test" - }, - "version": "2.0.3" -} diff --git a/node_modules/cordova-android/node_modules/minimatch/LICENSE b/node_modules/cordova-android/node_modules/minimatch/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/cordova-android/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/minimatch/README.md b/node_modules/cordova-android/node_modules/minimatch/README.md deleted file mode 100644 index ad72b81..0000000 --- a/node_modules/cordova-android/node_modules/minimatch/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.svg)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -minimatch("bar.foo", "*.+(bar|foo)", { debug: true }) // true, and noisy! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -## Minimatch Class - -Create a minimatch object by instantiating the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself if this option is set. When not set, an empty list -is returned if there are no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) - - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. diff --git a/node_modules/cordova-android/node_modules/minimatch/minimatch.js b/node_modules/cordova-android/node_modules/minimatch/minimatch.js deleted file mode 100644 index 5b5f8cf..0000000 --- a/node_modules/cordova-android/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,923 +0,0 @@ -module.exports = minimatch -minimatch.Minimatch = Minimatch - -var path = { sep: '/' } -try { - path = require('path') -} catch (er) {} - -var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} -var expand = require('brace-expansion') - -var plTypes = { - '!': { open: '(?:(?!(?:', close: '))[^/]*?)'}, - '?': { open: '(?:', close: ')?' }, - '+': { open: '(?:', close: ')+' }, - '*': { open: '(?:', close: ')*' }, - '@': { open: '(?:', close: ')' } -} - -// any single thing other than / -// don't need to escape / when using new RegExp() -var qmark = '[^/]' - -// * => any number of characters -var star = qmark + '*?' - -// ** when dots are allowed. Anything goes, except .. and . -// not (^ or / followed by one or two dots followed by $ or /), -// followed by anything, any number of times. -var twoStarDot = '(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?' - -// not a ^ or / followed by a dot, -// followed by anything, any number of times. -var twoStarNoDot = '(?:(?!(?:\\\/|^)\\.).)*?' - -// characters that need to be escaped in RegExp. -var reSpecials = charSet('().*{}+?[]^$\\!') - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split('').reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - -function minimatch (p, pattern, options) { - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - return false - } - - // "" only matches "" - if (pattern.trim() === '') return p === '' - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options) - } - - if (typeof pattern !== 'string') { - throw new TypeError('glob pattern string required') - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows support: need to use /, not \ - if (path.sep !== '/') { - pattern = pattern.split(path.sep).join('/') - } - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.debug = function () {} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === '#') { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) this.debug = console.error - - this.debug(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - this.debug(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - this.debug(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return s.indexOf(false) === -1 - }) - - this.debug(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - var negate = false - var options = this.options - var negateOffset = 0 - - if (options.nonegate) return - - for (var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === '!' - ; i++) { - negate = !negate - negateOffset++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return braceExpand(pattern, options) -} - -Minimatch.prototype.braceExpand = braceExpand - -function braceExpand (pattern, options) { - if (!options) { - if (this instanceof Minimatch) { - options = this.options - } else { - options = {} - } - } - - pattern = typeof pattern === 'undefined' - ? this.pattern : pattern - - if (typeof pattern === 'undefined') { - throw new TypeError('undefined pattern') - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - return expand(pattern) -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - if (pattern.length > 1024 * 64) { - throw new TypeError('pattern is too long') - } - - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === '**') return GLOBSTAR - if (pattern === '') return '' - - var re = '' - var hasMagic = !!options.nocase - var escaping = false - // ? => one single character - var patternListStack = [] - var negativeLists = [] - var stateChar - var inClass = false - var reClassStart = -1 - var classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - var patternStart = pattern.charAt(0) === '.' ? '' // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? '(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))' - : '(?!\\.)' - var self = this - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case '*': - re += star - hasMagic = true - break - case '?': - re += qmark - hasMagic = true - break - default: - re += '\\' + stateChar - break - } - self.debug('clearStateChar %j %j', stateChar, re) - stateChar = false - } - } - - for (var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i++) { - this.debug('%s\t%s %s %j', pattern, i, re, c) - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += '\\' + c - escaping = false - continue - } - - switch (c) { - case '/': - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case '\\': - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case '?': - case '*': - case '+': - case '@': - case '!': - this.debug('%s\t%s %s %j <-- stateChar', pattern, i, re, c) - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - this.debug(' in class') - if (c === '!' && i === classStart + 1) c = '^' - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - self.debug('call clearStateChar %j', stateChar) - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case '(': - if (inClass) { - re += '(' - continue - } - - if (!stateChar) { - re += '\\(' - continue - } - - patternListStack.push({ - type: stateChar, - start: i - 1, - reStart: re.length, - open: plTypes[stateChar].open, - close: plTypes[stateChar].close - }) - // negation is (?:(?!js)[^/]*) - re += stateChar === '!' ? '(?:(?!(?:' : '(?:' - this.debug('plType %j %j', stateChar, re) - stateChar = false - continue - - case ')': - if (inClass || !patternListStack.length) { - re += '\\)' - continue - } - - clearStateChar() - hasMagic = true - var pl = patternListStack.pop() - // negation is (?:(?!js)[^/]*) - // The others are (?:) - re += pl.close - if (pl.type === '!') { - negativeLists.push(pl) - } - pl.reEnd = re.length - continue - - case '|': - if (inClass || !patternListStack.length || escaping) { - re += '\\|' - escaping = false - continue - } - - clearStateChar() - re += '|' - continue - - // these are mostly the same in regexp and glob - case '[': - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += '\\' + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case ']': - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += '\\' + c - escaping = false - continue - } - - // handle the case where we left a class open. - // "[z-a]" is valid, equivalent to "\[z-a\]" - if (inClass) { - // split where the last [ was, make sure we don't have - // an invalid re. if so, re-walk the contents of the - // would-be class to re-translate any characters that - // were passed through as-is - // TODO: It would probably be faster to determine this - // without a try/catch and a new RegExp, but it's tricky - // to do safely. For now, this is safe and works. - var cs = pattern.substring(classStart + 1, i) - try { - RegExp('[' + cs + ']') - } catch (er) { - // not a valid class! - var sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] + '\\]' - hasMagic = hasMagic || sp[1] - inClass = false - continue - } - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === '^' && inClass)) { - re += '\\' - } - - re += c - - } // switch - } // for - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - cs = pattern.substr(classStart + 1) - sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + '\\[' + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + pl.open.length) - this.debug('setting tail', re, pl) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = '\\' - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + '|' - }) - - this.debug('tail=%j\n %s', tail, tail, pl, re) - var t = pl.type === '*' ? star - : pl.type === '?' ? qmark - : '\\' + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) + t + '\\(' + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += '\\\\' - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case '.': - case '[': - case '(': addPatternStart = true - } - - // Hack to work around lack of negative lookbehind in JS - // A pattern like: *.!(x).!(y|z) needs to ensure that a name - // like 'a.xyz.yz' doesn't match. So, the first negative - // lookahead, has to look ALL the way ahead, to the end of - // the pattern. - for (var n = negativeLists.length - 1; n > -1; n--) { - var nl = negativeLists[n] - - var nlBefore = re.slice(0, nl.reStart) - var nlFirst = re.slice(nl.reStart, nl.reEnd - 8) - var nlLast = re.slice(nl.reEnd - 8, nl.reEnd) - var nlAfter = re.slice(nl.reEnd) - - nlLast += nlAfter - - // Handle nested stuff like *(*.js|!(*.json)), where open parens - // mean that we should *not* include the ) in the bit that is considered - // "after" the negated section. - var openParensBefore = nlBefore.split('(').length - 1 - var cleanAfter = nlAfter - for (i = 0; i < openParensBefore; i++) { - cleanAfter = cleanAfter.replace(/\)[+*?]?/, '') - } - nlAfter = cleanAfter - - var dollar = '' - if (nlAfter === '' && isSub !== SUBPARSE) { - dollar = '$' - } - var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast - re = newRe - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== '' && hasMagic) { - re = '(?=.)' + re - } - - if (addPatternStart) { - re = patternStart + re - } - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [re, hasMagic] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? 'i' : '' - try { - var regExp = new RegExp('^' + re + '$', flags) - } catch (er) { - // If it was an invalid regular expression, then it can't match - // anything. This trick looks for a character after the end of - // the string, which is of course impossible, except in multi-line - // mode, but it's not a /m regex. - return new RegExp('$.') - } - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) { - this.regexp = false - return this.regexp - } - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - var flags = options.nocase ? 'i' : '' - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === 'string') ? regExpEscape(p) - : p._src - }).join('\\\/') - }).join('|') - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = '^(?:' + re + ')$' - - // can match anything, as long as it's not this. - if (this.negate) re = '^(?!' + re + ').*$' - - try { - this.regexp = new RegExp(re, flags) - } catch (ex) { - this.regexp = false - } - return this.regexp -} - -minimatch.match = function (list, pattern, options) { - options = options || {} - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (mm.options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - this.debug('match', f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === '' - - if (f === '/' && partial) return true - - var options = this.options - - // windows: need to use /, not \ - if (path.sep !== '/') { - f = f.split(path.sep).join('/') - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - this.debug(this.pattern, 'split', f) - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - this.debug(this.pattern, 'set', set) - - // Find the basename of the path by looking for the last non-empty segment - var filename - var i - for (i = f.length - 1; i >= 0; i--) { - filename = f[i] - if (filename) break - } - - for (i = 0; i < set.length; i++) { - var pattern = set[i] - var file = f - if (options.matchBase && pattern.length === 1) { - file = [filename] - } - var hit = this.matchOne(file, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - this.debug('matchOne', - { 'this': this, file: file, pattern: pattern }) - - this.debug('matchOne', file.length, pattern.length) - - for (var fi = 0, - pi = 0, - fl = file.length, - pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi++, pi++) { - this.debug('matchOne loop') - var p = pattern[pi] - var f = file[fi] - - this.debug(pattern, p, f) - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - this.debug('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - var pr = pi + 1 - if (pr === pl) { - this.debug('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for (; fi < fl; fi++) { - if (file[fi] === '.' || file[fi] === '..' || - (!options.dot && file[fi].charAt(0) === '.')) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - while (fr < fl) { - var swallowee = file[fr] - - this.debug('\nglobstar while', file, fr, pattern, pr, swallowee) - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - this.debug('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === '.' || swallowee === '..' || - (!options.dot && swallowee.charAt(0) === '.')) { - this.debug('dot detected!', file, fr, pattern, pr) - break - } - - // ** swallows a segment, and continue. - this.debug('globstar swallow a segment, and continue') - fr++ - } - } - - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - this.debug('\n>>> no match, partial?', file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === 'string') { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - this.debug('string match', p, f, hit) - } else { - hit = f.match(p) - this.debug('pattern match', p, f, hit) - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === '') - return emptyFileEnd - } - - // should be unreachable. - throw new Error('wtf?') -} - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, '$1') -} - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&') -} diff --git a/node_modules/cordova-android/node_modules/minimatch/package.json b/node_modules/cordova-android/node_modules/minimatch/package.json deleted file mode 100644 index 4706bb5..0000000 --- a/node_modules/cordova-android/node_modules/minimatch/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "minimatch@^3.0.0", - "_id": "minimatch@3.0.4", - "_inBundle": true, - "_integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "_location": "/cordova-android/minimatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "minimatch@^3.0.0", - "name": "minimatch", - "escapedName": "minimatch", - "rawSpec": "^3.0.0", - "saveSpec": null, - "fetchSpec": "^3.0.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common", - "/cordova-android/glob" - ], - "_resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "_shasum": "5166e286457f03306064be5497e8dbb0c3d32083", - "_spec": "minimatch@^3.0.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "deprecated": false, - "description": "a glob matcher in javascript", - "devDependencies": { - "tap": "^10.3.2" - }, - "engines": { - "node": "*" - }, - "files": [ - "minimatch.js" - ], - "homepage": "https://github.com/isaacs/minimatch#readme", - "license": "ISC", - "main": "minimatch.js", - "name": "minimatch", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "scripts": { - "postpublish": "git push origin --all; git push origin --tags", - "postversion": "npm publish", - "preversion": "npm test", - "test": "tap test/*.js --cov" - }, - "version": "3.0.4" -} diff --git a/node_modules/cordova-android/node_modules/nopt/.npmignore b/node_modules/cordova-android/node_modules/nopt/.npmignore deleted file mode 100644 index 3c3629e..0000000 --- a/node_modules/cordova-android/node_modules/nopt/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/cordova-android/node_modules/nopt/LICENSE b/node_modules/cordova-android/node_modules/nopt/LICENSE deleted file mode 100644 index 05a4010..0000000 --- a/node_modules/cordova-android/node_modules/nopt/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/nopt/README.md b/node_modules/cordova-android/node_modules/nopt/README.md deleted file mode 100644 index 5aba088..0000000 --- a/node_modules/cordova-android/node_modules/nopt/README.md +++ /dev/null @@ -1,209 +0,0 @@ -If you want to write an option parser, and have it be good, there are -two ways to do it. The Right Way, and the Wrong Way. - -The Wrong Way is to sit down and write an option parser. We've all done -that. - -The Right Way is to write some complex configurable program with so many -options that you go half-insane just trying to manage them all, and put -it off with duct-tape solutions until you see exactly to the core of the -problem, and finally snap and write an awesome option parser. - -If you want to write an option parser, don't write an option parser. -Write a package manager, or a source control system, or a service -restarter, or an operating system. You probably won't end up with a -good one of those, but if you don't give up, and you are relentless and -diligent enough in your procrastination, you may just end up with a very -nice option parser. - -## USAGE - - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many" : [String, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) - -This would give you support for any of the following: - -```bash -$ node my-program.js --foo "blerp" --no-flag -{ "foo" : "blerp", "flag" : false } - -$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag -{ bar: 7, foo: "Mr. Hand", flag: true } - -$ node my-program.js --foo "blerp" -f -----p -{ foo: "blerp", flag: true, pick: true } - -$ node my-program.js -fp --foofoo -{ foo: "Mr. Foo", flag: true, pick: true } - -$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. -{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } - -$ node my-program.js --blatzk -fp # unknown opts are ok. -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --blatzk=1000 -fp # but you need to use = if they have a value -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --no-blatzk -fp # unless they start with "no-" -{ blatzk: false, flag: true, pick: true } - -$ node my-program.js --baz b/a/z # known paths are resolved. -{ baz: "/Users/isaacs/b/a/z" } - -# if Array is one of the types, then it can take many -# values, and will always be an array. The other types provided -# specify what types are allowed in the list. - -$ node my-program.js --many 1 --many null --many foo -{ many: ["1", "null", "foo"] } - -$ node my-program.js --many foo -{ many: ["foo"] } -``` - -Read the tests at the bottom of `lib/nopt.js` for more examples of -what this puppy can do. - -## Types - -The following types are supported, and defined on `nopt.typeDefs` - -* String: A normal string. No parsing is done. -* path: A file system path. Gets resolved against cwd if not absolute. -* url: A url. If it doesn't parse, it isn't accepted. -* Number: Must be numeric. -* Date: Must parse as a date. If it does, and `Date` is one of the options, - then it will return a Date object, not a string. -* Boolean: Must be either `true` or `false`. If an option is a boolean, - then it does not need a value, and its presence will imply `true` as - the value. To negate boolean flags, do `--no-whatever` or `--whatever - false` -* NaN: Means that the option is strictly not allowed. Any value will - fail. -* Stream: An object matching the "Stream" class in node. Valuable - for use when validating programmatically. (npm uses this to let you - supply any WriteStream on the `outfd` and `logfd` config options.) -* Array: If `Array` is specified as one of the types, then the value - will be parsed as a list of options. This means that multiple values - can be specified, and that the value will always be an array. - -If a type is an array of values not on this list, then those are -considered valid values. For instance, in the example above, the -`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, -and any other value will be rejected. - -When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents. - -You can also mix types and values, or multiple types, in a list. For -instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. - -To define a new type, add it to `nopt.typeDefs`. Each item in that -hash is an object with a `type` member and a `validate` method. The -`type` member is an object that matches what goes in the type list. The -`validate` method is a function that gets called with `validate(data, -key, val)`. Validate methods should assign `data[key]` to the valid -value of `val` if it can be handled properly, or return boolean -`false` if it cannot. - -You can also call `nopt.clean(data, types, typeDefs)` to clean up a -config object and remove its invalid properties. - -## Error Handling - -By default, nopt outputs a warning to standard error when invalid -options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. - -## Abbreviations - -Yes, they are supported. If you define options like this: - -```javascript -{ "foolhardyelephants" : Boolean -, "pileofmonkeys" : Boolean } -``` - -Then this will work: - -```bash -node program.js --foolhar --pil -node program.js --no-f --pileofmon -# etc. -``` - -## Shorthands - -Shorthands are a hash of shorter option names to a snippet of args that -they expand to. - -If multiple one-character shorthands are all combined, and the -combination does not unambiguously match any other option or shorthand, -then they will be broken up into their constituent parts. For example: - -```json -{ "s" : ["--loglevel", "silent"] -, "g" : "--global" -, "f" : "--force" -, "p" : "--parseable" -, "l" : "--long" -} -``` - -```bash -npm ls -sgflp -# just like doing this: -npm ls --loglevel silent --global --force --long --parseable -``` - -## The Rest of the args - -The config object returned by nopt is given a special member called -`argv`, which is an object with the following fields: - -* `remain`: The remaining args after all the parsing has occurred. -* `original`: The args as they originally appeared. -* `cooked`: The args after flags and shorthands are expanded. - -## Slicing - -Node programs are called with more or less the exact argv as it appears -in C land, after the v8 and node-specific options have been plucked off. -As such, `argv[0]` is always `node` and `argv[1]` is always the -JavaScript program being run. - -That's usually not very useful to you. So they're sliced off by -default. If you want them, then you can pass in `0` as the last -argument, or any other number that you'd like to slice off the start of -the list. diff --git a/node_modules/cordova-android/node_modules/nopt/bin/nopt.js b/node_modules/cordova-android/node_modules/nopt/bin/nopt.js deleted file mode 100755 index 3232d4c..0000000 --- a/node_modules/cordova-android/node_modules/nopt/bin/nopt.js +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , path = require("path") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - , file: path - } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - , f: ["--file"] - } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/node_modules/cordova-android/node_modules/nopt/examples/my-program.js b/node_modules/cordova-android/node_modules/nopt/examples/my-program.js deleted file mode 100755 index 142447e..0000000 --- a/node_modules/cordova-android/node_modules/nopt/examples/my-program.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -//process.env.DEBUG_NOPT = 1 - -// my-program.js -var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - -console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/node_modules/cordova-android/node_modules/nopt/lib/nopt.js b/node_modules/cordova-android/node_modules/nopt/lib/nopt.js deleted file mode 100644 index 5309a00..0000000 --- a/node_modules/cordova-android/node_modules/nopt/lib/nopt.js +++ /dev/null @@ -1,414 +0,0 @@ -// info about each config option. - -var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG - ? function () { console.error.apply(console, arguments) } - : function () {} - -var url = require("url") - , path = require("path") - , Stream = require("stream").Stream - , abbrev = require("abbrev") - -module.exports = exports = nopt -exports.clean = clean - -exports.typeDefs = - { String : { type: String, validate: validateString } - , Boolean : { type: Boolean, validate: validateBoolean } - , url : { type: url, validate: validateUrl } - , Number : { type: Number, validate: validateNumber } - , path : { type: path, validate: validatePath } - , Stream : { type: Stream, validate: validateStream } - , Date : { type: Date, validate: validateDate } - } - -function nopt (types, shorthands, args, slice) { - args = args || process.argv - types = types || {} - shorthands = shorthands || {} - if (typeof slice !== "number") slice = 2 - - debug(types, shorthands, args, slice) - - args = args.slice(slice) - var data = {} - , key - , remain = [] - , cooked = args - , original = args.slice(0) - - parse(args, data, remain, types, shorthands) - // now data is full - clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} - Object.defineProperty(data.argv, 'toString', { value: function () { - return this.original.map(JSON.stringify).join(" ") - }, enumerable: false }) - return data -} - -function clean (data, types, typeDefs) { - typeDefs = typeDefs || exports.typeDefs - var remove = {} - , typeDefault = [false, true, null, String, Array] - - Object.keys(data).forEach(function (k) { - if (k === "argv") return - var val = data[k] - , isArray = Array.isArray(val) - , type = types[k] - if (!isArray) val = [val] - if (!type) type = typeDefault - if (type === Array) type = typeDefault.concat(Array) - if (!Array.isArray(type)) type = [type] - - debug("val=%j", val) - debug("types=", type) - val = val.map(function (val) { - // if it's an unknown value, then parse false/true/null/numbers/dates - if (typeof val === "string") { - debug("string %j", val) - val = val.trim() - if ((val === "null" && ~type.indexOf(null)) - || (val === "true" && - (~type.indexOf(true) || ~type.indexOf(Boolean))) - || (val === "false" && - (~type.indexOf(false) || ~type.indexOf(Boolean)))) { - val = JSON.parse(val) - debug("jsonable %j", val) - } else if (~type.indexOf(Number) && !isNaN(val)) { - debug("convert to number", val) - val = +val - } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { - debug("convert to date", val) - val = new Date(val) - } - } - - if (!types.hasOwnProperty(k)) { - return val - } - - // allow `--no-blah` to set 'blah' to null if null is allowed - if (val === false && ~type.indexOf(null) && - !(~type.indexOf(false) || ~type.indexOf(Boolean))) { - val = null - } - - var d = {} - d[k] = val - debug("prevalidated val", d, val, types[k]) - if (!validate(d, k, val, types[k], typeDefs)) { - if (exports.invalidHandler) { - exports.invalidHandler(k, val, types[k], data) - } else if (exports.invalidHandler !== false) { - debug("invalid: "+k+"="+val, types[k]) - } - return remove - } - debug("validated val", d, val, types[k]) - return d[k] - }).filter(function (val) { return val !== remove }) - - if (!val.length) delete data[k] - else if (isArray) { - debug(isArray, data[k], val) - data[k] = val - } else data[k] = val[0] - - debug("k=%s val=%j", k, val, data[k]) - }) -} - -function validateString (data, k, val) { - data[k] = String(val) -} - -function validatePath (data, k, val) { - if (val === true) return false - if (val === null) return true - - val = String(val) - var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// - if (val.match(homePattern) && process.env.HOME) { - val = path.resolve(process.env.HOME, val.substr(2)) - } - data[k] = path.resolve(String(val)) - return true -} - -function validateNumber (data, k, val) { - debug("validate Number %j %j %j", k, val, isNaN(val)) - if (isNaN(val)) return false - data[k] = +val -} - -function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) - var s = Date.parse(val) - if (isNaN(s)) return false - data[k] = new Date(val) -} - -function validateBoolean (data, k, val) { - if (val instanceof Boolean) val = val.valueOf() - else if (typeof val === "string") { - if (!isNaN(val)) val = !!(+val) - else if (val === "null" || val === "false") val = false - else val = true - } else val = !!val - data[k] = val -} - -function validateUrl (data, k, val) { - val = url.parse(String(val)) - if (!val.host) return false - data[k] = val.href -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -function validate (data, k, val, type, typeDefs) { - // arrays are lists of types. - if (Array.isArray(type)) { - for (var i = 0, l = type.length; i < l; i ++) { - if (type[i] === Array) continue - if (validate(data, k, val, type[i], typeDefs)) return true - } - delete data[k] - return false - } - - // an array of anything? - if (type === Array) return true - - // NaN is poisonous. Means that something is not allowed. - if (type !== type) { - debug("Poison NaN", k, val, type) - delete data[k] - return false - } - - // explicit list of values - if (val === type) { - debug("Explicitly allowed %j", val) - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - return true - } - - // now go through the list of typeDefs, validate against each one. - var ok = false - , types = Object.keys(typeDefs) - for (var i = 0, l = types.length; i < l; i ++) { - debug("test type %j %j %j", k, val, types[i]) - var t = typeDefs[types[i]] - if (t && type === t.type) { - var d = {} - ok = false !== t.validate(d, k, val) - val = d[k] - if (ok) { - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - break - } - } - } - debug("OK? %j (%j %j %j)", ok, k, val, types[i]) - - if (!ok) delete data[k] - return ok -} - -function parse (args, data, remain, types, shorthands) { - debug("parse", args, data, remain) - - var key = null - , abbrevs = abbrev(Object.keys(types)) - , shortAbbr = abbrev(Object.keys(shorthands)) - - for (var i = 0; i < args.length; i ++) { - var arg = args[i] - debug("arg", arg) - - if (arg.match(/^-{2,}$/)) { - // done with keys. - // the rest are args. - remain.push.apply(remain, args.slice(i + 1)) - args[i] = "--" - break - } - var hadEq = false - if (arg.charAt(0) === "-" && arg.length > 1) { - if (arg.indexOf("=") !== -1) { - hadEq = true - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) - } - - // see if it's a shorthand - // if so, splice and back up to re-parse it. - var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) - debug("arg=%j shRes=%j", arg, shRes) - if (shRes) { - debug(arg, shRes) - args.splice.apply(args, [i, 1].concat(shRes)) - if (arg !== shRes[0]) { - i -- - continue - } - } - arg = arg.replace(/^-+/, "") - var no = null - while (arg.toLowerCase().indexOf("no-") === 0) { - no = !no - arg = arg.substr(3) - } - - if (abbrevs[arg]) arg = abbrevs[arg] - - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 - - // allow unknown things to be arrays if specified multiple times. - if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { - if (!Array.isArray(data[arg])) - data[arg] = [data[arg]] - isArray = true - } - - var val - , la = args[i + 1] - - var isBool = typeof no === 'boolean' || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || - (typeof types[arg] === 'undefined' && !hadEq) || - (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) - - if (isBool) { - // just set and move along - val = !no - // however, also support --bool true or --bool false - if (la === "true" || la === "false") { - val = JSON.parse(la) - la = null - if (no) val = !val - i ++ - } - - // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { - // an explicit type - val = la - i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { - // null allowed - val = null - i ++ - } else if ( !la.match(/^-{2,}[^-]/) && - !isNaN(la) && - ~types[arg].indexOf(Number) ) { - // number - val = +la - i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { - // string - val = la - i ++ - } - } - - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - continue - } - - if (types[arg] === String && la === undefined) - la = "" - - if (la && la.match(/^-{2,}$/)) { - la = undefined - i -- - } - - val = la === undefined ? true : la - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - i ++ - continue - } - remain.push(arg) - } -} - -function resolveShort (arg, shorthands, shortAbbr, abbrevs) { - // handle single-char shorthands glommed together, like - // npm ls -glp, but only if there is one dash, and only if - // all of the chars are single-char shorthands, and it's - // not a match to some other abbrev. - arg = arg.replace(/^-+/, '') - - // if it's an exact known option, then don't go any further - if (abbrevs[arg] === arg) - return null - - // if it's an exact known shortopt, same deal - if (shorthands[arg]) { - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] - } - - // first check to see if this arg is a set of single-char shorthands - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { - l[r] = true - return l - }, {}) - shorthands.___singles = singles - debug('shorthand singles', singles) - } - - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - - - // if it's an arg abbrev, and not a literal shorthand, then prefer the arg - if (abbrevs[arg] && !shorthands[arg]) - return null - - // if it's an abbr for a shorthand, then use that - if (shortAbbr[arg]) - arg = shortAbbr[arg] - - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] -} diff --git a/node_modules/cordova-android/node_modules/nopt/package.json b/node_modules/cordova-android/node_modules/nopt/package.json deleted file mode 100644 index 400a93b..0000000 --- a/node_modules/cordova-android/node_modules/nopt/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "nopt@3.0.1", - "_id": "nopt@3.0.1", - "_inBundle": true, - "_integrity": "sha1-vOXEJEajKR9HYio3CrvxWPu6y/0=", - "_location": "/cordova-android/nopt", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "nopt@3.0.1", - "name": "nopt", - "escapedName": "nopt", - "rawSpec": "3.0.1", - "saveSpec": null, - "fetchSpec": "3.0.1" - }, - "_requiredBy": [ - "/cordova-android" - ], - "_resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.1.tgz", - "_shasum": "bce5c42446a3291f47622a370abbf158fbbacbfd", - "_spec": "nopt@3.0.1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bin": { - "nopt": "./bin/nopt.js" - }, - "bugs": { - "url": "https://github.com/isaacs/nopt/issues" - }, - "bundleDependencies": false, - "dependencies": { - "abbrev": "1" - }, - "deprecated": false, - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "devDependencies": { - "tap": "~0.4.8" - }, - "homepage": "https://github.com/isaacs/nopt#readme", - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/nopt/raw/master/LICENSE" - }, - "main": "lib/nopt.js", - "name": "nopt", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/isaacs/nopt.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "3.0.1" -} diff --git a/node_modules/cordova-android/node_modules/nopt/test/basic.js b/node_modules/cordova-android/node_modules/nopt/test/basic.js deleted file mode 100644 index 2f9088c..0000000 --- a/node_modules/cordova-android/node_modules/nopt/test/basic.js +++ /dev/null @@ -1,251 +0,0 @@ -var nopt = require("../") - , test = require('tap').test - - -test("passing a string results in a string", function (t) { - var parsed = nopt({ key: String }, {}, ["--key", "myvalue"], 0) - t.same(parsed.key, "myvalue") - t.end() -}) - -// https://github.com/npm/nopt/issues/31 -test("Empty String results in empty string, not true", function (t) { - var parsed = nopt({ empty: String }, {}, ["--empty"], 0) - t.same(parsed.empty, "") - t.end() -}) - -test("~ path is resolved to $HOME", function (t) { - var path = require("path") - if (!process.env.HOME) process.env.HOME = "/tmp" - var parsed = nopt({key: path}, {}, ["--key=~/val"], 0) - t.same(parsed.key, path.resolve(process.env.HOME, "val")) - t.end() -}) - -// https://github.com/npm/nopt/issues/24 -test("Unknown options are not parsed as numbers", function (t) { - var parsed = nopt({"parse-me": Number}, null, ['--leave-as-is=1.20', '--parse-me=1.20'], 0) - t.equal(parsed['leave-as-is'], '1.20') - t.equal(parsed['parse-me'], 1.2) - t.end() -}); - -test("other tests", function (t) { - - var util = require("util") - , Stream = require("stream") - , path = require("path") - , url = require("url") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } - - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - , path: path - } - - ; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know=the-rules --and=so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, '100']} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate=2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ,["-cl 1" - ,{config: true, length: 1} - ,[] - ,{config: Boolean, length: Number, clear: Boolean} - ,{c: "--config", l: "--length"}] - ,["--acount bla" - ,{"acount":true} - ,["bla"] - ,{account: Boolean, credentials: Boolean, options: String} - ,{a:"--account", c:"--credentials",o:"--options"}] - ,["--clear" - ,{clear:true} - ,[] - ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} - ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] - ,["--file -" - ,{"file":"-"} - ,[] - ,{file:String} - ,{}] - ,["--file -" - ,{"file":true} - ,["-"] - ,{file:Boolean} - ,{}] - ,["--path" - ,{"path":null} - ,[]] - ,["--path ." - ,{"path":process.cwd()} - ,[]] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - t.deepEqual(e, a) - } else { - t.equal(e, a) - } - } - t.deepEqual(rem, parsed.remain) - }) - t.end() -}) diff --git a/node_modules/cordova-android/node_modules/once/LICENSE b/node_modules/cordova-android/node_modules/once/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/cordova-android/node_modules/once/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/once/README.md b/node_modules/cordova-android/node_modules/once/README.md deleted file mode 100644 index 1f1ffca..0000000 --- a/node_modules/cordova-android/node_modules/once/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. - -To check whether you function has been called, use `fn.called`. Once the -function is called for the first time the return value of the original -function is saved in `fn.value` and subsequent calls will continue to -return this value. - -```javascript -var once = require('once') - -function load (cb) { - cb = once(cb) - var stream = createStream() - stream.once('data', cb) - stream.once('end', function () { - if (!cb.called) cb(new Error('not found')) - }) -} -``` - -## `once.strict(func)` - -Throw an error if the function is called twice. - -Some functions are expected to be called only once. Using `once` for them would -potentially hide logical errors. - -In the example below, the `greet` function has to call the callback only once: - -```javascript -function greet (name, cb) { - // return is missing from the if statement - // when no name is passed, the callback is called twice - if (!name) cb('Hello anonymous') - cb('Hello ' + name) -} - -function log (msg) { - console.log(msg) -} - -// this will print 'Hello anonymous' but the logical error will be missed -greet(null, once(msg)) - -// once.strict will print 'Hello anonymous' and throw an error when the callback will be called the second time -greet(null, once.strict(msg)) -``` diff --git a/node_modules/cordova-android/node_modules/once/once.js b/node_modules/cordova-android/node_modules/once/once.js deleted file mode 100644 index 2354067..0000000 --- a/node_modules/cordova-android/node_modules/once/once.js +++ /dev/null @@ -1,42 +0,0 @@ -var wrappy = require('wrappy') -module.exports = wrappy(once) -module.exports.strict = wrappy(onceStrict) - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) - - Object.defineProperty(Function.prototype, 'onceStrict', { - value: function () { - return onceStrict(this) - }, - configurable: true - }) -}) - -function once (fn) { - var f = function () { - if (f.called) return f.value - f.called = true - return f.value = fn.apply(this, arguments) - } - f.called = false - return f -} - -function onceStrict (fn) { - var f = function () { - if (f.called) - throw new Error(f.onceError) - f.called = true - return f.value = fn.apply(this, arguments) - } - var name = fn.name || 'Function wrapped with `once`' - f.onceError = name + " shouldn't be called more than once" - f.called = false - return f -} diff --git a/node_modules/cordova-android/node_modules/once/package.json b/node_modules/cordova-android/node_modules/once/package.json deleted file mode 100644 index df50daa..0000000 --- a/node_modules/cordova-android/node_modules/once/package.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "_from": "once@^1.3.0", - "_id": "once@1.4.0", - "_inBundle": true, - "_integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "_location": "/cordova-android/once", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "once@^1.3.0", - "name": "once", - "escapedName": "once", - "rawSpec": "^1.3.0", - "saveSpec": null, - "fetchSpec": "^1.3.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/glob", - "/cordova-android/inflight" - ], - "_resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "_shasum": "583b1aa775961d4b113ac17d9c50baef9dd76bd1", - "_spec": "once@^1.3.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/glob", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "bundleDependencies": false, - "dependencies": { - "wrappy": "1" - }, - "deprecated": false, - "description": "Run a function exactly one time", - "devDependencies": { - "tap": "^7.0.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "once.js" - ], - "homepage": "https://github.com/isaacs/once#readme", - "keywords": [ - "once", - "function", - "one", - "single" - ], - "license": "ISC", - "main": "once.js", - "name": "once", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "version": "1.4.0" -} diff --git a/node_modules/cordova-android/node_modules/path-is-absolute/index.js b/node_modules/cordova-android/node_modules/path-is-absolute/index.js deleted file mode 100644 index 22aa6c3..0000000 --- a/node_modules/cordova-android/node_modules/path-is-absolute/index.js +++ /dev/null @@ -1,20 +0,0 @@ -'use strict'; - -function posix(path) { - return path.charAt(0) === '/'; -} - -function win32(path) { - // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56 - var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; - var result = splitDeviceRe.exec(path); - var device = result[1] || ''; - var isUnc = Boolean(device && device.charAt(1) !== ':'); - - // UNC paths are always absolute - return Boolean(result[2] || isUnc); -} - -module.exports = process.platform === 'win32' ? win32 : posix; -module.exports.posix = posix; -module.exports.win32 = win32; diff --git a/node_modules/cordova-android/node_modules/path-is-absolute/license b/node_modules/cordova-android/node_modules/path-is-absolute/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/cordova-android/node_modules/path-is-absolute/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/path-is-absolute/package.json b/node_modules/cordova-android/node_modules/path-is-absolute/package.json deleted file mode 100644 index abaa590..0000000 --- a/node_modules/cordova-android/node_modules/path-is-absolute/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "path-is-absolute@^1.0.0", - "_id": "path-is-absolute@1.0.1", - "_inBundle": true, - "_integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "_location": "/cordova-android/path-is-absolute", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "path-is-absolute@^1.0.0", - "name": "path-is-absolute", - "escapedName": "path-is-absolute", - "rawSpec": "^1.0.0", - "saveSpec": null, - "fetchSpec": "^1.0.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/glob" - ], - "_resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "_shasum": "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f", - "_spec": "path-is-absolute@^1.0.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/glob", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "bugs": { - "url": "https://github.com/sindresorhus/path-is-absolute/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Node.js 0.12 path.isAbsolute() ponyfill", - "devDependencies": { - "xo": "^0.16.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "files": [ - "index.js" - ], - "homepage": "https://github.com/sindresorhus/path-is-absolute#readme", - "keywords": [ - "path", - "paths", - "file", - "dir", - "absolute", - "isabsolute", - "is-absolute", - "built-in", - "util", - "utils", - "core", - "ponyfill", - "polyfill", - "shim", - "is", - "detect", - "check" - ], - "license": "MIT", - "name": "path-is-absolute", - "repository": { - "type": "git", - "url": "git+https://github.com/sindresorhus/path-is-absolute.git" - }, - "scripts": { - "test": "xo && node test.js" - }, - "version": "1.0.1" -} diff --git a/node_modules/cordova-android/node_modules/path-is-absolute/readme.md b/node_modules/cordova-android/node_modules/path-is-absolute/readme.md deleted file mode 100644 index 8dbdf5f..0000000 --- a/node_modules/cordova-android/node_modules/path-is-absolute/readme.md +++ /dev/null @@ -1,59 +0,0 @@ -# path-is-absolute [![Build Status](https://travis-ci.org/sindresorhus/path-is-absolute.svg?branch=master)](https://travis-ci.org/sindresorhus/path-is-absolute) - -> Node.js 0.12 [`path.isAbsolute()`](http://nodejs.org/api/path.html#path_path_isabsolute_path) [ponyfill](https://ponyfill.com) - - -## Install - -``` -$ npm install --save path-is-absolute -``` - - -## Usage - -```js -const pathIsAbsolute = require('path-is-absolute'); - -// Running on Linux -pathIsAbsolute('/home/foo'); -//=> true -pathIsAbsolute('C:/Users/foo'); -//=> false - -// Running on Windows -pathIsAbsolute('C:/Users/foo'); -//=> true -pathIsAbsolute('/home/foo'); -//=> false - -// Running on any OS -pathIsAbsolute.posix('/home/foo'); -//=> true -pathIsAbsolute.posix('C:/Users/foo'); -//=> false -pathIsAbsolute.win32('C:/Users/foo'); -//=> true -pathIsAbsolute.win32('/home/foo'); -//=> false -``` - - -## API - -See the [`path.isAbsolute()` docs](http://nodejs.org/api/path.html#path_path_isabsolute_path). - -### pathIsAbsolute(path) - -### pathIsAbsolute.posix(path) - -POSIX specific version. - -### pathIsAbsolute.win32(path) - -Windows specific version. - - -## License - -MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/node_modules/cordova-android/node_modules/plist/.jshintrc b/node_modules/cordova-android/node_modules/plist/.jshintrc deleted file mode 100644 index 3f42622..0000000 --- a/node_modules/cordova-android/node_modules/plist/.jshintrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "laxbreak": true, - "laxcomma": true -} diff --git a/node_modules/cordova-android/node_modules/plist/.travis.yml b/node_modules/cordova-android/node_modules/plist/.travis.yml deleted file mode 100644 index 26e2bba..0000000 --- a/node_modules/cordova-android/node_modules/plist/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -sudo: false - -language: node_js - -node_js: -- '0.10' -- '0.12' -- '1' -- '2' -- '3' -- '4' -- '5' -- '6' - -env: - global: - - secure: xlLmWO7akYQjmDgrv6/b/ZMGILF8FReD+k6A/u8pYRD2JW29hhwvRwIQGcKp9+zmJdn4i5M4D1/qJkCeI3pdhAYBDHvzHOHSEwLJz1ESB2Crv6fa69CtpIufQkWvIxmZoU49tCaLpMBaIroGihJ4DAXdIVOIz6Ur9vXLDhGsE4c= - - secure: aQ46RdxL10xR5ZJJTMUKdH5k4tdrzgZ87nlwHC+pTr6bfRw3UKYC+6Rm7yQpg9wq0Io9O9dYCP007gQGSWstbjr1+jXNu/ubtNG+q5cpWBQZZZ013VHh9QJTf1MnetsZxbv8Yhrjg590s6vruT0oqesOnB2CizO/BsKxnY37Nos= - -matrix: - include: - - node_js: '0.10' - env: BROWSER_NAME=chrome BROWSER_VERSION=latest - - node_js: '0.10' - env: BROWSER_NAME=chrome BROWSER_VERSION=29 - - node_js: '0.10' - env: BROWSER_NAME=firefox BROWSER_VERSION=latest - - node_js: '0.10' - env: BROWSER_NAME=opera BROWSER_VERSION=latest - - node_js: '0.10' - env: BROWSER_NAME=safari BROWSER_VERSION=latest - - node_js: '0.10' - env: BROWSER_NAME=safari BROWSER_VERSION=7 - - node_js: '0.10' - env: BROWSER_NAME=safari BROWSER_VERSION=6 - - node_js: '0.10' - env: BROWSER_NAME=safari BROWSER_VERSION=5 - - node_js: '0.10' - env: BROWSER_NAME=ie BROWSER_VERSION=11 - - node_js: '0.10' - env: BROWSER_NAME=ie BROWSER_VERSION=10 - - node_js: '0.10' - env: BROWSER_NAME=ie BROWSER_VERSION=9 diff --git a/node_modules/cordova-android/node_modules/plist/History.md b/node_modules/cordova-android/node_modules/plist/History.md deleted file mode 100644 index 1ce9406..0000000 --- a/node_modules/cordova-android/node_modules/plist/History.md +++ /dev/null @@ -1,149 +0,0 @@ -2.1.0 / 2017-05-04 -================== - -* [[`e4f06669bb`]](https://github.com/TooTallNate/plist.js/commit/e4f06669bb51d2e65654df7c39aab52bc3bf4e8a) - update license (extend copyright term) (Mike Reinstein) -* [[`edc6e41035`]](https://github.com/TooTallNate/plist.js/commit/edc6e4103546b1d7518a577e7c202c305a8abec0) - update module deps (Mike Reinstein) -* [[`85d11c48ef`](https://github.com/TooTallNate/plist.js/commit/85d11c48eff02312cbdd67f46fd8e74b0d372ca1)] - Harden test-cases and implementation to align with other implementations (Björn Brauer) -* [[`7619537eaa`]](https://github.com/TooTallNate/plist.js/commit/7619537eaa9e3e5a80829e759c004d2e017a07d2) review feedback: early returns and constants for nodeTypes (Björn Brauer) - -2.0.1 / 2016-08-16 -================== - -* [[`de136c8388`](https://github.com/TooTallNate/plist/commit/de136c8388)] - bad npm release… (Nathan Rajlich) - -2.0.0 / 2016-08-16 -================== - -* [[`90deef5d43`](https://github.com/TooTallNate/plist/commit/90deef5d43)] - remove deprecated functions (Nathan Rajlich) -* [[`d475cd8ce9`](https://github.com/TooTallNate/plist/commit/d475cd8ce9)] - Added travis ci support for node 6 (Amila Welihinda) -* [[`04c8ee7646`](https://github.com/TooTallNate/plist/commit/04c8ee7646)] - update dependencies (Mitchell Hentges) -* [[`97c02b3f05`](https://github.com/TooTallNate/plist/commit/97c02b3f05)] - **travis**: add `sudo: false` and test more node versions (Nathan Rajlich) -* [[`54c821ec29`](https://github.com/TooTallNate/plist/commit/54c821ec29)] - #71 - fixed and added test (Andrew Goldis) -* [[`4afb7c5079`](https://github.com/TooTallNate/plist/commit/4afb7c5079)] - fix `Cannot read property 'nodeValue' of undefined exception` that is thrown when a `` construct appears in plist (Chris Kinsman) -* [[`f360d7d685`](https://github.com/TooTallNate/plist/commit/f360d7d685)] - #66 - fixed empty keys and added tests (Andrew Goldis) -* [[`421c7f26e9`](https://github.com/TooTallNate/plist/commit/421c7f26e9)] - #66 - fixed empty key (Andrew Goldis) -* [[`a88aa4dca7`](https://github.com/TooTallNate/plist/commit/a88aa4dca7)] - add verbose examples (mrzmyr) - -1.2.0 / 2015-11-10 -================== - - * package: update "browserify" to v12.0.1 - * package: update "zuul" to v3.7.2 - * package: update "xmlbuilder" to v4.0.0 - * package: update "util-deprecate" to v1.0.2 - * package: update "mocha" to v2.3.3 - * package: update "base64-js" to v0.0.8 - * build: omit undefined values - * travis: add node 4.0 and 4.1 to test matrix - -1.1.0 / 2014-08-27 -================== - - * package: update "browserify" to v5.10.1 - * package: update "zuul" to v1.10.2 - * README: add "Sauce Test Status" build badge - * travis: use new "plistjs" sauce credentials - * travis: set up zuul saucelabs automated testing - -1.0.1 / 2014-06-25 -================== - - * add .zuul.yml file for browser testing - * remove Testling stuff - * build: fix global variable `val` leak - * package: use --check-leaks when running mocha tests - * README: update examples to use preferred API - * package: add "browser" keyword - -1.0.0 / 2014-05-20 -================== - - * package: remove "android-browser" - * test: add build() test - * test: re-add the empty string build() test - * test: remove "fixtures" and legacy "tests" dir - * test: add some more build() tests - * test: add a parse() CDATA test - * test: starting on build() tests - * test: more parse() tests - * package: attempt to fix "android-browser" testling - * parse: better with newline handling - * README: add Testling badge - * test: add node tests - * test: add a parse() test - * travis: don't test node v0.6 or v0.8 - * test: some more parse() tests - * test: add simple parsing test - * build: add support for an optional "opts" object - * package: test mobile devices - * test: use multiline to inline the XML - * package: beautify - * package: fix "mocha" harness - * package: more testling browsers - * build: add the "version=1.0" attribute - * beginnings of "mocha" tests - * build: more JSDocs - * tests: add test that ensures that empty string conversion works - * build: update "xmlbuilder" to v2.2.1 - * parse: ignore comment and cdata nodes - * tests: make the "Newlines" test actually contain a newline - * parse: lint - * test travis - * README: add Travis CI badge - * add .travis.yml file - * build: updated DTD to reflect name change - * parse: return falsey values in an Array plist - * build: fix encoding a typed array in the browser - * build: add support for Typed Arrays and ArrayBuffers - * build: more lint - * build: slight cleanup and optimizations - * build: use .txt() for the "date" value - * parse: always return a Buffer for nodes - * build: don't interpret Strings as base64 - * dist: commit prebuilt plist*.js files - * parse: fix typo in deprecate message - * parse: fix parse() return value - * parse: add jsdoc comments for the deprecated APIs - * parse: add `parse()` function - * node, parse: use `util-deprecate` module - * re-implemented parseFile to be asynchronous - * node: fix jsdoc comment - * Makefile: fix "node" require stubbing - * examples: add "browser" example - * package: tweak "main" - * package: remove "engines" field - * Makefile: fix --exclude command for browserify - * package: update "description" - * lib: more styling - * Makefile: add -build.js and -parse.js dist files - * lib: separate out the parse and build logic into their own files - * Makefile: add makefile with browserify build rules - * package: add "browserify" as a dev dependency - * plist: tabs to spaces (again) - * add a .jshintrc file - * LICENSE: update - * node-webkit support - * Ignore tests/ in .npmignore file - * Remove duplicate devDependencies key - * Remove trailing whitespace - * adding recent contributors. Bumping npm package number (patch release) - * Fixed node.js string handling - * bumping version number - * Fixed global variable plist leak - * patch release 0.4.1 - * removed temporary debug output file - * flipping the cases for writing data and string elements in build(). removed the 125 length check. Added validation of base64 encoding for data fields when parsing. added unit tests. - * fixed syntax errors in README examples (issue #20) - * added Sync versions of calls. added deprecation warnings for old method calls. updated documentation. If the resulting object from parseStringSync is an array with 1 element, return just the element. If a plist string or file doesnt have a tag as the document root element, fail noisily (issue #15) - * incrementing package version - * added cross platform base64 encode/decode for data elements (issue #17.) Comments and hygiene. - * refactored the code to use a DOM parser instead of SAX. closes issues #5 and #16 - * rolling up package version - * updated base64 detection regexp. updated README. hygiene. - * refactored the build function. Fixes issue #14 - * refactored tests. Modified tests from issue #9. thanks @sylvinus - * upgrade xmlbuilder package version. this is why .end() was needed in last commit; breaking change to xmlbuilder lib. :/ - * bug fix in build function, forgot to call .end() Refactored tests to use nodeunit - * Implemented support for real, identity tests - * Refactored base64 detection - still sloppy, fixed date building. Passing tests OK. - * Implemented basic plist builder that turns an existing JS object into plist XML. date, real and data types still need to be implemented. diff --git a/node_modules/cordova-android/node_modules/plist/LICENSE b/node_modules/cordova-android/node_modules/plist/LICENSE deleted file mode 100644 index 92e3423..0000000 --- a/node_modules/cordova-android/node_modules/plist/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2010-2017 Nathan Rajlich - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/plist/Makefile b/node_modules/cordova-android/node_modules/plist/Makefile deleted file mode 100644 index 62695e0..0000000 --- a/node_modules/cordova-android/node_modules/plist/Makefile +++ /dev/null @@ -1,76 +0,0 @@ - -# get Makefile directory name: http://stackoverflow.com/a/5982798/376773 -THIS_MAKEFILE_PATH:=$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)) -THIS_DIR:=$(shell cd $(dir $(THIS_MAKEFILE_PATH));pwd) - -# BIN directory -BIN := $(THIS_DIR)/node_modules/.bin - -# applications -NODE ?= node -NPM ?= $(NODE) $(shell which npm) -BROWSERIFY ?= $(NODE) $(BIN)/browserify -MOCHA ?= $(NODE) $(BIN)/mocha -ZUUL ?= $(NODE) $(BIN)/zuul - -REPORTER ?= spec - -all: dist/plist.js dist/plist-build.js dist/plist-parse.js - -install: node_modules - -clean: - @rm -rf node_modules dist - -dist: - @mkdir -p $@ - -dist/plist-build.js: node_modules lib/build.js dist - @$(BROWSERIFY) \ - --standalone plist \ - lib/build.js > $@ - -dist/plist-parse.js: node_modules lib/parse.js dist - @$(BROWSERIFY) \ - --standalone plist \ - lib/parse.js > $@ - -dist/plist.js: node_modules lib/*.js dist - @$(BROWSERIFY) \ - --standalone plist \ - --ignore lib/node.js \ - lib/plist.js > $@ - -node_modules: package.json - @NODE_ENV= $(NPM) install - @touch node_modules - -test: - @if [ "x$(BROWSER_NAME)" = "x" ]; then \ - $(MAKE) test-node; \ - else \ - $(MAKE) test-zuul; \ - fi - -test-node: - @$(MOCHA) \ - --reporter $(REPORTER) \ - test/*.js - -test-zuul: - @if [ "x$(BROWSER_PLATFORM)" = "x" ]; then \ - $(ZUUL) \ - --ui mocha-bdd \ - --browser-name $(BROWSER_NAME) \ - --browser-version $(BROWSER_VERSION) \ - test/*.js; \ - else \ - $(ZUUL) \ - --ui mocha-bdd \ - --browser-name $(BROWSER_NAME) \ - --browser-version $(BROWSER_VERSION) \ - --browser-platform "$(BROWSER_PLATFORM)" \ - test/*.js; \ - fi - -.PHONY: all install clean test test-node test-zuul diff --git a/node_modules/cordova-android/node_modules/plist/README.md b/node_modules/cordova-android/node_modules/plist/README.md deleted file mode 100644 index 81545ae..0000000 --- a/node_modules/cordova-android/node_modules/plist/README.md +++ /dev/null @@ -1,141 +0,0 @@ -plist.js -======== -### Mac OS X Plist parser/builder for Node.js and browsers - -[![Sauce Test Status](https://saucelabs.com/browser-matrix/plistjs.svg)](https://saucelabs.com/u/plistjs) - -[![Build Status](https://travis-ci.org/TooTallNate/plist.js.svg?branch=master)](https://travis-ci.org/TooTallNate/plist.js) - -Provides facilities for reading and writing Mac OS X Plist (property list) -files. These are often used in programming OS X and iOS applications, as -well as the iTunes configuration XML file. - -Plist files represent stored programming "object"s. They are very similar -to JSON. A valid Plist file is representable as a native JavaScript Object -and vice-versa. - - -## Usage - -### Node.js - -Install using `npm`: - -``` bash -$ npm install --save plist -``` - -Then `require()` the _plist_ module in your file: - -``` js -var plist = require('plist'); - -// now use the `parse()` and `build()` functions -var val = plist.parse('Hello World!'); -console.log(val); // "Hello World!" -``` - - -### Browser - -Include the `dist/plist.js` in a ` - -``` - - -## API - -### Parsing - -Parsing a plist from filename: - -``` javascript -var fs = require('fs'); -var plist = require('plist'); - -var obj = plist.parse(fs.readFileSync('myPlist.plist', 'utf8')); -console.log(JSON.stringify(obj)); -``` - -Parsing a plist from string payload: - -``` javascript -var plist = require('plist'); - -var xml = - '' + - '' + - '' + - 'metadata' + - '' + - 'bundle-identifier' + - 'com.company.app' + - 'bundle-version' + - '0.1.1' + - 'kind' + - 'software' + - 'title' + - 'AppName' + - '' + - ''; - -console.log(plist.parse(xml)); - -// [ -// "metadata", -// { -// "bundle-identifier": "com.company.app", -// "bundle-version": "0.1.1", -// "kind": "software", -// "title": "AppName" -// } -// ] -``` - -### Building - -Given an existing JavaScript Object, you can turn it into an XML document -that complies with the plist DTD: - -``` javascript -var plist = require('plist'); - -var json = [ - "metadata", - { - "bundle-identifier": "com.company.app", - "bundle-version": "0.1.1", - "kind": "software", - "title": "AppName" - } -]; - -console.log(plist.build(json)); - -// -// -// -// metadata -// -// bundle-identifier -// com.company.app -// bundle-version -// 0.1.1 -// kind -// software -// title -// AppName -// -// -``` - -## License - -[(The MIT License)](LICENSE) diff --git a/node_modules/cordova-android/node_modules/plist/dist/plist-build.js b/node_modules/cordova-android/node_modules/plist/dist/plist-build.js deleted file mode 100644 index 4fcd378..0000000 --- a/node_modules/cordova-android/node_modules/plist/dist/plist-build.js +++ /dev/null @@ -1,3982 +0,0 @@ -(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.plist = 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 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],3:[function(require,module,exports){ -/** - * Determine if an object is Buffer - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install is-buffer` - */ - -module.exports = function (obj) { - return !!(obj != null && - (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) - (obj.constructor && - typeof obj.constructor.isBuffer === 'function' && - obj.constructor.isBuffer(obj)) - )) -} - -},{}],4:[function(require,module,exports){ -/** - * 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; - -},{}],5:[function(require,module,exports){ -var arrayEvery = require('../internal/arrayEvery'), - baseCallback = require('../internal/baseCallback'), - baseEvery = require('../internal/baseEvery'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * 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 all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = undefined; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = every; - -},{"../internal/arrayEvery":7,"../internal/baseCallback":11,"../internal/baseEvery":15,"../internal/isIterateeCall":40,"../lang/isArray":49}],6:[function(require,module,exports){ -/** 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/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; - -},{}],7:[function(require,module,exports){ -/** - * A specialized version of `_.every` 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 all elements pass the predicate check, - * else `false`. - */ -function arrayEvery(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; -} - -module.exports = arrayEvery; - -},{}],8:[function(require,module,exports){ -/** - * 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; -} - -module.exports = arraySome; - -},{}],9:[function(require,module,exports){ -var keys = require('../object/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; -} - -module.exports = assignWith; - -},{"../object/keys":58}],10:[function(require,module,exports){ -var baseCopy = require('./baseCopy'), - keys = require('../object/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; - -},{"../object/keys":58,"./baseCopy":12}],11:[function(require,module,exports){ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - bindCallback = require('./bindCallback'), - identity = require('../utility/identity'), - property = require('../utility/property'); - -/** - * 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); -} - -module.exports = baseCallback; - -},{"../utility/identity":61,"../utility/property":62,"./baseMatches":22,"./baseMatchesProperty":23,"./bindCallback":28}],12:[function(require,module,exports){ -/** - * 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; - -},{}],13:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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 || {}; - }; -}()); - -module.exports = baseCreate; - -},{"../lang/isObject":53}],14:[function(require,module,exports){ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); - -/** - * 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); - -module.exports = baseEach; - -},{"./baseForOwn":17,"./createBaseEach":30}],15:[function(require,module,exports){ -var baseEach = require('./baseEach'); - -/** - * The base implementation of `_.every` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ -function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; -} - -module.exports = baseEvery; - -},{"./baseEach":14}],16:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); - -/** - * 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(); - -module.exports = baseFor; - -},{"./createBaseFor":31}],17:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keys = require('../object/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); -} - -module.exports = baseForOwn; - -},{"../object/keys":58,"./baseFor":16}],18:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * 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; -} - -module.exports = baseGet; - -},{"./toObject":46}],19:[function(require,module,exports){ -var baseIsEqualDeep = require('./baseIsEqualDeep'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'); - -/** - * 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); -} - -module.exports = baseIsEqual; - -},{"../lang/isObject":53,"./baseIsEqualDeep":20,"./isObjectLike":43}],20:[function(require,module,exports){ -var equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - isArray = require('../lang/isArray'), - isTypedArray = require('../lang/isTypedArray'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object 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`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * 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; -} - -module.exports = baseIsEqualDeep; - -},{"../lang/isArray":49,"../lang/isTypedArray":55,"./equalArrays":32,"./equalByTag":33,"./equalObjects":34}],21:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'), - toObject = require('./toObject'); - -/** - * 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; -} - -module.exports = baseIsMatch; - -},{"./baseIsEqual":19,"./toObject":46}],22:[function(require,module,exports){ -var baseIsMatch = require('./baseIsMatch'), - getMatchData = require('./getMatchData'), - toObject = require('./toObject'); - -/** - * 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); - }; -} - -module.exports = baseMatches; - -},{"./baseIsMatch":21,"./getMatchData":36,"./toObject":46}],23:[function(require,module,exports){ -var baseGet = require('./baseGet'), - baseIsEqual = require('./baseIsEqual'), - baseSlice = require('./baseSlice'), - isArray = require('../lang/isArray'), - isKey = require('./isKey'), - isStrictComparable = require('./isStrictComparable'), - last = require('../array/last'), - toObject = require('./toObject'), - toPath = require('./toPath'); - -/** - * 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); - }; -} - -module.exports = baseMatchesProperty; - -},{"../array/last":4,"../lang/isArray":49,"./baseGet":18,"./baseIsEqual":19,"./baseSlice":26,"./isKey":41,"./isStrictComparable":44,"./toObject":46,"./toPath":47}],24:[function(require,module,exports){ -/** - * 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]; - }; -} - -module.exports = baseProperty; - -},{}],25:[function(require,module,exports){ -var baseGet = require('./baseGet'), - toPath = require('./toPath'); - -/** - * 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); - }; -} - -module.exports = basePropertyDeep; - -},{"./baseGet":18,"./toPath":47}],26:[function(require,module,exports){ -/** - * 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; - -},{}],27:[function(require,module,exports){ -/** - * 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 + ''); -} - -module.exports = baseToString; - -},{}],28:[function(require,module,exports){ -var identity = require('../utility/identity'); - -/** - * 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); - }; -} - -module.exports = bindCallback; - -},{"../utility/identity":61}],29:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isIterateeCall = require('./isIterateeCall'), - restParam = require('../function/restParam'); - -/** - * Creates a `_.assign`, `_.defaults`, or `_.merge` function. - * - * @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; - -},{"../function/restParam":6,"./bindCallback":28,"./isIterateeCall":40}],30:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'), - toObject = require('./toObject'); - -/** - * 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; - }; -} - -module.exports = createBaseEach; - -},{"./getLength":35,"./isLength":42,"./toObject":46}],31:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * 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; - }; -} - -module.exports = createBaseFor; - -},{"./toObject":46}],32:[function(require,module,exports){ -var arraySome = require('./arraySome'); - -/** - * 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; -} - -module.exports = equalArrays; - -},{"./arraySome":8}],33:[function(require,module,exports){ -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** - * 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} object 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; -} - -module.exports = equalByTag; - -},{}],34:[function(require,module,exports){ -var keys = require('../object/keys'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; -} - -module.exports = equalObjects; - -},{"../object/keys":58}],35:[function(require,module,exports){ -var baseProperty = require('./baseProperty'); - -/** - * 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'); - -module.exports = getLength; - -},{"./baseProperty":24}],36:[function(require,module,exports){ -var isStrictComparable = require('./isStrictComparable'), - pairs = require('../object/pairs'); - -/** - * 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; -} - -module.exports = getMatchData; - -},{"../object/pairs":60,"./isStrictComparable":44}],37:[function(require,module,exports){ -var isNative = require('../lang/isNative'); - -/** - * 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; -} - -module.exports = getNative; - -},{"../lang/isNative":52}],38:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'); - -/** - * 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)); -} - -module.exports = isArrayLike; - -},{"./getLength":35,"./isLength":42}],39:[function(require,module,exports){ -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * 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; - -/** - * 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; -} - -module.exports = isIndex; - -},{}],40:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'), - isIndex = require('./isIndex'), - isObject = require('../lang/isObject'); - -/** - * 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; -} - -module.exports = isIterateeCall; - -},{"../lang/isObject":53,"./isArrayLike":38,"./isIndex":39}],41:[function(require,module,exports){ -var isArray = require('../lang/isArray'), - toObject = require('./toObject'); - -/** 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)); -} - -module.exports = isKey; - -},{"../lang/isArray":49,"./toObject":46}],42:[function(require,module,exports){ -/** - * 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; - -/** - * 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 = isLength; - -},{}],43:[function(require,module,exports){ -/** - * 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'; -} - -module.exports = isObjectLike; - -},{}],44:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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); -} - -module.exports = isStrictComparable; - -},{"../lang/isObject":53}],45:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('./isIndex'), - isLength = require('./isLength'), - keysIn = require('../object/keysIn'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; -} - -module.exports = shimKeys; - -},{"../lang/isArguments":48,"../lang/isArray":49,"../object/keysIn":59,"./isIndex":39,"./isLength":42}],46:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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); -} - -module.exports = toObject; - -},{"../lang/isObject":53}],47:[function(require,module,exports){ -var baseToString = require('./baseToString'), - isArray = require('../lang/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 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; - -},{"../lang/isArray":49,"./baseToString":27}],48:[function(require,module,exports){ -var isArrayLike = require('../internal/isArrayLike'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); -} - -module.exports = isArguments; - -},{"../internal/isArrayLike":38,"../internal/isObjectLike":43}],49:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; - -/** Used for native 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 objToString = objectProto.toString; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * 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; -}; - -module.exports = isArray; - -},{"../internal/getNative":37,"../internal/isLength":42,"../internal/isObjectLike":43}],50:[function(require,module,exports){ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('../internal/isArrayLike'), - isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'), - isString = require('./isString'), - keys = require('../object/keys'); - -/** - * Checks if `value` is empty. A value is considered empty unless it's 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; - -},{"../internal/isArrayLike":38,"../internal/isObjectLike":43,"../object/keys":58,"./isArguments":48,"./isArray":49,"./isFunction":51,"./isString":54}],51:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used for native 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 objToString = 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 older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 which returns 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -module.exports = isFunction; - -},{"./isObject":53}],52:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** 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 detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * 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 = isNative; - -},{"../internal/isObjectLike":43,"./isFunction":51}],53:[function(require,module,exports){ -/** - * 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; - -},{}],54:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for native 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 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; - -},{"../internal/isObjectLike":43}],55:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `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]', - 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[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - -/** Used for native 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 objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @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[objToString.call(value)]; -} - -module.exports = isTypedArray; - -},{"../internal/isLength":42,"../internal/isObjectLike":43}],56:[function(require,module,exports){ -var assignWith = require('../internal/assignWith'), - baseAssign = require('../internal/baseAssign'), - createAssigner = require('../internal/createAssigner'); - -/** - * 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's 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`](http://ecma-international.org/ecma-262/6.0/#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; - -},{"../internal/assignWith":9,"../internal/baseAssign":10,"../internal/createAssigner":29}],57:[function(require,module,exports){ -var baseAssign = require('../internal/baseAssign'), - baseCreate = require('../internal/baseCreate'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates an object that inherits from the given `prototype` object. If a - * `properties` object is provided its own enumerable properties are assigned - * to the created object. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ -function create(prototype, properties, guard) { - var result = baseCreate(prototype); - if (guard && isIterateeCall(prototype, properties, guard)) { - properties = undefined; - } - return properties ? baseAssign(result, properties) : result; -} - -module.exports = create; - -},{"../internal/baseAssign":10,"../internal/baseCreate":13,"../internal/isIterateeCall":40}],58:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isArrayLike = require('../internal/isArrayLike'), - isObject = require('../lang/isObject'), - shimKeys = require('../internal/shimKeys'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * 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) : []; -}; - -module.exports = keys; - -},{"../internal/getNative":37,"../internal/isArrayLike":38,"../internal/shimKeys":45,"../lang/isObject":53}],59:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('../internal/isIndex'), - isLength = require('../internal/isLength'), - isObject = require('../lang/isObject'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; - -},{"../internal/isIndex":39,"../internal/isLength":42,"../lang/isArguments":48,"../lang/isArray":49,"../lang/isObject":53}],60:[function(require,module,exports){ -var keys = require('./keys'), - toObject = require('../internal/toObject'); - -/** - * 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; - -},{"../internal/toObject":46,"./keys":58}],61:[function(require,module,exports){ -/** - * 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 = identity; - -},{}],62:[function(require,module,exports){ -var baseProperty = require('../internal/baseProperty'), - basePropertyDeep = require('../internal/basePropertyDeep'), - isKey = require('../internal/isKey'); - -/** - * 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 = property; - -},{"../internal/baseProperty":24,"../internal/basePropertyDeep":25,"../internal/isKey":41}],63:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLAttribute, create; - - create = require('lodash/object/create'); - - module.exports = XMLAttribute = (function() { - function XMLAttribute(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing attribute name of element " + parent.name); - } - if (value == null) { - throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); - } - this.name = this.stringify.attName(name); - this.value = this.stringify.attValue(value); - } - - XMLAttribute.prototype.clone = function() { - return create(XMLAttribute.prototype, this); - }; - - XMLAttribute.prototype.toString = function(options, level) { - return ' ' + this.name + '="' + this.value + '"'; - }; - - return XMLAttribute; - - })(); - -}).call(this); - -},{"lodash/object/create":57}],64:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; - - XMLStringifier = require('./XMLStringifier'); - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLElement = require('./XMLElement'); - - module.exports = XMLBuilder = (function() { - function XMLBuilder(name, options) { - var root, temp; - if (name == null) { - throw new Error("Root element needs a name"); - } - if (options == null) { - options = {}; - } - this.options = options; - this.stringify = new XMLStringifier(options); - temp = new XMLElement(this, 'doc'); - root = temp.element(name); - root.isRoot = true; - root.documentObject = this; - this.rootObject = root; - if (!options.headless) { - root.declaration(options); - if ((options.pubID != null) || (options.sysID != null)) { - root.doctype(options); - } - } - } - - XMLBuilder.prototype.root = function() { - return this.rootObject; - }; - - XMLBuilder.prototype.end = function(options) { - return this.toString(options); - }; - - XMLBuilder.prototype.toString = function(options) { - var indent, newline, offset, pretty, r, ref, ref1, ref2; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - r = ''; - if (this.xmldec != null) { - r += this.xmldec.toString(options); - } - if (this.doctype != null) { - r += this.doctype.toString(options); - } - r += this.rootObject.toString(options); - if (pretty && r.slice(-newline.length) === newline) { - r = r.slice(0, -newline.length); - } - return r; - }; - - return XMLBuilder; - - })(); - -}).call(this); - -},{"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLStringifier":77}],65:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLNode, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLCData = (function(superClass) { - extend(XMLCData, superClass); - - function XMLCData(parent, text) { - XMLCData.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing CDATA text"); - } - this.text = this.stringify.cdata(text); - } - - XMLCData.prototype.clone = function() { - return create(XMLCData.prototype, this); - }; - - XMLCData.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLCData; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":74,"lodash/object/create":57}],66:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLComment, XMLNode, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLComment = (function(superClass) { - extend(XMLComment, superClass); - - function XMLComment(parent, text) { - XMLComment.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing comment text"); - } - this.text = this.stringify.comment(text); - } - - XMLComment.prototype.clone = function() { - return create(XMLComment.prototype, this); - }; - - XMLComment.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLComment; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":74,"lodash/object/create":57}],67:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDAttList, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDAttList = (function() { - function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { - this.stringify = parent.stringify; - if (elementName == null) { - throw new Error("Missing DTD element name"); - } - if (attributeName == null) { - throw new Error("Missing DTD attribute name"); - } - if (!attributeType) { - throw new Error("Missing DTD attribute type"); - } - if (!defaultValueType) { - throw new Error("Missing DTD attribute default"); - } - if (defaultValueType.indexOf('#') !== 0) { - defaultValueType = '#' + defaultValueType; - } - if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { - throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); - } - if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { - throw new Error("Default value only applies to #FIXED or #DEFAULT"); - } - this.elementName = this.stringify.eleName(elementName); - this.attributeName = this.stringify.attName(attributeName); - this.attributeType = this.stringify.dtdAttType(attributeType); - this.defaultValue = this.stringify.dtdAttDefault(defaultValue); - this.defaultValueType = defaultValueType; - } - - XMLDTDAttList.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDAttList; - - })(); - -}).call(this); - -},{"lodash/object/create":57}],68:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDElement, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDElement = (function() { - function XMLDTDElement(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing DTD element name"); - } - if (!value) { - value = '(#PCDATA)'; - } - if (Array.isArray(value)) { - value = '(' + value.join(',') + ')'; - } - this.name = this.stringify.eleName(name); - this.value = this.stringify.dtdElementValue(value); - } - - XMLDTDElement.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDElement; - - })(); - -}).call(this); - -},{"lodash/object/create":57}],69:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDEntity, create, isObject; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - module.exports = XMLDTDEntity = (function() { - function XMLDTDEntity(parent, pe, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing entity name"); - } - if (value == null) { - throw new Error("Missing entity value"); - } - this.pe = !!pe; - this.name = this.stringify.eleName(name); - if (!isObject(value)) { - this.value = this.stringify.dtdEntityValue(value); - } else { - if (!value.pubID && !value.sysID) { - throw new Error("Public and/or system identifiers are required for an external entity"); - } - if (value.pubID && !value.sysID) { - throw new Error("System identifier is required for a public external entity"); - } - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - if (value.nData != null) { - this.nData = this.stringify.dtdNData(value.nData); - } - if (this.pe && this.nData) { - throw new Error("Notation declaration is not allowed in a parameter entity"); - } - } - } - - XMLDTDEntity.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDEntity; - - })(); - -}).call(this); - -},{"lodash/lang/isObject":53,"lodash/object/create":57}],70:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDNotation, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDNotation = (function() { - function XMLDTDNotation(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing notation name"); - } - if (!value.pubID && !value.sysID) { - throw new Error("Public or system identifiers are required for an external entity"); - } - this.name = this.stringify.eleName(name); - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - } - - XMLDTDNotation.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDNotation; - - })(); - -}).call(this); - -},{"lodash/object/create":57}],71:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDeclaration, XMLNode, create, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLDeclaration = (function(superClass) { - extend(XMLDeclaration, superClass); - - function XMLDeclaration(parent, version, encoding, standalone) { - var ref; - XMLDeclaration.__super__.constructor.call(this, parent); - if (isObject(version)) { - ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; - } - if (!version) { - version = '1.0'; - } - this.version = this.stringify.xmlVersion(version); - if (encoding != null) { - this.encoding = this.stringify.xmlEncoding(encoding); - } - if (standalone != null) { - this.standalone = this.stringify.xmlStandalone(standalone); - } - } - - XMLDeclaration.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDeclaration; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":74,"lodash/lang/isObject":53,"lodash/object/create":57}],72:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - module.exports = XMLDocType = (function() { - function XMLDocType(parent, pubID, sysID) { - var ref, ref1; - this.documentObject = parent; - this.stringify = this.documentObject.stringify; - this.children = []; - if (isObject(pubID)) { - ref = pubID, pubID = ref.pubID, sysID = ref.sysID; - } - if (sysID == null) { - ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; - } - if (pubID != null) { - this.pubID = this.stringify.dtdPubID(pubID); - } - if (sysID != null) { - this.sysID = this.stringify.dtdSysID(sysID); - } - } - - XMLDocType.prototype.element = function(name, value) { - var child; - child = new XMLDTDElement(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var child; - child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.entity = function(name, value) { - var child; - child = new XMLDTDEntity(this, false, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.pEntity = function(name, value) { - var child; - child = new XMLDTDEntity(this, true, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.notation = function(name, value) { - var child; - child = new XMLDTDNotation(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.instruction = function(target, value) { - var child; - child = new XMLProcessingInstruction(this, target, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.root = function() { - return this.documentObject.root(); - }; - - XMLDocType.prototype.document = function() { - return this.documentObject; - }; - - XMLDocType.prototype.toString = function(options, level) { - var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ' 0) { - r += ' ['; - if (pretty) { - r += newline; - } - ref3 = this.children; - for (i = 0, len = ref3.length; i < len; i++) { - child = ref3[i]; - r += child.toString(options, level + 1); - } - r += ']'; - } - r += '>'; - if (pretty) { - r += newline; - } - return r; - }; - - XMLDocType.prototype.ele = function(name, value) { - return this.element(name, value); - }; - - XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); - }; - - XMLDocType.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocType.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocType.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - XMLDocType.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLDocType.prototype.com = function(value) { - return this.comment(value); - }; - - XMLDocType.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocType.prototype.up = function() { - return this.root(); - }; - - XMLDocType.prototype.doc = function() { - return this.document(); - }; - - return XMLDocType; - - })(); - -}).call(this); - -},{"./XMLCData":65,"./XMLComment":66,"./XMLDTDAttList":67,"./XMLDTDElement":68,"./XMLDTDEntity":69,"./XMLDTDNotation":70,"./XMLProcessingInstruction":75,"lodash/lang/isObject":53,"lodash/object/create":57}],73:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - isFunction = require('lodash/lang/isFunction'); - - every = require('lodash/collection/every'); - - XMLNode = require('./XMLNode'); - - XMLAttribute = require('./XMLAttribute'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - module.exports = XMLElement = (function(superClass) { - extend(XMLElement, superClass); - - function XMLElement(parent, name, attributes) { - XMLElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing element name"); - } - this.name = this.stringify.eleName(name); - this.children = []; - this.instructions = []; - this.attributes = {}; - if (attributes != null) { - this.attribute(attributes); - } - } - - XMLElement.prototype.clone = function() { - var att, attName, clonedSelf, i, len, pi, ref, ref1; - clonedSelf = create(XMLElement.prototype, this); - if (clonedSelf.isRoot) { - clonedSelf.documentObject = null; - } - clonedSelf.attributes = {}; - ref = this.attributes; - for (attName in ref) { - if (!hasProp.call(ref, attName)) continue; - att = ref[attName]; - clonedSelf.attributes[attName] = att.clone(); - } - clonedSelf.instructions = []; - ref1 = this.instructions; - for (i = 0, len = ref1.length; i < len; i++) { - pi = ref1[i]; - clonedSelf.instructions.push(pi.clone()); - } - clonedSelf.children = []; - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - return clonedSelf; - }; - - XMLElement.prototype.attribute = function(name, value) { - var attName, attValue; - if (name != null) { - name = name.valueOf(); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (!this.options.skipNullAttributes || (value != null)) { - this.attributes[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLElement.prototype.removeAttribute = function(name) { - var attName, i, len; - if (name == null) { - throw new Error("Missing attribute name"); - } - name = name.valueOf(); - if (Array.isArray(name)) { - for (i = 0, len = name.length; i < len; i++) { - attName = name[i]; - delete this.attributes[attName]; - } - } else { - delete this.attributes[name]; - } - return this; - }; - - XMLElement.prototype.instruction = function(target, value) { - var i, insTarget, insValue, instruction, len; - if (target != null) { - target = target.valueOf(); - } - if (value != null) { - value = value.valueOf(); - } - if (Array.isArray(target)) { - for (i = 0, len = target.length; i < len; i++) { - insTarget = target[i]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - instruction = new XMLProcessingInstruction(this, target, value); - this.instructions.push(instruction); - } - return this; - }; - - XMLElement.prototype.toString = function(options, level) { - var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - ref3 = this.instructions; - for (i = 0, len = ref3.length; i < len; i++) { - instruction = ref3[i]; - r += instruction.toString(options, level); - } - if (pretty) { - r += space; - } - r += '<' + this.name; - ref4 = this.attributes; - for (name in ref4) { - if (!hasProp.call(ref4, name)) continue; - att = ref4[name]; - r += att.toString(options); - } - if (this.children.length === 0 || every(this.children, function(e) { - return e.value === ''; - })) { - r += '/>'; - if (pretty) { - r += newline; - } - } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { - r += '>'; - r += this.children[0].value; - r += ''; - r += newline; - } else { - r += '>'; - if (pretty) { - r += newline; - } - ref5 = this.children; - for (j = 0, len1 = ref5.length; j < len1; j++) { - child = ref5[j]; - r += child.toString(options, level + 1); - } - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - } - return r; - }; - - XMLElement.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLElement.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - return XMLElement; - - })(XMLNode); - -}).call(this); - -},{"./XMLAttribute":63,"./XMLNode":74,"./XMLProcessingInstruction":75,"lodash/collection/every":5,"lodash/lang/isFunction":51,"lodash/lang/isObject":53,"lodash/object/create":57}],74:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, - hasProp = {}.hasOwnProperty; - - isObject = require('lodash/lang/isObject'); - - isFunction = require('lodash/lang/isFunction'); - - isEmpty = require('lodash/lang/isEmpty'); - - XMLElement = null; - - XMLCData = null; - - XMLComment = null; - - XMLDeclaration = null; - - XMLDocType = null; - - XMLRaw = null; - - XMLText = null; - - module.exports = XMLNode = (function() { - function XMLNode(parent) { - this.parent = parent; - this.options = this.parent.options; - this.stringify = this.parent.stringify; - if (XMLElement === null) { - XMLElement = require('./XMLElement'); - XMLCData = require('./XMLCData'); - XMLComment = require('./XMLComment'); - XMLDeclaration = require('./XMLDeclaration'); - XMLDocType = require('./XMLDocType'); - XMLRaw = require('./XMLRaw'); - XMLText = require('./XMLText'); - } - } - - XMLNode.prototype.element = function(name, attributes, text) { - var childNode, item, j, k, key, lastChild, len, len1, ref, val; - lastChild = null; - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref = [attributes, text], text = ref[0], attributes = ref[1]; - } - if (name != null) { - name = name.valueOf(); - } - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - item = name[j]; - lastChild = this.element(item); - } - } else if (isFunction(name)) { - lastChild = this.element(name.apply()); - } else if (isObject(name)) { - for (key in name) { - if (!hasProp.call(name, key)) continue; - val = name[key]; - if (isFunction(val)) { - val = val.apply(); - } - if ((isObject(val)) && (isEmpty(val))) { - val = null; - } - if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { - lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); - } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { - lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); - } else if (Array.isArray(val)) { - for (k = 0, len1 = val.length; k < len1; k++) { - item = val[k]; - childNode = {}; - childNode[key] = item; - lastChild = this.element(childNode); - } - } else if (isObject(val)) { - lastChild = this.element(key); - lastChild.element(val); - } else { - lastChild = this.element(key, val); - } - } - } else { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.text(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { - lastChild = this.cdata(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { - lastChild = this.comment(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { - lastChild = this.raw(text); - } else { - lastChild = this.node(name, attributes, text); - } - } - if (lastChild == null) { - throw new Error("Could not create any elements with: " + name); - } - return lastChild; - }; - - XMLNode.prototype.insertBefore = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.insertAfter = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.remove = function() { - var i, ref; - if (this.isRoot) { - throw new Error("Cannot remove the root element"); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; - return this.parent; - }; - - XMLNode.prototype.node = function(name, attributes, text) { - var child, ref; - if (name != null) { - name = name.valueOf(); - } - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref = [attributes, text], text = ref[0], attributes = ref[1]; - } - child = new XMLElement(this, name, attributes); - if (text != null) { - child.text(text); - } - this.children.push(child); - return child; - }; - - XMLNode.prototype.text = function(value) { - var child; - child = new XMLText(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.raw = function(value) { - var child; - child = new XMLRaw(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.declaration = function(version, encoding, standalone) { - var doc, xmldec; - doc = this.document(); - xmldec = new XMLDeclaration(doc, version, encoding, standalone); - doc.xmldec = xmldec; - return doc.root(); - }; - - XMLNode.prototype.doctype = function(pubID, sysID) { - var doc, doctype; - doc = this.document(); - doctype = new XMLDocType(doc, pubID, sysID); - doc.doctype = doctype; - return doctype; - }; - - XMLNode.prototype.up = function() { - if (this.isRoot) { - throw new Error("The root node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLNode.prototype.root = function() { - var child; - if (this.isRoot) { - return this; - } - child = this.parent; - while (!child.isRoot) { - child = child.parent; - } - return child; - }; - - XMLNode.prototype.document = function() { - return this.root().documentObject; - }; - - XMLNode.prototype.end = function(options) { - return this.document().toString(options); - }; - - XMLNode.prototype.prev = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node"); - } - return this.parent.children[i - 1]; - }; - - XMLNode.prototype.next = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node"); - } - return this.parent.children[i + 1]; - }; - - XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { - var clonedRoot; - clonedRoot = xmlbuilder.root().clone(); - clonedRoot.parent = this; - clonedRoot.isRoot = false; - this.children.push(clonedRoot); - return this; - }; - - XMLNode.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.txt = function(value) { - return this.text(value); - }; - - XMLNode.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.com = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.doc = function() { - return this.document(); - }; - - XMLNode.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLNode.prototype.dtd = function(pubID, sysID) { - return this.doctype(pubID, sysID); - }; - - XMLNode.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.t = function(value) { - return this.text(value); - }; - - XMLNode.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.c = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.r = function(value) { - return this.raw(value); - }; - - XMLNode.prototype.u = function() { - return this.up(); - }; - - return XMLNode; - - })(); - -}).call(this); - -},{"./XMLCData":65,"./XMLComment":66,"./XMLDeclaration":71,"./XMLDocType":72,"./XMLElement":73,"./XMLRaw":76,"./XMLText":78,"lodash/lang/isEmpty":50,"lodash/lang/isFunction":51,"lodash/lang/isObject":53}],75:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLProcessingInstruction, create; - - create = require('lodash/object/create'); - - module.exports = XMLProcessingInstruction = (function() { - function XMLProcessingInstruction(parent, target, value) { - this.stringify = parent.stringify; - if (target == null) { - throw new Error("Missing instruction target"); - } - this.target = this.stringify.insTarget(target); - if (value) { - this.value = this.stringify.insValue(value); - } - } - - XMLProcessingInstruction.prototype.clone = function() { - return create(XMLProcessingInstruction.prototype, this); - }; - - XMLProcessingInstruction.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLProcessingInstruction; - - })(); - -}).call(this); - -},{"lodash/object/create":57}],76:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLNode, XMLRaw, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLRaw = (function(superClass) { - extend(XMLRaw, superClass); - - function XMLRaw(parent, text) { - XMLRaw.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing raw text"); - } - this.value = this.stringify.raw(text); - } - - XMLRaw.prototype.clone = function() { - return create(XMLRaw.prototype, this); - }; - - XMLRaw.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += this.value; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLRaw; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":74,"lodash/object/create":57}],77:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLStringifier, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - hasProp = {}.hasOwnProperty; - - module.exports = XMLStringifier = (function() { - function XMLStringifier(options) { - this.assertLegalChar = bind(this.assertLegalChar, this); - var key, ref, value; - this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; - ref = (options != null ? options.stringify : void 0) || {}; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this[key] = value; - } - } - - XMLStringifier.prototype.eleName = function(val) { - val = '' + val || ''; - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.eleText = function(val) { - val = '' + val || ''; - return this.assertLegalChar(this.elEscape(val)); - }; - - XMLStringifier.prototype.cdata = function(val) { - val = '' + val || ''; - if (val.match(/]]>/)) { - throw new Error("Invalid CDATA text: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.comment = function(val) { - val = '' + val || ''; - if (val.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.raw = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.attName = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.attValue = function(val) { - val = '' + val || ''; - return this.attEscape(val); - }; - - XMLStringifier.prototype.insTarget = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.insValue = function(val) { - val = '' + val || ''; - if (val.match(/\?>/)) { - throw new Error("Invalid processing instruction value: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlVersion = function(val) { - val = '' + val || ''; - if (!val.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlEncoding = function(val) { - val = '' + val || ''; - if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { - throw new Error("Invalid encoding: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlStandalone = function(val) { - if (val) { - return "yes"; - } else { - return "no"; - } - }; - - XMLStringifier.prototype.dtdPubID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdSysID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdElementValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttType = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttDefault = function(val) { - if (val != null) { - return '' + val || ''; - } else { - return val; - } - }; - - XMLStringifier.prototype.dtdEntityValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdNData = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.convertAttKey = '@'; - - XMLStringifier.prototype.convertPIKey = '?'; - - XMLStringifier.prototype.convertTextKey = '#text'; - - XMLStringifier.prototype.convertCDataKey = '#cdata'; - - XMLStringifier.prototype.convertCommentKey = '#comment'; - - XMLStringifier.prototype.convertRawKey = '#raw'; - - XMLStringifier.prototype.assertLegalChar = function(str) { - var chars, chr; - if (this.allowSurrogateChars) { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; - } else { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; - } - chr = str.match(chars); - if (chr) { - throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); - } - return str; - }; - - XMLStringifier.prototype.elEscape = function(str) { - return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); - }; - - XMLStringifier.prototype.attEscape = function(str) { - return str.replace(/&/g, '&').replace(/, - * and raw CDATA nodes. - * - * @param {Element} node - * @returns {Boolean} - * @api private - */ - -function shouldIgnoreNode (node) { - return node.nodeType === 3 // text - || node.nodeType === 8 // comment - || node.nodeType === 4; // cdata -} - - -/** - * Parses a Plist XML string. Returns an Object. - * - * @param {String} xml - the XML String to decode - * @returns {Mixed} the decoded value from the Plist XML - * @api public - */ - -function parse (xml) { - var doc = new DOMParser().parseFromString(xml); - if (doc.documentElement.nodeName !== 'plist') { - throw new Error('malformed document. First element should be '); - } - var plist = parsePlistXML(doc.documentElement); - - // the root node gets interpreted as an Array, - // so pull out the inner data first - if (plist.length == 1) plist = plist[0]; - - return plist; -} - -/** - * Parses a Plist XML string. Returns an Object. Takes a `callback` function. - * - * @param {String} xml - the XML String to decode - * @param {Function} callback - callback function - * @returns {Mixed} the decoded value from the Plist XML - * @api public - * @deprecated not actually async. use parse() instead - */ - -function parseString (xml, callback) { - var doc, error, plist; - try { - doc = new DOMParser().parseFromString(xml); - plist = parsePlistXML(doc.documentElement); - } catch(e) { - error = e; - } - callback(error, plist); -} - -/** - * Parses a Plist XML string. Returns an Object. - * - * @param {String} xml - the XML String to decode - * @param {Function} callback - callback function - * @returns {Mixed} the decoded value from the Plist XML - * @api public - * @deprecated use parse() instead - */ - -function parseStringSync (xml) { - var doc = new DOMParser().parseFromString(xml); - var plist; - if (doc.documentElement.nodeName !== 'plist') { - throw new Error('malformed document. First element should be '); - } - plist = parsePlistXML(doc.documentElement); - - // if the plist is an array with 1 element, pull it out of the array - if (plist.length == 1) { - plist = plist[0]; - } - return plist; -} - -/** - * Convert an XML based plist document into a JSON representation. - * - * @param {Object} xml_node - current XML node in the plist - * @returns {Mixed} built up JSON object - * @api private - */ - -function parsePlistXML (node) { - var i, new_obj, key, val, new_arr, res, d; - - if (!node) - return null; - - if (node.nodeName === 'plist') { - new_arr = []; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - new_arr.push( parsePlistXML(node.childNodes[i])); - } - } - return new_arr; - - } else if (node.nodeName === 'dict') { - new_obj = {}; - key = null; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - if (key === null) { - key = parsePlistXML(node.childNodes[i]); - } else { - new_obj[key] = parsePlistXML(node.childNodes[i]); - key = null; - } - } - } - return new_obj; - - } else if (node.nodeName === 'array') { - new_arr = []; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - res = parsePlistXML(node.childNodes[i]); - if (null != res) new_arr.push(res); - } - } - return new_arr; - - } else if (node.nodeName === '#text') { - // TODO: what should we do with text types? (CDATA sections) - - } else if (node.nodeName === 'key') { - return node.childNodes[0].nodeValue; - - } else if (node.nodeName === 'string') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - res += node.childNodes[d].nodeValue; - } - return res; - - } else if (node.nodeName === 'integer') { - // parse as base 10 integer - return parseInt(node.childNodes[0].nodeValue, 10); - - } else if (node.nodeName === 'real') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - if (node.childNodes[d].nodeType === 3) { - res += node.childNodes[d].nodeValue; - } - } - return parseFloat(res); - - } else if (node.nodeName === 'data') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - if (node.childNodes[d].nodeType === 3) { - res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); - } - } - - // decode base64 data to a Buffer instance - return new Buffer(res, 'base64'); - - } else if (node.nodeName === 'date') { - return new Date(node.childNodes[0].nodeValue); - - } else if (node.nodeName === 'true') { - return true; - - } else if (node.nodeName === 'false') { - return false; - } -} - -}).call(this,require("buffer").Buffer) -},{"buffer":3,"util-deprecate":6,"xmldom":7}],2:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],3:[function(require,module,exports){ -(function (global){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -function typedArraySupport () { - function Bar () {} - try { - var arr = new Uint8Array(1) - arr.foo = function () { return 42 } - arr.constructor = Bar - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - this.length = 0 - this.parent = undefined - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined') { - if (object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - if (object instanceof ArrayBuffer) { - return fromArrayBuffer(that, object) - } - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - array.byteLength - that = Buffer._augment(new Uint8Array(array)) - } else { - // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, new Uint8Array(array)) - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined - -function slowToString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` is deprecated -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` is deprecated -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"base64-js":2,"ieee754":4,"is-array":5}],4:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],5:[function(require,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],6:[function(require,module,exports){ -(function (global){ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],7:[function(require,module,exports){ -function DOMParser(options){ - this.options = options ||{locator:{}}; - -} -DOMParser.prototype.parseFromString = function(source,mimeType){ - var options = this.options; - var sax = new XMLReader(); - var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler - var errorHandler = options.errorHandler; - var locator = options.locator; - var defaultNSMap = options.xmlns||{}; - var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} - if(locator){ - domBuilder.setDocumentLocator(locator) - } - - sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); - sax.domBuilder = options.domBuilder || domBuilder; - if(/\/x?html?$/.test(mimeType)){ - entityMap.nbsp = '\xa0'; - entityMap.copy = '\xa9'; - defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; - } - if(source){ - sax.parse(source,defaultNSMap,entityMap); - }else{ - sax.errorHandler.error("invalid document source"); - } - return domBuilder.document; -} -function buildErrorHandler(errorImpl,domBuilder,locator){ - if(!errorImpl){ - if(domBuilder instanceof DOMHandler){ - return domBuilder; - } - errorImpl = domBuilder ; - } - var errorHandler = {} - var isCallback = errorImpl instanceof Function; - locator = locator||{} - function build(key){ - var fn = errorImpl[key]; - if(!fn){ - if(isCallback){ - fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; - }else{ - var i=arguments.length; - while(--i){ - if(fn = errorImpl[arguments[i]]){ - break; - } - } - } - } - errorHandler[key] = fn && function(msg){ - fn(msg+_locator(locator)); - }||function(){}; - } - build('warning','warn'); - build('error','warn','warning'); - build('fatalError','warn','warning','error'); - return errorHandler; -} -/** - * +ContentHandler+ErrorHandler - * +LexicalHandler+EntityResolver2 - * -DeclHandler-DTDHandler - * - * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler - * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 - * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html - */ -function DOMHandler() { - this.cdata = false; -} -function position(locator,node){ - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; -} -/** - * @see org.xml.sax.ContentHandler#startDocument - * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html - */ -DOMHandler.prototype = { - startDocument : function() { - this.document = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.document.documentURI = this.locator.systemId; - } - }, - startElement:function(namespaceURI, localName, qName, attrs) { - var doc = this.document; - var el = doc.createElementNS(namespaceURI, qName||localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - - this.locator && position(this.locator,el) - for (var i = 0 ; i < len; i++) { - var namespaceURI = attrs.getURI(i); - var value = attrs.getValue(i); - var qName = attrs.getQName(i); - var attr = doc.createAttributeNS(namespaceURI, qName); - if( attr.getOffset){ - position(attr.getOffset(1),attr) - } - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr) - } - }, - endElement:function(namespaceURI, localName, qName) { - var current = this.currentElement - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping:function(prefix, uri) { - }, - endPrefixMapping:function(prefix) { - }, - processingInstruction:function(target, data) { - var ins = this.document.createProcessingInstruction(target, data); - this.locator && position(this.locator,ins) - appendElement(this, ins); - }, - ignorableWhitespace:function(ch, start, length) { - }, - characters:function(chars, start, length) { - chars = _toString.apply(this,arguments) - //console.log(chars) - if(this.currentElement && chars){ - if (this.cdata) { - var charNode = this.document.createCDATASection(chars); - this.currentElement.appendChild(charNode); - } else { - var charNode = this.document.createTextNode(chars); - this.currentElement.appendChild(charNode); - } - this.locator && position(this.locator,charNode) - } - }, - skippedEntity:function(name) { - }, - endDocument:function() { - this.document.normalize(); - }, - setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ - locator.lineNumber = 0; - } - }, - //LexicalHandler - comment:function(chars, start, length) { - chars = _toString.apply(this,arguments) - var comm = this.document.createComment(chars); - this.locator && position(this.locator,comm) - appendElement(this, comm); - }, - - startCDATA:function() { - //used in characters() methods - this.cdata = true; - }, - endCDATA:function() { - this.cdata = false; - }, - - startDTD:function(name, publicId, systemId) { - var impl = this.document.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator,dt) - appendElement(this, dt); - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning:function(error) { - console.warn(error,_locator(this.locator)); - }, - error:function(error) { - console.error(error,_locator(this.locator)); - }, - fatalError:function(error) { - console.error(error,_locator(this.locator)); - throw error; - } -} -function _locator(l){ - if(l){ - return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' - } -} -function _toString(chars,start,length){ - if(typeof chars == 'string'){ - return chars.substr(start,length) - }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") - if(chars.length >= start+length || start){ - return new java.lang.String(chars,start,length)+''; - } - return chars; - } -} - -/* - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html - * used method of org.xml.sax.ext.LexicalHandler: - * #comment(chars, start, length) - * #startCDATA() - * #endCDATA() - * #startDTD(name, publicId, systemId) - * - * - * IGNORED method of org.xml.sax.ext.LexicalHandler: - * #endDTD() - * #startEntity(name) - * #endEntity(name) - * - * - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html - * IGNORED method of org.xml.sax.ext.DeclHandler - * #attributeDecl(eName, aName, type, mode, value) - * #elementDecl(name, model) - * #externalEntityDecl(name, publicId, systemId) - * #internalEntityDecl(name, value) - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html - * IGNORED method of org.xml.sax.EntityResolver2 - * #resolveEntity(String name,String publicId,String baseURI,String systemId) - * #resolveEntity(publicId, systemId) - * #getExternalSubset(name, baseURI) - * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html - * IGNORED method of org.xml.sax.DTDHandler - * #notationDecl(name, publicId, systemId) {}; - * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; - */ -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ - DOMHandler.prototype[key] = function(){return null} -}) - -/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ -function appendElement (hander,node) { - if (!hander.currentElement) { - hander.document.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } -}//appendChild and setAttributeNS are preformance key - -if(typeof require == 'function'){ - var XMLReader = require('./sax').XMLReader; - var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; - exports.XMLSerializer = require('./dom').XMLSerializer ; - exports.DOMParser = DOMParser; -} - -},{"./dom":8,"./sax":9}],8:[function(require,module,exports){ -/* - * DOM Level 2 - * Object DOMException - * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html - */ - -function copy(src,dest){ - for(var p in src){ - dest[p] = src[p]; - } -} -/** -^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? -^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? - */ -function _extends(Class,Super){ - var pt = Class.prototype; - if(Object.create){ - var ppt = Object.create(Super.prototype) - pt.__proto__ = ppt; - } - if(!(pt instanceof Super)){ - function t(){}; - t.prototype = Super.prototype; - t = new t(); - copy(pt,t); - Class.prototype = pt = t; - } - if(pt.constructor != Class){ - if(typeof Class != 'function'){ - console.error("unknow Class:"+Class) - } - pt.constructor = Class - } -} -var htmlns = 'http://www.w3.org/1999/xhtml' ; -// Node Types -var NodeType = {} -var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; -var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; -var TEXT_NODE = NodeType.TEXT_NODE = 3; -var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; -var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; -var ENTITY_NODE = NodeType.ENTITY_NODE = 6; -var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; -var COMMENT_NODE = NodeType.COMMENT_NODE = 8; -var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; -var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; -var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; -var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - -// ExceptionCode -var ExceptionCode = {} -var ExceptionMessage = {}; -var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); -var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); -var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); -var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); -var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); -var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); -var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); -var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); -var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); -var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); -//level2 -var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); -var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); -var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); -var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); -var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - - -function DOMException(code, message) { - if(message instanceof Error){ - var error = message; - }else{ - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); - } - error.code = code; - if(message) this.message = this.message + ": " + message; - return error; -}; -DOMException.prototype = Error.prototype; -copy(ExceptionCode,DOMException) -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 - * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. - * The items in the NodeList are accessible via an integral index, starting from 0. - */ -function NodeList() { -}; -NodeList.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length:0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(index) { - return this[index] || null; - } -}; -function LiveNodeList(node,refresh){ - this._node = node; - this._refresh = refresh - _updateLiveList(this); -} -function _updateLiveList(list){ - var inc = list._node._inc || list._node.ownerDocument._inc; - if(list._inc != inc){ - var ls = list._refresh(list._node); - //console.log(ls.length) - __set__(list,'length',ls.length); - copy(ls,list); - list._inc = inc; - } -} -LiveNodeList.prototype.item = function(i){ - _updateLiveList(this); - return this[i]; -} - -_extends(LiveNodeList,NodeList); -/** - * - * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. - * NamedNodeMap objects in the DOM are live. - * used for attributes or DocumentType entities - */ -function NamedNodeMap() { -}; - -function _findNodeIndex(list,node){ - var i = list.length; - while(i--){ - if(list[i] === node){return i} - } -} - -function _addNamedNode(el,list,newAttr,oldAttr){ - if(oldAttr){ - list[_findNodeIndex(list,oldAttr)] = newAttr; - }else{ - list[list.length++] = newAttr; - } - if(el){ - newAttr.ownerElement = el; - var doc = el.ownerDocument; - if(doc){ - oldAttr && _onRemoveAttribute(doc,el,oldAttr); - _onAddAttribute(doc,el,newAttr); - } - } -} -function _removeNamedNode(el,list,attr){ - var i = _findNodeIndex(list,attr); - if(i>=0){ - var lastIndex = list.length-1 - while(i0 || key == 'xmlns'){ -// return null; -// } - var i = this.length; - while(i--){ - var attr = this[i]; - if(attr.nodeName == key){ - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - /* returns Node */ - setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR - var el = attr.ownerElement, oldAttr; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - - /* returns Node */ - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - - - },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - - //for level2 - removeNamedItemNS:function(namespaceURI,localName){ - var attr = this.getNamedItemNS(namespaceURI,localName); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i = this.length; - while(i--){ - var node = this[i]; - if(node.localName == localName && node.namespaceURI == namespaceURI){ - return node; - } - } - return null; - } -}; -/** - * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 - */ -function DOMImplementation(/* Object */ features) { - this._features = {}; - if (features) { - for (var feature in features) { - this._features = features[feature]; - } - } -}; - -DOMImplementation.prototype = { - hasFeature: function(/* string */ feature, /* string */ version) { - var versions = this._features[feature.toLowerCase()]; - if (versions && (!version || version in versions)) { - return true; - } else { - return false; - } - }, - // Introduced in DOM Level 2: - createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR - var doc = new Document(); - doc.doctype = doctype; - if(doctype){ - doc.appendChild(doctype); - } - doc.implementation = this; - doc.childNodes = new NodeList(); - if(qualifiedName){ - var root = doc.createElementNS(namespaceURI,qualifiedName); - doc.appendChild(root); - } - return doc; - }, - // Introduced in DOM Level 2: - createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId; - node.systemId = systemId; - // Introduced in DOM Level 2: - //readonly attribute DOMString internalSubset; - - //TODO:.. - // readonly attribute NamedNodeMap entities; - // readonly attribute NamedNodeMap notations; - return node; - } -}; - - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 - */ - -function Node() { -}; - -Node.prototype = { - firstChild : null, - lastChild : null, - previousSibling : null, - nextSibling : null, - attributes : null, - parentNode : null, - childNodes : null, - ownerDocument : null, - nodeValue : null, - namespaceURI : null, - prefix : null, - localName : null, - // Modified in DOM Level 2: - insertBefore:function(newChild, refChild){//raises - return _insertBefore(this,newChild,refChild); - }, - replaceChild:function(newChild, oldChild){//raises - this.insertBefore(newChild,oldChild); - if(oldChild){ - this.removeChild(oldChild); - } - }, - removeChild:function(oldChild){ - return _removeChild(this,oldChild); - }, - appendChild:function(newChild){ - return this.insertBefore(newChild,null); - }, - hasChildNodes:function(){ - return this.firstChild != null; - }, - cloneNode:function(deep){ - return cloneNode(this.ownerDocument||this,this,deep); - }, - // Modified in DOM Level 2: - normalize:function(){ - var child = this.firstChild; - while(child){ - var next = child.nextSibling; - if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ - this.removeChild(next); - child.appendData(next.data); - }else{ - child.normalize(); - child = next; - } - } - }, - // Introduced in DOM Level 2: - isSupported:function(feature, version){ - return this.ownerDocument.implementation.hasFeature(feature,version); - }, - // Introduced in DOM Level 2: - hasAttributes:function(){ - return this.attributes.length>0; - }, - lookupPrefix:function(namespaceURI){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - for(var n in map){ - if(map[n] == namespaceURI){ - return n; - } - } - } - el = el.nodeType == 2?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI:function(prefix){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - if(prefix in map){ - return map[prefix] ; - } - } - el = el.nodeType == 2?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace:function(namespaceURI){ - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; - } -}; - - -function _xmlEncoder(c){ - return c == '<' && '<' || - c == '>' && '>' || - c == '&' && '&' || - c == '"' && '"' || - '&#'+c.charCodeAt()+';' -} - - -copy(NodeType,Node); -copy(NodeType,Node.prototype); - -/** - * @param callback return true for continue,false for break - * @return boolean true: break visit; - */ -function _visitNode(node,callback){ - if(callback(node)){ - return true; - } - if(node = node.firstChild){ - do{ - if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } -} - - - -function Document(){ -} -function _onAddAttribute(doc,el,newAttr){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value - } -} -function _onRemoveAttribute(doc,el,newAttr,remove){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - delete el._nsMap[newAttr.prefix?newAttr.localName:''] - } -} -function _onUpdateChild(doc,el,newChild){ - if(doc && doc._inc){ - doc._inc++; - //update childNodes - var cs = el.childNodes; - if(newChild){ - cs[cs.length++] = newChild; - }else{ - //console.log(1) - var child = el.firstChild; - var i = 0; - while(child){ - cs[i++] = child; - child =child.nextSibling; - } - cs.length = i; - } - } -} - -/** - * attributes; - * children; - * - * writeable properties: - * nodeValue,Attr:value,CharacterData:data - * prefix - */ -function _removeChild(parentNode,child){ - var previous = child.previousSibling; - var next = child.nextSibling; - if(previous){ - previous.nextSibling = next; - }else{ - parentNode.firstChild = next - } - if(next){ - next.previousSibling = previous; - }else{ - parentNode.lastChild = previous; - } - _onUpdateChild(parentNode.ownerDocument,parentNode); - return child; -} -/** - * preformance key(refChild == null) - */ -function _insertBefore(parentNode,newChild,nextChild){ - var cp = newChild.parentNode; - if(cp){ - cp.removeChild(newChild);//remove and update - } - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - var newFirst = newChild.firstChild; - if (newFirst == null) { - return newChild; - } - var newLast = newChild.lastChild; - }else{ - newFirst = newLast = newChild; - } - var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; - - newFirst.previousSibling = pre; - newLast.nextSibling = nextChild; - - - if(pre){ - pre.nextSibling = newFirst; - }else{ - parentNode.firstChild = newFirst; - } - if(nextChild == null){ - parentNode.lastChild = newLast; - }else{ - nextChild.previousSibling = newLast; - } - do{ - newFirst.parentNode = parentNode; - }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) - _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); - //console.log(parentNode.lastChild.nextSibling == null) - if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { - newChild.firstChild = newChild.lastChild = null; - } - return newChild; -} -function _appendSingleChild(parentNode,newChild){ - var cp = newChild.parentNode; - if(cp){ - var pre = parentNode.lastChild; - cp.removeChild(newChild);//remove and update - var pre = parentNode.lastChild; - } - var pre = parentNode.lastChild; - newChild.parentNode = parentNode; - newChild.previousSibling = pre; - newChild.nextSibling = null; - if(pre){ - pre.nextSibling = newChild; - }else{ - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); - return newChild; - //console.log("__aa",parentNode.lastChild.nextSibling == null) -} -Document.prototype = { - //implementation : null, - nodeName : '#document', - nodeType : DOCUMENT_NODE, - doctype : null, - documentElement : null, - _inc : 1, - - insertBefore : function(newChild, refChild){//raises - if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ - var child = newChild.firstChild; - while(child){ - var next = child.nextSibling; - this.insertBefore(child,refChild); - child = next; - } - return newChild; - } - if(this.documentElement == null && newChild.nodeType == 1){ - this.documentElement = newChild; - } - - return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; - }, - removeChild : function(oldChild){ - if(this.documentElement == oldChild){ - this.documentElement = null; - } - return _removeChild(this,oldChild); - }, - // Introduced in DOM Level 2: - importNode : function(importedNode,deep){ - return importNode(this,importedNode,deep); - }, - // Introduced in DOM Level 2: - getElementById : function(id){ - var rtv = null; - _visitNode(this.documentElement,function(node){ - if(node.nodeType == 1){ - if(node.getAttribute('id') == id){ - rtv = node; - return true; - } - } - }) - return rtv; - }, - - //document factory method: - createElement : function(tagName){ - var node = new Element(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment : function(){ - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode : function(data){ - var node = new Text(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createComment : function(data){ - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createCDATASection : function(data){ - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createProcessingInstruction : function(target,data){ - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.target = target; - node.nodeValue= node.data = data; - return node; - }, - createAttribute : function(name){ - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference : function(name){ - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - // Introduced in DOM Level 2: - createElementNS : function(namespaceURI,qualifiedName){ - var node = new Element(); - var pl = qualifiedName.split(':'); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - // Introduced in DOM Level 2: - createAttributeNS : function(namespaceURI,qualifiedName){ - var node = new Attr(); - var pl = qualifiedName.split(':'); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - return node; - } -}; -_extends(Document,Node); - - -function Element() { - this._nsMap = {}; -}; -Element.prototype = { - nodeType : ELEMENT_NODE, - hasAttribute : function(name){ - return this.getAttributeNode(name)!=null; - }, - getAttribute : function(name){ - var attr = this.getAttributeNode(name); - return attr && attr.value || ''; - }, - getAttributeNode : function(name){ - return this.attributes.getNamedItem(name); - }, - setAttribute : function(name, value){ - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - removeAttribute : function(name){ - var attr = this.getAttributeNode(name) - attr && this.removeAttributeNode(attr); - }, - - //four real opeartion method - appendChild:function(newChild){ - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - return this.insertBefore(newChild,null); - }else{ - return _appendSingleChild(this,newChild); - } - }, - setAttributeNode : function(newAttr){ - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS : function(newAttr){ - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode : function(oldAttr){ - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS : function(namespaceURI, localName){ - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - - hasAttributeNS : function(namespaceURI, localName){ - return this.getAttributeNodeNS(namespaceURI, localName)!=null; - }, - getAttributeNS : function(namespaceURI, localName){ - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ''; - }, - setAttributeNS : function(namespaceURI, qualifiedName, value){ - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = value; - this.setAttributeNode(attr) - }, - getAttributeNodeNS : function(namespaceURI, localName){ - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - - getElementsByTagName : function(tagName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS : function(namespaceURI, localName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ - ls.push(node); - } - }); - return ls; - }); - } -}; -Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; -Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; - - -_extends(Element,Node); -function Attr() { -}; -Attr.prototype.nodeType = ATTRIBUTE_NODE; -_extends(Attr,Node); - - -function CharacterData() { -}; -CharacterData.prototype = { - data : '', - substringData : function(offset, count) { - return this.data.substring(offset, offset+count); - }, - appendData: function(text) { - text = this.data+text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset,text) { - this.replaceData(offset,0,text); - - }, - appendChild:function(newChild){ - //if(!(newChild instanceof CharacterData)){ - throw new Error(ExceptionMessage[3]) - //} - return Node.prototype.appendChild.apply(this,arguments) - }, - deleteData: function(offset, count) { - this.replaceData(offset,count,""); - }, - replaceData: function(offset, count, text) { - var start = this.data.substring(0,offset); - var end = this.data.substring(offset+count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } -} -_extends(CharacterData,Node); -function Text() { -}; -Text.prototype = { - nodeName : "#text", - nodeType : TEXT_NODE, - splitText : function(offset) { - var text = this.data; - var newText = text.substring(offset); - text = text.substring(0, offset); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if(this.parentNode){ - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; - } -} -_extends(Text,CharacterData); -function Comment() { -}; -Comment.prototype = { - nodeName : "#comment", - nodeType : COMMENT_NODE -} -_extends(Comment,CharacterData); - -function CDATASection() { -}; -CDATASection.prototype = { - nodeName : "#cdata-section", - nodeType : CDATA_SECTION_NODE -} -_extends(CDATASection,CharacterData); - - -function DocumentType() { -}; -DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; -_extends(DocumentType,Node); - -function Notation() { -}; -Notation.prototype.nodeType = NOTATION_NODE; -_extends(Notation,Node); - -function Entity() { -}; -Entity.prototype.nodeType = ENTITY_NODE; -_extends(Entity,Node); - -function EntityReference() { -}; -EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; -_extends(EntityReference,Node); - -function DocumentFragment() { -}; -DocumentFragment.prototype.nodeName = "#document-fragment"; -DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; -_extends(DocumentFragment,Node); - - -function ProcessingInstruction() { -} -ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; -_extends(ProcessingInstruction,Node); -function XMLSerializer(){} -XMLSerializer.prototype.serializeToString = function(node){ - var buf = []; - serializeToString(node,buf); - return buf.join(''); -} -Node.prototype.toString =function(){ - return XMLSerializer.prototype.serializeToString(this); -} -function serializeToString(node,buf){ - switch(node.nodeType){ - case ELEMENT_NODE: - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - var isHTML = htmlns === node.namespaceURI - buf.push('<',nodeName); - for(var i=0;i'); - //if is cdata child node - if(isHTML && /^script$/i.test(nodeName)){ - if(child){ - buf.push(child.data); - } - }else{ - while(child){ - serializeToString(child,buf); - child = child.nextSibling; - } - } - buf.push(''); - }else{ - buf.push('/>'); - } - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while(child){ - serializeToString(child,buf); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); - case TEXT_NODE: - return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); - case CDATA_SECTION_NODE: - return buf.push( ''); - case COMMENT_NODE: - return buf.push( ""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push(''); - }else if(sysid && sysid!='.'){ - buf.push(' SYSTEM "',sysid,'">'); - }else{ - var sub = node.internalSubset; - if(sub){ - buf.push(" [",sub,"]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push( ""); - case ENTITY_REFERENCE_NODE: - return buf.push( '&',node.nodeName,';'); - //case ENTITY_NODE: - //case NOTATION_NODE: - default: - buf.push('??',node.nodeName); - } -} -function importNode(doc,node,deep){ - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - //var attrs = node2.attributes; - //var len = attrs.length; - //for(var i=0;i - -function XMLReader(){ - -} - -XMLReader.prototype = { - parse:function(source,defaultNSMap,entityMap){ - var domBuilder = this.domBuilder; - domBuilder.startDocument(); - _copy(defaultNSMap ,defaultNSMap = {}) - parse(source,defaultNSMap,entityMap, - domBuilder,this.errorHandler); - domBuilder.endDocument(); - } -} -function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ - function fixedFromCharCode(code) { - // String.prototype.fromCharCode does not supports - // > 2 bytes unicode chars directly - if (code > 0xffff) { - code -= 0x10000; - var surrogate1 = 0xd800 + (code >> 10) - , surrogate2 = 0xdc00 + (code & 0x3ff); - - return String.fromCharCode(surrogate1, surrogate2); - } else { - return String.fromCharCode(code); - } - } - function entityReplacer(a){ - var k = a.slice(1,-1); - if(k in entityMap){ - return entityMap[k]; - }else if(k.charAt(0) === '#'){ - return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) - }else{ - errorHandler.error('entity not found:'+a); - return a; - } - } - function appendText(end){//has some bugs - var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); - locator&&position(start); - domBuilder.characters(xt,0,end-start); - start = end - } - function position(start,m){ - while(start>=endPos && (m = linePattern.exec(source))){ - startPos = m.index; - endPos = startPos + m[0].length; - locator.lineNumber++; - //console.log('line++:',locator,startPos,endPos) - } - locator.columnNumber = start-startPos+1; - } - var startPos = 0; - var endPos = 0; - var linePattern = /.+(?:\r\n?|\n)|.*$/g - var locator = domBuilder.locator; - - var parseStack = [{currentNSMap:defaultNSMapCopy}] - var closeMap = {}; - var start = 0; - while(true){ - var i = source.indexOf('<',start); - if(i<0){ - if(!source.substr(start).match(/^\s*$/)){ - var doc = domBuilder.document; - var text = doc.createTextNode(source.substr(start)); - doc.appendChild(text); - domBuilder.currentElement = text; - } - return; - } - if(i>start){ - appendText(i); - } - switch(source.charAt(i+1)){ - case '/': - var end = source.indexOf('>',i+3); - var tagName = source.substring(i+2,end); - var config = parseStack.pop(); - var localNSMap = config.localNSMap; - - if(config.tagName != tagName){ - errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); - } - domBuilder.endElement(config.uri,config.localName,tagName); - if(localNSMap){ - for(var prefix in localNSMap){ - domBuilder.endPrefixMapping(prefix) ; - } - } - end++; - break; - // end elment - case '?':// - locator&&position(i); - end = parseInstruction(source,i,domBuilder); - break; - case '!':// 0){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - el.add(attrName,value,start-1); - s = S_E; - }else{ - //fatalError: no end quot match - throw new Error('attribute value no end \''+c+'\' match'); - } - }else if(s == S_V){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - //console.log(attrName,value,start,p) - el.add(attrName,value,start); - //console.dir(el) - errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); - start = p+1; - s = S_E - }else{ - //fatalError: no equal before - throw new Error('attribute value must after "="'); - } - break; - case '/': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_E: - case S_S: - case S_C: - s = S_C; - el.closed = true; - case S_V: - case S_ATTR: - case S_ATTR_S: - break; - //case S_EQ: - default: - throw new Error("attribute invalid close char('/')") - } - break; - case ''://end document - //throw new Error('unexpected end of input') - errorHandler.error('unexpected end of input'); - case '>': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_E: - case S_S: - case S_C: - break;//normal - case S_V://Compatible state - case S_ATTR: - value = source.slice(start,p); - if(value.slice(-1) === '/'){ - el.closed = true; - value = value.slice(0,-1) - } - case S_ATTR_S: - if(s === S_ATTR_S){ - value = attrName; - } - if(s == S_V){ - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) - }else{ - errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') - el.add(value,value,start) - } - break; - case S_EQ: - throw new Error('attribute value missed!!'); - } -// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) - return p; - /*xml space '\x20' | #x9 | #xD | #xA; */ - case '\u0080': - c = ' '; - default: - if(c<= ' '){//space - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p));//tagName - s = S_S; - break; - case S_ATTR: - attrName = source.slice(start,p) - s = S_ATTR_S; - break; - case S_V: - var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value,start) - case S_E: - s = S_S; - break; - //case S_S: - //case S_EQ: - //case S_ATTR_S: - // void();break; - //case S_C: - //ignore warning - } - }else{//not space -//S_TAG, S_ATTR, S_EQ, S_V -//S_ATTR_S, S_E, S_S, S_C - switch(s){ - //case S_TAG:void();break; - //case S_ATTR:void();break; - //case S_V:void();break; - case S_ATTR_S: - errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') - el.add(attrName,attrName,start); - start = p; - s = S_ATTR; - break; - case S_E: - errorHandler.warning('attribute space is required"'+attrName+'"!!') - case S_S: - s = S_ATTR; - start = p; - break; - case S_EQ: - s = S_V; - start = p; - break; - case S_C: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - } - p++; - } -} -/** - * @return end of the elementStartPart(end of elementEndPart for selfClosed el) - */ -function appendElement(el,domBuilder,parseStack){ - var tagName = el.tagName; - var localNSMap = null; - var currentNSMap = parseStack[parseStack.length-1].currentNSMap; - var i = el.length; - while(i--){ - var a = el[i]; - var qName = a.qName; - var value = a.value; - var nsp = qName.indexOf(':'); - if(nsp>0){ - var prefix = a.prefix = qName.slice(0,nsp); - var localName = qName.slice(nsp+1); - var nsPrefix = prefix === 'xmlns' && localName - }else{ - localName = qName; - prefix = null - nsPrefix = qName === 'xmlns' && '' - } - //can not set prefix,because prefix !== '' - a.localName = localName ; - //prefix == null for no ns prefix attribute - if(nsPrefix !== false){//hack!! - if(localNSMap == null){ - localNSMap = {} - //console.log(currentNSMap,0) - _copy(currentNSMap,currentNSMap={}) - //console.log(currentNSMap,1) - } - currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; - a.uri = 'http://www.w3.org/2000/xmlns/' - domBuilder.startPrefixMapping(nsPrefix, value) - } - } - var i = el.length; - while(i--){ - a = el[i]; - var prefix = a.prefix; - if(prefix){//no prefix attribute has no namespace - if(prefix === 'xml'){ - a.uri = 'http://www.w3.org/XML/1998/namespace'; - }if(prefix !== 'xmlns'){ - a.uri = currentNSMap[prefix] - - //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} - } - } - } - var nsp = tagName.indexOf(':'); - if(nsp>0){ - prefix = el.prefix = tagName.slice(0,nsp); - localName = el.localName = tagName.slice(nsp+1); - }else{ - prefix = null;//important!! - localName = el.localName = tagName; - } - //no prefix element has default namespace - var ns = el.uri = currentNSMap[prefix || '']; - domBuilder.startElement(ns,localName,tagName,el); - //endPrefixMapping and startPrefixMapping have not any help for dom builder - //localNSMap = null - if(el.closed){ - domBuilder.endElement(ns,localName,tagName); - if(localNSMap){ - for(prefix in localNSMap){ - domBuilder.endPrefixMapping(prefix) - } - } - }else{ - el.currentNSMap = currentNSMap; - el.localNSMap = localNSMap; - parseStack.push(el); - } -} -function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ - if(/^(?:script|textarea)$/i.test(tagName)){ - var elEndStart = source.indexOf('',elStartEnd); - var text = source.substring(elStartEnd+1,elEndStart); - if(/[&<]/.test(text)){ - if(/^script$/i.test(tagName)){ - //if(!/\]\]>/.test(text)){ - //lexHandler.startCDATA(); - domBuilder.characters(text,0,text.length); - //lexHandler.endCDATA(); - return elEndStart; - //} - }//}else{//text area - text = text.replace(/&#?\w+;/g,entityReplacer); - domBuilder.characters(text,0,text.length); - return elEndStart; - //} - - } - } - return elStartEnd+1; -} -function fixSelfClosed(source,elStartEnd,tagName,closeMap){ - //if(tagName in closeMap){ - var pos = closeMap[tagName]; - if(pos == null){ - //console.log(tagName) - pos = closeMap[tagName] = source.lastIndexOf('') - } - return pos',start+4); - //append comment source.substring(4,end)//, - * and raw CDATA nodes. - * - * @param {Element} node - * @returns {Boolean} - * @api private - */ - -function shouldIgnoreNode (node) { - return node.nodeType === 3 // text - || node.nodeType === 8 // comment - || node.nodeType === 4; // cdata -} - - -/** - * Parses a Plist XML string. Returns an Object. - * - * @param {String} xml - the XML String to decode - * @returns {Mixed} the decoded value from the Plist XML - * @api public - */ - -function parse (xml) { - var doc = new DOMParser().parseFromString(xml); - if (doc.documentElement.nodeName !== 'plist') { - throw new Error('malformed document. First element should be '); - } - var plist = parsePlistXML(doc.documentElement); - - // the root node gets interpreted as an Array, - // so pull out the inner data first - if (plist.length == 1) plist = plist[0]; - - return plist; -} - -/** - * Parses a Plist XML string. Returns an Object. Takes a `callback` function. - * - * @param {String} xml - the XML String to decode - * @param {Function} callback - callback function - * @returns {Mixed} the decoded value from the Plist XML - * @api public - * @deprecated not actually async. use parse() instead - */ - -function parseString (xml, callback) { - var doc, error, plist; - try { - doc = new DOMParser().parseFromString(xml); - plist = parsePlistXML(doc.documentElement); - } catch(e) { - error = e; - } - callback(error, plist); -} - -/** - * Parses a Plist XML string. Returns an Object. - * - * @param {String} xml - the XML String to decode - * @param {Function} callback - callback function - * @returns {Mixed} the decoded value from the Plist XML - * @api public - * @deprecated use parse() instead - */ - -function parseStringSync (xml) { - var doc = new DOMParser().parseFromString(xml); - var plist; - if (doc.documentElement.nodeName !== 'plist') { - throw new Error('malformed document. First element should be '); - } - plist = parsePlistXML(doc.documentElement); - - // if the plist is an array with 1 element, pull it out of the array - if (plist.length == 1) { - plist = plist[0]; - } - return plist; -} - -/** - * Convert an XML based plist document into a JSON representation. - * - * @param {Object} xml_node - current XML node in the plist - * @returns {Mixed} built up JSON object - * @api private - */ - -function parsePlistXML (node) { - var i, new_obj, key, val, new_arr, res, d; - - if (!node) - return null; - - if (node.nodeName === 'plist') { - new_arr = []; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - new_arr.push( parsePlistXML(node.childNodes[i])); - } - } - return new_arr; - - } else if (node.nodeName === 'dict') { - new_obj = {}; - key = null; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - if (key === null) { - key = parsePlistXML(node.childNodes[i]); - } else { - new_obj[key] = parsePlistXML(node.childNodes[i]); - key = null; - } - } - } - return new_obj; - - } else if (node.nodeName === 'array') { - new_arr = []; - for (i=0; i < node.childNodes.length; i++) { - // ignore comment nodes (text) - if (!shouldIgnoreNode(node.childNodes[i])) { - res = parsePlistXML(node.childNodes[i]); - if (null != res) new_arr.push(res); - } - } - return new_arr; - - } else if (node.nodeName === '#text') { - // TODO: what should we do with text types? (CDATA sections) - - } else if (node.nodeName === 'key') { - return node.childNodes[0].nodeValue; - - } else if (node.nodeName === 'string') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - res += node.childNodes[d].nodeValue; - } - return res; - - } else if (node.nodeName === 'integer') { - // parse as base 10 integer - return parseInt(node.childNodes[0].nodeValue, 10); - - } else if (node.nodeName === 'real') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - if (node.childNodes[d].nodeType === 3) { - res += node.childNodes[d].nodeValue; - } - } - return parseFloat(res); - - } else if (node.nodeName === 'data') { - res = ''; - for (d=0; d < node.childNodes.length; d++) { - if (node.childNodes[d].nodeType === 3) { - res += node.childNodes[d].nodeValue.replace(/\s+/g, ''); - } - } - - // decode base64 data to a Buffer instance - return new Buffer(res, 'base64'); - - } else if (node.nodeName === 'date') { - return new Date(node.childNodes[0].nodeValue); - - } else if (node.nodeName === 'true') { - return true; - - } else if (node.nodeName === 'false') { - return false; - } -} - -}).call(this,require("buffer").Buffer) -},{"buffer":7,"util-deprecate":70,"xmldom":88}],4:[function(require,module,exports){ - -var i; - -/** - * Parser functions. - */ - -var parserFunctions = require('./parse'); -for (i in parserFunctions) exports[i] = parserFunctions[i]; - -/** - * Builder functions. - */ - -var builderFunctions = require('./build'); -for (i in builderFunctions) exports[i] = builderFunctions[i]; - -/** - * Add Node.js-specific functions (they're deprecated…). - */ - -var nodeFunctions = require('./node'); -for (i in nodeFunctions) exports[i] = nodeFunctions[i]; - -},{"./build":1,"./node":2,"./parse":3}],5:[function(require,module,exports){ -var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - -;(function (exports) { - 'use strict'; - - var Arr = (typeof Uint8Array !== 'undefined') - ? Uint8Array - : Array - - var PLUS = '+'.charCodeAt(0) - var SLASH = '/'.charCodeAt(0) - var NUMBER = '0'.charCodeAt(0) - var LOWER = 'a'.charCodeAt(0) - var UPPER = 'A'.charCodeAt(0) - var PLUS_URL_SAFE = '-'.charCodeAt(0) - var SLASH_URL_SAFE = '_'.charCodeAt(0) - - function decode (elt) { - var code = elt.charCodeAt(0) - if (code === PLUS || - code === PLUS_URL_SAFE) - return 62 // '+' - if (code === SLASH || - code === SLASH_URL_SAFE) - return 63 // '/' - if (code < NUMBER) - return -1 //no match - if (code < NUMBER + 10) - return code - NUMBER + 26 + 26 - if (code < UPPER + 26) - return code - UPPER - if (code < LOWER + 26) - return code - LOWER + 26 - } - - function b64ToByteArray (b64) { - var i, j, l, tmp, placeHolders, arr - - if (b64.length % 4 > 0) { - throw new Error('Invalid string. Length must be a multiple of 4') - } - - // the number of equal signs (place holders) - // if there are two placeholders, than the two characters before it - // represent one byte - // if there is only one, then the three characters before it represent 2 bytes - // this is just a cheap hack to not do indexOf twice - var len = b64.length - placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0 - - // base64 is 4/3 + up to two characters of the original data - arr = new Arr(b64.length * 3 / 4 - placeHolders) - - // if there are placeholders, only get up to the last complete 4 chars - l = placeHolders > 0 ? b64.length - 4 : b64.length - - var L = 0 - - function push (v) { - arr[L++] = v - } - - for (i = 0, j = 0; i < l; i += 4, j += 3) { - tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3)) - push((tmp & 0xFF0000) >> 16) - push((tmp & 0xFF00) >> 8) - push(tmp & 0xFF) - } - - if (placeHolders === 2) { - tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4) - push(tmp & 0xFF) - } else if (placeHolders === 1) { - tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2) - push((tmp >> 8) & 0xFF) - push(tmp & 0xFF) - } - - return arr - } - - function uint8ToBase64 (uint8) { - var i, - extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes - output = "", - temp, length - - function encode (num) { - return lookup.charAt(num) - } - - function tripletToBase64 (num) { - return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F) - } - - // go through the array every three bytes, we'll deal with trailing stuff later - for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { - temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]) - output += tripletToBase64(temp) - } - - // pad the end with zeros, but make sure to not forget the extra bytes - switch (extraBytes) { - case 1: - temp = uint8[uint8.length - 1] - output += encode(temp >> 2) - output += encode((temp << 4) & 0x3F) - output += '==' - break - case 2: - temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]) - output += encode(temp >> 10) - output += encode((temp >> 4) & 0x3F) - output += encode((temp << 2) & 0x3F) - output += '=' - break - } - - return output - } - - exports.toByteArray = b64ToByteArray - exports.fromByteArray = uint8ToBase64 -}(typeof exports === 'undefined' ? (this.base64js = {}) : exports)) - -},{}],6:[function(require,module,exports){ - -},{}],7:[function(require,module,exports){ -(function (global){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -/* eslint-disable no-proto */ - -var base64 = require('base64-js') -var ieee754 = require('ieee754') -var isArray = require('is-array') - -exports.Buffer = Buffer -exports.SlowBuffer = SlowBuffer -exports.INSPECT_MAX_BYTES = 50 -Buffer.poolSize = 8192 // not used by this implementation - -var rootParent = {} - -/** - * If `Buffer.TYPED_ARRAY_SUPPORT`: - * === true Use Uint8Array implementation (fastest) - * === false Use Object implementation (most compatible, even IE6) - * - * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, - * Opera 11.6+, iOS 4.2+. - * - * Due to various browser bugs, sometimes the Object implementation will be used even - * when the browser supports typed arrays. - * - * Note: - * - * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances, - * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438. - * - * - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property - * on objects. - * - * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function. - * - * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of - * incorrect length in some situations. - - * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they - * get the Object implementation, which is slower but behaves correctly. - */ -Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined - ? global.TYPED_ARRAY_SUPPORT - : typedArraySupport() - -function typedArraySupport () { - function Bar () {} - try { - var arr = new Uint8Array(1) - arr.foo = function () { return 42 } - arr.constructor = Bar - return arr.foo() === 42 && // typed array instances can be augmented - arr.constructor === Bar && // constructor can be set - typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray` - arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray` - } catch (e) { - return false - } -} - -function kMaxLength () { - return Buffer.TYPED_ARRAY_SUPPORT - ? 0x7fffffff - : 0x3fffffff -} - -/** - * Class: Buffer - * ============= - * - * The Buffer constructor returns instances of `Uint8Array` that are augmented - * with function properties for all the node `Buffer` API functions. We use - * `Uint8Array` so that square bracket notation works as expected -- it returns - * a single octet. - * - * By augmenting the instances, we can avoid modifying the `Uint8Array` - * prototype. - */ -function Buffer (arg) { - if (!(this instanceof Buffer)) { - // Avoid going through an ArgumentsAdaptorTrampoline in the common case. - if (arguments.length > 1) return new Buffer(arg, arguments[1]) - return new Buffer(arg) - } - - this.length = 0 - this.parent = undefined - - // Common case. - if (typeof arg === 'number') { - return fromNumber(this, arg) - } - - // Slightly less common case. - if (typeof arg === 'string') { - return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8') - } - - // Unusual. - return fromObject(this, arg) -} - -function fromNumber (that, length) { - that = allocate(that, length < 0 ? 0 : checked(length) | 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) { - for (var i = 0; i < length; i++) { - that[i] = 0 - } - } - return that -} - -function fromString (that, string, encoding) { - if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8' - - // Assumption: byteLength() return value is always < kMaxLength. - var length = byteLength(string, encoding) | 0 - that = allocate(that, length) - - that.write(string, encoding) - return that -} - -function fromObject (that, object) { - if (Buffer.isBuffer(object)) return fromBuffer(that, object) - - if (isArray(object)) return fromArray(that, object) - - if (object == null) { - throw new TypeError('must start with number, buffer, array or string') - } - - if (typeof ArrayBuffer !== 'undefined') { - if (object.buffer instanceof ArrayBuffer) { - return fromTypedArray(that, object) - } - if (object instanceof ArrayBuffer) { - return fromArrayBuffer(that, object) - } - } - - if (object.length) return fromArrayLike(that, object) - - return fromJsonObject(that, object) -} - -function fromBuffer (that, buffer) { - var length = checked(buffer.length) | 0 - that = allocate(that, length) - buffer.copy(that, 0, 0, length) - return that -} - -function fromArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Duplicate of fromArray() to keep fromArray() monomorphic. -function fromTypedArray (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - // Truncating the elements is probably not what people expect from typed - // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior - // of the old Buffer constructor. - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -function fromArrayBuffer (that, array) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - array.byteLength - that = Buffer._augment(new Uint8Array(array)) - } else { - // Fallback: Return an object instance of the Buffer class - that = fromTypedArray(that, new Uint8Array(array)) - } - return that -} - -function fromArrayLike (that, array) { - var length = checked(array.length) | 0 - that = allocate(that, length) - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object. -// Returns a zero-length buffer for inputs that don't conform to the spec. -function fromJsonObject (that, object) { - var array - var length = 0 - - if (object.type === 'Buffer' && isArray(object.data)) { - array = object.data - length = checked(array.length) | 0 - } - that = allocate(that, length) - - for (var i = 0; i < length; i += 1) { - that[i] = array[i] & 255 - } - return that -} - -if (Buffer.TYPED_ARRAY_SUPPORT) { - Buffer.prototype.__proto__ = Uint8Array.prototype - Buffer.__proto__ = Uint8Array -} - -function allocate (that, length) { - if (Buffer.TYPED_ARRAY_SUPPORT) { - // Return an augmented `Uint8Array` instance, for best performance - that = Buffer._augment(new Uint8Array(length)) - that.__proto__ = Buffer.prototype - } else { - // Fallback: Return an object instance of the Buffer class - that.length = length - that._isBuffer = true - } - - var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1 - if (fromPool) that.parent = rootParent - - return that -} - -function checked (length) { - // Note: cannot use `length < kMaxLength` here because that fails when - // length is NaN (which is otherwise coerced to zero.) - if (length >= kMaxLength()) { - throw new RangeError('Attempt to allocate Buffer larger than maximum ' + - 'size: 0x' + kMaxLength().toString(16) + ' bytes') - } - return length | 0 -} - -function SlowBuffer (subject, encoding) { - if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding) - - var buf = new Buffer(subject, encoding) - delete buf.parent - return buf -} - -Buffer.isBuffer = function isBuffer (b) { - return !!(b != null && b._isBuffer) -} - -Buffer.compare = function compare (a, b) { - if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { - throw new TypeError('Arguments must be Buffers') - } - - if (a === b) return 0 - - var x = a.length - var y = b.length - - var i = 0 - var len = Math.min(x, y) - while (i < len) { - if (a[i] !== b[i]) break - - ++i - } - - if (i !== len) { - x = a[i] - y = b[i] - } - - if (x < y) return -1 - if (y < x) return 1 - return 0 -} - -Buffer.isEncoding = function isEncoding (encoding) { - switch (String(encoding).toLowerCase()) { - case 'hex': - case 'utf8': - case 'utf-8': - case 'ascii': - case 'binary': - case 'base64': - case 'raw': - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return true - default: - return false - } -} - -Buffer.concat = function concat (list, length) { - if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.') - - if (list.length === 0) { - return new Buffer(0) - } - - var i - if (length === undefined) { - length = 0 - for (i = 0; i < list.length; i++) { - length += list[i].length - } - } - - var buf = new Buffer(length) - var pos = 0 - for (i = 0; i < list.length; i++) { - var item = list[i] - item.copy(buf, pos) - pos += item.length - } - return buf -} - -function byteLength (string, encoding) { - if (typeof string !== 'string') string = '' + string - - var len = string.length - if (len === 0) return 0 - - // Use a for loop to avoid recursion - var loweredCase = false - for (;;) { - switch (encoding) { - case 'ascii': - case 'binary': - // Deprecated - case 'raw': - case 'raws': - return len - case 'utf8': - case 'utf-8': - return utf8ToBytes(string).length - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return len * 2 - case 'hex': - return len >>> 1 - case 'base64': - return base64ToBytes(string).length - default: - if (loweredCase) return utf8ToBytes(string).length // assume utf8 - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} -Buffer.byteLength = byteLength - -// pre-set for values that may exist in the future -Buffer.prototype.length = undefined -Buffer.prototype.parent = undefined - -function slowToString (encoding, start, end) { - var loweredCase = false - - start = start | 0 - end = end === undefined || end === Infinity ? this.length : end | 0 - - if (!encoding) encoding = 'utf8' - if (start < 0) start = 0 - if (end > this.length) end = this.length - if (end <= start) return '' - - while (true) { - switch (encoding) { - case 'hex': - return hexSlice(this, start, end) - - case 'utf8': - case 'utf-8': - return utf8Slice(this, start, end) - - case 'ascii': - return asciiSlice(this, start, end) - - case 'binary': - return binarySlice(this, start, end) - - case 'base64': - return base64Slice(this, start, end) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return utf16leSlice(this, start, end) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = (encoding + '').toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toString = function toString () { - var length = this.length | 0 - if (length === 0) return '' - if (arguments.length === 0) return utf8Slice(this, 0, length) - return slowToString.apply(this, arguments) -} - -Buffer.prototype.equals = function equals (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return true - return Buffer.compare(this, b) === 0 -} - -Buffer.prototype.inspect = function inspect () { - var str = '' - var max = exports.INSPECT_MAX_BYTES - if (this.length > 0) { - str = this.toString('hex', 0, max).match(/.{2}/g).join(' ') - if (this.length > max) str += ' ... ' - } - return '' -} - -Buffer.prototype.compare = function compare (b) { - if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') - if (this === b) return 0 - return Buffer.compare(this, b) -} - -Buffer.prototype.indexOf = function indexOf (val, byteOffset) { - if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff - else if (byteOffset < -0x80000000) byteOffset = -0x80000000 - byteOffset >>= 0 - - if (this.length === 0) return -1 - if (byteOffset >= this.length) return -1 - - // Negative offsets start from the end of the buffer - if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0) - - if (typeof val === 'string') { - if (val.length === 0) return -1 // special case: looking for empty string always fails - return String.prototype.indexOf.call(this, val, byteOffset) - } - if (Buffer.isBuffer(val)) { - return arrayIndexOf(this, val, byteOffset) - } - if (typeof val === 'number') { - if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') { - return Uint8Array.prototype.indexOf.call(this, val, byteOffset) - } - return arrayIndexOf(this, [ val ], byteOffset) - } - - function arrayIndexOf (arr, val, byteOffset) { - var foundIndex = -1 - for (var i = 0; byteOffset + i < arr.length; i++) { - if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) { - if (foundIndex === -1) foundIndex = i - if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex - } else { - foundIndex = -1 - } - } - return -1 - } - - throw new TypeError('val must be string, number or Buffer') -} - -// `get` is deprecated -Buffer.prototype.get = function get (offset) { - console.log('.get() is deprecated. Access using array indexes instead.') - return this.readUInt8(offset) -} - -// `set` is deprecated -Buffer.prototype.set = function set (v, offset) { - console.log('.set() is deprecated. Access using array indexes instead.') - return this.writeUInt8(v, offset) -} - -function hexWrite (buf, string, offset, length) { - offset = Number(offset) || 0 - var remaining = buf.length - offset - if (!length) { - length = remaining - } else { - length = Number(length) - if (length > remaining) { - length = remaining - } - } - - // must be an even number of digits - var strLen = string.length - if (strLen % 2 !== 0) throw new Error('Invalid hex string') - - if (length > strLen / 2) { - length = strLen / 2 - } - for (var i = 0; i < length; i++) { - var parsed = parseInt(string.substr(i * 2, 2), 16) - if (isNaN(parsed)) throw new Error('Invalid hex string') - buf[offset + i] = parsed - } - return i -} - -function utf8Write (buf, string, offset, length) { - return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) -} - -function asciiWrite (buf, string, offset, length) { - return blitBuffer(asciiToBytes(string), buf, offset, length) -} - -function binaryWrite (buf, string, offset, length) { - return asciiWrite(buf, string, offset, length) -} - -function base64Write (buf, string, offset, length) { - return blitBuffer(base64ToBytes(string), buf, offset, length) -} - -function ucs2Write (buf, string, offset, length) { - return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) -} - -Buffer.prototype.write = function write (string, offset, length, encoding) { - // Buffer#write(string) - if (offset === undefined) { - encoding = 'utf8' - length = this.length - offset = 0 - // Buffer#write(string, encoding) - } else if (length === undefined && typeof offset === 'string') { - encoding = offset - length = this.length - offset = 0 - // Buffer#write(string, offset[, length][, encoding]) - } else if (isFinite(offset)) { - offset = offset | 0 - if (isFinite(length)) { - length = length | 0 - if (encoding === undefined) encoding = 'utf8' - } else { - encoding = length - length = undefined - } - // legacy write(string, encoding, offset, length) - remove in v0.13 - } else { - var swap = encoding - encoding = offset - offset = length | 0 - length = swap - } - - var remaining = this.length - offset - if (length === undefined || length > remaining) length = remaining - - if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { - throw new RangeError('attempt to write outside buffer bounds') - } - - if (!encoding) encoding = 'utf8' - - var loweredCase = false - for (;;) { - switch (encoding) { - case 'hex': - return hexWrite(this, string, offset, length) - - case 'utf8': - case 'utf-8': - return utf8Write(this, string, offset, length) - - case 'ascii': - return asciiWrite(this, string, offset, length) - - case 'binary': - return binaryWrite(this, string, offset, length) - - case 'base64': - // Warning: maxLength not taken into account in base64Write - return base64Write(this, string, offset, length) - - case 'ucs2': - case 'ucs-2': - case 'utf16le': - case 'utf-16le': - return ucs2Write(this, string, offset, length) - - default: - if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) - encoding = ('' + encoding).toLowerCase() - loweredCase = true - } - } -} - -Buffer.prototype.toJSON = function toJSON () { - return { - type: 'Buffer', - data: Array.prototype.slice.call(this._arr || this, 0) - } -} - -function base64Slice (buf, start, end) { - if (start === 0 && end === buf.length) { - return base64.fromByteArray(buf) - } else { - return base64.fromByteArray(buf.slice(start, end)) - } -} - -function utf8Slice (buf, start, end) { - end = Math.min(buf.length, end) - var res = [] - - var i = start - while (i < end) { - var firstByte = buf[i] - var codePoint = null - var bytesPerSequence = (firstByte > 0xEF) ? 4 - : (firstByte > 0xDF) ? 3 - : (firstByte > 0xBF) ? 2 - : 1 - - if (i + bytesPerSequence <= end) { - var secondByte, thirdByte, fourthByte, tempCodePoint - - switch (bytesPerSequence) { - case 1: - if (firstByte < 0x80) { - codePoint = firstByte - } - break - case 2: - secondByte = buf[i + 1] - if ((secondByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) - if (tempCodePoint > 0x7F) { - codePoint = tempCodePoint - } - } - break - case 3: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) - if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { - codePoint = tempCodePoint - } - } - break - case 4: - secondByte = buf[i + 1] - thirdByte = buf[i + 2] - fourthByte = buf[i + 3] - if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { - tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) - if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { - codePoint = tempCodePoint - } - } - } - } - - if (codePoint === null) { - // we did not generate a valid codePoint so insert a - // replacement char (U+FFFD) and advance only 1 byte - codePoint = 0xFFFD - bytesPerSequence = 1 - } else if (codePoint > 0xFFFF) { - // encode to utf16 (surrogate pair dance) - codePoint -= 0x10000 - res.push(codePoint >>> 10 & 0x3FF | 0xD800) - codePoint = 0xDC00 | codePoint & 0x3FF - } - - res.push(codePoint) - i += bytesPerSequence - } - - return decodeCodePointsArray(res) -} - -// Based on http://stackoverflow.com/a/22747272/680742, the browser with -// the lowest limit is Chrome, with 0x10000 args. -// We go 1 magnitude less, for safety -var MAX_ARGUMENTS_LENGTH = 0x1000 - -function decodeCodePointsArray (codePoints) { - var len = codePoints.length - if (len <= MAX_ARGUMENTS_LENGTH) { - return String.fromCharCode.apply(String, codePoints) // avoid extra slice() - } - - // Decode in chunks to avoid "call stack size exceeded". - var res = '' - var i = 0 - while (i < len) { - res += String.fromCharCode.apply( - String, - codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) - ) - } - return res -} - -function asciiSlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i] & 0x7F) - } - return ret -} - -function binarySlice (buf, start, end) { - var ret = '' - end = Math.min(buf.length, end) - - for (var i = start; i < end; i++) { - ret += String.fromCharCode(buf[i]) - } - return ret -} - -function hexSlice (buf, start, end) { - var len = buf.length - - if (!start || start < 0) start = 0 - if (!end || end < 0 || end > len) end = len - - var out = '' - for (var i = start; i < end; i++) { - out += toHex(buf[i]) - } - return out -} - -function utf16leSlice (buf, start, end) { - var bytes = buf.slice(start, end) - var res = '' - for (var i = 0; i < bytes.length; i += 2) { - res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256) - } - return res -} - -Buffer.prototype.slice = function slice (start, end) { - var len = this.length - start = ~~start - end = end === undefined ? len : ~~end - - if (start < 0) { - start += len - if (start < 0) start = 0 - } else if (start > len) { - start = len - } - - if (end < 0) { - end += len - if (end < 0) end = 0 - } else if (end > len) { - end = len - } - - if (end < start) end = start - - var newBuf - if (Buffer.TYPED_ARRAY_SUPPORT) { - newBuf = Buffer._augment(this.subarray(start, end)) - } else { - var sliceLen = end - start - newBuf = new Buffer(sliceLen, undefined) - for (var i = 0; i < sliceLen; i++) { - newBuf[i] = this[i + start] - } - } - - if (newBuf.length) newBuf.parent = this.parent || this - - return newBuf -} - -/* - * Need to make sure that buffer isn't trying to write out of bounds. - */ -function checkOffset (offset, ext, length) { - if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') - if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') -} - -Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - - return val -} - -Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) { - checkOffset(offset, byteLength, this.length) - } - - var val = this[offset + --byteLength] - var mul = 1 - while (byteLength > 0 && (mul *= 0x100)) { - val += this[offset + --byteLength] * mul - } - - return val -} - -Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - return this[offset] -} - -Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return this[offset] | (this[offset + 1] << 8) -} - -Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - return (this[offset] << 8) | this[offset + 1] -} - -Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return ((this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16)) + - (this[offset + 3] * 0x1000000) -} - -Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] * 0x1000000) + - ((this[offset + 1] << 16) | - (this[offset + 2] << 8) | - this[offset + 3]) -} - -Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var val = this[offset] - var mul = 1 - var i = 0 - while (++i < byteLength && (mul *= 0x100)) { - val += this[offset + i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkOffset(offset, byteLength, this.length) - - var i = byteLength - var mul = 1 - var val = this[offset + --i] - while (i > 0 && (mul *= 0x100)) { - val += this[offset + --i] * mul - } - mul *= 0x80 - - if (val >= mul) val -= Math.pow(2, 8 * byteLength) - - return val -} - -Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { - if (!noAssert) checkOffset(offset, 1, this.length) - if (!(this[offset] & 0x80)) return (this[offset]) - return ((0xff - this[offset] + 1) * -1) -} - -Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset] | (this[offset + 1] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 2, this.length) - var val = this[offset + 1] | (this[offset] << 8) - return (val & 0x8000) ? val | 0xFFFF0000 : val -} - -Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset]) | - (this[offset + 1] << 8) | - (this[offset + 2] << 16) | - (this[offset + 3] << 24) -} - -Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - - return (this[offset] << 24) | - (this[offset + 1] << 16) | - (this[offset + 2] << 8) | - (this[offset + 3]) -} - -Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, true, 23, 4) -} - -Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 4, this.length) - return ieee754.read(this, offset, false, 23, 4) -} - -Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, true, 52, 8) -} - -Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { - if (!noAssert) checkOffset(offset, 8, this.length) - return ieee754.read(this, offset, false, 52, 8) -} - -function checkInt (buf, value, offset, ext, max, min) { - if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance') - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') -} - -Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var mul = 1 - var i = 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - byteLength = byteLength | 0 - if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0) - - var i = byteLength - 1 - var mul = 1 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = (value / mul) & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - this[offset] = (value & 0xff) - return offset + 1 -} - -function objectWriteUInt16 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) { - buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>> - (littleEndian ? i : 1 - i) * 8 - } -} - -Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -function objectWriteUInt32 (buf, value, offset, littleEndian) { - if (value < 0) value = 0xffffffff + value + 1 - for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) { - buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff - } -} - -Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset + 3] = (value >>> 24) - this[offset + 2] = (value >>> 16) - this[offset + 1] = (value >>> 8) - this[offset] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = 0 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset] = value & 0xFF - while (++i < byteLength && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) { - var limit = Math.pow(2, 8 * byteLength - 1) - - checkInt(this, value, offset, byteLength, limit - 1, -limit) - } - - var i = byteLength - 1 - var mul = 1 - var sub = value < 0 ? 1 : 0 - this[offset + i] = value & 0xFF - while (--i >= 0 && (mul *= 0x100)) { - this[offset + i] = ((value / mul) >> 0) - sub & 0xFF - } - - return offset + byteLength -} - -Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) - if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value) - if (value < 0) value = 0xff + value + 1 - this[offset] = (value & 0xff) - return offset + 1 -} - -Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - } else { - objectWriteUInt16(this, value, offset, true) - } - return offset + 2 -} - -Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 8) - this[offset + 1] = (value & 0xff) - } else { - objectWriteUInt16(this, value, offset, false) - } - return offset + 2 -} - -Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value & 0xff) - this[offset + 1] = (value >>> 8) - this[offset + 2] = (value >>> 16) - this[offset + 3] = (value >>> 24) - } else { - objectWriteUInt32(this, value, offset, true) - } - return offset + 4 -} - -Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { - value = +value - offset = offset | 0 - if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) - if (value < 0) value = 0xffffffff + value + 1 - if (Buffer.TYPED_ARRAY_SUPPORT) { - this[offset] = (value >>> 24) - this[offset + 1] = (value >>> 16) - this[offset + 2] = (value >>> 8) - this[offset + 3] = (value & 0xff) - } else { - objectWriteUInt32(this, value, offset, false) - } - return offset + 4 -} - -function checkIEEE754 (buf, value, offset, ext, max, min) { - if (value > max || value < min) throw new RangeError('value is out of bounds') - if (offset + ext > buf.length) throw new RangeError('index out of range') - if (offset < 0) throw new RangeError('index out of range') -} - -function writeFloat (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) - } - ieee754.write(buf, value, offset, littleEndian, 23, 4) - return offset + 4 -} - -Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { - return writeFloat(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { - return writeFloat(this, value, offset, false, noAssert) -} - -function writeDouble (buf, value, offset, littleEndian, noAssert) { - if (!noAssert) { - checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) - } - ieee754.write(buf, value, offset, littleEndian, 52, 8) - return offset + 8 -} - -Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { - return writeDouble(this, value, offset, true, noAssert) -} - -Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { - return writeDouble(this, value, offset, false, noAssert) -} - -// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) -Buffer.prototype.copy = function copy (target, targetStart, start, end) { - if (!start) start = 0 - if (!end && end !== 0) end = this.length - if (targetStart >= target.length) targetStart = target.length - if (!targetStart) targetStart = 0 - if (end > 0 && end < start) end = start - - // Copy 0 bytes; we're done - if (end === start) return 0 - if (target.length === 0 || this.length === 0) return 0 - - // Fatal error conditions - if (targetStart < 0) { - throw new RangeError('targetStart out of bounds') - } - if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds') - if (end < 0) throw new RangeError('sourceEnd out of bounds') - - // Are we oob? - if (end > this.length) end = this.length - if (target.length - targetStart < end - start) { - end = target.length - targetStart + start - } - - var len = end - start - var i - - if (this === target && start < targetStart && targetStart < end) { - // descending copy from end - for (i = len - 1; i >= 0; i--) { - target[i + targetStart] = this[i + start] - } - } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) { - // ascending copy from start - for (i = 0; i < len; i++) { - target[i + targetStart] = this[i + start] - } - } else { - target._set(this.subarray(start, start + len), targetStart) - } - - return len -} - -// fill(value, start=0, end=buffer.length) -Buffer.prototype.fill = function fill (value, start, end) { - if (!value) value = 0 - if (!start) start = 0 - if (!end) end = this.length - - if (end < start) throw new RangeError('end < start') - - // Fill 0 bytes; we're done - if (end === start) return - if (this.length === 0) return - - if (start < 0 || start >= this.length) throw new RangeError('start out of bounds') - if (end < 0 || end > this.length) throw new RangeError('end out of bounds') - - var i - if (typeof value === 'number') { - for (i = start; i < end; i++) { - this[i] = value - } - } else { - var bytes = utf8ToBytes(value.toString()) - var len = bytes.length - for (i = start; i < end; i++) { - this[i] = bytes[i % len] - } - } - - return this -} - -/** - * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. - * Added in Node 0.12. Only available in browsers that support ArrayBuffer. - */ -Buffer.prototype.toArrayBuffer = function toArrayBuffer () { - if (typeof Uint8Array !== 'undefined') { - if (Buffer.TYPED_ARRAY_SUPPORT) { - return (new Buffer(this)).buffer - } else { - var buf = new Uint8Array(this.length) - for (var i = 0, len = buf.length; i < len; i += 1) { - buf[i] = this[i] - } - return buf.buffer - } - } else { - throw new TypeError('Buffer.toArrayBuffer not supported in this browser') - } -} - -// HELPER FUNCTIONS -// ================ - -var BP = Buffer.prototype - -/** - * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods - */ -Buffer._augment = function _augment (arr) { - arr.constructor = Buffer - arr._isBuffer = true - - // save reference to original Uint8Array set method before overwriting - arr._set = arr.set - - // deprecated - arr.get = BP.get - arr.set = BP.set - - arr.write = BP.write - arr.toString = BP.toString - arr.toLocaleString = BP.toString - arr.toJSON = BP.toJSON - arr.equals = BP.equals - arr.compare = BP.compare - arr.indexOf = BP.indexOf - arr.copy = BP.copy - arr.slice = BP.slice - arr.readUIntLE = BP.readUIntLE - arr.readUIntBE = BP.readUIntBE - arr.readUInt8 = BP.readUInt8 - arr.readUInt16LE = BP.readUInt16LE - arr.readUInt16BE = BP.readUInt16BE - arr.readUInt32LE = BP.readUInt32LE - arr.readUInt32BE = BP.readUInt32BE - arr.readIntLE = BP.readIntLE - arr.readIntBE = BP.readIntBE - arr.readInt8 = BP.readInt8 - arr.readInt16LE = BP.readInt16LE - arr.readInt16BE = BP.readInt16BE - arr.readInt32LE = BP.readInt32LE - arr.readInt32BE = BP.readInt32BE - arr.readFloatLE = BP.readFloatLE - arr.readFloatBE = BP.readFloatBE - arr.readDoubleLE = BP.readDoubleLE - arr.readDoubleBE = BP.readDoubleBE - arr.writeUInt8 = BP.writeUInt8 - arr.writeUIntLE = BP.writeUIntLE - arr.writeUIntBE = BP.writeUIntBE - arr.writeUInt16LE = BP.writeUInt16LE - arr.writeUInt16BE = BP.writeUInt16BE - arr.writeUInt32LE = BP.writeUInt32LE - arr.writeUInt32BE = BP.writeUInt32BE - arr.writeIntLE = BP.writeIntLE - arr.writeIntBE = BP.writeIntBE - arr.writeInt8 = BP.writeInt8 - arr.writeInt16LE = BP.writeInt16LE - arr.writeInt16BE = BP.writeInt16BE - arr.writeInt32LE = BP.writeInt32LE - arr.writeInt32BE = BP.writeInt32BE - arr.writeFloatLE = BP.writeFloatLE - arr.writeFloatBE = BP.writeFloatBE - arr.writeDoubleLE = BP.writeDoubleLE - arr.writeDoubleBE = BP.writeDoubleBE - arr.fill = BP.fill - arr.inspect = BP.inspect - arr.toArrayBuffer = BP.toArrayBuffer - - return arr -} - -var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g - -function base64clean (str) { - // Node strips out invalid characters like \n and \t from the string, base64-js does not - str = stringtrim(str).replace(INVALID_BASE64_RE, '') - // Node converts strings with length < 2 to '' - if (str.length < 2) return '' - // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not - while (str.length % 4 !== 0) { - str = str + '=' - } - return str -} - -function stringtrim (str) { - if (str.trim) return str.trim() - return str.replace(/^\s+|\s+$/g, '') -} - -function toHex (n) { - if (n < 16) return '0' + n.toString(16) - return n.toString(16) -} - -function utf8ToBytes (string, units) { - units = units || Infinity - var codePoint - var length = string.length - var leadSurrogate = null - var bytes = [] - - for (var i = 0; i < length; i++) { - codePoint = string.charCodeAt(i) - - // is surrogate component - if (codePoint > 0xD7FF && codePoint < 0xE000) { - // last char was a lead - if (!leadSurrogate) { - // no lead yet - if (codePoint > 0xDBFF) { - // unexpected trail - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } else if (i + 1 === length) { - // unpaired lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - continue - } - - // valid lead - leadSurrogate = codePoint - - continue - } - - // 2 leads in a row - if (codePoint < 0xDC00) { - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - leadSurrogate = codePoint - continue - } - - // valid surrogate pair - codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000 - } else if (leadSurrogate) { - // valid bmp char, but last char was a lead - if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) - } - - leadSurrogate = null - - // encode utf8 - if (codePoint < 0x80) { - if ((units -= 1) < 0) break - bytes.push(codePoint) - } else if (codePoint < 0x800) { - if ((units -= 2) < 0) break - bytes.push( - codePoint >> 0x6 | 0xC0, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x10000) { - if ((units -= 3) < 0) break - bytes.push( - codePoint >> 0xC | 0xE0, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else if (codePoint < 0x110000) { - if ((units -= 4) < 0) break - bytes.push( - codePoint >> 0x12 | 0xF0, - codePoint >> 0xC & 0x3F | 0x80, - codePoint >> 0x6 & 0x3F | 0x80, - codePoint & 0x3F | 0x80 - ) - } else { - throw new Error('Invalid code point') - } - } - - return bytes -} - -function asciiToBytes (str) { - var byteArray = [] - for (var i = 0; i < str.length; i++) { - // Node's code seems to be doing this and not & 0x7F.. - byteArray.push(str.charCodeAt(i) & 0xFF) - } - return byteArray -} - -function utf16leToBytes (str, units) { - var c, hi, lo - var byteArray = [] - for (var i = 0; i < str.length; i++) { - if ((units -= 2) < 0) break - - c = str.charCodeAt(i) - hi = c >> 8 - lo = c % 256 - byteArray.push(lo) - byteArray.push(hi) - } - - return byteArray -} - -function base64ToBytes (str) { - return base64.toByteArray(base64clean(str)) -} - -function blitBuffer (src, dst, offset, length) { - for (var i = 0; i < length; i++) { - if ((i + offset >= dst.length) || (i >= src.length)) break - dst[i + offset] = src[i] - } - return i -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{"base64-js":5,"ieee754":8,"is-array":9}],8:[function(require,module,exports){ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] - - i += d - - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} - - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias - } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = nBytes * 8 - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - - value = Math.abs(value) - - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } - - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = (value * c - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } - } - - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - - buffer[offset + i - d] |= s * 128 -} - -},{}],9:[function(require,module,exports){ - -/** - * isArray - */ - -var isArray = Array.isArray; - -/** - * toString - */ - -var str = Object.prototype.toString; - -/** - * Whether or not the given `val` - * is an array. - * - * example: - * - * isArray([]); - * // > true - * isArray(arguments); - * // > false - * isArray(''); - * // > false - * - * @param {mixed} val - * @return {bool} - */ - -module.exports = isArray || function (val) { - return !! val && '[object Array]' == str.call(val); -}; - -},{}],10:[function(require,module,exports){ -/** - * Determine if an object is Buffer - * - * Author: Feross Aboukhadijeh - * License: MIT - * - * `npm install is-buffer` - */ - -module.exports = function (obj) { - return !!(obj != null && - (obj._isBuffer || // For Safari 5-7 (missing Object.prototype.constructor) - (obj.constructor && - typeof obj.constructor.isBuffer === 'function' && - obj.constructor.isBuffer(obj)) - )) -} - -},{}],11:[function(require,module,exports){ -/** - * 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; - -},{}],12:[function(require,module,exports){ -var arrayEvery = require('../internal/arrayEvery'), - baseCallback = require('../internal/baseCallback'), - baseEvery = require('../internal/baseEvery'), - isArray = require('../lang/isArray'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * 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 all - * @category Collection - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function|Object|string} [predicate=_.identity] The function invoked - * per iteration. - * @param {*} [thisArg] The `this` binding of `predicate`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // using the `_.matches` callback shorthand - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // using the `_.matchesProperty` callback shorthand - * _.every(users, 'active', false); - * // => true - * - * // using the `_.property` callback shorthand - * _.every(users, 'active'); - * // => false - */ -function every(collection, predicate, thisArg) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (thisArg && isIterateeCall(collection, predicate, thisArg)) { - predicate = undefined; - } - if (typeof predicate != 'function' || thisArg !== undefined) { - predicate = baseCallback(predicate, thisArg, 3); - } - return func(collection, predicate); -} - -module.exports = every; - -},{"../internal/arrayEvery":14,"../internal/baseCallback":18,"../internal/baseEvery":22,"../internal/isIterateeCall":47,"../lang/isArray":56}],13:[function(require,module,exports){ -/** 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/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; - -},{}],14:[function(require,module,exports){ -/** - * A specialized version of `_.every` 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 all elements pass the predicate check, - * else `false`. - */ -function arrayEvery(array, predicate) { - var index = -1, - length = array.length; - - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } - } - return true; -} - -module.exports = arrayEvery; - -},{}],15:[function(require,module,exports){ -/** - * 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; -} - -module.exports = arraySome; - -},{}],16:[function(require,module,exports){ -var keys = require('../object/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; -} - -module.exports = assignWith; - -},{"../object/keys":65}],17:[function(require,module,exports){ -var baseCopy = require('./baseCopy'), - keys = require('../object/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; - -},{"../object/keys":65,"./baseCopy":19}],18:[function(require,module,exports){ -var baseMatches = require('./baseMatches'), - baseMatchesProperty = require('./baseMatchesProperty'), - bindCallback = require('./bindCallback'), - identity = require('../utility/identity'), - property = require('../utility/property'); - -/** - * 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); -} - -module.exports = baseCallback; - -},{"../utility/identity":68,"../utility/property":69,"./baseMatches":29,"./baseMatchesProperty":30,"./bindCallback":35}],19:[function(require,module,exports){ -/** - * 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; - -},{}],20:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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 || {}; - }; -}()); - -module.exports = baseCreate; - -},{"../lang/isObject":60}],21:[function(require,module,exports){ -var baseForOwn = require('./baseForOwn'), - createBaseEach = require('./createBaseEach'); - -/** - * 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); - -module.exports = baseEach; - -},{"./baseForOwn":24,"./createBaseEach":37}],22:[function(require,module,exports){ -var baseEach = require('./baseEach'); - -/** - * The base implementation of `_.every` without support for callback - * shorthands and `this` binding. - * - * @private - * @param {Array|Object|string} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` - */ -function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; - }); - return result; -} - -module.exports = baseEvery; - -},{"./baseEach":21}],23:[function(require,module,exports){ -var createBaseFor = require('./createBaseFor'); - -/** - * 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(); - -module.exports = baseFor; - -},{"./createBaseFor":38}],24:[function(require,module,exports){ -var baseFor = require('./baseFor'), - keys = require('../object/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); -} - -module.exports = baseForOwn; - -},{"../object/keys":65,"./baseFor":23}],25:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * 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; -} - -module.exports = baseGet; - -},{"./toObject":53}],26:[function(require,module,exports){ -var baseIsEqualDeep = require('./baseIsEqualDeep'), - isObject = require('../lang/isObject'), - isObjectLike = require('./isObjectLike'); - -/** - * 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); -} - -module.exports = baseIsEqual; - -},{"../lang/isObject":60,"./baseIsEqualDeep":27,"./isObjectLike":50}],27:[function(require,module,exports){ -var equalArrays = require('./equalArrays'), - equalByTag = require('./equalByTag'), - equalObjects = require('./equalObjects'), - isArray = require('../lang/isArray'), - isTypedArray = require('../lang/isTypedArray'); - -/** `Object#toString` result references. */ -var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - objectTag = '[object 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`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring) - * of values. - */ -var objToString = objectProto.toString; - -/** - * 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; -} - -module.exports = baseIsEqualDeep; - -},{"../lang/isArray":56,"../lang/isTypedArray":62,"./equalArrays":39,"./equalByTag":40,"./equalObjects":41}],28:[function(require,module,exports){ -var baseIsEqual = require('./baseIsEqual'), - toObject = require('./toObject'); - -/** - * 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; -} - -module.exports = baseIsMatch; - -},{"./baseIsEqual":26,"./toObject":53}],29:[function(require,module,exports){ -var baseIsMatch = require('./baseIsMatch'), - getMatchData = require('./getMatchData'), - toObject = require('./toObject'); - -/** - * 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); - }; -} - -module.exports = baseMatches; - -},{"./baseIsMatch":28,"./getMatchData":43,"./toObject":53}],30:[function(require,module,exports){ -var baseGet = require('./baseGet'), - baseIsEqual = require('./baseIsEqual'), - baseSlice = require('./baseSlice'), - isArray = require('../lang/isArray'), - isKey = require('./isKey'), - isStrictComparable = require('./isStrictComparable'), - last = require('../array/last'), - toObject = require('./toObject'), - toPath = require('./toPath'); - -/** - * 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); - }; -} - -module.exports = baseMatchesProperty; - -},{"../array/last":11,"../lang/isArray":56,"./baseGet":25,"./baseIsEqual":26,"./baseSlice":33,"./isKey":48,"./isStrictComparable":51,"./toObject":53,"./toPath":54}],31:[function(require,module,exports){ -/** - * 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]; - }; -} - -module.exports = baseProperty; - -},{}],32:[function(require,module,exports){ -var baseGet = require('./baseGet'), - toPath = require('./toPath'); - -/** - * 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); - }; -} - -module.exports = basePropertyDeep; - -},{"./baseGet":25,"./toPath":54}],33:[function(require,module,exports){ -/** - * 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; - -},{}],34:[function(require,module,exports){ -/** - * 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 + ''); -} - -module.exports = baseToString; - -},{}],35:[function(require,module,exports){ -var identity = require('../utility/identity'); - -/** - * 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); - }; -} - -module.exports = bindCallback; - -},{"../utility/identity":68}],36:[function(require,module,exports){ -var bindCallback = require('./bindCallback'), - isIterateeCall = require('./isIterateeCall'), - restParam = require('../function/restParam'); - -/** - * Creates a `_.assign`, `_.defaults`, or `_.merge` function. - * - * @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; - -},{"../function/restParam":13,"./bindCallback":35,"./isIterateeCall":47}],37:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'), - toObject = require('./toObject'); - -/** - * 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; - }; -} - -module.exports = createBaseEach; - -},{"./getLength":42,"./isLength":49,"./toObject":53}],38:[function(require,module,exports){ -var toObject = require('./toObject'); - -/** - * 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; - }; -} - -module.exports = createBaseFor; - -},{"./toObject":53}],39:[function(require,module,exports){ -var arraySome = require('./arraySome'); - -/** - * 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; -} - -module.exports = equalArrays; - -},{"./arraySome":15}],40:[function(require,module,exports){ -/** `Object#toString` result references. */ -var boolTag = '[object Boolean]', - dateTag = '[object Date]', - errorTag = '[object Error]', - numberTag = '[object Number]', - regexpTag = '[object RegExp]', - stringTag = '[object String]'; - -/** - * 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} object 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; -} - -module.exports = equalByTag; - -},{}],41:[function(require,module,exports){ -var keys = require('../object/keys'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; -} - -module.exports = equalObjects; - -},{"../object/keys":65}],42:[function(require,module,exports){ -var baseProperty = require('./baseProperty'); - -/** - * 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'); - -module.exports = getLength; - -},{"./baseProperty":31}],43:[function(require,module,exports){ -var isStrictComparable = require('./isStrictComparable'), - pairs = require('../object/pairs'); - -/** - * 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; -} - -module.exports = getMatchData; - -},{"../object/pairs":67,"./isStrictComparable":51}],44:[function(require,module,exports){ -var isNative = require('../lang/isNative'); - -/** - * 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; -} - -module.exports = getNative; - -},{"../lang/isNative":59}],45:[function(require,module,exports){ -var getLength = require('./getLength'), - isLength = require('./isLength'); - -/** - * 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)); -} - -module.exports = isArrayLike; - -},{"./getLength":42,"./isLength":49}],46:[function(require,module,exports){ -/** Used to detect unsigned integer values. */ -var reIsUint = /^\d+$/; - -/** - * 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; - -/** - * 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; -} - -module.exports = isIndex; - -},{}],47:[function(require,module,exports){ -var isArrayLike = require('./isArrayLike'), - isIndex = require('./isIndex'), - isObject = require('../lang/isObject'); - -/** - * 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; -} - -module.exports = isIterateeCall; - -},{"../lang/isObject":60,"./isArrayLike":45,"./isIndex":46}],48:[function(require,module,exports){ -var isArray = require('../lang/isArray'), - toObject = require('./toObject'); - -/** 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)); -} - -module.exports = isKey; - -},{"../lang/isArray":56,"./toObject":53}],49:[function(require,module,exports){ -/** - * 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; - -/** - * 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 = isLength; - -},{}],50:[function(require,module,exports){ -/** - * 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'; -} - -module.exports = isObjectLike; - -},{}],51:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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); -} - -module.exports = isStrictComparable; - -},{"../lang/isObject":60}],52:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('./isIndex'), - isLength = require('./isLength'), - keysIn = require('../object/keysIn'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; -} - -module.exports = shimKeys; - -},{"../lang/isArguments":55,"../lang/isArray":56,"../object/keysIn":66,"./isIndex":46,"./isLength":49}],53:[function(require,module,exports){ -var isObject = require('../lang/isObject'); - -/** - * 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); -} - -module.exports = toObject; - -},{"../lang/isObject":60}],54:[function(require,module,exports){ -var baseToString = require('./baseToString'), - isArray = require('../lang/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 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; - -},{"../lang/isArray":56,"./baseToString":34}],55:[function(require,module,exports){ -var isArrayLike = require('../internal/isArrayLike'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** Native method references. */ -var propertyIsEnumerable = objectProto.propertyIsEnumerable; - -/** - * Checks if `value` is classified as an `arguments` object. - * - * @static - * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. - * @example - * - * _.isArguments(function() { return arguments; }()); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ -function isArguments(value) { - return isObjectLike(value) && isArrayLike(value) && - hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); -} - -module.exports = isArguments; - -},{"../internal/isArrayLike":45,"../internal/isObjectLike":50}],56:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var arrayTag = '[object Array]'; - -/** Used for native 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 objToString = objectProto.toString; - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeIsArray = getNative(Array, 'isArray'); - -/** - * 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; -}; - -module.exports = isArray; - -},{"../internal/getNative":44,"../internal/isLength":49,"../internal/isObjectLike":50}],57:[function(require,module,exports){ -var isArguments = require('./isArguments'), - isArray = require('./isArray'), - isArrayLike = require('../internal/isArrayLike'), - isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'), - isString = require('./isString'), - keys = require('../object/keys'); - -/** - * Checks if `value` is empty. A value is considered empty unless it's 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; - -},{"../internal/isArrayLike":45,"../internal/isObjectLike":50,"../object/keys":65,"./isArguments":55,"./isArray":56,"./isFunction":58,"./isString":61}],58:[function(require,module,exports){ -var isObject = require('./isObject'); - -/** `Object#toString` result references. */ -var funcTag = '[object Function]'; - -/** Used for native 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 objToString = 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 older versions of Chrome and Safari which return 'function' for regexes - // and Safari 8 which returns 'object' for typed array constructors. - return isObject(value) && objToString.call(value) == funcTag; -} - -module.exports = isFunction; - -},{"./isObject":60}],59:[function(require,module,exports){ -var isFunction = require('./isFunction'), - isObjectLike = require('../internal/isObjectLike'); - -/** Used to detect host constructors (Safari > 5). */ -var reIsHostCtor = /^\[object .+?Constructor\]$/; - -/** 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 detect if a method is native. */ -var reIsNative = RegExp('^' + - fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' -); - -/** - * 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 = isNative; - -},{"../internal/isObjectLike":50,"./isFunction":58}],60:[function(require,module,exports){ -/** - * 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; - -},{}],61:[function(require,module,exports){ -var isObjectLike = require('../internal/isObjectLike'); - -/** `Object#toString` result references. */ -var stringTag = '[object String]'; - -/** Used for native 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 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; - -},{"../internal/isObjectLike":50}],62:[function(require,module,exports){ -var isLength = require('../internal/isLength'), - isObjectLike = require('../internal/isObjectLike'); - -/** `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]', - 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[dateTag] = typedArrayTags[errorTag] = -typedArrayTags[funcTag] = typedArrayTags[mapTag] = -typedArrayTags[numberTag] = typedArrayTags[objectTag] = -typedArrayTags[regexpTag] = typedArrayTags[setTag] = -typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; - -/** Used for native 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 objToString = objectProto.toString; - -/** - * Checks if `value` is classified as a typed array. - * - * @static - * @memberOf _ - * @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[objToString.call(value)]; -} - -module.exports = isTypedArray; - -},{"../internal/isLength":49,"../internal/isObjectLike":50}],63:[function(require,module,exports){ -var assignWith = require('../internal/assignWith'), - baseAssign = require('../internal/baseAssign'), - createAssigner = require('../internal/createAssigner'); - -/** - * 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's 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`](http://ecma-international.org/ecma-262/6.0/#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; - -},{"../internal/assignWith":16,"../internal/baseAssign":17,"../internal/createAssigner":36}],64:[function(require,module,exports){ -var baseAssign = require('../internal/baseAssign'), - baseCreate = require('../internal/baseCreate'), - isIterateeCall = require('../internal/isIterateeCall'); - -/** - * Creates an object that inherits from the given `prototype` object. If a - * `properties` object is provided its own enumerable properties are assigned - * to the created object. - * - * @static - * @memberOf _ - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @param- {Object} [guard] Enables use as a callback for functions like `_.map`. - * @returns {Object} Returns the new object. - * @example - * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true - * - * circle instanceof Shape; - * // => true - */ -function create(prototype, properties, guard) { - var result = baseCreate(prototype); - if (guard && isIterateeCall(prototype, properties, guard)) { - properties = undefined; - } - return properties ? baseAssign(result, properties) : result; -} - -module.exports = create; - -},{"../internal/baseAssign":17,"../internal/baseCreate":20,"../internal/isIterateeCall":47}],65:[function(require,module,exports){ -var getNative = require('../internal/getNative'), - isArrayLike = require('../internal/isArrayLike'), - isObject = require('../lang/isObject'), - shimKeys = require('../internal/shimKeys'); - -/* Native method references for those with the same name as other `lodash` methods. */ -var nativeKeys = getNative(Object, 'keys'); - -/** - * 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) : []; -}; - -module.exports = keys; - -},{"../internal/getNative":44,"../internal/isArrayLike":45,"../internal/shimKeys":52,"../lang/isObject":60}],66:[function(require,module,exports){ -var isArguments = require('../lang/isArguments'), - isArray = require('../lang/isArray'), - isIndex = require('../internal/isIndex'), - isLength = require('../internal/isLength'), - isObject = require('../lang/isObject'); - -/** Used for native method references. */ -var objectProto = Object.prototype; - -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; - -/** - * 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; - -},{"../internal/isIndex":46,"../internal/isLength":49,"../lang/isArguments":55,"../lang/isArray":56,"../lang/isObject":60}],67:[function(require,module,exports){ -var keys = require('./keys'), - toObject = require('../internal/toObject'); - -/** - * 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; - -},{"../internal/toObject":53,"./keys":65}],68:[function(require,module,exports){ -/** - * 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 = identity; - -},{}],69:[function(require,module,exports){ -var baseProperty = require('../internal/baseProperty'), - basePropertyDeep = require('../internal/basePropertyDeep'), - isKey = require('../internal/isKey'); - -/** - * 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 = property; - -},{"../internal/baseProperty":31,"../internal/basePropertyDeep":32,"../internal/isKey":48}],70:[function(require,module,exports){ -(function (global){ - -/** - * Module exports. - */ - -module.exports = deprecate; - -/** - * Mark that a method should not be used. - * Returns a modified function which warns once by default. - * - * If `localStorage.noDeprecation = true` is set, then it is a no-op. - * - * If `localStorage.throwDeprecation = true` is set, then deprecated functions - * will throw an Error when invoked. - * - * If `localStorage.traceDeprecation = true` is set, then deprecated functions - * will invoke `console.trace()` instead of `console.error()`. - * - * @param {Function} fn - the function to deprecate - * @param {String} msg - the string to print to the console when `fn` is invoked - * @returns {Function} a new "deprecated" version of `fn` - * @api public - */ - -function deprecate (fn, msg) { - if (config('noDeprecation')) { - return fn; - } - - var warned = false; - function deprecated() { - if (!warned) { - if (config('throwDeprecation')) { - throw new Error(msg); - } else if (config('traceDeprecation')) { - console.trace(msg); - } else { - console.warn(msg); - } - warned = true; - } - return fn.apply(this, arguments); - } - - return deprecated; -} - -/** - * Checks `localStorage` for boolean values for the given `name`. - * - * @param {String} name - * @returns {Boolean} - * @api private - */ - -function config (name) { - // accessing global.localStorage can trigger a DOMException in sandboxed iframes - try { - if (!global.localStorage) return false; - } catch (_) { - return false; - } - var val = global.localStorage[name]; - if (null == val) return false; - return String(val).toLowerCase() === 'true'; -} - -}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) -},{}],71:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLAttribute, create; - - create = require('lodash/object/create'); - - module.exports = XMLAttribute = (function() { - function XMLAttribute(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing attribute name of element " + parent.name); - } - if (value == null) { - throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); - } - this.name = this.stringify.attName(name); - this.value = this.stringify.attValue(value); - } - - XMLAttribute.prototype.clone = function() { - return create(XMLAttribute.prototype, this); - }; - - XMLAttribute.prototype.toString = function(options, level) { - return ' ' + this.name + '="' + this.value + '"'; - }; - - return XMLAttribute; - - })(); - -}).call(this); - -},{"lodash/object/create":64}],72:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLBuilder, XMLDeclaration, XMLDocType, XMLElement, XMLStringifier; - - XMLStringifier = require('./XMLStringifier'); - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLElement = require('./XMLElement'); - - module.exports = XMLBuilder = (function() { - function XMLBuilder(name, options) { - var root, temp; - if (name == null) { - throw new Error("Root element needs a name"); - } - if (options == null) { - options = {}; - } - this.options = options; - this.stringify = new XMLStringifier(options); - temp = new XMLElement(this, 'doc'); - root = temp.element(name); - root.isRoot = true; - root.documentObject = this; - this.rootObject = root; - if (!options.headless) { - root.declaration(options); - if ((options.pubID != null) || (options.sysID != null)) { - root.doctype(options); - } - } - } - - XMLBuilder.prototype.root = function() { - return this.rootObject; - }; - - XMLBuilder.prototype.end = function(options) { - return this.toString(options); - }; - - XMLBuilder.prototype.toString = function(options) { - var indent, newline, offset, pretty, r, ref, ref1, ref2; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - r = ''; - if (this.xmldec != null) { - r += this.xmldec.toString(options); - } - if (this.doctype != null) { - r += this.doctype.toString(options); - } - r += this.rootObject.toString(options); - if (pretty && r.slice(-newline.length) === newline) { - r = r.slice(0, -newline.length); - } - return r; - }; - - return XMLBuilder; - - })(); - -}).call(this); - -},{"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLStringifier":85}],73:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLNode, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLCData = (function(superClass) { - extend(XMLCData, superClass); - - function XMLCData(parent, text) { - XMLCData.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing CDATA text"); - } - this.text = this.stringify.cdata(text); - } - - XMLCData.prototype.clone = function() { - return create(XMLCData.prototype, this); - }; - - XMLCData.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLCData; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":82,"lodash/object/create":64}],74:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLComment, XMLNode, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLComment = (function(superClass) { - extend(XMLComment, superClass); - - function XMLComment(parent, text) { - XMLComment.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing comment text"); - } - this.text = this.stringify.comment(text); - } - - XMLComment.prototype.clone = function() { - return create(XMLComment.prototype, this); - }; - - XMLComment.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLComment; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":82,"lodash/object/create":64}],75:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDAttList, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDAttList = (function() { - function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { - this.stringify = parent.stringify; - if (elementName == null) { - throw new Error("Missing DTD element name"); - } - if (attributeName == null) { - throw new Error("Missing DTD attribute name"); - } - if (!attributeType) { - throw new Error("Missing DTD attribute type"); - } - if (!defaultValueType) { - throw new Error("Missing DTD attribute default"); - } - if (defaultValueType.indexOf('#') !== 0) { - defaultValueType = '#' + defaultValueType; - } - if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { - throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); - } - if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { - throw new Error("Default value only applies to #FIXED or #DEFAULT"); - } - this.elementName = this.stringify.eleName(elementName); - this.attributeName = this.stringify.attName(attributeName); - this.attributeType = this.stringify.dtdAttType(attributeType); - this.defaultValue = this.stringify.dtdAttDefault(defaultValue); - this.defaultValueType = defaultValueType; - } - - XMLDTDAttList.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDAttList; - - })(); - -}).call(this); - -},{"lodash/object/create":64}],76:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDElement, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDElement = (function() { - function XMLDTDElement(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing DTD element name"); - } - if (!value) { - value = '(#PCDATA)'; - } - if (Array.isArray(value)) { - value = '(' + value.join(',') + ')'; - } - this.name = this.stringify.eleName(name); - this.value = this.stringify.dtdElementValue(value); - } - - XMLDTDElement.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDElement; - - })(); - -}).call(this); - -},{"lodash/object/create":64}],77:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDEntity, create, isObject; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - module.exports = XMLDTDEntity = (function() { - function XMLDTDEntity(parent, pe, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing entity name"); - } - if (value == null) { - throw new Error("Missing entity value"); - } - this.pe = !!pe; - this.name = this.stringify.eleName(name); - if (!isObject(value)) { - this.value = this.stringify.dtdEntityValue(value); - } else { - if (!value.pubID && !value.sysID) { - throw new Error("Public and/or system identifiers are required for an external entity"); - } - if (value.pubID && !value.sysID) { - throw new Error("System identifier is required for a public external entity"); - } - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - if (value.nData != null) { - this.nData = this.stringify.dtdNData(value.nData); - } - if (this.pe && this.nData) { - throw new Error("Notation declaration is not allowed in a parameter entity"); - } - } - } - - XMLDTDEntity.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDEntity; - - })(); - -}).call(this); - -},{"lodash/lang/isObject":60,"lodash/object/create":64}],78:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDTDNotation, create; - - create = require('lodash/object/create'); - - module.exports = XMLDTDNotation = (function() { - function XMLDTDNotation(parent, name, value) { - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing notation name"); - } - if (!value.pubID && !value.sysID) { - throw new Error("Public or system identifiers are required for an external entity"); - } - this.name = this.stringify.eleName(name); - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - } - - XMLDTDNotation.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDTDNotation; - - })(); - -}).call(this); - -},{"lodash/object/create":64}],79:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLDeclaration, XMLNode, create, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLDeclaration = (function(superClass) { - extend(XMLDeclaration, superClass); - - function XMLDeclaration(parent, version, encoding, standalone) { - var ref; - XMLDeclaration.__super__.constructor.call(this, parent); - if (isObject(version)) { - ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; - } - if (!version) { - version = '1.0'; - } - this.version = this.stringify.xmlVersion(version); - if (encoding != null) { - this.encoding = this.stringify.xmlEncoding(encoding); - } - if (standalone != null) { - this.standalone = this.stringify.xmlStandalone(standalone); - } - } - - XMLDeclaration.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLDeclaration; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":82,"lodash/lang/isObject":60,"lodash/object/create":64}],80:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLProcessingInstruction, create, isObject; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - module.exports = XMLDocType = (function() { - function XMLDocType(parent, pubID, sysID) { - var ref, ref1; - this.documentObject = parent; - this.stringify = this.documentObject.stringify; - this.children = []; - if (isObject(pubID)) { - ref = pubID, pubID = ref.pubID, sysID = ref.sysID; - } - if (sysID == null) { - ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; - } - if (pubID != null) { - this.pubID = this.stringify.dtdPubID(pubID); - } - if (sysID != null) { - this.sysID = this.stringify.dtdSysID(sysID); - } - } - - XMLDocType.prototype.element = function(name, value) { - var child; - child = new XMLDTDElement(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var child; - child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.entity = function(name, value) { - var child; - child = new XMLDTDEntity(this, false, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.pEntity = function(name, value) { - var child; - child = new XMLDTDEntity(this, true, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.notation = function(name, value) { - var child; - child = new XMLDTDNotation(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.instruction = function(target, value) { - var child; - child = new XMLProcessingInstruction(this, target, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.root = function() { - return this.documentObject.root(); - }; - - XMLDocType.prototype.document = function() { - return this.documentObject; - }; - - XMLDocType.prototype.toString = function(options, level) { - var child, i, indent, len, newline, offset, pretty, r, ref, ref1, ref2, ref3, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ' 0) { - r += ' ['; - if (pretty) { - r += newline; - } - ref3 = this.children; - for (i = 0, len = ref3.length; i < len; i++) { - child = ref3[i]; - r += child.toString(options, level + 1); - } - r += ']'; - } - r += '>'; - if (pretty) { - r += newline; - } - return r; - }; - - XMLDocType.prototype.ele = function(name, value) { - return this.element(name, value); - }; - - XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); - }; - - XMLDocType.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocType.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocType.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - XMLDocType.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLDocType.prototype.com = function(value) { - return this.comment(value); - }; - - XMLDocType.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocType.prototype.up = function() { - return this.root(); - }; - - XMLDocType.prototype.doc = function() { - return this.document(); - }; - - return XMLDocType; - - })(); - -}).call(this); - -},{"./XMLCData":73,"./XMLComment":74,"./XMLDTDAttList":75,"./XMLDTDElement":76,"./XMLDTDEntity":77,"./XMLDTDNotation":78,"./XMLProcessingInstruction":83,"lodash/lang/isObject":60,"lodash/object/create":64}],81:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLAttribute, XMLElement, XMLNode, XMLProcessingInstruction, create, every, isFunction, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - isObject = require('lodash/lang/isObject'); - - isFunction = require('lodash/lang/isFunction'); - - every = require('lodash/collection/every'); - - XMLNode = require('./XMLNode'); - - XMLAttribute = require('./XMLAttribute'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - module.exports = XMLElement = (function(superClass) { - extend(XMLElement, superClass); - - function XMLElement(parent, name, attributes) { - XMLElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing element name"); - } - this.name = this.stringify.eleName(name); - this.children = []; - this.instructions = []; - this.attributes = {}; - if (attributes != null) { - this.attribute(attributes); - } - } - - XMLElement.prototype.clone = function() { - var att, attName, clonedSelf, i, len, pi, ref, ref1; - clonedSelf = create(XMLElement.prototype, this); - if (clonedSelf.isRoot) { - clonedSelf.documentObject = null; - } - clonedSelf.attributes = {}; - ref = this.attributes; - for (attName in ref) { - if (!hasProp.call(ref, attName)) continue; - att = ref[attName]; - clonedSelf.attributes[attName] = att.clone(); - } - clonedSelf.instructions = []; - ref1 = this.instructions; - for (i = 0, len = ref1.length; i < len; i++) { - pi = ref1[i]; - clonedSelf.instructions.push(pi.clone()); - } - clonedSelf.children = []; - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - return clonedSelf; - }; - - XMLElement.prototype.attribute = function(name, value) { - var attName, attValue; - if (name != null) { - name = name.valueOf(); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (!this.options.skipNullAttributes || (value != null)) { - this.attributes[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLElement.prototype.removeAttribute = function(name) { - var attName, i, len; - if (name == null) { - throw new Error("Missing attribute name"); - } - name = name.valueOf(); - if (Array.isArray(name)) { - for (i = 0, len = name.length; i < len; i++) { - attName = name[i]; - delete this.attributes[attName]; - } - } else { - delete this.attributes[name]; - } - return this; - }; - - XMLElement.prototype.instruction = function(target, value) { - var i, insTarget, insValue, instruction, len; - if (target != null) { - target = target.valueOf(); - } - if (value != null) { - value = value.valueOf(); - } - if (Array.isArray(target)) { - for (i = 0, len = target.length; i < len; i++) { - insTarget = target[i]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - instruction = new XMLProcessingInstruction(this, target, value); - this.instructions.push(instruction); - } - return this; - }; - - XMLElement.prototype.toString = function(options, level) { - var att, child, i, indent, instruction, j, len, len1, name, newline, offset, pretty, r, ref, ref1, ref2, ref3, ref4, ref5, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - ref3 = this.instructions; - for (i = 0, len = ref3.length; i < len; i++) { - instruction = ref3[i]; - r += instruction.toString(options, level); - } - if (pretty) { - r += space; - } - r += '<' + this.name; - ref4 = this.attributes; - for (name in ref4) { - if (!hasProp.call(ref4, name)) continue; - att = ref4[name]; - r += att.toString(options); - } - if (this.children.length === 0 || every(this.children, function(e) { - return e.value === ''; - })) { - r += '/>'; - if (pretty) { - r += newline; - } - } else if (pretty && this.children.length === 1 && (this.children[0].value != null)) { - r += '>'; - r += this.children[0].value; - r += ''; - r += newline; - } else { - r += '>'; - if (pretty) { - r += newline; - } - ref5 = this.children; - for (j = 0, len1 = ref5.length; j < len1; j++) { - child = ref5[j]; - r += child.toString(options, level + 1); - } - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - } - return r; - }; - - XMLElement.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLElement.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - return XMLElement; - - })(XMLNode); - -}).call(this); - -},{"./XMLAttribute":71,"./XMLNode":82,"./XMLProcessingInstruction":83,"lodash/collection/every":12,"lodash/lang/isFunction":58,"lodash/lang/isObject":60,"lodash/object/create":64}],82:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLRaw, XMLText, isEmpty, isFunction, isObject, - hasProp = {}.hasOwnProperty; - - isObject = require('lodash/lang/isObject'); - - isFunction = require('lodash/lang/isFunction'); - - isEmpty = require('lodash/lang/isEmpty'); - - XMLElement = null; - - XMLCData = null; - - XMLComment = null; - - XMLDeclaration = null; - - XMLDocType = null; - - XMLRaw = null; - - XMLText = null; - - module.exports = XMLNode = (function() { - function XMLNode(parent) { - this.parent = parent; - this.options = this.parent.options; - this.stringify = this.parent.stringify; - if (XMLElement === null) { - XMLElement = require('./XMLElement'); - XMLCData = require('./XMLCData'); - XMLComment = require('./XMLComment'); - XMLDeclaration = require('./XMLDeclaration'); - XMLDocType = require('./XMLDocType'); - XMLRaw = require('./XMLRaw'); - XMLText = require('./XMLText'); - } - } - - XMLNode.prototype.element = function(name, attributes, text) { - var childNode, item, j, k, key, lastChild, len, len1, ref, val; - lastChild = null; - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref = [attributes, text], text = ref[0], attributes = ref[1]; - } - if (name != null) { - name = name.valueOf(); - } - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - item = name[j]; - lastChild = this.element(item); - } - } else if (isFunction(name)) { - lastChild = this.element(name.apply()); - } else if (isObject(name)) { - for (key in name) { - if (!hasProp.call(name, key)) continue; - val = name[key]; - if (isFunction(val)) { - val = val.apply(); - } - if ((isObject(val)) && (isEmpty(val))) { - val = null; - } - if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { - lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); - } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && key.indexOf(this.stringify.convertPIKey) === 0) { - lastChild = this.instruction(key.substr(this.stringify.convertPIKey.length), val); - } else if (Array.isArray(val)) { - for (k = 0, len1 = val.length; k < len1; k++) { - item = val[k]; - childNode = {}; - childNode[key] = item; - lastChild = this.element(childNode); - } - } else if (isObject(val)) { - lastChild = this.element(key); - lastChild.element(val); - } else { - lastChild = this.element(key, val); - } - } - } else { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.text(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { - lastChild = this.cdata(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { - lastChild = this.comment(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { - lastChild = this.raw(text); - } else { - lastChild = this.node(name, attributes, text); - } - } - if (lastChild == null) { - throw new Error("Could not create any elements with: " + name); - } - return lastChild; - }; - - XMLNode.prototype.insertBefore = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.insertAfter = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.remove = function() { - var i, ref; - if (this.isRoot) { - throw new Error("Cannot remove the root element"); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref = [])), ref; - return this.parent; - }; - - XMLNode.prototype.node = function(name, attributes, text) { - var child, ref; - if (name != null) { - name = name.valueOf(); - } - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref = [attributes, text], text = ref[0], attributes = ref[1]; - } - child = new XMLElement(this, name, attributes); - if (text != null) { - child.text(text); - } - this.children.push(child); - return child; - }; - - XMLNode.prototype.text = function(value) { - var child; - child = new XMLText(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.raw = function(value) { - var child; - child = new XMLRaw(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.declaration = function(version, encoding, standalone) { - var doc, xmldec; - doc = this.document(); - xmldec = new XMLDeclaration(doc, version, encoding, standalone); - doc.xmldec = xmldec; - return doc.root(); - }; - - XMLNode.prototype.doctype = function(pubID, sysID) { - var doc, doctype; - doc = this.document(); - doctype = new XMLDocType(doc, pubID, sysID); - doc.doctype = doctype; - return doctype; - }; - - XMLNode.prototype.up = function() { - if (this.isRoot) { - throw new Error("The root node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLNode.prototype.root = function() { - var child; - if (this.isRoot) { - return this; - } - child = this.parent; - while (!child.isRoot) { - child = child.parent; - } - return child; - }; - - XMLNode.prototype.document = function() { - return this.root().documentObject; - }; - - XMLNode.prototype.end = function(options) { - return this.document().toString(options); - }; - - XMLNode.prototype.prev = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node"); - } - return this.parent.children[i - 1]; - }; - - XMLNode.prototype.next = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node"); - } - return this.parent.children[i + 1]; - }; - - XMLNode.prototype.importXMLBuilder = function(xmlbuilder) { - var clonedRoot; - clonedRoot = xmlbuilder.root().clone(); - clonedRoot.parent = this; - clonedRoot.isRoot = false; - this.children.push(clonedRoot); - return this; - }; - - XMLNode.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.txt = function(value) { - return this.text(value); - }; - - XMLNode.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.com = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.doc = function() { - return this.document(); - }; - - XMLNode.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLNode.prototype.dtd = function(pubID, sysID) { - return this.doctype(pubID, sysID); - }; - - XMLNode.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.t = function(value) { - return this.text(value); - }; - - XMLNode.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.c = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.r = function(value) { - return this.raw(value); - }; - - XMLNode.prototype.u = function() { - return this.up(); - }; - - return XMLNode; - - })(); - -}).call(this); - -},{"./XMLCData":73,"./XMLComment":74,"./XMLDeclaration":79,"./XMLDocType":80,"./XMLElement":81,"./XMLRaw":84,"./XMLText":86,"lodash/lang/isEmpty":57,"lodash/lang/isFunction":58,"lodash/lang/isObject":60}],83:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLProcessingInstruction, create; - - create = require('lodash/object/create'); - - module.exports = XMLProcessingInstruction = (function() { - function XMLProcessingInstruction(parent, target, value) { - this.stringify = parent.stringify; - if (target == null) { - throw new Error("Missing instruction target"); - } - this.target = this.stringify.insTarget(target); - if (value) { - this.value = this.stringify.insValue(value); - } - } - - XMLProcessingInstruction.prototype.clone = function() { - return create(XMLProcessingInstruction.prototype, this); - }; - - XMLProcessingInstruction.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLProcessingInstruction; - - })(); - -}).call(this); - -},{"lodash/object/create":64}],84:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLNode, XMLRaw, create, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - create = require('lodash/object/create'); - - XMLNode = require('./XMLNode'); - - module.exports = XMLRaw = (function(superClass) { - extend(XMLRaw, superClass); - - function XMLRaw(parent, text) { - XMLRaw.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing raw text"); - } - this.value = this.stringify.raw(text); - } - - XMLRaw.prototype.clone = function() { - return create(XMLRaw.prototype, this); - }; - - XMLRaw.prototype.toString = function(options, level) { - var indent, newline, offset, pretty, r, ref, ref1, ref2, space; - pretty = (options != null ? options.pretty : void 0) || false; - indent = (ref = options != null ? options.indent : void 0) != null ? ref : ' '; - offset = (ref1 = options != null ? options.offset : void 0) != null ? ref1 : 0; - newline = (ref2 = options != null ? options.newline : void 0) != null ? ref2 : '\n'; - level || (level = 0); - space = new Array(level + offset + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - r += this.value; - if (pretty) { - r += newline; - } - return r; - }; - - return XMLRaw; - - })(XMLNode); - -}).call(this); - -},{"./XMLNode":82,"lodash/object/create":64}],85:[function(require,module,exports){ -// Generated by CoffeeScript 1.9.1 -(function() { - var XMLStringifier, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - hasProp = {}.hasOwnProperty; - - module.exports = XMLStringifier = (function() { - function XMLStringifier(options) { - this.assertLegalChar = bind(this.assertLegalChar, this); - var key, ref, value; - this.allowSurrogateChars = options != null ? options.allowSurrogateChars : void 0; - ref = (options != null ? options.stringify : void 0) || {}; - for (key in ref) { - if (!hasProp.call(ref, key)) continue; - value = ref[key]; - this[key] = value; - } - } - - XMLStringifier.prototype.eleName = function(val) { - val = '' + val || ''; - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.eleText = function(val) { - val = '' + val || ''; - return this.assertLegalChar(this.elEscape(val)); - }; - - XMLStringifier.prototype.cdata = function(val) { - val = '' + val || ''; - if (val.match(/]]>/)) { - throw new Error("Invalid CDATA text: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.comment = function(val) { - val = '' + val || ''; - if (val.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.raw = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.attName = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.attValue = function(val) { - val = '' + val || ''; - return this.attEscape(val); - }; - - XMLStringifier.prototype.insTarget = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.insValue = function(val) { - val = '' + val || ''; - if (val.match(/\?>/)) { - throw new Error("Invalid processing instruction value: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlVersion = function(val) { - val = '' + val || ''; - if (!val.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlEncoding = function(val) { - val = '' + val || ''; - if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { - throw new Error("Invalid encoding: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlStandalone = function(val) { - if (val) { - return "yes"; - } else { - return "no"; - } - }; - - XMLStringifier.prototype.dtdPubID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdSysID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdElementValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttType = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttDefault = function(val) { - if (val != null) { - return '' + val || ''; - } else { - return val; - } - }; - - XMLStringifier.prototype.dtdEntityValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdNData = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.convertAttKey = '@'; - - XMLStringifier.prototype.convertPIKey = '?'; - - XMLStringifier.prototype.convertTextKey = '#text'; - - XMLStringifier.prototype.convertCDataKey = '#cdata'; - - XMLStringifier.prototype.convertCommentKey = '#comment'; - - XMLStringifier.prototype.convertRawKey = '#raw'; - - XMLStringifier.prototype.assertLegalChar = function(str) { - var chars, chr; - if (this.allowSurrogateChars) { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; - } else { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; - } - chr = str.match(chars); - if (chr) { - throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); - } - return str; - }; - - XMLStringifier.prototype.elEscape = function(str) { - return str.replace(/&/g, '&').replace(//g, '>').replace(/\r/g, ' '); - }; - - XMLStringifier.prototype.attEscape = function(str) { - return str.replace(/&/g, '&').replace(/','amp':'&','quot':'"','apos':"'"} - if(locator){ - domBuilder.setDocumentLocator(locator) - } - - sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); - sax.domBuilder = options.domBuilder || domBuilder; - if(/\/x?html?$/.test(mimeType)){ - entityMap.nbsp = '\xa0'; - entityMap.copy = '\xa9'; - defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; - } - if(source){ - sax.parse(source,defaultNSMap,entityMap); - }else{ - sax.errorHandler.error("invalid document source"); - } - return domBuilder.document; -} -function buildErrorHandler(errorImpl,domBuilder,locator){ - if(!errorImpl){ - if(domBuilder instanceof DOMHandler){ - return domBuilder; - } - errorImpl = domBuilder ; - } - var errorHandler = {} - var isCallback = errorImpl instanceof Function; - locator = locator||{} - function build(key){ - var fn = errorImpl[key]; - if(!fn){ - if(isCallback){ - fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; - }else{ - var i=arguments.length; - while(--i){ - if(fn = errorImpl[arguments[i]]){ - break; - } - } - } - } - errorHandler[key] = fn && function(msg){ - fn(msg+_locator(locator)); - }||function(){}; - } - build('warning','warn'); - build('error','warn','warning'); - build('fatalError','warn','warning','error'); - return errorHandler; -} -/** - * +ContentHandler+ErrorHandler - * +LexicalHandler+EntityResolver2 - * -DeclHandler-DTDHandler - * - * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler - * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 - * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html - */ -function DOMHandler() { - this.cdata = false; -} -function position(locator,node){ - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; -} -/** - * @see org.xml.sax.ContentHandler#startDocument - * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html - */ -DOMHandler.prototype = { - startDocument : function() { - this.document = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.document.documentURI = this.locator.systemId; - } - }, - startElement:function(namespaceURI, localName, qName, attrs) { - var doc = this.document; - var el = doc.createElementNS(namespaceURI, qName||localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - - this.locator && position(this.locator,el) - for (var i = 0 ; i < len; i++) { - var namespaceURI = attrs.getURI(i); - var value = attrs.getValue(i); - var qName = attrs.getQName(i); - var attr = doc.createAttributeNS(namespaceURI, qName); - if( attr.getOffset){ - position(attr.getOffset(1),attr) - } - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr) - } - }, - endElement:function(namespaceURI, localName, qName) { - var current = this.currentElement - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping:function(prefix, uri) { - }, - endPrefixMapping:function(prefix) { - }, - processingInstruction:function(target, data) { - var ins = this.document.createProcessingInstruction(target, data); - this.locator && position(this.locator,ins) - appendElement(this, ins); - }, - ignorableWhitespace:function(ch, start, length) { - }, - characters:function(chars, start, length) { - chars = _toString.apply(this,arguments) - //console.log(chars) - if(this.currentElement && chars){ - if (this.cdata) { - var charNode = this.document.createCDATASection(chars); - this.currentElement.appendChild(charNode); - } else { - var charNode = this.document.createTextNode(chars); - this.currentElement.appendChild(charNode); - } - this.locator && position(this.locator,charNode) - } - }, - skippedEntity:function(name) { - }, - endDocument:function() { - this.document.normalize(); - }, - setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ - locator.lineNumber = 0; - } - }, - //LexicalHandler - comment:function(chars, start, length) { - chars = _toString.apply(this,arguments) - var comm = this.document.createComment(chars); - this.locator && position(this.locator,comm) - appendElement(this, comm); - }, - - startCDATA:function() { - //used in characters() methods - this.cdata = true; - }, - endCDATA:function() { - this.cdata = false; - }, - - startDTD:function(name, publicId, systemId) { - var impl = this.document.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator,dt) - appendElement(this, dt); - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning:function(error) { - console.warn(error,_locator(this.locator)); - }, - error:function(error) { - console.error(error,_locator(this.locator)); - }, - fatalError:function(error) { - console.error(error,_locator(this.locator)); - throw error; - } -} -function _locator(l){ - if(l){ - return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' - } -} -function _toString(chars,start,length){ - if(typeof chars == 'string'){ - return chars.substr(start,length) - }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") - if(chars.length >= start+length || start){ - return new java.lang.String(chars,start,length)+''; - } - return chars; - } -} - -/* - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html - * used method of org.xml.sax.ext.LexicalHandler: - * #comment(chars, start, length) - * #startCDATA() - * #endCDATA() - * #startDTD(name, publicId, systemId) - * - * - * IGNORED method of org.xml.sax.ext.LexicalHandler: - * #endDTD() - * #startEntity(name) - * #endEntity(name) - * - * - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html - * IGNORED method of org.xml.sax.ext.DeclHandler - * #attributeDecl(eName, aName, type, mode, value) - * #elementDecl(name, model) - * #externalEntityDecl(name, publicId, systemId) - * #internalEntityDecl(name, value) - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html - * IGNORED method of org.xml.sax.EntityResolver2 - * #resolveEntity(String name,String publicId,String baseURI,String systemId) - * #resolveEntity(publicId, systemId) - * #getExternalSubset(name, baseURI) - * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html - * IGNORED method of org.xml.sax.DTDHandler - * #notationDecl(name, publicId, systemId) {}; - * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; - */ -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ - DOMHandler.prototype[key] = function(){return null} -}) - -/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ -function appendElement (hander,node) { - if (!hander.currentElement) { - hander.document.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } -}//appendChild and setAttributeNS are preformance key - -if(typeof require == 'function'){ - var XMLReader = require('./sax').XMLReader; - var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; - exports.XMLSerializer = require('./dom').XMLSerializer ; - exports.DOMParser = DOMParser; -} - -},{"./dom":89,"./sax":90}],89:[function(require,module,exports){ -/* - * DOM Level 2 - * Object DOMException - * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html - */ - -function copy(src,dest){ - for(var p in src){ - dest[p] = src[p]; - } -} -/** -^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? -^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? - */ -function _extends(Class,Super){ - var pt = Class.prototype; - if(Object.create){ - var ppt = Object.create(Super.prototype) - pt.__proto__ = ppt; - } - if(!(pt instanceof Super)){ - function t(){}; - t.prototype = Super.prototype; - t = new t(); - copy(pt,t); - Class.prototype = pt = t; - } - if(pt.constructor != Class){ - if(typeof Class != 'function'){ - console.error("unknow Class:"+Class) - } - pt.constructor = Class - } -} -var htmlns = 'http://www.w3.org/1999/xhtml' ; -// Node Types -var NodeType = {} -var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; -var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; -var TEXT_NODE = NodeType.TEXT_NODE = 3; -var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; -var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; -var ENTITY_NODE = NodeType.ENTITY_NODE = 6; -var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; -var COMMENT_NODE = NodeType.COMMENT_NODE = 8; -var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; -var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; -var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; -var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - -// ExceptionCode -var ExceptionCode = {} -var ExceptionMessage = {}; -var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); -var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); -var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); -var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); -var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); -var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); -var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); -var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); -var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); -var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); -//level2 -var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); -var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); -var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); -var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); -var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - - -function DOMException(code, message) { - if(message instanceof Error){ - var error = message; - }else{ - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); - } - error.code = code; - if(message) this.message = this.message + ": " + message; - return error; -}; -DOMException.prototype = Error.prototype; -copy(ExceptionCode,DOMException) -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 - * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. - * The items in the NodeList are accessible via an integral index, starting from 0. - */ -function NodeList() { -}; -NodeList.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length:0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(index) { - return this[index] || null; - } -}; -function LiveNodeList(node,refresh){ - this._node = node; - this._refresh = refresh - _updateLiveList(this); -} -function _updateLiveList(list){ - var inc = list._node._inc || list._node.ownerDocument._inc; - if(list._inc != inc){ - var ls = list._refresh(list._node); - //console.log(ls.length) - __set__(list,'length',ls.length); - copy(ls,list); - list._inc = inc; - } -} -LiveNodeList.prototype.item = function(i){ - _updateLiveList(this); - return this[i]; -} - -_extends(LiveNodeList,NodeList); -/** - * - * Objects implementing the NamedNodeMap interface are used to represent collections of nodes that can be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps are not maintained in any particular order. Objects contained in an object implementing NamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient enumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an order to these Nodes. - * NamedNodeMap objects in the DOM are live. - * used for attributes or DocumentType entities - */ -function NamedNodeMap() { -}; - -function _findNodeIndex(list,node){ - var i = list.length; - while(i--){ - if(list[i] === node){return i} - } -} - -function _addNamedNode(el,list,newAttr,oldAttr){ - if(oldAttr){ - list[_findNodeIndex(list,oldAttr)] = newAttr; - }else{ - list[list.length++] = newAttr; - } - if(el){ - newAttr.ownerElement = el; - var doc = el.ownerDocument; - if(doc){ - oldAttr && _onRemoveAttribute(doc,el,oldAttr); - _onAddAttribute(doc,el,newAttr); - } - } -} -function _removeNamedNode(el,list,attr){ - var i = _findNodeIndex(list,attr); - if(i>=0){ - var lastIndex = list.length-1 - while(i0 || key == 'xmlns'){ -// return null; -// } - var i = this.length; - while(i--){ - var attr = this[i]; - if(attr.nodeName == key){ - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - /* returns Node */ - setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR - var el = attr.ownerElement, oldAttr; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - - /* returns Node */ - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - - - },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - - //for level2 - removeNamedItemNS:function(namespaceURI,localName){ - var attr = this.getNamedItemNS(namespaceURI,localName); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i = this.length; - while(i--){ - var node = this[i]; - if(node.localName == localName && node.namespaceURI == namespaceURI){ - return node; - } - } - return null; - } -}; -/** - * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 - */ -function DOMImplementation(/* Object */ features) { - this._features = {}; - if (features) { - for (var feature in features) { - this._features = features[feature]; - } - } -}; - -DOMImplementation.prototype = { - hasFeature: function(/* string */ feature, /* string */ version) { - var versions = this._features[feature.toLowerCase()]; - if (versions && (!version || version in versions)) { - return true; - } else { - return false; - } - }, - // Introduced in DOM Level 2: - createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR - var doc = new Document(); - doc.doctype = doctype; - if(doctype){ - doc.appendChild(doctype); - } - doc.implementation = this; - doc.childNodes = new NodeList(); - if(qualifiedName){ - var root = doc.createElementNS(namespaceURI,qualifiedName); - doc.appendChild(root); - } - return doc; - }, - // Introduced in DOM Level 2: - createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId; - node.systemId = systemId; - // Introduced in DOM Level 2: - //readonly attribute DOMString internalSubset; - - //TODO:.. - // readonly attribute NamedNodeMap entities; - // readonly attribute NamedNodeMap notations; - return node; - } -}; - - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 - */ - -function Node() { -}; - -Node.prototype = { - firstChild : null, - lastChild : null, - previousSibling : null, - nextSibling : null, - attributes : null, - parentNode : null, - childNodes : null, - ownerDocument : null, - nodeValue : null, - namespaceURI : null, - prefix : null, - localName : null, - // Modified in DOM Level 2: - insertBefore:function(newChild, refChild){//raises - return _insertBefore(this,newChild,refChild); - }, - replaceChild:function(newChild, oldChild){//raises - this.insertBefore(newChild,oldChild); - if(oldChild){ - this.removeChild(oldChild); - } - }, - removeChild:function(oldChild){ - return _removeChild(this,oldChild); - }, - appendChild:function(newChild){ - return this.insertBefore(newChild,null); - }, - hasChildNodes:function(){ - return this.firstChild != null; - }, - cloneNode:function(deep){ - return cloneNode(this.ownerDocument||this,this,deep); - }, - // Modified in DOM Level 2: - normalize:function(){ - var child = this.firstChild; - while(child){ - var next = child.nextSibling; - if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ - this.removeChild(next); - child.appendData(next.data); - }else{ - child.normalize(); - child = next; - } - } - }, - // Introduced in DOM Level 2: - isSupported:function(feature, version){ - return this.ownerDocument.implementation.hasFeature(feature,version); - }, - // Introduced in DOM Level 2: - hasAttributes:function(){ - return this.attributes.length>0; - }, - lookupPrefix:function(namespaceURI){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - for(var n in map){ - if(map[n] == namespaceURI){ - return n; - } - } - } - el = el.nodeType == 2?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI:function(prefix){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - if(prefix in map){ - return map[prefix] ; - } - } - el = el.nodeType == 2?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace:function(namespaceURI){ - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; - } -}; - - -function _xmlEncoder(c){ - return c == '<' && '<' || - c == '>' && '>' || - c == '&' && '&' || - c == '"' && '"' || - '&#'+c.charCodeAt()+';' -} - - -copy(NodeType,Node); -copy(NodeType,Node.prototype); - -/** - * @param callback return true for continue,false for break - * @return boolean true: break visit; - */ -function _visitNode(node,callback){ - if(callback(node)){ - return true; - } - if(node = node.firstChild){ - do{ - if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } -} - - - -function Document(){ -} -function _onAddAttribute(doc,el,newAttr){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value - } -} -function _onRemoveAttribute(doc,el,newAttr,remove){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - delete el._nsMap[newAttr.prefix?newAttr.localName:''] - } -} -function _onUpdateChild(doc,el,newChild){ - if(doc && doc._inc){ - doc._inc++; - //update childNodes - var cs = el.childNodes; - if(newChild){ - cs[cs.length++] = newChild; - }else{ - //console.log(1) - var child = el.firstChild; - var i = 0; - while(child){ - cs[i++] = child; - child =child.nextSibling; - } - cs.length = i; - } - } -} - -/** - * attributes; - * children; - * - * writeable properties: - * nodeValue,Attr:value,CharacterData:data - * prefix - */ -function _removeChild(parentNode,child){ - var previous = child.previousSibling; - var next = child.nextSibling; - if(previous){ - previous.nextSibling = next; - }else{ - parentNode.firstChild = next - } - if(next){ - next.previousSibling = previous; - }else{ - parentNode.lastChild = previous; - } - _onUpdateChild(parentNode.ownerDocument,parentNode); - return child; -} -/** - * preformance key(refChild == null) - */ -function _insertBefore(parentNode,newChild,nextChild){ - var cp = newChild.parentNode; - if(cp){ - cp.removeChild(newChild);//remove and update - } - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - var newFirst = newChild.firstChild; - if (newFirst == null) { - return newChild; - } - var newLast = newChild.lastChild; - }else{ - newFirst = newLast = newChild; - } - var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; - - newFirst.previousSibling = pre; - newLast.nextSibling = nextChild; - - - if(pre){ - pre.nextSibling = newFirst; - }else{ - parentNode.firstChild = newFirst; - } - if(nextChild == null){ - parentNode.lastChild = newLast; - }else{ - nextChild.previousSibling = newLast; - } - do{ - newFirst.parentNode = parentNode; - }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) - _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); - //console.log(parentNode.lastChild.nextSibling == null) - if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { - newChild.firstChild = newChild.lastChild = null; - } - return newChild; -} -function _appendSingleChild(parentNode,newChild){ - var cp = newChild.parentNode; - if(cp){ - var pre = parentNode.lastChild; - cp.removeChild(newChild);//remove and update - var pre = parentNode.lastChild; - } - var pre = parentNode.lastChild; - newChild.parentNode = parentNode; - newChild.previousSibling = pre; - newChild.nextSibling = null; - if(pre){ - pre.nextSibling = newChild; - }else{ - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); - return newChild; - //console.log("__aa",parentNode.lastChild.nextSibling == null) -} -Document.prototype = { - //implementation : null, - nodeName : '#document', - nodeType : DOCUMENT_NODE, - doctype : null, - documentElement : null, - _inc : 1, - - insertBefore : function(newChild, refChild){//raises - if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ - var child = newChild.firstChild; - while(child){ - var next = child.nextSibling; - this.insertBefore(child,refChild); - child = next; - } - return newChild; - } - if(this.documentElement == null && newChild.nodeType == 1){ - this.documentElement = newChild; - } - - return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; - }, - removeChild : function(oldChild){ - if(this.documentElement == oldChild){ - this.documentElement = null; - } - return _removeChild(this,oldChild); - }, - // Introduced in DOM Level 2: - importNode : function(importedNode,deep){ - return importNode(this,importedNode,deep); - }, - // Introduced in DOM Level 2: - getElementById : function(id){ - var rtv = null; - _visitNode(this.documentElement,function(node){ - if(node.nodeType == 1){ - if(node.getAttribute('id') == id){ - rtv = node; - return true; - } - } - }) - return rtv; - }, - - //document factory method: - createElement : function(tagName){ - var node = new Element(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment : function(){ - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode : function(data){ - var node = new Text(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createComment : function(data){ - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createCDATASection : function(data){ - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createProcessingInstruction : function(target,data){ - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.target = target; - node.nodeValue= node.data = data; - return node; - }, - createAttribute : function(name){ - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference : function(name){ - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - // Introduced in DOM Level 2: - createElementNS : function(namespaceURI,qualifiedName){ - var node = new Element(); - var pl = qualifiedName.split(':'); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - // Introduced in DOM Level 2: - createAttributeNS : function(namespaceURI,qualifiedName){ - var node = new Attr(); - var pl = qualifiedName.split(':'); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - return node; - } -}; -_extends(Document,Node); - - -function Element() { - this._nsMap = {}; -}; -Element.prototype = { - nodeType : ELEMENT_NODE, - hasAttribute : function(name){ - return this.getAttributeNode(name)!=null; - }, - getAttribute : function(name){ - var attr = this.getAttributeNode(name); - return attr && attr.value || ''; - }, - getAttributeNode : function(name){ - return this.attributes.getNamedItem(name); - }, - setAttribute : function(name, value){ - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - removeAttribute : function(name){ - var attr = this.getAttributeNode(name) - attr && this.removeAttributeNode(attr); - }, - - //four real opeartion method - appendChild:function(newChild){ - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - return this.insertBefore(newChild,null); - }else{ - return _appendSingleChild(this,newChild); - } - }, - setAttributeNode : function(newAttr){ - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS : function(newAttr){ - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode : function(oldAttr){ - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS : function(namespaceURI, localName){ - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - - hasAttributeNS : function(namespaceURI, localName){ - return this.getAttributeNodeNS(namespaceURI, localName)!=null; - }, - getAttributeNS : function(namespaceURI, localName){ - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ''; - }, - setAttributeNS : function(namespaceURI, qualifiedName, value){ - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = value; - this.setAttributeNode(attr) - }, - getAttributeNodeNS : function(namespaceURI, localName){ - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - - getElementsByTagName : function(tagName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS : function(namespaceURI, localName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType === ELEMENT_NODE && node.namespaceURI === namespaceURI && (localName === '*' || node.localName == localName)){ - ls.push(node); - } - }); - return ls; - }); - } -}; -Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; -Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; - - -_extends(Element,Node); -function Attr() { -}; -Attr.prototype.nodeType = ATTRIBUTE_NODE; -_extends(Attr,Node); - - -function CharacterData() { -}; -CharacterData.prototype = { - data : '', - substringData : function(offset, count) { - return this.data.substring(offset, offset+count); - }, - appendData: function(text) { - text = this.data+text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset,text) { - this.replaceData(offset,0,text); - - }, - appendChild:function(newChild){ - //if(!(newChild instanceof CharacterData)){ - throw new Error(ExceptionMessage[3]) - //} - return Node.prototype.appendChild.apply(this,arguments) - }, - deleteData: function(offset, count) { - this.replaceData(offset,count,""); - }, - replaceData: function(offset, count, text) { - var start = this.data.substring(0,offset); - var end = this.data.substring(offset+count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } -} -_extends(CharacterData,Node); -function Text() { -}; -Text.prototype = { - nodeName : "#text", - nodeType : TEXT_NODE, - splitText : function(offset) { - var text = this.data; - var newText = text.substring(offset); - text = text.substring(0, offset); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if(this.parentNode){ - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; - } -} -_extends(Text,CharacterData); -function Comment() { -}; -Comment.prototype = { - nodeName : "#comment", - nodeType : COMMENT_NODE -} -_extends(Comment,CharacterData); - -function CDATASection() { -}; -CDATASection.prototype = { - nodeName : "#cdata-section", - nodeType : CDATA_SECTION_NODE -} -_extends(CDATASection,CharacterData); - - -function DocumentType() { -}; -DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; -_extends(DocumentType,Node); - -function Notation() { -}; -Notation.prototype.nodeType = NOTATION_NODE; -_extends(Notation,Node); - -function Entity() { -}; -Entity.prototype.nodeType = ENTITY_NODE; -_extends(Entity,Node); - -function EntityReference() { -}; -EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; -_extends(EntityReference,Node); - -function DocumentFragment() { -}; -DocumentFragment.prototype.nodeName = "#document-fragment"; -DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; -_extends(DocumentFragment,Node); - - -function ProcessingInstruction() { -} -ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; -_extends(ProcessingInstruction,Node); -function XMLSerializer(){} -XMLSerializer.prototype.serializeToString = function(node){ - var buf = []; - serializeToString(node,buf); - return buf.join(''); -} -Node.prototype.toString =function(){ - return XMLSerializer.prototype.serializeToString(this); -} -function serializeToString(node,buf){ - switch(node.nodeType){ - case ELEMENT_NODE: - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - var isHTML = htmlns === node.namespaceURI - buf.push('<',nodeName); - for(var i=0;i'); - //if is cdata child node - if(isHTML && /^script$/i.test(nodeName)){ - if(child){ - buf.push(child.data); - } - }else{ - while(child){ - serializeToString(child,buf); - child = child.nextSibling; - } - } - buf.push(''); - }else{ - buf.push('/>'); - } - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while(child){ - serializeToString(child,buf); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); - case TEXT_NODE: - return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); - case CDATA_SECTION_NODE: - return buf.push( ''); - case COMMENT_NODE: - return buf.push( ""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push(''); - }else if(sysid && sysid!='.'){ - buf.push(' SYSTEM "',sysid,'">'); - }else{ - var sub = node.internalSubset; - if(sub){ - buf.push(" [",sub,"]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push( ""); - case ENTITY_REFERENCE_NODE: - return buf.push( '&',node.nodeName,';'); - //case ENTITY_NODE: - //case NOTATION_NODE: - default: - buf.push('??',node.nodeName); - } -} -function importNode(doc,node,deep){ - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - //var attrs = node2.attributes; - //var len = attrs.length; - //for(var i=0;i - -function XMLReader(){ - -} - -XMLReader.prototype = { - parse:function(source,defaultNSMap,entityMap){ - var domBuilder = this.domBuilder; - domBuilder.startDocument(); - _copy(defaultNSMap ,defaultNSMap = {}) - parse(source,defaultNSMap,entityMap, - domBuilder,this.errorHandler); - domBuilder.endDocument(); - } -} -function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ - function fixedFromCharCode(code) { - // String.prototype.fromCharCode does not supports - // > 2 bytes unicode chars directly - if (code > 0xffff) { - code -= 0x10000; - var surrogate1 = 0xd800 + (code >> 10) - , surrogate2 = 0xdc00 + (code & 0x3ff); - - return String.fromCharCode(surrogate1, surrogate2); - } else { - return String.fromCharCode(code); - } - } - function entityReplacer(a){ - var k = a.slice(1,-1); - if(k in entityMap){ - return entityMap[k]; - }else if(k.charAt(0) === '#'){ - return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) - }else{ - errorHandler.error('entity not found:'+a); - return a; - } - } - function appendText(end){//has some bugs - var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); - locator&&position(start); - domBuilder.characters(xt,0,end-start); - start = end - } - function position(start,m){ - while(start>=endPos && (m = linePattern.exec(source))){ - startPos = m.index; - endPos = startPos + m[0].length; - locator.lineNumber++; - //console.log('line++:',locator,startPos,endPos) - } - locator.columnNumber = start-startPos+1; - } - var startPos = 0; - var endPos = 0; - var linePattern = /.+(?:\r\n?|\n)|.*$/g - var locator = domBuilder.locator; - - var parseStack = [{currentNSMap:defaultNSMapCopy}] - var closeMap = {}; - var start = 0; - while(true){ - var i = source.indexOf('<',start); - if(i<0){ - if(!source.substr(start).match(/^\s*$/)){ - var doc = domBuilder.document; - var text = doc.createTextNode(source.substr(start)); - doc.appendChild(text); - domBuilder.currentElement = text; - } - return; - } - if(i>start){ - appendText(i); - } - switch(source.charAt(i+1)){ - case '/': - var end = source.indexOf('>',i+3); - var tagName = source.substring(i+2,end); - var config = parseStack.pop(); - var localNSMap = config.localNSMap; - - if(config.tagName != tagName){ - errorHandler.fatalError("end tag name: "+tagName+' is not match the current start tagName:'+config.tagName ); - } - domBuilder.endElement(config.uri,config.localName,tagName); - if(localNSMap){ - for(var prefix in localNSMap){ - domBuilder.endPrefixMapping(prefix) ; - } - } - end++; - break; - // end elment - case '?':// - locator&&position(i); - end = parseInstruction(source,i,domBuilder); - break; - case '!':// 0){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - el.add(attrName,value,start-1); - s = S_E; - }else{ - //fatalError: no end quot match - throw new Error('attribute value no end \''+c+'\' match'); - } - }else if(s == S_V){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - //console.log(attrName,value,start,p) - el.add(attrName,value,start); - //console.dir(el) - errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); - start = p+1; - s = S_E - }else{ - //fatalError: no equal before - throw new Error('attribute value must after "="'); - } - break; - case '/': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_E: - case S_S: - case S_C: - s = S_C; - el.closed = true; - case S_V: - case S_ATTR: - case S_ATTR_S: - break; - //case S_EQ: - default: - throw new Error("attribute invalid close char('/')") - } - break; - case ''://end document - //throw new Error('unexpected end of input') - errorHandler.error('unexpected end of input'); - case '>': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_E: - case S_S: - case S_C: - break;//normal - case S_V://Compatible state - case S_ATTR: - value = source.slice(start,p); - if(value.slice(-1) === '/'){ - el.closed = true; - value = value.slice(0,-1) - } - case S_ATTR_S: - if(s === S_ATTR_S){ - value = attrName; - } - if(s == S_V){ - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) - }else{ - errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') - el.add(value,value,start) - } - break; - case S_EQ: - throw new Error('attribute value missed!!'); - } -// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) - return p; - /*xml space '\x20' | #x9 | #xD | #xA; */ - case '\u0080': - c = ' '; - default: - if(c<= ' '){//space - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p));//tagName - s = S_S; - break; - case S_ATTR: - attrName = source.slice(start,p) - s = S_ATTR_S; - break; - case S_V: - var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value,start) - case S_E: - s = S_S; - break; - //case S_S: - //case S_EQ: - //case S_ATTR_S: - // void();break; - //case S_C: - //ignore warning - } - }else{//not space -//S_TAG, S_ATTR, S_EQ, S_V -//S_ATTR_S, S_E, S_S, S_C - switch(s){ - //case S_TAG:void();break; - //case S_ATTR:void();break; - //case S_V:void();break; - case S_ATTR_S: - errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!') - el.add(attrName,attrName,start); - start = p; - s = S_ATTR; - break; - case S_E: - errorHandler.warning('attribute space is required"'+attrName+'"!!') - case S_S: - s = S_ATTR; - start = p; - break; - case S_EQ: - s = S_V; - start = p; - break; - case S_C: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - } - p++; - } -} -/** - * @return end of the elementStartPart(end of elementEndPart for selfClosed el) - */ -function appendElement(el,domBuilder,parseStack){ - var tagName = el.tagName; - var localNSMap = null; - var currentNSMap = parseStack[parseStack.length-1].currentNSMap; - var i = el.length; - while(i--){ - var a = el[i]; - var qName = a.qName; - var value = a.value; - var nsp = qName.indexOf(':'); - if(nsp>0){ - var prefix = a.prefix = qName.slice(0,nsp); - var localName = qName.slice(nsp+1); - var nsPrefix = prefix === 'xmlns' && localName - }else{ - localName = qName; - prefix = null - nsPrefix = qName === 'xmlns' && '' - } - //can not set prefix,because prefix !== '' - a.localName = localName ; - //prefix == null for no ns prefix attribute - if(nsPrefix !== false){//hack!! - if(localNSMap == null){ - localNSMap = {} - //console.log(currentNSMap,0) - _copy(currentNSMap,currentNSMap={}) - //console.log(currentNSMap,1) - } - currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; - a.uri = 'http://www.w3.org/2000/xmlns/' - domBuilder.startPrefixMapping(nsPrefix, value) - } - } - var i = el.length; - while(i--){ - a = el[i]; - var prefix = a.prefix; - if(prefix){//no prefix attribute has no namespace - if(prefix === 'xml'){ - a.uri = 'http://www.w3.org/XML/1998/namespace'; - }if(prefix !== 'xmlns'){ - a.uri = currentNSMap[prefix] - - //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} - } - } - } - var nsp = tagName.indexOf(':'); - if(nsp>0){ - prefix = el.prefix = tagName.slice(0,nsp); - localName = el.localName = tagName.slice(nsp+1); - }else{ - prefix = null;//important!! - localName = el.localName = tagName; - } - //no prefix element has default namespace - var ns = el.uri = currentNSMap[prefix || '']; - domBuilder.startElement(ns,localName,tagName,el); - //endPrefixMapping and startPrefixMapping have not any help for dom builder - //localNSMap = null - if(el.closed){ - domBuilder.endElement(ns,localName,tagName); - if(localNSMap){ - for(prefix in localNSMap){ - domBuilder.endPrefixMapping(prefix) - } - } - }else{ - el.currentNSMap = currentNSMap; - el.localNSMap = localNSMap; - parseStack.push(el); - } -} -function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ - if(/^(?:script|textarea)$/i.test(tagName)){ - var elEndStart = source.indexOf('',elStartEnd); - var text = source.substring(elStartEnd+1,elEndStart); - if(/[&<]/.test(text)){ - if(/^script$/i.test(tagName)){ - //if(!/\]\]>/.test(text)){ - //lexHandler.startCDATA(); - domBuilder.characters(text,0,text.length); - //lexHandler.endCDATA(); - return elEndStart; - //} - }//}else{//text area - text = text.replace(/&#?\w+;/g,entityReplacer); - domBuilder.characters(text,0,text.length); - return elEndStart; - //} - - } - } - return elStartEnd+1; -} -function fixSelfClosed(source,elStartEnd,tagName,closeMap){ - //if(tagName in closeMap){ - var pos = closeMap[tagName]; - if(pos == null){ - //console.log(tagName) - pos = closeMap[tagName] = source.lastIndexOf('') - } - return pos',start+4); - //append comment source.substring(4,end)//, - * and raw CDATA nodes. - * - * @param {Element} node - * @returns {Boolean} - * @api private - */ - -function shouldIgnoreNode (node) { - return node.nodeType === TEXT_NODE - || node.nodeType === COMMENT_NODE - || node.nodeType === CDATA_NODE; -} - -/** - * Check if the node is empty. Some plist file has such node: - * - * this node shoud be ignored. - * - * @see https://github.com/TooTallNate/plist.js/issues/66 - * @param {Element} node - * @returns {Boolean} - * @api private - */ -function isEmptyNode(node){ - if(!node.childNodes || node.childNodes.length === 0) { - return true; - } else { - return false; - } -} - -function invariant(test, message) { - if (!test) { - throw new Error(message); - } -} - -/** - * Parses a Plist XML string. Returns an Object. - * - * @param {String} xml - the XML String to decode - * @returns {Mixed} the decoded value from the Plist XML - * @api public - */ - -function parse (xml) { - var doc = new DOMParser().parseFromString(xml); - invariant( - doc.documentElement.nodeName === 'plist', - 'malformed document. First element should be ' - ); - var plist = parsePlistXML(doc.documentElement); - - // the root node gets interpreted as an Array, - // so pull out the inner data first - if (plist.length == 1) plist = plist[0]; - - return plist; -} - -/** - * Convert an XML based plist document into a JSON representation. - * - * @param {Object} xml_node - current XML node in the plist - * @returns {Mixed} built up JSON object - * @api private - */ - -function parsePlistXML (node) { - var i, new_obj, key, val, new_arr, res, counter, type; - - if (!node) - return null; - - if (node.nodeName === 'plist') { - new_arr = []; - if (isEmptyNode(node)) { - return new_arr; - } - for (i=0; i < node.childNodes.length; i++) { - if (!shouldIgnoreNode(node.childNodes[i])) { - new_arr.push( parsePlistXML(node.childNodes[i])); - } - } - return new_arr; - } else if (node.nodeName === 'dict') { - new_obj = {}; - key = null; - counter = 0; - if (isEmptyNode(node)) { - return new_obj; - } - for (i=0; i < node.childNodes.length; i++) { - if (shouldIgnoreNode(node.childNodes[i])) continue; - if (counter % 2 === 0) { - invariant( - node.childNodes[i].nodeName === 'key', - 'Missing key while parsing .' - ); - key = parsePlistXML(node.childNodes[i]); - } else { - invariant( - node.childNodes[i].nodeName !== 'key', - 'Unexpected key "' - + parsePlistXML(node.childNodes[i]) - + '" while parsing .' - ); - new_obj[key] = parsePlistXML(node.childNodes[i]); - } - counter += 1; - } - if (counter % 2 === 1) { - throw new Error('Missing value for "' + key + '" while parsing '); - } - return new_obj; - - } else if (node.nodeName === 'array') { - new_arr = []; - if (isEmptyNode(node)) { - return new_arr; - } - for (i=0; i < node.childNodes.length; i++) { - if (!shouldIgnoreNode(node.childNodes[i])) { - res = parsePlistXML(node.childNodes[i]); - if (null != res) new_arr.push(res); - } - } - return new_arr; - - } else if (node.nodeName === '#text') { - // TODO: what should we do with text types? (CDATA sections) - - } else if (node.nodeName === 'key') { - if (isEmptyNode(node)) { - return ''; - } - return node.childNodes[0].nodeValue; - } else if (node.nodeName === 'string') { - res = ''; - if (isEmptyNode(node)) { - return res; - } - for (i=0; i < node.childNodes.length; i++) { - var type = node.childNodes[i].nodeType; - if (type === TEXT_NODE || type === CDATA_NODE) { - res += node.childNodes[i].nodeValue; - } - } - return res; - - } else if (node.nodeName === 'integer') { - invariant( - !isEmptyNode(node), - 'Cannot parse "" as integer.' - ); - return parseInt(node.childNodes[0].nodeValue, 10); - - } else if (node.nodeName === 'real') { - invariant( - !isEmptyNode(node), - 'Cannot parse "" as real.' - ); - res = ''; - for (i=0; i < node.childNodes.length; i++) { - if (node.childNodes[i].nodeType === TEXT_NODE) { - res += node.childNodes[i].nodeValue; - } - } - return parseFloat(res); - - } else if (node.nodeName === 'data') { - res = ''; - if (isEmptyNode(node)) { - return new Buffer(res, 'base64'); - } - for (i=0; i < node.childNodes.length; i++) { - if (node.childNodes[i].nodeType === TEXT_NODE) { - res += node.childNodes[i].nodeValue.replace(/\s+/g, ''); - } - } - return new Buffer(res, 'base64'); - - } else if (node.nodeName === 'date') { - invariant( - !isEmptyNode(node), - 'Cannot parse "" as Date.' - ) - return new Date(node.childNodes[0].nodeValue); - - } else if (node.nodeName === 'true') { - return true; - - } else if (node.nodeName === 'false') { - return false; - } -} diff --git a/node_modules/cordova-android/node_modules/plist/package.json b/node_modules/cordova-android/node_modules/plist/package.json deleted file mode 100644 index 39545b7..0000000 --- a/node_modules/cordova-android/node_modules/plist/package.json +++ /dev/null @@ -1,86 +0,0 @@ -{ - "_from": "plist@^2.1.0", - "_id": "plist@2.1.0", - "_inBundle": true, - "_integrity": "sha1-V8zbeggh3yGDEhejytVOPhRqECU=", - "_location": "/cordova-android/plist", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "plist@^2.1.0", - "name": "plist", - "escapedName": "plist", - "rawSpec": "^2.1.0", - "saveSpec": null, - "fetchSpec": "^2.1.0" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/plist/-/plist-2.1.0.tgz", - "_shasum": "57ccdb7a0821df21831217a3cad54e3e146a1025", - "_spec": "plist@^2.1.0", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Nathan Rajlich", - "email": "nathan@tootallnate.net" - }, - "bugs": { - "url": "https://github.com/TooTallNate/node-plist/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Hans Huebner", - "email": "hans.huebner@gmail.com" - }, - { - "name": "Pierre Metrailler" - }, - { - "name": "Mike Reinstein", - "email": "reinstein.mike@gmail.com" - }, - { - "name": "Vladimir Tsvang" - }, - { - "name": "Mathieu D'Amours" - } - ], - "dependencies": { - "base64-js": "1.2.0", - "xmlbuilder": "8.2.2", - "xmldom": "0.1.x" - }, - "deprecated": false, - "description": "Mac OS X Plist parser/builder for Node.js and browsers", - "devDependencies": { - "browserify": "^14.3.0", - "mocha": "^3.3.0", - "multiline": "^1.0.2", - "zuul": "^3.10.1" - }, - "homepage": "https://github.com/TooTallNate/node-plist#readme", - "keywords": [ - "apple", - "browser", - "mac", - "plist", - "parser", - "xml" - ], - "license": "MIT", - "main": "index.js", - "name": "plist", - "repository": { - "type": "git", - "url": "git://github.com/TooTallNate/node-plist.git" - }, - "scripts": { - "test": "make test" - }, - "version": "2.1.0" -} diff --git a/node_modules/cordova-android/node_modules/properties-parser/README.markdown b/node_modules/cordova-android/node_modules/properties-parser/README.markdown deleted file mode 100644 index 3a808ba..0000000 --- a/node_modules/cordova-android/node_modules/properties-parser/README.markdown +++ /dev/null @@ -1,48 +0,0 @@ -# node-properties-parser - -A parser for [.properties](http://en.wikipedia.org/wiki/.properties) files written in javascript. Properties files store key-value pairs. They are typically used for configuration and internationalization in Java applications as well as in Actionscript projects. Here's an example of the format: - - # You are reading the ".properties" entry. - ! The exclamation mark can also mark text as comments. - website = http://en.wikipedia.org/ - language = English - # The backslash below tells the application to continue reading - # the value onto the next line. - message = Welcome to \ - Wikipedia! - # Add spaces to the key - key\ with\ spaces = This is the value that could be looked up with the key "key with spaces". - # Unicode - tab : \u0009 -*(taken from [Wikipedia](http://en.wikipedia.org/wiki/.properties#Format))* - -Currently works with any version of node.js. - -## The API - -- `parse(text)`: Parses `text` into key-value pairs. Returns an object containing the key-value pairs. -- `read(path[, callback])`: Opens the file specified by `path` and calls `parse` on its content. If the optional `callback` parameter is provided, the result is then passed to it as the second parameter. If an error occurs, the error object is passed to `callback` as the first parameter. If `callback` is not provided, the file specified by `path` is synchronously read and calls `parse` on its contents. The resulting object is immediately returned. -- `createEditor([path[, callback]])`: If neither `path` or `callback` are provided an empty editor object is returned synchronously. If only `path` is provided, the file specified by `path` is synchronously read and parsed. An editor object with the results in then immediately returned. If both `path` and `callback` are provided, the file specified by `path` is read and parsed asynchronously. An editor object with the results are then passed to `callback` as the second parameters. If an error occurs, the error object is passed to `callback` as the first parameter. -- `Editor`: The editor object is returned by `createEditor`. Has the following API: - - `get(key)`: Returns the value currently associated with `key`. - - `set(key, [value[, comment]])`: Associates `key` with `value`. An optional comment can be provided. If `value` is not specified or is `null`, then `key` is unset. - - `unset(key)`: Unsets the specified `key`. - - `save([path][, callback]])`: Writes the current contents of this editor object to a file specified by `path`. If `path` is not provided, then it'll be defaulted to the `path` value passed to `createEditor`. The `callback` parameter is called when the file has been written to disk. - - `addHeadComment`: Added a comment to the head of the file. - - `toString`: Returns the string representation of this properties editor object. This string will be written to a file if `save` is called. - -## Getting node-properties-parser - -The easiest way to get node-properties-parser is with [npm](http://npmjs.org/): - - npm install properties-parser - -Alternatively you can clone this git repository: - - git://github.com/xavi-/node-properties-parser.git - -## Developed by -* Xavi Ramirez - -## License -This project is released under [The MIT License](http://www.opensource.org/licenses/mit-license.php). \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/properties-parser/index.js b/node_modules/cordova-android/node_modules/properties-parser/index.js deleted file mode 100644 index b103ad0..0000000 --- a/node_modules/cordova-android/node_modules/properties-parser/index.js +++ /dev/null @@ -1,354 +0,0 @@ -var fs = require("fs"); - -function Iterator(text) { - var pos = 0, length = text.length; - - this.peek = function(num) { - num = num || 0; - if(pos + num >= length) { return null; } - - return text.charAt(pos + num); - }; - this.next = function(inc) { - inc = inc || 1; - - if(pos >= length) { return null; } - - return text.charAt((pos += inc) - inc); - }; - this.pos = function() { - return pos; - }; -} - -var rWhitespace = /\s/; -function isWhitespace(chr) { - return rWhitespace.test(chr); -} -function consumeWhiteSpace(iter) { - var start = iter.pos(); - - while(isWhitespace(iter.peek())) { iter.next(); } - - return { type: "whitespace", start: start, end: iter.pos() }; -} - -function startsComment(chr) { - return chr === "!" || chr === "#"; -} -function isEOL(chr) { - return chr == null || chr === "\n" || chr === "\r"; -} -function consumeComment(iter) { - var start = iter.pos(); - - while(!isEOL(iter.peek())) { iter.next(); } - - return { type: "comment", start: start, end: iter.pos() }; -} - -function startsKeyVal(chr) { - return !isWhitespace(chr) && !startsComment(chr); -} -function startsSeparator(chr) { - return chr === "=" || chr === ":" || isWhitespace(chr); -} -function startsEscapedVal(chr) { - return chr === "\\"; -} -function consumeEscapedVal(iter) { - var start = iter.pos(); - - iter.next(); // move past "\" - var curChar = iter.next(); - if(curChar === "u") { // encoded unicode char - iter.next(4); // Read in the 4 hex values - } - - return { type: "escaped-value", start: start, end: iter.pos() }; -} -function consumeKey(iter) { - var start = iter.pos(), children = []; - - var curChar; - while((curChar = iter.peek()) !== null) { - if(startsSeparator(curChar)) { break; } - if(startsEscapedVal(curChar)) { children.push(consumeEscapedVal(iter)); continue; } - - iter.next(); - } - - return { type: "key", start: start, end: iter.pos(), children: children }; -} -function consumeKeyValSeparator(iter) { - var start = iter.pos(); - - var seenHardSep = false, curChar; - while((curChar = iter.peek()) !== null) { - if(isEOL(curChar)) { break; } - - if(isWhitespace(curChar)) { iter.next(); continue; } - - if(seenHardSep) { break; } - - seenHardSep = (curChar === ":" || curChar === "="); - if(seenHardSep) { iter.next(); continue; } - - break; // curChar is a non-separtor char - } - - return { type: "key-value-separator", start: start, end: iter.pos() }; -} -function startsLineBreak(iter) { - return iter.peek() === "\\" && isEOL(iter.peek(1)); -} -function consumeLineBreak(iter) { - var start = iter.pos(); - - iter.next(); // consume \ - if(iter.peek() === "\r") { iter.next(); } - iter.next(); // consume \n - - var curChar; - while((curChar = iter.peek()) !== null) { - if(isEOL(curChar)) { break; } - if(!isWhitespace(curChar)) { break; } - - iter.next(); - } - - return { type: "line-break", start: start, end: iter.pos() }; -} -function consumeVal(iter) { - var start = iter.pos(), children = []; - - var curChar; - while((curChar = iter.peek()) !== null) { - if(startsLineBreak(iter)) { children.push(consumeLineBreak(iter)); continue; } - if(startsEscapedVal(curChar)) { children.push(consumeEscapedVal(iter)); continue; } - if(isEOL(curChar)) { break; } - - iter.next(); - } - - return { type: "value", start: start, end: iter.pos(), children: children }; -} -function consumeKeyVal(iter) { - return { - type: "key-value", - start: iter.pos(), - children: [ - consumeKey(iter), - consumeKeyValSeparator(iter), - consumeVal(iter) - ], - end: iter.pos() - }; -} - -var renderChild = { - "escaped-value": function(child, text) { - var type = text.charAt(child.start + 1); - - if(type === "t") { return "\t"; } - if(type === "r") { return "\r"; } - if(type === "n") { return "\n"; } - if(type === "f") { return "\f"; } - if(type !== "u") { return type; } - - return String.fromCharCode(parseInt(text.substr(child.start + 2, 4), 16)); - }, - "line-break": function (child, text) { - return ""; - } -}; -function rangeToBuffer(range, text) { - var start = range.start, buffer = []; - - for(var i = 0; i < range.children.length; i++) { - var child = range.children[i]; - - buffer.push(text.substring(start, child.start)); - buffer.push(renderChild[child.type](child, text)); - start = child.end; - } - buffer.push(text.substring(start, range.end)); - - return buffer; -} -function rangesToObject(ranges, text) { - var obj = Object.create(null); // Creates to a true hash map - - for(var i = 0; i < ranges.length; i++) { - var range = ranges[i]; - - if(range.type !== "key-value") { continue; } - - var key = rangeToBuffer(range.children[0], text).join(""); - var val = rangeToBuffer(range.children[2], text).join(""); - obj[key] = val; - } - - return obj; -} - -function stringToRanges(text) { - var iter = new Iterator(text), ranges = []; - - var curChar; - while((curChar = iter.peek()) !== null) { - if(isWhitespace(curChar)) { ranges.push(consumeWhiteSpace(iter)); continue; } - if(startsComment(curChar)) { ranges.push(consumeComment(iter)); continue; } - if(startsKeyVal(curChar)) { ranges.push(consumeKeyVal(iter)); continue; } - - throw Error("Something crazy happened. text: '" + text + "'; curChar: '" + curChar + "'"); - } - - return ranges; -} - -function isNewLineRange(range) { - if(!range) { return false; } - - if(range.type === "whitespace") { return true; } - - if(range.type === "literal") { - return isWhitespace(range.text) && range.text.indexOf("\n") > -1; - } - - return false; -} - -function Editor(text, path) { - text = text || ""; - - var ranges = stringToRanges(text); - var obj = rangesToObject(ranges, text); - var keyRange = Object.create(null); // Creates to a true hash map - - for(var i = 0; i < ranges.length; i++) { - var range = ranges[i]; - - if(range.type !== "key-value") { continue; } - - var key = rangeToBuffer(range.children[0], text).join(""); - keyRange[key] = range; - } - - this.addHeadComment = function(comment) { - if(comment == null) { return; } - - ranges.unshift({ type: "literal", text: "# " + comment.replace(/\n/g, "\n# ") + "\n" }); - }; - - this.get = function(key) { return obj[key]; }; - this.set = function(key, val, comment) { - if(val == null) { this.unset(key); return; } - - obj[key] = val; - - var range = keyRange[key]; - if(!range) { - keyRange[key] = range = { type: "literal", text: key + "=" + val }; - - var prevRange = ranges[ranges.length - 1]; - if(prevRange != null && !isNewLineRange(prevRange)) { - ranges.push({ type: "literal", text: "\n" }); - } - ranges.push(range); - } - - // comment === null deletes comment. if comment === undefined, it's left alone - if(comment !== undefined) { - range.comment = comment && "# " + comment.replace(/\n/g, "\n# ") + "\n"; - } - - if(range.type === "literal") { - range.text = key + "=" + val; - if(range.comment != null) { range.text = range.comment + range.text; } - } else if(range.type === "key-value") { - range.children[2] = { type: "literal", text: val }; - } else { - throw "Unknown node type: " + range.type; - } - }; - this.unset = function(key) { - if(!(key in obj)) { return; } - - var range = keyRange[key]; - var idx = ranges.indexOf(range); - - ranges.splice(idx, (isNewLineRange(ranges[idx + 1]) ? 2 : 1)); - - delete keyRange[key]; - delete obj[key]; - }; - this.valueOf = this.toString = function() { - var buffer = [], stack = [].concat(ranges); - - var node; - while((node = stack.shift()) != null) { - switch(node.type) { - case "literal": - buffer.push(node.text); - break; - case "key": - case "value": - case "comment": - case "whitespace": - case "key-value-separator": - case "escaped-value": - case "line-break": - buffer.push(text.substring(node.start, node.end)); - break; - case "key-value": - Array.prototype.unshift.apply(stack, node.children); - if(node.comment) { stack.unshift({ type: "literal", text: node.comment }); } - break; - } - } - - return buffer.join(""); - }; - this.save = function(newPath, callback) { - if(typeof newPath === 'function') { - callback = newPath; - newPath = path; - } - newPath = newPath || path; - - if(!newPath) { callback("Unknown path"); } - - fs.writeFile(newPath, this.toString(), callback || function() {}); - }; -} -function createEditor(path, callback) { - if(!path) { return new Editor(); } - - if(!callback) { return new Editor(fs.readFileSync(path).toString(), path); } - - return fs.readFile(path, function(err, text) { - if(err) { return callback(err, null); } - - text = text.toString(); - return callback(null, new Editor(text, path)); - }); -} - -function parse(text) { - text = text.toString(); - var ranges = stringToRanges(text); - return rangesToObject(ranges, text); -} - -function read(path, callback) { - if(!callback) { return parse(fs.readFileSync(path)); } - - return fs.readFile(path, function(err, data) { - if(err) { return callback(err, null); } - - return callback(null, parse(data)); - }); -} - -module.exports = { parse: parse, read: read, createEditor: createEditor }; diff --git a/node_modules/cordova-android/node_modules/properties-parser/package.json b/node_modules/cordova-android/node_modules/properties-parser/package.json deleted file mode 100644 index 8488866..0000000 --- a/node_modules/cordova-android/node_modules/properties-parser/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "_from": "properties-parser@0.2.3", - "_id": "properties-parser@0.2.3", - "_inBundle": true, - "_integrity": "sha1-91kSVfcHq7/yJ8e1a2N9uwNzoQ8=", - "_location": "/cordova-android/properties-parser", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "properties-parser@0.2.3", - "name": "properties-parser", - "escapedName": "properties-parser", - "rawSpec": "0.2.3", - "saveSpec": null, - "fetchSpec": "0.2.3" - }, - "_requiredBy": [ - "/cordova-android" - ], - "_resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.2.3.tgz", - "_shasum": "f7591255f707abbff227c7b56b637dbb0373a10f", - "_spec": "properties-parser@0.2.3", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "bugs": { - "url": "https://github.com/xavi-/node-properties-parser/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A parser for .properties files written in javascript", - "engines": { - "node": ">= 0.3.1" - }, - "homepage": "https://github.com/xavi-/node-properties-parser#readme", - "keywords": [ - "parser", - ".properties", - "properties", - "java", - "file parser", - "actionscript" - ], - "main": "./index.js", - "maintainers": [ - { - "name": "Xavi", - "email": "xavi.rmz@gmail.com", - "url": "http://xavi.co" - } - ], - "name": "properties-parser", - "repository": { - "type": "git", - "url": "git+https://github.com/xavi-/node-properties-parser.git" - }, - "version": "0.2.3" -} diff --git a/node_modules/cordova-android/node_modules/properties-parser/play-ground.js b/node_modules/cordova-android/node_modules/properties-parser/play-ground.js deleted file mode 100644 index ffbcf62..0000000 --- a/node_modules/cordova-android/node_modules/properties-parser/play-ground.js +++ /dev/null @@ -1,17 +0,0 @@ -var parser = require("./"); -var editor = parser.createEditor(); - -editor.set("ok", "hi"); -editor.set("hi", "ok"); - -console.log(editor.toString()); - -editor.unset("hi"); - -console.log("==================="); -console.log(editor.toString()); - -editor.unset("ok"); - -console.log("==================="); -console.log(editor.toString()); diff --git a/node_modules/cordova-android/node_modules/q/CHANGES.md b/node_modules/cordova-android/node_modules/q/CHANGES.md deleted file mode 100644 index cd351fd..0000000 --- a/node_modules/cordova-android/node_modules/q/CHANGES.md +++ /dev/null @@ -1,786 +0,0 @@ - -## 1.4.1 - - - Address an issue that prevented Q from being used as a ` - - diff --git a/node_modules/cordova-android/node_modules/sax/examples/test.xml b/node_modules/cordova-android/node_modules/sax/examples/test.xml deleted file mode 100644 index 801292d..0000000 --- a/node_modules/cordova-android/node_modules/sax/examples/test.xml +++ /dev/null @@ -1,1254 +0,0 @@ - - -]> - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - - Some Text - - - - - - - are ok in here. ]]> - - Pre-Text & Inlined text Post-text. -  - - \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/sax/lib/sax.js b/node_modules/cordova-android/node_modules/sax/lib/sax.js deleted file mode 100644 index 17fb08e..0000000 --- a/node_modules/cordova-android/node_modules/sax/lib/sax.js +++ /dev/null @@ -1,1006 +0,0 @@ -// wrapper for non-node envs -;(function (sax) { - -sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } -sax.SAXParser = SAXParser -sax.SAXStream = SAXStream -sax.createStream = createStream - -// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. -// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), -// since that's the earliest that a buffer overrun could occur. This way, checks are -// as rare as required, but as often as necessary to ensure never crossing this bound. -// Furthermore, buffers are only tested at most once per write(), so passing a very -// large string into write() might have undesirable effects, but this is manageable by -// the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme -// edge case, result in creating at most one complete copy of the string passed in. -// Set to Infinity to have unlimited buffers. -sax.MAX_BUFFER_LENGTH = 64 * 1024 - -var buffers = [ - "comment", "sgmlDecl", "textNode", "tagName", "doctype", - "procInstName", "procInstBody", "entity", "attribName", - "attribValue", "cdata", "script" -] - -sax.EVENTS = // for discoverability. - [ "text" - , "processinginstruction" - , "sgmldeclaration" - , "doctype" - , "comment" - , "attribute" - , "opentag" - , "closetag" - , "opencdata" - , "cdata" - , "closecdata" - , "error" - , "end" - , "ready" - , "script" - , "opennamespace" - , "closenamespace" - ] - -function SAXParser (strict, opt) { - if (!(this instanceof SAXParser)) return new SAXParser(strict, opt) - - var parser = this - clearBuffers(parser) - parser.q = parser.c = "" - parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH - parser.opt = opt || {} - parser.tagCase = parser.opt.lowercasetags ? "toLowerCase" : "toUpperCase" - parser.tags = [] - parser.closed = parser.closedRoot = parser.sawRoot = false - parser.tag = parser.error = null - parser.strict = !!strict - parser.noscript = !!(strict || parser.opt.noscript) - parser.state = S.BEGIN - parser.ENTITIES = Object.create(sax.ENTITIES) - parser.attribList = [] - - // namespaces form a prototype chain. - // it always points at the current tag, - // which protos to its parent tag. - if (parser.opt.xmlns) parser.ns = Object.create(rootNS) - - // mostly just for error reporting - parser.position = parser.line = parser.column = 0 - emit(parser, "onready") -} - -if (!Object.create) Object.create = function (o) { - function f () { this.__proto__ = o } - f.prototype = o - return new f -} - -if (!Object.getPrototypeOf) Object.getPrototypeOf = function (o) { - return o.__proto__ -} - -if (!Object.keys) Object.keys = function (o) { - var a = [] - for (var i in o) if (o.hasOwnProperty(i)) a.push(i) - return a -} - -function checkBufferLength (parser) { - var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) - , maxActual = 0 - for (var i = 0, l = buffers.length; i < l; i ++) { - var len = parser[buffers[i]].length - if (len > maxAllowed) { - // Text/cdata nodes can get big, and since they're buffered, - // we can get here under normal conditions. - // Avoid issues by emitting the text node now, - // so at least it won't get any bigger. - switch (buffers[i]) { - case "textNode": - closeText(parser) - break - - case "cdata": - emitNode(parser, "oncdata", parser.cdata) - parser.cdata = "" - break - - case "script": - emitNode(parser, "onscript", parser.script) - parser.script = "" - break - - default: - error(parser, "Max buffer length exceeded: "+buffers[i]) - } - } - maxActual = Math.max(maxActual, len) - } - // schedule the next check for the earliest possible buffer overrun. - parser.bufferCheckPosition = (sax.MAX_BUFFER_LENGTH - maxActual) - + parser.position -} - -function clearBuffers (parser) { - for (var i = 0, l = buffers.length; i < l; i ++) { - parser[buffers[i]] = "" - } -} - -SAXParser.prototype = - { end: function () { end(this) } - , write: write - , resume: function () { this.error = null; return this } - , close: function () { return this.write(null) } - , end: function () { return this.write(null) } - } - -try { - var Stream = require("stream").Stream -} catch (ex) { - var Stream = function () {} -} - - -var streamWraps = sax.EVENTS.filter(function (ev) { - return ev !== "error" && ev !== "end" -}) - -function createStream (strict, opt) { - return new SAXStream(strict, opt) -} - -function SAXStream (strict, opt) { - if (!(this instanceof SAXStream)) return new SAXStream(strict, opt) - - Stream.apply(me) - - this._parser = new SAXParser(strict, opt) - this.writable = true - this.readable = true - - - var me = this - - this._parser.onend = function () { - me.emit("end") - } - - this._parser.onerror = function (er) { - me.emit("error", er) - - // if didn't throw, then means error was handled. - // go ahead and clear error, so we can write again. - me._parser.error = null - } - - streamWraps.forEach(function (ev) { - Object.defineProperty(me, "on" + ev, { - get: function () { return me._parser["on" + ev] }, - set: function (h) { - if (!h) { - me.removeAllListeners(ev) - return me._parser["on"+ev] = h - } - me.on(ev, h) - }, - enumerable: true, - configurable: false - }) - }) -} - -SAXStream.prototype = Object.create(Stream.prototype, - { constructor: { value: SAXStream } }) - -SAXStream.prototype.write = function (data) { - this._parser.write(data.toString()) - this.emit("data", data) - return true -} - -SAXStream.prototype.end = function (chunk) { - if (chunk && chunk.length) this._parser.write(chunk.toString()) - this._parser.end() - return true -} - -SAXStream.prototype.on = function (ev, handler) { - var me = this - if (!me._parser["on"+ev] && streamWraps.indexOf(ev) !== -1) { - me._parser["on"+ev] = function () { - var args = arguments.length === 1 ? [arguments[0]] - : Array.apply(null, arguments) - args.splice(0, 0, ev) - me.emit.apply(me, args) - } - } - - return Stream.prototype.on.call(me, ev, handler) -} - - - -// character classes and tokens -var whitespace = "\r\n\t " - // this really needs to be replaced with character classes. - // XML allows all manner of ridiculous numbers and digits. - , number = "0124356789" - , letter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - // (Letter | "_" | ":") - , nameStart = letter+"_:" - , nameBody = nameStart+number+"-." - , quote = "'\"" - , entity = number+letter+"#" - , attribEnd = whitespace + ">" - , CDATA = "[CDATA[" - , DOCTYPE = "DOCTYPE" - , XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace" - , XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/" - , rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } - -// turn all the string character sets into character class objects. -whitespace = charClass(whitespace) -number = charClass(number) -letter = charClass(letter) -nameStart = charClass(nameStart) -nameBody = charClass(nameBody) -quote = charClass(quote) -entity = charClass(entity) -attribEnd = charClass(attribEnd) - -function charClass (str) { - return str.split("").reduce(function (s, c) { - s[c] = true - return s - }, {}) -} - -function is (charclass, c) { - return charclass[c] -} - -function not (charclass, c) { - return !charclass[c] -} - -var S = 0 -sax.STATE = -{ BEGIN : S++ -, TEXT : S++ // general stuff -, TEXT_ENTITY : S++ // & and such. -, OPEN_WAKA : S++ // < -, SGML_DECL : S++ // -, SCRIPT : S++ // " - , expect : - [ [ "opentag", { name: "xml", attributes: {} } ] - , [ "opentag", { name: "script", attributes: {} } ] - , [ "text", "hello world" ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - -require(__dirname).test - ( { xml : "" - , expect : - [ [ "opentag", { name: "xml", attributes: {} } ] - , [ "opentag", { name: "script", attributes: {} } ] - , [ "opencdata", undefined ] - , [ "cdata", "hello world" ] - , [ "closecdata", undefined ] - , [ "closetag", "script" ] - , [ "closetag", "xml" ] - ] - , strict : false - , opt : { lowercasetags: true, noscript: true } - } - ) - diff --git a/node_modules/cordova-android/node_modules/sax/test/parser-position.js b/node_modules/cordova-android/node_modules/sax/test/parser-position.js deleted file mode 100644 index e4a68b1..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/parser-position.js +++ /dev/null @@ -1,28 +0,0 @@ -var sax = require("../lib/sax"), - assert = require("assert") - -function testPosition(chunks, expectedEvents) { - var parser = sax.parser(); - expectedEvents.forEach(function(expectation) { - parser['on' + expectation[0]] = function() { - for (var prop in expectation[1]) { - assert.equal(parser[prop], expectation[1][prop]); - } - } - }); - chunks.forEach(function(chunk) { - parser.write(chunk); - }); -}; - -testPosition(['
abcdefgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); - -testPosition(['
abcde','fgh
'], - [ ['opentag', { position: 5, startTagPosition: 1 }] - , ['text', { position: 19, startTagPosition: 14 }] - , ['closetag', { position: 19, startTagPosition: 14 }] - ]); diff --git a/node_modules/cordova-android/node_modules/sax/test/script.js b/node_modules/cordova-android/node_modules/sax/test/script.js deleted file mode 100644 index 464c051..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/script.js +++ /dev/null @@ -1,12 +0,0 @@ -require(__dirname).test({ - xml : "", - expect : [ - ["opentag", {"name": "HTML","attributes": {}}], - ["opentag", {"name": "HEAD","attributes": {}}], - ["opentag", {"name": "SCRIPT","attributes": {}}], - ["script", "if (1 < 0) { console.log('elo there'); }"], - ["closetag", "SCRIPT"], - ["closetag", "HEAD"], - ["closetag", "HTML"] - ] -}); diff --git a/node_modules/cordova-android/node_modules/sax/test/self-closing-child-strict.js b/node_modules/cordova-android/node_modules/sax/test/self-closing-child-strict.js deleted file mode 100644 index ce9c045..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/self-closing-child-strict.js +++ /dev/null @@ -1,40 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "root", - "attributes": {} - }], - ["opentag", { - "name": "child", - "attributes": {} - }], - ["opentag", { - "name": "haha", - "attributes": {} - }], - ["closetag", "haha"], - ["closetag", "child"], - ["opentag", { - "name": "monkey", - "attributes": {} - }], - ["text", "=(|)"], - ["closetag", "monkey"], - ["closetag", "root"], - ["end"], - ["ready"] - ], - strict : true, - opt : {} -}); - diff --git a/node_modules/cordova-android/node_modules/sax/test/self-closing-child.js b/node_modules/cordova-android/node_modules/sax/test/self-closing-child.js deleted file mode 100644 index bc6b52b..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/self-closing-child.js +++ /dev/null @@ -1,40 +0,0 @@ - -require(__dirname).test({ - xml : - ""+ - "" + - "" + - "" + - "" + - "=(|)" + - "" + - "", - expect : [ - ["opentag", { - "name": "ROOT", - "attributes": {} - }], - ["opentag", { - "name": "CHILD", - "attributes": {} - }], - ["opentag", { - "name": "HAHA", - "attributes": {} - }], - ["closetag", "HAHA"], - ["closetag", "CHILD"], - ["opentag", { - "name": "MONKEY", - "attributes": {} - }], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); - diff --git a/node_modules/cordova-android/node_modules/sax/test/self-closing-tag.js b/node_modules/cordova-android/node_modules/sax/test/self-closing-tag.js deleted file mode 100644 index b2c5736..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/self-closing-tag.js +++ /dev/null @@ -1,25 +0,0 @@ - -require(__dirname).test({ - xml : - " "+ - " "+ - " "+ - " "+ - "=(|) "+ - ""+ - " ", - expect : [ - ["opentag", {name:"ROOT", attributes:{}}], - ["opentag", {name:"HAHA", attributes:{}}], - ["closetag", "HAHA"], - ["opentag", {name:"HAHA", attributes:{}}], - ["closetag", "HAHA"], - // ["opentag", {name:"HAHA", attributes:{}}], - // ["closetag", "HAHA"], - ["opentag", {name:"MONKEY", attributes:{}}], - ["text", "=(|)"], - ["closetag", "MONKEY"], - ["closetag", "ROOT"] - ], - opt : { trim : true } -}); \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/sax/test/stray-ending.js b/node_modules/cordova-android/node_modules/sax/test/stray-ending.js deleted file mode 100644 index 6b0aa7f..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/stray-ending.js +++ /dev/null @@ -1,17 +0,0 @@ -// stray ending tags should just be ignored in non-strict mode. -// https://github.com/isaacs/sax-js/issues/32 -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "opentag", { name: "A", attributes: {} } ] - , [ "opentag", { name: "B", attributes: {} } ] - , [ "text", "" ] - , [ "closetag", "B" ] - , [ "closetag", "A" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/node_modules/cordova-android/node_modules/sax/test/trailing-non-whitespace.js b/node_modules/cordova-android/node_modules/sax/test/trailing-non-whitespace.js deleted file mode 100644 index 3e1fb2e..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/trailing-non-whitespace.js +++ /dev/null @@ -1,17 +0,0 @@ - -require(__dirname).test({ - xml : "Welcome, to monkey land", - expect : [ - ["opentag", { - "name": "SPAN", - "attributes": {} - }], - ["text", "Welcome,"], - ["closetag", "SPAN"], - ["text", " to monkey land"], - ["end"], - ["ready"] - ], - strict : false, - opt : {} -}); diff --git a/node_modules/cordova-android/node_modules/sax/test/unquoted.js b/node_modules/cordova-android/node_modules/sax/test/unquoted.js deleted file mode 100644 index 79f1d0b..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/unquoted.js +++ /dev/null @@ -1,17 +0,0 @@ -// unquoted attributes should be ok in non-strict mode -// https://github.com/isaacs/sax-js/issues/31 -require(__dirname).test - ( { xml : - "" - , expect : - [ [ "attribute", { name: "class", value: "test" } ] - , [ "attribute", { name: "hello", value: "world" } ] - , [ "opentag", { name: "SPAN", - attributes: { class: "test", hello: "world" } } ] - , [ "closetag", "SPAN" ] - ] - , strict : false - , opt : {} - } - ) - diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-issue-41.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-issue-41.js deleted file mode 100644 index 596d82b..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-issue-41.js +++ /dev/null @@ -1,67 +0,0 @@ -var t = require(__dirname) - - , xmls = // should be the same both ways. - [ "" - , "" ] - - , ex1 = - [ [ "opennamespace" - , { prefix: "a" - , uri: "http://ATTRIBUTE" - } - ] - , [ "attribute" - , { name: "xmlns:a" - , value: "http://ATTRIBUTE" - , prefix: "xmlns" - , local: "a" - , uri: "http://www.w3.org/2000/xmlns/" - } - ] - , [ "attribute" - , { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - ] - , [ "opentag" - , { name: "parent" - , uri: "" - , prefix: "" - , local: "parent" - , attributes: - { "a:attr": - { name: "a:attr" - , local: "attr" - , prefix: "a" - , uri: "http://ATTRIBUTE" - , value: "value" - } - , "xmlns:a": - { name: "xmlns:a" - , local: "a" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "http://ATTRIBUTE" - } - } - , ns: {"a": "http://ATTRIBUTE"} - } - ] - , ["closetag", "parent"] - , ["closenamespace", { prefix: "a", uri: "http://ATTRIBUTE" }] - ] - - // swap the order of elements 2 and 1 - , ex2 = [ex1[0], ex1[2], ex1[1]].concat(ex1.slice(3)) - , expected = [ex1, ex2] - -xmls.forEach(function (x, i) { - t.test({ xml: x - , expect: expected[i] - , strict: true - , opt: { xmlns: true } - }) -}) diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-rebinding.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-rebinding.js deleted file mode 100644 index f464876..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-rebinding.js +++ /dev/null @@ -1,59 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opennamespace", { prefix: "x", uri: "x1" } ] - , [ "opennamespace", { prefix: "y", uri: "y1" } ] - , [ "attribute", { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "attribute", { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } ] - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } - , "xmlns:y": { name: "xmlns:y", value: "y1", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "y" } - , "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' } } ] - - , [ "opennamespace", { prefix: "x", uri: "x2" } ] - , [ "attribute", { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } ] - , [ "opentag", { name: "rebind", uri: "", prefix: "", local: "rebind", - attributes: { "xmlns:x": { name: "xmlns:x", value: "x2", uri: "http://www.w3.org/2000/xmlns/", prefix: "xmlns", local: "x" } }, - ns: { x: 'x2' } } ] - - , [ "attribute", { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x2", uri: "x2", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x2' } } ] - - , [ "closetag", "check" ] - - , [ "closetag", "rebind" ] - , [ "closenamespace", { prefix: "x", uri: "x2" } ] - - , [ "attribute", { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } ] - , [ "attribute", { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } ] - , [ "opentag", { name: "check", uri: "", prefix: "", local: "check", - attributes: { "x:a": { name: "x:a", value: "x1", uri: "x1", prefix: "x", local: "a" } - , "y:a": { name: "y:a", value: "y1", uri: "y1", prefix: "y", local: "a" } }, - ns: { x: 'x1', y: 'y1' } } ] - , [ "closetag", "check" ] - - , [ "closetag", "root" ] - , [ "closenamespace", { prefix: "x", uri: "x1" } ] - , [ "closenamespace", { prefix: "y", uri: "y1" } ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-strict.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-strict.js deleted file mode 100644 index 4ad615b..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-strict.js +++ /dev/null @@ -1,71 +0,0 @@ - -require(__dirname).test - ( { xml : - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - ""+ - "" - - , expect : - [ [ "opentag", { name: "root", prefix: "", local: "root", uri: "", - attributes: {}, ns: {} } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", uri: "", prefix: "", local: "attr", uri: "" } }, - ns: {} } ] - , [ "closetag", "plain" ] - - , [ "opennamespace", { prefix: "", uri: "uri:default" } ] - - , [ "attribute", { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } ] - , [ "opentag", { name: "ns1", prefix: "", local: "ns1", uri: "uri:default", - attributes: { "xmlns": { name: "xmlns", value: "uri:default", prefix: "xmlns", local: "", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { "": "uri:default" } } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "uri:default", ns: { '': 'uri:default' }, - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "uri:default" } } } ] - , [ "closetag", "plain" ] - - , [ "closetag", "ns1" ] - - , [ "closenamespace", { prefix: "", uri: "uri:default" } ] - - , [ "opennamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "attribute", { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } ] - - , [ "opentag", { name: "ns2", prefix: "", local: "ns2", uri: "", - attributes: { "xmlns:a": { name: "xmlns:a", value: "uri:nsa", prefix: "xmlns", local: "a", uri: "http://www.w3.org/2000/xmlns/" } }, - ns: { a: "uri:nsa" } } ] - - , [ "attribute", { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } ] - , [ "opentag", { name: "plain", prefix: "", local: "plain", uri: "", - attributes: { "attr": { name: "attr", value: "normal", prefix: "", local: "attr", uri: "" } }, - ns: { a: 'uri:nsa' } } ] - , [ "closetag", "plain" ] - - , [ "attribute", { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } ] - , [ "opentag", { name: "a:ns", prefix: "a", local: "ns", uri: "uri:nsa", - attributes: { "a:attr": { name: "a:attr", value: "namespaced", prefix: "a", local: "attr", uri: "uri:nsa" } }, - ns: { a: 'uri:nsa' } } ] - , [ "closetag", "a:ns" ] - - , [ "closetag", "ns2" ] - - , [ "closenamespace", { prefix: "a", uri: "uri:nsa" } ] - - , [ "closetag", "root" ] - ] - , strict : true - , opt : { xmlns: true } - } - ) - diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-unbound.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-unbound.js deleted file mode 100644 index 2944b87..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-unbound.js +++ /dev/null @@ -1,15 +0,0 @@ - -require(__dirname).test( - { strict : true - , opt : { xmlns: true } - , expect : - [ ["error", "Unbound namespace prefix: \"unbound\"\nLine: 0\nColumn: 28\nChar: >"] - - , [ "attribute", { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } ] - , [ "opentag", { name: "root", uri: "", prefix: "", local: "root", - attributes: { "unbound:attr": { name: "unbound:attr", value: "value", uri: "unbound", prefix: "unbound", local: "attr" } }, - ns: {} } ] - , [ "closetag", "root" ] - ] - } -).write("") diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js deleted file mode 100644 index 16da771..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix-attribute.js +++ /dev/null @@ -1,35 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ [ "attribute" - , { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - ] - , [ "opentag" - , { name: "root" - , uri: "" - , prefix: "" - , local: "root" - , attributes: - { "xml:lang": - { name: "xml:lang" - , local: "lang" - , prefix: "xml" - , uri: "http://www.w3.org/XML/1998/namespace" - , value: "en" - } - } - , ns: {} - } - ] - , ["closetag", "root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix.js deleted file mode 100644 index 9a1ce1b..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-prefix.js +++ /dev/null @@ -1,20 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ - [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: {} - , ns: {} - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-redefine.js b/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-redefine.js deleted file mode 100644 index 1eba9c7..0000000 --- a/node_modules/cordova-android/node_modules/sax/test/xmlns-xml-default-redefine.js +++ /dev/null @@ -1,40 +0,0 @@ -require(__dirname).test( - { xml : "" - , expect : - [ ["error" - , "xml: prefix must be bound to http://www.w3.org/XML/1998/namespace\n" - + "Actual: ERROR\n" - + "Line: 0\nColumn: 27\nChar: '" - ] - , [ "attribute" - , { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - ] - , [ "opentag" - , { name: "xml:root" - , uri: "http://www.w3.org/XML/1998/namespace" - , prefix: "xml" - , local: "root" - , attributes: - { "xmlns:xml": - { name: "xmlns:xml" - , local: "xml" - , prefix: "xmlns" - , uri: "http://www.w3.org/2000/xmlns/" - , value: "ERROR" - } - } - , ns: {} - } - ] - , ["closetag", "xml:root"] - ] - , strict : true - , opt : { xmlns: true } - } -) - diff --git a/node_modules/cordova-android/node_modules/semver/LICENSE b/node_modules/cordova-android/node_modules/semver/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/cordova-android/node_modules/semver/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/semver/README.md b/node_modules/cordova-android/node_modules/semver/README.md deleted file mode 100644 index 951c539..0000000 --- a/node_modules/cordova-android/node_modules/semver/README.md +++ /dev/null @@ -1,388 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Install - -```bash -npm install --save semver -```` - -## Usage - -As a node module: - -```js -const semver = require('semver') - -semver.valid('1.2.3') // '1.2.3' -semver.valid('a.b.c') // null -semver.clean(' =v1.2.3 ') // '1.2.3' -semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true -semver.gt('1.2.3', '9.8.7') // false -semver.lt('1.2.3', '9.8.7') // true -semver.valid(semver.coerce('v2')) // '2.0.0' -semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7' -``` - -As a command-line utility: - -``` -$ semver -h - -SemVer 5.3.0 - -A JavaScript implementation of the http://semver.org/ specification -Copyright Isaac Z. Schlueter - -Usage: semver [options] [ [...]] -Prints valid versions sorted by SemVer precedence - -Options: --r --range - Print versions that match the specified range. - --i --increment [] - Increment a version by the specified level. Level can - be one of: major, minor, patch, premajor, preminor, - prepatch, or prerelease. Default level is 'patch'. - Only one version may be specified. - ---preid - Identifier to be used to prefix premajor, preminor, - prepatch or prerelease version increments. - --l --loose - Interpret versions and ranges loosely - --c --coerce - Coerce a string into SemVer if possible - (does not imply --loose) - -Program exits successfully if any valid version satisfies -all supplied ranges, and prints all satisfying versions. - -If no satisfying versions are found, then exits failure. - -Versions are printed in ascending order, so supplying -multiple versions to the utility will just sort them. -``` - -## Versions - -A "version" is described by the `v2.0.0` specification found at -. - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Ranges - -A `version range` is a set of `comparators` which specify versions -that satisfy the range. - -A `comparator` is composed of an `operator` and a `version`. The set -of primitive `operators` is: - -* `<` Less than -* `<=` Less than or equal to -* `>` Greater than -* `>=` Greater than or equal to -* `=` Equal. If no operator is specified, then equality is assumed, - so this operator is optional, but MAY be included. - -For example, the comparator `>=1.2.7` would match the versions -`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. - -Comparators can be joined by whitespace to form a `comparator set`, -which is satisfied by the **intersection** of all of the comparators -it includes. - -A range is composed of one or more comparator sets, joined by `||`. A -version matches a range if and only if every comparator in at least -one of the `||`-separated comparator sets is satisfied by the version. - -For example, the range `>=1.2.7 <1.3.0` would match the versions -`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`, -or `1.1.0`. - -The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`, -`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`. - -### Prerelease Tags - -If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then -it will only be allowed to satisfy comparator sets if at least one -comparator with the same `[major, minor, patch]` tuple also has a -prerelease tag. - -For example, the range `>1.2.3-alpha.3` would be allowed to match the -version `1.2.3-alpha.7`, but it would *not* be satisfied by -`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater -than" `1.2.3-alpha.3` according to the SemVer sort rules. The version -range only accepts prerelease tags on the `1.2.3` version. The -version `3.4.5` *would* satisfy the range, because it does not have a -prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`. - -The purpose for this behavior is twofold. First, prerelease versions -frequently are updated very quickly, and contain many breaking changes -that are (by the author's design) not yet fit for public consumption. -Therefore, by default, they are excluded from range matching -semantics. - -Second, a user who has opted into using a prerelease version has -clearly indicated the intent to use *that specific* set of -alpha/beta/rc versions. By including a prerelease tag in the range, -the user is indicating that they are aware of the risk. However, it -is still not appropriate to assume that they have opted into taking a -similar risk on the *next* set of prerelease versions. - -#### Prerelease Identifiers - -The method `.inc` takes an additional `identifier` string argument that -will append the value of the string as a prerelease identifier: - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta') -// '1.2.4-beta.0' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -1.2.4-beta.0 -``` - -Which then can be used to increment further: - -```bash -$ semver 1.2.4-beta.0 -i prerelease -1.2.4-beta.1 -``` - -### Advanced Range Syntax - -Advanced range syntax desugars to primitive comparators in -deterministic ways. - -Advanced ranges may be combined in the same way as primitive -comparators using white space or `||`. - -#### Hyphen Ranges `X.Y.Z - A.B.C` - -Specifies an inclusive set. - -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` - -If a partial version is provided as the first version in the inclusive -range, then the missing pieces are replaced with zeroes. - -* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4` - -If a partial version is provided as the second version in the -inclusive range, then all versions that start with the supplied parts -of the tuple are accepted, but nothing that would be greater than the -provided tuple parts. - -* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0` -* `1.2.3 - 2` := `>=1.2.3 <3.0.0` - -#### X-Ranges `1.2.x` `1.X` `1.2.*` `*` - -Any of `X`, `x`, or `*` may be used to "stand in" for one of the -numeric values in the `[major, minor, patch]` tuple. - -* `*` := `>=0.0.0` (Any version satisfies) -* `1.x` := `>=1.0.0 <2.0.0` (Matching major version) -* `1.2.x` := `>=1.2.0 <1.3.0` (Matching major and minor versions) - -A partial version range is treated as an X-Range, so the special -character is in fact optional. - -* `""` (empty string) := `*` := `>=0.0.0` -* `1` := `1.x.x` := `>=1.0.0 <2.0.0` -* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0` - -#### Tilde Ranges `~1.2.3` `~1.2` `~1` - -Allows patch-level changes if a minor version is specified on the -comparator. Allows minor-level changes if not. - -* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0` (Same as `1.2.x`) -* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0` (Same as `1.x`) -* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0` -* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0` (Same as `0.2.x`) -* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0` (Same as `0.x`) -* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. - -#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4` - -Allows changes that do not modify the left-most non-zero digit in the -`[major, minor, patch]` tuple. In other words, this allows patch and -minor updates for versions `1.0.0` and above, patch updates for -versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`. - -Many authors treat a `0.x` version as if the `x` were the major -"breaking-change" indicator. - -Caret ranges are ideal when an author may make breaking changes -between `0.2.4` and `0.3.0` releases, which is a common practice. -However, it presumes that there will *not* be breaking changes between -`0.2.4` and `0.2.5`. It allows for changes that are presumed to be -additive (but non-breaking), according to commonly observed practices. - -* `^1.2.3` := `>=1.2.3 <2.0.0` -* `^0.2.3` := `>=0.2.3 <0.3.0` -* `^0.0.3` := `>=0.0.3 <0.0.4` -* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0` Note that prereleases in - the `1.2.3` version will be allowed, if they are greater than or - equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but - `1.2.4-beta.2` would not, because it is a prerelease of a - different `[major, minor, patch]` tuple. -* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4` Note that prereleases in the - `0.0.3` version *only* will be allowed, if they are greater than or - equal to `beta`. So, `0.0.3-pr.2` would be allowed. - -When parsing caret ranges, a missing `patch` value desugars to the -number `0`, but will allow flexibility within that value, even if the -major and minor versions are both `0`. - -* `^1.2.x` := `>=1.2.0 <2.0.0` -* `^0.0.x` := `>=0.0.0 <0.1.0` -* `^0.0` := `>=0.0.0 <0.1.0` - -A missing `minor` and `patch` values will desugar to zero, but also -allow flexibility within those values, even if the major version is -zero. - -* `^1.x` := `>=1.0.0 <2.0.0` -* `^0.x` := `>=0.0.0 <1.0.0` - -### Range Grammar - -Putting all this together, here is a Backus-Naur grammar for ranges, -for the benefit of parser authors: - -```bnf -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' | ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ -``` - -## Functions - -All methods and classes take a final `loose` boolean argument that, if -true, will be more forgiving about not-quite-valid semver strings. -The resulting output will always be 100% strict, of course. - -Strict-mode Comparators and Ranges will be strict about the SemVer -strings that they parse. - -* `valid(v)`: Return the parsed version, or null if it's not valid. -* `inc(v, release)`: Return the version incremented by the release - type (`major`, `premajor`, `minor`, `preminor`, `patch`, - `prepatch`, or `prerelease`), or null if it's not valid - * `premajor` in one call will bump the version up to the next major - version and down to a prerelease of that major version. - `preminor`, and `prepatch` work the same way. - * If called from a non-prerelease version, the `prerelease` will work the - same as `prepatch`. It increments the patch version, then makes a - prerelease. If the input version is already a prerelease it simply - increments it. -* `prerelease(v)`: Returns an array of prerelease components, or null - if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]` -* `major(v)`: Return the major version number. -* `minor(v)`: Return the minor version number. -* `patch(v)`: Return the patch version number. -* `intersects(r1, r2, loose)`: Return true if the two supplied ranges - or comparators intersect. - -### Comparison - -* `gt(v1, v2)`: `v1 > v2` -* `gte(v1, v2)`: `v1 >= v2` -* `lt(v1, v2)`: `v1 < v2` -* `lte(v1, v2)`: `v1 <= v2` -* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`. -* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if - `v2` is greater. Sorts in ascending order if passed to `Array.sort()`. -* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions - in descending order when passed to `Array.sort()`. -* `diff(v1, v2)`: Returns difference between two versions by the release type - (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`), - or null if the versions are the same. - -### Comparators - -* `intersects(comparator)`: Return true if the comparators intersect - -### Ranges - -* `validRange(range)`: Return the valid range or null if it's not valid -* `satisfies(version, range)`: Return true if the version satisfies the - range. -* `maxSatisfying(versions, range)`: Return the highest version in the list - that satisfies the range, or `null` if none of them do. -* `minSatisfying(versions, range)`: Return the lowest version in the list - that satisfies the range, or `null` if none of them do. -* `gtr(version, range)`: Return `true` if version is greater than all the - versions possible in the range. -* `ltr(version, range)`: Return `true` if version is less than all the - versions possible in the range. -* `outside(version, range, hilo)`: Return true if the version is outside - the bounds of the range in either the high or low direction. The - `hilo` argument must be either the string `'>'` or `'<'`. (This is - the function called by `gtr` and `ltr`.) -* `intersects(range)`: Return true if any of the ranges comparators intersect - -Note that, since ranges may be non-contiguous, a version might not be -greater than a range, less than a range, *or* satisfy a range! For -example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9` -until `2.0.0`, so the version `1.2.10` would not be greater than the -range (because `2.0.1` satisfies, which is higher), nor less than the -range (since `1.2.8` satisfies, which is lower), and it also does not -satisfy the range. - -If you want to know if a version satisfies or does not satisfy a -range, use the `satisfies(version, range)` function. - -### Coercion - -* `coerce(version)`: Coerces a string to semver if possible - -This aims to provide a very forgiving translation of a non-semver -string to semver. It looks for the first digit in a string, and -consumes all remaining characters which satisfy at least a partial semver -(e.g., `1`, `1.2`, `1.2.3`) up to the max permitted length (256 characters). -Longer versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). -All surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes `3.4.0`). -Only text which lacks digits will fail coercion (`version one` is not valid). -The maximum length for any semver component considered for coercion is 16 characters; -longer components will be ignored (`10000000000000000.4.7.4` becomes `4.7.4`). -The maximum value for any semver component is `Integer.MAX_SAFE_INTEGER || (2**53 - 1)`; -higher value components are invalid (`9999999999999999.4.7.4` is likely invalid). diff --git a/node_modules/cordova-android/node_modules/semver/bin/semver b/node_modules/cordova-android/node_modules/semver/bin/semver deleted file mode 100755 index dddbcdf..0000000 --- a/node_modules/cordova-android/node_modules/semver/bin/semver +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , inc = null - , version = require("../package.json").version - , loose = false - , coerce = false - , identifier = undefined - , semver = require("../semver") - , reverse = false - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a = argv.shift() - var i = a.indexOf('=') - if (i !== -1) { - a = a.slice(0, i) - argv.unshift(a.slice(i + 1)) - } - switch (a) { - case "-rv": case "-rev": case "--rev": case "--reverse": - reverse = true - break - case "-l": case "--loose": - loose = true - break - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-i": case "--inc": case "--increment": - switch (argv[0]) { - case "major": case "minor": case "patch": case "prerelease": - case "premajor": case "preminor": case "prepatch": - inc = argv.shift() - break - default: - inc = "patch" - break - } - break - case "--preid": - identifier = argv.shift() - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-c": case "--coerce": - coerce = true - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.map(function (v) { - return coerce ? (semver.coerce(v) || {version: v}).version : v - }).filter(function (v) { - return semver.valid(v) - }) - if (!versions.length) return fail() - if (inc && (versions.length !== 1 || range.length)) - return failInc() - - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i], loose) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function failInc () { - console.error("--inc can only be used on a single version with no range") - fail() -} - -function fail () { process.exit(1) } - -function success () { - var compare = reverse ? "rcompare" : "compare" - versions.sort(function (a, b) { - return semver[compare](a, b, loose) - }).map(function (v) { - return semver.clean(v, loose) - }).map(function (v) { - return inc ? semver.inc(v, inc, loose, identifier) : v - }).forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["SemVer " + version - ,"" - ,"A JavaScript implementation of the http://semver.org/ specification" - ,"Copyright Isaac Z. Schlueter" - ,"" - ,"Usage: semver [options] [ [...]]" - ,"Prints valid versions sorted by SemVer precedence" - ,"" - ,"Options:" - ,"-r --range " - ," Print versions that match the specified range." - ,"" - ,"-i --increment []" - ," Increment a version by the specified level. Level can" - ," be one of: major, minor, patch, premajor, preminor," - ," prepatch, or prerelease. Default level is 'patch'." - ," Only one version may be specified." - ,"" - ,"--preid " - ," Identifier to be used to prefix premajor, preminor," - ," prepatch or prerelease version increments." - ,"" - ,"-l --loose" - ," Interpret versions and ranges loosely" - ,"" - ,"-c --coerce" - ," Coerce a string into SemVer if possible" - ," (does not imply --loose)" - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no satisfying versions are found, then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} diff --git a/node_modules/cordova-android/node_modules/semver/package.json b/node_modules/cordova-android/node_modules/semver/package.json deleted file mode 100644 index 070e2f6..0000000 --- a/node_modules/cordova-android/node_modules/semver/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "_from": "semver@^5.4.1", - "_id": "semver@5.5.0", - "_inBundle": true, - "_integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", - "_location": "/cordova-android/semver", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "semver@^5.4.1", - "name": "semver", - "escapedName": "semver", - "rawSpec": "^5.4.1", - "saveSpec": null, - "fetchSpec": "^5.4.1" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/android-versions" - ], - "_resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "_shasum": "dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab", - "_spec": "semver@^5.4.1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/android-versions", - "bin": { - "semver": "./bin/semver" - }, - "bugs": { - "url": "https://github.com/npm/node-semver/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "The semantic version parser used by npm.", - "devDependencies": { - "tap": "^10.7.0" - }, - "files": [ - "bin", - "range.bnf", - "semver.js" - ], - "homepage": "https://github.com/npm/node-semver#readme", - "license": "ISC", - "main": "semver.js", - "name": "semver", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/node-semver.git" - }, - "scripts": { - "test": "tap test/*.js --cov -J" - }, - "version": "5.5.0" -} diff --git a/node_modules/cordova-android/node_modules/semver/range.bnf b/node_modules/cordova-android/node_modules/semver/range.bnf deleted file mode 100644 index d4c6ae0..0000000 --- a/node_modules/cordova-android/node_modules/semver/range.bnf +++ /dev/null @@ -1,16 +0,0 @@ -range-set ::= range ( logical-or range ) * -logical-or ::= ( ' ' ) * '||' ( ' ' ) * -range ::= hyphen | simple ( ' ' simple ) * | '' -hyphen ::= partial ' - ' partial -simple ::= primitive | partial | tilde | caret -primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial -partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )? -xr ::= 'x' | 'X' | '*' | nr -nr ::= '0' | [1-9] ( [0-9] ) * -tilde ::= '~' partial -caret ::= '^' partial -qualifier ::= ( '-' pre )? ( '+' build )? -pre ::= parts -build ::= parts -parts ::= part ( '.' part ) * -part ::= nr | [-0-9A-Za-z]+ diff --git a/node_modules/cordova-android/node_modules/semver/semver.js b/node_modules/cordova-android/node_modules/semver/semver.js deleted file mode 100644 index 9cf9f6e..0000000 --- a/node_modules/cordova-android/node_modules/semver/semver.js +++ /dev/null @@ -1,1324 +0,0 @@ -exports = module.exports = SemVer; - -// The debug function is excluded entirely from the minified version. -/* nomin */ var debug; -/* nomin */ if (typeof process === 'object' && - /* nomin */ process.env && - /* nomin */ process.env.NODE_DEBUG && - /* nomin */ /\bsemver\b/i.test(process.env.NODE_DEBUG)) - /* nomin */ debug = function() { - /* nomin */ var args = Array.prototype.slice.call(arguments, 0); - /* nomin */ args.unshift('SEMVER'); - /* nomin */ console.log.apply(console, args); - /* nomin */ }; -/* nomin */ else - /* nomin */ debug = function() {}; - -// Note: this is the semver.org version of the spec that it implements -// Not necessarily the package version of this code. -exports.SEMVER_SPEC_VERSION = '2.0.0'; - -var MAX_LENGTH = 256; -var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || 9007199254740991; - -// Max safe segment length for coercion. -var MAX_SAFE_COMPONENT_LENGTH = 16; - -// The actual regexps go on exports.re -var re = exports.re = []; -var src = exports.src = []; -var R = 0; - -// The following Regular Expressions can be used for tokenizing, -// validating, and parsing SemVer version strings. - -// ## Numeric Identifier -// A single `0`, or a non-zero digit followed by zero or more digits. - -var NUMERICIDENTIFIER = R++; -src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'; -var NUMERICIDENTIFIERLOOSE = R++; -src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'; - - -// ## Non-numeric Identifier -// Zero or more digits, followed by a letter or hyphen, and then zero or -// more letters, digits, or hyphens. - -var NONNUMERICIDENTIFIER = R++; -src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'; - - -// ## Main Version -// Three dot-separated numeric identifiers. - -var MAINVERSION = R++; -src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')\\.' + - '(' + src[NUMERICIDENTIFIER] + ')'; - -var MAINVERSIONLOOSE = R++; -src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' + - '(' + src[NUMERICIDENTIFIERLOOSE] + ')'; - -// ## Pre-release Version Identifier -// A numeric identifier, or a non-numeric identifier. - -var PRERELEASEIDENTIFIER = R++; -src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - -var PRERELEASEIDENTIFIERLOOSE = R++; -src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] + - '|' + src[NONNUMERICIDENTIFIER] + ')'; - - -// ## Pre-release Version -// Hyphen, followed by one or more dot-separated pre-release version -// identifiers. - -var PRERELEASE = R++; -src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] + - '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'; - -var PRERELEASELOOSE = R++; -src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] + - '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'; - -// ## Build Metadata Identifier -// Any combination of digits, letters, or hyphens. - -var BUILDIDENTIFIER = R++; -src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'; - -// ## Build Metadata -// Plus sign, followed by one or more period-separated build metadata -// identifiers. - -var BUILD = R++; -src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] + - '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'; - - -// ## Full Version String -// A main version, followed optionally by a pre-release version and -// build metadata. - -// Note that the only major, minor, patch, and pre-release sections of -// the version string are capturing groups. The build metadata is not a -// capturing group, because it should not ever be used in version -// comparison. - -var FULL = R++; -var FULLPLAIN = 'v?' + src[MAINVERSION] + - src[PRERELEASE] + '?' + - src[BUILD] + '?'; - -src[FULL] = '^' + FULLPLAIN + '$'; - -// like full, but allows v1.2.3 and =1.2.3, which people do sometimes. -// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty -// common in the npm registry. -var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] + - src[PRERELEASELOOSE] + '?' + - src[BUILD] + '?'; - -var LOOSE = R++; -src[LOOSE] = '^' + LOOSEPLAIN + '$'; - -var GTLT = R++; -src[GTLT] = '((?:<|>)?=?)'; - -// Something like "2.*" or "1.2.x". -// Note that "x.x" is a valid xRange identifer, meaning "any version" -// Only the first item is strictly required. -var XRANGEIDENTIFIERLOOSE = R++; -src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'; -var XRANGEIDENTIFIER = R++; -src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'; - -var XRANGEPLAIN = R++; -src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' + - '(?:' + src[PRERELEASE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGEPLAINLOOSE = R++; -src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' + - '(?:' + src[PRERELEASELOOSE] + ')?' + - src[BUILD] + '?' + - ')?)?'; - -var XRANGE = R++; -src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'; -var XRANGELOOSE = R++; -src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'; - -// Coercion. -// Extract anything that could conceivably be a part of a valid semver -var COERCE = R++; -src[COERCE] = '(?:^|[^\\d])' + - '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' + - '(?:$|[^\\d])'; - -// Tilde ranges. -// Meaning is "reasonably at or greater than" -var LONETILDE = R++; -src[LONETILDE] = '(?:~>?)'; - -var TILDETRIM = R++; -src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'; -re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g'); -var tildeTrimReplace = '$1~'; - -var TILDE = R++; -src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'; -var TILDELOOSE = R++; -src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'; - -// Caret ranges. -// Meaning is "at least and backwards compatible with" -var LONECARET = R++; -src[LONECARET] = '(?:\\^)'; - -var CARETTRIM = R++; -src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'; -re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g'); -var caretTrimReplace = '$1^'; - -var CARET = R++; -src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'; -var CARETLOOSE = R++; -src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'; - -// A simple gt/lt/eq thing, or just "" to indicate "any version" -var COMPARATORLOOSE = R++; -src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'; -var COMPARATOR = R++; -src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'; - - -// An expression to strip any whitespace between the gtlt and the thing -// it modifies, so that `> 1.2.3` ==> `>1.2.3` -var COMPARATORTRIM = R++; -src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] + - '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'; - -// this one has to use the /g flag -re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g'); -var comparatorTrimReplace = '$1$2$3'; - - -// Something like `1.2.3 - 1.2.4` -// Note that these all use the loose form, because they'll be -// checked against either the strict or loose comparator form -// later. -var HYPHENRANGE = R++; -src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAIN] + ')' + - '\\s*$'; - -var HYPHENRANGELOOSE = R++; -src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s+-\\s+' + - '(' + src[XRANGEPLAINLOOSE] + ')' + - '\\s*$'; - -// Star ranges basically just allow anything at all. -var STAR = R++; -src[STAR] = '(<|>)?=?\\s*\\*'; - -// Compile to actual regexp objects. -// All are flag-free, unless they were created above with a flag. -for (var i = 0; i < R; i++) { - debug(i, src[i]); - if (!re[i]) - re[i] = new RegExp(src[i]); -} - -exports.parse = parse; -function parse(version, loose) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - if (version.length > MAX_LENGTH) - return null; - - var r = loose ? re[LOOSE] : re[FULL]; - if (!r.test(version)) - return null; - - try { - return new SemVer(version, loose); - } catch (er) { - return null; - } -} - -exports.valid = valid; -function valid(version, loose) { - var v = parse(version, loose); - return v ? v.version : null; -} - - -exports.clean = clean; -function clean(version, loose) { - var s = parse(version.trim().replace(/^[=v]+/, ''), loose); - return s ? s.version : null; -} - -exports.SemVer = SemVer; - -function SemVer(version, loose) { - if (version instanceof SemVer) { - if (version.loose === loose) - return version; - else - version = version.version; - } else if (typeof version !== 'string') { - throw new TypeError('Invalid Version: ' + version); - } - - if (version.length > MAX_LENGTH) - throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters') - - if (!(this instanceof SemVer)) - return new SemVer(version, loose); - - debug('SemVer', version, loose); - this.loose = loose; - var m = version.trim().match(loose ? re[LOOSE] : re[FULL]); - - if (!m) - throw new TypeError('Invalid Version: ' + version); - - this.raw = version; - - // these are actually numbers - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - - if (this.major > MAX_SAFE_INTEGER || this.major < 0) - throw new TypeError('Invalid major version') - - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) - throw new TypeError('Invalid minor version') - - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) - throw new TypeError('Invalid patch version') - - // numberify any prerelease numeric ids - if (!m[4]) - this.prerelease = []; - else - this.prerelease = m[4].split('.').map(function(id) { - if (/^[0-9]+$/.test(id)) { - var num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) - return num; - } - return id; - }); - - this.build = m[5] ? m[5].split('.') : []; - this.format(); -} - -SemVer.prototype.format = function() { - this.version = this.major + '.' + this.minor + '.' + this.patch; - if (this.prerelease.length) - this.version += '-' + this.prerelease.join('.'); - return this.version; -}; - -SemVer.prototype.toString = function() { - return this.version; -}; - -SemVer.prototype.compare = function(other) { - debug('SemVer.compare', this.version, this.loose, other); - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return this.compareMain(other) || this.comparePre(other); -}; - -SemVer.prototype.compareMain = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - return compareIdentifiers(this.major, other.major) || - compareIdentifiers(this.minor, other.minor) || - compareIdentifiers(this.patch, other.patch); -}; - -SemVer.prototype.comparePre = function(other) { - if (!(other instanceof SemVer)) - other = new SemVer(other, this.loose); - - // NOT having a prerelease is > having one - if (this.prerelease.length && !other.prerelease.length) - return -1; - else if (!this.prerelease.length && other.prerelease.length) - return 1; - else if (!this.prerelease.length && !other.prerelease.length) - return 0; - - var i = 0; - do { - var a = this.prerelease[i]; - var b = other.prerelease[i]; - debug('prerelease compare', i, a, b); - if (a === undefined && b === undefined) - return 0; - else if (b === undefined) - return 1; - else if (a === undefined) - return -1; - else if (a === b) - continue; - else - return compareIdentifiers(a, b); - } while (++i); -}; - -// preminor will bump the version up to the next minor release, and immediately -// down to pre-release. premajor and prepatch work the same way. -SemVer.prototype.inc = function(release, identifier) { - switch (release) { - case 'premajor': - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc('pre', identifier); - break; - case 'preminor': - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc('pre', identifier); - break; - case 'prepatch': - // If this is already a prerelease, it will bump to the next version - // drop any prereleases that might already exist, since they are not - // relevant at this point. - this.prerelease.length = 0; - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case 'prerelease': - if (this.prerelease.length === 0) - this.inc('patch', identifier); - this.inc('pre', identifier); - break; - - case 'major': - // If this is a pre-major version, bump up to the same major version. - // Otherwise increment major. - // 1.0.0-5 bumps to 1.0.0 - // 1.1.0 bumps to 2.0.0 - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) - this.major++; - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case 'minor': - // If this is a pre-minor version, bump up to the same minor version. - // Otherwise increment minor. - // 1.2.0-5 bumps to 1.2.0 - // 1.2.1 bumps to 1.3.0 - if (this.patch !== 0 || this.prerelease.length === 0) - this.minor++; - this.patch = 0; - this.prerelease = []; - break; - case 'patch': - // If this is not a pre-release version, it will increment the patch. - // If it is a pre-release it will bump up to the same patch version. - // 1.2.0-5 patches to 1.2.0 - // 1.2.0 patches to 1.2.1 - if (this.prerelease.length === 0) - this.patch++; - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction. - case 'pre': - if (this.prerelease.length === 0) - this.prerelease = [0]; - else { - var i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === 'number') { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) // didn't increment anything - this.prerelease.push(0); - } - if (identifier) { - // 1.2.0-beta.1 bumps to 1.2.0-beta.2, - // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - if (this.prerelease[0] === identifier) { - if (isNaN(this.prerelease[1])) - this.prerelease = [identifier, 0]; - } else - this.prerelease = [identifier, 0]; - } - break; - - default: - throw new Error('invalid increment argument: ' + release); - } - this.format(); - this.raw = this.version; - return this; -}; - -exports.inc = inc; -function inc(version, release, loose, identifier) { - if (typeof(loose) === 'string') { - identifier = loose; - loose = undefined; - } - - try { - return new SemVer(version, loose).inc(release, identifier).version; - } catch (er) { - return null; - } -} - -exports.diff = diff; -function diff(version1, version2) { - if (eq(version1, version2)) { - return null; - } else { - var v1 = parse(version1); - var v2 = parse(version2); - if (v1.prerelease.length || v2.prerelease.length) { - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return 'pre'+key; - } - } - } - return 'prerelease'; - } - for (var key in v1) { - if (key === 'major' || key === 'minor' || key === 'patch') { - if (v1[key] !== v2[key]) { - return key; - } - } - } - } -} - -exports.compareIdentifiers = compareIdentifiers; - -var numeric = /^[0-9]+$/; -function compareIdentifiers(a, b) { - var anum = numeric.test(a); - var bnum = numeric.test(b); - - if (anum && bnum) { - a = +a; - b = +b; - } - - return (anum && !bnum) ? -1 : - (bnum && !anum) ? 1 : - a < b ? -1 : - a > b ? 1 : - 0; -} - -exports.rcompareIdentifiers = rcompareIdentifiers; -function rcompareIdentifiers(a, b) { - return compareIdentifiers(b, a); -} - -exports.major = major; -function major(a, loose) { - return new SemVer(a, loose).major; -} - -exports.minor = minor; -function minor(a, loose) { - return new SemVer(a, loose).minor; -} - -exports.patch = patch; -function patch(a, loose) { - return new SemVer(a, loose).patch; -} - -exports.compare = compare; -function compare(a, b, loose) { - return new SemVer(a, loose).compare(new SemVer(b, loose)); -} - -exports.compareLoose = compareLoose; -function compareLoose(a, b) { - return compare(a, b, true); -} - -exports.rcompare = rcompare; -function rcompare(a, b, loose) { - return compare(b, a, loose); -} - -exports.sort = sort; -function sort(list, loose) { - return list.sort(function(a, b) { - return exports.compare(a, b, loose); - }); -} - -exports.rsort = rsort; -function rsort(list, loose) { - return list.sort(function(a, b) { - return exports.rcompare(a, b, loose); - }); -} - -exports.gt = gt; -function gt(a, b, loose) { - return compare(a, b, loose) > 0; -} - -exports.lt = lt; -function lt(a, b, loose) { - return compare(a, b, loose) < 0; -} - -exports.eq = eq; -function eq(a, b, loose) { - return compare(a, b, loose) === 0; -} - -exports.neq = neq; -function neq(a, b, loose) { - return compare(a, b, loose) !== 0; -} - -exports.gte = gte; -function gte(a, b, loose) { - return compare(a, b, loose) >= 0; -} - -exports.lte = lte; -function lte(a, b, loose) { - return compare(a, b, loose) <= 0; -} - -exports.cmp = cmp; -function cmp(a, op, b, loose) { - var ret; - switch (op) { - case '===': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a === b; - break; - case '!==': - if (typeof a === 'object') a = a.version; - if (typeof b === 'object') b = b.version; - ret = a !== b; - break; - case '': case '=': case '==': ret = eq(a, b, loose); break; - case '!=': ret = neq(a, b, loose); break; - case '>': ret = gt(a, b, loose); break; - case '>=': ret = gte(a, b, loose); break; - case '<': ret = lt(a, b, loose); break; - case '<=': ret = lte(a, b, loose); break; - default: throw new TypeError('Invalid operator: ' + op); - } - return ret; -} - -exports.Comparator = Comparator; -function Comparator(comp, loose) { - if (comp instanceof Comparator) { - if (comp.loose === loose) - return comp; - else - comp = comp.value; - } - - if (!(this instanceof Comparator)) - return new Comparator(comp, loose); - - debug('comparator', comp, loose); - this.loose = loose; - this.parse(comp); - - if (this.semver === ANY) - this.value = ''; - else - this.value = this.operator + this.semver.version; - - debug('comp', this); -} - -var ANY = {}; -Comparator.prototype.parse = function(comp) { - var r = this.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var m = comp.match(r); - - if (!m) - throw new TypeError('Invalid comparator: ' + comp); - - this.operator = m[1]; - if (this.operator === '=') - this.operator = ''; - - // if it literally is just '>' or '' then allow anything. - if (!m[2]) - this.semver = ANY; - else - this.semver = new SemVer(m[2], this.loose); -}; - -Comparator.prototype.toString = function() { - return this.value; -}; - -Comparator.prototype.test = function(version) { - debug('Comparator.test', version, this.loose); - - if (this.semver === ANY) - return true; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - return cmp(version, this.operator, this.semver, this.loose); -}; - -Comparator.prototype.intersects = function(comp, loose) { - if (!(comp instanceof Comparator)) { - throw new TypeError('a Comparator is required'); - } - - var rangeTmp; - - if (this.operator === '') { - rangeTmp = new Range(comp.value, loose); - return satisfies(this.value, rangeTmp, loose); - } else if (comp.operator === '') { - rangeTmp = new Range(this.value, loose); - return satisfies(comp.semver, rangeTmp, loose); - } - - var sameDirectionIncreasing = - (this.operator === '>=' || this.operator === '>') && - (comp.operator === '>=' || comp.operator === '>'); - var sameDirectionDecreasing = - (this.operator === '<=' || this.operator === '<') && - (comp.operator === '<=' || comp.operator === '<'); - var sameSemVer = this.semver.version === comp.semver.version; - var differentDirectionsInclusive = - (this.operator === '>=' || this.operator === '<=') && - (comp.operator === '>=' || comp.operator === '<='); - var oppositeDirectionsLessThan = - cmp(this.semver, '<', comp.semver, loose) && - ((this.operator === '>=' || this.operator === '>') && - (comp.operator === '<=' || comp.operator === '<')); - var oppositeDirectionsGreaterThan = - cmp(this.semver, '>', comp.semver, loose) && - ((this.operator === '<=' || this.operator === '<') && - (comp.operator === '>=' || comp.operator === '>')); - - return sameDirectionIncreasing || sameDirectionDecreasing || - (sameSemVer && differentDirectionsInclusive) || - oppositeDirectionsLessThan || oppositeDirectionsGreaterThan; -}; - - -exports.Range = Range; -function Range(range, loose) { - if (range instanceof Range) { - if (range.loose === loose) { - return range; - } else { - return new Range(range.raw, loose); - } - } - - if (range instanceof Comparator) { - return new Range(range.value, loose); - } - - if (!(this instanceof Range)) - return new Range(range, loose); - - this.loose = loose; - - // First, split based on boolean or || - this.raw = range; - this.set = range.split(/\s*\|\|\s*/).map(function(range) { - return this.parseRange(range.trim()); - }, this).filter(function(c) { - // throw out any that are not relevant for whatever reason - return c.length; - }); - - if (!this.set.length) { - throw new TypeError('Invalid SemVer Range: ' + range); - } - - this.format(); -} - -Range.prototype.format = function() { - this.range = this.set.map(function(comps) { - return comps.join(' ').trim(); - }).join('||').trim(); - return this.range; -}; - -Range.prototype.toString = function() { - return this.range; -}; - -Range.prototype.parseRange = function(range) { - var loose = this.loose; - range = range.trim(); - debug('range', range, loose); - // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4` - var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]; - range = range.replace(hr, hyphenReplace); - debug('hyphen replace', range); - // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5` - range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace); - debug('comparator trim', range, re[COMPARATORTRIM]); - - // `~ 1.2.3` => `~1.2.3` - range = range.replace(re[TILDETRIM], tildeTrimReplace); - - // `^ 1.2.3` => `^1.2.3` - range = range.replace(re[CARETTRIM], caretTrimReplace); - - // normalize spaces - range = range.split(/\s+/).join(' '); - - // At this point, the range is completely trimmed and - // ready to be split into comparators. - - var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]; - var set = range.split(' ').map(function(comp) { - return parseComparator(comp, loose); - }).join(' ').split(/\s+/); - if (this.loose) { - // in loose mode, throw out any that are not valid comparators - set = set.filter(function(comp) { - return !!comp.match(compRe); - }); - } - set = set.map(function(comp) { - return new Comparator(comp, loose); - }); - - return set; -}; - -Range.prototype.intersects = function(range, loose) { - if (!(range instanceof Range)) { - throw new TypeError('a Range is required'); - } - - return this.set.some(function(thisComparators) { - return thisComparators.every(function(thisComparator) { - return range.set.some(function(rangeComparators) { - return rangeComparators.every(function(rangeComparator) { - return thisComparator.intersects(rangeComparator, loose); - }); - }); - }); - }); -}; - -// Mostly just for testing and legacy API reasons -exports.toComparators = toComparators; -function toComparators(range, loose) { - return new Range(range, loose).set.map(function(comp) { - return comp.map(function(c) { - return c.value; - }).join(' ').trim().split(' '); - }); -} - -// comprised of xranges, tildes, stars, and gtlt's at this point. -// already replaced the hyphen ranges -// turn into a set of JUST comparators. -function parseComparator(comp, loose) { - debug('comp', comp); - comp = replaceCarets(comp, loose); - debug('caret', comp); - comp = replaceTildes(comp, loose); - debug('tildes', comp); - comp = replaceXRanges(comp, loose); - debug('xrange', comp); - comp = replaceStars(comp, loose); - debug('stars', comp); - return comp; -} - -function isX(id) { - return !id || id.toLowerCase() === 'x' || id === '*'; -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceTildes(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceTilde(comp, loose); - }).join(' '); -} - -function replaceTilde(comp, loose) { - var r = loose ? re[TILDELOOSE] : re[TILDE]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('tilde', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) - // ~1.2 == >=1.2.0 <1.3.0 - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else if (pr) { - debug('replaceTilde pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - // ~1.2.3 == >=1.2.3 <1.3.0 - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - - debug('tilde return', ret); - return ret; - }); -} - -// ^ --> * (any, kinda silly) -// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0 -// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0 -// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0 -// ^1.2.3 --> >=1.2.3 <2.0.0 -// ^1.2.0 --> >=1.2.0 <2.0.0 -function replaceCarets(comp, loose) { - return comp.trim().split(/\s+/).map(function(comp) { - return replaceCaret(comp, loose); - }).join(' '); -} - -function replaceCaret(comp, loose) { - debug('caret', comp, loose); - var r = loose ? re[CARETLOOSE] : re[CARET]; - return comp.replace(r, function(_, M, m, p, pr) { - debug('caret', comp, _, M, m, p, pr); - var ret; - - if (isX(M)) - ret = ''; - else if (isX(m)) - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - else if (isX(p)) { - if (M === '0') - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - else - ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'; - } else if (pr) { - debug('replaceCaret pr', pr); - if (pr.charAt(0) !== '-') - pr = '-' + pr; - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + pr + - ' <' + (+M + 1) + '.0.0'; - } else { - debug('no pr'); - if (M === '0') { - if (m === '0') - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + m + '.' + (+p + 1); - else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + M + '.' + (+m + 1) + '.0'; - } else - ret = '>=' + M + '.' + m + '.' + p + - ' <' + (+M + 1) + '.0.0'; - } - - debug('caret return', ret); - return ret; - }); -} - -function replaceXRanges(comp, loose) { - debug('replaceXRanges', comp, loose); - return comp.split(/\s+/).map(function(comp) { - return replaceXRange(comp, loose); - }).join(' '); -} - -function replaceXRange(comp, loose) { - comp = comp.trim(); - var r = loose ? re[XRANGELOOSE] : re[XRANGE]; - return comp.replace(r, function(ret, gtlt, M, m, p, pr) { - debug('xRange', comp, ret, gtlt, M, m, p, pr); - var xM = isX(M); - var xm = xM || isX(m); - var xp = xm || isX(p); - var anyX = xp; - - if (gtlt === '=' && anyX) - gtlt = ''; - - if (xM) { - if (gtlt === '>' || gtlt === '<') { - // nothing is allowed - ret = '<0.0.0'; - } else { - // nothing is forbidden - ret = '*'; - } - } else if (gtlt && anyX) { - // replace X with 0 - if (xm) - m = 0; - if (xp) - p = 0; - - if (gtlt === '>') { - // >1 => >=2.0.0 - // >1.2 => >=1.3.0 - // >1.2.3 => >= 1.2.4 - gtlt = '>='; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else if (xp) { - m = +m + 1; - p = 0; - } - } else if (gtlt === '<=') { - // <=0.7.x is actually <0.8.0, since any 0.7.x should - // pass. Similarly, <=7.x is actually <8.0.0, etc. - gtlt = '<'; - if (xm) - M = +M + 1; - else - m = +m + 1; - } - - ret = gtlt + M + '.' + m + '.' + p; - } else if (xm) { - ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'; - } else if (xp) { - ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'; - } - - debug('xRange return', ret); - - return ret; - }); -} - -// Because * is AND-ed with everything else in the comparator, -// and '' means "any version", just remove the *s entirely. -function replaceStars(comp, loose) { - debug('replaceStars', comp, loose); - // Looseness is ignored here. star is always as loose as it gets! - return comp.trim().replace(re[STAR], ''); -} - -// This function is passed to string.replace(re[HYPHENRANGE]) -// M, m, patch, prerelease, build -// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5 -// 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do -// 1.2 - 3.4 => >=1.2.0 <3.5.0 -function hyphenReplace($0, - from, fM, fm, fp, fpr, fb, - to, tM, tm, tp, tpr, tb) { - - if (isX(fM)) - from = ''; - else if (isX(fm)) - from = '>=' + fM + '.0.0'; - else if (isX(fp)) - from = '>=' + fM + '.' + fm + '.0'; - else - from = '>=' + from; - - if (isX(tM)) - to = ''; - else if (isX(tm)) - to = '<' + (+tM + 1) + '.0.0'; - else if (isX(tp)) - to = '<' + tM + '.' + (+tm + 1) + '.0'; - else if (tpr) - to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr; - else - to = '<=' + to; - - return (from + ' ' + to).trim(); -} - - -// if ANY of the sets match ALL of its comparators, then pass -Range.prototype.test = function(version) { - if (!version) - return false; - - if (typeof version === 'string') - version = new SemVer(version, this.loose); - - for (var i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version)) - return true; - } - return false; -}; - -function testSet(set, version) { - for (var i = 0; i < set.length; i++) { - if (!set[i].test(version)) - return false; - } - - if (version.prerelease.length) { - // Find the set of versions that are allowed to have prereleases - // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0 - // That should allow `1.2.3-pr.2` to pass. - // However, `1.2.4-alpha.notready` should NOT be allowed, - // even though it's within the range set by the comparators. - for (var i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === ANY) - continue; - - if (set[i].semver.prerelease.length > 0) { - var allowed = set[i].semver; - if (allowed.major === version.major && - allowed.minor === version.minor && - allowed.patch === version.patch) - return true; - } - } - - // Version has a -pre, but it's not one of the ones we like. - return false; - } - - return true; -} - -exports.satisfies = satisfies; -function satisfies(version, range, loose) { - try { - range = new Range(range, loose); - } catch (er) { - return false; - } - return range.test(version); -} - -exports.maxSatisfying = maxSatisfying; -function maxSatisfying(versions, range, loose) { - var max = null; - var maxSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!max || maxSV.compare(v) === -1) { // compare(max, v, true) - max = v; - maxSV = new SemVer(max, loose); - } - } - }) - return max; -} - -exports.minSatisfying = minSatisfying; -function minSatisfying(versions, range, loose) { - var min = null; - var minSV = null; - try { - var rangeObj = new Range(range, loose); - } catch (er) { - return null; - } - versions.forEach(function (v) { - if (rangeObj.test(v)) { // satisfies(v, range, loose) - if (!min || minSV.compare(v) === 1) { // compare(min, v, true) - min = v; - minSV = new SemVer(min, loose); - } - } - }) - return min; -} - -exports.validRange = validRange; -function validRange(range, loose) { - try { - // Return '*' instead of '' so that truthiness works. - // This will throw if it's invalid anyway - return new Range(range, loose).range || '*'; - } catch (er) { - return null; - } -} - -// Determine if version is less than all the versions possible in the range -exports.ltr = ltr; -function ltr(version, range, loose) { - return outside(version, range, '<', loose); -} - -// Determine if version is greater than all the versions possible in the range. -exports.gtr = gtr; -function gtr(version, range, loose) { - return outside(version, range, '>', loose); -} - -exports.outside = outside; -function outside(version, range, hilo, loose) { - version = new SemVer(version, loose); - range = new Range(range, loose); - - var gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case '>': - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = '>'; - ecomp = '>='; - break; - case '<': - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = '<'; - ecomp = '<='; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - - // If it satisifes the range it is not outside - if (satisfies(version, range, loose)) { - return false; - } - - // From now on, variable terms are as if we're in "gtr" mode. - // but note that everything is flipped for the "ltr" function. - - for (var i = 0; i < range.set.length; ++i) { - var comparators = range.set[i]; - - var high = null; - var low = null; - - comparators.forEach(function(comparator) { - if (comparator.semver === ANY) { - comparator = new Comparator('>=0.0.0') - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, loose)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, loose)) { - low = comparator; - } - }); - - // If the edge version comparator has a operator then our version - // isn't outside it - if (high.operator === comp || high.operator === ecomp) { - return false; - } - - // If the lowest version comparator has an operator and our version - // is less than it then it isn't higher than the range - if ((!low.operator || low.operator === comp) && - ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; -} - -exports.prerelease = prerelease; -function prerelease(version, loose) { - var parsed = parse(version, loose); - return (parsed && parsed.prerelease.length) ? parsed.prerelease : null; -} - -exports.intersects = intersects; -function intersects(r1, r2, loose) { - r1 = new Range(r1, loose) - r2 = new Range(r2, loose) - return r1.intersects(r2) -} - -exports.coerce = coerce; -function coerce(version) { - if (version instanceof SemVer) - return version; - - if (typeof version !== 'string') - return null; - - var match = version.match(re[COERCE]); - - if (match == null) - return null; - - return parse((match[1] || '0') + '.' + (match[2] || '0') + '.' + (match[3] || '0')); -} diff --git a/node_modules/cordova-android/node_modules/shelljs/.documentup.json b/node_modules/cordova-android/node_modules/shelljs/.documentup.json deleted file mode 100644 index 57fe301..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/.documentup.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "ShellJS", - "twitter": [ - "r2r" - ] -} diff --git a/node_modules/cordova-android/node_modules/shelljs/.jshintrc b/node_modules/cordova-android/node_modules/shelljs/.jshintrc deleted file mode 100644 index a80c559..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/.jshintrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "loopfunc": true, - "sub": true, - "undef": true, - "unused": true, - "node": true -} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/shelljs/.npmignore b/node_modules/cordova-android/node_modules/shelljs/.npmignore deleted file mode 100644 index 6b20c38..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/ -tmp/ \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/shelljs/.travis.yml b/node_modules/cordova-android/node_modules/shelljs/.travis.yml deleted file mode 100644 index 1b3280a..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.11" - - "0.12" - diff --git a/node_modules/cordova-android/node_modules/shelljs/LICENSE b/node_modules/cordova-android/node_modules/shelljs/LICENSE deleted file mode 100644 index 1b35ee9..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2012, Artur Adib -All rights reserved. - -You may use this project under the terms of the New BSD license as follows: - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of Artur Adib nor the - names of the contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL ARTUR ADIB BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/cordova-android/node_modules/shelljs/README.md b/node_modules/cordova-android/node_modules/shelljs/README.md deleted file mode 100644 index d08d13e..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/README.md +++ /dev/null @@ -1,579 +0,0 @@ -# ShellJS - Unix shell commands for Node.js [![Build Status](https://secure.travis-ci.org/arturadib/shelljs.png)](http://travis-ci.org/arturadib/shelljs) - -ShellJS is a portable **(Windows/Linux/OS X)** implementation of Unix shell commands on top of the Node.js API. You can use it to eliminate your shell script's dependency on Unix while still keeping its familiar and powerful commands. You can also install it globally so you can run it from outside Node projects - say goodbye to those gnarly Bash scripts! - -The project is [unit-tested](http://travis-ci.org/arturadib/shelljs) and battled-tested in projects like: - -+ [PDF.js](http://github.com/mozilla/pdf.js) - Firefox's next-gen PDF reader -+ [Firebug](http://getfirebug.com/) - Firefox's infamous debugger -+ [JSHint](http://jshint.com) - Most popular JavaScript linter -+ [Zepto](http://zeptojs.com) - jQuery-compatible JavaScript library for modern browsers -+ [Yeoman](http://yeoman.io/) - Web application stack and development tool -+ [Deployd.com](http://deployd.com) - Open source PaaS for quick API backend generation - -and [many more](https://npmjs.org/browse/depended/shelljs). - -Connect with [@r2r](http://twitter.com/r2r) on Twitter for questions, suggestions, etc. - -## Installing - -Via npm: - -```bash -$ npm install [-g] shelljs -``` - -If the global option `-g` is specified, the binary `shjs` will be installed. This makes it possible to -run ShellJS scripts much like any shell script from the command line, i.e. without requiring a `node_modules` folder: - -```bash -$ shjs my_script -``` - -You can also just copy `shell.js` into your project's directory, and `require()` accordingly. - - -## Examples - -### JavaScript - -```javascript -require('shelljs/global'); - -if (!which('git')) { - echo('Sorry, this script requires git'); - exit(1); -} - -// Copy files to release dir -mkdir('-p', 'out/Release'); -cp('-R', 'stuff/*', 'out/Release'); - -// Replace macros in each .js file -cd('lib'); -ls('*.js').forEach(function(file) { - sed('-i', 'BUILD_VERSION', 'v0.1.2', file); - sed('-i', /.*REMOVE_THIS_LINE.*\n/, '', file); - sed('-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat('macro.js'), file); -}); -cd('..'); - -// Run external tool synchronously -if (exec('git commit -am "Auto-commit"').code !== 0) { - echo('Error: Git commit failed'); - exit(1); -} -``` - -### CoffeeScript - -```coffeescript -require 'shelljs/global' - -if not which 'git' - echo 'Sorry, this script requires git' - exit 1 - -# Copy files to release dir -mkdir '-p', 'out/Release' -cp '-R', 'stuff/*', 'out/Release' - -# Replace macros in each .js file -cd 'lib' -for file in ls '*.js' - sed '-i', 'BUILD_VERSION', 'v0.1.2', file - sed '-i', /.*REMOVE_THIS_LINE.*\n/, '', file - sed '-i', /.*REPLACE_LINE_WITH_MACRO.*\n/, cat 'macro.js', file -cd '..' - -# Run external tool synchronously -if (exec 'git commit -am "Auto-commit"').code != 0 - echo 'Error: Git commit failed' - exit 1 -``` - -## Global vs. Local - -The example above uses the convenience script `shelljs/global` to reduce verbosity. If polluting your global namespace is not desirable, simply require `shelljs`. - -Example: - -```javascript -var shell = require('shelljs'); -shell.echo('hello world'); -``` - -## Make tool - -A convenience script `shelljs/make` is also provided to mimic the behavior of a Unix Makefile. In this case all shell objects are global, and command line arguments will cause the script to execute only the corresponding function in the global `target` object. To avoid redundant calls, target functions are executed only once per script. - -Example (CoffeeScript): - -```coffeescript -require 'shelljs/make' - -target.all = -> - target.bundle() - target.docs() - -target.bundle = -> - cd __dirname - mkdir 'build' - cd 'lib' - (cat '*.js').to '../build/output.js' - -target.docs = -> - cd __dirname - mkdir 'docs' - cd 'lib' - for file in ls '*.js' - text = grep '//@', file # extract special comments - text.replace '//@', '' # remove comment tags - text.to 'docs/my_docs.md' -``` - -To run the target `all`, call the above script without arguments: `$ node make`. To run the target `docs`: `$ node make docs`. - -You can also pass arguments to your targets by using the `--` separator. For example, to pass `arg1` and `arg2` to a target `bundle`, do `$ node make bundle -- arg1 arg2`: - -```javascript -require('shelljs/make'); - -target.bundle = function(argsArray) { - // argsArray = ['arg1', 'arg2'] - /* ... */ -} -``` - - - - - -## Command reference - - -All commands run synchronously, unless otherwise stated. - - -### cd('dir') -Changes to directory `dir` for the duration of the script - - -### pwd() -Returns the current directory. - - -### ls([options ,] path [,path ...]) -### ls([options ,] path_array) -Available options: - -+ `-R`: recursive -+ `-A`: all files (include files beginning with `.`, except for `.` and `..`) - -Examples: - -```javascript -ls('projs/*.js'); -ls('-R', '/users/me', '/tmp'); -ls('-R', ['/users/me', '/tmp']); // same as above -``` - -Returns array of files in the given path, or in current directory if no path provided. - - -### find(path [,path ...]) -### find(path_array) -Examples: - -```javascript -find('src', 'lib'); -find(['src', 'lib']); // same as above -find('.').filter(function(file) { return file.match(/\.js$/); }); -``` - -Returns array of all files (however deep) in the given paths. - -The main difference from `ls('-R', path)` is that the resulting file names -include the base directories, e.g. `lib/resources/file1` instead of just `file1`. - - -### cp([options ,] source [,source ...], dest) -### cp([options ,] source_array, dest) -Available options: - -+ `-f`: force -+ `-r, -R`: recursive - -Examples: - -```javascript -cp('file1', 'dir1'); -cp('-Rf', '/tmp/*', '/usr/local/*', '/home/tmp'); -cp('-Rf', ['/tmp/*', '/usr/local/*'], '/home/tmp'); // same as above -``` - -Copies files. The wildcard `*` is accepted. - - -### rm([options ,] file [, file ...]) -### rm([options ,] file_array) -Available options: - -+ `-f`: force -+ `-r, -R`: recursive - -Examples: - -```javascript -rm('-rf', '/tmp/*'); -rm('some_file.txt', 'another_file.txt'); -rm(['some_file.txt', 'another_file.txt']); // same as above -``` - -Removes files. The wildcard `*` is accepted. - - -### mv(source [, source ...], dest') -### mv(source_array, dest') -Available options: - -+ `f`: force - -Examples: - -```javascript -mv('-f', 'file', 'dir/'); -mv('file1', 'file2', 'dir/'); -mv(['file1', 'file2'], 'dir/'); // same as above -``` - -Moves files. The wildcard `*` is accepted. - - -### mkdir([options ,] dir [, dir ...]) -### mkdir([options ,] dir_array) -Available options: - -+ `p`: full path (will create intermediate dirs if necessary) - -Examples: - -```javascript -mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); -mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above -``` - -Creates directories. - - -### test(expression) -Available expression primaries: - -+ `'-b', 'path'`: true if path is a block device -+ `'-c', 'path'`: true if path is a character device -+ `'-d', 'path'`: true if path is a directory -+ `'-e', 'path'`: true if path exists -+ `'-f', 'path'`: true if path is a regular file -+ `'-L', 'path'`: true if path is a symbolic link -+ `'-p', 'path'`: true if path is a pipe (FIFO) -+ `'-S', 'path'`: true if path is a socket - -Examples: - -```javascript -if (test('-d', path)) { /* do something with dir */ }; -if (!test('-f', path)) continue; // skip if it's a regular file -``` - -Evaluates expression using the available primaries and returns corresponding value. - - -### cat(file [, file ...]) -### cat(file_array) - -Examples: - -```javascript -var str = cat('file*.txt'); -var str = cat('file1', 'file2'); -var str = cat(['file1', 'file2']); // same as above -``` - -Returns a string containing the given file, or a concatenated string -containing the files if more than one file is given (a new line character is -introduced between each file). Wildcard `*` accepted. - - -### 'string'.to(file) - -Examples: - -```javascript -cat('input.txt').to('output.txt'); -``` - -Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as -those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ - - -### 'string'.toEnd(file) - -Examples: - -```javascript -cat('input.txt').toEnd('output.txt'); -``` - -Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as -those returned by `cat`, `grep`, etc). - - -### sed([options ,] search_regex, replacement, file) -Available options: - -+ `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ - -Examples: - -```javascript -sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); -sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); -``` - -Reads an input string from `file` and performs a JavaScript `replace()` on the input -using the given search regex and replacement string or function. Returns the new string after replacement. - - -### grep([options ,] regex_filter, file [, file ...]) -### grep([options ,] regex_filter, file_array) -Available options: - -+ `-v`: Inverse the sense of the regex and print the lines not matching the criteria. - -Examples: - -```javascript -grep('-v', 'GLOBAL_VARIABLE', '*.js'); -grep('GLOBAL_VARIABLE', '*.js'); -``` - -Reads input string from given files and returns a string containing all lines of the -file that match the given `regex_filter`. Wildcard `*` accepted. - - -### which(command) - -Examples: - -```javascript -var nodeExec = which('node'); -``` - -Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. -Returns string containing the absolute path to the command. - - -### echo(string [,string ...]) - -Examples: - -```javascript -echo('hello world'); -var str = echo('hello world'); -``` - -Prints string to stdout, and returns string with additional utility methods -like `.to()`. - - -### pushd([options,] [dir | '-N' | '+N']) - -Available options: - -+ `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. - -Arguments: - -+ `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. -+ `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -+ `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. - -Examples: - -```javascript -// process.cwd() === '/usr' -pushd('/etc'); // Returns /etc /usr -pushd('+1'); // Returns /usr /etc -``` - -Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. - -### popd([options,] ['-N' | '+N']) - -Available options: - -+ `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. - -Arguments: - -+ `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. -+ `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. - -Examples: - -```javascript -echo(process.cwd()); // '/usr' -pushd('/etc'); // '/etc /usr' -echo(process.cwd()); // '/etc' -popd(); // '/usr' -echo(process.cwd()); // '/usr' -``` - -When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. - -### dirs([options | '+N' | '-N']) - -Available options: - -+ `-c`: Clears the directory stack by deleting all of the elements. - -Arguments: - -+ `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. -+ `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. - -Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. - -See also: pushd, popd - - -### ln(options, source, dest) -### ln(source, dest) -Available options: - -+ `s`: symlink -+ `f`: force - -Examples: - -```javascript -ln('file', 'newlink'); -ln('-sf', 'file', 'existing'); -``` - -Links source to dest. Use -f to force the link, should dest already exist. - - -### exit(code) -Exits the current process with the given exit code. - -### env['VAR_NAME'] -Object containing environment variables (both getter and setter). Shortcut to process.env. - -### exec(command [, options] [, callback]) -Available options (all `false` by default): - -+ `async`: Asynchronous execution. Defaults to true if a callback is provided. -+ `silent`: Do not echo program output to console. - -Examples: - -```javascript -var version = exec('node --version', {silent:true}).output; - -var child = exec('some_long_running_process', {async:true}); -child.stdout.on('data', function(data) { - /* ... do something with data ... */ -}); - -exec('some_long_running_process', function(code, output) { - console.log('Exit code:', code); - console.log('Program output:', output); -}); -``` - -Executes the given `command` _synchronously_, unless otherwise specified. -When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's -`output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and -the `callback` gets the arguments `(code, output)`. - -**Note:** For long-lived processes, it's best to run `exec()` asynchronously as -the current synchronous implementation uses a lot of CPU. This should be getting -fixed soon. - - -### chmod(octal_mode || octal_string, file) -### chmod(symbolic_mode, file) - -Available options: - -+ `-v`: output a diagnostic for every file processed -+ `-c`: like verbose but report only when a change is made -+ `-R`: change files and directories recursively - -Examples: - -```javascript -chmod(755, '/Users/brandon'); -chmod('755', '/Users/brandon'); // same as above -chmod('u+x', '/Users/brandon'); -``` - -Alters the permissions of a file or directory by either specifying the -absolute permissions in octal form or expressing the changes in symbols. -This command tries to mimic the POSIX behavior as much as possible. -Notable exceptions: - -+ In symbolic modes, 'a-r' and '-r' are identical. No consideration is - given to the umask. -+ There is no "quiet" option since default behavior is to run silent. - - -## Non-Unix commands - - -### tempdir() - -Examples: - -```javascript -var tmp = tempdir(); // "/tmp" for most *nix platforms -``` - -Searches and returns string containing a writeable, platform-dependent temporary directory. -Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). - - -### error() -Tests if error occurred in the last command. Returns `null` if no error occurred, -otherwise returns string explaining the error - - -## Configuration - - -### config.silent -Example: - -```javascript -var sh = require('shelljs'); -var silentState = sh.config.silent; // save old silent state -sh.config.silent = true; -/* ... */ -sh.config.silent = silentState; // restore old silent state -``` - -Suppresses all command output if `true`, except for `echo()` calls. -Default is `false`. - -### config.fatal -Example: - -```javascript -require('shelljs/global'); -config.fatal = true; -cp('this_file_does_not_exist', '/dev/null'); // dies here -/* more commands... */ -``` - -If `true` the script will die on errors. Default is `false`. diff --git a/node_modules/cordova-android/node_modules/shelljs/RELEASE.md b/node_modules/cordova-android/node_modules/shelljs/RELEASE.md deleted file mode 100644 index 69ef3fb..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/RELEASE.md +++ /dev/null @@ -1,9 +0,0 @@ -# Release steps - -* Ensure master passes CI tests -* Bump version in package.json. Any breaking change or new feature should bump minor (or even major). Non-breaking changes or fixes can just bump patch. -* Update README manually if the changes are not documented in-code. If so, run `scripts/generate-docs.js` -* Commit -* `$ git tag ` (see `git tag -l` for latest) -* `$ git push origin master --tags` -* `$ npm publish .` diff --git a/node_modules/cordova-android/node_modules/shelljs/bin/shjs b/node_modules/cordova-android/node_modules/shelljs/bin/shjs deleted file mode 100755 index d239a7a..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/bin/shjs +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -if (process.argv.length < 3) { - console.log('ShellJS: missing argument (script name)'); - console.log(); - process.exit(1); -} - -var args, - scriptName = process.argv[2]; -env['NODE_PATH'] = __dirname + '/../..'; - -if (!scriptName.match(/\.js/) && !scriptName.match(/\.coffee/)) { - if (test('-f', scriptName + '.js')) - scriptName += '.js'; - if (test('-f', scriptName + '.coffee')) - scriptName += '.coffee'; -} - -if (!test('-f', scriptName)) { - console.log('ShellJS: script not found ('+scriptName+')'); - console.log(); - process.exit(1); -} - -args = process.argv.slice(3); - -for (var i = 0, l = args.length; i < l; i++) { - if (args[i][0] !== "-"){ - args[i] = '"' + args[i] + '"'; // fixes arguments with multiple words - } -} - -if (scriptName.match(/\.coffee$/)) { - // - // CoffeeScript - // - if (which('coffee')) { - exec('coffee ' + scriptName + ' ' + args.join(' '), { async: true }); - } else { - console.log('ShellJS: CoffeeScript interpreter not found'); - console.log(); - process.exit(1); - } -} else { - // - // JavaScript - // - exec('node ' + scriptName + ' ' + args.join(' '), { async: true }); -} diff --git a/node_modules/cordova-android/node_modules/shelljs/global.js b/node_modules/cordova-android/node_modules/shelljs/global.js deleted file mode 100644 index 97f0033..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/global.js +++ /dev/null @@ -1,3 +0,0 @@ -var shell = require('./shell.js'); -for (var cmd in shell) - global[cmd] = shell[cmd]; diff --git a/node_modules/cordova-android/node_modules/shelljs/make.js b/node_modules/cordova-android/node_modules/shelljs/make.js deleted file mode 100644 index f78b4cf..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/make.js +++ /dev/null @@ -1,56 +0,0 @@ -require('./global'); - -global.config.fatal = true; -global.target = {}; - -var args = process.argv.slice(2), - targetArgs, - dashesLoc = args.indexOf('--'); - -// split args, everything after -- if only for targets -if (dashesLoc > -1) { - targetArgs = args.slice(dashesLoc + 1, args.length); - args = args.slice(0, dashesLoc); -} - -// This ensures we only execute the script targets after the entire script has -// been evaluated -setTimeout(function() { - var t; - - if (args.length === 1 && args[0] === '--help') { - console.log('Available targets:'); - for (t in global.target) - console.log(' ' + t); - return; - } - - // Wrap targets to prevent duplicate execution - for (t in global.target) { - (function(t, oldTarget){ - - // Wrap it - global.target[t] = function() { - if (oldTarget.done) - return; - oldTarget.done = true; - return oldTarget.apply(oldTarget, arguments); - }; - - })(t, global.target[t]); - } - - // Execute desired targets - if (args.length > 0) { - args.forEach(function(arg) { - if (arg in global.target) - global.target[arg](targetArgs); - else { - console.log('no such target: ' + arg); - } - }); - } else if ('all' in global.target) { - global.target.all(targetArgs); - } - -}, 0); diff --git a/node_modules/cordova-android/node_modules/shelljs/package.json b/node_modules/cordova-android/node_modules/shelljs/package.json deleted file mode 100644 index e9fa4e3..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "shelljs@0.5.3", - "_id": "shelljs@0.5.3", - "_inBundle": true, - "_integrity": "sha1-xUmCuZbHbvDB5rWfvcWCX1txMRM=", - "_location": "/cordova-android/shelljs", - "_phantomChildren": {}, - "_requested": { - "type": "version", - "registry": true, - "raw": "shelljs@0.5.3", - "name": "shelljs", - "escapedName": "shelljs", - "rawSpec": "0.5.3", - "saveSpec": null, - "fetchSpec": "0.5.3" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.5.3.tgz", - "_shasum": "c54982b996c76ef0c1e6b59fbdc5825f5b713113", - "_spec": "shelljs@0.5.3", - "_where": "/Users/brodybits/Documents/cordova/cordova-android", - "author": { - "name": "Artur Adib", - "email": "arturadib@gmail.com" - }, - "bin": { - "shjs": "./bin/shjs" - }, - "bugs": { - "url": "https://github.com/arturadib/shelljs/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Portable Unix shell commands for Node.js", - "devDependencies": { - "jshint": "~2.1.11" - }, - "engines": { - "node": ">=0.8.0" - }, - "homepage": "http://github.com/arturadib/shelljs", - "keywords": [ - "unix", - "shell", - "makefile", - "make", - "jake", - "synchronous" - ], - "license": "BSD*", - "main": "./shell.js", - "name": "shelljs", - "optionalDependencies": {}, - "repository": { - "type": "git", - "url": "git://github.com/arturadib/shelljs.git" - }, - "scripts": { - "test": "node scripts/run-tests" - }, - "version": "0.5.3" -} diff --git a/node_modules/cordova-android/node_modules/shelljs/scripts/generate-docs.js b/node_modules/cordova-android/node_modules/shelljs/scripts/generate-docs.js deleted file mode 100755 index 532fed9..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/scripts/generate-docs.js +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -echo('Appending docs to README.md'); - -cd(__dirname + '/..'); - -// Extract docs from shell.js -var docs = grep('//@', 'shell.js'); - -docs = docs.replace(/\/\/\@include (.+)/g, function(match, path) { - var file = path.match('.js$') ? path : path+'.js'; - return grep('//@', file); -}); - -// Remove '//@' -docs = docs.replace(/\/\/\@ ?/g, ''); -// Append docs to README -sed('-i', /## Command reference(.|\n)*/, '## Command reference\n\n' + docs, 'README.md'); - -echo('All done.'); diff --git a/node_modules/cordova-android/node_modules/shelljs/scripts/run-tests.js b/node_modules/cordova-android/node_modules/shelljs/scripts/run-tests.js deleted file mode 100755 index f9d31e0..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/scripts/run-tests.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node -require('../global'); - -var path = require('path'); - -var failed = false; - -// -// Lint -// -JSHINT_BIN = './node_modules/jshint/bin/jshint'; -cd(__dirname + '/..'); - -if (!test('-f', JSHINT_BIN)) { - echo('JSHint not found. Run `npm install` in the root dir first.'); - exit(1); -} - -if (exec(JSHINT_BIN + ' *.js test/*.js').code !== 0) { - failed = true; - echo('*** JSHINT FAILED! (return code != 0)'); - echo(); -} else { - echo('All JSHint tests passed'); - echo(); -} - -// -// Unit tests -// -cd(__dirname + '/../test'); -ls('*.js').forEach(function(file) { - echo('Running test:', file); - if (exec('node ' + file).code !== 123) { // 123 avoids false positives (e.g. premature exit) - failed = true; - echo('*** TEST FAILED! (missing exit code "123")'); - echo(); - } -}); - -if (failed) { - echo(); - echo('*******************************************************'); - echo('WARNING: Some tests did not pass!'); - echo('*******************************************************'); - exit(1); -} else { - echo(); - echo('All tests passed.'); -} diff --git a/node_modules/cordova-android/node_modules/shelljs/shell.js b/node_modules/cordova-android/node_modules/shelljs/shell.js deleted file mode 100644 index bdeb559..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/shell.js +++ /dev/null @@ -1,159 +0,0 @@ -// -// ShellJS -// Unix shell commands on top of Node's API -// -// Copyright (c) 2012 Artur Adib -// http://github.com/arturadib/shelljs -// - -var common = require('./src/common'); - - -//@ -//@ All commands run synchronously, unless otherwise stated. -//@ - -//@include ./src/cd -var _cd = require('./src/cd'); -exports.cd = common.wrap('cd', _cd); - -//@include ./src/pwd -var _pwd = require('./src/pwd'); -exports.pwd = common.wrap('pwd', _pwd); - -//@include ./src/ls -var _ls = require('./src/ls'); -exports.ls = common.wrap('ls', _ls); - -//@include ./src/find -var _find = require('./src/find'); -exports.find = common.wrap('find', _find); - -//@include ./src/cp -var _cp = require('./src/cp'); -exports.cp = common.wrap('cp', _cp); - -//@include ./src/rm -var _rm = require('./src/rm'); -exports.rm = common.wrap('rm', _rm); - -//@include ./src/mv -var _mv = require('./src/mv'); -exports.mv = common.wrap('mv', _mv); - -//@include ./src/mkdir -var _mkdir = require('./src/mkdir'); -exports.mkdir = common.wrap('mkdir', _mkdir); - -//@include ./src/test -var _test = require('./src/test'); -exports.test = common.wrap('test', _test); - -//@include ./src/cat -var _cat = require('./src/cat'); -exports.cat = common.wrap('cat', _cat); - -//@include ./src/to -var _to = require('./src/to'); -String.prototype.to = common.wrap('to', _to); - -//@include ./src/toEnd -var _toEnd = require('./src/toEnd'); -String.prototype.toEnd = common.wrap('toEnd', _toEnd); - -//@include ./src/sed -var _sed = require('./src/sed'); -exports.sed = common.wrap('sed', _sed); - -//@include ./src/grep -var _grep = require('./src/grep'); -exports.grep = common.wrap('grep', _grep); - -//@include ./src/which -var _which = require('./src/which'); -exports.which = common.wrap('which', _which); - -//@include ./src/echo -var _echo = require('./src/echo'); -exports.echo = _echo; // don't common.wrap() as it could parse '-options' - -//@include ./src/dirs -var _dirs = require('./src/dirs').dirs; -exports.dirs = common.wrap("dirs", _dirs); -var _pushd = require('./src/dirs').pushd; -exports.pushd = common.wrap('pushd', _pushd); -var _popd = require('./src/dirs').popd; -exports.popd = common.wrap("popd", _popd); - -//@include ./src/ln -var _ln = require('./src/ln'); -exports.ln = common.wrap('ln', _ln); - -//@ -//@ ### exit(code) -//@ Exits the current process with the given exit code. -exports.exit = process.exit; - -//@ -//@ ### env['VAR_NAME'] -//@ Object containing environment variables (both getter and setter). Shortcut to process.env. -exports.env = process.env; - -//@include ./src/exec -var _exec = require('./src/exec'); -exports.exec = common.wrap('exec', _exec, {notUnix:true}); - -//@include ./src/chmod -var _chmod = require('./src/chmod'); -exports.chmod = common.wrap('chmod', _chmod); - - - -//@ -//@ ## Non-Unix commands -//@ - -//@include ./src/tempdir -var _tempDir = require('./src/tempdir'); -exports.tempdir = common.wrap('tempdir', _tempDir); - - -//@include ./src/error -var _error = require('./src/error'); -exports.error = _error; - - - -//@ -//@ ## Configuration -//@ - -exports.config = common.config; - -//@ -//@ ### config.silent -//@ Example: -//@ -//@ ```javascript -//@ var sh = require('shelljs'); -//@ var silentState = sh.config.silent; // save old silent state -//@ sh.config.silent = true; -//@ /* ... */ -//@ sh.config.silent = silentState; // restore old silent state -//@ ``` -//@ -//@ Suppresses all command output if `true`, except for `echo()` calls. -//@ Default is `false`. - -//@ -//@ ### config.fatal -//@ Example: -//@ -//@ ```javascript -//@ require('shelljs/global'); -//@ config.fatal = true; -//@ cp('this_file_does_not_exist', '/dev/null'); // dies here -//@ /* more commands... */ -//@ ``` -//@ -//@ If `true` the script will die on errors. Default is `false`. diff --git a/node_modules/cordova-android/node_modules/shelljs/src/cat.js b/node_modules/cordova-android/node_modules/shelljs/src/cat.js deleted file mode 100644 index f6f4d25..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/cat.js +++ /dev/null @@ -1,43 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### cat(file [, file ...]) -//@ ### cat(file_array) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var str = cat('file*.txt'); -//@ var str = cat('file1', 'file2'); -//@ var str = cat(['file1', 'file2']); // same as above -//@ ``` -//@ -//@ Returns a string containing the given file, or a concatenated string -//@ containing the files if more than one file is given (a new line character is -//@ introduced between each file). Wildcard `*` accepted. -function _cat(options, files) { - var cat = ''; - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) - common.error('no such file or directory: ' + file); - - cat += fs.readFileSync(file, 'utf8') + '\n'; - }); - - if (cat[cat.length-1] === '\n') - cat = cat.substring(0, cat.length-1); - - return common.ShellString(cat); -} -module.exports = _cat; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/cd.js b/node_modules/cordova-android/node_modules/shelljs/src/cd.js deleted file mode 100644 index 230f432..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/cd.js +++ /dev/null @@ -1,19 +0,0 @@ -var fs = require('fs'); -var common = require('./common'); - -//@ -//@ ### cd('dir') -//@ Changes to directory `dir` for the duration of the script -function _cd(options, dir) { - if (!dir) - common.error('directory not specified'); - - if (!fs.existsSync(dir)) - common.error('no such file or directory: ' + dir); - - if (!fs.statSync(dir).isDirectory()) - common.error('not a directory: ' + dir); - - process.chdir(dir); -} -module.exports = _cd; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/chmod.js b/node_modules/cordova-android/node_modules/shelljs/src/chmod.js deleted file mode 100644 index f288893..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/chmod.js +++ /dev/null @@ -1,208 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -var PERMS = (function (base) { - return { - OTHER_EXEC : base.EXEC, - OTHER_WRITE : base.WRITE, - OTHER_READ : base.READ, - - GROUP_EXEC : base.EXEC << 3, - GROUP_WRITE : base.WRITE << 3, - GROUP_READ : base.READ << 3, - - OWNER_EXEC : base.EXEC << 6, - OWNER_WRITE : base.WRITE << 6, - OWNER_READ : base.READ << 6, - - // Literal octal numbers are apparently not allowed in "strict" javascript. Using parseInt is - // the preferred way, else a jshint warning is thrown. - STICKY : parseInt('01000', 8), - SETGID : parseInt('02000', 8), - SETUID : parseInt('04000', 8), - - TYPE_MASK : parseInt('0770000', 8) - }; -})({ - EXEC : 1, - WRITE : 2, - READ : 4 -}); - -//@ -//@ ### chmod(octal_mode || octal_string, file) -//@ ### chmod(symbolic_mode, file) -//@ -//@ Available options: -//@ -//@ + `-v`: output a diagnostic for every file processed//@ -//@ + `-c`: like verbose but report only when a change is made//@ -//@ + `-R`: change files and directories recursively//@ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ chmod(755, '/Users/brandon'); -//@ chmod('755', '/Users/brandon'); // same as above -//@ chmod('u+x', '/Users/brandon'); -//@ ``` -//@ -//@ Alters the permissions of a file or directory by either specifying the -//@ absolute permissions in octal form or expressing the changes in symbols. -//@ This command tries to mimic the POSIX behavior as much as possible. -//@ Notable exceptions: -//@ -//@ + In symbolic modes, 'a-r' and '-r' are identical. No consideration is -//@ given to the umask. -//@ + There is no "quiet" option since default behavior is to run silent. -function _chmod(options, mode, filePattern) { - if (!filePattern) { - if (options.length > 0 && options.charAt(0) === '-') { - // Special case where the specified file permissions started with - to subtract perms, which - // get picked up by the option parser as command flags. - // If we are down by one argument and options starts with -, shift everything over. - filePattern = mode; - mode = options; - options = ''; - } - else { - common.error('You must specify a file.'); - } - } - - options = common.parseOptions(options, { - 'R': 'recursive', - 'c': 'changes', - 'v': 'verbose' - }); - - if (typeof filePattern === 'string') { - filePattern = [ filePattern ]; - } - - var files; - - if (options.recursive) { - files = []; - common.expand(filePattern).forEach(function addFile(expandedFile) { - var stat = fs.lstatSync(expandedFile); - - if (!stat.isSymbolicLink()) { - files.push(expandedFile); - - if (stat.isDirectory()) { // intentionally does not follow symlinks. - fs.readdirSync(expandedFile).forEach(function (child) { - addFile(expandedFile + '/' + child); - }); - } - } - }); - } - else { - files = common.expand(filePattern); - } - - files.forEach(function innerChmod(file) { - file = path.resolve(file); - if (!fs.existsSync(file)) { - common.error('File not found: ' + file); - } - - // When recursing, don't follow symlinks. - if (options.recursive && fs.lstatSync(file).isSymbolicLink()) { - return; - } - - var perms = fs.statSync(file).mode; - var type = perms & PERMS.TYPE_MASK; - - var newPerms = perms; - - if (isNaN(parseInt(mode, 8))) { - // parse options - mode.split(',').forEach(function (symbolicMode) { - /*jshint regexdash:true */ - var pattern = /([ugoa]*)([=\+-])([rwxXst]*)/i; - var matches = pattern.exec(symbolicMode); - - if (matches) { - var applyTo = matches[1]; - var operator = matches[2]; - var change = matches[3]; - - var changeOwner = applyTo.indexOf('u') != -1 || applyTo === 'a' || applyTo === ''; - var changeGroup = applyTo.indexOf('g') != -1 || applyTo === 'a' || applyTo === ''; - var changeOther = applyTo.indexOf('o') != -1 || applyTo === 'a' || applyTo === ''; - - var changeRead = change.indexOf('r') != -1; - var changeWrite = change.indexOf('w') != -1; - var changeExec = change.indexOf('x') != -1; - var changeSticky = change.indexOf('t') != -1; - var changeSetuid = change.indexOf('s') != -1; - - var mask = 0; - if (changeOwner) { - mask |= (changeRead ? PERMS.OWNER_READ : 0) + (changeWrite ? PERMS.OWNER_WRITE : 0) + (changeExec ? PERMS.OWNER_EXEC : 0) + (changeSetuid ? PERMS.SETUID : 0); - } - if (changeGroup) { - mask |= (changeRead ? PERMS.GROUP_READ : 0) + (changeWrite ? PERMS.GROUP_WRITE : 0) + (changeExec ? PERMS.GROUP_EXEC : 0) + (changeSetuid ? PERMS.SETGID : 0); - } - if (changeOther) { - mask |= (changeRead ? PERMS.OTHER_READ : 0) + (changeWrite ? PERMS.OTHER_WRITE : 0) + (changeExec ? PERMS.OTHER_EXEC : 0); - } - - // Sticky bit is special - it's not tied to user, group or other. - if (changeSticky) { - mask |= PERMS.STICKY; - } - - switch (operator) { - case '+': - newPerms |= mask; - break; - - case '-': - newPerms &= ~mask; - break; - - case '=': - newPerms = type + mask; - - // According to POSIX, when using = to explicitly set the permissions, setuid and setgid can never be cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - break; - } - - if (options.verbose) { - log(file + ' -> ' + newPerms.toString(8)); - } - - if (perms != newPerms) { - if (!options.verbose && options.changes) { - log(file + ' -> ' + newPerms.toString(8)); - } - fs.chmodSync(file, newPerms); - } - } - else { - common.error('Invalid symbolic mode change: ' + symbolicMode); - } - }); - } - else { - // they gave us a full number - newPerms = type + parseInt(mode, 8); - - // POSIX rules are that setuid and setgid can only be added using numeric form, but not cleared. - if (fs.statSync(file).isDirectory()) { - newPerms |= (PERMS.SETUID + PERMS.SETGID) & perms; - } - - fs.chmodSync(file, newPerms); - } - }); -} -module.exports = _chmod; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/common.js b/node_modules/cordova-android/node_modules/shelljs/src/common.js deleted file mode 100644 index d8c2312..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/common.js +++ /dev/null @@ -1,203 +0,0 @@ -var os = require('os'); -var fs = require('fs'); -var _ls = require('./ls'); - -// Module globals -var config = { - silent: false, - fatal: false -}; -exports.config = config; - -var state = { - error: null, - currentCmd: 'shell.js', - tempDir: null -}; -exports.state = state; - -var platform = os.type().match(/^Win/) ? 'win' : 'unix'; -exports.platform = platform; - -function log() { - if (!config.silent) - console.log.apply(this, arguments); -} -exports.log = log; - -// Shows error message. Throws unless _continue or config.fatal are true -function error(msg, _continue) { - if (state.error === null) - state.error = ''; - state.error += state.currentCmd + ': ' + msg + '\n'; - - if (msg.length > 0) - log(state.error); - - if (config.fatal) - process.exit(1); - - if (!_continue) - throw ''; -} -exports.error = error; - -// In the future, when Proxies are default, we can add methods like `.to()` to primitive strings. -// For now, this is a dummy function to bookmark places we need such strings -function ShellString(str) { - return str; -} -exports.ShellString = ShellString; - -// Returns {'alice': true, 'bob': false} when passed a dictionary, e.g.: -// parseOptions('-a', {'a':'alice', 'b':'bob'}); -function parseOptions(str, map) { - if (!map) - error('parseOptions() internal error: no map given'); - - // All options are false by default - var options = {}; - for (var letter in map) - options[map[letter]] = false; - - if (!str) - return options; // defaults - - if (typeof str !== 'string') - error('parseOptions() internal error: wrong str'); - - // e.g. match[1] = 'Rf' for str = '-Rf' - var match = str.match(/^\-(.+)/); - if (!match) - return options; - - // e.g. chars = ['R', 'f'] - var chars = match[1].split(''); - - chars.forEach(function(c) { - if (c in map) - options[map[c]] = true; - else - error('option not recognized: '+c); - }); - - return options; -} -exports.parseOptions = parseOptions; - -// Expands wildcards with matching (ie. existing) file names. -// For example: -// expand(['file*.js']) = ['file1.js', 'file2.js', ...] -// (if the files 'file1.js', 'file2.js', etc, exist in the current dir) -function expand(list) { - var expanded = []; - list.forEach(function(listEl) { - // Wildcard present on directory names ? - if(listEl.search(/\*[^\/]*\//) > -1 || listEl.search(/\*\*[^\/]*\//) > -1) { - var match = listEl.match(/^([^*]+\/|)(.*)/); - var root = match[1]; - var rest = match[2]; - var restRegex = rest.replace(/\*\*/g, ".*").replace(/\*/g, "[^\\/]*"); - restRegex = new RegExp(restRegex); - - _ls('-R', root).filter(function (e) { - return restRegex.test(e); - }).forEach(function(file) { - expanded.push(file); - }); - } - // Wildcard present on file names ? - else if (listEl.search(/\*/) > -1) { - _ls('', listEl).forEach(function(file) { - expanded.push(file); - }); - } else { - expanded.push(listEl); - } - }); - return expanded; -} -exports.expand = expand; - -// Normalizes _unlinkSync() across platforms to match Unix behavior, i.e. -// file can be unlinked even if it's read-only, see https://github.com/joyent/node/issues/3006 -function unlinkSync(file) { - try { - fs.unlinkSync(file); - } catch(e) { - // Try to override file permission - if (e.code === 'EPERM') { - fs.chmodSync(file, '0666'); - fs.unlinkSync(file); - } else { - throw e; - } - } -} -exports.unlinkSync = unlinkSync; - -// e.g. 'shelljs_a5f185d0443ca...' -function randomFileName() { - function randomHash(count) { - if (count === 1) - return parseInt(16*Math.random(), 10).toString(16); - else { - var hash = ''; - for (var i=0; i and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && !options.force) - common.error('dest file already exists: ' + dest); - - if (options.recursive) { - // Recursive allows the shortcut syntax "sourcedir/" for "sourcedir/*" - // (see Github issue #15) - sources.forEach(function(src, i) { - if (src[src.length - 1] === '/') - sources[i] += '*'; - }); - - // Create dest - try { - fs.mkdirSync(dest, parseInt('0777', 8)); - } catch (e) { - // like Unix's cp, keep going even if we can't create dest dir - } - } - - sources = common.expand(sources); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - if (fs.statSync(src).isDirectory()) { - if (!options.recursive) { - // Non-Recursive - common.log(src + ' is a directory (not copied)'); - } else { - // Recursive - // 'cp /a/source dest' should create 'source' in 'dest' - var newDest = path.join(dest, path.basename(src)), - checkDir = fs.statSync(src); - try { - fs.mkdirSync(newDest, checkDir.mode); - } catch (e) { - //if the directory already exists, that's okay - if (e.code !== 'EEXIST') { - common.error('dest file no such file or directory: ' + newDest, true); - throw e; - } - } - - cpdirSyncRecursive(src, newDest, {force: options.force}); - } - return; // done with dir - } - - // If here, src is a file - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && !options.force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - copyFileSync(src, thisDest); - }); // forEach(src) -} -module.exports = _cp; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/dirs.js b/node_modules/cordova-android/node_modules/shelljs/src/dirs.js deleted file mode 100644 index 58fae8b..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/dirs.js +++ /dev/null @@ -1,191 +0,0 @@ -var common = require('./common'); -var _cd = require('./cd'); -var path = require('path'); - -// Pushd/popd/dirs internals -var _dirStack = []; - -function _isStackIndex(index) { - return (/^[\-+]\d+$/).test(index); -} - -function _parseStackIndex(index) { - if (_isStackIndex(index)) { - if (Math.abs(index) < _dirStack.length + 1) { // +1 for pwd - return (/^-/).test(index) ? Number(index) - 1 : Number(index); - } else { - common.error(index + ': directory stack index out of range'); - } - } else { - common.error(index + ': invalid number'); - } -} - -function _actualDirStack() { - return [process.cwd()].concat(_dirStack); -} - -//@ -//@ ### pushd([options,] [dir | '-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when adding directories to the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `dir`: Makes the current working directory be the top of the stack, and then executes the equivalent of `cd dir`. -//@ + `+N`: Brings the Nth directory (counting from the left of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ + `-N`: Brings the Nth directory (counting from the right of the list printed by dirs, starting with zero) to the top of the list by rotating the stack. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ // process.cwd() === '/usr' -//@ pushd('/etc'); // Returns /etc /usr -//@ pushd('+1'); // Returns /usr /etc -//@ ``` -//@ -//@ Save the current directory on the top of the directory stack and then cd to `dir`. With no arguments, pushd exchanges the top two directories. Returns an array of paths in the stack. -function _pushd(options, dir) { - if (_isStackIndex(options)) { - dir = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - var dirs = _actualDirStack(); - - if (dir === '+0') { - return dirs; // +0 is a noop - } else if (!dir) { - if (dirs.length > 1) { - dirs = dirs.splice(1, 1).concat(dirs); - } else { - return common.error('no other directory'); - } - } else if (_isStackIndex(dir)) { - var n = _parseStackIndex(dir); - dirs = dirs.slice(n).concat(dirs.slice(0, n)); - } else { - if (options['no-cd']) { - dirs.splice(1, 0, dir); - } else { - dirs.unshift(dir); - } - } - - if (options['no-cd']) { - dirs = dirs.slice(1); - } else { - dir = path.resolve(dirs.shift()); - _cd('', dir); - } - - _dirStack = dirs; - return _dirs(''); -} -exports.pushd = _pushd; - -//@ -//@ ### popd([options,] ['-N' | '+N']) -//@ -//@ Available options: -//@ -//@ + `-n`: Suppresses the normal change of directory when removing directories from the stack, so that only the stack is manipulated. -//@ -//@ Arguments: -//@ -//@ + `+N`: Removes the Nth directory (counting from the left of the list printed by dirs), starting with zero. -//@ + `-N`: Removes the Nth directory (counting from the right of the list printed by dirs), starting with zero. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo(process.cwd()); // '/usr' -//@ pushd('/etc'); // '/etc /usr' -//@ echo(process.cwd()); // '/etc' -//@ popd(); // '/usr' -//@ echo(process.cwd()); // '/usr' -//@ ``` -//@ -//@ When no arguments are given, popd removes the top directory from the stack and performs a cd to the new top directory. The elements are numbered from 0 starting at the first directory listed with dirs; i.e., popd is equivalent to popd +0. Returns an array of paths in the stack. -function _popd(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'n' : 'no-cd' - }); - - if (!_dirStack.length) { - return common.error('directory stack empty'); - } - - index = _parseStackIndex(index || '+0'); - - if (options['no-cd'] || index > 0 || _dirStack.length + index === 0) { - index = index > 0 ? index - 1 : index; - _dirStack.splice(index, 1); - } else { - var dir = path.resolve(_dirStack.shift()); - _cd('', dir); - } - - return _dirs(''); -} -exports.popd = _popd; - -//@ -//@ ### dirs([options | '+N' | '-N']) -//@ -//@ Available options: -//@ -//@ + `-c`: Clears the directory stack by deleting all of the elements. -//@ -//@ Arguments: -//@ -//@ + `+N`: Displays the Nth directory (counting from the left of the list printed by dirs when invoked without options), starting with zero. -//@ + `-N`: Displays the Nth directory (counting from the right of the list printed by dirs when invoked without options), starting with zero. -//@ -//@ Display the list of currently remembered directories. Returns an array of paths in the stack, or a single path if +N or -N was specified. -//@ -//@ See also: pushd, popd -function _dirs(options, index) { - if (_isStackIndex(options)) { - index = options; - options = ''; - } - - options = common.parseOptions(options, { - 'c' : 'clear' - }); - - if (options['clear']) { - _dirStack = []; - return _dirStack; - } - - var stack = _actualDirStack(); - - if (index) { - index = _parseStackIndex(index); - - if (index < 0) { - index = stack.length + index; - } - - common.log(stack[index]); - return stack[index]; - } - - common.log(stack.join(' ')); - - return stack; -} -exports.dirs = _dirs; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/echo.js b/node_modules/cordova-android/node_modules/shelljs/src/echo.js deleted file mode 100644 index 760ea84..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/echo.js +++ /dev/null @@ -1,20 +0,0 @@ -var common = require('./common'); - -//@ -//@ ### echo(string [,string ...]) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ echo('hello world'); -//@ var str = echo('hello world'); -//@ ``` -//@ -//@ Prints string to stdout, and returns string with additional utility methods -//@ like `.to()`. -function _echo() { - var messages = [].slice.call(arguments, 0); - console.log.apply(this, messages); - return common.ShellString(messages.join(' ')); -} -module.exports = _echo; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/error.js b/node_modules/cordova-android/node_modules/shelljs/src/error.js deleted file mode 100644 index cca3efb..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/error.js +++ /dev/null @@ -1,10 +0,0 @@ -var common = require('./common'); - -//@ -//@ ### error() -//@ Tests if error occurred in the last command. Returns `null` if no error occurred, -//@ otherwise returns string explaining the error -function error() { - return common.state.error; -}; -module.exports = error; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/exec.js b/node_modules/cordova-android/node_modules/shelljs/src/exec.js deleted file mode 100644 index d259a9f..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/exec.js +++ /dev/null @@ -1,216 +0,0 @@ -var common = require('./common'); -var _tempDir = require('./tempdir'); -var _pwd = require('./pwd'); -var path = require('path'); -var fs = require('fs'); -var child = require('child_process'); - -// Hack to run child_process.exec() synchronously (sync avoids callback hell) -// Uses a custom wait loop that checks for a flag file, created when the child process is done. -// (Can't do a wait loop that checks for internal Node variables/messages as -// Node is single-threaded; callbacks and other internal state changes are done in the -// event loop). -function execSync(cmd, opts) { - var tempDir = _tempDir(); - var stdoutFile = path.resolve(tempDir+'/'+common.randomFileName()), - codeFile = path.resolve(tempDir+'/'+common.randomFileName()), - scriptFile = path.resolve(tempDir+'/'+common.randomFileName()), - sleepFile = path.resolve(tempDir+'/'+common.randomFileName()); - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var previousStdoutContent = ''; - // Echoes stdout changes from running process, if not silent - function updateStdout() { - if (options.silent || !fs.existsSync(stdoutFile)) - return; - - var stdoutContent = fs.readFileSync(stdoutFile, 'utf8'); - // No changes since last time? - if (stdoutContent.length <= previousStdoutContent.length) - return; - - process.stdout.write(stdoutContent.substr(previousStdoutContent.length)); - previousStdoutContent = stdoutContent; - } - - function escape(str) { - return (str+'').replace(/([\\"'])/g, "\\$1").replace(/\0/g, "\\0"); - } - - if (fs.existsSync(scriptFile)) common.unlinkSync(scriptFile); - if (fs.existsSync(stdoutFile)) common.unlinkSync(stdoutFile); - if (fs.existsSync(codeFile)) common.unlinkSync(codeFile); - - var execCommand = '"'+process.execPath+'" '+scriptFile; - var execOptions = { - env: process.env, - cwd: _pwd(), - maxBuffer: 20*1024*1024 - }; - - if (typeof child.execSync === 'function') { - var script = [ - "var child = require('child_process')", - " , fs = require('fs');", - "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", - " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", - "});", - "var stdoutStream = fs.createWriteStream('"+escape(stdoutFile)+"');", - "childProcess.stdout.pipe(stdoutStream, {end: false});", - "childProcess.stderr.pipe(stdoutStream, {end: false});", - "childProcess.stdout.pipe(process.stdout);", - "childProcess.stderr.pipe(process.stderr);", - "var stdoutEnded = false, stderrEnded = false;", - "function tryClosing(){ if(stdoutEnded && stderrEnded){ stdoutStream.end(); } }", - "childProcess.stdout.on('end', function(){ stdoutEnded = true; tryClosing(); });", - "childProcess.stderr.on('end', function(){ stderrEnded = true; tryClosing(); });" - ].join('\n'); - - fs.writeFileSync(scriptFile, script); - - if (options.silent) { - execOptions.stdio = 'ignore'; - } else { - execOptions.stdio = [0, 1, 2]; - } - - // Welcome to the future - child.execSync(execCommand, execOptions); - } else { - cmd += ' > '+stdoutFile+' 2>&1'; // works on both win/unix - - var script = [ - "var child = require('child_process')", - " , fs = require('fs');", - "var childProcess = child.exec('"+escape(cmd)+"', {env: process.env, maxBuffer: 20*1024*1024}, function(err) {", - " fs.writeFileSync('"+escape(codeFile)+"', err ? err.code.toString() : '0');", - "});" - ].join('\n'); - - fs.writeFileSync(scriptFile, script); - - child.exec(execCommand, execOptions); - - // The wait loop - // sleepFile is used as a dummy I/O op to mitigate unnecessary CPU usage - // (tried many I/O sync ops, writeFileSync() seems to be only one that is effective in reducing - // CPU usage, though apparently not so much on Windows) - while (!fs.existsSync(codeFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } - while (!fs.existsSync(stdoutFile)) { updateStdout(); fs.writeFileSync(sleepFile, 'a'); } - } - - // At this point codeFile exists, but it's not necessarily flushed yet. - // Keep reading it until it is. - var code = parseInt('', 10); - while (isNaN(code)) { - code = parseInt(fs.readFileSync(codeFile, 'utf8'), 10); - } - - var stdout = fs.readFileSync(stdoutFile, 'utf8'); - - // No biggie if we can't erase the files now -- they're in a temp dir anyway - try { common.unlinkSync(scriptFile); } catch(e) {} - try { common.unlinkSync(stdoutFile); } catch(e) {} - try { common.unlinkSync(codeFile); } catch(e) {} - try { common.unlinkSync(sleepFile); } catch(e) {} - - // some shell return codes are defined as errors, per http://tldp.org/LDP/abs/html/exitcodes.html - if (code === 1 || code === 2 || code >= 126) { - common.error('', true); // unix/shell doesn't really give an error message after non-zero exit codes - } - // True if successful, false if not - var obj = { - code: code, - output: stdout - }; - return obj; -} // execSync() - -// Wrapper around exec() to enable echoing output to console in real time -function execAsync(cmd, opts, callback) { - var output = ''; - - var options = common.extend({ - silent: common.config.silent - }, opts); - - var c = child.exec(cmd, {env: process.env, maxBuffer: 20*1024*1024}, function(err) { - if (callback) - callback(err ? err.code : 0, output); - }); - - c.stdout.on('data', function(data) { - output += data; - if (!options.silent) - process.stdout.write(data); - }); - - c.stderr.on('data', function(data) { - output += data; - if (!options.silent) - process.stdout.write(data); - }); - - return c; -} - -//@ -//@ ### exec(command [, options] [, callback]) -//@ Available options (all `false` by default): -//@ -//@ + `async`: Asynchronous execution. Defaults to true if a callback is provided. -//@ + `silent`: Do not echo program output to console. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var version = exec('node --version', {silent:true}).output; -//@ -//@ var child = exec('some_long_running_process', {async:true}); -//@ child.stdout.on('data', function(data) { -//@ /* ... do something with data ... */ -//@ }); -//@ -//@ exec('some_long_running_process', function(code, output) { -//@ console.log('Exit code:', code); -//@ console.log('Program output:', output); -//@ }); -//@ ``` -//@ -//@ Executes the given `command` _synchronously_, unless otherwise specified. -//@ When in synchronous mode returns the object `{ code:..., output:... }`, containing the program's -//@ `output` (stdout + stderr) and its exit `code`. Otherwise returns the child process object, and -//@ the `callback` gets the arguments `(code, output)`. -//@ -//@ **Note:** For long-lived processes, it's best to run `exec()` asynchronously as -//@ the current synchronous implementation uses a lot of CPU. This should be getting -//@ fixed soon. -function _exec(command, options, callback) { - if (!command) - common.error('must specify command'); - - // Callback is defined instead of options. - if (typeof options === 'function') { - callback = options; - options = { async: true }; - } - - // Callback is defined with options. - if (typeof options === 'object' && typeof callback === 'function') { - options.async = true; - } - - options = common.extend({ - silent: common.config.silent, - async: false - }, options); - - if (options.async) - return execAsync(command, options, callback); - else - return execSync(command, options); -} -module.exports = _exec; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/find.js b/node_modules/cordova-android/node_modules/shelljs/src/find.js deleted file mode 100644 index d9eeec2..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/find.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require('fs'); -var common = require('./common'); -var _ls = require('./ls'); - -//@ -//@ ### find(path [,path ...]) -//@ ### find(path_array) -//@ Examples: -//@ -//@ ```javascript -//@ find('src', 'lib'); -//@ find(['src', 'lib']); // same as above -//@ find('.').filter(function(file) { return file.match(/\.js$/); }); -//@ ``` -//@ -//@ Returns array of all files (however deep) in the given paths. -//@ -//@ The main difference from `ls('-R', path)` is that the resulting file names -//@ include the base directories, e.g. `lib/resources/file1` instead of just `file1`. -function _find(options, paths) { - if (!paths) - common.error('no path specified'); - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - function pushFile(file) { - if (common.platform === 'win') - file = file.replace(/\\/g, '/'); - list.push(file); - } - - // why not simply do ls('-R', paths)? because the output wouldn't give the base dirs - // to get the base dir in the output, we need instead ls('-R', 'dir/*') for every directory - - paths.forEach(function(file) { - pushFile(file); - - if (fs.statSync(file).isDirectory()) { - _ls('-RA', file+'/*').forEach(function(subfile) { - pushFile(subfile); - }); - } - }); - - return list; -} -module.exports = _find; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/grep.js b/node_modules/cordova-android/node_modules/shelljs/src/grep.js deleted file mode 100644 index 00c7d6a..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/grep.js +++ /dev/null @@ -1,52 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### grep([options ,] regex_filter, file [, file ...]) -//@ ### grep([options ,] regex_filter, file_array) -//@ Available options: -//@ -//@ + `-v`: Inverse the sense of the regex and print the lines not matching the criteria. -//@ -//@ Examples: -//@ -//@ ```javascript -//@ grep('-v', 'GLOBAL_VARIABLE', '*.js'); -//@ grep('GLOBAL_VARIABLE', '*.js'); -//@ ``` -//@ -//@ Reads input string from given files and returns a string containing all lines of the -//@ file that match the given `regex_filter`. Wildcard `*` accepted. -function _grep(options, regex, files) { - options = common.parseOptions(options, { - 'v': 'inverse' - }); - - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 2); - // if it's array leave it as it is - - files = common.expand(files); - - var grep = ''; - files.forEach(function(file) { - if (!fs.existsSync(file)) { - common.error('no such file or directory: ' + file, true); - return; - } - - var contents = fs.readFileSync(file, 'utf8'), - lines = contents.split(/\r*\n/); - lines.forEach(function(line) { - var matched = line.match(regex); - if ((options.inverse && !matched) || (!options.inverse && matched)) - grep += line + '\n'; - }); - }); - - return common.ShellString(grep); -} -module.exports = _grep; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/ln.js b/node_modules/cordova-android/node_modules/shelljs/src/ln.js deleted file mode 100644 index a7b9701..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/ln.js +++ /dev/null @@ -1,53 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var common = require('./common'); -var os = require('os'); - -//@ -//@ ### ln(options, source, dest) -//@ ### ln(source, dest) -//@ Available options: -//@ -//@ + `s`: symlink -//@ + `f`: force -//@ -//@ Examples: -//@ -//@ ```javascript -//@ ln('file', 'newlink'); -//@ ln('-sf', 'file', 'existing'); -//@ ``` -//@ -//@ Links source to dest. Use -f to force the link, should dest already exist. -function _ln(options, source, dest) { - options = common.parseOptions(options, { - 's': 'symlink', - 'f': 'force' - }); - - if (!source || !dest) { - common.error('Missing and/or '); - } - - source = path.resolve(process.cwd(), String(source)); - dest = path.resolve(process.cwd(), String(dest)); - - if (!fs.existsSync(source)) { - common.error('Source file does not exist', true); - } - - if (fs.existsSync(dest)) { - if (!options.force) { - common.error('Destination file exists', true); - } - - fs.unlinkSync(dest); - } - - if (options.symlink) { - fs.symlinkSync(source, dest, os.platform() === "win32" ? "junction" : null); - } else { - fs.linkSync(source, dest, os.platform() === "win32" ? "junction" : null); - } -} -module.exports = _ln; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/ls.js b/node_modules/cordova-android/node_modules/shelljs/src/ls.js deleted file mode 100644 index 3345db4..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/ls.js +++ /dev/null @@ -1,126 +0,0 @@ -var path = require('path'); -var fs = require('fs'); -var common = require('./common'); -var _cd = require('./cd'); -var _pwd = require('./pwd'); - -//@ -//@ ### ls([options ,] path [,path ...]) -//@ ### ls([options ,] path_array) -//@ Available options: -//@ -//@ + `-R`: recursive -//@ + `-A`: all files (include files beginning with `.`, except for `.` and `..`) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ ls('projs/*.js'); -//@ ls('-R', '/users/me', '/tmp'); -//@ ls('-R', ['/users/me', '/tmp']); // same as above -//@ ``` -//@ -//@ Returns array of files in the given path, or in current directory if no path provided. -function _ls(options, paths) { - options = common.parseOptions(options, { - 'R': 'recursive', - 'A': 'all', - 'a': 'all_deprecated' - }); - - if (options.all_deprecated) { - // We won't support the -a option as it's hard to image why it's useful - // (it includes '.' and '..' in addition to '.*' files) - // For backwards compatibility we'll dump a deprecated message and proceed as before - common.log('ls: Option -a is deprecated. Use -A instead'); - options.all = true; - } - - if (!paths) - paths = ['.']; - else if (typeof paths === 'object') - paths = paths; // assume array - else if (typeof paths === 'string') - paths = [].slice.call(arguments, 1); - - var list = []; - - // Conditionally pushes file to list - returns true if pushed, false otherwise - // (e.g. prevents hidden files to be included unless explicitly told so) - function pushFile(file, query) { - // hidden file? - if (path.basename(file)[0] === '.') { - // not explicitly asking for hidden files? - if (!options.all && !(path.basename(query)[0] === '.' && path.basename(query).length > 1)) - return false; - } - - if (common.platform === 'win') - file = file.replace(/\\/g, '/'); - - list.push(file); - return true; - } - - paths.forEach(function(p) { - if (fs.existsSync(p)) { - var stats = fs.statSync(p); - // Simple file? - if (stats.isFile()) { - pushFile(p, p); - return; // continue - } - - // Simple dir? - if (stats.isDirectory()) { - // Iterate over p contents - fs.readdirSync(p).forEach(function(file) { - if (!pushFile(file, p)) - return; - - // Recursive? - if (options.recursive) { - var oldDir = _pwd(); - _cd('', p); - if (fs.statSync(file).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), file+'/*')); - _cd('', oldDir); - } - }); - return; // continue - } - } - - // p does not exist - possible wildcard present - - var basename = path.basename(p); - var dirname = path.dirname(p); - // Wildcard present on an existing dir? (e.g. '/tmp/*.js') - if (basename.search(/\*/) > -1 && fs.existsSync(dirname) && fs.statSync(dirname).isDirectory) { - // Escape special regular expression chars - var regexp = basename.replace(/(\^|\$|\(|\)|<|>|\[|\]|\{|\}|\.|\+|\?)/g, '\\$1'); - // Translates wildcard into regex - regexp = '^' + regexp.replace(/\*/g, '.*') + '$'; - // Iterate over directory contents - fs.readdirSync(dirname).forEach(function(file) { - if (file.match(new RegExp(regexp))) { - if (!pushFile(path.normalize(dirname+'/'+file), basename)) - return; - - // Recursive? - if (options.recursive) { - var pp = dirname + '/' + file; - if (fs.lstatSync(pp).isDirectory()) - list = list.concat(_ls('-R'+(options.all?'A':''), pp+'/*')); - } // recursive - } // if file matches - }); // forEach - return; - } - - common.error('no such file or directory: ' + p, true); - }); - - return list; -} -module.exports = _ls; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/mkdir.js b/node_modules/cordova-android/node_modules/shelljs/src/mkdir.js deleted file mode 100644 index 5a7088f..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/mkdir.js +++ /dev/null @@ -1,68 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// Recursively creates 'dir' -function mkdirSyncRecursive(dir) { - var baseDir = path.dirname(dir); - - // Base dir exists, no recursion necessary - if (fs.existsSync(baseDir)) { - fs.mkdirSync(dir, parseInt('0777', 8)); - return; - } - - // Base dir does not exist, go recursive - mkdirSyncRecursive(baseDir); - - // Base dir created, can create dir - fs.mkdirSync(dir, parseInt('0777', 8)); -} - -//@ -//@ ### mkdir([options ,] dir [, dir ...]) -//@ ### mkdir([options ,] dir_array) -//@ Available options: -//@ -//@ + `p`: full path (will create intermediate dirs if necessary) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mkdir('-p', '/tmp/a/b/c/d', '/tmp/e/f/g'); -//@ mkdir('-p', ['/tmp/a/b/c/d', '/tmp/e/f/g']); // same as above -//@ ``` -//@ -//@ Creates directories. -function _mkdir(options, dirs) { - options = common.parseOptions(options, { - 'p': 'fullpath' - }); - if (!dirs) - common.error('no paths given'); - - if (typeof dirs === 'string') - dirs = [].slice.call(arguments, 1); - // if it's array leave it as it is - - dirs.forEach(function(dir) { - if (fs.existsSync(dir)) { - if (!options.fullpath) - common.error('path already exists: ' + dir, true); - return; // skip dir - } - - // Base dir does not exist, and no -p option given - var baseDir = path.dirname(dir); - if (!fs.existsSync(baseDir) && !options.fullpath) { - common.error('no such file or directory: ' + baseDir, true); - return; // skip dir - } - - if (options.fullpath) - mkdirSyncRecursive(dir); - else - fs.mkdirSync(dir, parseInt('0777', 8)); - }); -} // mkdir -module.exports = _mkdir; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/mv.js b/node_modules/cordova-android/node_modules/shelljs/src/mv.js deleted file mode 100644 index 11f9607..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/mv.js +++ /dev/null @@ -1,80 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### mv(source [, source ...], dest') -//@ ### mv(source_array, dest') -//@ Available options: -//@ -//@ + `f`: force -//@ -//@ Examples: -//@ -//@ ```javascript -//@ mv('-f', 'file', 'dir/'); -//@ mv('file1', 'file2', 'dir/'); -//@ mv(['file1', 'file2'], 'dir/'); // same as above -//@ ``` -//@ -//@ Moves files. The wildcard `*` is accepted. -function _mv(options, sources, dest) { - options = common.parseOptions(options, { - 'f': 'force' - }); - - // Get sources, dest - if (arguments.length < 3) { - common.error('missing and/or '); - } else if (arguments.length > 3) { - sources = [].slice.call(arguments, 1, arguments.length - 1); - dest = arguments[arguments.length - 1]; - } else if (typeof sources === 'string') { - sources = [sources]; - } else if ('length' in sources) { - sources = sources; // no-op for array - } else { - common.error('invalid arguments'); - } - - sources = common.expand(sources); - - var exists = fs.existsSync(dest), - stats = exists && fs.statSync(dest); - - // Dest is not existing dir, but multiple sources given - if ((!exists || !stats.isDirectory()) && sources.length > 1) - common.error('dest is not a directory (too many sources)'); - - // Dest is an existing file, but no -f given - if (exists && stats.isFile() && !options.force) - common.error('dest file already exists: ' + dest); - - sources.forEach(function(src) { - if (!fs.existsSync(src)) { - common.error('no such file or directory: '+src, true); - return; // skip file - } - - // If here, src exists - - // When copying to '/path/dir': - // thisDest = '/path/dir/file1' - var thisDest = dest; - if (fs.existsSync(dest) && fs.statSync(dest).isDirectory()) - thisDest = path.normalize(dest + '/' + path.basename(src)); - - if (fs.existsSync(thisDest) && !options.force) { - common.error('dest file already exists: ' + thisDest, true); - return; // skip file - } - - if (path.resolve(src) === path.dirname(path.resolve(thisDest))) { - common.error('cannot move to self: '+src, true); - return; // skip file - } - - fs.renameSync(src, thisDest); - }); // forEach(src) -} // mv -module.exports = _mv; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/popd.js b/node_modules/cordova-android/node_modules/shelljs/src/popd.js deleted file mode 100644 index 11ea24f..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/popd.js +++ /dev/null @@ -1 +0,0 @@ -// see dirs.js \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/shelljs/src/pushd.js b/node_modules/cordova-android/node_modules/shelljs/src/pushd.js deleted file mode 100644 index 11ea24f..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/pushd.js +++ /dev/null @@ -1 +0,0 @@ -// see dirs.js \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/shelljs/src/pwd.js b/node_modules/cordova-android/node_modules/shelljs/src/pwd.js deleted file mode 100644 index 41727bb..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/pwd.js +++ /dev/null @@ -1,11 +0,0 @@ -var path = require('path'); -var common = require('./common'); - -//@ -//@ ### pwd() -//@ Returns the current directory. -function _pwd(options) { - var pwd = path.resolve(process.cwd()); - return common.ShellString(pwd); -} -module.exports = _pwd; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/rm.js b/node_modules/cordova-android/node_modules/shelljs/src/rm.js deleted file mode 100644 index bd608cb..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/rm.js +++ /dev/null @@ -1,163 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -// Recursively removes 'dir' -// Adapted from https://github.com/ryanmcgrath/wrench-js -// -// Copyright (c) 2010 Ryan McGrath -// Copyright (c) 2012 Artur Adib -// -// Licensed under the MIT License -// http://www.opensource.org/licenses/mit-license.php -function rmdirSyncRecursive(dir, force) { - var files; - - files = fs.readdirSync(dir); - - // Loop through and delete everything in the sub-tree after checking it - for(var i = 0; i < files.length; i++) { - var file = dir + "/" + files[i], - currFile = fs.lstatSync(file); - - if(currFile.isDirectory()) { // Recursive function back to the beginning - rmdirSyncRecursive(file, force); - } - - else if(currFile.isSymbolicLink()) { // Unlink symlinks - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - else // Assume it's a file - perhaps a try/catch belongs here? - if (force || isWriteable(file)) { - try { - common.unlinkSync(file); - } catch (e) { - common.error('could not remove file (code '+e.code+'): ' + file, true); - } - } - } - - // Now that we know everything in the sub-tree has been deleted, we can delete the main directory. - // Huzzah for the shopkeep. - - var result; - try { - // Retry on windows, sometimes it takes a little time before all the files in the directory are gone - var start = Date.now(); - while (true) { - try { - result = fs.rmdirSync(dir); - if (fs.existsSync(dir)) throw { code: "EAGAIN" } - break; - } catch(er) { - // In addition to error codes, also check if the directory still exists and loop again if true - if (process.platform === "win32" && (er.code === "ENOTEMPTY" || er.code === "EBUSY" || er.code === "EPERM" || er.code === "EAGAIN")) { - if (Date.now() - start > 1000) throw er; - } else if (er.code === "ENOENT") { - // Directory did not exist, deletion was successful - break; - } else { - throw er; - } - } - } - } catch(e) { - common.error('could not remove directory (code '+e.code+'): ' + dir, true); - } - - return result; -} // rmdirSyncRecursive - -// Hack to determine if file has write permissions for current user -// Avoids having to check user, group, etc, but it's probably slow -function isWriteable(file) { - var writePermission = true; - try { - var __fd = fs.openSync(file, 'a'); - fs.closeSync(__fd); - } catch(e) { - writePermission = false; - } - - return writePermission; -} - -//@ -//@ ### rm([options ,] file [, file ...]) -//@ ### rm([options ,] file_array) -//@ Available options: -//@ -//@ + `-f`: force -//@ + `-r, -R`: recursive -//@ -//@ Examples: -//@ -//@ ```javascript -//@ rm('-rf', '/tmp/*'); -//@ rm('some_file.txt', 'another_file.txt'); -//@ rm(['some_file.txt', 'another_file.txt']); // same as above -//@ ``` -//@ -//@ Removes files. The wildcard `*` is accepted. -function _rm(options, files) { - options = common.parseOptions(options, { - 'f': 'force', - 'r': 'recursive', - 'R': 'recursive' - }); - if (!files) - common.error('no paths given'); - - if (typeof files === 'string') - files = [].slice.call(arguments, 1); - // if it's array leave it as it is - - files = common.expand(files); - - files.forEach(function(file) { - if (!fs.existsSync(file)) { - // Path does not exist, no force flag given - if (!options.force) - common.error('no such file or directory: '+file, true); - - return; // skip file - } - - // If here, path exists - - var stats = fs.lstatSync(file); - if (stats.isFile() || stats.isSymbolicLink()) { - - // Do not check for file writing permissions - if (options.force) { - common.unlinkSync(file); - return; - } - - if (isWriteable(file)) - common.unlinkSync(file); - else - common.error('permission denied: '+file, true); - - return; - } // simple file - - // Path is an existing directory, but no -r flag given - if (stats.isDirectory() && !options.recursive) { - common.error('path is a directory', true); - return; // skip path - } - - // Recursively remove existing directory - if (stats.isDirectory() && options.recursive) { - rmdirSyncRecursive(file, options.force); - } - }); // forEach(file) -} // rm -module.exports = _rm; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/sed.js b/node_modules/cordova-android/node_modules/shelljs/src/sed.js deleted file mode 100644 index 65f7cb4..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/sed.js +++ /dev/null @@ -1,43 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### sed([options ,] search_regex, replacement, file) -//@ Available options: -//@ -//@ + `-i`: Replace contents of 'file' in-place. _Note that no backups will be created!_ -//@ -//@ Examples: -//@ -//@ ```javascript -//@ sed('-i', 'PROGRAM_VERSION', 'v0.1.3', 'source.js'); -//@ sed(/.*DELETE_THIS_LINE.*\n/, '', 'source.js'); -//@ ``` -//@ -//@ Reads an input string from `file` and performs a JavaScript `replace()` on the input -//@ using the given search regex and replacement string or function. Returns the new string after replacement. -function _sed(options, regex, replacement, file) { - options = common.parseOptions(options, { - 'i': 'inplace' - }); - - if (typeof replacement === 'string' || typeof replacement === 'function') - replacement = replacement; // no-op - else if (typeof replacement === 'number') - replacement = replacement.toString(); // fallback - else - common.error('invalid replacement string'); - - if (!file) - common.error('no file given'); - - if (!fs.existsSync(file)) - common.error('no such file or directory: ' + file); - - var result = fs.readFileSync(file, 'utf8').replace(regex, replacement); - if (options.inplace) - fs.writeFileSync(file, result, 'utf8'); - - return common.ShellString(result); -} -module.exports = _sed; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/tempdir.js b/node_modules/cordova-android/node_modules/shelljs/src/tempdir.js deleted file mode 100644 index 45953c2..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/tempdir.js +++ /dev/null @@ -1,56 +0,0 @@ -var common = require('./common'); -var os = require('os'); -var fs = require('fs'); - -// Returns false if 'dir' is not a writeable directory, 'dir' otherwise -function writeableDir(dir) { - if (!dir || !fs.existsSync(dir)) - return false; - - if (!fs.statSync(dir).isDirectory()) - return false; - - var testFile = dir+'/'+common.randomFileName(); - try { - fs.writeFileSync(testFile, ' '); - common.unlinkSync(testFile); - return dir; - } catch (e) { - return false; - } -} - - -//@ -//@ ### tempdir() -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var tmp = tempdir(); // "/tmp" for most *nix platforms -//@ ``` -//@ -//@ Searches and returns string containing a writeable, platform-dependent temporary directory. -//@ Follows Python's [tempfile algorithm](http://docs.python.org/library/tempfile.html#tempfile.tempdir). -function _tempDir() { - var state = common.state; - if (state.tempDir) - return state.tempDir; // from cache - - state.tempDir = writeableDir(os.tempDir && os.tempDir()) || // node 0.8+ - writeableDir(process.env['TMPDIR']) || - writeableDir(process.env['TEMP']) || - writeableDir(process.env['TMP']) || - writeableDir(process.env['Wimp$ScrapDir']) || // RiscOS - writeableDir('C:\\TEMP') || // Windows - writeableDir('C:\\TMP') || // Windows - writeableDir('\\TEMP') || // Windows - writeableDir('\\TMP') || // Windows - writeableDir('/tmp') || - writeableDir('/var/tmp') || - writeableDir('/usr/tmp') || - writeableDir('.'); // last resort - - return state.tempDir; -} -module.exports = _tempDir; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/test.js b/node_modules/cordova-android/node_modules/shelljs/src/test.js deleted file mode 100644 index 8a4ac7d..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/test.js +++ /dev/null @@ -1,85 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); - -//@ -//@ ### test(expression) -//@ Available expression primaries: -//@ -//@ + `'-b', 'path'`: true if path is a block device -//@ + `'-c', 'path'`: true if path is a character device -//@ + `'-d', 'path'`: true if path is a directory -//@ + `'-e', 'path'`: true if path exists -//@ + `'-f', 'path'`: true if path is a regular file -//@ + `'-L', 'path'`: true if path is a symboilc link -//@ + `'-p', 'path'`: true if path is a pipe (FIFO) -//@ + `'-S', 'path'`: true if path is a socket -//@ -//@ Examples: -//@ -//@ ```javascript -//@ if (test('-d', path)) { /* do something with dir */ }; -//@ if (!test('-f', path)) continue; // skip if it's a regular file -//@ ``` -//@ -//@ Evaluates expression using the available primaries and returns corresponding value. -function _test(options, path) { - if (!path) - common.error('no path given'); - - // hack - only works with unary primaries - options = common.parseOptions(options, { - 'b': 'block', - 'c': 'character', - 'd': 'directory', - 'e': 'exists', - 'f': 'file', - 'L': 'link', - 'p': 'pipe', - 'S': 'socket' - }); - - var canInterpret = false; - for (var key in options) - if (options[key] === true) { - canInterpret = true; - break; - } - - if (!canInterpret) - common.error('could not interpret expression'); - - if (options.link) { - try { - return fs.lstatSync(path).isSymbolicLink(); - } catch(e) { - return false; - } - } - - if (!fs.existsSync(path)) - return false; - - if (options.exists) - return true; - - var stats = fs.statSync(path); - - if (options.block) - return stats.isBlockDevice(); - - if (options.character) - return stats.isCharacterDevice(); - - if (options.directory) - return stats.isDirectory(); - - if (options.file) - return stats.isFile(); - - if (options.pipe) - return stats.isFIFO(); - - if (options.socket) - return stats.isSocket(); -} // test -module.exports = _test; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/to.js b/node_modules/cordova-android/node_modules/shelljs/src/to.js deleted file mode 100644 index f029999..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/to.js +++ /dev/null @@ -1,29 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.to(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').to('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirection operator `>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). _Like Unix redirections, `to()` will overwrite any existing file!_ -function _to(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.writeFileSync(file, this.toString(), 'utf8'); - } catch(e) { - common.error('could not write to file (code '+e.code+'): '+file, true); - } -} -module.exports = _to; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/toEnd.js b/node_modules/cordova-android/node_modules/shelljs/src/toEnd.js deleted file mode 100644 index f6d099d..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/toEnd.js +++ /dev/null @@ -1,29 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -//@ -//@ ### 'string'.toEnd(file) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ cat('input.txt').toEnd('output.txt'); -//@ ``` -//@ -//@ Analogous to the redirect-and-append operator `>>` in Unix, but works with JavaScript strings (such as -//@ those returned by `cat`, `grep`, etc). -function _toEnd(options, file) { - if (!file) - common.error('wrong arguments'); - - if (!fs.existsSync( path.dirname(file) )) - common.error('no such file or directory: ' + path.dirname(file)); - - try { - fs.appendFileSync(file, this.toString(), 'utf8'); - } catch(e) { - common.error('could not append to file (code '+e.code+'): '+file, true); - } -} -module.exports = _toEnd; diff --git a/node_modules/cordova-android/node_modules/shelljs/src/which.js b/node_modules/cordova-android/node_modules/shelljs/src/which.js deleted file mode 100644 index 2822ecf..0000000 --- a/node_modules/cordova-android/node_modules/shelljs/src/which.js +++ /dev/null @@ -1,83 +0,0 @@ -var common = require('./common'); -var fs = require('fs'); -var path = require('path'); - -// Cross-platform method for splitting environment PATH variables -function splitPath(p) { - for (i=1;i<2;i++) {} - - if (!p) - return []; - - if (common.platform === 'win') - return p.split(';'); - else - return p.split(':'); -} - -function checkPath(path) { - return fs.existsSync(path) && fs.statSync(path).isDirectory() == false; -} - -//@ -//@ ### which(command) -//@ -//@ Examples: -//@ -//@ ```javascript -//@ var nodeExec = which('node'); -//@ ``` -//@ -//@ Searches for `command` in the system's PATH. On Windows looks for `.exe`, `.cmd`, and `.bat` extensions. -//@ Returns string containing the absolute path to the command. -function _which(options, cmd) { - if (!cmd) - common.error('must specify command'); - - var pathEnv = process.env.path || process.env.Path || process.env.PATH, - pathArray = splitPath(pathEnv), - where = null; - - // No relative/absolute paths provided? - if (cmd.search(/\//) === -1) { - // Search for command in PATH - pathArray.forEach(function(dir) { - if (where) - return; // already found it - - var attempt = path.resolve(dir + '/' + cmd); - if (checkPath(attempt)) { - where = attempt; - return; - } - - if (common.platform === 'win') { - var baseAttempt = attempt; - attempt = baseAttempt + '.exe'; - if (checkPath(attempt)) { - where = attempt; - return; - } - attempt = baseAttempt + '.cmd'; - if (checkPath(attempt)) { - where = attempt; - return; - } - attempt = baseAttempt + '.bat'; - if (checkPath(attempt)) { - where = attempt; - return; - } - } // if 'win' - }); - } - - // Command not found anywhere? - if (!checkPath(cmd) && !where) - return null; - - where = where || path.resolve(cmd); - - return common.ShellString(where); -} -module.exports = _which; diff --git a/node_modules/cordova-android/node_modules/underscore/LICENSE b/node_modules/cordova-android/node_modules/underscore/LICENSE deleted file mode 100644 index dd25d80..0000000 --- a/node_modules/cordova-android/node_modules/underscore/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative -Reporters & Editors - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/underscore/README.md b/node_modules/cordova-android/node_modules/underscore/README.md deleted file mode 100644 index 69e8b56..0000000 --- a/node_modules/cordova-android/node_modules/underscore/README.md +++ /dev/null @@ -1,28 +0,0 @@ - __ - /\ \ __ - __ __ ___ \_\ \ __ _ __ ____ ___ ___ _ __ __ /\_\ ____ - /\ \/\ \ /' _ `\ /'_ \ /'__`\/\ __\/ ,__\ / ___\ / __`\/\ __\/'__`\ \/\ \ /',__\ - \ \ \_\ \/\ \/\ \/\ \ \ \/\ __/\ \ \//\__, `\/\ \__//\ \ \ \ \ \//\ __/ __ \ \ \/\__, `\ - \ \____/\ \_\ \_\ \___,_\ \____\\ \_\\/\____/\ \____\ \____/\ \_\\ \____\/\_\ _\ \ \/\____/ - \/___/ \/_/\/_/\/__,_ /\/____/ \/_/ \/___/ \/____/\/___/ \/_/ \/____/\/_//\ \_\ \/___/ - \ \____/ - \/___/ - -Underscore.js is a utility-belt library for JavaScript that provides -support for the usual functional suspects (each, map, reduce, filter...) -without extending any core JavaScript objects. - -For Docs, License, Tests, and pre-packed downloads, see: -http://underscorejs.org - -For support and questions, please use -[the gitter channel](https://gitter.im/jashkenas/underscore) -or [stackoverflow](http://stackoverflow.com/search?q=underscore.js) - -Underscore is an open-sourced component of DocumentCloud: -https://github.com/documentcloud - -Many thanks to our contributors: -https://github.com/jashkenas/underscore/contributors - -This project adheres to a [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. diff --git a/node_modules/cordova-android/node_modules/underscore/package.json b/node_modules/cordova-android/node_modules/underscore/package.json deleted file mode 100644 index 98f85cb..0000000 --- a/node_modules/cordova-android/node_modules/underscore/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "underscore@^1.8.3", - "_id": "underscore@1.9.1", - "_inBundle": true, - "_integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", - "_location": "/cordova-android/underscore", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "underscore@^1.8.3", - "name": "underscore", - "escapedName": "underscore", - "rawSpec": "^1.8.3", - "saveSpec": null, - "fetchSpec": "^1.8.3" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", - "_shasum": "06dce34a0e68a7babc29b365b8e74b8925203961", - "_spec": "underscore@^1.8.3", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Jeremy Ashkenas", - "email": "jeremy@documentcloud.org" - }, - "bugs": { - "url": "https://github.com/jashkenas/underscore/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "JavaScript's functional programming helper library.", - "devDependencies": { - "coveralls": "^2.11.2", - "docco": "*", - "eslint": "1.10.x", - "gzip-size-cli": "^1.0.0", - "karma": "^0.13.13", - "karma-qunit": "~2.0.1", - "nyc": "^2.1.3", - "pretty-bytes-cli": "^1.0.0", - "qunit": "^2.6.0", - "qunit-cli": "~0.2.0", - "uglify-js": "3.3.21" - }, - "files": [ - "underscore.js", - "underscore-min.js", - "underscore-min.js.map" - ], - "homepage": "http://underscorejs.org", - "keywords": [ - "util", - "functional", - "server", - "client", - "browser" - ], - "license": "MIT", - "main": "underscore.js", - "name": "underscore", - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/underscore.git" - }, - "scripts": { - "build": "npm run minify -- --source-map --source-map-url \" \" -o underscore-min.js", - "coverage": "nyc npm run test-node && nyc report", - "coveralls": "nyc npm run test-node && nyc report --reporter=text-lcov | coveralls", - "doc": "docco underscore.js", - "lint": "eslint underscore.js test/*.js", - "minify": "uglifyjs underscore.js -c \"evaluate=false\" --comments \"/ .*/\" -m", - "test": "npm run lint && npm run test-node", - "test-browser": "npm i karma-phantomjs-launcher && karma start", - "test-node": "qunit-cli test/*.js", - "weight": "npm run minify | gzip-size | pretty-bytes" - }, - "version": "1.9.1" -} diff --git a/node_modules/cordova-android/node_modules/underscore/underscore-min.js b/node_modules/cordova-android/node_modules/underscore/underscore-min.js deleted file mode 100644 index f2a20a5..0000000 --- a/node_modules/cordova-android/node_modules/underscore/underscore-min.js +++ /dev/null @@ -1,5 +0,0 @@ -// Underscore.js 1.9.1 -// http://underscorejs.org -// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. -!function(){var n="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||this||{},r=n._,e=Array.prototype,o=Object.prototype,s="undefined"!=typeof Symbol?Symbol.prototype:null,u=e.push,c=e.slice,p=o.toString,i=o.hasOwnProperty,t=Array.isArray,a=Object.keys,l=Object.create,f=function(){},h=function(n){return n instanceof h?n:this instanceof h?void(this._wrapped=n):new h(n)};"undefined"==typeof exports||exports.nodeType?n._=h:("undefined"!=typeof module&&!module.nodeType&&module.exports&&(exports=module.exports=h),exports._=h),h.VERSION="1.9.1";var v,y=function(u,i,n){if(void 0===i)return u;switch(null==n?3:n){case 1:return function(n){return u.call(i,n)};case 3:return function(n,r,t){return u.call(i,n,r,t)};case 4:return function(n,r,t,e){return u.call(i,n,r,t,e)}}return function(){return u.apply(i,arguments)}},d=function(n,r,t){return h.iteratee!==v?h.iteratee(n,r):null==n?h.identity:h.isFunction(n)?y(n,r,t):h.isObject(n)&&!h.isArray(n)?h.matcher(n):h.property(n)};h.iteratee=v=function(n,r){return d(n,r,1/0)};var g=function(u,i){return i=null==i?u.length-1:+i,function(){for(var n=Math.max(arguments.length-i,0),r=Array(n),t=0;t":">",'"':""","'":"'","`":"`"},P=h.invert(L),W=function(r){var t=function(n){return r[n]},n="(?:"+h.keys(r).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return n=null==n?"":""+n,e.test(n)?n.replace(u,t):n}};h.escape=W(L),h.unescape=W(P),h.result=function(n,r,t){h.isArray(r)||(r=[r]);var e=r.length;if(!e)return h.isFunction(t)?t.call(n):t;for(var u=0;u/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var J=/(.)^/,U={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},V=/\\|'|\r|\n|\u2028|\u2029/g,$=function(n){return"\\"+U[n]};h.template=function(i,n,r){!n&&r&&(n=r),n=h.defaults({},n,h.templateSettings);var t,e=RegExp([(n.escape||J).source,(n.interpolate||J).source,(n.evaluate||J).source].join("|")+"|$","g"),o=0,a="__p+='";i.replace(e,function(n,r,t,e,u){return a+=i.slice(o,u).replace(V,$),o=u+n.length,r?a+="'+\n((__t=("+r+"))==null?'':_.escape(__t))+\n'":t?a+="'+\n((__t=("+t+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",n.variable||(a="with(obj||{}){\n"+a+"}\n"),a="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{t=new Function(n.variable||"obj","_",a)}catch(n){throw n.source=a,n}var u=function(n){return t.call(this,n,h)},c=n.variable||"obj";return u.source="function("+c+"){\n"+a+"}",u},h.chain=function(n){var r=h(n);return r._chain=!0,r};var G=function(n,r){return n._chain?h(r).chain():r};h.mixin=function(t){return h.each(h.functions(t),function(n){var r=h[n]=t[n];h.prototype[n]=function(){var n=[this._wrapped];return u.apply(n,arguments),G(this,r.apply(h,n))}}),h},h.mixin(h),h.each(["pop","push","reverse","shift","sort","splice","unshift"],function(r){var t=e[r];h.prototype[r]=function(){var n=this._wrapped;return t.apply(n,arguments),"shift"!==r&&"splice"!==r||0!==n.length||delete n[0],G(this,n)}}),h.each(["concat","join","slice"],function(n){var r=e[n];h.prototype[n]=function(){return G(this,r.apply(this._wrapped,arguments))}}),h.prototype.value=function(){return this._wrapped},h.prototype.valueOf=h.prototype.toJSON=h.prototype.value,h.prototype.toString=function(){return String(this._wrapped)},"function"==typeof define&&define.amd&&define("underscore",[],function(){return h})}(); \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/underscore/underscore-min.js.map b/node_modules/cordova-android/node_modules/underscore/underscore-min.js.map deleted file mode 100644 index 3b6056b..0000000 --- a/node_modules/cordova-android/node_modules/underscore/underscore-min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["underscore.js"],"names":["root","self","global","this","previousUnderscore","_","ArrayProto","Array","prototype","ObjProto","Object","SymbolProto","Symbol","push","slice","toString","hasOwnProperty","nativeIsArray","isArray","nativeKeys","keys","nativeCreate","create","Ctor","obj","_wrapped","exports","nodeType","module","VERSION","builtinIteratee","optimizeCb","func","context","argCount","value","call","index","collection","accumulator","apply","arguments","cb","iteratee","identity","isFunction","isObject","matcher","property","Infinity","restArguments","startIndex","length","Math","max","rest","args","baseCreate","result","shallowProperty","key","has","path","deepGet","i","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","each","forEach","map","collect","results","currentKey","createReduce","dir","memo","initial","reducer","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","contains","includes","include","item","fromIndex","guard","values","indexOf","invoke","contextPath","method","pluck","where","attrs","findWhere","computed","lastComputed","v","min","shuffle","sample","n","random","clone","last","rand","temp","sortBy","criteria","sort","left","right","a","b","group","behavior","partition","groupBy","indexBy","countBy","reStrSymbol","toArray","isString","match","size","pass","first","head","take","array","tail","drop","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","j","len","without","otherArrays","difference","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","object","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","chunk","count","executeBound","sourceFunc","boundFunc","callingContext","bind","TypeError","bound","callArgs","concat","partial","boundArgs","placeholder","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","throttled","remaining","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","constructor","proto","prop","allKeys","mapObject","pairs","invert","functions","methods","names","createAssigner","keysFunc","defaults","source","l","extend","extendOwn","assign","eq","deepEq","keyInObj","pick","omit","String","props","tap","interceptor","isMatch","aStack","bStack","type","className","valueOf","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isElement","name","nodelist","document","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","&","<",">","\"","'","`","unescapeMap","createEscaper","escaper","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","\\","\r","\n","
","
","escapeRegExp","escapeChar","template","text","settings","oldSettings","render","offset","variable","Function","e","data","argument","chain","instance","_chain","chainResult","mixin","toJSON","define","amd"],"mappings":";;;;CAKC,WAQC,IAAIA,EAAsB,iBAARC,MAAoBA,KAAKA,OAASA,MAAQA,MACjC,iBAAVC,QAAsBA,OAAOA,SAAWA,QAAUA,QACzDC,MACA,GAGNC,EAAqBJ,EAAKK,EAG1BC,EAAaC,MAAMC,UAAWC,EAAWC,OAAOF,UAChDG,EAAgC,oBAAXC,OAAyBA,OAAOJ,UAAY,KAGjEK,EAAOP,EAAWO,KAClBC,EAAQR,EAAWQ,MACnBC,EAAWN,EAASM,SACpBC,EAAiBP,EAASO,eAI1BC,EAAgBV,MAAMW,QACtBC,EAAaT,OAAOU,KACpBC,EAAeX,OAAOY,OAGtBC,EAAO,aAGPlB,EAAI,SAASmB,GACf,OAAIA,aAAenB,EAAUmB,EACvBrB,gBAAgBE,OACtBF,KAAKsB,SAAWD,GADiB,IAAInB,EAAEmB,IASnB,oBAAXE,SAA2BA,QAAQC,SAM5C3B,EAAKK,EAAIA,GALY,oBAAVuB,SAA0BA,OAAOD,UAAYC,OAAOF,UAC7DA,QAAUE,OAAOF,QAAUrB,GAE7BqB,QAAQrB,EAAIA,GAMdA,EAAEwB,QAAU,QAKZ,IAmBIC,EAnBAC,EAAa,SAASC,EAAMC,EAASC,GACvC,QAAgB,IAAZD,EAAoB,OAAOD,EAC/B,OAAoB,MAAZE,EAAmB,EAAIA,GAC7B,KAAK,EAAG,OAAO,SAASC,GACtB,OAAOH,EAAKI,KAAKH,EAASE,IAG5B,KAAK,EAAG,OAAO,SAASA,EAAOE,EAAOC,GACpC,OAAON,EAAKI,KAAKH,EAASE,EAAOE,EAAOC,IAE1C,KAAK,EAAG,OAAO,SAASC,EAAaJ,EAAOE,EAAOC,GACjD,OAAON,EAAKI,KAAKH,EAASM,EAAaJ,EAAOE,EAAOC,IAGzD,OAAO,WACL,OAAON,EAAKQ,MAAMP,EAASQ,aAS3BC,EAAK,SAASP,EAAOF,EAASC,GAChC,OAAI7B,EAAEsC,WAAab,EAAwBzB,EAAEsC,SAASR,EAAOF,GAChD,MAATE,EAAsB9B,EAAEuC,SACxBvC,EAAEwC,WAAWV,GAAeJ,EAAWI,EAAOF,EAASC,GACvD7B,EAAEyC,SAASX,KAAW9B,EAAEa,QAAQiB,GAAe9B,EAAE0C,QAAQZ,GACtD9B,EAAE2C,SAASb,IAMpB9B,EAAEsC,SAAWb,EAAkB,SAASK,EAAOF,GAC7C,OAAOS,EAAGP,EAAOF,EAASgB,EAAAA,IAQ5B,IAAIC,EAAgB,SAASlB,EAAMmB,GAEjC,OADAA,EAA2B,MAAdA,EAAqBnB,EAAKoB,OAAS,GAAKD,EAC9C,WAIL,IAHA,IAAIC,EAASC,KAAKC,IAAIb,UAAUW,OAASD,EAAY,GACjDI,EAAOhD,MAAM6C,GACbf,EAAQ,EACLA,EAAQe,EAAQf,IACrBkB,EAAKlB,GAASI,UAAUJ,EAAQc,GAElC,OAAQA,GACN,KAAK,EAAG,OAAOnB,EAAKI,KAAKjC,KAAMoD,GAC/B,KAAK,EAAG,OAAOvB,EAAKI,KAAKjC,KAAMsC,UAAU,GAAIc,GAC7C,KAAK,EAAG,OAAOvB,EAAKI,KAAKjC,KAAMsC,UAAU,GAAIA,UAAU,GAAIc,GAE7D,IAAIC,EAAOjD,MAAM4C,EAAa,GAC9B,IAAKd,EAAQ,EAAGA,EAAQc,EAAYd,IAClCmB,EAAKnB,GAASI,UAAUJ,GAG1B,OADAmB,EAAKL,GAAcI,EACZvB,EAAKQ,MAAMrC,KAAMqD,KAKxBC,EAAa,SAASjD,GACxB,IAAKH,EAAEyC,SAAStC,GAAY,MAAO,GACnC,GAAIa,EAAc,OAAOA,EAAab,GACtCe,EAAKf,UAAYA,EACjB,IAAIkD,EAAS,IAAInC,EAEjB,OADAA,EAAKf,UAAY,KACVkD,GAGLC,EAAkB,SAASC,GAC7B,OAAO,SAASpC,GACd,OAAc,MAAPA,OAAc,EAASA,EAAIoC,KAIlCC,EAAM,SAASrC,EAAKsC,GACtB,OAAc,MAAPtC,GAAeR,EAAeoB,KAAKZ,EAAKsC,IAG7CC,EAAU,SAASvC,EAAKsC,GAE1B,IADA,IAAIV,EAASU,EAAKV,OACTY,EAAI,EAAGA,EAAIZ,EAAQY,IAAK,CAC/B,GAAW,MAAPxC,EAAa,OACjBA,EAAMA,EAAIsC,EAAKE,IAEjB,OAAOZ,EAAS5B,OAAM,GAOpByC,EAAkBZ,KAAKa,IAAI,EAAG,IAAM,EACpCC,EAAYR,EAAgB,UAC5BS,EAAc,SAAS9B,GACzB,IAAIc,EAASe,EAAU7B,GACvB,MAAwB,iBAAVc,GAAgC,GAAVA,GAAeA,GAAUa,GAS/D5D,EAAEgE,KAAOhE,EAAEiE,QAAU,SAAS9C,EAAKmB,EAAUV,GAE3C,IAAI+B,EAAGZ,EACP,GAFAT,EAAWZ,EAAWY,EAAUV,GAE5BmC,EAAY5C,GACd,IAAKwC,EAAI,EAAGZ,EAAS5B,EAAI4B,OAAQY,EAAIZ,EAAQY,IAC3CrB,EAASnB,EAAIwC,GAAIA,EAAGxC,OAEjB,CACL,IAAIJ,EAAOf,EAAEe,KAAKI,GAClB,IAAKwC,EAAI,EAAGZ,EAAShC,EAAKgC,OAAQY,EAAIZ,EAAQY,IAC5CrB,EAASnB,EAAIJ,EAAK4C,IAAK5C,EAAK4C,GAAIxC,GAGpC,OAAOA,GAITnB,EAAEkE,IAAMlE,EAAEmE,QAAU,SAAShD,EAAKmB,EAAUV,GAC1CU,EAAWD,EAAGC,EAAUV,GAIxB,IAHA,IAAIb,GAAQgD,EAAY5C,IAAQnB,EAAEe,KAAKI,GACnC4B,GAAUhC,GAAQI,GAAK4B,OACvBqB,EAAUlE,MAAM6C,GACXf,EAAQ,EAAGA,EAAQe,EAAQf,IAAS,CAC3C,IAAIqC,EAAatD,EAAOA,EAAKiB,GAASA,EACtCoC,EAAQpC,GAASM,EAASnB,EAAIkD,GAAaA,EAAYlD,GAEzD,OAAOiD,GAIT,IAAIE,EAAe,SAASC,GAkB1B,OAAO,SAASpD,EAAKmB,EAAUkC,EAAM5C,GACnC,IAAI6C,EAA8B,GAApBrC,UAAUW,OACxB,OAjBY,SAAS5B,EAAKmB,EAAUkC,EAAMC,GAC1C,IAAI1D,GAAQgD,EAAY5C,IAAQnB,EAAEe,KAAKI,GACnC4B,GAAUhC,GAAQI,GAAK4B,OACvBf,EAAc,EAANuC,EAAU,EAAIxB,EAAS,EAKnC,IAJK0B,IACHD,EAAOrD,EAAIJ,EAAOA,EAAKiB,GAASA,GAChCA,GAASuC,GAEK,GAATvC,GAAcA,EAAQe,EAAQf,GAASuC,EAAK,CACjD,IAAIF,EAAatD,EAAOA,EAAKiB,GAASA,EACtCwC,EAAOlC,EAASkC,EAAMrD,EAAIkD,GAAaA,EAAYlD,GAErD,OAAOqD,EAKAE,CAAQvD,EAAKO,EAAWY,EAAUV,EAAS,GAAI4C,EAAMC,KAMhEzE,EAAE2E,OAAS3E,EAAE4E,MAAQ5E,EAAE6E,OAASP,EAAa,GAG7CtE,EAAE8E,YAAc9E,EAAE+E,MAAQT,GAAc,GAGxCtE,EAAEgF,KAAOhF,EAAEiF,OAAS,SAAS9D,EAAK+D,EAAWtD,GAC3C,IACI2B,GADYQ,EAAY5C,GAAOnB,EAAEmF,UAAYnF,EAAEoF,SAC/BjE,EAAK+D,EAAWtD,GACpC,QAAY,IAAR2B,IAA2B,IAATA,EAAY,OAAOpC,EAAIoC,IAK/CvD,EAAEqF,OAASrF,EAAEsF,OAAS,SAASnE,EAAK+D,EAAWtD,GAC7C,IAAIwC,EAAU,GAKd,OAJAc,EAAY7C,EAAG6C,EAAWtD,GAC1B5B,EAAEgE,KAAK7C,EAAK,SAASW,EAAOE,EAAOuD,GAC7BL,EAAUpD,EAAOE,EAAOuD,IAAOnB,EAAQ5D,KAAKsB,KAE3CsC,GAITpE,EAAEwF,OAAS,SAASrE,EAAK+D,EAAWtD,GAClC,OAAO5B,EAAEqF,OAAOlE,EAAKnB,EAAEyF,OAAOpD,EAAG6C,IAAatD,IAKhD5B,EAAE0F,MAAQ1F,EAAE2F,IAAM,SAASxE,EAAK+D,EAAWtD,GACzCsD,EAAY7C,EAAG6C,EAAWtD,GAG1B,IAFA,IAAIb,GAAQgD,EAAY5C,IAAQnB,EAAEe,KAAKI,GACnC4B,GAAUhC,GAAQI,GAAK4B,OAClBf,EAAQ,EAAGA,EAAQe,EAAQf,IAAS,CAC3C,IAAIqC,EAAatD,EAAOA,EAAKiB,GAASA,EACtC,IAAKkD,EAAU/D,EAAIkD,GAAaA,EAAYlD,GAAM,OAAO,EAE3D,OAAO,GAKTnB,EAAE4F,KAAO5F,EAAE6F,IAAM,SAAS1E,EAAK+D,EAAWtD,GACxCsD,EAAY7C,EAAG6C,EAAWtD,GAG1B,IAFA,IAAIb,GAAQgD,EAAY5C,IAAQnB,EAAEe,KAAKI,GACnC4B,GAAUhC,GAAQI,GAAK4B,OAClBf,EAAQ,EAAGA,EAAQe,EAAQf,IAAS,CAC3C,IAAIqC,EAAatD,EAAOA,EAAKiB,GAASA,EACtC,GAAIkD,EAAU/D,EAAIkD,GAAaA,EAAYlD,GAAM,OAAO,EAE1D,OAAO,GAKTnB,EAAE8F,SAAW9F,EAAE+F,SAAW/F,EAAEgG,QAAU,SAAS7E,EAAK8E,EAAMC,EAAWC,GAGnE,OAFKpC,EAAY5C,KAAMA,EAAMnB,EAAEoG,OAAOjF,KACd,iBAAb+E,GAAyBC,KAAOD,EAAY,GACb,GAAnClG,EAAEqG,QAAQlF,EAAK8E,EAAMC,IAI9BlG,EAAEsG,OAASzD,EAAc,SAAS1B,EAAKsC,EAAMN,GAC3C,IAAIoD,EAAa5E,EAOjB,OANI3B,EAAEwC,WAAWiB,GACf9B,EAAO8B,EACEzD,EAAEa,QAAQ4C,KACnB8C,EAAc9C,EAAKhD,MAAM,GAAI,GAC7BgD,EAAOA,EAAKA,EAAKV,OAAS,IAErB/C,EAAEkE,IAAI/C,EAAK,SAASS,GACzB,IAAI4E,EAAS7E,EACb,IAAK6E,EAAQ,CAIX,GAHID,GAAeA,EAAYxD,SAC7BnB,EAAU8B,EAAQ9B,EAAS2E,IAEd,MAAX3E,EAAiB,OACrB4E,EAAS5E,EAAQ6B,GAEnB,OAAiB,MAAV+C,EAAiBA,EAASA,EAAOrE,MAAMP,EAASuB,OAK3DnD,EAAEyG,MAAQ,SAAStF,EAAKoC,GACtB,OAAOvD,EAAEkE,IAAI/C,EAAKnB,EAAE2C,SAASY,KAK/BvD,EAAE0G,MAAQ,SAASvF,EAAKwF,GACtB,OAAO3G,EAAEqF,OAAOlE,EAAKnB,EAAE0C,QAAQiE,KAKjC3G,EAAE4G,UAAY,SAASzF,EAAKwF,GAC1B,OAAO3G,EAAEgF,KAAK7D,EAAKnB,EAAE0C,QAAQiE,KAI/B3G,EAAEiD,IAAM,SAAS9B,EAAKmB,EAAUV,GAC9B,IACIE,EAAO+E,EADPxD,GAAUT,EAAAA,EAAUkE,GAAgBlE,EAAAA,EAExC,GAAgB,MAAZN,GAAuC,iBAAZA,GAAyC,iBAAVnB,EAAI,IAAyB,MAAPA,EAElF,IAAK,IAAIwC,EAAI,EAAGZ,GADhB5B,EAAM4C,EAAY5C,GAAOA,EAAMnB,EAAEoG,OAAOjF,IACX4B,OAAQY,EAAIZ,EAAQY,IAElC,OADb7B,EAAQX,EAAIwC,KACiBN,EAARvB,IACnBuB,EAASvB,QAIbQ,EAAWD,EAAGC,EAAUV,GACxB5B,EAAEgE,KAAK7C,EAAK,SAAS4F,EAAG/E,EAAOuD,GAC7BsB,EAAWvE,EAASyE,EAAG/E,EAAOuD,IACfuB,EAAXD,GAA2BA,KAAcjE,EAAAA,GAAYS,KAAYT,EAAAA,KACnES,EAAS0D,EACTD,EAAeD,KAIrB,OAAOxD,GAITrD,EAAEgH,IAAM,SAAS7F,EAAKmB,EAAUV,GAC9B,IACIE,EAAO+E,EADPxD,EAAST,EAAAA,EAAUkE,EAAelE,EAAAA,EAEtC,GAAgB,MAAZN,GAAuC,iBAAZA,GAAyC,iBAAVnB,EAAI,IAAyB,MAAPA,EAElF,IAAK,IAAIwC,EAAI,EAAGZ,GADhB5B,EAAM4C,EAAY5C,GAAOA,EAAMnB,EAAEoG,OAAOjF,IACX4B,OAAQY,EAAIZ,EAAQY,IAElC,OADb7B,EAAQX,EAAIwC,KACS7B,EAAQuB,IAC3BA,EAASvB,QAIbQ,EAAWD,EAAGC,EAAUV,GACxB5B,EAAEgE,KAAK7C,EAAK,SAAS4F,EAAG/E,EAAOuD,KAC7BsB,EAAWvE,EAASyE,EAAG/E,EAAOuD,IACfuB,GAAgBD,IAAajE,EAAAA,GAAYS,IAAWT,EAAAA,KACjES,EAAS0D,EACTD,EAAeD,KAIrB,OAAOxD,GAITrD,EAAEiH,QAAU,SAAS9F,GACnB,OAAOnB,EAAEkH,OAAO/F,EAAKyB,EAAAA,IAOvB5C,EAAEkH,OAAS,SAAS/F,EAAKgG,EAAGhB,GAC1B,GAAS,MAALgB,GAAahB,EAEf,OADKpC,EAAY5C,KAAMA,EAAMnB,EAAEoG,OAAOjF,IAC/BA,EAAInB,EAAEoH,OAAOjG,EAAI4B,OAAS,IAEnC,IAAImE,EAASnD,EAAY5C,GAAOnB,EAAEqH,MAAMlG,GAAOnB,EAAEoG,OAAOjF,GACpD4B,EAASe,EAAUoD,GACvBC,EAAInE,KAAKC,IAAID,KAAKgE,IAAIG,EAAGpE,GAAS,GAElC,IADA,IAAIuE,EAAOvE,EAAS,EACXf,EAAQ,EAAGA,EAAQmF,EAAGnF,IAAS,CACtC,IAAIuF,EAAOvH,EAAEoH,OAAOpF,EAAOsF,GACvBE,EAAON,EAAOlF,GAClBkF,EAAOlF,GAASkF,EAAOK,GACvBL,EAAOK,GAAQC,EAEjB,OAAON,EAAOzG,MAAM,EAAG0G,IAIzBnH,EAAEyH,OAAS,SAAStG,EAAKmB,EAAUV,GACjC,IAAII,EAAQ,EAEZ,OADAM,EAAWD,EAAGC,EAAUV,GACjB5B,EAAEyG,MAAMzG,EAAEkE,IAAI/C,EAAK,SAASW,EAAOyB,EAAKgC,GAC7C,MAAO,CACLzD,MAAOA,EACPE,MAAOA,IACP0F,SAAUpF,EAASR,EAAOyB,EAAKgC,MAEhCoC,KAAK,SAASC,EAAMC,GACrB,IAAIC,EAAIF,EAAKF,SACTK,EAAIF,EAAMH,SACd,GAAII,IAAMC,EAAG,CACX,GAAQA,EAAJD,QAAe,IAANA,EAAc,OAAO,EAClC,GAAIA,EAAIC,QAAW,IAANA,EAAc,OAAQ,EAErC,OAAOH,EAAK5F,MAAQ6F,EAAM7F,QACxB,UAIN,IAAIgG,EAAQ,SAASC,EAAUC,GAC7B,OAAO,SAAS/G,EAAKmB,EAAUV,GAC7B,IAAIyB,EAAS6E,EAAY,CAAC,GAAI,IAAM,GAMpC,OALA5F,EAAWD,EAAGC,EAAUV,GACxB5B,EAAEgE,KAAK7C,EAAK,SAASW,EAAOE,GAC1B,IAAIuB,EAAMjB,EAASR,EAAOE,EAAOb,GACjC8G,EAAS5E,EAAQvB,EAAOyB,KAEnBF,IAMXrD,EAAEmI,QAAUH,EAAM,SAAS3E,EAAQvB,EAAOyB,GACpCC,EAAIH,EAAQE,GAAMF,EAAOE,GAAK/C,KAAKsB,GAAauB,EAAOE,GAAO,CAACzB,KAKrE9B,EAAEoI,QAAUJ,EAAM,SAAS3E,EAAQvB,EAAOyB,GACxCF,EAAOE,GAAOzB,IAMhB9B,EAAEqI,QAAUL,EAAM,SAAS3E,EAAQvB,EAAOyB,GACpCC,EAAIH,EAAQE,GAAMF,EAAOE,KAAaF,EAAOE,GAAO,IAG1D,IAAI+E,EAAc,mEAElBtI,EAAEuI,QAAU,SAASpH,GACnB,OAAKA,EACDnB,EAAEa,QAAQM,GAAaV,EAAMsB,KAAKZ,GAClCnB,EAAEwI,SAASrH,GAENA,EAAIsH,MAAMH,GAEfvE,EAAY5C,GAAanB,EAAEkE,IAAI/C,EAAKnB,EAAEuC,UACnCvC,EAAEoG,OAAOjF,GAPC,IAWnBnB,EAAE0I,KAAO,SAASvH,GAChB,OAAW,MAAPA,EAAoB,EACjB4C,EAAY5C,GAAOA,EAAI4B,OAAS/C,EAAEe,KAAKI,GAAK4B,QAKrD/C,EAAEkI,UAAYF,EAAM,SAAS3E,EAAQvB,EAAO6G,GAC1CtF,EAAOsF,EAAO,EAAI,GAAGnI,KAAKsB,KACzB,GAQH9B,EAAE4I,MAAQ5I,EAAE6I,KAAO7I,EAAE8I,KAAO,SAASC,EAAO5B,EAAGhB,GAC7C,OAAa,MAAT4C,GAAiBA,EAAMhG,OAAS,EAAe,MAALoE,OAAY,EAAS,GAC1D,MAALA,GAAahB,EAAc4C,EAAM,GAC9B/I,EAAEyE,QAAQsE,EAAOA,EAAMhG,OAASoE,IAMzCnH,EAAEyE,QAAU,SAASsE,EAAO5B,EAAGhB,GAC7B,OAAO1F,EAAMsB,KAAKgH,EAAO,EAAG/F,KAAKC,IAAI,EAAG8F,EAAMhG,QAAe,MAALoE,GAAahB,EAAQ,EAAIgB,MAKnFnH,EAAEsH,KAAO,SAASyB,EAAO5B,EAAGhB,GAC1B,OAAa,MAAT4C,GAAiBA,EAAMhG,OAAS,EAAe,MAALoE,OAAY,EAAS,GAC1D,MAALA,GAAahB,EAAc4C,EAAMA,EAAMhG,OAAS,GAC7C/C,EAAEkD,KAAK6F,EAAO/F,KAAKC,IAAI,EAAG8F,EAAMhG,OAASoE,KAMlDnH,EAAEkD,KAAOlD,EAAEgJ,KAAOhJ,EAAEiJ,KAAO,SAASF,EAAO5B,EAAGhB,GAC5C,OAAO1F,EAAMsB,KAAKgH,EAAY,MAAL5B,GAAahB,EAAQ,EAAIgB,IAIpDnH,EAAEkJ,QAAU,SAASH,GACnB,OAAO/I,EAAEqF,OAAO0D,EAAOI,UAIzB,IAAIC,EAAU,SAASC,EAAOC,EAASC,EAAQC,GAG7C,IADA,IAAIC,GADJD,EAASA,GAAU,IACFzG,OACRY,EAAI,EAAGZ,EAASe,EAAUuF,GAAQ1F,EAAIZ,EAAQY,IAAK,CAC1D,IAAI7B,EAAQuH,EAAM1F,GAClB,GAAII,EAAYjC,KAAW9B,EAAEa,QAAQiB,IAAU9B,EAAE0J,YAAY5H,IAE3D,GAAIwH,EAEF,IADA,IAAIK,EAAI,EAAGC,EAAM9H,EAAMiB,OAChB4G,EAAIC,GAAKJ,EAAOC,KAAS3H,EAAM6H,UAEtCP,EAAQtH,EAAOwH,EAASC,EAAQC,GAChCC,EAAMD,EAAOzG,YAELwG,IACVC,EAAOC,KAAS3H,GAGpB,OAAO0H,GAITxJ,EAAEoJ,QAAU,SAASL,EAAOO,GAC1B,OAAOF,EAAQL,EAAOO,GAAS,IAIjCtJ,EAAE6J,QAAUhH,EAAc,SAASkG,EAAOe,GACxC,OAAO9J,EAAE+J,WAAWhB,EAAOe,KAS7B9J,EAAEgK,KAAOhK,EAAEiK,OAAS,SAASlB,EAAOmB,EAAU5H,EAAUV,GACjD5B,EAAEmK,UAAUD,KACftI,EAAUU,EACVA,EAAW4H,EACXA,GAAW,GAEG,MAAZ5H,IAAkBA,EAAWD,EAAGC,EAAUV,IAG9C,IAFA,IAAIyB,EAAS,GACT+G,EAAO,GACFzG,EAAI,EAAGZ,EAASe,EAAUiF,GAAQpF,EAAIZ,EAAQY,IAAK,CAC1D,IAAI7B,EAAQiH,EAAMpF,GACdkD,EAAWvE,EAAWA,EAASR,EAAO6B,EAAGoF,GAASjH,EAClDoI,IAAa5H,GACVqB,GAAKyG,IAASvD,GAAUxD,EAAO7C,KAAKsB,GACzCsI,EAAOvD,GACEvE,EACJtC,EAAE8F,SAASsE,EAAMvD,KACpBuD,EAAK5J,KAAKqG,GACVxD,EAAO7C,KAAKsB,IAEJ9B,EAAE8F,SAASzC,EAAQvB,IAC7BuB,EAAO7C,KAAKsB,GAGhB,OAAOuB,GAKTrD,EAAEqK,MAAQxH,EAAc,SAASyH,GAC/B,OAAOtK,EAAEgK,KAAKZ,EAAQkB,GAAQ,GAAM,MAKtCtK,EAAEuK,aAAe,SAASxB,GAGxB,IAFA,IAAI1F,EAAS,GACTmH,EAAapI,UAAUW,OAClBY,EAAI,EAAGZ,EAASe,EAAUiF,GAAQpF,EAAIZ,EAAQY,IAAK,CAC1D,IAAIsC,EAAO8C,EAAMpF,GACjB,IAAI3D,EAAE8F,SAASzC,EAAQ4C,GAAvB,CACA,IAAI0D,EACJ,IAAKA,EAAI,EAAGA,EAAIa,GACTxK,EAAE8F,SAAS1D,UAAUuH,GAAI1D,GADJ0D,KAGxBA,IAAMa,GAAYnH,EAAO7C,KAAKyF,IAEpC,OAAO5C,GAKTrD,EAAE+J,WAAalH,EAAc,SAASkG,EAAO7F,GAE3C,OADAA,EAAOkG,EAAQlG,GAAM,GAAM,GACpBlD,EAAEqF,OAAO0D,EAAO,SAASjH,GAC9B,OAAQ9B,EAAE8F,SAAS5C,EAAMpB,OAM7B9B,EAAEyK,MAAQ,SAAS1B,GAIjB,IAHA,IAAIhG,EAASgG,GAAS/I,EAAEiD,IAAI8F,EAAOjF,GAAWf,QAAU,EACpDM,EAASnD,MAAM6C,GAEVf,EAAQ,EAAGA,EAAQe,EAAQf,IAClCqB,EAAOrB,GAAShC,EAAEyG,MAAMsC,EAAO/G,GAEjC,OAAOqB,GAKTrD,EAAE0K,IAAM7H,EAAc7C,EAAEyK,OAKxBzK,EAAE2K,OAAS,SAASpF,EAAMa,GAExB,IADA,IAAI/C,EAAS,GACJM,EAAI,EAAGZ,EAASe,EAAUyB,GAAO5B,EAAIZ,EAAQY,IAChDyC,EACF/C,EAAOkC,EAAK5B,IAAMyC,EAAOzC,GAEzBN,EAAOkC,EAAK5B,GAAG,IAAM4B,EAAK5B,GAAG,GAGjC,OAAON,GAIT,IAAIuH,EAA6B,SAASrG,GACxC,OAAO,SAASwE,EAAO7D,EAAWtD,GAChCsD,EAAY7C,EAAG6C,EAAWtD,GAG1B,IAFA,IAAImB,EAASe,EAAUiF,GACnB/G,EAAc,EAANuC,EAAU,EAAIxB,EAAS,EACnB,GAATf,GAAcA,EAAQe,EAAQf,GAASuC,EAC5C,GAAIW,EAAU6D,EAAM/G,GAAQA,EAAO+G,GAAQ,OAAO/G,EAEpD,OAAQ,IAKZhC,EAAEmF,UAAYyF,EAA2B,GACzC5K,EAAE6K,cAAgBD,GAA4B,GAI9C5K,EAAE8K,YAAc,SAAS/B,EAAO5H,EAAKmB,EAAUV,GAI7C,IAFA,IAAIE,GADJQ,EAAWD,EAAGC,EAAUV,EAAS,IACZT,GACjB4J,EAAM,EAAGC,EAAOlH,EAAUiF,GACvBgC,EAAMC,GAAM,CACjB,IAAIC,EAAMjI,KAAKkI,OAAOH,EAAMC,GAAQ,GAChC1I,EAASyG,EAAMkC,IAAQnJ,EAAOiJ,EAAME,EAAM,EAAQD,EAAOC,EAE/D,OAAOF,GAIT,IAAII,EAAoB,SAAS5G,EAAK6G,EAAeN,GACnD,OAAO,SAAS/B,EAAO9C,EAAMwD,GAC3B,IAAI9F,EAAI,EAAGZ,EAASe,EAAUiF,GAC9B,GAAkB,iBAAPU,EACC,EAANlF,EACFZ,EAAW,GAAP8F,EAAWA,EAAMzG,KAAKC,IAAIwG,EAAM1G,EAAQY,GAE5CZ,EAAgB,GAAP0G,EAAWzG,KAAKgE,IAAIyC,EAAM,EAAG1G,GAAU0G,EAAM1G,EAAS,OAE5D,GAAI+H,GAAerB,GAAO1G,EAE/B,OAAOgG,EADPU,EAAMqB,EAAY/B,EAAO9C,MACHA,EAAOwD,GAAO,EAEtC,GAAIxD,GAASA,EAEX,OAAc,IADdwD,EAAM2B,EAAc3K,EAAMsB,KAAKgH,EAAOpF,EAAGZ,GAAS/C,EAAEqL,QAClC5B,EAAM9F,GAAK,EAE/B,IAAK8F,EAAY,EAANlF,EAAUZ,EAAIZ,EAAS,EAAU,GAAP0G,GAAYA,EAAM1G,EAAQ0G,GAAOlF,EACpE,GAAIwE,EAAMU,KAASxD,EAAM,OAAOwD,EAElC,OAAQ,IAQZzJ,EAAEqG,QAAU8E,EAAkB,EAAGnL,EAAEmF,UAAWnF,EAAE8K,aAChD9K,EAAEsL,YAAcH,GAAmB,EAAGnL,EAAE6K,eAKxC7K,EAAEuL,MAAQ,SAASC,EAAOC,EAAMC,GAClB,MAARD,IACFA,EAAOD,GAAS,EAChBA,EAAQ,GAELE,IACHA,EAAOD,EAAOD,GAAS,EAAI,GAM7B,IAHA,IAAIzI,EAASC,KAAKC,IAAID,KAAK2I,MAAMF,EAAOD,GAASE,GAAO,GACpDH,EAAQrL,MAAM6C,GAET0G,EAAM,EAAGA,EAAM1G,EAAQ0G,IAAO+B,GAASE,EAC9CH,EAAM9B,GAAO+B,EAGf,OAAOD,GAKTvL,EAAE4L,MAAQ,SAAS7C,EAAO8C,GACxB,GAAa,MAATA,GAAiBA,EAAQ,EAAG,MAAO,GAGvC,IAFA,IAAIxI,EAAS,GACTM,EAAI,EAAGZ,EAASgG,EAAMhG,OACnBY,EAAIZ,GACTM,EAAO7C,KAAKC,EAAMsB,KAAKgH,EAAOpF,EAAGA,GAAKkI,IAExC,OAAOxI,GAQT,IAAIyI,EAAe,SAASC,EAAYC,EAAWpK,EAASqK,EAAgB9I,GAC1E,KAAM8I,aAA0BD,GAAY,OAAOD,EAAW5J,MAAMP,EAASuB,GAC7E,IAAIvD,EAAOwD,EAAW2I,EAAW5L,WAC7BkD,EAAS0I,EAAW5J,MAAMvC,EAAMuD,GACpC,OAAInD,EAAEyC,SAASY,GAAgBA,EACxBzD,GAMTI,EAAEkM,KAAOrJ,EAAc,SAASlB,EAAMC,EAASuB,GAC7C,IAAKnD,EAAEwC,WAAWb,GAAO,MAAM,IAAIwK,UAAU,qCAC7C,IAAIC,EAAQvJ,EAAc,SAASwJ,GACjC,OAAOP,EAAanK,EAAMyK,EAAOxK,EAAS9B,KAAMqD,EAAKmJ,OAAOD,MAE9D,OAAOD,IAOTpM,EAAEuM,QAAU1J,EAAc,SAASlB,EAAM6K,GACvC,IAAIC,EAAczM,EAAEuM,QAAQE,YACxBL,EAAQ,WAGV,IAFA,IAAIM,EAAW,EAAG3J,EAASyJ,EAAUzJ,OACjCI,EAAOjD,MAAM6C,GACRY,EAAI,EAAGA,EAAIZ,EAAQY,IAC1BR,EAAKQ,GAAK6I,EAAU7I,KAAO8I,EAAcrK,UAAUsK,KAAcF,EAAU7I,GAE7E,KAAO+I,EAAWtK,UAAUW,QAAQI,EAAK3C,KAAK4B,UAAUsK,MACxD,OAAOZ,EAAanK,EAAMyK,EAAOtM,KAAMA,KAAMqD,IAE/C,OAAOiJ,KAGTpM,EAAEuM,QAAQE,YAAczM,GAKtB2M,QAAU9J,EAAc,SAAS1B,EAAKJ,GAEtC,IAAIiB,GADJjB,EAAOqI,EAAQrI,GAAM,GAAO,IACXgC,OACjB,GAAIf,EAAQ,EAAG,MAAM,IAAI4K,MAAM,yCAC/B,KAAO5K,KAAS,CACd,IAAIuB,EAAMxC,EAAKiB,GACfb,EAAIoC,GAAOvD,EAAEkM,KAAK/K,EAAIoC,GAAMpC,MAKhCnB,EAAE6M,QAAU,SAASlL,EAAMmL,GACzB,IAAID,EAAU,SAAStJ,GACrB,IAAIwJ,EAAQF,EAAQE,MAChBC,EAAU,IAAMF,EAASA,EAAO3K,MAAMrC,KAAMsC,WAAamB,GAE7D,OADKC,EAAIuJ,EAAOC,KAAUD,EAAMC,GAAWrL,EAAKQ,MAAMrC,KAAMsC,YACrD2K,EAAMC,IAGf,OADAH,EAAQE,MAAQ,GACTF,GAKT7M,EAAEiN,MAAQpK,EAAc,SAASlB,EAAMuL,EAAM/J,GAC3C,OAAOgK,WAAW,WAChB,OAAOxL,EAAKQ,MAAM,KAAMgB,IACvB+J,KAKLlN,EAAEoN,MAAQpN,EAAEuM,QAAQvM,EAAEiN,MAAOjN,EAAG,GAOhCA,EAAEqN,SAAW,SAAS1L,EAAMuL,EAAMI,GAChC,IAAIC,EAAS3L,EAASuB,EAAME,EACxBmK,EAAW,EACVF,IAASA,EAAU,IAExB,IAAIG,EAAQ,WACVD,GAA+B,IAApBF,EAAQI,QAAoB,EAAI1N,EAAE2N,MAC7CJ,EAAU,KACVlK,EAAS1B,EAAKQ,MAAMP,EAASuB,GACxBoK,IAAS3L,EAAUuB,EAAO,OAG7ByK,EAAY,WACd,IAAID,EAAM3N,EAAE2N,MACPH,IAAgC,IAApBF,EAAQI,UAAmBF,EAAWG,GACvD,IAAIE,EAAYX,GAAQS,EAAMH,GAc9B,OAbA5L,EAAU9B,KACVqD,EAAOf,UACHyL,GAAa,GAAiBX,EAAZW,GAChBN,IACFO,aAAaP,GACbA,EAAU,MAEZC,EAAWG,EACXtK,EAAS1B,EAAKQ,MAAMP,EAASuB,GACxBoK,IAAS3L,EAAUuB,EAAO,OACrBoK,IAAgC,IAArBD,EAAQS,WAC7BR,EAAUJ,WAAWM,EAAOI,IAEvBxK,GAST,OANAuK,EAAUI,OAAS,WACjBF,aAAaP,GACbC,EAAW,EACXD,EAAU3L,EAAUuB,EAAO,MAGtByK,GAOT5N,EAAEiO,SAAW,SAAStM,EAAMuL,EAAMgB,GAChC,IAAIX,EAASlK,EAEToK,EAAQ,SAAS7L,EAASuB,GAC5BoK,EAAU,KACNpK,IAAME,EAAS1B,EAAKQ,MAAMP,EAASuB,KAGrCgL,EAAYtL,EAAc,SAASM,GAErC,GADIoK,GAASO,aAAaP,GACtBW,EAAW,CACb,IAAIE,GAAWb,EACfA,EAAUJ,WAAWM,EAAOP,GACxBkB,IAAS/K,EAAS1B,EAAKQ,MAAMrC,KAAMqD,SAEvCoK,EAAUvN,EAAEiN,MAAMQ,EAAOP,EAAMpN,KAAMqD,GAGvC,OAAOE,IAQT,OALA8K,EAAUH,OAAS,WACjBF,aAAaP,GACbA,EAAU,MAGLY,GAMTnO,EAAEqO,KAAO,SAAS1M,EAAM2M,GACtB,OAAOtO,EAAEuM,QAAQ+B,EAAS3M,IAI5B3B,EAAEyF,OAAS,SAASP,GAClB,OAAO,WACL,OAAQA,EAAU/C,MAAMrC,KAAMsC,aAMlCpC,EAAEuO,QAAU,WACV,IAAIpL,EAAOf,UACPoJ,EAAQrI,EAAKJ,OAAS,EAC1B,OAAO,WAGL,IAFA,IAAIY,EAAI6H,EACJnI,EAASF,EAAKqI,GAAOrJ,MAAMrC,KAAMsC,WAC9BuB,KAAKN,EAASF,EAAKQ,GAAG5B,KAAKjC,KAAMuD,GACxC,OAAOA,IAKXrD,EAAEwO,MAAQ,SAASC,EAAO9M,GACxB,OAAO,WACL,KAAM8M,EAAQ,EACZ,OAAO9M,EAAKQ,MAAMrC,KAAMsC,aAM9BpC,EAAE0O,OAAS,SAASD,EAAO9M,GACzB,IAAI6C,EACJ,OAAO,WAKL,OAJc,IAARiK,IACJjK,EAAO7C,EAAKQ,MAAMrC,KAAMsC,YAEtBqM,GAAS,IAAG9M,EAAO,MAChB6C,IAMXxE,EAAE2O,KAAO3O,EAAEuM,QAAQvM,EAAE0O,OAAQ,GAE7B1O,EAAE6C,cAAgBA,EAMlB,IAAI+L,GAAc,CAAClO,SAAU,MAAMmO,qBAAqB,YACpDC,EAAqB,CAAC,UAAW,gBAAiB,WACpD,uBAAwB,iBAAkB,kBAExCC,EAAsB,SAAS5N,EAAKJ,GACtC,IAAIiO,EAAaF,EAAmB/L,OAChCkM,EAAc9N,EAAI8N,YAClBC,EAAQlP,EAAEwC,WAAWyM,IAAgBA,EAAY9O,WAAaC,EAG9D+O,EAAO,cAGX,IAFI3L,EAAIrC,EAAKgO,KAAUnP,EAAE8F,SAAS/E,EAAMoO,IAAOpO,EAAKP,KAAK2O,GAElDH,MACLG,EAAOL,EAAmBE,MACd7N,GAAOA,EAAIgO,KAAUD,EAAMC,KAAUnP,EAAE8F,SAAS/E,EAAMoO,IAChEpO,EAAKP,KAAK2O,IAOhBnP,EAAEe,KAAO,SAASI,GAChB,IAAKnB,EAAEyC,SAAStB,GAAM,MAAO,GAC7B,GAAIL,EAAY,OAAOA,EAAWK,GAClC,IAAIJ,EAAO,GACX,IAAK,IAAIwC,KAAOpC,EAASqC,EAAIrC,EAAKoC,IAAMxC,EAAKP,KAAK+C,GAGlD,OADIqL,GAAYG,EAAoB5N,EAAKJ,GAClCA,GAITf,EAAEoP,QAAU,SAASjO,GACnB,IAAKnB,EAAEyC,SAAStB,GAAM,MAAO,GAC7B,IAAIJ,EAAO,GACX,IAAK,IAAIwC,KAAOpC,EAAKJ,EAAKP,KAAK+C,GAG/B,OADIqL,GAAYG,EAAoB5N,EAAKJ,GAClCA,GAITf,EAAEoG,OAAS,SAASjF,GAIlB,IAHA,IAAIJ,EAAOf,EAAEe,KAAKI,GACd4B,EAAShC,EAAKgC,OACdqD,EAASlG,MAAM6C,GACVY,EAAI,EAAGA,EAAIZ,EAAQY,IAC1ByC,EAAOzC,GAAKxC,EAAIJ,EAAK4C,IAEvB,OAAOyC,GAKTpG,EAAEqP,UAAY,SAASlO,EAAKmB,EAAUV,GACpCU,EAAWD,EAAGC,EAAUV,GAIxB,IAHA,IAAIb,EAAOf,EAAEe,KAAKI,GACd4B,EAAShC,EAAKgC,OACdqB,EAAU,GACLpC,EAAQ,EAAGA,EAAQe,EAAQf,IAAS,CAC3C,IAAIqC,EAAatD,EAAKiB,GACtBoC,EAAQC,GAAc/B,EAASnB,EAAIkD,GAAaA,EAAYlD,GAE9D,OAAOiD,GAKTpE,EAAEsP,MAAQ,SAASnO,GAIjB,IAHA,IAAIJ,EAAOf,EAAEe,KAAKI,GACd4B,EAAShC,EAAKgC,OACduM,EAAQpP,MAAM6C,GACTY,EAAI,EAAGA,EAAIZ,EAAQY,IAC1B2L,EAAM3L,GAAK,CAAC5C,EAAK4C,GAAIxC,EAAIJ,EAAK4C,KAEhC,OAAO2L,GAITtP,EAAEuP,OAAS,SAASpO,GAGlB,IAFA,IAAIkC,EAAS,GACTtC,EAAOf,EAAEe,KAAKI,GACTwC,EAAI,EAAGZ,EAAShC,EAAKgC,OAAQY,EAAIZ,EAAQY,IAChDN,EAAOlC,EAAIJ,EAAK4C,KAAO5C,EAAK4C,GAE9B,OAAON,GAKTrD,EAAEwP,UAAYxP,EAAEyP,QAAU,SAAStO,GACjC,IAAIuO,EAAQ,GACZ,IAAK,IAAInM,KAAOpC,EACVnB,EAAEwC,WAAWrB,EAAIoC,KAAOmM,EAAMlP,KAAK+C,GAEzC,OAAOmM,EAAM/H,QAIf,IAAIgI,EAAiB,SAASC,EAAUC,GACtC,OAAO,SAAS1O,GACd,IAAI4B,EAASX,UAAUW,OAEvB,GADI8M,IAAU1O,EAAMd,OAAOc,IACvB4B,EAAS,GAAY,MAAP5B,EAAa,OAAOA,EACtC,IAAK,IAAIa,EAAQ,EAAGA,EAAQe,EAAQf,IAIlC,IAHA,IAAI8N,EAAS1N,UAAUJ,GACnBjB,EAAO6O,EAASE,GAChBC,EAAIhP,EAAKgC,OACJY,EAAI,EAAGA,EAAIoM,EAAGpM,IAAK,CAC1B,IAAIJ,EAAMxC,EAAK4C,GACVkM,QAAyB,IAAb1O,EAAIoC,KAAiBpC,EAAIoC,GAAOuM,EAAOvM,IAG5D,OAAOpC,IAKXnB,EAAEgQ,OAASL,EAAe3P,EAAEoP,SAI5BpP,EAAEiQ,UAAYjQ,EAAEkQ,OAASP,EAAe3P,EAAEe,MAG1Cf,EAAEoF,QAAU,SAASjE,EAAK+D,EAAWtD,GACnCsD,EAAY7C,EAAG6C,EAAWtD,GAE1B,IADA,IAAwB2B,EAApBxC,EAAOf,EAAEe,KAAKI,GACTwC,EAAI,EAAGZ,EAAShC,EAAKgC,OAAQY,EAAIZ,EAAQY,IAEhD,GAAIuB,EAAU/D,EADdoC,EAAMxC,EAAK4C,IACaJ,EAAKpC,GAAM,OAAOoC,GAK9C,IA+EI4M,EAAIC,EA/EJC,EAAW,SAASvO,EAAOyB,EAAKpC,GAClC,OAAOoC,KAAOpC,GAIhBnB,EAAEsQ,KAAOzN,EAAc,SAAS1B,EAAKJ,GACnC,IAAIsC,EAAS,GAAIf,EAAWvB,EAAK,GACjC,GAAW,MAAPI,EAAa,OAAOkC,EACpBrD,EAAEwC,WAAWF,IACG,EAAdvB,EAAKgC,SAAYT,EAAWZ,EAAWY,EAAUvB,EAAK,KAC1DA,EAAOf,EAAEoP,QAAQjO,KAEjBmB,EAAW+N,EACXtP,EAAOqI,EAAQrI,GAAM,GAAO,GAC5BI,EAAMd,OAAOc,IAEf,IAAK,IAAIwC,EAAI,EAAGZ,EAAShC,EAAKgC,OAAQY,EAAIZ,EAAQY,IAAK,CACrD,IAAIJ,EAAMxC,EAAK4C,GACX7B,EAAQX,EAAIoC,GACZjB,EAASR,EAAOyB,EAAKpC,KAAMkC,EAAOE,GAAOzB,GAE/C,OAAOuB,IAITrD,EAAEuQ,KAAO1N,EAAc,SAAS1B,EAAKJ,GACnC,IAAwBa,EAApBU,EAAWvB,EAAK,GAUpB,OATIf,EAAEwC,WAAWF,IACfA,EAAWtC,EAAEyF,OAAOnD,GACF,EAAdvB,EAAKgC,SAAYnB,EAAUb,EAAK,MAEpCA,EAAOf,EAAEkE,IAAIkF,EAAQrI,GAAM,GAAO,GAAQyP,QAC1ClO,EAAW,SAASR,EAAOyB,GACzB,OAAQvD,EAAE8F,SAAS/E,EAAMwC,KAGtBvD,EAAEsQ,KAAKnP,EAAKmB,EAAUV,KAI/B5B,EAAE6P,SAAWF,EAAe3P,EAAEoP,SAAS,GAKvCpP,EAAEiB,OAAS,SAASd,EAAWsQ,GAC7B,IAAIpN,EAASD,EAAWjD,GAExB,OADIsQ,GAAOzQ,EAAEiQ,UAAU5M,EAAQoN,GACxBpN,GAITrD,EAAEqH,MAAQ,SAASlG,GACjB,OAAKnB,EAAEyC,SAAStB,GACTnB,EAAEa,QAAQM,GAAOA,EAAIV,QAAUT,EAAEgQ,OAAO,GAAI7O,GADtBA,GAO/BnB,EAAE0Q,IAAM,SAASvP,EAAKwP,GAEpB,OADAA,EAAYxP,GACLA,GAITnB,EAAE4Q,QAAU,SAASjG,EAAQhE,GAC3B,IAAI5F,EAAOf,EAAEe,KAAK4F,GAAQ5D,EAAShC,EAAKgC,OACxC,GAAc,MAAV4H,EAAgB,OAAQ5H,EAE5B,IADA,IAAI5B,EAAMd,OAAOsK,GACRhH,EAAI,EAAGA,EAAIZ,EAAQY,IAAK,CAC/B,IAAIJ,EAAMxC,EAAK4C,GACf,GAAIgD,EAAMpD,KAASpC,EAAIoC,MAAUA,KAAOpC,GAAM,OAAO,EAEvD,OAAO,GAMTgP,EAAK,SAASrI,EAAGC,EAAG8I,EAAQC,GAG1B,GAAIhJ,IAAMC,EAAG,OAAa,IAAND,GAAW,EAAIA,GAAM,EAAIC,EAE7C,GAAS,MAALD,GAAkB,MAALC,EAAW,OAAO,EAEnC,GAAID,GAAMA,EAAG,OAAOC,GAAMA,EAE1B,IAAIgJ,SAAcjJ,EAClB,OAAa,aAATiJ,GAAgC,WAATA,GAAiC,iBAALhJ,IAChDqI,EAAOtI,EAAGC,EAAG8I,EAAQC,IAI9BV,EAAS,SAAStI,EAAGC,EAAG8I,EAAQC,GAE1BhJ,aAAa9H,IAAG8H,EAAIA,EAAE1G,UACtB2G,aAAa/H,IAAG+H,EAAIA,EAAE3G,UAE1B,IAAI4P,EAAYtQ,EAASqB,KAAK+F,GAC9B,GAAIkJ,IAActQ,EAASqB,KAAKgG,GAAI,OAAO,EAC3C,OAAQiJ,GAEN,IAAK,kBAEL,IAAK,kBAGH,MAAO,GAAKlJ,GAAM,GAAKC,EACzB,IAAK,kBAGH,OAAKD,IAAOA,GAAWC,IAAOA,EAEhB,IAAND,EAAU,GAAKA,GAAM,EAAIC,GAAKD,IAAOC,EAC/C,IAAK,gBACL,IAAK,mBAIH,OAAQD,IAAOC,EACjB,IAAK,kBACH,OAAOzH,EAAY2Q,QAAQlP,KAAK+F,KAAOxH,EAAY2Q,QAAQlP,KAAKgG,GAGpE,IAAImJ,EAA0B,mBAAdF,EAChB,IAAKE,EAAW,CACd,GAAgB,iBAALpJ,GAA6B,iBAALC,EAAe,OAAO,EAIzD,IAAIoJ,EAAQrJ,EAAEmH,YAAamC,EAAQrJ,EAAEkH,YACrC,GAAIkC,IAAUC,KAAWpR,EAAEwC,WAAW2O,IAAUA,aAAiBA,GACxCnR,EAAEwC,WAAW4O,IAAUA,aAAiBA,IACzC,gBAAiBtJ,GAAK,gBAAiBC,EAC7D,OAAO,EASX+I,EAASA,GAAU,GAEnB,IADA,IAAI/N,GAFJ8N,EAASA,GAAU,IAEC9N,OACbA,KAGL,GAAI8N,EAAO9N,KAAY+E,EAAG,OAAOgJ,EAAO/N,KAAYgF,EAQtD,GAJA8I,EAAOrQ,KAAKsH,GACZgJ,EAAOtQ,KAAKuH,GAGRmJ,EAAW,CAGb,IADAnO,EAAS+E,EAAE/E,UACIgF,EAAEhF,OAAQ,OAAO,EAEhC,KAAOA,KACL,IAAKoN,EAAGrI,EAAE/E,GAASgF,EAAEhF,GAAS8N,EAAQC,GAAS,OAAO,MAEnD,CAEL,IAAsBvN,EAAlBxC,EAAOf,EAAEe,KAAK+G,GAGlB,GAFA/E,EAAShC,EAAKgC,OAEV/C,EAAEe,KAAKgH,GAAGhF,SAAWA,EAAQ,OAAO,EACxC,KAAOA,KAGL,GADAQ,EAAMxC,EAAKgC,IACLS,EAAIuE,EAAGxE,KAAQ4M,EAAGrI,EAAEvE,GAAMwE,EAAExE,GAAMsN,EAAQC,GAAU,OAAO,EAMrE,OAFAD,EAAOQ,MACPP,EAAOO,OACA,GAITrR,EAAEsR,QAAU,SAASxJ,EAAGC,GACtB,OAAOoI,EAAGrI,EAAGC,IAKf/H,EAAEuR,QAAU,SAASpQ,GACnB,OAAW,MAAPA,IACA4C,EAAY5C,KAASnB,EAAEa,QAAQM,IAAQnB,EAAEwI,SAASrH,IAAQnB,EAAE0J,YAAYvI,IAA6B,IAAfA,EAAI4B,OAChE,IAAvB/C,EAAEe,KAAKI,GAAK4B,SAIrB/C,EAAEwR,UAAY,SAASrQ,GACrB,SAAUA,GAAwB,IAAjBA,EAAIG,WAKvBtB,EAAEa,QAAUD,GAAiB,SAASO,GACpC,MAA8B,mBAAvBT,EAASqB,KAAKZ,IAIvBnB,EAAEyC,SAAW,SAAStB,GACpB,IAAI4P,SAAc5P,EAClB,MAAgB,aAAT4P,GAAgC,WAATA,KAAuB5P,GAIvDnB,EAAEgE,KAAK,CAAC,YAAa,WAAY,SAAU,SAAU,OAAQ,SAAU,QAAS,SAAU,MAAO,UAAW,MAAO,WAAY,SAASyN,GACtIzR,EAAE,KAAOyR,GAAQ,SAAStQ,GACxB,OAAOT,EAASqB,KAAKZ,KAAS,WAAasQ,EAAO,OAMjDzR,EAAE0J,YAAYtH,aACjBpC,EAAE0J,YAAc,SAASvI,GACvB,OAAOqC,EAAIrC,EAAK,YAMpB,IAAIuQ,EAAW/R,EAAKgS,UAAYhS,EAAKgS,SAASC,WAC5B,kBAAP,KAAyC,iBAAbC,WAA4C,mBAAZH,IACrE1R,EAAEwC,WAAa,SAASrB,GACtB,MAAqB,mBAAPA,IAAqB,IAKvCnB,EAAE8R,SAAW,SAAS3Q,GACpB,OAAQnB,EAAE+R,SAAS5Q,IAAQ2Q,SAAS3Q,KAASkK,MAAM2G,WAAW7Q,KAIhEnB,EAAEqL,MAAQ,SAASlK,GACjB,OAAOnB,EAAEiS,SAAS9Q,IAAQkK,MAAMlK,IAIlCnB,EAAEmK,UAAY,SAAShJ,GACrB,OAAe,IAARA,IAAwB,IAARA,GAAwC,qBAAvBT,EAASqB,KAAKZ,IAIxDnB,EAAEkS,OAAS,SAAS/Q,GAClB,OAAe,OAARA,GAITnB,EAAEmS,YAAc,SAAShR,GACvB,YAAe,IAARA,GAKTnB,EAAEwD,IAAM,SAASrC,EAAKsC,GACpB,IAAKzD,EAAEa,QAAQ4C,GACb,OAAOD,EAAIrC,EAAKsC,GAGlB,IADA,IAAIV,EAASU,EAAKV,OACTY,EAAI,EAAGA,EAAIZ,EAAQY,IAAK,CAC/B,IAAIJ,EAAME,EAAKE,GACf,GAAW,MAAPxC,IAAgBR,EAAeoB,KAAKZ,EAAKoC,GAC3C,OAAO,EAETpC,EAAMA,EAAIoC,GAEZ,QAASR,GAQX/C,EAAEoS,WAAa,WAEb,OADAzS,EAAKK,EAAID,EACFD,MAITE,EAAEuC,SAAW,SAAST,GACpB,OAAOA,GAIT9B,EAAEqS,SAAW,SAASvQ,GACpB,OAAO,WACL,OAAOA,IAIX9B,EAAEsS,KAAO,aAITtS,EAAE2C,SAAW,SAASc,GACpB,OAAKzD,EAAEa,QAAQ4C,GAGR,SAAStC,GACd,OAAOuC,EAAQvC,EAAKsC,IAHbH,EAAgBG,IAQ3BzD,EAAEuS,WAAa,SAASpR,GACtB,OAAW,MAAPA,EACK,aAEF,SAASsC,GACd,OAAQzD,EAAEa,QAAQ4C,GAAoBC,EAAQvC,EAAKsC,GAAzBtC,EAAIsC,KAMlCzD,EAAE0C,QAAU1C,EAAEwS,QAAU,SAAS7L,GAE/B,OADAA,EAAQ3G,EAAEiQ,UAAU,GAAItJ,GACjB,SAASxF,GACd,OAAOnB,EAAE4Q,QAAQzP,EAAKwF,KAK1B3G,EAAEyO,MAAQ,SAAStH,EAAG7E,EAAUV,GAC9B,IAAI6Q,EAAQvS,MAAM8C,KAAKC,IAAI,EAAGkE,IAC9B7E,EAAWZ,EAAWY,EAAUV,EAAS,GACzC,IAAK,IAAI+B,EAAI,EAAGA,EAAIwD,EAAGxD,IAAK8O,EAAM9O,GAAKrB,EAASqB,GAChD,OAAO8O,GAITzS,EAAEoH,OAAS,SAASJ,EAAK/D,GAKvB,OAJW,MAAPA,IACFA,EAAM+D,EACNA,EAAM,GAEDA,EAAMhE,KAAKkI,MAAMlI,KAAKoE,UAAYnE,EAAM+D,EAAM,KAIvDhH,EAAE2N,IAAM+E,KAAK/E,KAAO,WAClB,OAAO,IAAI+E,MAAOC,WAIpB,IAAIC,EAAY,CACdC,IAAK,QACLC,IAAK,OACLC,IAAK,OACLC,IAAK,SACLC,IAAK,SACLC,IAAK,UAEHC,EAAcnT,EAAEuP,OAAOqD,GAGvBQ,EAAgB,SAASlP,GAC3B,IAAImP,EAAU,SAAS5K,GACrB,OAAOvE,EAAIuE,IAGTqH,EAAS,MAAQ9P,EAAEe,KAAKmD,GAAKoP,KAAK,KAAO,IACzCC,EAAaC,OAAO1D,GACpB2D,EAAgBD,OAAO1D,EAAQ,KACnC,OAAO,SAAS4D,GAEd,OADAA,EAAmB,MAAVA,EAAiB,GAAK,GAAKA,EAC7BH,EAAWI,KAAKD,GAAUA,EAAOE,QAAQH,EAAeJ,GAAWK,IAG9E1T,EAAE6T,OAAST,EAAcR,GACzB5S,EAAE8T,SAAWV,EAAcD,GAK3BnT,EAAEqD,OAAS,SAASlC,EAAKsC,EAAMsQ,GACxB/T,EAAEa,QAAQ4C,KAAOA,EAAO,CAACA,IAC9B,IAAIV,EAASU,EAAKV,OAClB,IAAKA,EACH,OAAO/C,EAAEwC,WAAWuR,GAAYA,EAAShS,KAAKZ,GAAO4S,EAEvD,IAAK,IAAIpQ,EAAI,EAAGA,EAAIZ,EAAQY,IAAK,CAC/B,IAAIwL,EAAc,MAAPhO,OAAc,EAASA,EAAIsC,EAAKE,SAC9B,IAATwL,IACFA,EAAO4E,EACPpQ,EAAIZ,GAEN5B,EAAMnB,EAAEwC,WAAW2M,GAAQA,EAAKpN,KAAKZ,GAAOgO,EAE9C,OAAOhO,GAKT,IAAI6S,EAAY,EAChBhU,EAAEiU,SAAW,SAASC,GACpB,IAAIC,IAAOH,EAAY,GACvB,OAAOE,EAASA,EAASC,EAAKA,GAKhCnU,EAAEoU,iBAAmB,CACnBC,SAAU,kBACVC,YAAa,mBACbT,OAAQ,oBAMV,IAAIU,EAAU,OAIVC,EAAU,CACZvB,IAAK,IACLwB,KAAM,KACNC,KAAM,IACNC,KAAM,IACNC,SAAU,QACVC,SAAU,SAGRC,EAAe,4BAEfC,EAAa,SAAStM,GACxB,MAAO,KAAO+L,EAAQ/L,IAOxBzI,EAAEgV,SAAW,SAASC,EAAMC,EAAUC,IAC/BD,GAAYC,IAAaD,EAAWC,GACzCD,EAAWlV,EAAE6P,SAAS,GAAIqF,EAAUlV,EAAEoU,kBAGtC,IAiCIgB,EAjCA1S,EAAU8Q,OAAO,EAClB0B,EAASrB,QAAUU,GAASzE,QAC5BoF,EAASZ,aAAeC,GAASzE,QACjCoF,EAASb,UAAYE,GAASzE,QAC/BwD,KAAK,KAAO,KAAM,KAGhBtR,EAAQ,EACR8N,EAAS,SACbmF,EAAKrB,QAAQlR,EAAS,SAAS+F,EAAOoL,EAAQS,EAAaD,EAAUgB,GAanE,OAZAvF,GAAUmF,EAAKxU,MAAMuB,EAAOqT,GAAQzB,QAAQkB,EAAcC,GAC1D/S,EAAQqT,EAAS5M,EAAM1F,OAEnB8Q,EACF/D,GAAU,cAAgB+D,EAAS,iCAC1BS,EACTxE,GAAU,cAAgBwE,EAAc,uBAC/BD,IACTvE,GAAU,OAASuE,EAAW,YAIzB5L,IAETqH,GAAU,OAGLoF,EAASI,WAAUxF,EAAS,mBAAqBA,EAAS,OAE/DA,EAAS,2CACP,oDACAA,EAAS,gBAGX,IACEsF,EAAS,IAAIG,SAASL,EAASI,UAAY,MAAO,IAAKxF,GACvD,MAAO0F,GAEP,MADAA,EAAE1F,OAASA,EACL0F,EAGR,IAAIR,EAAW,SAASS,GACtB,OAAOL,EAAOrT,KAAKjC,KAAM2V,EAAMzV,IAI7B0V,EAAWR,EAASI,UAAY,MAGpC,OAFAN,EAASlF,OAAS,YAAc4F,EAAW,OAAS5F,EAAS,IAEtDkF,GAIThV,EAAE2V,MAAQ,SAASxU,GACjB,IAAIyU,EAAW5V,EAAEmB,GAEjB,OADAyU,EAASC,QAAS,EACXD,GAUT,IAAIE,EAAc,SAASF,EAAUzU,GACnC,OAAOyU,EAASC,OAAS7V,EAAEmB,GAAKwU,QAAUxU,GAI5CnB,EAAE+V,MAAQ,SAAS5U,GASjB,OARAnB,EAAEgE,KAAKhE,EAAEwP,UAAUrO,GAAM,SAASsQ,GAChC,IAAI9P,EAAO3B,EAAEyR,GAAQtQ,EAAIsQ,GACzBzR,EAAEG,UAAUsR,GAAQ,WAClB,IAAItO,EAAO,CAACrD,KAAKsB,UAEjB,OADAZ,EAAK2B,MAAMgB,EAAMf,WACV0T,EAAYhW,KAAM6B,EAAKQ,MAAMnC,EAAGmD,OAGpCnD,GAITA,EAAE+V,MAAM/V,GAGRA,EAAEgE,KAAK,CAAC,MAAO,OAAQ,UAAW,QAAS,OAAQ,SAAU,WAAY,SAASyN,GAChF,IAAIjL,EAASvG,EAAWwR,GACxBzR,EAAEG,UAAUsR,GAAQ,WAClB,IAAItQ,EAAMrB,KAAKsB,SAGf,OAFAoF,EAAOrE,MAAMhB,EAAKiB,WACJ,UAATqP,GAA6B,WAATA,GAAqC,IAAftQ,EAAI4B,eAAqB5B,EAAI,GACrE2U,EAAYhW,KAAMqB,MAK7BnB,EAAEgE,KAAK,CAAC,SAAU,OAAQ,SAAU,SAASyN,GAC3C,IAAIjL,EAASvG,EAAWwR,GACxBzR,EAAEG,UAAUsR,GAAQ,WAClB,OAAOqE,EAAYhW,KAAM0G,EAAOrE,MAAMrC,KAAKsB,SAAUgB,eAKzDpC,EAAEG,UAAU2B,MAAQ,WAClB,OAAOhC,KAAKsB,UAKdpB,EAAEG,UAAU8Q,QAAUjR,EAAEG,UAAU6V,OAAShW,EAAEG,UAAU2B,MAEvD9B,EAAEG,UAAUO,SAAW,WACrB,OAAO8P,OAAO1Q,KAAKsB,WAUA,mBAAV6U,QAAwBA,OAAOC,KACxCD,OAAO,aAAc,GAAI,WACvB,OAAOjW,IAnpDb"} \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/underscore/underscore.js b/node_modules/cordova-android/node_modules/underscore/underscore.js deleted file mode 100644 index 8219dc5..0000000 --- a/node_modules/cordova-android/node_modules/underscore/underscore.js +++ /dev/null @@ -1,1692 +0,0 @@ -// Underscore.js 1.9.1 -// http://underscorejs.org -// (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors -// Underscore may be freely distributed under the MIT license. - -(function() { - - // Baseline setup - // -------------- - - // Establish the root object, `window` (`self`) in the browser, `global` - // on the server, or `this` in some virtual machines. We use `self` - // instead of `window` for `WebWorker` support. - var root = typeof self == 'object' && self.self === self && self || - typeof global == 'object' && global.global === global && global || - 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; - var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; - - // 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, - 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 their old module API. If we're in - // the browser, add `_` as a global object. - // (`nodeType` is checked to ensure that `module` - // and `exports` are not HTML elements.) - if (typeof exports != 'undefined' && !exports.nodeType) { - if (typeof module != 'undefined' && !module.nodeType && module.exports) { - exports = module.exports = _; - } - exports._ = _; - } else { - root._ = _; - } - - // Current version. - _.VERSION = '1.9.1'; - - // 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); - }; - // The 2-argument case is omitted because we’re not using it. - 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); - }; - }; - - var builtinIteratee; - - // An 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 (_.iteratee !== builtinIteratee) return _.iteratee(value, context); - if (value == null) return _.identity; - if (_.isFunction(value)) return optimizeCb(value, context, argCount); - if (_.isObject(value) && !_.isArray(value)) return _.matcher(value); - return _.property(value); - }; - - // External wrapper for our callback generator. Users may customize - // `_.iteratee` if they want additional predicate/iteratee shorthand styles. - // This abstraction hides the internal-only argCount argument. - _.iteratee = builtinIteratee = function(value, context) { - return cb(value, context, Infinity); - }; - - // Some functions take a variable number of arguments, or a few expected - // arguments at the beginning and then a variable number of values to operate - // on. This helper accumulates all remaining arguments past the function’s - // argument length (or an explicit `startIndex`), into an array that becomes - // the last argument. Similar to ES6’s "rest parameter". - var restArguments = function(func, startIndex) { - startIndex = startIndex == null ? func.length - 1 : +startIndex; - return function() { - var length = Math.max(arguments.length - startIndex, 0), - rest = Array(length), - index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } - switch (startIndex) { - case 0: return func.call(this, rest); - case 1: return func.call(this, arguments[0], rest); - case 2: return func.call(this, arguments[0], arguments[1], rest); - } - var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } - args[startIndex] = rest; - return func.apply(this, args); - }; - }; - - // 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 shallowProperty = function(key) { - return function(obj) { - return obj == null ? void 0 : obj[key]; - }; - }; - - var has = function(obj, path) { - return obj != null && hasOwnProperty.call(obj, path); - } - - var deepGet = function(obj, path) { - var length = path.length; - for (var i = 0; i < length; i++) { - if (obj == null) return void 0; - obj = obj[path[i]]; - } - return length ? obj : void 0; - }; - - // 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 = shallowProperty('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. - var createReduce = function(dir) { - // Wrap code that reassigns argument variables in a separate function than - // the one that accesses `arguments.length` to avoid a perf hit. (#1991) - var reducer = function(obj, iteratee, memo, initial) { - var keys = !isArrayLike(obj) && _.keys(obj), - length = (keys || obj).length, - index = dir > 0 ? 0 : length - 1; - if (!initial) { - memo = obj[keys ? keys[index] : index]; - index += dir; - } - 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) { - var initial = arguments.length >= 3; - return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); - }; - }; - - // **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 keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey; - var key = keyFinder(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 = restArguments(function(obj, path, args) { - var contextPath, func; - if (_.isFunction(path)) { - func = path; - } else if (_.isArray(path)) { - contextPath = path.slice(0, -1); - path = path[path.length - 1]; - } - return _.map(obj, function(context) { - var method = func; - if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } - if (context == null) return void 0; - method = context[path]; - } - return method == null ? method : method.apply(context, 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 || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value > result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { - result = v; - 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 || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { - obj = isArrayLike(obj) ? obj : _.values(obj); - for (var i = 0, length = obj.length; i < length; i++) { - value = obj[i]; - if (value != null && value < result) { - result = value; - } - } - } else { - iteratee = cb(iteratee, context); - _.each(obj, function(v, index, list) { - computed = iteratee(v, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { - result = v; - lastComputed = computed; - } - }); - } - return result; - }; - - // Shuffle a collection. - _.shuffle = function(obj) { - return _.sample(obj, Infinity); - }; - - // Sample **n** random values from a collection using the modern version of the - // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle). - // 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)]; - } - var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj); - var length = getLength(sample); - n = Math.max(Math.min(n, length), 0); - var last = length - 1; - for (var index = 0; index < n; index++) { - var rand = _.random(index, last); - var temp = sample[index]; - sample[index] = sample[rand]; - sample[rand] = temp; - } - return sample.slice(0, n); - }; - - // Sort the object's values by a criterion produced by an iteratee. - _.sortBy = function(obj, iteratee, context) { - var index = 0; - iteratee = cb(iteratee, context); - return _.pluck(_.map(obj, function(value, key, list) { - return { - value: value, - index: index++, - criteria: iteratee(value, key, 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, partition) { - return function(obj, iteratee, context) { - var result = partition ? [[], []] : {}; - 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; - }); - - var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; - // Safely create a real, live array from anything iterable. - _.toArray = function(obj) { - if (!obj) return []; - if (_.isArray(obj)) return slice.call(obj); - if (_.isString(obj)) { - // Keep surrogate pair characters together - return obj.match(reStrSymbol); - } - 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 = group(function(result, value, pass) { - result[pass ? 0 : 1].push(value); - }, true); - - // 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 || array.length < 1) return n == null ? 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 || array.length < 1) return n == null ? 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, Boolean); - }; - - // Internal implementation of a recursive `flatten` function. - var flatten = function(input, shallow, strict, output) { - output = output || []; - var idx = output.length; - for (var i = 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) { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } else { - flatten(value, shallow, strict, output); - idx = output.length; - } - } 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 = restArguments(function(array, otherArrays) { - return _.difference(array, otherArrays); - }); - - // Produce a duplicate-free version of the array. If the array has already - // been sorted, you have the option of using a faster algorithm. - // The faster algorithm will not work with an iteratee if the iteratee - // is not a one-to-one function, so providing an iteratee will disable - // the 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 && !iteratee) { - 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 = restArguments(function(arrays) { - return _.uniq(flatten(arrays, 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; - var j; - for (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 = restArguments(function(array, rest) { - rest = flatten(rest, true, true); - return _.filter(array, function(value){ - return !_.contains(rest, value); - }); - }); - - // 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; - }; - - // Zip together multiple lists into a single array -- elements that share - // an index go together. - _.zip = restArguments(_.unzip); - - // 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. Passing by pairs is the reverse of _.pairs. - _.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. - var createPredicateIndexFinder = function(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. - var createIndexFinder = function(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; - } - if (!step) { - step = stop < start ? -1 : 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; - }; - - // Chunk a single array into multiple arrays, each containing `count` or fewer - // items. - _.chunk = function(array, count) { - if (count == null || count < 1) return []; - var result = []; - var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } - return result; - }; - - // 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 = restArguments(function(func, context, args) { - if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function'); - var bound = restArguments(function(callArgs) { - return executeBound(func, bound, context, this, args.concat(callArgs)); - }); - 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 by default, allowing any combination of arguments to be - // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. - _.partial = restArguments(function(func, boundArgs) { - var placeholder = _.partial.placeholder; - var bound = function() { - var position = 0, length = boundArgs.length; - var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } - while (position < arguments.length) args.push(arguments[position++]); - return executeBound(func, bound, this, this, args); - }; - return bound; - }); - - _.partial.placeholder = _; - - // 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 = restArguments(function(obj, keys) { - keys = flatten(keys, false, false); - var index = keys.length; - if (index < 1) throw new Error('bindAll must be passed function names'); - while (index--) { - var key = keys[index]; - obj[key] = _.bind(obj[key], 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 = restArguments(function(func, wait, args) { - 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 timeout, context, args, result; - 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; - }; - - var throttled = 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; - }; - - throttled.cancel = function() { - clearTimeout(timeout); - previous = 0; - timeout = context = args = null; - }; - - return throttled; - }; - - // 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, result; - - var later = function(context, args) { - timeout = null; - if (args) result = func.apply(context, args); - }; - - var debounced = restArguments(function(args) { - if (timeout) clearTimeout(timeout); - if (immediate) { - var callNow = !timeout; - timeout = setTimeout(later, wait); - if (callNow) result = func.apply(this, args); - } else { - timeout = _.delay(later, wait, this, args); - } - - return result; - }); - - debounced.cancel = function() { - clearTimeout(timeout); - timeout = null; - }; - - return debounced; - }; - - // 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); - - _.restArguments = restArguments; - - // 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']; - - var collectNonEnumProps = function(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 = {}; - for (var index = 0; index < length; index++) { - var currentKey = keys[index]; - results[currentKey] = iteratee(obj[currentKey], currentKey, obj); - } - return results; - }; - - // Convert an object into a list of `[key, value]` pairs. - // The opposite of _.object. - _.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(); - }; - - // An internal function for creating assigner functions. - var createAssigner = function(keysFunc, defaults) { - return function(obj) { - var length = arguments.length; - if (defaults) obj = Object(obj); - 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 (!defaults || obj[key] === void 0) obj[key] = source[key]; - } - } - return obj; - }; - }; - - // 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; - } - }; - - // Internal pick helper function to determine if `obj` has key `key`. - var keyInObj = function(value, key, obj) { - return key in obj; - }; - - // Return a copy of the object only containing the whitelisted properties. - _.pick = restArguments(function(obj, keys) { - var result = {}, iteratee = keys[0]; - if (obj == null) return result; - if (_.isFunction(iteratee)) { - if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); - keys = _.allKeys(obj); - } else { - iteratee = keyInObj; - keys = flatten(keys, false, false); - 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 = restArguments(function(obj, keys) { - var iteratee = keys[0], context; - if (_.isFunction(iteratee)) { - iteratee = _.negate(iteratee); - if (keys.length > 1) context = keys[1]; - } else { - keys = _.map(flatten(keys, false, false), 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, deepEq; - 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; - // `null` or `undefined` only equal to itself (strict comparison). - if (a == null || b == null) return false; - // `NaN`s are equivalent, but non-reflexive. - if (a !== a) return b !== b; - // Exhaust primitive checks - var type = typeof a; - if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; - return deepEq(a, b, aStack, bStack); - }; - - // Internal recursive comparison function for `isEqual`. - deepEq = function(a, b, aStack, bStack) { - // 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; - case '[object Symbol]': - return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(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, isMap, isWeakMap, isSet, isWeakSet. - _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], 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), Safari 8 (#1929), and PhantomJS (#2236). - var nodelist = root.document && root.document.childNodes; - if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') { - _.isFunction = function(obj) { - return typeof obj == 'function' || false; - }; - } - - // Is a given object a finite number? - _.isFinite = function(obj) { - return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj)); - }; - - // Is the given value `NaN`? - _.isNaN = function(obj) { - return _.isNumber(obj) && isNaN(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, path) { - if (!_.isArray(path)) { - return has(obj, path); - } - var length = path.length; - for (var i = 0; i < length; i++) { - var key = path[i]; - if (obj == null || !hasOwnProperty.call(obj, key)) { - return false; - } - obj = obj[key]; - } - return !!length; - }; - - // 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(){}; - - // Creates a function that, when passed an object, will traverse that object’s - // properties down the given `path`, specified as an array of keys or indexes. - _.property = function(path) { - if (!_.isArray(path)) { - return shallowProperty(path); - } - return function(obj) { - return deepGet(obj, path); - }; - }; - - // Generates a function for a given object that returns a given property. - _.propertyOf = function(obj) { - if (obj == null) { - return function(){}; - } - return function(path) { - return !_.isArray(path) ? obj[path] : deepGet(obj, path); - }; - }; - - // 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); - - // Traverses the children of `obj` along `path`. If a child is a function, it - // is invoked with its parent as context. Returns the value of the final - // child, or `fallback` if any child is undefined. - _.result = function(obj, path, fallback) { - if (!_.isArray(path)) path = [path]; - var length = path.length; - if (!length) { - return _.isFunction(fallback) ? fallback.call(obj) : fallback; - } - for (var i = 0; i < length; i++) { - var prop = obj == null ? void 0 : obj[path[i]]; - if (prop === void 0) { - prop = fallback; - i = length; // Ensure we don't continue iterating. - } - obj = _.isFunction(prop) ? prop.call(obj) : prop; - } - return obj; - }; - - // 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 escapeRegExp = /\\|'|\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(escapeRegExp, 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 offset. - 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'; - - var render; - try { - 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 chainResult = 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 chainResult(this, func.apply(_, args)); - }; - }); - return _; - }; - - // 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 chainResult(this, obj); - }; - }); - - // Add all accessor Array functions to the wrapper. - _.each(['concat', 'join', 'slice'], function(name) { - var method = ArrayProto[name]; - _.prototype[name] = function() { - return chainResult(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 String(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 _; - }); - } -}()); diff --git a/node_modules/cordova-android/node_modules/unorm/LICENSE.md b/node_modules/cordova-android/node_modules/unorm/LICENSE.md deleted file mode 100644 index ed1d4f3..0000000 --- a/node_modules/cordova-android/node_modules/unorm/LICENSE.md +++ /dev/null @@ -1,42 +0,0 @@ -The software dual licensed under the MIT and GPL licenses. MIT license: - - Copyright (c) 2008-2013 Matsuza , Bjarke Walling - - 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. - -GPL notice (please read the [full GPL license] online): - - Copyright (C) 2008-2013 Matsuza , Bjarke Walling - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 2 - of the License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -[full GPL license]: http://www.gnu.org/licenses/gpl-2.0-standalone.html diff --git a/node_modules/cordova-android/node_modules/unorm/README.md b/node_modules/cordova-android/node_modules/unorm/README.md deleted file mode 100644 index 6ff6420..0000000 --- a/node_modules/cordova-android/node_modules/unorm/README.md +++ /dev/null @@ -1,118 +0,0 @@ -This is [Unicode Normalizer] in a Common JS module. I'm not affiliated with Matsuza, the original author of Unicode Normalizer. - -[![Build Status](https://travis-ci.org/walling/unorm.png?branch=master)](https://travis-ci.org/walling/unorm) - - -Installation ------------- - -```bash -npm install unorm -``` - -Polyfill --------- - -You can use this module as a polyfill for [String.prototype.normalize], for example: - -```javascript -console.log('æøåäüö'.normalize('NFKD')); -``` - -The module uses some [EcmaScript 5](http://kangax.github.io/es5-compat-table/) features. Other browsers should use a compability shim, e.g. [es5-shim](https://github.com/kriskowal/es5-shim). - -Functions ---------- - -This module exports four functions: `nfc`, `nfd`, `nfkc`, and `nfkd`; one for each Unicode normalization. In the browser the functions are exported in the `unorm` global. In CommonJS environments you just require the module. Functions: - - * `unorm.nfd(str)` – Canonical Decomposition - * `unorm.nfc(str)` – Canonical Decomposition, followed by Canonical Composition - * `unorm.nfkd(str)` – Compatibility Decomposition - * `unorm.nfkc(str)` – Compatibility Decomposition, followed by Canonical Composition - - -Node.JS example ---------------- - -For a longer example, see `examples` directory. - -```javascript -var unorm = require('unorm'); - -var text = - 'The \u212B symbol invented by A. J. \u00C5ngstr\u00F6m ' + - '(1814, L\u00F6gd\u00F6, \u2013 1874) denotes the length ' + - '10\u207B\u00B9\u2070 m.'; - -var combining = /[\u0300-\u036F]/g; // Use XRegExp('\\p{M}', 'g'); see example.js. - -console.log('Regular: ' + text); -console.log('NFC: ' + unorm.nfc(text)); -console.log('NFD: ' + unorm.nfd(text)); -console.log('NFKC: ' + unorm.nfkc(text)); -console.log('NFKD: * ' + unorm.nfkd(text).replace(combining, '')); -console.log(' * = Combining characters removed from decomposed form.'); -``` - - -Road map --------- - -As of November 2013. Longer term: - -- Look at possible optimizations (speed primarely, module size secondarily) -- Adding functions to quick check normalizations: `is_nfc`, `is_nfd`, etc. - - -Contributers ------------- - - - **Oleg Grenrus** is helping to maintain this library. He cleaned up the code base, fixed JSHint errors, created a test suite and updated the normalization data to Unicode 6.3. - - -Development notes ------------------ - -- [Unicode normalization forms report](http://www.unicode.org/reports/tr15/) -- Unicode data can be found from http://www.unicode.org/Public/UCD/latest/ucd - -To generate new unicode data, run: -```sh -cd src/data/src -javac UnormNormalizerBuilder.java -java UnormNormalizerBuilder -``` -produced `unormdata.js` contains needed table - -Execute `node benchmark/benchmark.js` to run simple benchmarks, if you do any changes which may affect performance. - -License -------- - -This project includes the software package **Unicode Normalizer 1.0.0**. The -software dual licensed under the MIT and GPL licenses. Here is the MIT license: - - Copyright (c) 2008-2013 Matsuza , Bjarke Walling - - 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. - - -[Unicode Normalizer]: http://coderepos.org/share/browser/lang/javascript/UnicodeNormalizer -[String.prototype.normalize]: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-15.5.3.26 diff --git a/node_modules/cordova-android/node_modules/unorm/lib/unorm.js b/node_modules/cordova-android/node_modules/unorm/lib/unorm.js deleted file mode 100644 index 92d3699..0000000 --- a/node_modules/cordova-android/node_modules/unorm/lib/unorm.js +++ /dev/null @@ -1,442 +0,0 @@ -(function (root) { - "use strict"; - -/***** unorm.js *****/ - -/* - * UnicodeNormalizer 1.0.0 - * Copyright (c) 2008 Matsuza - * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. - * $Date: 2008-06-05 16:44:17 +0200 (Thu, 05 Jun 2008) $ - * $Rev: 13309 $ - */ - - var DEFAULT_FEATURE = [null, 0, {}]; - var CACHE_THRESHOLD = 10; - var SBase = 0xAC00, LBase = 0x1100, VBase = 0x1161, TBase = 0x11A7, LCount = 19, VCount = 21, TCount = 28; - var NCount = VCount * TCount; // 588 - var SCount = LCount * NCount; // 11172 - - var UChar = function(cp, feature){ - this.codepoint = cp; - this.feature = feature; - }; - - // Strategies - var cache = {}; - var cacheCounter = []; - for (var i = 0; i <= 0xFF; ++i){ - cacheCounter[i] = 0; - } - - function fromCache(next, cp, needFeature){ - var ret = cache[cp]; - if(!ret){ - ret = next(cp, needFeature); - if(!!ret.feature && ++cacheCounter[(cp >> 8) & 0xFF] > CACHE_THRESHOLD){ - cache[cp] = ret; - } - } - return ret; - } - - function fromData(next, cp, needFeature){ - var hash = cp & 0xFF00; - var dunit = UChar.udata[hash] || {}; - var f = dunit[cp]; - return f ? new UChar(cp, f) : new UChar(cp, DEFAULT_FEATURE); - } - function fromCpOnly(next, cp, needFeature){ - return !!needFeature ? next(cp, needFeature) : new UChar(cp, null); - } - function fromRuleBasedJamo(next, cp, needFeature){ - var j; - if(cp < LBase || (LBase + LCount <= cp && cp < SBase) || (SBase + SCount < cp)){ - return next(cp, needFeature); - } - if(LBase <= cp && cp < LBase + LCount){ - var c = {}; - var base = (cp - LBase) * VCount; - for (j = 0; j < VCount; ++j){ - c[VBase + j] = SBase + TCount * (j + base); - } - return new UChar(cp, [,,c]); - } - - var SIndex = cp - SBase; - var TIndex = SIndex % TCount; - var feature = []; - if(TIndex !== 0){ - feature[0] = [SBase + SIndex - TIndex, TBase + TIndex]; - } else { - feature[0] = [LBase + Math.floor(SIndex / NCount), VBase + Math.floor((SIndex % NCount) / TCount)]; - feature[2] = {}; - for (j = 1; j < TCount; ++j){ - feature[2][TBase + j] = cp + j; - } - } - return new UChar(cp, feature); - } - function fromCpFilter(next, cp, needFeature){ - return cp < 60 || 13311 < cp && cp < 42607 ? new UChar(cp, DEFAULT_FEATURE) : next(cp, needFeature); - } - - var strategies = [fromCpFilter, fromCache, fromCpOnly, fromRuleBasedJamo, fromData]; - - UChar.fromCharCode = strategies.reduceRight(function (next, strategy) { - return function (cp, needFeature) { - return strategy(next, cp, needFeature); - }; - }, null); - - UChar.isHighSurrogate = function(cp){ - return cp >= 0xD800 && cp <= 0xDBFF; - }; - UChar.isLowSurrogate = function(cp){ - return cp >= 0xDC00 && cp <= 0xDFFF; - }; - - UChar.prototype.prepFeature = function(){ - if(!this.feature){ - this.feature = UChar.fromCharCode(this.codepoint, true).feature; - } - }; - - UChar.prototype.toString = function(){ - if(this.codepoint < 0x10000){ - return String.fromCharCode(this.codepoint); - } else { - var x = this.codepoint - 0x10000; - return String.fromCharCode(Math.floor(x / 0x400) + 0xD800, x % 0x400 + 0xDC00); - } - }; - - UChar.prototype.getDecomp = function(){ - this.prepFeature(); - return this.feature[0] || null; - }; - - UChar.prototype.isCompatibility = function(){ - this.prepFeature(); - return !!this.feature[1] && (this.feature[1] & (1 << 8)); - }; - UChar.prototype.isExclude = function(){ - this.prepFeature(); - return !!this.feature[1] && (this.feature[1] & (1 << 9)); - }; - UChar.prototype.getCanonicalClass = function(){ - this.prepFeature(); - return !!this.feature[1] ? (this.feature[1] & 0xff) : 0; - }; - UChar.prototype.getComposite = function(following){ - this.prepFeature(); - if(!this.feature[2]){ - return null; - } - var cp = this.feature[2][following.codepoint]; - return cp ? UChar.fromCharCode(cp) : null; - }; - - var UCharIterator = function(str){ - this.str = str; - this.cursor = 0; - }; - UCharIterator.prototype.next = function(){ - if(!!this.str && this.cursor < this.str.length){ - var cp = this.str.charCodeAt(this.cursor++); - var d; - if(UChar.isHighSurrogate(cp) && this.cursor < this.str.length && UChar.isLowSurrogate((d = this.str.charCodeAt(this.cursor)))){ - cp = (cp - 0xD800) * 0x400 + (d -0xDC00) + 0x10000; - ++this.cursor; - } - return UChar.fromCharCode(cp); - } else { - this.str = null; - return null; - } - }; - - var RecursDecompIterator = function(it, cano){ - this.it = it; - this.canonical = cano; - this.resBuf = []; - }; - - RecursDecompIterator.prototype.next = function(){ - function recursiveDecomp(cano, uchar){ - var decomp = uchar.getDecomp(); - if(!!decomp && !(cano && uchar.isCompatibility())){ - var ret = []; - for(var i = 0; i < decomp.length; ++i){ - var a = recursiveDecomp(cano, UChar.fromCharCode(decomp[i])); - ret = ret.concat(a); - } - return ret; - } else { - return [uchar]; - } - } - if(this.resBuf.length === 0){ - var uchar = this.it.next(); - if(!uchar){ - return null; - } - this.resBuf = recursiveDecomp(this.canonical, uchar); - } - return this.resBuf.shift(); - }; - - var DecompIterator = function(it){ - this.it = it; - this.resBuf = []; - }; - - DecompIterator.prototype.next = function(){ - var cc; - if(this.resBuf.length === 0){ - do{ - var uchar = this.it.next(); - if(!uchar){ - break; - } - cc = uchar.getCanonicalClass(); - var inspt = this.resBuf.length; - if(cc !== 0){ - for(; inspt > 0; --inspt){ - var uchar2 = this.resBuf[inspt - 1]; - var cc2 = uchar2.getCanonicalClass(); - if(cc2 <= cc){ - break; - } - } - } - this.resBuf.splice(inspt, 0, uchar); - } while(cc !== 0); - } - return this.resBuf.shift(); - }; - - var CompIterator = function(it){ - this.it = it; - this.procBuf = []; - this.resBuf = []; - this.lastClass = null; - }; - - CompIterator.prototype.next = function(){ - while(this.resBuf.length === 0){ - var uchar = this.it.next(); - if(!uchar){ - this.resBuf = this.procBuf; - this.procBuf = []; - break; - } - if(this.procBuf.length === 0){ - this.lastClass = uchar.getCanonicalClass(); - this.procBuf.push(uchar); - } else { - var starter = this.procBuf[0]; - var composite = starter.getComposite(uchar); - var cc = uchar.getCanonicalClass(); - if(!!composite && (this.lastClass < cc || this.lastClass === 0)){ - this.procBuf[0] = composite; - } else { - if(cc === 0){ - this.resBuf = this.procBuf; - this.procBuf = []; - } - this.lastClass = cc; - this.procBuf.push(uchar); - } - } - } - return this.resBuf.shift(); - }; - - var createIterator = function(mode, str){ - switch(mode){ - case "NFD": - return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true)); - case "NFKD": - return new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false)); - case "NFC": - return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), true))); - case "NFKC": - return new CompIterator(new DecompIterator(new RecursDecompIterator(new UCharIterator(str), false))); - } - throw mode + " is invalid"; - }; - var normalize = function(mode, str){ - var it = createIterator(mode, str); - var ret = ""; - var uchar; - while(!!(uchar = it.next())){ - ret += uchar.toString(); - } - return ret; - }; - - /* API functions */ - function nfd(str){ - return normalize("NFD", str); - } - - function nfkd(str){ - return normalize("NFKD", str); - } - - function nfc(str){ - return normalize("NFC", str); - } - - function nfkc(str){ - return normalize("NFKC", str); - } - -/* Unicode data */ -UChar.udata={ -0:{60:[,,{824:8814}],61:[,,{824:8800}],62:[,,{824:8815}],65:[,,{768:192,769:193,770:194,771:195,772:256,774:258,775:550,776:196,777:7842,778:197,780:461,783:512,785:514,803:7840,805:7680,808:260}],66:[,,{775:7682,803:7684,817:7686}],67:[,,{769:262,770:264,775:266,780:268,807:199}],68:[,,{775:7690,780:270,803:7692,807:7696,813:7698,817:7694}],69:[,,{768:200,769:201,770:202,771:7868,772:274,774:276,775:278,776:203,777:7866,780:282,783:516,785:518,803:7864,807:552,808:280,813:7704,816:7706}],70:[,,{775:7710}],71:[,,{769:500,770:284,772:7712,774:286,775:288,780:486,807:290}],72:[,,{770:292,775:7714,776:7718,780:542,803:7716,807:7720,814:7722}],73:[,,{768:204,769:205,770:206,771:296,772:298,774:300,775:304,776:207,777:7880,780:463,783:520,785:522,803:7882,808:302,816:7724}],74:[,,{770:308}],75:[,,{769:7728,780:488,803:7730,807:310,817:7732}],76:[,,{769:313,780:317,803:7734,807:315,813:7740,817:7738}],77:[,,{769:7742,775:7744,803:7746}],78:[,,{768:504,769:323,771:209,775:7748,780:327,803:7750,807:325,813:7754,817:7752}],79:[,,{768:210,769:211,770:212,771:213,772:332,774:334,775:558,776:214,777:7886,779:336,780:465,783:524,785:526,795:416,803:7884,808:490}],80:[,,{769:7764,775:7766}],82:[,,{769:340,775:7768,780:344,783:528,785:530,803:7770,807:342,817:7774}],83:[,,{769:346,770:348,775:7776,780:352,803:7778,806:536,807:350}],84:[,,{775:7786,780:356,803:7788,806:538,807:354,813:7792,817:7790}],85:[,,{768:217,769:218,770:219,771:360,772:362,774:364,776:220,777:7910,778:366,779:368,780:467,783:532,785:534,795:431,803:7908,804:7794,808:370,813:7798,816:7796}],86:[,,{771:7804,803:7806}],87:[,,{768:7808,769:7810,770:372,775:7814,776:7812,803:7816}],88:[,,{775:7818,776:7820}],89:[,,{768:7922,769:221,770:374,771:7928,772:562,775:7822,776:376,777:7926,803:7924}],90:[,,{769:377,770:7824,775:379,780:381,803:7826,817:7828}],97:[,,{768:224,769:225,770:226,771:227,772:257,774:259,775:551,776:228,777:7843,778:229,780:462,783:513,785:515,803:7841,805:7681,808:261}],98:[,,{775:7683,803:7685,817:7687}],99:[,,{769:263,770:265,775:267,780:269,807:231}],100:[,,{775:7691,780:271,803:7693,807:7697,813:7699,817:7695}],101:[,,{768:232,769:233,770:234,771:7869,772:275,774:277,775:279,776:235,777:7867,780:283,783:517,785:519,803:7865,807:553,808:281,813:7705,816:7707}],102:[,,{775:7711}],103:[,,{769:501,770:285,772:7713,774:287,775:289,780:487,807:291}],104:[,,{770:293,775:7715,776:7719,780:543,803:7717,807:7721,814:7723,817:7830}],105:[,,{768:236,769:237,770:238,771:297,772:299,774:301,776:239,777:7881,780:464,783:521,785:523,803:7883,808:303,816:7725}],106:[,,{770:309,780:496}],107:[,,{769:7729,780:489,803:7731,807:311,817:7733}],108:[,,{769:314,780:318,803:7735,807:316,813:7741,817:7739}],109:[,,{769:7743,775:7745,803:7747}],110:[,,{768:505,769:324,771:241,775:7749,780:328,803:7751,807:326,813:7755,817:7753}],111:[,,{768:242,769:243,770:244,771:245,772:333,774:335,775:559,776:246,777:7887,779:337,780:466,783:525,785:527,795:417,803:7885,808:491}],112:[,,{769:7765,775:7767}],114:[,,{769:341,775:7769,780:345,783:529,785:531,803:7771,807:343,817:7775}],115:[,,{769:347,770:349,775:7777,780:353,803:7779,806:537,807:351}],116:[,,{775:7787,776:7831,780:357,803:7789,806:539,807:355,813:7793,817:7791}],117:[,,{768:249,769:250,770:251,771:361,772:363,774:365,776:252,777:7911,778:367,779:369,780:468,783:533,785:535,795:432,803:7909,804:7795,808:371,813:7799,816:7797}],118:[,,{771:7805,803:7807}],119:[,,{768:7809,769:7811,770:373,775:7815,776:7813,778:7832,803:7817}],120:[,,{775:7819,776:7821}],121:[,,{768:7923,769:253,770:375,771:7929,772:563,775:7823,776:255,777:7927,778:7833,803:7925}],122:[,,{769:378,770:7825,775:380,780:382,803:7827,817:7829}],160:[[32],256],168:[[32,776],256,{768:8173,769:901,834:8129}],170:[[97],256],175:[[32,772],256],178:[[50],256],179:[[51],256],180:[[32,769],256],181:[[956],256],184:[[32,807],256],185:[[49],256],186:[[111],256],188:[[49,8260,52],256],189:[[49,8260,50],256],190:[[51,8260,52],256],192:[[65,768]],193:[[65,769]],194:[[65,770],,{768:7846,769:7844,771:7850,777:7848}],195:[[65,771]],196:[[65,776],,{772:478}],197:[[65,778],,{769:506}],198:[,,{769:508,772:482}],199:[[67,807],,{769:7688}],200:[[69,768]],201:[[69,769]],202:[[69,770],,{768:7872,769:7870,771:7876,777:7874}],203:[[69,776]],204:[[73,768]],205:[[73,769]],206:[[73,770]],207:[[73,776],,{769:7726}],209:[[78,771]],210:[[79,768]],211:[[79,769]],212:[[79,770],,{768:7890,769:7888,771:7894,777:7892}],213:[[79,771],,{769:7756,772:556,776:7758}],214:[[79,776],,{772:554}],216:[,,{769:510}],217:[[85,768]],218:[[85,769]],219:[[85,770]],220:[[85,776],,{768:475,769:471,772:469,780:473}],221:[[89,769]],224:[[97,768]],225:[[97,769]],226:[[97,770],,{768:7847,769:7845,771:7851,777:7849}],227:[[97,771]],228:[[97,776],,{772:479}],229:[[97,778],,{769:507}],230:[,,{769:509,772:483}],231:[[99,807],,{769:7689}],232:[[101,768]],233:[[101,769]],234:[[101,770],,{768:7873,769:7871,771:7877,777:7875}],235:[[101,776]],236:[[105,768]],237:[[105,769]],238:[[105,770]],239:[[105,776],,{769:7727}],241:[[110,771]],242:[[111,768]],243:[[111,769]],244:[[111,770],,{768:7891,769:7889,771:7895,777:7893}],245:[[111,771],,{769:7757,772:557,776:7759}],246:[[111,776],,{772:555}],248:[,,{769:511}],249:[[117,768]],250:[[117,769]],251:[[117,770]],252:[[117,776],,{768:476,769:472,772:470,780:474}],253:[[121,769]],255:[[121,776]]}, -256:{256:[[65,772]],257:[[97,772]],258:[[65,774],,{768:7856,769:7854,771:7860,777:7858}],259:[[97,774],,{768:7857,769:7855,771:7861,777:7859}],260:[[65,808]],261:[[97,808]],262:[[67,769]],263:[[99,769]],264:[[67,770]],265:[[99,770]],266:[[67,775]],267:[[99,775]],268:[[67,780]],269:[[99,780]],270:[[68,780]],271:[[100,780]],274:[[69,772],,{768:7700,769:7702}],275:[[101,772],,{768:7701,769:7703}],276:[[69,774]],277:[[101,774]],278:[[69,775]],279:[[101,775]],280:[[69,808]],281:[[101,808]],282:[[69,780]],283:[[101,780]],284:[[71,770]],285:[[103,770]],286:[[71,774]],287:[[103,774]],288:[[71,775]],289:[[103,775]],290:[[71,807]],291:[[103,807]],292:[[72,770]],293:[[104,770]],296:[[73,771]],297:[[105,771]],298:[[73,772]],299:[[105,772]],300:[[73,774]],301:[[105,774]],302:[[73,808]],303:[[105,808]],304:[[73,775]],306:[[73,74],256],307:[[105,106],256],308:[[74,770]],309:[[106,770]],310:[[75,807]],311:[[107,807]],313:[[76,769]],314:[[108,769]],315:[[76,807]],316:[[108,807]],317:[[76,780]],318:[[108,780]],319:[[76,183],256],320:[[108,183],256],323:[[78,769]],324:[[110,769]],325:[[78,807]],326:[[110,807]],327:[[78,780]],328:[[110,780]],329:[[700,110],256],332:[[79,772],,{768:7760,769:7762}],333:[[111,772],,{768:7761,769:7763}],334:[[79,774]],335:[[111,774]],336:[[79,779]],337:[[111,779]],340:[[82,769]],341:[[114,769]],342:[[82,807]],343:[[114,807]],344:[[82,780]],345:[[114,780]],346:[[83,769],,{775:7780}],347:[[115,769],,{775:7781}],348:[[83,770]],349:[[115,770]],350:[[83,807]],351:[[115,807]],352:[[83,780],,{775:7782}],353:[[115,780],,{775:7783}],354:[[84,807]],355:[[116,807]],356:[[84,780]],357:[[116,780]],360:[[85,771],,{769:7800}],361:[[117,771],,{769:7801}],362:[[85,772],,{776:7802}],363:[[117,772],,{776:7803}],364:[[85,774]],365:[[117,774]],366:[[85,778]],367:[[117,778]],368:[[85,779]],369:[[117,779]],370:[[85,808]],371:[[117,808]],372:[[87,770]],373:[[119,770]],374:[[89,770]],375:[[121,770]],376:[[89,776]],377:[[90,769]],378:[[122,769]],379:[[90,775]],380:[[122,775]],381:[[90,780]],382:[[122,780]],383:[[115],256,{775:7835}],416:[[79,795],,{768:7900,769:7898,771:7904,777:7902,803:7906}],417:[[111,795],,{768:7901,769:7899,771:7905,777:7903,803:7907}],431:[[85,795],,{768:7914,769:7912,771:7918,777:7916,803:7920}],432:[[117,795],,{768:7915,769:7913,771:7919,777:7917,803:7921}],439:[,,{780:494}],452:[[68,381],256],453:[[68,382],256],454:[[100,382],256],455:[[76,74],256],456:[[76,106],256],457:[[108,106],256],458:[[78,74],256],459:[[78,106],256],460:[[110,106],256],461:[[65,780]],462:[[97,780]],463:[[73,780]],464:[[105,780]],465:[[79,780]],466:[[111,780]],467:[[85,780]],468:[[117,780]],469:[[220,772]],470:[[252,772]],471:[[220,769]],472:[[252,769]],473:[[220,780]],474:[[252,780]],475:[[220,768]],476:[[252,768]],478:[[196,772]],479:[[228,772]],480:[[550,772]],481:[[551,772]],482:[[198,772]],483:[[230,772]],486:[[71,780]],487:[[103,780]],488:[[75,780]],489:[[107,780]],490:[[79,808],,{772:492}],491:[[111,808],,{772:493}],492:[[490,772]],493:[[491,772]],494:[[439,780]],495:[[658,780]],496:[[106,780]],497:[[68,90],256],498:[[68,122],256],499:[[100,122],256],500:[[71,769]],501:[[103,769]],504:[[78,768]],505:[[110,768]],506:[[197,769]],507:[[229,769]],508:[[198,769]],509:[[230,769]],510:[[216,769]],511:[[248,769]],66045:[,220]}, -512:{512:[[65,783]],513:[[97,783]],514:[[65,785]],515:[[97,785]],516:[[69,783]],517:[[101,783]],518:[[69,785]],519:[[101,785]],520:[[73,783]],521:[[105,783]],522:[[73,785]],523:[[105,785]],524:[[79,783]],525:[[111,783]],526:[[79,785]],527:[[111,785]],528:[[82,783]],529:[[114,783]],530:[[82,785]],531:[[114,785]],532:[[85,783]],533:[[117,783]],534:[[85,785]],535:[[117,785]],536:[[83,806]],537:[[115,806]],538:[[84,806]],539:[[116,806]],542:[[72,780]],543:[[104,780]],550:[[65,775],,{772:480}],551:[[97,775],,{772:481}],552:[[69,807],,{774:7708}],553:[[101,807],,{774:7709}],554:[[214,772]],555:[[246,772]],556:[[213,772]],557:[[245,772]],558:[[79,775],,{772:560}],559:[[111,775],,{772:561}],560:[[558,772]],561:[[559,772]],562:[[89,772]],563:[[121,772]],658:[,,{780:495}],688:[[104],256],689:[[614],256],690:[[106],256],691:[[114],256],692:[[633],256],693:[[635],256],694:[[641],256],695:[[119],256],696:[[121],256],728:[[32,774],256],729:[[32,775],256],730:[[32,778],256],731:[[32,808],256],732:[[32,771],256],733:[[32,779],256],736:[[611],256],737:[[108],256],738:[[115],256],739:[[120],256],740:[[661],256],66272:[,220]}, -768:{768:[,230],769:[,230],770:[,230],771:[,230],772:[,230],773:[,230],774:[,230],775:[,230],776:[,230,{769:836}],777:[,230],778:[,230],779:[,230],780:[,230],781:[,230],782:[,230],783:[,230],784:[,230],785:[,230],786:[,230],787:[,230],788:[,230],789:[,232],790:[,220],791:[,220],792:[,220],793:[,220],794:[,232],795:[,216],796:[,220],797:[,220],798:[,220],799:[,220],800:[,220],801:[,202],802:[,202],803:[,220],804:[,220],805:[,220],806:[,220],807:[,202],808:[,202],809:[,220],810:[,220],811:[,220],812:[,220],813:[,220],814:[,220],815:[,220],816:[,220],817:[,220],818:[,220],819:[,220],820:[,1],821:[,1],822:[,1],823:[,1],824:[,1],825:[,220],826:[,220],827:[,220],828:[,220],829:[,230],830:[,230],831:[,230],832:[[768],230],833:[[769],230],834:[,230],835:[[787],230],836:[[776,769],230],837:[,240],838:[,230],839:[,220],840:[,220],841:[,220],842:[,230],843:[,230],844:[,230],845:[,220],846:[,220],848:[,230],849:[,230],850:[,230],851:[,220],852:[,220],853:[,220],854:[,220],855:[,230],856:[,232],857:[,220],858:[,220],859:[,230],860:[,233],861:[,234],862:[,234],863:[,233],864:[,234],865:[,234],866:[,233],867:[,230],868:[,230],869:[,230],870:[,230],871:[,230],872:[,230],873:[,230],874:[,230],875:[,230],876:[,230],877:[,230],878:[,230],879:[,230],884:[[697]],890:[[32,837],256],894:[[59]],900:[[32,769],256],901:[[168,769]],902:[[913,769]],903:[[183]],904:[[917,769]],905:[[919,769]],906:[[921,769]],908:[[927,769]],910:[[933,769]],911:[[937,769]],912:[[970,769]],913:[,,{768:8122,769:902,772:8121,774:8120,787:7944,788:7945,837:8124}],917:[,,{768:8136,769:904,787:7960,788:7961}],919:[,,{768:8138,769:905,787:7976,788:7977,837:8140}],921:[,,{768:8154,769:906,772:8153,774:8152,776:938,787:7992,788:7993}],927:[,,{768:8184,769:908,787:8008,788:8009}],929:[,,{788:8172}],933:[,,{768:8170,769:910,772:8169,774:8168,776:939,788:8025}],937:[,,{768:8186,769:911,787:8040,788:8041,837:8188}],938:[[921,776]],939:[[933,776]],940:[[945,769],,{837:8116}],941:[[949,769]],942:[[951,769],,{837:8132}],943:[[953,769]],944:[[971,769]],945:[,,{768:8048,769:940,772:8113,774:8112,787:7936,788:7937,834:8118,837:8115}],949:[,,{768:8050,769:941,787:7952,788:7953}],951:[,,{768:8052,769:942,787:7968,788:7969,834:8134,837:8131}],953:[,,{768:8054,769:943,772:8145,774:8144,776:970,787:7984,788:7985,834:8150}],959:[,,{768:8056,769:972,787:8000,788:8001}],961:[,,{787:8164,788:8165}],965:[,,{768:8058,769:973,772:8161,774:8160,776:971,787:8016,788:8017,834:8166}],969:[,,{768:8060,769:974,787:8032,788:8033,834:8182,837:8179}],970:[[953,776],,{768:8146,769:912,834:8151}],971:[[965,776],,{768:8162,769:944,834:8167}],972:[[959,769]],973:[[965,769]],974:[[969,769],,{837:8180}],976:[[946],256],977:[[952],256],978:[[933],256,{769:979,776:980}],979:[[978,769]],980:[[978,776]],981:[[966],256],982:[[960],256],1008:[[954],256],1009:[[961],256],1010:[[962],256],1012:[[920],256],1013:[[949],256],1017:[[931],256],66422:[,230],66423:[,230],66424:[,230],66425:[,230],66426:[,230]}, -1024:{1024:[[1045,768]],1025:[[1045,776]],1027:[[1043,769]],1030:[,,{776:1031}],1031:[[1030,776]],1036:[[1050,769]],1037:[[1048,768]],1038:[[1059,774]],1040:[,,{774:1232,776:1234}],1043:[,,{769:1027}],1045:[,,{768:1024,774:1238,776:1025}],1046:[,,{774:1217,776:1244}],1047:[,,{776:1246}],1048:[,,{768:1037,772:1250,774:1049,776:1252}],1049:[[1048,774]],1050:[,,{769:1036}],1054:[,,{776:1254}],1059:[,,{772:1262,774:1038,776:1264,779:1266}],1063:[,,{776:1268}],1067:[,,{776:1272}],1069:[,,{776:1260}],1072:[,,{774:1233,776:1235}],1075:[,,{769:1107}],1077:[,,{768:1104,774:1239,776:1105}],1078:[,,{774:1218,776:1245}],1079:[,,{776:1247}],1080:[,,{768:1117,772:1251,774:1081,776:1253}],1081:[[1080,774]],1082:[,,{769:1116}],1086:[,,{776:1255}],1091:[,,{772:1263,774:1118,776:1265,779:1267}],1095:[,,{776:1269}],1099:[,,{776:1273}],1101:[,,{776:1261}],1104:[[1077,768]],1105:[[1077,776]],1107:[[1075,769]],1110:[,,{776:1111}],1111:[[1110,776]],1116:[[1082,769]],1117:[[1080,768]],1118:[[1091,774]],1140:[,,{783:1142}],1141:[,,{783:1143}],1142:[[1140,783]],1143:[[1141,783]],1155:[,230],1156:[,230],1157:[,230],1158:[,230],1159:[,230],1217:[[1046,774]],1218:[[1078,774]],1232:[[1040,774]],1233:[[1072,774]],1234:[[1040,776]],1235:[[1072,776]],1238:[[1045,774]],1239:[[1077,774]],1240:[,,{776:1242}],1241:[,,{776:1243}],1242:[[1240,776]],1243:[[1241,776]],1244:[[1046,776]],1245:[[1078,776]],1246:[[1047,776]],1247:[[1079,776]],1250:[[1048,772]],1251:[[1080,772]],1252:[[1048,776]],1253:[[1080,776]],1254:[[1054,776]],1255:[[1086,776]],1256:[,,{776:1258}],1257:[,,{776:1259}],1258:[[1256,776]],1259:[[1257,776]],1260:[[1069,776]],1261:[[1101,776]],1262:[[1059,772]],1263:[[1091,772]],1264:[[1059,776]],1265:[[1091,776]],1266:[[1059,779]],1267:[[1091,779]],1268:[[1063,776]],1269:[[1095,776]],1272:[[1067,776]],1273:[[1099,776]]}, -1280:{1415:[[1381,1410],256],1425:[,220],1426:[,230],1427:[,230],1428:[,230],1429:[,230],1430:[,220],1431:[,230],1432:[,230],1433:[,230],1434:[,222],1435:[,220],1436:[,230],1437:[,230],1438:[,230],1439:[,230],1440:[,230],1441:[,230],1442:[,220],1443:[,220],1444:[,220],1445:[,220],1446:[,220],1447:[,220],1448:[,230],1449:[,230],1450:[,220],1451:[,230],1452:[,230],1453:[,222],1454:[,228],1455:[,230],1456:[,10],1457:[,11],1458:[,12],1459:[,13],1460:[,14],1461:[,15],1462:[,16],1463:[,17],1464:[,18],1465:[,19],1466:[,19],1467:[,20],1468:[,21],1469:[,22],1471:[,23],1473:[,24],1474:[,25],1476:[,230],1477:[,220],1479:[,18]}, -1536:{1552:[,230],1553:[,230],1554:[,230],1555:[,230],1556:[,230],1557:[,230],1558:[,230],1559:[,230],1560:[,30],1561:[,31],1562:[,32],1570:[[1575,1619]],1571:[[1575,1620]],1572:[[1608,1620]],1573:[[1575,1621]],1574:[[1610,1620]],1575:[,,{1619:1570,1620:1571,1621:1573}],1608:[,,{1620:1572}],1610:[,,{1620:1574}],1611:[,27],1612:[,28],1613:[,29],1614:[,30],1615:[,31],1616:[,32],1617:[,33],1618:[,34],1619:[,230],1620:[,230],1621:[,220],1622:[,220],1623:[,230],1624:[,230],1625:[,230],1626:[,230],1627:[,230],1628:[,220],1629:[,230],1630:[,230],1631:[,220],1648:[,35],1653:[[1575,1652],256],1654:[[1608,1652],256],1655:[[1735,1652],256],1656:[[1610,1652],256],1728:[[1749,1620]],1729:[,,{1620:1730}],1730:[[1729,1620]],1746:[,,{1620:1747}],1747:[[1746,1620]],1749:[,,{1620:1728}],1750:[,230],1751:[,230],1752:[,230],1753:[,230],1754:[,230],1755:[,230],1756:[,230],1759:[,230],1760:[,230],1761:[,230],1762:[,230],1763:[,220],1764:[,230],1767:[,230],1768:[,230],1770:[,220],1771:[,230],1772:[,230],1773:[,220]}, -1792:{1809:[,36],1840:[,230],1841:[,220],1842:[,230],1843:[,230],1844:[,220],1845:[,230],1846:[,230],1847:[,220],1848:[,220],1849:[,220],1850:[,230],1851:[,220],1852:[,220],1853:[,230],1854:[,220],1855:[,230],1856:[,230],1857:[,230],1858:[,220],1859:[,230],1860:[,220],1861:[,230],1862:[,220],1863:[,230],1864:[,220],1865:[,230],1866:[,230],2027:[,230],2028:[,230],2029:[,230],2030:[,230],2031:[,230],2032:[,230],2033:[,230],2034:[,220],2035:[,230]}, -2048:{2070:[,230],2071:[,230],2072:[,230],2073:[,230],2075:[,230],2076:[,230],2077:[,230],2078:[,230],2079:[,230],2080:[,230],2081:[,230],2082:[,230],2083:[,230],2085:[,230],2086:[,230],2087:[,230],2089:[,230],2090:[,230],2091:[,230],2092:[,230],2093:[,230],2137:[,220],2138:[,220],2139:[,220],2276:[,230],2277:[,230],2278:[,220],2279:[,230],2280:[,230],2281:[,220],2282:[,230],2283:[,230],2284:[,230],2285:[,220],2286:[,220],2287:[,220],2288:[,27],2289:[,28],2290:[,29],2291:[,230],2292:[,230],2293:[,230],2294:[,220],2295:[,230],2296:[,230],2297:[,220],2298:[,220],2299:[,230],2300:[,230],2301:[,230],2302:[,230],2303:[,230]}, -2304:{2344:[,,{2364:2345}],2345:[[2344,2364]],2352:[,,{2364:2353}],2353:[[2352,2364]],2355:[,,{2364:2356}],2356:[[2355,2364]],2364:[,7],2381:[,9],2385:[,230],2386:[,220],2387:[,230],2388:[,230],2392:[[2325,2364],512],2393:[[2326,2364],512],2394:[[2327,2364],512],2395:[[2332,2364],512],2396:[[2337,2364],512],2397:[[2338,2364],512],2398:[[2347,2364],512],2399:[[2351,2364],512],2492:[,7],2503:[,,{2494:2507,2519:2508}],2507:[[2503,2494]],2508:[[2503,2519]],2509:[,9],2524:[[2465,2492],512],2525:[[2466,2492],512],2527:[[2479,2492],512]}, -2560:{2611:[[2610,2620],512],2614:[[2616,2620],512],2620:[,7],2637:[,9],2649:[[2582,2620],512],2650:[[2583,2620],512],2651:[[2588,2620],512],2654:[[2603,2620],512],2748:[,7],2765:[,9],68109:[,220],68111:[,230],68152:[,230],68153:[,1],68154:[,220],68159:[,9],68325:[,230],68326:[,220]}, -2816:{2876:[,7],2887:[,,{2878:2891,2902:2888,2903:2892}],2888:[[2887,2902]],2891:[[2887,2878]],2892:[[2887,2903]],2893:[,9],2908:[[2849,2876],512],2909:[[2850,2876],512],2962:[,,{3031:2964}],2964:[[2962,3031]],3014:[,,{3006:3018,3031:3020}],3015:[,,{3006:3019}],3018:[[3014,3006]],3019:[[3015,3006]],3020:[[3014,3031]],3021:[,9]}, -3072:{3142:[,,{3158:3144}],3144:[[3142,3158]],3149:[,9],3157:[,84],3158:[,91],3260:[,7],3263:[,,{3285:3264}],3264:[[3263,3285]],3270:[,,{3266:3274,3285:3271,3286:3272}],3271:[[3270,3285]],3272:[[3270,3286]],3274:[[3270,3266],,{3285:3275}],3275:[[3274,3285]],3277:[,9]}, -3328:{3398:[,,{3390:3402,3415:3404}],3399:[,,{3390:3403}],3402:[[3398,3390]],3403:[[3399,3390]],3404:[[3398,3415]],3405:[,9],3530:[,9],3545:[,,{3530:3546,3535:3548,3551:3550}],3546:[[3545,3530]],3548:[[3545,3535],,{3530:3549}],3549:[[3548,3530]],3550:[[3545,3551]]}, -3584:{3635:[[3661,3634],256],3640:[,103],3641:[,103],3642:[,9],3656:[,107],3657:[,107],3658:[,107],3659:[,107],3763:[[3789,3762],256],3768:[,118],3769:[,118],3784:[,122],3785:[,122],3786:[,122],3787:[,122],3804:[[3755,3737],256],3805:[[3755,3745],256]}, -3840:{3852:[[3851],256],3864:[,220],3865:[,220],3893:[,220],3895:[,220],3897:[,216],3907:[[3906,4023],512],3917:[[3916,4023],512],3922:[[3921,4023],512],3927:[[3926,4023],512],3932:[[3931,4023],512],3945:[[3904,4021],512],3953:[,129],3954:[,130],3955:[[3953,3954],512],3956:[,132],3957:[[3953,3956],512],3958:[[4018,3968],512],3959:[[4018,3969],256],3960:[[4019,3968],512],3961:[[4019,3969],256],3962:[,130],3963:[,130],3964:[,130],3965:[,130],3968:[,130],3969:[[3953,3968],512],3970:[,230],3971:[,230],3972:[,9],3974:[,230],3975:[,230],3987:[[3986,4023],512],3997:[[3996,4023],512],4002:[[4001,4023],512],4007:[[4006,4023],512],4012:[[4011,4023],512],4025:[[3984,4021],512],4038:[,220]}, -4096:{4133:[,,{4142:4134}],4134:[[4133,4142]],4151:[,7],4153:[,9],4154:[,9],4237:[,220],4348:[[4316],256],69702:[,9],69759:[,9],69785:[,,{69818:69786}],69786:[[69785,69818]],69787:[,,{69818:69788}],69788:[[69787,69818]],69797:[,,{69818:69803}],69803:[[69797,69818]],69817:[,9],69818:[,7]}, -4352:{69888:[,230],69889:[,230],69890:[,230],69934:[[69937,69927]],69935:[[69938,69927]],69937:[,,{69927:69934}],69938:[,,{69927:69935}],69939:[,9],69940:[,9],70003:[,7],70080:[,9]}, -4608:{70197:[,9],70198:[,7],70377:[,7],70378:[,9]}, -4864:{4957:[,230],4958:[,230],4959:[,230],70460:[,7],70471:[,,{70462:70475,70487:70476}],70475:[[70471,70462]],70476:[[70471,70487]],70477:[,9],70502:[,230],70503:[,230],70504:[,230],70505:[,230],70506:[,230],70507:[,230],70508:[,230],70512:[,230],70513:[,230],70514:[,230],70515:[,230],70516:[,230]}, -5120:{70841:[,,{70832:70844,70842:70843,70845:70846}],70843:[[70841,70842]],70844:[[70841,70832]],70846:[[70841,70845]],70850:[,9],70851:[,7]}, -5376:{71096:[,,{71087:71098}],71097:[,,{71087:71099}],71098:[[71096,71087]],71099:[[71097,71087]],71103:[,9],71104:[,7]}, -5632:{71231:[,9],71350:[,9],71351:[,7]}, -5888:{5908:[,9],5940:[,9],6098:[,9],6109:[,230]}, -6144:{6313:[,228]}, -6400:{6457:[,222],6458:[,230],6459:[,220]}, -6656:{6679:[,230],6680:[,220],6752:[,9],6773:[,230],6774:[,230],6775:[,230],6776:[,230],6777:[,230],6778:[,230],6779:[,230],6780:[,230],6783:[,220],6832:[,230],6833:[,230],6834:[,230],6835:[,230],6836:[,230],6837:[,220],6838:[,220],6839:[,220],6840:[,220],6841:[,220],6842:[,220],6843:[,230],6844:[,230],6845:[,220]}, -6912:{6917:[,,{6965:6918}],6918:[[6917,6965]],6919:[,,{6965:6920}],6920:[[6919,6965]],6921:[,,{6965:6922}],6922:[[6921,6965]],6923:[,,{6965:6924}],6924:[[6923,6965]],6925:[,,{6965:6926}],6926:[[6925,6965]],6929:[,,{6965:6930}],6930:[[6929,6965]],6964:[,7],6970:[,,{6965:6971}],6971:[[6970,6965]],6972:[,,{6965:6973}],6973:[[6972,6965]],6974:[,,{6965:6976}],6975:[,,{6965:6977}],6976:[[6974,6965]],6977:[[6975,6965]],6978:[,,{6965:6979}],6979:[[6978,6965]],6980:[,9],7019:[,230],7020:[,220],7021:[,230],7022:[,230],7023:[,230],7024:[,230],7025:[,230],7026:[,230],7027:[,230],7082:[,9],7083:[,9],7142:[,7],7154:[,9],7155:[,9]}, -7168:{7223:[,7],7376:[,230],7377:[,230],7378:[,230],7380:[,1],7381:[,220],7382:[,220],7383:[,220],7384:[,220],7385:[,220],7386:[,230],7387:[,230],7388:[,220],7389:[,220],7390:[,220],7391:[,220],7392:[,230],7394:[,1],7395:[,1],7396:[,1],7397:[,1],7398:[,1],7399:[,1],7400:[,1],7405:[,220],7412:[,230],7416:[,230],7417:[,230]}, -7424:{7468:[[65],256],7469:[[198],256],7470:[[66],256],7472:[[68],256],7473:[[69],256],7474:[[398],256],7475:[[71],256],7476:[[72],256],7477:[[73],256],7478:[[74],256],7479:[[75],256],7480:[[76],256],7481:[[77],256],7482:[[78],256],7484:[[79],256],7485:[[546],256],7486:[[80],256],7487:[[82],256],7488:[[84],256],7489:[[85],256],7490:[[87],256],7491:[[97],256],7492:[[592],256],7493:[[593],256],7494:[[7426],256],7495:[[98],256],7496:[[100],256],7497:[[101],256],7498:[[601],256],7499:[[603],256],7500:[[604],256],7501:[[103],256],7503:[[107],256],7504:[[109],256],7505:[[331],256],7506:[[111],256],7507:[[596],256],7508:[[7446],256],7509:[[7447],256],7510:[[112],256],7511:[[116],256],7512:[[117],256],7513:[[7453],256],7514:[[623],256],7515:[[118],256],7516:[[7461],256],7517:[[946],256],7518:[[947],256],7519:[[948],256],7520:[[966],256],7521:[[967],256],7522:[[105],256],7523:[[114],256],7524:[[117],256],7525:[[118],256],7526:[[946],256],7527:[[947],256],7528:[[961],256],7529:[[966],256],7530:[[967],256],7544:[[1085],256],7579:[[594],256],7580:[[99],256],7581:[[597],256],7582:[[240],256],7583:[[604],256],7584:[[102],256],7585:[[607],256],7586:[[609],256],7587:[[613],256],7588:[[616],256],7589:[[617],256],7590:[[618],256],7591:[[7547],256],7592:[[669],256],7593:[[621],256],7594:[[7557],256],7595:[[671],256],7596:[[625],256],7597:[[624],256],7598:[[626],256],7599:[[627],256],7600:[[628],256],7601:[[629],256],7602:[[632],256],7603:[[642],256],7604:[[643],256],7605:[[427],256],7606:[[649],256],7607:[[650],256],7608:[[7452],256],7609:[[651],256],7610:[[652],256],7611:[[122],256],7612:[[656],256],7613:[[657],256],7614:[[658],256],7615:[[952],256],7616:[,230],7617:[,230],7618:[,220],7619:[,230],7620:[,230],7621:[,230],7622:[,230],7623:[,230],7624:[,230],7625:[,230],7626:[,220],7627:[,230],7628:[,230],7629:[,234],7630:[,214],7631:[,220],7632:[,202],7633:[,230],7634:[,230],7635:[,230],7636:[,230],7637:[,230],7638:[,230],7639:[,230],7640:[,230],7641:[,230],7642:[,230],7643:[,230],7644:[,230],7645:[,230],7646:[,230],7647:[,230],7648:[,230],7649:[,230],7650:[,230],7651:[,230],7652:[,230],7653:[,230],7654:[,230],7655:[,230],7656:[,230],7657:[,230],7658:[,230],7659:[,230],7660:[,230],7661:[,230],7662:[,230],7663:[,230],7664:[,230],7665:[,230],7666:[,230],7667:[,230],7668:[,230],7669:[,230],7676:[,233],7677:[,220],7678:[,230],7679:[,220]}, -7680:{7680:[[65,805]],7681:[[97,805]],7682:[[66,775]],7683:[[98,775]],7684:[[66,803]],7685:[[98,803]],7686:[[66,817]],7687:[[98,817]],7688:[[199,769]],7689:[[231,769]],7690:[[68,775]],7691:[[100,775]],7692:[[68,803]],7693:[[100,803]],7694:[[68,817]],7695:[[100,817]],7696:[[68,807]],7697:[[100,807]],7698:[[68,813]],7699:[[100,813]],7700:[[274,768]],7701:[[275,768]],7702:[[274,769]],7703:[[275,769]],7704:[[69,813]],7705:[[101,813]],7706:[[69,816]],7707:[[101,816]],7708:[[552,774]],7709:[[553,774]],7710:[[70,775]],7711:[[102,775]],7712:[[71,772]],7713:[[103,772]],7714:[[72,775]],7715:[[104,775]],7716:[[72,803]],7717:[[104,803]],7718:[[72,776]],7719:[[104,776]],7720:[[72,807]],7721:[[104,807]],7722:[[72,814]],7723:[[104,814]],7724:[[73,816]],7725:[[105,816]],7726:[[207,769]],7727:[[239,769]],7728:[[75,769]],7729:[[107,769]],7730:[[75,803]],7731:[[107,803]],7732:[[75,817]],7733:[[107,817]],7734:[[76,803],,{772:7736}],7735:[[108,803],,{772:7737}],7736:[[7734,772]],7737:[[7735,772]],7738:[[76,817]],7739:[[108,817]],7740:[[76,813]],7741:[[108,813]],7742:[[77,769]],7743:[[109,769]],7744:[[77,775]],7745:[[109,775]],7746:[[77,803]],7747:[[109,803]],7748:[[78,775]],7749:[[110,775]],7750:[[78,803]],7751:[[110,803]],7752:[[78,817]],7753:[[110,817]],7754:[[78,813]],7755:[[110,813]],7756:[[213,769]],7757:[[245,769]],7758:[[213,776]],7759:[[245,776]],7760:[[332,768]],7761:[[333,768]],7762:[[332,769]],7763:[[333,769]],7764:[[80,769]],7765:[[112,769]],7766:[[80,775]],7767:[[112,775]],7768:[[82,775]],7769:[[114,775]],7770:[[82,803],,{772:7772}],7771:[[114,803],,{772:7773}],7772:[[7770,772]],7773:[[7771,772]],7774:[[82,817]],7775:[[114,817]],7776:[[83,775]],7777:[[115,775]],7778:[[83,803],,{775:7784}],7779:[[115,803],,{775:7785}],7780:[[346,775]],7781:[[347,775]],7782:[[352,775]],7783:[[353,775]],7784:[[7778,775]],7785:[[7779,775]],7786:[[84,775]],7787:[[116,775]],7788:[[84,803]],7789:[[116,803]],7790:[[84,817]],7791:[[116,817]],7792:[[84,813]],7793:[[116,813]],7794:[[85,804]],7795:[[117,804]],7796:[[85,816]],7797:[[117,816]],7798:[[85,813]],7799:[[117,813]],7800:[[360,769]],7801:[[361,769]],7802:[[362,776]],7803:[[363,776]],7804:[[86,771]],7805:[[118,771]],7806:[[86,803]],7807:[[118,803]],7808:[[87,768]],7809:[[119,768]],7810:[[87,769]],7811:[[119,769]],7812:[[87,776]],7813:[[119,776]],7814:[[87,775]],7815:[[119,775]],7816:[[87,803]],7817:[[119,803]],7818:[[88,775]],7819:[[120,775]],7820:[[88,776]],7821:[[120,776]],7822:[[89,775]],7823:[[121,775]],7824:[[90,770]],7825:[[122,770]],7826:[[90,803]],7827:[[122,803]],7828:[[90,817]],7829:[[122,817]],7830:[[104,817]],7831:[[116,776]],7832:[[119,778]],7833:[[121,778]],7834:[[97,702],256],7835:[[383,775]],7840:[[65,803],,{770:7852,774:7862}],7841:[[97,803],,{770:7853,774:7863}],7842:[[65,777]],7843:[[97,777]],7844:[[194,769]],7845:[[226,769]],7846:[[194,768]],7847:[[226,768]],7848:[[194,777]],7849:[[226,777]],7850:[[194,771]],7851:[[226,771]],7852:[[7840,770]],7853:[[7841,770]],7854:[[258,769]],7855:[[259,769]],7856:[[258,768]],7857:[[259,768]],7858:[[258,777]],7859:[[259,777]],7860:[[258,771]],7861:[[259,771]],7862:[[7840,774]],7863:[[7841,774]],7864:[[69,803],,{770:7878}],7865:[[101,803],,{770:7879}],7866:[[69,777]],7867:[[101,777]],7868:[[69,771]],7869:[[101,771]],7870:[[202,769]],7871:[[234,769]],7872:[[202,768]],7873:[[234,768]],7874:[[202,777]],7875:[[234,777]],7876:[[202,771]],7877:[[234,771]],7878:[[7864,770]],7879:[[7865,770]],7880:[[73,777]],7881:[[105,777]],7882:[[73,803]],7883:[[105,803]],7884:[[79,803],,{770:7896}],7885:[[111,803],,{770:7897}],7886:[[79,777]],7887:[[111,777]],7888:[[212,769]],7889:[[244,769]],7890:[[212,768]],7891:[[244,768]],7892:[[212,777]],7893:[[244,777]],7894:[[212,771]],7895:[[244,771]],7896:[[7884,770]],7897:[[7885,770]],7898:[[416,769]],7899:[[417,769]],7900:[[416,768]],7901:[[417,768]],7902:[[416,777]],7903:[[417,777]],7904:[[416,771]],7905:[[417,771]],7906:[[416,803]],7907:[[417,803]],7908:[[85,803]],7909:[[117,803]],7910:[[85,777]],7911:[[117,777]],7912:[[431,769]],7913:[[432,769]],7914:[[431,768]],7915:[[432,768]],7916:[[431,777]],7917:[[432,777]],7918:[[431,771]],7919:[[432,771]],7920:[[431,803]],7921:[[432,803]],7922:[[89,768]],7923:[[121,768]],7924:[[89,803]],7925:[[121,803]],7926:[[89,777]],7927:[[121,777]],7928:[[89,771]],7929:[[121,771]]}, -7936:{7936:[[945,787],,{768:7938,769:7940,834:7942,837:8064}],7937:[[945,788],,{768:7939,769:7941,834:7943,837:8065}],7938:[[7936,768],,{837:8066}],7939:[[7937,768],,{837:8067}],7940:[[7936,769],,{837:8068}],7941:[[7937,769],,{837:8069}],7942:[[7936,834],,{837:8070}],7943:[[7937,834],,{837:8071}],7944:[[913,787],,{768:7946,769:7948,834:7950,837:8072}],7945:[[913,788],,{768:7947,769:7949,834:7951,837:8073}],7946:[[7944,768],,{837:8074}],7947:[[7945,768],,{837:8075}],7948:[[7944,769],,{837:8076}],7949:[[7945,769],,{837:8077}],7950:[[7944,834],,{837:8078}],7951:[[7945,834],,{837:8079}],7952:[[949,787],,{768:7954,769:7956}],7953:[[949,788],,{768:7955,769:7957}],7954:[[7952,768]],7955:[[7953,768]],7956:[[7952,769]],7957:[[7953,769]],7960:[[917,787],,{768:7962,769:7964}],7961:[[917,788],,{768:7963,769:7965}],7962:[[7960,768]],7963:[[7961,768]],7964:[[7960,769]],7965:[[7961,769]],7968:[[951,787],,{768:7970,769:7972,834:7974,837:8080}],7969:[[951,788],,{768:7971,769:7973,834:7975,837:8081}],7970:[[7968,768],,{837:8082}],7971:[[7969,768],,{837:8083}],7972:[[7968,769],,{837:8084}],7973:[[7969,769],,{837:8085}],7974:[[7968,834],,{837:8086}],7975:[[7969,834],,{837:8087}],7976:[[919,787],,{768:7978,769:7980,834:7982,837:8088}],7977:[[919,788],,{768:7979,769:7981,834:7983,837:8089}],7978:[[7976,768],,{837:8090}],7979:[[7977,768],,{837:8091}],7980:[[7976,769],,{837:8092}],7981:[[7977,769],,{837:8093}],7982:[[7976,834],,{837:8094}],7983:[[7977,834],,{837:8095}],7984:[[953,787],,{768:7986,769:7988,834:7990}],7985:[[953,788],,{768:7987,769:7989,834:7991}],7986:[[7984,768]],7987:[[7985,768]],7988:[[7984,769]],7989:[[7985,769]],7990:[[7984,834]],7991:[[7985,834]],7992:[[921,787],,{768:7994,769:7996,834:7998}],7993:[[921,788],,{768:7995,769:7997,834:7999}],7994:[[7992,768]],7995:[[7993,768]],7996:[[7992,769]],7997:[[7993,769]],7998:[[7992,834]],7999:[[7993,834]],8000:[[959,787],,{768:8002,769:8004}],8001:[[959,788],,{768:8003,769:8005}],8002:[[8000,768]],8003:[[8001,768]],8004:[[8000,769]],8005:[[8001,769]],8008:[[927,787],,{768:8010,769:8012}],8009:[[927,788],,{768:8011,769:8013}],8010:[[8008,768]],8011:[[8009,768]],8012:[[8008,769]],8013:[[8009,769]],8016:[[965,787],,{768:8018,769:8020,834:8022}],8017:[[965,788],,{768:8019,769:8021,834:8023}],8018:[[8016,768]],8019:[[8017,768]],8020:[[8016,769]],8021:[[8017,769]],8022:[[8016,834]],8023:[[8017,834]],8025:[[933,788],,{768:8027,769:8029,834:8031}],8027:[[8025,768]],8029:[[8025,769]],8031:[[8025,834]],8032:[[969,787],,{768:8034,769:8036,834:8038,837:8096}],8033:[[969,788],,{768:8035,769:8037,834:8039,837:8097}],8034:[[8032,768],,{837:8098}],8035:[[8033,768],,{837:8099}],8036:[[8032,769],,{837:8100}],8037:[[8033,769],,{837:8101}],8038:[[8032,834],,{837:8102}],8039:[[8033,834],,{837:8103}],8040:[[937,787],,{768:8042,769:8044,834:8046,837:8104}],8041:[[937,788],,{768:8043,769:8045,834:8047,837:8105}],8042:[[8040,768],,{837:8106}],8043:[[8041,768],,{837:8107}],8044:[[8040,769],,{837:8108}],8045:[[8041,769],,{837:8109}],8046:[[8040,834],,{837:8110}],8047:[[8041,834],,{837:8111}],8048:[[945,768],,{837:8114}],8049:[[940]],8050:[[949,768]],8051:[[941]],8052:[[951,768],,{837:8130}],8053:[[942]],8054:[[953,768]],8055:[[943]],8056:[[959,768]],8057:[[972]],8058:[[965,768]],8059:[[973]],8060:[[969,768],,{837:8178}],8061:[[974]],8064:[[7936,837]],8065:[[7937,837]],8066:[[7938,837]],8067:[[7939,837]],8068:[[7940,837]],8069:[[7941,837]],8070:[[7942,837]],8071:[[7943,837]],8072:[[7944,837]],8073:[[7945,837]],8074:[[7946,837]],8075:[[7947,837]],8076:[[7948,837]],8077:[[7949,837]],8078:[[7950,837]],8079:[[7951,837]],8080:[[7968,837]],8081:[[7969,837]],8082:[[7970,837]],8083:[[7971,837]],8084:[[7972,837]],8085:[[7973,837]],8086:[[7974,837]],8087:[[7975,837]],8088:[[7976,837]],8089:[[7977,837]],8090:[[7978,837]],8091:[[7979,837]],8092:[[7980,837]],8093:[[7981,837]],8094:[[7982,837]],8095:[[7983,837]],8096:[[8032,837]],8097:[[8033,837]],8098:[[8034,837]],8099:[[8035,837]],8100:[[8036,837]],8101:[[8037,837]],8102:[[8038,837]],8103:[[8039,837]],8104:[[8040,837]],8105:[[8041,837]],8106:[[8042,837]],8107:[[8043,837]],8108:[[8044,837]],8109:[[8045,837]],8110:[[8046,837]],8111:[[8047,837]],8112:[[945,774]],8113:[[945,772]],8114:[[8048,837]],8115:[[945,837]],8116:[[940,837]],8118:[[945,834],,{837:8119}],8119:[[8118,837]],8120:[[913,774]],8121:[[913,772]],8122:[[913,768]],8123:[[902]],8124:[[913,837]],8125:[[32,787],256],8126:[[953]],8127:[[32,787],256,{768:8141,769:8142,834:8143}],8128:[[32,834],256],8129:[[168,834]],8130:[[8052,837]],8131:[[951,837]],8132:[[942,837]],8134:[[951,834],,{837:8135}],8135:[[8134,837]],8136:[[917,768]],8137:[[904]],8138:[[919,768]],8139:[[905]],8140:[[919,837]],8141:[[8127,768]],8142:[[8127,769]],8143:[[8127,834]],8144:[[953,774]],8145:[[953,772]],8146:[[970,768]],8147:[[912]],8150:[[953,834]],8151:[[970,834]],8152:[[921,774]],8153:[[921,772]],8154:[[921,768]],8155:[[906]],8157:[[8190,768]],8158:[[8190,769]],8159:[[8190,834]],8160:[[965,774]],8161:[[965,772]],8162:[[971,768]],8163:[[944]],8164:[[961,787]],8165:[[961,788]],8166:[[965,834]],8167:[[971,834]],8168:[[933,774]],8169:[[933,772]],8170:[[933,768]],8171:[[910]],8172:[[929,788]],8173:[[168,768]],8174:[[901]],8175:[[96]],8178:[[8060,837]],8179:[[969,837]],8180:[[974,837]],8182:[[969,834],,{837:8183}],8183:[[8182,837]],8184:[[927,768]],8185:[[908]],8186:[[937,768]],8187:[[911]],8188:[[937,837]],8189:[[180]],8190:[[32,788],256,{768:8157,769:8158,834:8159}]}, -8192:{8192:[[8194]],8193:[[8195]],8194:[[32],256],8195:[[32],256],8196:[[32],256],8197:[[32],256],8198:[[32],256],8199:[[32],256],8200:[[32],256],8201:[[32],256],8202:[[32],256],8209:[[8208],256],8215:[[32,819],256],8228:[[46],256],8229:[[46,46],256],8230:[[46,46,46],256],8239:[[32],256],8243:[[8242,8242],256],8244:[[8242,8242,8242],256],8246:[[8245,8245],256],8247:[[8245,8245,8245],256],8252:[[33,33],256],8254:[[32,773],256],8263:[[63,63],256],8264:[[63,33],256],8265:[[33,63],256],8279:[[8242,8242,8242,8242],256],8287:[[32],256],8304:[[48],256],8305:[[105],256],8308:[[52],256],8309:[[53],256],8310:[[54],256],8311:[[55],256],8312:[[56],256],8313:[[57],256],8314:[[43],256],8315:[[8722],256],8316:[[61],256],8317:[[40],256],8318:[[41],256],8319:[[110],256],8320:[[48],256],8321:[[49],256],8322:[[50],256],8323:[[51],256],8324:[[52],256],8325:[[53],256],8326:[[54],256],8327:[[55],256],8328:[[56],256],8329:[[57],256],8330:[[43],256],8331:[[8722],256],8332:[[61],256],8333:[[40],256],8334:[[41],256],8336:[[97],256],8337:[[101],256],8338:[[111],256],8339:[[120],256],8340:[[601],256],8341:[[104],256],8342:[[107],256],8343:[[108],256],8344:[[109],256],8345:[[110],256],8346:[[112],256],8347:[[115],256],8348:[[116],256],8360:[[82,115],256],8400:[,230],8401:[,230],8402:[,1],8403:[,1],8404:[,230],8405:[,230],8406:[,230],8407:[,230],8408:[,1],8409:[,1],8410:[,1],8411:[,230],8412:[,230],8417:[,230],8421:[,1],8422:[,1],8423:[,230],8424:[,220],8425:[,230],8426:[,1],8427:[,1],8428:[,220],8429:[,220],8430:[,220],8431:[,220],8432:[,230]}, -8448:{8448:[[97,47,99],256],8449:[[97,47,115],256],8450:[[67],256],8451:[[176,67],256],8453:[[99,47,111],256],8454:[[99,47,117],256],8455:[[400],256],8457:[[176,70],256],8458:[[103],256],8459:[[72],256],8460:[[72],256],8461:[[72],256],8462:[[104],256],8463:[[295],256],8464:[[73],256],8465:[[73],256],8466:[[76],256],8467:[[108],256],8469:[[78],256],8470:[[78,111],256],8473:[[80],256],8474:[[81],256],8475:[[82],256],8476:[[82],256],8477:[[82],256],8480:[[83,77],256],8481:[[84,69,76],256],8482:[[84,77],256],8484:[[90],256],8486:[[937]],8488:[[90],256],8490:[[75]],8491:[[197]],8492:[[66],256],8493:[[67],256],8495:[[101],256],8496:[[69],256],8497:[[70],256],8499:[[77],256],8500:[[111],256],8501:[[1488],256],8502:[[1489],256],8503:[[1490],256],8504:[[1491],256],8505:[[105],256],8507:[[70,65,88],256],8508:[[960],256],8509:[[947],256],8510:[[915],256],8511:[[928],256],8512:[[8721],256],8517:[[68],256],8518:[[100],256],8519:[[101],256],8520:[[105],256],8521:[[106],256],8528:[[49,8260,55],256],8529:[[49,8260,57],256],8530:[[49,8260,49,48],256],8531:[[49,8260,51],256],8532:[[50,8260,51],256],8533:[[49,8260,53],256],8534:[[50,8260,53],256],8535:[[51,8260,53],256],8536:[[52,8260,53],256],8537:[[49,8260,54],256],8538:[[53,8260,54],256],8539:[[49,8260,56],256],8540:[[51,8260,56],256],8541:[[53,8260,56],256],8542:[[55,8260,56],256],8543:[[49,8260],256],8544:[[73],256],8545:[[73,73],256],8546:[[73,73,73],256],8547:[[73,86],256],8548:[[86],256],8549:[[86,73],256],8550:[[86,73,73],256],8551:[[86,73,73,73],256],8552:[[73,88],256],8553:[[88],256],8554:[[88,73],256],8555:[[88,73,73],256],8556:[[76],256],8557:[[67],256],8558:[[68],256],8559:[[77],256],8560:[[105],256],8561:[[105,105],256],8562:[[105,105,105],256],8563:[[105,118],256],8564:[[118],256],8565:[[118,105],256],8566:[[118,105,105],256],8567:[[118,105,105,105],256],8568:[[105,120],256],8569:[[120],256],8570:[[120,105],256],8571:[[120,105,105],256],8572:[[108],256],8573:[[99],256],8574:[[100],256],8575:[[109],256],8585:[[48,8260,51],256],8592:[,,{824:8602}],8594:[,,{824:8603}],8596:[,,{824:8622}],8602:[[8592,824]],8603:[[8594,824]],8622:[[8596,824]],8653:[[8656,824]],8654:[[8660,824]],8655:[[8658,824]],8656:[,,{824:8653}],8658:[,,{824:8655}],8660:[,,{824:8654}]}, -8704:{8707:[,,{824:8708}],8708:[[8707,824]],8712:[,,{824:8713}],8713:[[8712,824]],8715:[,,{824:8716}],8716:[[8715,824]],8739:[,,{824:8740}],8740:[[8739,824]],8741:[,,{824:8742}],8742:[[8741,824]],8748:[[8747,8747],256],8749:[[8747,8747,8747],256],8751:[[8750,8750],256],8752:[[8750,8750,8750],256],8764:[,,{824:8769}],8769:[[8764,824]],8771:[,,{824:8772}],8772:[[8771,824]],8773:[,,{824:8775}],8775:[[8773,824]],8776:[,,{824:8777}],8777:[[8776,824]],8781:[,,{824:8813}],8800:[[61,824]],8801:[,,{824:8802}],8802:[[8801,824]],8804:[,,{824:8816}],8805:[,,{824:8817}],8813:[[8781,824]],8814:[[60,824]],8815:[[62,824]],8816:[[8804,824]],8817:[[8805,824]],8818:[,,{824:8820}],8819:[,,{824:8821}],8820:[[8818,824]],8821:[[8819,824]],8822:[,,{824:8824}],8823:[,,{824:8825}],8824:[[8822,824]],8825:[[8823,824]],8826:[,,{824:8832}],8827:[,,{824:8833}],8828:[,,{824:8928}],8829:[,,{824:8929}],8832:[[8826,824]],8833:[[8827,824]],8834:[,,{824:8836}],8835:[,,{824:8837}],8836:[[8834,824]],8837:[[8835,824]],8838:[,,{824:8840}],8839:[,,{824:8841}],8840:[[8838,824]],8841:[[8839,824]],8849:[,,{824:8930}],8850:[,,{824:8931}],8866:[,,{824:8876}],8872:[,,{824:8877}],8873:[,,{824:8878}],8875:[,,{824:8879}],8876:[[8866,824]],8877:[[8872,824]],8878:[[8873,824]],8879:[[8875,824]],8882:[,,{824:8938}],8883:[,,{824:8939}],8884:[,,{824:8940}],8885:[,,{824:8941}],8928:[[8828,824]],8929:[[8829,824]],8930:[[8849,824]],8931:[[8850,824]],8938:[[8882,824]],8939:[[8883,824]],8940:[[8884,824]],8941:[[8885,824]]}, -8960:{9001:[[12296]],9002:[[12297]]}, -9216:{9312:[[49],256],9313:[[50],256],9314:[[51],256],9315:[[52],256],9316:[[53],256],9317:[[54],256],9318:[[55],256],9319:[[56],256],9320:[[57],256],9321:[[49,48],256],9322:[[49,49],256],9323:[[49,50],256],9324:[[49,51],256],9325:[[49,52],256],9326:[[49,53],256],9327:[[49,54],256],9328:[[49,55],256],9329:[[49,56],256],9330:[[49,57],256],9331:[[50,48],256],9332:[[40,49,41],256],9333:[[40,50,41],256],9334:[[40,51,41],256],9335:[[40,52,41],256],9336:[[40,53,41],256],9337:[[40,54,41],256],9338:[[40,55,41],256],9339:[[40,56,41],256],9340:[[40,57,41],256],9341:[[40,49,48,41],256],9342:[[40,49,49,41],256],9343:[[40,49,50,41],256],9344:[[40,49,51,41],256],9345:[[40,49,52,41],256],9346:[[40,49,53,41],256],9347:[[40,49,54,41],256],9348:[[40,49,55,41],256],9349:[[40,49,56,41],256],9350:[[40,49,57,41],256],9351:[[40,50,48,41],256],9352:[[49,46],256],9353:[[50,46],256],9354:[[51,46],256],9355:[[52,46],256],9356:[[53,46],256],9357:[[54,46],256],9358:[[55,46],256],9359:[[56,46],256],9360:[[57,46],256],9361:[[49,48,46],256],9362:[[49,49,46],256],9363:[[49,50,46],256],9364:[[49,51,46],256],9365:[[49,52,46],256],9366:[[49,53,46],256],9367:[[49,54,46],256],9368:[[49,55,46],256],9369:[[49,56,46],256],9370:[[49,57,46],256],9371:[[50,48,46],256],9372:[[40,97,41],256],9373:[[40,98,41],256],9374:[[40,99,41],256],9375:[[40,100,41],256],9376:[[40,101,41],256],9377:[[40,102,41],256],9378:[[40,103,41],256],9379:[[40,104,41],256],9380:[[40,105,41],256],9381:[[40,106,41],256],9382:[[40,107,41],256],9383:[[40,108,41],256],9384:[[40,109,41],256],9385:[[40,110,41],256],9386:[[40,111,41],256],9387:[[40,112,41],256],9388:[[40,113,41],256],9389:[[40,114,41],256],9390:[[40,115,41],256],9391:[[40,116,41],256],9392:[[40,117,41],256],9393:[[40,118,41],256],9394:[[40,119,41],256],9395:[[40,120,41],256],9396:[[40,121,41],256],9397:[[40,122,41],256],9398:[[65],256],9399:[[66],256],9400:[[67],256],9401:[[68],256],9402:[[69],256],9403:[[70],256],9404:[[71],256],9405:[[72],256],9406:[[73],256],9407:[[74],256],9408:[[75],256],9409:[[76],256],9410:[[77],256],9411:[[78],256],9412:[[79],256],9413:[[80],256],9414:[[81],256],9415:[[82],256],9416:[[83],256],9417:[[84],256],9418:[[85],256],9419:[[86],256],9420:[[87],256],9421:[[88],256],9422:[[89],256],9423:[[90],256],9424:[[97],256],9425:[[98],256],9426:[[99],256],9427:[[100],256],9428:[[101],256],9429:[[102],256],9430:[[103],256],9431:[[104],256],9432:[[105],256],9433:[[106],256],9434:[[107],256],9435:[[108],256],9436:[[109],256],9437:[[110],256],9438:[[111],256],9439:[[112],256],9440:[[113],256],9441:[[114],256],9442:[[115],256],9443:[[116],256],9444:[[117],256],9445:[[118],256],9446:[[119],256],9447:[[120],256],9448:[[121],256],9449:[[122],256],9450:[[48],256]}, -10752:{10764:[[8747,8747,8747,8747],256],10868:[[58,58,61],256],10869:[[61,61],256],10870:[[61,61,61],256],10972:[[10973,824],512]}, -11264:{11388:[[106],256],11389:[[86],256],11503:[,230],11504:[,230],11505:[,230]}, -11520:{11631:[[11617],256],11647:[,9],11744:[,230],11745:[,230],11746:[,230],11747:[,230],11748:[,230],11749:[,230],11750:[,230],11751:[,230],11752:[,230],11753:[,230],11754:[,230],11755:[,230],11756:[,230],11757:[,230],11758:[,230],11759:[,230],11760:[,230],11761:[,230],11762:[,230],11763:[,230],11764:[,230],11765:[,230],11766:[,230],11767:[,230],11768:[,230],11769:[,230],11770:[,230],11771:[,230],11772:[,230],11773:[,230],11774:[,230],11775:[,230]}, -11776:{11935:[[27597],256],12019:[[40863],256]}, -12032:{12032:[[19968],256],12033:[[20008],256],12034:[[20022],256],12035:[[20031],256],12036:[[20057],256],12037:[[20101],256],12038:[[20108],256],12039:[[20128],256],12040:[[20154],256],12041:[[20799],256],12042:[[20837],256],12043:[[20843],256],12044:[[20866],256],12045:[[20886],256],12046:[[20907],256],12047:[[20960],256],12048:[[20981],256],12049:[[20992],256],12050:[[21147],256],12051:[[21241],256],12052:[[21269],256],12053:[[21274],256],12054:[[21304],256],12055:[[21313],256],12056:[[21340],256],12057:[[21353],256],12058:[[21378],256],12059:[[21430],256],12060:[[21448],256],12061:[[21475],256],12062:[[22231],256],12063:[[22303],256],12064:[[22763],256],12065:[[22786],256],12066:[[22794],256],12067:[[22805],256],12068:[[22823],256],12069:[[22899],256],12070:[[23376],256],12071:[[23424],256],12072:[[23544],256],12073:[[23567],256],12074:[[23586],256],12075:[[23608],256],12076:[[23662],256],12077:[[23665],256],12078:[[24027],256],12079:[[24037],256],12080:[[24049],256],12081:[[24062],256],12082:[[24178],256],12083:[[24186],256],12084:[[24191],256],12085:[[24308],256],12086:[[24318],256],12087:[[24331],256],12088:[[24339],256],12089:[[24400],256],12090:[[24417],256],12091:[[24435],256],12092:[[24515],256],12093:[[25096],256],12094:[[25142],256],12095:[[25163],256],12096:[[25903],256],12097:[[25908],256],12098:[[25991],256],12099:[[26007],256],12100:[[26020],256],12101:[[26041],256],12102:[[26080],256],12103:[[26085],256],12104:[[26352],256],12105:[[26376],256],12106:[[26408],256],12107:[[27424],256],12108:[[27490],256],12109:[[27513],256],12110:[[27571],256],12111:[[27595],256],12112:[[27604],256],12113:[[27611],256],12114:[[27663],256],12115:[[27668],256],12116:[[27700],256],12117:[[28779],256],12118:[[29226],256],12119:[[29238],256],12120:[[29243],256],12121:[[29247],256],12122:[[29255],256],12123:[[29273],256],12124:[[29275],256],12125:[[29356],256],12126:[[29572],256],12127:[[29577],256],12128:[[29916],256],12129:[[29926],256],12130:[[29976],256],12131:[[29983],256],12132:[[29992],256],12133:[[30000],256],12134:[[30091],256],12135:[[30098],256],12136:[[30326],256],12137:[[30333],256],12138:[[30382],256],12139:[[30399],256],12140:[[30446],256],12141:[[30683],256],12142:[[30690],256],12143:[[30707],256],12144:[[31034],256],12145:[[31160],256],12146:[[31166],256],12147:[[31348],256],12148:[[31435],256],12149:[[31481],256],12150:[[31859],256],12151:[[31992],256],12152:[[32566],256],12153:[[32593],256],12154:[[32650],256],12155:[[32701],256],12156:[[32769],256],12157:[[32780],256],12158:[[32786],256],12159:[[32819],256],12160:[[32895],256],12161:[[32905],256],12162:[[33251],256],12163:[[33258],256],12164:[[33267],256],12165:[[33276],256],12166:[[33292],256],12167:[[33307],256],12168:[[33311],256],12169:[[33390],256],12170:[[33394],256],12171:[[33400],256],12172:[[34381],256],12173:[[34411],256],12174:[[34880],256],12175:[[34892],256],12176:[[34915],256],12177:[[35198],256],12178:[[35211],256],12179:[[35282],256],12180:[[35328],256],12181:[[35895],256],12182:[[35910],256],12183:[[35925],256],12184:[[35960],256],12185:[[35997],256],12186:[[36196],256],12187:[[36208],256],12188:[[36275],256],12189:[[36523],256],12190:[[36554],256],12191:[[36763],256],12192:[[36784],256],12193:[[36789],256],12194:[[37009],256],12195:[[37193],256],12196:[[37318],256],12197:[[37324],256],12198:[[37329],256],12199:[[38263],256],12200:[[38272],256],12201:[[38428],256],12202:[[38582],256],12203:[[38585],256],12204:[[38632],256],12205:[[38737],256],12206:[[38750],256],12207:[[38754],256],12208:[[38761],256],12209:[[38859],256],12210:[[38893],256],12211:[[38899],256],12212:[[38913],256],12213:[[39080],256],12214:[[39131],256],12215:[[39135],256],12216:[[39318],256],12217:[[39321],256],12218:[[39340],256],12219:[[39592],256],12220:[[39640],256],12221:[[39647],256],12222:[[39717],256],12223:[[39727],256],12224:[[39730],256],12225:[[39740],256],12226:[[39770],256],12227:[[40165],256],12228:[[40565],256],12229:[[40575],256],12230:[[40613],256],12231:[[40635],256],12232:[[40643],256],12233:[[40653],256],12234:[[40657],256],12235:[[40697],256],12236:[[40701],256],12237:[[40718],256],12238:[[40723],256],12239:[[40736],256],12240:[[40763],256],12241:[[40778],256],12242:[[40786],256],12243:[[40845],256],12244:[[40860],256],12245:[[40864],256]}, -12288:{12288:[[32],256],12330:[,218],12331:[,228],12332:[,232],12333:[,222],12334:[,224],12335:[,224],12342:[[12306],256],12344:[[21313],256],12345:[[21316],256],12346:[[21317],256],12358:[,,{12441:12436}],12363:[,,{12441:12364}],12364:[[12363,12441]],12365:[,,{12441:12366}],12366:[[12365,12441]],12367:[,,{12441:12368}],12368:[[12367,12441]],12369:[,,{12441:12370}],12370:[[12369,12441]],12371:[,,{12441:12372}],12372:[[12371,12441]],12373:[,,{12441:12374}],12374:[[12373,12441]],12375:[,,{12441:12376}],12376:[[12375,12441]],12377:[,,{12441:12378}],12378:[[12377,12441]],12379:[,,{12441:12380}],12380:[[12379,12441]],12381:[,,{12441:12382}],12382:[[12381,12441]],12383:[,,{12441:12384}],12384:[[12383,12441]],12385:[,,{12441:12386}],12386:[[12385,12441]],12388:[,,{12441:12389}],12389:[[12388,12441]],12390:[,,{12441:12391}],12391:[[12390,12441]],12392:[,,{12441:12393}],12393:[[12392,12441]],12399:[,,{12441:12400,12442:12401}],12400:[[12399,12441]],12401:[[12399,12442]],12402:[,,{12441:12403,12442:12404}],12403:[[12402,12441]],12404:[[12402,12442]],12405:[,,{12441:12406,12442:12407}],12406:[[12405,12441]],12407:[[12405,12442]],12408:[,,{12441:12409,12442:12410}],12409:[[12408,12441]],12410:[[12408,12442]],12411:[,,{12441:12412,12442:12413}],12412:[[12411,12441]],12413:[[12411,12442]],12436:[[12358,12441]],12441:[,8],12442:[,8],12443:[[32,12441],256],12444:[[32,12442],256],12445:[,,{12441:12446}],12446:[[12445,12441]],12447:[[12424,12426],256],12454:[,,{12441:12532}],12459:[,,{12441:12460}],12460:[[12459,12441]],12461:[,,{12441:12462}],12462:[[12461,12441]],12463:[,,{12441:12464}],12464:[[12463,12441]],12465:[,,{12441:12466}],12466:[[12465,12441]],12467:[,,{12441:12468}],12468:[[12467,12441]],12469:[,,{12441:12470}],12470:[[12469,12441]],12471:[,,{12441:12472}],12472:[[12471,12441]],12473:[,,{12441:12474}],12474:[[12473,12441]],12475:[,,{12441:12476}],12476:[[12475,12441]],12477:[,,{12441:12478}],12478:[[12477,12441]],12479:[,,{12441:12480}],12480:[[12479,12441]],12481:[,,{12441:12482}],12482:[[12481,12441]],12484:[,,{12441:12485}],12485:[[12484,12441]],12486:[,,{12441:12487}],12487:[[12486,12441]],12488:[,,{12441:12489}],12489:[[12488,12441]],12495:[,,{12441:12496,12442:12497}],12496:[[12495,12441]],12497:[[12495,12442]],12498:[,,{12441:12499,12442:12500}],12499:[[12498,12441]],12500:[[12498,12442]],12501:[,,{12441:12502,12442:12503}],12502:[[12501,12441]],12503:[[12501,12442]],12504:[,,{12441:12505,12442:12506}],12505:[[12504,12441]],12506:[[12504,12442]],12507:[,,{12441:12508,12442:12509}],12508:[[12507,12441]],12509:[[12507,12442]],12527:[,,{12441:12535}],12528:[,,{12441:12536}],12529:[,,{12441:12537}],12530:[,,{12441:12538}],12532:[[12454,12441]],12535:[[12527,12441]],12536:[[12528,12441]],12537:[[12529,12441]],12538:[[12530,12441]],12541:[,,{12441:12542}],12542:[[12541,12441]],12543:[[12467,12488],256]}, -12544:{12593:[[4352],256],12594:[[4353],256],12595:[[4522],256],12596:[[4354],256],12597:[[4524],256],12598:[[4525],256],12599:[[4355],256],12600:[[4356],256],12601:[[4357],256],12602:[[4528],256],12603:[[4529],256],12604:[[4530],256],12605:[[4531],256],12606:[[4532],256],12607:[[4533],256],12608:[[4378],256],12609:[[4358],256],12610:[[4359],256],12611:[[4360],256],12612:[[4385],256],12613:[[4361],256],12614:[[4362],256],12615:[[4363],256],12616:[[4364],256],12617:[[4365],256],12618:[[4366],256],12619:[[4367],256],12620:[[4368],256],12621:[[4369],256],12622:[[4370],256],12623:[[4449],256],12624:[[4450],256],12625:[[4451],256],12626:[[4452],256],12627:[[4453],256],12628:[[4454],256],12629:[[4455],256],12630:[[4456],256],12631:[[4457],256],12632:[[4458],256],12633:[[4459],256],12634:[[4460],256],12635:[[4461],256],12636:[[4462],256],12637:[[4463],256],12638:[[4464],256],12639:[[4465],256],12640:[[4466],256],12641:[[4467],256],12642:[[4468],256],12643:[[4469],256],12644:[[4448],256],12645:[[4372],256],12646:[[4373],256],12647:[[4551],256],12648:[[4552],256],12649:[[4556],256],12650:[[4558],256],12651:[[4563],256],12652:[[4567],256],12653:[[4569],256],12654:[[4380],256],12655:[[4573],256],12656:[[4575],256],12657:[[4381],256],12658:[[4382],256],12659:[[4384],256],12660:[[4386],256],12661:[[4387],256],12662:[[4391],256],12663:[[4393],256],12664:[[4395],256],12665:[[4396],256],12666:[[4397],256],12667:[[4398],256],12668:[[4399],256],12669:[[4402],256],12670:[[4406],256],12671:[[4416],256],12672:[[4423],256],12673:[[4428],256],12674:[[4593],256],12675:[[4594],256],12676:[[4439],256],12677:[[4440],256],12678:[[4441],256],12679:[[4484],256],12680:[[4485],256],12681:[[4488],256],12682:[[4497],256],12683:[[4498],256],12684:[[4500],256],12685:[[4510],256],12686:[[4513],256],12690:[[19968],256],12691:[[20108],256],12692:[[19977],256],12693:[[22235],256],12694:[[19978],256],12695:[[20013],256],12696:[[19979],256],12697:[[30002],256],12698:[[20057],256],12699:[[19993],256],12700:[[19969],256],12701:[[22825],256],12702:[[22320],256],12703:[[20154],256]}, -12800:{12800:[[40,4352,41],256],12801:[[40,4354,41],256],12802:[[40,4355,41],256],12803:[[40,4357,41],256],12804:[[40,4358,41],256],12805:[[40,4359,41],256],12806:[[40,4361,41],256],12807:[[40,4363,41],256],12808:[[40,4364,41],256],12809:[[40,4366,41],256],12810:[[40,4367,41],256],12811:[[40,4368,41],256],12812:[[40,4369,41],256],12813:[[40,4370,41],256],12814:[[40,4352,4449,41],256],12815:[[40,4354,4449,41],256],12816:[[40,4355,4449,41],256],12817:[[40,4357,4449,41],256],12818:[[40,4358,4449,41],256],12819:[[40,4359,4449,41],256],12820:[[40,4361,4449,41],256],12821:[[40,4363,4449,41],256],12822:[[40,4364,4449,41],256],12823:[[40,4366,4449,41],256],12824:[[40,4367,4449,41],256],12825:[[40,4368,4449,41],256],12826:[[40,4369,4449,41],256],12827:[[40,4370,4449,41],256],12828:[[40,4364,4462,41],256],12829:[[40,4363,4457,4364,4453,4523,41],256],12830:[[40,4363,4457,4370,4462,41],256],12832:[[40,19968,41],256],12833:[[40,20108,41],256],12834:[[40,19977,41],256],12835:[[40,22235,41],256],12836:[[40,20116,41],256],12837:[[40,20845,41],256],12838:[[40,19971,41],256],12839:[[40,20843,41],256],12840:[[40,20061,41],256],12841:[[40,21313,41],256],12842:[[40,26376,41],256],12843:[[40,28779,41],256],12844:[[40,27700,41],256],12845:[[40,26408,41],256],12846:[[40,37329,41],256],12847:[[40,22303,41],256],12848:[[40,26085,41],256],12849:[[40,26666,41],256],12850:[[40,26377,41],256],12851:[[40,31038,41],256],12852:[[40,21517,41],256],12853:[[40,29305,41],256],12854:[[40,36001,41],256],12855:[[40,31069,41],256],12856:[[40,21172,41],256],12857:[[40,20195,41],256],12858:[[40,21628,41],256],12859:[[40,23398,41],256],12860:[[40,30435,41],256],12861:[[40,20225,41],256],12862:[[40,36039,41],256],12863:[[40,21332,41],256],12864:[[40,31085,41],256],12865:[[40,20241,41],256],12866:[[40,33258,41],256],12867:[[40,33267,41],256],12868:[[21839],256],12869:[[24188],256],12870:[[25991],256],12871:[[31631],256],12880:[[80,84,69],256],12881:[[50,49],256],12882:[[50,50],256],12883:[[50,51],256],12884:[[50,52],256],12885:[[50,53],256],12886:[[50,54],256],12887:[[50,55],256],12888:[[50,56],256],12889:[[50,57],256],12890:[[51,48],256],12891:[[51,49],256],12892:[[51,50],256],12893:[[51,51],256],12894:[[51,52],256],12895:[[51,53],256],12896:[[4352],256],12897:[[4354],256],12898:[[4355],256],12899:[[4357],256],12900:[[4358],256],12901:[[4359],256],12902:[[4361],256],12903:[[4363],256],12904:[[4364],256],12905:[[4366],256],12906:[[4367],256],12907:[[4368],256],12908:[[4369],256],12909:[[4370],256],12910:[[4352,4449],256],12911:[[4354,4449],256],12912:[[4355,4449],256],12913:[[4357,4449],256],12914:[[4358,4449],256],12915:[[4359,4449],256],12916:[[4361,4449],256],12917:[[4363,4449],256],12918:[[4364,4449],256],12919:[[4366,4449],256],12920:[[4367,4449],256],12921:[[4368,4449],256],12922:[[4369,4449],256],12923:[[4370,4449],256],12924:[[4366,4449,4535,4352,4457],256],12925:[[4364,4462,4363,4468],256],12926:[[4363,4462],256],12928:[[19968],256],12929:[[20108],256],12930:[[19977],256],12931:[[22235],256],12932:[[20116],256],12933:[[20845],256],12934:[[19971],256],12935:[[20843],256],12936:[[20061],256],12937:[[21313],256],12938:[[26376],256],12939:[[28779],256],12940:[[27700],256],12941:[[26408],256],12942:[[37329],256],12943:[[22303],256],12944:[[26085],256],12945:[[26666],256],12946:[[26377],256],12947:[[31038],256],12948:[[21517],256],12949:[[29305],256],12950:[[36001],256],12951:[[31069],256],12952:[[21172],256],12953:[[31192],256],12954:[[30007],256],12955:[[22899],256],12956:[[36969],256],12957:[[20778],256],12958:[[21360],256],12959:[[27880],256],12960:[[38917],256],12961:[[20241],256],12962:[[20889],256],12963:[[27491],256],12964:[[19978],256],12965:[[20013],256],12966:[[19979],256],12967:[[24038],256],12968:[[21491],256],12969:[[21307],256],12970:[[23447],256],12971:[[23398],256],12972:[[30435],256],12973:[[20225],256],12974:[[36039],256],12975:[[21332],256],12976:[[22812],256],12977:[[51,54],256],12978:[[51,55],256],12979:[[51,56],256],12980:[[51,57],256],12981:[[52,48],256],12982:[[52,49],256],12983:[[52,50],256],12984:[[52,51],256],12985:[[52,52],256],12986:[[52,53],256],12987:[[52,54],256],12988:[[52,55],256],12989:[[52,56],256],12990:[[52,57],256],12991:[[53,48],256],12992:[[49,26376],256],12993:[[50,26376],256],12994:[[51,26376],256],12995:[[52,26376],256],12996:[[53,26376],256],12997:[[54,26376],256],12998:[[55,26376],256],12999:[[56,26376],256],13000:[[57,26376],256],13001:[[49,48,26376],256],13002:[[49,49,26376],256],13003:[[49,50,26376],256],13004:[[72,103],256],13005:[[101,114,103],256],13006:[[101,86],256],13007:[[76,84,68],256],13008:[[12450],256],13009:[[12452],256],13010:[[12454],256],13011:[[12456],256],13012:[[12458],256],13013:[[12459],256],13014:[[12461],256],13015:[[12463],256],13016:[[12465],256],13017:[[12467],256],13018:[[12469],256],13019:[[12471],256],13020:[[12473],256],13021:[[12475],256],13022:[[12477],256],13023:[[12479],256],13024:[[12481],256],13025:[[12484],256],13026:[[12486],256],13027:[[12488],256],13028:[[12490],256],13029:[[12491],256],13030:[[12492],256],13031:[[12493],256],13032:[[12494],256],13033:[[12495],256],13034:[[12498],256],13035:[[12501],256],13036:[[12504],256],13037:[[12507],256],13038:[[12510],256],13039:[[12511],256],13040:[[12512],256],13041:[[12513],256],13042:[[12514],256],13043:[[12516],256],13044:[[12518],256],13045:[[12520],256],13046:[[12521],256],13047:[[12522],256],13048:[[12523],256],13049:[[12524],256],13050:[[12525],256],13051:[[12527],256],13052:[[12528],256],13053:[[12529],256],13054:[[12530],256]}, -13056:{13056:[[12450,12497,12540,12488],256],13057:[[12450,12523,12501,12449],256],13058:[[12450,12531,12506,12450],256],13059:[[12450,12540,12523],256],13060:[[12452,12491,12531,12464],256],13061:[[12452,12531,12481],256],13062:[[12454,12457,12531],256],13063:[[12456,12473,12463,12540,12489],256],13064:[[12456,12540,12459,12540],256],13065:[[12458,12531,12473],256],13066:[[12458,12540,12512],256],13067:[[12459,12452,12522],256],13068:[[12459,12521,12483,12488],256],13069:[[12459,12525,12522,12540],256],13070:[[12460,12525,12531],256],13071:[[12460,12531,12510],256],13072:[[12462,12460],256],13073:[[12462,12491,12540],256],13074:[[12461,12517,12522,12540],256],13075:[[12462,12523,12480,12540],256],13076:[[12461,12525],256],13077:[[12461,12525,12464,12521,12512],256],13078:[[12461,12525,12513,12540,12488,12523],256],13079:[[12461,12525,12527,12483,12488],256],13080:[[12464,12521,12512],256],13081:[[12464,12521,12512,12488,12531],256],13082:[[12463,12523,12476,12452,12525],256],13083:[[12463,12525,12540,12493],256],13084:[[12465,12540,12473],256],13085:[[12467,12523,12490],256],13086:[[12467,12540,12509],256],13087:[[12469,12452,12463,12523],256],13088:[[12469,12531,12481,12540,12512],256],13089:[[12471,12522,12531,12464],256],13090:[[12475,12531,12481],256],13091:[[12475,12531,12488],256],13092:[[12480,12540,12473],256],13093:[[12487,12471],256],13094:[[12489,12523],256],13095:[[12488,12531],256],13096:[[12490,12494],256],13097:[[12494,12483,12488],256],13098:[[12495,12452,12484],256],13099:[[12497,12540,12475,12531,12488],256],13100:[[12497,12540,12484],256],13101:[[12496,12540,12524,12523],256],13102:[[12500,12450,12473,12488,12523],256],13103:[[12500,12463,12523],256],13104:[[12500,12467],256],13105:[[12499,12523],256],13106:[[12501,12449,12521,12483,12489],256],13107:[[12501,12451,12540,12488],256],13108:[[12502,12483,12471,12455,12523],256],13109:[[12501,12521,12531],256],13110:[[12504,12463,12479,12540,12523],256],13111:[[12506,12477],256],13112:[[12506,12491,12498],256],13113:[[12504,12523,12484],256],13114:[[12506,12531,12473],256],13115:[[12506,12540,12472],256],13116:[[12505,12540,12479],256],13117:[[12509,12452,12531,12488],256],13118:[[12508,12523,12488],256],13119:[[12507,12531],256],13120:[[12509,12531,12489],256],13121:[[12507,12540,12523],256],13122:[[12507,12540,12531],256],13123:[[12510,12452,12463,12525],256],13124:[[12510,12452,12523],256],13125:[[12510,12483,12495],256],13126:[[12510,12523,12463],256],13127:[[12510,12531,12471,12519,12531],256],13128:[[12511,12463,12525,12531],256],13129:[[12511,12522],256],13130:[[12511,12522,12496,12540,12523],256],13131:[[12513,12460],256],13132:[[12513,12460,12488,12531],256],13133:[[12513,12540,12488,12523],256],13134:[[12516,12540,12489],256],13135:[[12516,12540,12523],256],13136:[[12518,12450,12531],256],13137:[[12522,12483,12488,12523],256],13138:[[12522,12521],256],13139:[[12523,12500,12540],256],13140:[[12523,12540,12502,12523],256],13141:[[12524,12512],256],13142:[[12524,12531,12488,12466,12531],256],13143:[[12527,12483,12488],256],13144:[[48,28857],256],13145:[[49,28857],256],13146:[[50,28857],256],13147:[[51,28857],256],13148:[[52,28857],256],13149:[[53,28857],256],13150:[[54,28857],256],13151:[[55,28857],256],13152:[[56,28857],256],13153:[[57,28857],256],13154:[[49,48,28857],256],13155:[[49,49,28857],256],13156:[[49,50,28857],256],13157:[[49,51,28857],256],13158:[[49,52,28857],256],13159:[[49,53,28857],256],13160:[[49,54,28857],256],13161:[[49,55,28857],256],13162:[[49,56,28857],256],13163:[[49,57,28857],256],13164:[[50,48,28857],256],13165:[[50,49,28857],256],13166:[[50,50,28857],256],13167:[[50,51,28857],256],13168:[[50,52,28857],256],13169:[[104,80,97],256],13170:[[100,97],256],13171:[[65,85],256],13172:[[98,97,114],256],13173:[[111,86],256],13174:[[112,99],256],13175:[[100,109],256],13176:[[100,109,178],256],13177:[[100,109,179],256],13178:[[73,85],256],13179:[[24179,25104],256],13180:[[26157,21644],256],13181:[[22823,27491],256],13182:[[26126,27835],256],13183:[[26666,24335,20250,31038],256],13184:[[112,65],256],13185:[[110,65],256],13186:[[956,65],256],13187:[[109,65],256],13188:[[107,65],256],13189:[[75,66],256],13190:[[77,66],256],13191:[[71,66],256],13192:[[99,97,108],256],13193:[[107,99,97,108],256],13194:[[112,70],256],13195:[[110,70],256],13196:[[956,70],256],13197:[[956,103],256],13198:[[109,103],256],13199:[[107,103],256],13200:[[72,122],256],13201:[[107,72,122],256],13202:[[77,72,122],256],13203:[[71,72,122],256],13204:[[84,72,122],256],13205:[[956,8467],256],13206:[[109,8467],256],13207:[[100,8467],256],13208:[[107,8467],256],13209:[[102,109],256],13210:[[110,109],256],13211:[[956,109],256],13212:[[109,109],256],13213:[[99,109],256],13214:[[107,109],256],13215:[[109,109,178],256],13216:[[99,109,178],256],13217:[[109,178],256],13218:[[107,109,178],256],13219:[[109,109,179],256],13220:[[99,109,179],256],13221:[[109,179],256],13222:[[107,109,179],256],13223:[[109,8725,115],256],13224:[[109,8725,115,178],256],13225:[[80,97],256],13226:[[107,80,97],256],13227:[[77,80,97],256],13228:[[71,80,97],256],13229:[[114,97,100],256],13230:[[114,97,100,8725,115],256],13231:[[114,97,100,8725,115,178],256],13232:[[112,115],256],13233:[[110,115],256],13234:[[956,115],256],13235:[[109,115],256],13236:[[112,86],256],13237:[[110,86],256],13238:[[956,86],256],13239:[[109,86],256],13240:[[107,86],256],13241:[[77,86],256],13242:[[112,87],256],13243:[[110,87],256],13244:[[956,87],256],13245:[[109,87],256],13246:[[107,87],256],13247:[[77,87],256],13248:[[107,937],256],13249:[[77,937],256],13250:[[97,46,109,46],256],13251:[[66,113],256],13252:[[99,99],256],13253:[[99,100],256],13254:[[67,8725,107,103],256],13255:[[67,111,46],256],13256:[[100,66],256],13257:[[71,121],256],13258:[[104,97],256],13259:[[72,80],256],13260:[[105,110],256],13261:[[75,75],256],13262:[[75,77],256],13263:[[107,116],256],13264:[[108,109],256],13265:[[108,110],256],13266:[[108,111,103],256],13267:[[108,120],256],13268:[[109,98],256],13269:[[109,105,108],256],13270:[[109,111,108],256],13271:[[80,72],256],13272:[[112,46,109,46],256],13273:[[80,80,77],256],13274:[[80,82],256],13275:[[115,114],256],13276:[[83,118],256],13277:[[87,98],256],13278:[[86,8725,109],256],13279:[[65,8725,109],256],13280:[[49,26085],256],13281:[[50,26085],256],13282:[[51,26085],256],13283:[[52,26085],256],13284:[[53,26085],256],13285:[[54,26085],256],13286:[[55,26085],256],13287:[[56,26085],256],13288:[[57,26085],256],13289:[[49,48,26085],256],13290:[[49,49,26085],256],13291:[[49,50,26085],256],13292:[[49,51,26085],256],13293:[[49,52,26085],256],13294:[[49,53,26085],256],13295:[[49,54,26085],256],13296:[[49,55,26085],256],13297:[[49,56,26085],256],13298:[[49,57,26085],256],13299:[[50,48,26085],256],13300:[[50,49,26085],256],13301:[[50,50,26085],256],13302:[[50,51,26085],256],13303:[[50,52,26085],256],13304:[[50,53,26085],256],13305:[[50,54,26085],256],13306:[[50,55,26085],256],13307:[[50,56,26085],256],13308:[[50,57,26085],256],13309:[[51,48,26085],256],13310:[[51,49,26085],256],13311:[[103,97,108],256]}, -27136:{92912:[,1],92913:[,1],92914:[,1],92915:[,1],92916:[,1]}, -27392:{92976:[,230],92977:[,230],92978:[,230],92979:[,230],92980:[,230],92981:[,230],92982:[,230]}, -42496:{42607:[,230],42612:[,230],42613:[,230],42614:[,230],42615:[,230],42616:[,230],42617:[,230],42618:[,230],42619:[,230],42620:[,230],42621:[,230],42652:[[1098],256],42653:[[1100],256],42655:[,230],42736:[,230],42737:[,230]}, -42752:{42864:[[42863],256],43000:[[294],256],43001:[[339],256]}, -43008:{43014:[,9],43204:[,9],43232:[,230],43233:[,230],43234:[,230],43235:[,230],43236:[,230],43237:[,230],43238:[,230],43239:[,230],43240:[,230],43241:[,230],43242:[,230],43243:[,230],43244:[,230],43245:[,230],43246:[,230],43247:[,230],43248:[,230],43249:[,230]}, -43264:{43307:[,220],43308:[,220],43309:[,220],43347:[,9],43443:[,7],43456:[,9]}, -43520:{43696:[,230],43698:[,230],43699:[,230],43700:[,220],43703:[,230],43704:[,230],43710:[,230],43711:[,230],43713:[,230],43766:[,9]}, -43776:{43868:[[42791],256],43869:[[43831],256],43870:[[619],256],43871:[[43858],256],44013:[,9]}, -48128:{113822:[,1]}, -53504:{119134:[[119127,119141],512],119135:[[119128,119141],512],119136:[[119135,119150],512],119137:[[119135,119151],512],119138:[[119135,119152],512],119139:[[119135,119153],512],119140:[[119135,119154],512],119141:[,216],119142:[,216],119143:[,1],119144:[,1],119145:[,1],119149:[,226],119150:[,216],119151:[,216],119152:[,216],119153:[,216],119154:[,216],119163:[,220],119164:[,220],119165:[,220],119166:[,220],119167:[,220],119168:[,220],119169:[,220],119170:[,220],119173:[,230],119174:[,230],119175:[,230],119176:[,230],119177:[,230],119178:[,220],119179:[,220],119210:[,230],119211:[,230],119212:[,230],119213:[,230],119227:[[119225,119141],512],119228:[[119226,119141],512],119229:[[119227,119150],512],119230:[[119228,119150],512],119231:[[119227,119151],512],119232:[[119228,119151],512]}, -53760:{119362:[,230],119363:[,230],119364:[,230]}, -54272:{119808:[[65],256],119809:[[66],256],119810:[[67],256],119811:[[68],256],119812:[[69],256],119813:[[70],256],119814:[[71],256],119815:[[72],256],119816:[[73],256],119817:[[74],256],119818:[[75],256],119819:[[76],256],119820:[[77],256],119821:[[78],256],119822:[[79],256],119823:[[80],256],119824:[[81],256],119825:[[82],256],119826:[[83],256],119827:[[84],256],119828:[[85],256],119829:[[86],256],119830:[[87],256],119831:[[88],256],119832:[[89],256],119833:[[90],256],119834:[[97],256],119835:[[98],256],119836:[[99],256],119837:[[100],256],119838:[[101],256],119839:[[102],256],119840:[[103],256],119841:[[104],256],119842:[[105],256],119843:[[106],256],119844:[[107],256],119845:[[108],256],119846:[[109],256],119847:[[110],256],119848:[[111],256],119849:[[112],256],119850:[[113],256],119851:[[114],256],119852:[[115],256],119853:[[116],256],119854:[[117],256],119855:[[118],256],119856:[[119],256],119857:[[120],256],119858:[[121],256],119859:[[122],256],119860:[[65],256],119861:[[66],256],119862:[[67],256],119863:[[68],256],119864:[[69],256],119865:[[70],256],119866:[[71],256],119867:[[72],256],119868:[[73],256],119869:[[74],256],119870:[[75],256],119871:[[76],256],119872:[[77],256],119873:[[78],256],119874:[[79],256],119875:[[80],256],119876:[[81],256],119877:[[82],256],119878:[[83],256],119879:[[84],256],119880:[[85],256],119881:[[86],256],119882:[[87],256],119883:[[88],256],119884:[[89],256],119885:[[90],256],119886:[[97],256],119887:[[98],256],119888:[[99],256],119889:[[100],256],119890:[[101],256],119891:[[102],256],119892:[[103],256],119894:[[105],256],119895:[[106],256],119896:[[107],256],119897:[[108],256],119898:[[109],256],119899:[[110],256],119900:[[111],256],119901:[[112],256],119902:[[113],256],119903:[[114],256],119904:[[115],256],119905:[[116],256],119906:[[117],256],119907:[[118],256],119908:[[119],256],119909:[[120],256],119910:[[121],256],119911:[[122],256],119912:[[65],256],119913:[[66],256],119914:[[67],256],119915:[[68],256],119916:[[69],256],119917:[[70],256],119918:[[71],256],119919:[[72],256],119920:[[73],256],119921:[[74],256],119922:[[75],256],119923:[[76],256],119924:[[77],256],119925:[[78],256],119926:[[79],256],119927:[[80],256],119928:[[81],256],119929:[[82],256],119930:[[83],256],119931:[[84],256],119932:[[85],256],119933:[[86],256],119934:[[87],256],119935:[[88],256],119936:[[89],256],119937:[[90],256],119938:[[97],256],119939:[[98],256],119940:[[99],256],119941:[[100],256],119942:[[101],256],119943:[[102],256],119944:[[103],256],119945:[[104],256],119946:[[105],256],119947:[[106],256],119948:[[107],256],119949:[[108],256],119950:[[109],256],119951:[[110],256],119952:[[111],256],119953:[[112],256],119954:[[113],256],119955:[[114],256],119956:[[115],256],119957:[[116],256],119958:[[117],256],119959:[[118],256],119960:[[119],256],119961:[[120],256],119962:[[121],256],119963:[[122],256],119964:[[65],256],119966:[[67],256],119967:[[68],256],119970:[[71],256],119973:[[74],256],119974:[[75],256],119977:[[78],256],119978:[[79],256],119979:[[80],256],119980:[[81],256],119982:[[83],256],119983:[[84],256],119984:[[85],256],119985:[[86],256],119986:[[87],256],119987:[[88],256],119988:[[89],256],119989:[[90],256],119990:[[97],256],119991:[[98],256],119992:[[99],256],119993:[[100],256],119995:[[102],256],119997:[[104],256],119998:[[105],256],119999:[[106],256],120000:[[107],256],120001:[[108],256],120002:[[109],256],120003:[[110],256],120005:[[112],256],120006:[[113],256],120007:[[114],256],120008:[[115],256],120009:[[116],256],120010:[[117],256],120011:[[118],256],120012:[[119],256],120013:[[120],256],120014:[[121],256],120015:[[122],256],120016:[[65],256],120017:[[66],256],120018:[[67],256],120019:[[68],256],120020:[[69],256],120021:[[70],256],120022:[[71],256],120023:[[72],256],120024:[[73],256],120025:[[74],256],120026:[[75],256],120027:[[76],256],120028:[[77],256],120029:[[78],256],120030:[[79],256],120031:[[80],256],120032:[[81],256],120033:[[82],256],120034:[[83],256],120035:[[84],256],120036:[[85],256],120037:[[86],256],120038:[[87],256],120039:[[88],256],120040:[[89],256],120041:[[90],256],120042:[[97],256],120043:[[98],256],120044:[[99],256],120045:[[100],256],120046:[[101],256],120047:[[102],256],120048:[[103],256],120049:[[104],256],120050:[[105],256],120051:[[106],256],120052:[[107],256],120053:[[108],256],120054:[[109],256],120055:[[110],256],120056:[[111],256],120057:[[112],256],120058:[[113],256],120059:[[114],256],120060:[[115],256],120061:[[116],256],120062:[[117],256],120063:[[118],256]}, -54528:{120064:[[119],256],120065:[[120],256],120066:[[121],256],120067:[[122],256],120068:[[65],256],120069:[[66],256],120071:[[68],256],120072:[[69],256],120073:[[70],256],120074:[[71],256],120077:[[74],256],120078:[[75],256],120079:[[76],256],120080:[[77],256],120081:[[78],256],120082:[[79],256],120083:[[80],256],120084:[[81],256],120086:[[83],256],120087:[[84],256],120088:[[85],256],120089:[[86],256],120090:[[87],256],120091:[[88],256],120092:[[89],256],120094:[[97],256],120095:[[98],256],120096:[[99],256],120097:[[100],256],120098:[[101],256],120099:[[102],256],120100:[[103],256],120101:[[104],256],120102:[[105],256],120103:[[106],256],120104:[[107],256],120105:[[108],256],120106:[[109],256],120107:[[110],256],120108:[[111],256],120109:[[112],256],120110:[[113],256],120111:[[114],256],120112:[[115],256],120113:[[116],256],120114:[[117],256],120115:[[118],256],120116:[[119],256],120117:[[120],256],120118:[[121],256],120119:[[122],256],120120:[[65],256],120121:[[66],256],120123:[[68],256],120124:[[69],256],120125:[[70],256],120126:[[71],256],120128:[[73],256],120129:[[74],256],120130:[[75],256],120131:[[76],256],120132:[[77],256],120134:[[79],256],120138:[[83],256],120139:[[84],256],120140:[[85],256],120141:[[86],256],120142:[[87],256],120143:[[88],256],120144:[[89],256],120146:[[97],256],120147:[[98],256],120148:[[99],256],120149:[[100],256],120150:[[101],256],120151:[[102],256],120152:[[103],256],120153:[[104],256],120154:[[105],256],120155:[[106],256],120156:[[107],256],120157:[[108],256],120158:[[109],256],120159:[[110],256],120160:[[111],256],120161:[[112],256],120162:[[113],256],120163:[[114],256],120164:[[115],256],120165:[[116],256],120166:[[117],256],120167:[[118],256],120168:[[119],256],120169:[[120],256],120170:[[121],256],120171:[[122],256],120172:[[65],256],120173:[[66],256],120174:[[67],256],120175:[[68],256],120176:[[69],256],120177:[[70],256],120178:[[71],256],120179:[[72],256],120180:[[73],256],120181:[[74],256],120182:[[75],256],120183:[[76],256],120184:[[77],256],120185:[[78],256],120186:[[79],256],120187:[[80],256],120188:[[81],256],120189:[[82],256],120190:[[83],256],120191:[[84],256],120192:[[85],256],120193:[[86],256],120194:[[87],256],120195:[[88],256],120196:[[89],256],120197:[[90],256],120198:[[97],256],120199:[[98],256],120200:[[99],256],120201:[[100],256],120202:[[101],256],120203:[[102],256],120204:[[103],256],120205:[[104],256],120206:[[105],256],120207:[[106],256],120208:[[107],256],120209:[[108],256],120210:[[109],256],120211:[[110],256],120212:[[111],256],120213:[[112],256],120214:[[113],256],120215:[[114],256],120216:[[115],256],120217:[[116],256],120218:[[117],256],120219:[[118],256],120220:[[119],256],120221:[[120],256],120222:[[121],256],120223:[[122],256],120224:[[65],256],120225:[[66],256],120226:[[67],256],120227:[[68],256],120228:[[69],256],120229:[[70],256],120230:[[71],256],120231:[[72],256],120232:[[73],256],120233:[[74],256],120234:[[75],256],120235:[[76],256],120236:[[77],256],120237:[[78],256],120238:[[79],256],120239:[[80],256],120240:[[81],256],120241:[[82],256],120242:[[83],256],120243:[[84],256],120244:[[85],256],120245:[[86],256],120246:[[87],256],120247:[[88],256],120248:[[89],256],120249:[[90],256],120250:[[97],256],120251:[[98],256],120252:[[99],256],120253:[[100],256],120254:[[101],256],120255:[[102],256],120256:[[103],256],120257:[[104],256],120258:[[105],256],120259:[[106],256],120260:[[107],256],120261:[[108],256],120262:[[109],256],120263:[[110],256],120264:[[111],256],120265:[[112],256],120266:[[113],256],120267:[[114],256],120268:[[115],256],120269:[[116],256],120270:[[117],256],120271:[[118],256],120272:[[119],256],120273:[[120],256],120274:[[121],256],120275:[[122],256],120276:[[65],256],120277:[[66],256],120278:[[67],256],120279:[[68],256],120280:[[69],256],120281:[[70],256],120282:[[71],256],120283:[[72],256],120284:[[73],256],120285:[[74],256],120286:[[75],256],120287:[[76],256],120288:[[77],256],120289:[[78],256],120290:[[79],256],120291:[[80],256],120292:[[81],256],120293:[[82],256],120294:[[83],256],120295:[[84],256],120296:[[85],256],120297:[[86],256],120298:[[87],256],120299:[[88],256],120300:[[89],256],120301:[[90],256],120302:[[97],256],120303:[[98],256],120304:[[99],256],120305:[[100],256],120306:[[101],256],120307:[[102],256],120308:[[103],256],120309:[[104],256],120310:[[105],256],120311:[[106],256],120312:[[107],256],120313:[[108],256],120314:[[109],256],120315:[[110],256],120316:[[111],256],120317:[[112],256],120318:[[113],256],120319:[[114],256]}, -54784:{120320:[[115],256],120321:[[116],256],120322:[[117],256],120323:[[118],256],120324:[[119],256],120325:[[120],256],120326:[[121],256],120327:[[122],256],120328:[[65],256],120329:[[66],256],120330:[[67],256],120331:[[68],256],120332:[[69],256],120333:[[70],256],120334:[[71],256],120335:[[72],256],120336:[[73],256],120337:[[74],256],120338:[[75],256],120339:[[76],256],120340:[[77],256],120341:[[78],256],120342:[[79],256],120343:[[80],256],120344:[[81],256],120345:[[82],256],120346:[[83],256],120347:[[84],256],120348:[[85],256],120349:[[86],256],120350:[[87],256],120351:[[88],256],120352:[[89],256],120353:[[90],256],120354:[[97],256],120355:[[98],256],120356:[[99],256],120357:[[100],256],120358:[[101],256],120359:[[102],256],120360:[[103],256],120361:[[104],256],120362:[[105],256],120363:[[106],256],120364:[[107],256],120365:[[108],256],120366:[[109],256],120367:[[110],256],120368:[[111],256],120369:[[112],256],120370:[[113],256],120371:[[114],256],120372:[[115],256],120373:[[116],256],120374:[[117],256],120375:[[118],256],120376:[[119],256],120377:[[120],256],120378:[[121],256],120379:[[122],256],120380:[[65],256],120381:[[66],256],120382:[[67],256],120383:[[68],256],120384:[[69],256],120385:[[70],256],120386:[[71],256],120387:[[72],256],120388:[[73],256],120389:[[74],256],120390:[[75],256],120391:[[76],256],120392:[[77],256],120393:[[78],256],120394:[[79],256],120395:[[80],256],120396:[[81],256],120397:[[82],256],120398:[[83],256],120399:[[84],256],120400:[[85],256],120401:[[86],256],120402:[[87],256],120403:[[88],256],120404:[[89],256],120405:[[90],256],120406:[[97],256],120407:[[98],256],120408:[[99],256],120409:[[100],256],120410:[[101],256],120411:[[102],256],120412:[[103],256],120413:[[104],256],120414:[[105],256],120415:[[106],256],120416:[[107],256],120417:[[108],256],120418:[[109],256],120419:[[110],256],120420:[[111],256],120421:[[112],256],120422:[[113],256],120423:[[114],256],120424:[[115],256],120425:[[116],256],120426:[[117],256],120427:[[118],256],120428:[[119],256],120429:[[120],256],120430:[[121],256],120431:[[122],256],120432:[[65],256],120433:[[66],256],120434:[[67],256],120435:[[68],256],120436:[[69],256],120437:[[70],256],120438:[[71],256],120439:[[72],256],120440:[[73],256],120441:[[74],256],120442:[[75],256],120443:[[76],256],120444:[[77],256],120445:[[78],256],120446:[[79],256],120447:[[80],256],120448:[[81],256],120449:[[82],256],120450:[[83],256],120451:[[84],256],120452:[[85],256],120453:[[86],256],120454:[[87],256],120455:[[88],256],120456:[[89],256],120457:[[90],256],120458:[[97],256],120459:[[98],256],120460:[[99],256],120461:[[100],256],120462:[[101],256],120463:[[102],256],120464:[[103],256],120465:[[104],256],120466:[[105],256],120467:[[106],256],120468:[[107],256],120469:[[108],256],120470:[[109],256],120471:[[110],256],120472:[[111],256],120473:[[112],256],120474:[[113],256],120475:[[114],256],120476:[[115],256],120477:[[116],256],120478:[[117],256],120479:[[118],256],120480:[[119],256],120481:[[120],256],120482:[[121],256],120483:[[122],256],120484:[[305],256],120485:[[567],256],120488:[[913],256],120489:[[914],256],120490:[[915],256],120491:[[916],256],120492:[[917],256],120493:[[918],256],120494:[[919],256],120495:[[920],256],120496:[[921],256],120497:[[922],256],120498:[[923],256],120499:[[924],256],120500:[[925],256],120501:[[926],256],120502:[[927],256],120503:[[928],256],120504:[[929],256],120505:[[1012],256],120506:[[931],256],120507:[[932],256],120508:[[933],256],120509:[[934],256],120510:[[935],256],120511:[[936],256],120512:[[937],256],120513:[[8711],256],120514:[[945],256],120515:[[946],256],120516:[[947],256],120517:[[948],256],120518:[[949],256],120519:[[950],256],120520:[[951],256],120521:[[952],256],120522:[[953],256],120523:[[954],256],120524:[[955],256],120525:[[956],256],120526:[[957],256],120527:[[958],256],120528:[[959],256],120529:[[960],256],120530:[[961],256],120531:[[962],256],120532:[[963],256],120533:[[964],256],120534:[[965],256],120535:[[966],256],120536:[[967],256],120537:[[968],256],120538:[[969],256],120539:[[8706],256],120540:[[1013],256],120541:[[977],256],120542:[[1008],256],120543:[[981],256],120544:[[1009],256],120545:[[982],256],120546:[[913],256],120547:[[914],256],120548:[[915],256],120549:[[916],256],120550:[[917],256],120551:[[918],256],120552:[[919],256],120553:[[920],256],120554:[[921],256],120555:[[922],256],120556:[[923],256],120557:[[924],256],120558:[[925],256],120559:[[926],256],120560:[[927],256],120561:[[928],256],120562:[[929],256],120563:[[1012],256],120564:[[931],256],120565:[[932],256],120566:[[933],256],120567:[[934],256],120568:[[935],256],120569:[[936],256],120570:[[937],256],120571:[[8711],256],120572:[[945],256],120573:[[946],256],120574:[[947],256],120575:[[948],256]}, -55040:{120576:[[949],256],120577:[[950],256],120578:[[951],256],120579:[[952],256],120580:[[953],256],120581:[[954],256],120582:[[955],256],120583:[[956],256],120584:[[957],256],120585:[[958],256],120586:[[959],256],120587:[[960],256],120588:[[961],256],120589:[[962],256],120590:[[963],256],120591:[[964],256],120592:[[965],256],120593:[[966],256],120594:[[967],256],120595:[[968],256],120596:[[969],256],120597:[[8706],256],120598:[[1013],256],120599:[[977],256],120600:[[1008],256],120601:[[981],256],120602:[[1009],256],120603:[[982],256],120604:[[913],256],120605:[[914],256],120606:[[915],256],120607:[[916],256],120608:[[917],256],120609:[[918],256],120610:[[919],256],120611:[[920],256],120612:[[921],256],120613:[[922],256],120614:[[923],256],120615:[[924],256],120616:[[925],256],120617:[[926],256],120618:[[927],256],120619:[[928],256],120620:[[929],256],120621:[[1012],256],120622:[[931],256],120623:[[932],256],120624:[[933],256],120625:[[934],256],120626:[[935],256],120627:[[936],256],120628:[[937],256],120629:[[8711],256],120630:[[945],256],120631:[[946],256],120632:[[947],256],120633:[[948],256],120634:[[949],256],120635:[[950],256],120636:[[951],256],120637:[[952],256],120638:[[953],256],120639:[[954],256],120640:[[955],256],120641:[[956],256],120642:[[957],256],120643:[[958],256],120644:[[959],256],120645:[[960],256],120646:[[961],256],120647:[[962],256],120648:[[963],256],120649:[[964],256],120650:[[965],256],120651:[[966],256],120652:[[967],256],120653:[[968],256],120654:[[969],256],120655:[[8706],256],120656:[[1013],256],120657:[[977],256],120658:[[1008],256],120659:[[981],256],120660:[[1009],256],120661:[[982],256],120662:[[913],256],120663:[[914],256],120664:[[915],256],120665:[[916],256],120666:[[917],256],120667:[[918],256],120668:[[919],256],120669:[[920],256],120670:[[921],256],120671:[[922],256],120672:[[923],256],120673:[[924],256],120674:[[925],256],120675:[[926],256],120676:[[927],256],120677:[[928],256],120678:[[929],256],120679:[[1012],256],120680:[[931],256],120681:[[932],256],120682:[[933],256],120683:[[934],256],120684:[[935],256],120685:[[936],256],120686:[[937],256],120687:[[8711],256],120688:[[945],256],120689:[[946],256],120690:[[947],256],120691:[[948],256],120692:[[949],256],120693:[[950],256],120694:[[951],256],120695:[[952],256],120696:[[953],256],120697:[[954],256],120698:[[955],256],120699:[[956],256],120700:[[957],256],120701:[[958],256],120702:[[959],256],120703:[[960],256],120704:[[961],256],120705:[[962],256],120706:[[963],256],120707:[[964],256],120708:[[965],256],120709:[[966],256],120710:[[967],256],120711:[[968],256],120712:[[969],256],120713:[[8706],256],120714:[[1013],256],120715:[[977],256],120716:[[1008],256],120717:[[981],256],120718:[[1009],256],120719:[[982],256],120720:[[913],256],120721:[[914],256],120722:[[915],256],120723:[[916],256],120724:[[917],256],120725:[[918],256],120726:[[919],256],120727:[[920],256],120728:[[921],256],120729:[[922],256],120730:[[923],256],120731:[[924],256],120732:[[925],256],120733:[[926],256],120734:[[927],256],120735:[[928],256],120736:[[929],256],120737:[[1012],256],120738:[[931],256],120739:[[932],256],120740:[[933],256],120741:[[934],256],120742:[[935],256],120743:[[936],256],120744:[[937],256],120745:[[8711],256],120746:[[945],256],120747:[[946],256],120748:[[947],256],120749:[[948],256],120750:[[949],256],120751:[[950],256],120752:[[951],256],120753:[[952],256],120754:[[953],256],120755:[[954],256],120756:[[955],256],120757:[[956],256],120758:[[957],256],120759:[[958],256],120760:[[959],256],120761:[[960],256],120762:[[961],256],120763:[[962],256],120764:[[963],256],120765:[[964],256],120766:[[965],256],120767:[[966],256],120768:[[967],256],120769:[[968],256],120770:[[969],256],120771:[[8706],256],120772:[[1013],256],120773:[[977],256],120774:[[1008],256],120775:[[981],256],120776:[[1009],256],120777:[[982],256],120778:[[988],256],120779:[[989],256],120782:[[48],256],120783:[[49],256],120784:[[50],256],120785:[[51],256],120786:[[52],256],120787:[[53],256],120788:[[54],256],120789:[[55],256],120790:[[56],256],120791:[[57],256],120792:[[48],256],120793:[[49],256],120794:[[50],256],120795:[[51],256],120796:[[52],256],120797:[[53],256],120798:[[54],256],120799:[[55],256],120800:[[56],256],120801:[[57],256],120802:[[48],256],120803:[[49],256],120804:[[50],256],120805:[[51],256],120806:[[52],256],120807:[[53],256],120808:[[54],256],120809:[[55],256],120810:[[56],256],120811:[[57],256],120812:[[48],256],120813:[[49],256],120814:[[50],256],120815:[[51],256],120816:[[52],256],120817:[[53],256],120818:[[54],256],120819:[[55],256],120820:[[56],256],120821:[[57],256],120822:[[48],256],120823:[[49],256],120824:[[50],256],120825:[[51],256],120826:[[52],256],120827:[[53],256],120828:[[54],256],120829:[[55],256],120830:[[56],256],120831:[[57],256]}, -59392:{125136:[,220],125137:[,220],125138:[,220],125139:[,220],125140:[,220],125141:[,220],125142:[,220]}, -60928:{126464:[[1575],256],126465:[[1576],256],126466:[[1580],256],126467:[[1583],256],126469:[[1608],256],126470:[[1586],256],126471:[[1581],256],126472:[[1591],256],126473:[[1610],256],126474:[[1603],256],126475:[[1604],256],126476:[[1605],256],126477:[[1606],256],126478:[[1587],256],126479:[[1593],256],126480:[[1601],256],126481:[[1589],256],126482:[[1602],256],126483:[[1585],256],126484:[[1588],256],126485:[[1578],256],126486:[[1579],256],126487:[[1582],256],126488:[[1584],256],126489:[[1590],256],126490:[[1592],256],126491:[[1594],256],126492:[[1646],256],126493:[[1722],256],126494:[[1697],256],126495:[[1647],256],126497:[[1576],256],126498:[[1580],256],126500:[[1607],256],126503:[[1581],256],126505:[[1610],256],126506:[[1603],256],126507:[[1604],256],126508:[[1605],256],126509:[[1606],256],126510:[[1587],256],126511:[[1593],256],126512:[[1601],256],126513:[[1589],256],126514:[[1602],256],126516:[[1588],256],126517:[[1578],256],126518:[[1579],256],126519:[[1582],256],126521:[[1590],256],126523:[[1594],256],126530:[[1580],256],126535:[[1581],256],126537:[[1610],256],126539:[[1604],256],126541:[[1606],256],126542:[[1587],256],126543:[[1593],256],126545:[[1589],256],126546:[[1602],256],126548:[[1588],256],126551:[[1582],256],126553:[[1590],256],126555:[[1594],256],126557:[[1722],256],126559:[[1647],256],126561:[[1576],256],126562:[[1580],256],126564:[[1607],256],126567:[[1581],256],126568:[[1591],256],126569:[[1610],256],126570:[[1603],256],126572:[[1605],256],126573:[[1606],256],126574:[[1587],256],126575:[[1593],256],126576:[[1601],256],126577:[[1589],256],126578:[[1602],256],126580:[[1588],256],126581:[[1578],256],126582:[[1579],256],126583:[[1582],256],126585:[[1590],256],126586:[[1592],256],126587:[[1594],256],126588:[[1646],256],126590:[[1697],256],126592:[[1575],256],126593:[[1576],256],126594:[[1580],256],126595:[[1583],256],126596:[[1607],256],126597:[[1608],256],126598:[[1586],256],126599:[[1581],256],126600:[[1591],256],126601:[[1610],256],126603:[[1604],256],126604:[[1605],256],126605:[[1606],256],126606:[[1587],256],126607:[[1593],256],126608:[[1601],256],126609:[[1589],256],126610:[[1602],256],126611:[[1585],256],126612:[[1588],256],126613:[[1578],256],126614:[[1579],256],126615:[[1582],256],126616:[[1584],256],126617:[[1590],256],126618:[[1592],256],126619:[[1594],256],126625:[[1576],256],126626:[[1580],256],126627:[[1583],256],126629:[[1608],256],126630:[[1586],256],126631:[[1581],256],126632:[[1591],256],126633:[[1610],256],126635:[[1604],256],126636:[[1605],256],126637:[[1606],256],126638:[[1587],256],126639:[[1593],256],126640:[[1601],256],126641:[[1589],256],126642:[[1602],256],126643:[[1585],256],126644:[[1588],256],126645:[[1578],256],126646:[[1579],256],126647:[[1582],256],126648:[[1584],256],126649:[[1590],256],126650:[[1592],256],126651:[[1594],256]}, -61696:{127232:[[48,46],256],127233:[[48,44],256],127234:[[49,44],256],127235:[[50,44],256],127236:[[51,44],256],127237:[[52,44],256],127238:[[53,44],256],127239:[[54,44],256],127240:[[55,44],256],127241:[[56,44],256],127242:[[57,44],256],127248:[[40,65,41],256],127249:[[40,66,41],256],127250:[[40,67,41],256],127251:[[40,68,41],256],127252:[[40,69,41],256],127253:[[40,70,41],256],127254:[[40,71,41],256],127255:[[40,72,41],256],127256:[[40,73,41],256],127257:[[40,74,41],256],127258:[[40,75,41],256],127259:[[40,76,41],256],127260:[[40,77,41],256],127261:[[40,78,41],256],127262:[[40,79,41],256],127263:[[40,80,41],256],127264:[[40,81,41],256],127265:[[40,82,41],256],127266:[[40,83,41],256],127267:[[40,84,41],256],127268:[[40,85,41],256],127269:[[40,86,41],256],127270:[[40,87,41],256],127271:[[40,88,41],256],127272:[[40,89,41],256],127273:[[40,90,41],256],127274:[[12308,83,12309],256],127275:[[67],256],127276:[[82],256],127277:[[67,68],256],127278:[[87,90],256],127280:[[65],256],127281:[[66],256],127282:[[67],256],127283:[[68],256],127284:[[69],256],127285:[[70],256],127286:[[71],256],127287:[[72],256],127288:[[73],256],127289:[[74],256],127290:[[75],256],127291:[[76],256],127292:[[77],256],127293:[[78],256],127294:[[79],256],127295:[[80],256],127296:[[81],256],127297:[[82],256],127298:[[83],256],127299:[[84],256],127300:[[85],256],127301:[[86],256],127302:[[87],256],127303:[[88],256],127304:[[89],256],127305:[[90],256],127306:[[72,86],256],127307:[[77,86],256],127308:[[83,68],256],127309:[[83,83],256],127310:[[80,80,86],256],127311:[[87,67],256],127338:[[77,67],256],127339:[[77,68],256],127376:[[68,74],256]}, -61952:{127488:[[12411,12363],256],127489:[[12467,12467],256],127490:[[12469],256],127504:[[25163],256],127505:[[23383],256],127506:[[21452],256],127507:[[12487],256],127508:[[20108],256],127509:[[22810],256],127510:[[35299],256],127511:[[22825],256],127512:[[20132],256],127513:[[26144],256],127514:[[28961],256],127515:[[26009],256],127516:[[21069],256],127517:[[24460],256],127518:[[20877],256],127519:[[26032],256],127520:[[21021],256],127521:[[32066],256],127522:[[29983],256],127523:[[36009],256],127524:[[22768],256],127525:[[21561],256],127526:[[28436],256],127527:[[25237],256],127528:[[25429],256],127529:[[19968],256],127530:[[19977],256],127531:[[36938],256],127532:[[24038],256],127533:[[20013],256],127534:[[21491],256],127535:[[25351],256],127536:[[36208],256],127537:[[25171],256],127538:[[31105],256],127539:[[31354],256],127540:[[21512],256],127541:[[28288],256],127542:[[26377],256],127543:[[26376],256],127544:[[30003],256],127545:[[21106],256],127546:[[21942],256],127552:[[12308,26412,12309],256],127553:[[12308,19977,12309],256],127554:[[12308,20108,12309],256],127555:[[12308,23433,12309],256],127556:[[12308,28857,12309],256],127557:[[12308,25171,12309],256],127558:[[12308,30423,12309],256],127559:[[12308,21213,12309],256],127560:[[12308,25943,12309],256],127568:[[24471],256],127569:[[21487],256]}, -63488:{194560:[[20029]],194561:[[20024]],194562:[[20033]],194563:[[131362]],194564:[[20320]],194565:[[20398]],194566:[[20411]],194567:[[20482]],194568:[[20602]],194569:[[20633]],194570:[[20711]],194571:[[20687]],194572:[[13470]],194573:[[132666]],194574:[[20813]],194575:[[20820]],194576:[[20836]],194577:[[20855]],194578:[[132380]],194579:[[13497]],194580:[[20839]],194581:[[20877]],194582:[[132427]],194583:[[20887]],194584:[[20900]],194585:[[20172]],194586:[[20908]],194587:[[20917]],194588:[[168415]],194589:[[20981]],194590:[[20995]],194591:[[13535]],194592:[[21051]],194593:[[21062]],194594:[[21106]],194595:[[21111]],194596:[[13589]],194597:[[21191]],194598:[[21193]],194599:[[21220]],194600:[[21242]],194601:[[21253]],194602:[[21254]],194603:[[21271]],194604:[[21321]],194605:[[21329]],194606:[[21338]],194607:[[21363]],194608:[[21373]],194609:[[21375]],194610:[[21375]],194611:[[21375]],194612:[[133676]],194613:[[28784]],194614:[[21450]],194615:[[21471]],194616:[[133987]],194617:[[21483]],194618:[[21489]],194619:[[21510]],194620:[[21662]],194621:[[21560]],194622:[[21576]],194623:[[21608]],194624:[[21666]],194625:[[21750]],194626:[[21776]],194627:[[21843]],194628:[[21859]],194629:[[21892]],194630:[[21892]],194631:[[21913]],194632:[[21931]],194633:[[21939]],194634:[[21954]],194635:[[22294]],194636:[[22022]],194637:[[22295]],194638:[[22097]],194639:[[22132]],194640:[[20999]],194641:[[22766]],194642:[[22478]],194643:[[22516]],194644:[[22541]],194645:[[22411]],194646:[[22578]],194647:[[22577]],194648:[[22700]],194649:[[136420]],194650:[[22770]],194651:[[22775]],194652:[[22790]],194653:[[22810]],194654:[[22818]],194655:[[22882]],194656:[[136872]],194657:[[136938]],194658:[[23020]],194659:[[23067]],194660:[[23079]],194661:[[23000]],194662:[[23142]],194663:[[14062]],194664:[[14076]],194665:[[23304]],194666:[[23358]],194667:[[23358]],194668:[[137672]],194669:[[23491]],194670:[[23512]],194671:[[23527]],194672:[[23539]],194673:[[138008]],194674:[[23551]],194675:[[23558]],194676:[[24403]],194677:[[23586]],194678:[[14209]],194679:[[23648]],194680:[[23662]],194681:[[23744]],194682:[[23693]],194683:[[138724]],194684:[[23875]],194685:[[138726]],194686:[[23918]],194687:[[23915]],194688:[[23932]],194689:[[24033]],194690:[[24034]],194691:[[14383]],194692:[[24061]],194693:[[24104]],194694:[[24125]],194695:[[24169]],194696:[[14434]],194697:[[139651]],194698:[[14460]],194699:[[24240]],194700:[[24243]],194701:[[24246]],194702:[[24266]],194703:[[172946]],194704:[[24318]],194705:[[140081]],194706:[[140081]],194707:[[33281]],194708:[[24354]],194709:[[24354]],194710:[[14535]],194711:[[144056]],194712:[[156122]],194713:[[24418]],194714:[[24427]],194715:[[14563]],194716:[[24474]],194717:[[24525]],194718:[[24535]],194719:[[24569]],194720:[[24705]],194721:[[14650]],194722:[[14620]],194723:[[24724]],194724:[[141012]],194725:[[24775]],194726:[[24904]],194727:[[24908]],194728:[[24910]],194729:[[24908]],194730:[[24954]],194731:[[24974]],194732:[[25010]],194733:[[24996]],194734:[[25007]],194735:[[25054]],194736:[[25074]],194737:[[25078]],194738:[[25104]],194739:[[25115]],194740:[[25181]],194741:[[25265]],194742:[[25300]],194743:[[25424]],194744:[[142092]],194745:[[25405]],194746:[[25340]],194747:[[25448]],194748:[[25475]],194749:[[25572]],194750:[[142321]],194751:[[25634]],194752:[[25541]],194753:[[25513]],194754:[[14894]],194755:[[25705]],194756:[[25726]],194757:[[25757]],194758:[[25719]],194759:[[14956]],194760:[[25935]],194761:[[25964]],194762:[[143370]],194763:[[26083]],194764:[[26360]],194765:[[26185]],194766:[[15129]],194767:[[26257]],194768:[[15112]],194769:[[15076]],194770:[[20882]],194771:[[20885]],194772:[[26368]],194773:[[26268]],194774:[[32941]],194775:[[17369]],194776:[[26391]],194777:[[26395]],194778:[[26401]],194779:[[26462]],194780:[[26451]],194781:[[144323]],194782:[[15177]],194783:[[26618]],194784:[[26501]],194785:[[26706]],194786:[[26757]],194787:[[144493]],194788:[[26766]],194789:[[26655]],194790:[[26900]],194791:[[15261]],194792:[[26946]],194793:[[27043]],194794:[[27114]],194795:[[27304]],194796:[[145059]],194797:[[27355]],194798:[[15384]],194799:[[27425]],194800:[[145575]],194801:[[27476]],194802:[[15438]],194803:[[27506]],194804:[[27551]],194805:[[27578]],194806:[[27579]],194807:[[146061]],194808:[[138507]],194809:[[146170]],194810:[[27726]],194811:[[146620]],194812:[[27839]],194813:[[27853]],194814:[[27751]],194815:[[27926]]}, -63744:{63744:[[35912]],63745:[[26356]],63746:[[36554]],63747:[[36040]],63748:[[28369]],63749:[[20018]],63750:[[21477]],63751:[[40860]],63752:[[40860]],63753:[[22865]],63754:[[37329]],63755:[[21895]],63756:[[22856]],63757:[[25078]],63758:[[30313]],63759:[[32645]],63760:[[34367]],63761:[[34746]],63762:[[35064]],63763:[[37007]],63764:[[27138]],63765:[[27931]],63766:[[28889]],63767:[[29662]],63768:[[33853]],63769:[[37226]],63770:[[39409]],63771:[[20098]],63772:[[21365]],63773:[[27396]],63774:[[29211]],63775:[[34349]],63776:[[40478]],63777:[[23888]],63778:[[28651]],63779:[[34253]],63780:[[35172]],63781:[[25289]],63782:[[33240]],63783:[[34847]],63784:[[24266]],63785:[[26391]],63786:[[28010]],63787:[[29436]],63788:[[37070]],63789:[[20358]],63790:[[20919]],63791:[[21214]],63792:[[25796]],63793:[[27347]],63794:[[29200]],63795:[[30439]],63796:[[32769]],63797:[[34310]],63798:[[34396]],63799:[[36335]],63800:[[38706]],63801:[[39791]],63802:[[40442]],63803:[[30860]],63804:[[31103]],63805:[[32160]],63806:[[33737]],63807:[[37636]],63808:[[40575]],63809:[[35542]],63810:[[22751]],63811:[[24324]],63812:[[31840]],63813:[[32894]],63814:[[29282]],63815:[[30922]],63816:[[36034]],63817:[[38647]],63818:[[22744]],63819:[[23650]],63820:[[27155]],63821:[[28122]],63822:[[28431]],63823:[[32047]],63824:[[32311]],63825:[[38475]],63826:[[21202]],63827:[[32907]],63828:[[20956]],63829:[[20940]],63830:[[31260]],63831:[[32190]],63832:[[33777]],63833:[[38517]],63834:[[35712]],63835:[[25295]],63836:[[27138]],63837:[[35582]],63838:[[20025]],63839:[[23527]],63840:[[24594]],63841:[[29575]],63842:[[30064]],63843:[[21271]],63844:[[30971]],63845:[[20415]],63846:[[24489]],63847:[[19981]],63848:[[27852]],63849:[[25976]],63850:[[32034]],63851:[[21443]],63852:[[22622]],63853:[[30465]],63854:[[33865]],63855:[[35498]],63856:[[27578]],63857:[[36784]],63858:[[27784]],63859:[[25342]],63860:[[33509]],63861:[[25504]],63862:[[30053]],63863:[[20142]],63864:[[20841]],63865:[[20937]],63866:[[26753]],63867:[[31975]],63868:[[33391]],63869:[[35538]],63870:[[37327]],63871:[[21237]],63872:[[21570]],63873:[[22899]],63874:[[24300]],63875:[[26053]],63876:[[28670]],63877:[[31018]],63878:[[38317]],63879:[[39530]],63880:[[40599]],63881:[[40654]],63882:[[21147]],63883:[[26310]],63884:[[27511]],63885:[[36706]],63886:[[24180]],63887:[[24976]],63888:[[25088]],63889:[[25754]],63890:[[28451]],63891:[[29001]],63892:[[29833]],63893:[[31178]],63894:[[32244]],63895:[[32879]],63896:[[36646]],63897:[[34030]],63898:[[36899]],63899:[[37706]],63900:[[21015]],63901:[[21155]],63902:[[21693]],63903:[[28872]],63904:[[35010]],63905:[[35498]],63906:[[24265]],63907:[[24565]],63908:[[25467]],63909:[[27566]],63910:[[31806]],63911:[[29557]],63912:[[20196]],63913:[[22265]],63914:[[23527]],63915:[[23994]],63916:[[24604]],63917:[[29618]],63918:[[29801]],63919:[[32666]],63920:[[32838]],63921:[[37428]],63922:[[38646]],63923:[[38728]],63924:[[38936]],63925:[[20363]],63926:[[31150]],63927:[[37300]],63928:[[38584]],63929:[[24801]],63930:[[20102]],63931:[[20698]],63932:[[23534]],63933:[[23615]],63934:[[26009]],63935:[[27138]],63936:[[29134]],63937:[[30274]],63938:[[34044]],63939:[[36988]],63940:[[40845]],63941:[[26248]],63942:[[38446]],63943:[[21129]],63944:[[26491]],63945:[[26611]],63946:[[27969]],63947:[[28316]],63948:[[29705]],63949:[[30041]],63950:[[30827]],63951:[[32016]],63952:[[39006]],63953:[[20845]],63954:[[25134]],63955:[[38520]],63956:[[20523]],63957:[[23833]],63958:[[28138]],63959:[[36650]],63960:[[24459]],63961:[[24900]],63962:[[26647]],63963:[[29575]],63964:[[38534]],63965:[[21033]],63966:[[21519]],63967:[[23653]],63968:[[26131]],63969:[[26446]],63970:[[26792]],63971:[[27877]],63972:[[29702]],63973:[[30178]],63974:[[32633]],63975:[[35023]],63976:[[35041]],63977:[[37324]],63978:[[38626]],63979:[[21311]],63980:[[28346]],63981:[[21533]],63982:[[29136]],63983:[[29848]],63984:[[34298]],63985:[[38563]],63986:[[40023]],63987:[[40607]],63988:[[26519]],63989:[[28107]],63990:[[33256]],63991:[[31435]],63992:[[31520]],63993:[[31890]],63994:[[29376]],63995:[[28825]],63996:[[35672]],63997:[[20160]],63998:[[33590]],63999:[[21050]],194816:[[27966]],194817:[[28023]],194818:[[27969]],194819:[[28009]],194820:[[28024]],194821:[[28037]],194822:[[146718]],194823:[[27956]],194824:[[28207]],194825:[[28270]],194826:[[15667]],194827:[[28363]],194828:[[28359]],194829:[[147153]],194830:[[28153]],194831:[[28526]],194832:[[147294]],194833:[[147342]],194834:[[28614]],194835:[[28729]],194836:[[28702]],194837:[[28699]],194838:[[15766]],194839:[[28746]],194840:[[28797]],194841:[[28791]],194842:[[28845]],194843:[[132389]],194844:[[28997]],194845:[[148067]],194846:[[29084]],194847:[[148395]],194848:[[29224]],194849:[[29237]],194850:[[29264]],194851:[[149000]],194852:[[29312]],194853:[[29333]],194854:[[149301]],194855:[[149524]],194856:[[29562]],194857:[[29579]],194858:[[16044]],194859:[[29605]],194860:[[16056]],194861:[[16056]],194862:[[29767]],194863:[[29788]],194864:[[29809]],194865:[[29829]],194866:[[29898]],194867:[[16155]],194868:[[29988]],194869:[[150582]],194870:[[30014]],194871:[[150674]],194872:[[30064]],194873:[[139679]],194874:[[30224]],194875:[[151457]],194876:[[151480]],194877:[[151620]],194878:[[16380]],194879:[[16392]],194880:[[30452]],194881:[[151795]],194882:[[151794]],194883:[[151833]],194884:[[151859]],194885:[[30494]],194886:[[30495]],194887:[[30495]],194888:[[30538]],194889:[[16441]],194890:[[30603]],194891:[[16454]],194892:[[16534]],194893:[[152605]],194894:[[30798]],194895:[[30860]],194896:[[30924]],194897:[[16611]],194898:[[153126]],194899:[[31062]],194900:[[153242]],194901:[[153285]],194902:[[31119]],194903:[[31211]],194904:[[16687]],194905:[[31296]],194906:[[31306]],194907:[[31311]],194908:[[153980]],194909:[[154279]],194910:[[154279]],194911:[[31470]],194912:[[16898]],194913:[[154539]],194914:[[31686]],194915:[[31689]],194916:[[16935]],194917:[[154752]],194918:[[31954]],194919:[[17056]],194920:[[31976]],194921:[[31971]],194922:[[32000]],194923:[[155526]],194924:[[32099]],194925:[[17153]],194926:[[32199]],194927:[[32258]],194928:[[32325]],194929:[[17204]],194930:[[156200]],194931:[[156231]],194932:[[17241]],194933:[[156377]],194934:[[32634]],194935:[[156478]],194936:[[32661]],194937:[[32762]],194938:[[32773]],194939:[[156890]],194940:[[156963]],194941:[[32864]],194942:[[157096]],194943:[[32880]],194944:[[144223]],194945:[[17365]],194946:[[32946]],194947:[[33027]],194948:[[17419]],194949:[[33086]],194950:[[23221]],194951:[[157607]],194952:[[157621]],194953:[[144275]],194954:[[144284]],194955:[[33281]],194956:[[33284]],194957:[[36766]],194958:[[17515]],194959:[[33425]],194960:[[33419]],194961:[[33437]],194962:[[21171]],194963:[[33457]],194964:[[33459]],194965:[[33469]],194966:[[33510]],194967:[[158524]],194968:[[33509]],194969:[[33565]],194970:[[33635]],194971:[[33709]],194972:[[33571]],194973:[[33725]],194974:[[33767]],194975:[[33879]],194976:[[33619]],194977:[[33738]],194978:[[33740]],194979:[[33756]],194980:[[158774]],194981:[[159083]],194982:[[158933]],194983:[[17707]],194984:[[34033]],194985:[[34035]],194986:[[34070]],194987:[[160714]],194988:[[34148]],194989:[[159532]],194990:[[17757]],194991:[[17761]],194992:[[159665]],194993:[[159954]],194994:[[17771]],194995:[[34384]],194996:[[34396]],194997:[[34407]],194998:[[34409]],194999:[[34473]],195000:[[34440]],195001:[[34574]],195002:[[34530]],195003:[[34681]],195004:[[34600]],195005:[[34667]],195006:[[34694]],195007:[[17879]],195008:[[34785]],195009:[[34817]],195010:[[17913]],195011:[[34912]],195012:[[34915]],195013:[[161383]],195014:[[35031]],195015:[[35038]],195016:[[17973]],195017:[[35066]],195018:[[13499]],195019:[[161966]],195020:[[162150]],195021:[[18110]],195022:[[18119]],195023:[[35488]],195024:[[35565]],195025:[[35722]],195026:[[35925]],195027:[[162984]],195028:[[36011]],195029:[[36033]],195030:[[36123]],195031:[[36215]],195032:[[163631]],195033:[[133124]],195034:[[36299]],195035:[[36284]],195036:[[36336]],195037:[[133342]],195038:[[36564]],195039:[[36664]],195040:[[165330]],195041:[[165357]],195042:[[37012]],195043:[[37105]],195044:[[37137]],195045:[[165678]],195046:[[37147]],195047:[[37432]],195048:[[37591]],195049:[[37592]],195050:[[37500]],195051:[[37881]],195052:[[37909]],195053:[[166906]],195054:[[38283]],195055:[[18837]],195056:[[38327]],195057:[[167287]],195058:[[18918]],195059:[[38595]],195060:[[23986]],195061:[[38691]],195062:[[168261]],195063:[[168474]],195064:[[19054]],195065:[[19062]],195066:[[38880]],195067:[[168970]],195068:[[19122]],195069:[[169110]],195070:[[38923]],195071:[[38923]]}, -64000:{64000:[[20999]],64001:[[24230]],64002:[[25299]],64003:[[31958]],64004:[[23429]],64005:[[27934]],64006:[[26292]],64007:[[36667]],64008:[[34892]],64009:[[38477]],64010:[[35211]],64011:[[24275]],64012:[[20800]],64013:[[21952]],64016:[[22618]],64018:[[26228]],64021:[[20958]],64022:[[29482]],64023:[[30410]],64024:[[31036]],64025:[[31070]],64026:[[31077]],64027:[[31119]],64028:[[38742]],64029:[[31934]],64030:[[32701]],64032:[[34322]],64034:[[35576]],64037:[[36920]],64038:[[37117]],64042:[[39151]],64043:[[39164]],64044:[[39208]],64045:[[40372]],64046:[[37086]],64047:[[38583]],64048:[[20398]],64049:[[20711]],64050:[[20813]],64051:[[21193]],64052:[[21220]],64053:[[21329]],64054:[[21917]],64055:[[22022]],64056:[[22120]],64057:[[22592]],64058:[[22696]],64059:[[23652]],64060:[[23662]],64061:[[24724]],64062:[[24936]],64063:[[24974]],64064:[[25074]],64065:[[25935]],64066:[[26082]],64067:[[26257]],64068:[[26757]],64069:[[28023]],64070:[[28186]],64071:[[28450]],64072:[[29038]],64073:[[29227]],64074:[[29730]],64075:[[30865]],64076:[[31038]],64077:[[31049]],64078:[[31048]],64079:[[31056]],64080:[[31062]],64081:[[31069]],64082:[[31117]],64083:[[31118]],64084:[[31296]],64085:[[31361]],64086:[[31680]],64087:[[32244]],64088:[[32265]],64089:[[32321]],64090:[[32626]],64091:[[32773]],64092:[[33261]],64093:[[33401]],64094:[[33401]],64095:[[33879]],64096:[[35088]],64097:[[35222]],64098:[[35585]],64099:[[35641]],64100:[[36051]],64101:[[36104]],64102:[[36790]],64103:[[36920]],64104:[[38627]],64105:[[38911]],64106:[[38971]],64107:[[24693]],64108:[[148206]],64109:[[33304]],64112:[[20006]],64113:[[20917]],64114:[[20840]],64115:[[20352]],64116:[[20805]],64117:[[20864]],64118:[[21191]],64119:[[21242]],64120:[[21917]],64121:[[21845]],64122:[[21913]],64123:[[21986]],64124:[[22618]],64125:[[22707]],64126:[[22852]],64127:[[22868]],64128:[[23138]],64129:[[23336]],64130:[[24274]],64131:[[24281]],64132:[[24425]],64133:[[24493]],64134:[[24792]],64135:[[24910]],64136:[[24840]],64137:[[24974]],64138:[[24928]],64139:[[25074]],64140:[[25140]],64141:[[25540]],64142:[[25628]],64143:[[25682]],64144:[[25942]],64145:[[26228]],64146:[[26391]],64147:[[26395]],64148:[[26454]],64149:[[27513]],64150:[[27578]],64151:[[27969]],64152:[[28379]],64153:[[28363]],64154:[[28450]],64155:[[28702]],64156:[[29038]],64157:[[30631]],64158:[[29237]],64159:[[29359]],64160:[[29482]],64161:[[29809]],64162:[[29958]],64163:[[30011]],64164:[[30237]],64165:[[30239]],64166:[[30410]],64167:[[30427]],64168:[[30452]],64169:[[30538]],64170:[[30528]],64171:[[30924]],64172:[[31409]],64173:[[31680]],64174:[[31867]],64175:[[32091]],64176:[[32244]],64177:[[32574]],64178:[[32773]],64179:[[33618]],64180:[[33775]],64181:[[34681]],64182:[[35137]],64183:[[35206]],64184:[[35222]],64185:[[35519]],64186:[[35576]],64187:[[35531]],64188:[[35585]],64189:[[35582]],64190:[[35565]],64191:[[35641]],64192:[[35722]],64193:[[36104]],64194:[[36664]],64195:[[36978]],64196:[[37273]],64197:[[37494]],64198:[[38524]],64199:[[38627]],64200:[[38742]],64201:[[38875]],64202:[[38911]],64203:[[38923]],64204:[[38971]],64205:[[39698]],64206:[[40860]],64207:[[141386]],64208:[[141380]],64209:[[144341]],64210:[[15261]],64211:[[16408]],64212:[[16441]],64213:[[152137]],64214:[[154832]],64215:[[163539]],64216:[[40771]],64217:[[40846]],195072:[[38953]],195073:[[169398]],195074:[[39138]],195075:[[19251]],195076:[[39209]],195077:[[39335]],195078:[[39362]],195079:[[39422]],195080:[[19406]],195081:[[170800]],195082:[[39698]],195083:[[40000]],195084:[[40189]],195085:[[19662]],195086:[[19693]],195087:[[40295]],195088:[[172238]],195089:[[19704]],195090:[[172293]],195091:[[172558]],195092:[[172689]],195093:[[40635]],195094:[[19798]],195095:[[40697]],195096:[[40702]],195097:[[40709]],195098:[[40719]],195099:[[40726]],195100:[[40763]],195101:[[173568]]}, -64256:{64256:[[102,102],256],64257:[[102,105],256],64258:[[102,108],256],64259:[[102,102,105],256],64260:[[102,102,108],256],64261:[[383,116],256],64262:[[115,116],256],64275:[[1396,1398],256],64276:[[1396,1381],256],64277:[[1396,1387],256],64278:[[1406,1398],256],64279:[[1396,1389],256],64285:[[1497,1460],512],64286:[,26],64287:[[1522,1463],512],64288:[[1506],256],64289:[[1488],256],64290:[[1491],256],64291:[[1492],256],64292:[[1499],256],64293:[[1500],256],64294:[[1501],256],64295:[[1512],256],64296:[[1514],256],64297:[[43],256],64298:[[1513,1473],512],64299:[[1513,1474],512],64300:[[64329,1473],512],64301:[[64329,1474],512],64302:[[1488,1463],512],64303:[[1488,1464],512],64304:[[1488,1468],512],64305:[[1489,1468],512],64306:[[1490,1468],512],64307:[[1491,1468],512],64308:[[1492,1468],512],64309:[[1493,1468],512],64310:[[1494,1468],512],64312:[[1496,1468],512],64313:[[1497,1468],512],64314:[[1498,1468],512],64315:[[1499,1468],512],64316:[[1500,1468],512],64318:[[1502,1468],512],64320:[[1504,1468],512],64321:[[1505,1468],512],64323:[[1507,1468],512],64324:[[1508,1468],512],64326:[[1510,1468],512],64327:[[1511,1468],512],64328:[[1512,1468],512],64329:[[1513,1468],512],64330:[[1514,1468],512],64331:[[1493,1465],512],64332:[[1489,1471],512],64333:[[1499,1471],512],64334:[[1508,1471],512],64335:[[1488,1500],256],64336:[[1649],256],64337:[[1649],256],64338:[[1659],256],64339:[[1659],256],64340:[[1659],256],64341:[[1659],256],64342:[[1662],256],64343:[[1662],256],64344:[[1662],256],64345:[[1662],256],64346:[[1664],256],64347:[[1664],256],64348:[[1664],256],64349:[[1664],256],64350:[[1658],256],64351:[[1658],256],64352:[[1658],256],64353:[[1658],256],64354:[[1663],256],64355:[[1663],256],64356:[[1663],256],64357:[[1663],256],64358:[[1657],256],64359:[[1657],256],64360:[[1657],256],64361:[[1657],256],64362:[[1700],256],64363:[[1700],256],64364:[[1700],256],64365:[[1700],256],64366:[[1702],256],64367:[[1702],256],64368:[[1702],256],64369:[[1702],256],64370:[[1668],256],64371:[[1668],256],64372:[[1668],256],64373:[[1668],256],64374:[[1667],256],64375:[[1667],256],64376:[[1667],256],64377:[[1667],256],64378:[[1670],256],64379:[[1670],256],64380:[[1670],256],64381:[[1670],256],64382:[[1671],256],64383:[[1671],256],64384:[[1671],256],64385:[[1671],256],64386:[[1677],256],64387:[[1677],256],64388:[[1676],256],64389:[[1676],256],64390:[[1678],256],64391:[[1678],256],64392:[[1672],256],64393:[[1672],256],64394:[[1688],256],64395:[[1688],256],64396:[[1681],256],64397:[[1681],256],64398:[[1705],256],64399:[[1705],256],64400:[[1705],256],64401:[[1705],256],64402:[[1711],256],64403:[[1711],256],64404:[[1711],256],64405:[[1711],256],64406:[[1715],256],64407:[[1715],256],64408:[[1715],256],64409:[[1715],256],64410:[[1713],256],64411:[[1713],256],64412:[[1713],256],64413:[[1713],256],64414:[[1722],256],64415:[[1722],256],64416:[[1723],256],64417:[[1723],256],64418:[[1723],256],64419:[[1723],256],64420:[[1728],256],64421:[[1728],256],64422:[[1729],256],64423:[[1729],256],64424:[[1729],256],64425:[[1729],256],64426:[[1726],256],64427:[[1726],256],64428:[[1726],256],64429:[[1726],256],64430:[[1746],256],64431:[[1746],256],64432:[[1747],256],64433:[[1747],256],64467:[[1709],256],64468:[[1709],256],64469:[[1709],256],64470:[[1709],256],64471:[[1735],256],64472:[[1735],256],64473:[[1734],256],64474:[[1734],256],64475:[[1736],256],64476:[[1736],256],64477:[[1655],256],64478:[[1739],256],64479:[[1739],256],64480:[[1733],256],64481:[[1733],256],64482:[[1737],256],64483:[[1737],256],64484:[[1744],256],64485:[[1744],256],64486:[[1744],256],64487:[[1744],256],64488:[[1609],256],64489:[[1609],256],64490:[[1574,1575],256],64491:[[1574,1575],256],64492:[[1574,1749],256],64493:[[1574,1749],256],64494:[[1574,1608],256],64495:[[1574,1608],256],64496:[[1574,1735],256],64497:[[1574,1735],256],64498:[[1574,1734],256],64499:[[1574,1734],256],64500:[[1574,1736],256],64501:[[1574,1736],256],64502:[[1574,1744],256],64503:[[1574,1744],256],64504:[[1574,1744],256],64505:[[1574,1609],256],64506:[[1574,1609],256],64507:[[1574,1609],256],64508:[[1740],256],64509:[[1740],256],64510:[[1740],256],64511:[[1740],256]}, -64512:{64512:[[1574,1580],256],64513:[[1574,1581],256],64514:[[1574,1605],256],64515:[[1574,1609],256],64516:[[1574,1610],256],64517:[[1576,1580],256],64518:[[1576,1581],256],64519:[[1576,1582],256],64520:[[1576,1605],256],64521:[[1576,1609],256],64522:[[1576,1610],256],64523:[[1578,1580],256],64524:[[1578,1581],256],64525:[[1578,1582],256],64526:[[1578,1605],256],64527:[[1578,1609],256],64528:[[1578,1610],256],64529:[[1579,1580],256],64530:[[1579,1605],256],64531:[[1579,1609],256],64532:[[1579,1610],256],64533:[[1580,1581],256],64534:[[1580,1605],256],64535:[[1581,1580],256],64536:[[1581,1605],256],64537:[[1582,1580],256],64538:[[1582,1581],256],64539:[[1582,1605],256],64540:[[1587,1580],256],64541:[[1587,1581],256],64542:[[1587,1582],256],64543:[[1587,1605],256],64544:[[1589,1581],256],64545:[[1589,1605],256],64546:[[1590,1580],256],64547:[[1590,1581],256],64548:[[1590,1582],256],64549:[[1590,1605],256],64550:[[1591,1581],256],64551:[[1591,1605],256],64552:[[1592,1605],256],64553:[[1593,1580],256],64554:[[1593,1605],256],64555:[[1594,1580],256],64556:[[1594,1605],256],64557:[[1601,1580],256],64558:[[1601,1581],256],64559:[[1601,1582],256],64560:[[1601,1605],256],64561:[[1601,1609],256],64562:[[1601,1610],256],64563:[[1602,1581],256],64564:[[1602,1605],256],64565:[[1602,1609],256],64566:[[1602,1610],256],64567:[[1603,1575],256],64568:[[1603,1580],256],64569:[[1603,1581],256],64570:[[1603,1582],256],64571:[[1603,1604],256],64572:[[1603,1605],256],64573:[[1603,1609],256],64574:[[1603,1610],256],64575:[[1604,1580],256],64576:[[1604,1581],256],64577:[[1604,1582],256],64578:[[1604,1605],256],64579:[[1604,1609],256],64580:[[1604,1610],256],64581:[[1605,1580],256],64582:[[1605,1581],256],64583:[[1605,1582],256],64584:[[1605,1605],256],64585:[[1605,1609],256],64586:[[1605,1610],256],64587:[[1606,1580],256],64588:[[1606,1581],256],64589:[[1606,1582],256],64590:[[1606,1605],256],64591:[[1606,1609],256],64592:[[1606,1610],256],64593:[[1607,1580],256],64594:[[1607,1605],256],64595:[[1607,1609],256],64596:[[1607,1610],256],64597:[[1610,1580],256],64598:[[1610,1581],256],64599:[[1610,1582],256],64600:[[1610,1605],256],64601:[[1610,1609],256],64602:[[1610,1610],256],64603:[[1584,1648],256],64604:[[1585,1648],256],64605:[[1609,1648],256],64606:[[32,1612,1617],256],64607:[[32,1613,1617],256],64608:[[32,1614,1617],256],64609:[[32,1615,1617],256],64610:[[32,1616,1617],256],64611:[[32,1617,1648],256],64612:[[1574,1585],256],64613:[[1574,1586],256],64614:[[1574,1605],256],64615:[[1574,1606],256],64616:[[1574,1609],256],64617:[[1574,1610],256],64618:[[1576,1585],256],64619:[[1576,1586],256],64620:[[1576,1605],256],64621:[[1576,1606],256],64622:[[1576,1609],256],64623:[[1576,1610],256],64624:[[1578,1585],256],64625:[[1578,1586],256],64626:[[1578,1605],256],64627:[[1578,1606],256],64628:[[1578,1609],256],64629:[[1578,1610],256],64630:[[1579,1585],256],64631:[[1579,1586],256],64632:[[1579,1605],256],64633:[[1579,1606],256],64634:[[1579,1609],256],64635:[[1579,1610],256],64636:[[1601,1609],256],64637:[[1601,1610],256],64638:[[1602,1609],256],64639:[[1602,1610],256],64640:[[1603,1575],256],64641:[[1603,1604],256],64642:[[1603,1605],256],64643:[[1603,1609],256],64644:[[1603,1610],256],64645:[[1604,1605],256],64646:[[1604,1609],256],64647:[[1604,1610],256],64648:[[1605,1575],256],64649:[[1605,1605],256],64650:[[1606,1585],256],64651:[[1606,1586],256],64652:[[1606,1605],256],64653:[[1606,1606],256],64654:[[1606,1609],256],64655:[[1606,1610],256],64656:[[1609,1648],256],64657:[[1610,1585],256],64658:[[1610,1586],256],64659:[[1610,1605],256],64660:[[1610,1606],256],64661:[[1610,1609],256],64662:[[1610,1610],256],64663:[[1574,1580],256],64664:[[1574,1581],256],64665:[[1574,1582],256],64666:[[1574,1605],256],64667:[[1574,1607],256],64668:[[1576,1580],256],64669:[[1576,1581],256],64670:[[1576,1582],256],64671:[[1576,1605],256],64672:[[1576,1607],256],64673:[[1578,1580],256],64674:[[1578,1581],256],64675:[[1578,1582],256],64676:[[1578,1605],256],64677:[[1578,1607],256],64678:[[1579,1605],256],64679:[[1580,1581],256],64680:[[1580,1605],256],64681:[[1581,1580],256],64682:[[1581,1605],256],64683:[[1582,1580],256],64684:[[1582,1605],256],64685:[[1587,1580],256],64686:[[1587,1581],256],64687:[[1587,1582],256],64688:[[1587,1605],256],64689:[[1589,1581],256],64690:[[1589,1582],256],64691:[[1589,1605],256],64692:[[1590,1580],256],64693:[[1590,1581],256],64694:[[1590,1582],256],64695:[[1590,1605],256],64696:[[1591,1581],256],64697:[[1592,1605],256],64698:[[1593,1580],256],64699:[[1593,1605],256],64700:[[1594,1580],256],64701:[[1594,1605],256],64702:[[1601,1580],256],64703:[[1601,1581],256],64704:[[1601,1582],256],64705:[[1601,1605],256],64706:[[1602,1581],256],64707:[[1602,1605],256],64708:[[1603,1580],256],64709:[[1603,1581],256],64710:[[1603,1582],256],64711:[[1603,1604],256],64712:[[1603,1605],256],64713:[[1604,1580],256],64714:[[1604,1581],256],64715:[[1604,1582],256],64716:[[1604,1605],256],64717:[[1604,1607],256],64718:[[1605,1580],256],64719:[[1605,1581],256],64720:[[1605,1582],256],64721:[[1605,1605],256],64722:[[1606,1580],256],64723:[[1606,1581],256],64724:[[1606,1582],256],64725:[[1606,1605],256],64726:[[1606,1607],256],64727:[[1607,1580],256],64728:[[1607,1605],256],64729:[[1607,1648],256],64730:[[1610,1580],256],64731:[[1610,1581],256],64732:[[1610,1582],256],64733:[[1610,1605],256],64734:[[1610,1607],256],64735:[[1574,1605],256],64736:[[1574,1607],256],64737:[[1576,1605],256],64738:[[1576,1607],256],64739:[[1578,1605],256],64740:[[1578,1607],256],64741:[[1579,1605],256],64742:[[1579,1607],256],64743:[[1587,1605],256],64744:[[1587,1607],256],64745:[[1588,1605],256],64746:[[1588,1607],256],64747:[[1603,1604],256],64748:[[1603,1605],256],64749:[[1604,1605],256],64750:[[1606,1605],256],64751:[[1606,1607],256],64752:[[1610,1605],256],64753:[[1610,1607],256],64754:[[1600,1614,1617],256],64755:[[1600,1615,1617],256],64756:[[1600,1616,1617],256],64757:[[1591,1609],256],64758:[[1591,1610],256],64759:[[1593,1609],256],64760:[[1593,1610],256],64761:[[1594,1609],256],64762:[[1594,1610],256],64763:[[1587,1609],256],64764:[[1587,1610],256],64765:[[1588,1609],256],64766:[[1588,1610],256],64767:[[1581,1609],256]}, -64768:{64768:[[1581,1610],256],64769:[[1580,1609],256],64770:[[1580,1610],256],64771:[[1582,1609],256],64772:[[1582,1610],256],64773:[[1589,1609],256],64774:[[1589,1610],256],64775:[[1590,1609],256],64776:[[1590,1610],256],64777:[[1588,1580],256],64778:[[1588,1581],256],64779:[[1588,1582],256],64780:[[1588,1605],256],64781:[[1588,1585],256],64782:[[1587,1585],256],64783:[[1589,1585],256],64784:[[1590,1585],256],64785:[[1591,1609],256],64786:[[1591,1610],256],64787:[[1593,1609],256],64788:[[1593,1610],256],64789:[[1594,1609],256],64790:[[1594,1610],256],64791:[[1587,1609],256],64792:[[1587,1610],256],64793:[[1588,1609],256],64794:[[1588,1610],256],64795:[[1581,1609],256],64796:[[1581,1610],256],64797:[[1580,1609],256],64798:[[1580,1610],256],64799:[[1582,1609],256],64800:[[1582,1610],256],64801:[[1589,1609],256],64802:[[1589,1610],256],64803:[[1590,1609],256],64804:[[1590,1610],256],64805:[[1588,1580],256],64806:[[1588,1581],256],64807:[[1588,1582],256],64808:[[1588,1605],256],64809:[[1588,1585],256],64810:[[1587,1585],256],64811:[[1589,1585],256],64812:[[1590,1585],256],64813:[[1588,1580],256],64814:[[1588,1581],256],64815:[[1588,1582],256],64816:[[1588,1605],256],64817:[[1587,1607],256],64818:[[1588,1607],256],64819:[[1591,1605],256],64820:[[1587,1580],256],64821:[[1587,1581],256],64822:[[1587,1582],256],64823:[[1588,1580],256],64824:[[1588,1581],256],64825:[[1588,1582],256],64826:[[1591,1605],256],64827:[[1592,1605],256],64828:[[1575,1611],256],64829:[[1575,1611],256],64848:[[1578,1580,1605],256],64849:[[1578,1581,1580],256],64850:[[1578,1581,1580],256],64851:[[1578,1581,1605],256],64852:[[1578,1582,1605],256],64853:[[1578,1605,1580],256],64854:[[1578,1605,1581],256],64855:[[1578,1605,1582],256],64856:[[1580,1605,1581],256],64857:[[1580,1605,1581],256],64858:[[1581,1605,1610],256],64859:[[1581,1605,1609],256],64860:[[1587,1581,1580],256],64861:[[1587,1580,1581],256],64862:[[1587,1580,1609],256],64863:[[1587,1605,1581],256],64864:[[1587,1605,1581],256],64865:[[1587,1605,1580],256],64866:[[1587,1605,1605],256],64867:[[1587,1605,1605],256],64868:[[1589,1581,1581],256],64869:[[1589,1581,1581],256],64870:[[1589,1605,1605],256],64871:[[1588,1581,1605],256],64872:[[1588,1581,1605],256],64873:[[1588,1580,1610],256],64874:[[1588,1605,1582],256],64875:[[1588,1605,1582],256],64876:[[1588,1605,1605],256],64877:[[1588,1605,1605],256],64878:[[1590,1581,1609],256],64879:[[1590,1582,1605],256],64880:[[1590,1582,1605],256],64881:[[1591,1605,1581],256],64882:[[1591,1605,1581],256],64883:[[1591,1605,1605],256],64884:[[1591,1605,1610],256],64885:[[1593,1580,1605],256],64886:[[1593,1605,1605],256],64887:[[1593,1605,1605],256],64888:[[1593,1605,1609],256],64889:[[1594,1605,1605],256],64890:[[1594,1605,1610],256],64891:[[1594,1605,1609],256],64892:[[1601,1582,1605],256],64893:[[1601,1582,1605],256],64894:[[1602,1605,1581],256],64895:[[1602,1605,1605],256],64896:[[1604,1581,1605],256],64897:[[1604,1581,1610],256],64898:[[1604,1581,1609],256],64899:[[1604,1580,1580],256],64900:[[1604,1580,1580],256],64901:[[1604,1582,1605],256],64902:[[1604,1582,1605],256],64903:[[1604,1605,1581],256],64904:[[1604,1605,1581],256],64905:[[1605,1581,1580],256],64906:[[1605,1581,1605],256],64907:[[1605,1581,1610],256],64908:[[1605,1580,1581],256],64909:[[1605,1580,1605],256],64910:[[1605,1582,1580],256],64911:[[1605,1582,1605],256],64914:[[1605,1580,1582],256],64915:[[1607,1605,1580],256],64916:[[1607,1605,1605],256],64917:[[1606,1581,1605],256],64918:[[1606,1581,1609],256],64919:[[1606,1580,1605],256],64920:[[1606,1580,1605],256],64921:[[1606,1580,1609],256],64922:[[1606,1605,1610],256],64923:[[1606,1605,1609],256],64924:[[1610,1605,1605],256],64925:[[1610,1605,1605],256],64926:[[1576,1582,1610],256],64927:[[1578,1580,1610],256],64928:[[1578,1580,1609],256],64929:[[1578,1582,1610],256],64930:[[1578,1582,1609],256],64931:[[1578,1605,1610],256],64932:[[1578,1605,1609],256],64933:[[1580,1605,1610],256],64934:[[1580,1581,1609],256],64935:[[1580,1605,1609],256],64936:[[1587,1582,1609],256],64937:[[1589,1581,1610],256],64938:[[1588,1581,1610],256],64939:[[1590,1581,1610],256],64940:[[1604,1580,1610],256],64941:[[1604,1605,1610],256],64942:[[1610,1581,1610],256],64943:[[1610,1580,1610],256],64944:[[1610,1605,1610],256],64945:[[1605,1605,1610],256],64946:[[1602,1605,1610],256],64947:[[1606,1581,1610],256],64948:[[1602,1605,1581],256],64949:[[1604,1581,1605],256],64950:[[1593,1605,1610],256],64951:[[1603,1605,1610],256],64952:[[1606,1580,1581],256],64953:[[1605,1582,1610],256],64954:[[1604,1580,1605],256],64955:[[1603,1605,1605],256],64956:[[1604,1580,1605],256],64957:[[1606,1580,1581],256],64958:[[1580,1581,1610],256],64959:[[1581,1580,1610],256],64960:[[1605,1580,1610],256],64961:[[1601,1605,1610],256],64962:[[1576,1581,1610],256],64963:[[1603,1605,1605],256],64964:[[1593,1580,1605],256],64965:[[1589,1605,1605],256],64966:[[1587,1582,1610],256],64967:[[1606,1580,1610],256],65008:[[1589,1604,1746],256],65009:[[1602,1604,1746],256],65010:[[1575,1604,1604,1607],256],65011:[[1575,1603,1576,1585],256],65012:[[1605,1581,1605,1583],256],65013:[[1589,1604,1593,1605],256],65014:[[1585,1587,1608,1604],256],65015:[[1593,1604,1610,1607],256],65016:[[1608,1587,1604,1605],256],65017:[[1589,1604,1609],256],65018:[[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605],256],65019:[[1580,1604,32,1580,1604,1575,1604,1607],256],65020:[[1585,1740,1575,1604],256]}, -65024:{65040:[[44],256],65041:[[12289],256],65042:[[12290],256],65043:[[58],256],65044:[[59],256],65045:[[33],256],65046:[[63],256],65047:[[12310],256],65048:[[12311],256],65049:[[8230],256],65056:[,230],65057:[,230],65058:[,230],65059:[,230],65060:[,230],65061:[,230],65062:[,230],65063:[,220],65064:[,220],65065:[,220],65066:[,220],65067:[,220],65068:[,220],65069:[,220],65072:[[8229],256],65073:[[8212],256],65074:[[8211],256],65075:[[95],256],65076:[[95],256],65077:[[40],256],65078:[[41],256],65079:[[123],256],65080:[[125],256],65081:[[12308],256],65082:[[12309],256],65083:[[12304],256],65084:[[12305],256],65085:[[12298],256],65086:[[12299],256],65087:[[12296],256],65088:[[12297],256],65089:[[12300],256],65090:[[12301],256],65091:[[12302],256],65092:[[12303],256],65095:[[91],256],65096:[[93],256],65097:[[8254],256],65098:[[8254],256],65099:[[8254],256],65100:[[8254],256],65101:[[95],256],65102:[[95],256],65103:[[95],256],65104:[[44],256],65105:[[12289],256],65106:[[46],256],65108:[[59],256],65109:[[58],256],65110:[[63],256],65111:[[33],256],65112:[[8212],256],65113:[[40],256],65114:[[41],256],65115:[[123],256],65116:[[125],256],65117:[[12308],256],65118:[[12309],256],65119:[[35],256],65120:[[38],256],65121:[[42],256],65122:[[43],256],65123:[[45],256],65124:[[60],256],65125:[[62],256],65126:[[61],256],65128:[[92],256],65129:[[36],256],65130:[[37],256],65131:[[64],256],65136:[[32,1611],256],65137:[[1600,1611],256],65138:[[32,1612],256],65140:[[32,1613],256],65142:[[32,1614],256],65143:[[1600,1614],256],65144:[[32,1615],256],65145:[[1600,1615],256],65146:[[32,1616],256],65147:[[1600,1616],256],65148:[[32,1617],256],65149:[[1600,1617],256],65150:[[32,1618],256],65151:[[1600,1618],256],65152:[[1569],256],65153:[[1570],256],65154:[[1570],256],65155:[[1571],256],65156:[[1571],256],65157:[[1572],256],65158:[[1572],256],65159:[[1573],256],65160:[[1573],256],65161:[[1574],256],65162:[[1574],256],65163:[[1574],256],65164:[[1574],256],65165:[[1575],256],65166:[[1575],256],65167:[[1576],256],65168:[[1576],256],65169:[[1576],256],65170:[[1576],256],65171:[[1577],256],65172:[[1577],256],65173:[[1578],256],65174:[[1578],256],65175:[[1578],256],65176:[[1578],256],65177:[[1579],256],65178:[[1579],256],65179:[[1579],256],65180:[[1579],256],65181:[[1580],256],65182:[[1580],256],65183:[[1580],256],65184:[[1580],256],65185:[[1581],256],65186:[[1581],256],65187:[[1581],256],65188:[[1581],256],65189:[[1582],256],65190:[[1582],256],65191:[[1582],256],65192:[[1582],256],65193:[[1583],256],65194:[[1583],256],65195:[[1584],256],65196:[[1584],256],65197:[[1585],256],65198:[[1585],256],65199:[[1586],256],65200:[[1586],256],65201:[[1587],256],65202:[[1587],256],65203:[[1587],256],65204:[[1587],256],65205:[[1588],256],65206:[[1588],256],65207:[[1588],256],65208:[[1588],256],65209:[[1589],256],65210:[[1589],256],65211:[[1589],256],65212:[[1589],256],65213:[[1590],256],65214:[[1590],256],65215:[[1590],256],65216:[[1590],256],65217:[[1591],256],65218:[[1591],256],65219:[[1591],256],65220:[[1591],256],65221:[[1592],256],65222:[[1592],256],65223:[[1592],256],65224:[[1592],256],65225:[[1593],256],65226:[[1593],256],65227:[[1593],256],65228:[[1593],256],65229:[[1594],256],65230:[[1594],256],65231:[[1594],256],65232:[[1594],256],65233:[[1601],256],65234:[[1601],256],65235:[[1601],256],65236:[[1601],256],65237:[[1602],256],65238:[[1602],256],65239:[[1602],256],65240:[[1602],256],65241:[[1603],256],65242:[[1603],256],65243:[[1603],256],65244:[[1603],256],65245:[[1604],256],65246:[[1604],256],65247:[[1604],256],65248:[[1604],256],65249:[[1605],256],65250:[[1605],256],65251:[[1605],256],65252:[[1605],256],65253:[[1606],256],65254:[[1606],256],65255:[[1606],256],65256:[[1606],256],65257:[[1607],256],65258:[[1607],256],65259:[[1607],256],65260:[[1607],256],65261:[[1608],256],65262:[[1608],256],65263:[[1609],256],65264:[[1609],256],65265:[[1610],256],65266:[[1610],256],65267:[[1610],256],65268:[[1610],256],65269:[[1604,1570],256],65270:[[1604,1570],256],65271:[[1604,1571],256],65272:[[1604,1571],256],65273:[[1604,1573],256],65274:[[1604,1573],256],65275:[[1604,1575],256],65276:[[1604,1575],256]}, -65280:{65281:[[33],256],65282:[[34],256],65283:[[35],256],65284:[[36],256],65285:[[37],256],65286:[[38],256],65287:[[39],256],65288:[[40],256],65289:[[41],256],65290:[[42],256],65291:[[43],256],65292:[[44],256],65293:[[45],256],65294:[[46],256],65295:[[47],256],65296:[[48],256],65297:[[49],256],65298:[[50],256],65299:[[51],256],65300:[[52],256],65301:[[53],256],65302:[[54],256],65303:[[55],256],65304:[[56],256],65305:[[57],256],65306:[[58],256],65307:[[59],256],65308:[[60],256],65309:[[61],256],65310:[[62],256],65311:[[63],256],65312:[[64],256],65313:[[65],256],65314:[[66],256],65315:[[67],256],65316:[[68],256],65317:[[69],256],65318:[[70],256],65319:[[71],256],65320:[[72],256],65321:[[73],256],65322:[[74],256],65323:[[75],256],65324:[[76],256],65325:[[77],256],65326:[[78],256],65327:[[79],256],65328:[[80],256],65329:[[81],256],65330:[[82],256],65331:[[83],256],65332:[[84],256],65333:[[85],256],65334:[[86],256],65335:[[87],256],65336:[[88],256],65337:[[89],256],65338:[[90],256],65339:[[91],256],65340:[[92],256],65341:[[93],256],65342:[[94],256],65343:[[95],256],65344:[[96],256],65345:[[97],256],65346:[[98],256],65347:[[99],256],65348:[[100],256],65349:[[101],256],65350:[[102],256],65351:[[103],256],65352:[[104],256],65353:[[105],256],65354:[[106],256],65355:[[107],256],65356:[[108],256],65357:[[109],256],65358:[[110],256],65359:[[111],256],65360:[[112],256],65361:[[113],256],65362:[[114],256],65363:[[115],256],65364:[[116],256],65365:[[117],256],65366:[[118],256],65367:[[119],256],65368:[[120],256],65369:[[121],256],65370:[[122],256],65371:[[123],256],65372:[[124],256],65373:[[125],256],65374:[[126],256],65375:[[10629],256],65376:[[10630],256],65377:[[12290],256],65378:[[12300],256],65379:[[12301],256],65380:[[12289],256],65381:[[12539],256],65382:[[12530],256],65383:[[12449],256],65384:[[12451],256],65385:[[12453],256],65386:[[12455],256],65387:[[12457],256],65388:[[12515],256],65389:[[12517],256],65390:[[12519],256],65391:[[12483],256],65392:[[12540],256],65393:[[12450],256],65394:[[12452],256],65395:[[12454],256],65396:[[12456],256],65397:[[12458],256],65398:[[12459],256],65399:[[12461],256],65400:[[12463],256],65401:[[12465],256],65402:[[12467],256],65403:[[12469],256],65404:[[12471],256],65405:[[12473],256],65406:[[12475],256],65407:[[12477],256],65408:[[12479],256],65409:[[12481],256],65410:[[12484],256],65411:[[12486],256],65412:[[12488],256],65413:[[12490],256],65414:[[12491],256],65415:[[12492],256],65416:[[12493],256],65417:[[12494],256],65418:[[12495],256],65419:[[12498],256],65420:[[12501],256],65421:[[12504],256],65422:[[12507],256],65423:[[12510],256],65424:[[12511],256],65425:[[12512],256],65426:[[12513],256],65427:[[12514],256],65428:[[12516],256],65429:[[12518],256],65430:[[12520],256],65431:[[12521],256],65432:[[12522],256],65433:[[12523],256],65434:[[12524],256],65435:[[12525],256],65436:[[12527],256],65437:[[12531],256],65438:[[12441],256],65439:[[12442],256],65440:[[12644],256],65441:[[12593],256],65442:[[12594],256],65443:[[12595],256],65444:[[12596],256],65445:[[12597],256],65446:[[12598],256],65447:[[12599],256],65448:[[12600],256],65449:[[12601],256],65450:[[12602],256],65451:[[12603],256],65452:[[12604],256],65453:[[12605],256],65454:[[12606],256],65455:[[12607],256],65456:[[12608],256],65457:[[12609],256],65458:[[12610],256],65459:[[12611],256],65460:[[12612],256],65461:[[12613],256],65462:[[12614],256],65463:[[12615],256],65464:[[12616],256],65465:[[12617],256],65466:[[12618],256],65467:[[12619],256],65468:[[12620],256],65469:[[12621],256],65470:[[12622],256],65474:[[12623],256],65475:[[12624],256],65476:[[12625],256],65477:[[12626],256],65478:[[12627],256],65479:[[12628],256],65482:[[12629],256],65483:[[12630],256],65484:[[12631],256],65485:[[12632],256],65486:[[12633],256],65487:[[12634],256],65490:[[12635],256],65491:[[12636],256],65492:[[12637],256],65493:[[12638],256],65494:[[12639],256],65495:[[12640],256],65498:[[12641],256],65499:[[12642],256],65500:[[12643],256],65504:[[162],256],65505:[[163],256],65506:[[172],256],65507:[[175],256],65508:[[166],256],65509:[[165],256],65510:[[8361],256],65512:[[9474],256],65513:[[8592],256],65514:[[8593],256],65515:[[8594],256],65516:[[8595],256],65517:[[9632],256],65518:[[9675],256]} - -}; - - /***** Module to export */ - var unorm = { - nfc: nfc, - nfd: nfd, - nfkc: nfkc, - nfkd: nfkd - }; - - /*globals module:true,define:true*/ - - // CommonJS - if (typeof module === "object") { - module.exports = unorm; - - // AMD - } else if (typeof define === "function" && define.amd) { - define("unorm", function () { - return unorm; - }); - - // Global - } else { - root.unorm = unorm; - } - - /***** Export as shim for String::normalize method *****/ - /* - http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#november_8_2013_draft_rev_21 - - 21.1.3.12 String.prototype.normalize(form="NFC") - When the normalize method is called with one argument form, the following steps are taken: - - 1. Let O be CheckObjectCoercible(this value). - 2. Let S be ToString(O). - 3. ReturnIfAbrupt(S). - 4. If form is not provided or undefined let form be "NFC". - 5. Let f be ToString(form). - 6. ReturnIfAbrupt(f). - 7. If f is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw a RangeError Exception. - 8. Let ns be the String value is the result of normalizing S into the normalization form named by f as specified in Unicode Standard Annex #15, UnicodeNormalizatoin Forms. - 9. Return ns. - - The length property of the normalize method is 0. - - *NOTE* The normalize function is intentionally generic; it does not require that its this value be a String object. Therefore it can be transferred to other kinds of objects for use as a method. - */ - unorm.shimApplied = false; - - if (!String.prototype.normalize) { - String.prototype.normalize = function(form) { - var str = "" + this; - form = form === undefined ? "NFC" : form; - - if (form === "NFC") { - return unorm.nfc(str); - } else if (form === "NFD") { - return unorm.nfd(str); - } else if (form === "NFKC") { - return unorm.nfkc(str); - } else if (form === "NFKD") { - return unorm.nfkd(str); - } else { - throw new RangeError("Invalid normalization form: " + form); - } - }; - - unorm.shimApplied = true; - } -}(this)); diff --git a/node_modules/cordova-android/node_modules/unorm/package.json b/node_modules/cordova-android/node_modules/unorm/package.json deleted file mode 100644 index a394fea..0000000 --- a/node_modules/cordova-android/node_modules/unorm/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "unorm@^1.3.3", - "_id": "unorm@1.4.1", - "_inBundle": true, - "_integrity": "sha1-NkIA1fE2RsqLzURJAnEzVhR5IwA=", - "_location": "/cordova-android/unorm", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "unorm@^1.3.3", - "name": "unorm", - "escapedName": "unorm", - "rawSpec": "^1.3.3", - "saveSpec": null, - "fetchSpec": "^1.3.3" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/cordova-common" - ], - "_resolved": "https://registry.npmjs.org/unorm/-/unorm-1.4.1.tgz", - "_shasum": "364200d5f13646ca8bcd44490271335614792300", - "_spec": "unorm@^1.3.3", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/cordova-common", - "author": { - "name": "Bjarke Walling", - "email": "bwp@bwp.dk" - }, - "bugs": { - "url": "https://github.com/walling/unorm/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Bjarke Walling", - "email": "bwp@bwp.dk" - }, - { - "name": "Oleg Grenrus", - "email": "oleg.grenrus@iki.fi" - }, - { - "name": "Matsuza", - "email": "matsuza@gmail.com" - } - ], - "deprecated": false, - "description": "JavaScript Unicode 8.0 Normalization - NFC, NFD, NFKC, NFKD. Read UAX #15 Unicode Normalization Forms.", - "devDependencies": { - "benchmark": "~1.0.0", - "grunt": "~0.4.1", - "grunt-contrib-jshint": "~0.8.0", - "grunt-contrib-watch": "~0.5.0", - "grunt-simple-mocha": "~0.4.0", - "unorm": "1.4.1" - }, - "engines": { - "node": ">= 0.4.0" - }, - "homepage": "https://github.com/walling/unorm#readme", - "license": "MIT or GPL-2.0", - "main": "./lib/unorm.js", - "name": "unorm", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/walling/unorm.git" - }, - "scripts": { - "test": "grunt test" - }, - "version": "1.4.1" -} diff --git a/node_modules/cordova-android/node_modules/wrappy/LICENSE b/node_modules/cordova-android/node_modules/wrappy/LICENSE deleted file mode 100644 index 19129e3..0000000 --- a/node_modules/cordova-android/node_modules/wrappy/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/wrappy/README.md b/node_modules/cordova-android/node_modules/wrappy/README.md deleted file mode 100644 index 98eab25..0000000 --- a/node_modules/cordova-android/node_modules/wrappy/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# wrappy - -Callback wrapping utility - -## USAGE - -```javascript -var wrappy = require("wrappy") - -// var wrapper = wrappy(wrapperFunction) - -// make sure a cb is called only once -// See also: http://npm.im/once for this specific use case -var once = wrappy(function (cb) { - var called = false - return function () { - if (called) return - called = true - return cb.apply(this, arguments) - } -}) - -function printBoo () { - console.log('boo') -} -// has some rando property -printBoo.iAmBooPrinter = true - -var onlyPrintOnce = once(printBoo) - -onlyPrintOnce() // prints 'boo' -onlyPrintOnce() // does nothing - -// random property is retained! -assert.equal(onlyPrintOnce.iAmBooPrinter, true) -``` diff --git a/node_modules/cordova-android/node_modules/wrappy/package.json b/node_modules/cordova-android/node_modules/wrappy/package.json deleted file mode 100644 index 974e9fa..0000000 --- a/node_modules/cordova-android/node_modules/wrappy/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "wrappy@1", - "_id": "wrappy@1.0.2", - "_inBundle": true, - "_integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "_location": "/cordova-android/wrappy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "wrappy@1", - "name": "wrappy", - "escapedName": "wrappy", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/cordova-android", - "/cordova-android/inflight", - "/cordova-android/once" - ], - "_resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "_shasum": "b5243d8f3ec1aa35f1364605bc0d1036e30ab69f", - "_spec": "wrappy@1", - "_where": "/Users/brodybits/Documents/cordova/cordova-android/node_modules/inflight", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "bugs": { - "url": "https://github.com/npm/wrappy/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "Callback wrapping utility", - "devDependencies": { - "tap": "^2.3.1" - }, - "directories": { - "test": "test" - }, - "files": [ - "wrappy.js" - ], - "homepage": "https://github.com/npm/wrappy", - "license": "ISC", - "main": "wrappy.js", - "name": "wrappy", - "repository": { - "type": "git", - "url": "git+https://github.com/npm/wrappy.git" - }, - "scripts": { - "test": "tap --coverage test/*.js" - }, - "version": "1.0.2" -} diff --git a/node_modules/cordova-android/node_modules/wrappy/wrappy.js b/node_modules/cordova-android/node_modules/wrappy/wrappy.js deleted file mode 100644 index bb7e7d6..0000000 --- a/node_modules/cordova-android/node_modules/wrappy/wrappy.js +++ /dev/null @@ -1,33 +0,0 @@ -// Returns a wrapper function that returns a wrapped callback -// The wrapper function should do some stuff, and return a -// presumably different callback function. -// This makes sure that own properties are retained, so that -// decorations and such are not lost along the way. -module.exports = wrappy -function wrappy (fn, cb) { - if (fn && cb) return wrappy(fn)(cb) - - if (typeof fn !== 'function') - throw new TypeError('need wrapper function') - - Object.keys(fn).forEach(function (k) { - wrapper[k] = fn[k] - }) - - return wrapper - - function wrapper() { - var args = new Array(arguments.length) - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } - var ret = fn.apply(this, args) - var cb = args[args.length-1] - if (typeof ret === 'function' && ret !== cb) { - Object.keys(cb).forEach(function (k) { - ret[k] = cb[k] - }) - } - return ret - } -} diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/.npmignore b/node_modules/cordova-android/node_modules/xmlbuilder/.npmignore deleted file mode 100644 index b6ad1f6..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.travis.yml -src -test -perf -coverage diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/CHANGELOG.md b/node_modules/cordova-android/node_modules/xmlbuilder/CHANGELOG.md deleted file mode 100644 index b0cb178..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/CHANGELOG.md +++ /dev/null @@ -1,395 +0,0 @@ -# Change Log - -All notable changes to this project are documented in this file. This project adheres to [Semantic Versioning](http://semver.org/#semantic-versioning-200). - -## [8.2.2] - 2016-04-08 -- Falsy values can now be used as a text node in callback mode. - -## [8.2.1] - 2016-04-07 -- Falsy values can now be used as a text node. See -[#117](https://github.com/oozcitak/xmlbuilder-js/issues/117). - -## [8.2.0] - 2016-04-01 -- Removed lodash dependency to keep the library small and simple. See -[#114](https://github.com/oozcitak/xmlbuilder-js/issues/114), -[#53](https://github.com/oozcitak/xmlbuilder-js/issues/53), -and [#43](https://github.com/oozcitak/xmlbuilder-js/issues/43). -- Added title case to name conversion options. - -## [8.1.0] - 2016-03-29 -- Added the callback option to the `begin` export function. When used with a -callback function, the XML document will be generated in chunks and each chunk -will be passed to the supplied function. In this mode, `begin` uses a different -code path and the builder should use much less memory since the entire XML tree -is not kept. There are a few drawbacks though. For example, traversing the document -tree or adding attributes to a node after it is written is not possible. It is -also not possible to remove nodes or attributes. - -``` js -var result = ''; - -builder.begin(function(chunk) { result += chunk; }) - .dec() - .ele('root') - .ele('xmlbuilder').up() - .end(); -``` - -- Replaced native `Object.assign` with `lodash.assign` to support old JS engines. See [#111](https://github.com/oozcitak/xmlbuilder-js/issues/111). - -## [8.0.0] - 2016-03-25 -- Added the `begin` export function. See the wiki for details. -- Added the ability to add comments and processing instructions before and after the root element. Added `commentBefore`, `commentAfter`, `instructionBefore` and `instructionAfter` functions for this purpose. -- Dropped support for old node.js releases. Minimum required node.js version is now 4.0. - -## [7.0.0] - 2016-03-21 -- Processing instructions are now created as regular nodes. This is a major breaking change if you are using processing instructions. Previously processing instructions were inserted before their parent node. After this change processing instructions are appended to the children of the parent node. Note that it is not currently possible to insert processing instructions before or after the root element. -```js -root.ele('node').ins('pi'); -// pre-v7 - -// v7 - -``` - -## [6.0.0] - 2016-03-20 -- Added custom XML writers. The default string conversion functions are now collected under the `XMLStringWriter` class which can be accessed by the `stringWriter(options)` function exported by the module. An `XMLStreamWriter` is also added which outputs the XML document to a writable stream. A stream writer can be created by calling the `streamWriter(stream, options)` function exported by the module. Both classes are heavily customizable and the details are added to the wiki. It is also possible to write an XML writer from scratch and use it when calling `end()` on the XML document. - -## [5.0.1] - 2016-03-08 -- Moved require statements for text case conversion to the top of files to reduce lazy requires. - -## [5.0.0] - 2016-03-05 -- Added text case option for element names and attribute names. Valid cases are `lower`, `upper`, `camel`, `kebab` and `snake`. -- Attribute and element values are escaped according to the [Canonical XML 1.0 specification](http://www.w3.org/TR/2000/WD-xml-c14n-20000119.html#charescaping). See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54) and [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). -- Added the `allowEmpty` option to `end()`. When this option is set, empty elements are not self-closed. -- Added support for [nested CDATA](https://en.wikipedia.org/wiki/CDATA#Nesting). The triad `]]>` in CDATA is now automatically replaced with `]]]]>`. - -## [4.2.1] - 2016-01-15 -- Updated lodash dependency to 4.0.0. - -## [4.2.0] - 2015-12-16 -- Added the `noDoubleEncoding` option to `create()` to control whether existing html entities are encoded. - -## [4.1.0] - 2015-11-11 -- Added the `separateArrayItems` option to `create()` to control how arrays are handled when converting from objects. e.g. - -```js -root.ele({ number: [ "one", "two" ]}); -// with separateArrayItems: true - - - - -// with separateArrayItems: false -one -two -``` - -## [4.0.0] - 2015-11-01 -- Removed the `#list` decorator. Array items are now created as child nodes by default. -- Fixed a bug where the XML encoding string was checked partially. - -## [3.1.0] - 2015-09-19 -- `#list` decorator ignores empty arrays. - -## [3.0.0] - 2015-09-10 -- Allow `\r`, `\n` and `\t` in attribute values without escaping. See [#86](https://github.com/oozcitak/xmlbuilder-js/issues/86). - -## [2.6.5] - 2015-09-09 -- Use native `isArray` instead of lodash. -- Indentation of processing instructions are set to the parent element's. - -## [2.6.4] - 2015-05-27 -- Updated lodash dependency to 3.5.0. - -## [2.6.3] - 2015-05-27 -- Bumped version because previous release was not published on npm. - -## [2.6.2] - 2015-03-10 -- Updated lodash dependency to 3.5.0. - -## [2.6.1] - 2015-02-20 -- Updated lodash dependency to 3.3.0. - -## [2.6.0] - 2015-02-20 -- Fixed a bug where the `XMLNode` constructor overwrote the super class parent. -- Removed document property from cloned nodes. -- Switched to mocha.js for testing. - -## [2.5.2] - 2015-02-16 -- Updated lodash dependency to 3.2.0. - -## [2.5.1] - 2015-02-09 -- Updated lodash dependency to 3.1.0. -- Support all node >= 0.8. - -## [2.5.0] - 2015-00-03 -- Updated lodash dependency to 3.0.0. - -## [2.4.6] - 2015-01-26 -- Show more information from attribute creation with null values. -- Added iojs as an engine. -- Self close elements with empty text. - -## [2.4.5] - 2014-11-15 -- Fixed prepublish script to run on windows. -- Fixed bug in XMLStringifier where an undefined value was used while reporting an invalid encoding value. -- Moved require statements to the top of files to reduce lazy requires. See [#62](https://github.com/oozcitak/xmlbuilder-js/issues/62). - -## [2.4.4] - 2014-09-08 -- Added the `offset` option to `toString()` for use in XML fragments. - -## [2.4.3] - 2014-08-13 -- Corrected license in package description. - -## [2.4.2] - 2014-08-13 -- Dropped performance test and memwatch dependency. - -## [2.4.1] - 2014-08-12 -- Fixed a bug where empty indent string was omitted when pretty printing. See [#59](https://github.com/oozcitak/xmlbuilder-js/issues/59). - -## [2.4.0] - 2014-08-04 -- Correct cases of pubID and sysID. -- Use single lodash instead of separate npm modules. See [#53](https://github.com/oozcitak/xmlbuilder-js/issues/53). -- Escape according to Canonical XML 1.0. See [#54](https://github.com/oozcitak/xmlbuilder-js/issues/54). - -## [2.3.0] - 2014-07-17 -- Convert objects to JS primitives while sanitizing user input. -- Object builder preserves items with null values. See [#44](https://github.com/oozcitak/xmlbuilder-js/issues/44). -- Use modularized lodash functions to cut down dependencies. -- Process empty objects when converting from objects so that we don't throw on empty child objects. - -## [2.2.1] - 2014-04-04 -- Bumped version because previous release was not published on npm. - -## [2.2.0] - 2014-04-04 -- Switch to lodash from underscore. -- Removed legacy `ext` option from `create()`. -- Drop old node versions: 0.4, 0.5, 0.6. 0.8 is the minimum requirement from now on. - -## [2.1.0] - 2013-12-30 -- Removed duplicate null checks from constructors. -- Fixed node count in performance test. -- Added option for skipping null attribute values. See [#26](https://github.com/oozcitak/xmlbuilder-js/issues/26). -- Allow multiple values in `att()` and `ins()`. -- Added ability to run individual performance tests. -- Added flag for ignoring decorator strings. - -## [2.0.1] - 2013-12-24 -- Removed performance tests from npm package. - -## [2.0.0] - 2013-12-24 -- Combined loops for speed up. -- Added support for the DTD and XML declaration. -- `clone` includes attributes. -- Added performance tests. -- Evaluate attribute value if function. -- Evaluate instruction value if function. - -## [1.1.2] - 2013-12-11 -- Changed processing instruction decorator to `?`. - -## [1.1.1] - 2013-12-11 -- Added processing instructions to JS object conversion. - -## [1.1.0] - 2013-12-10 -- Added license to package. -- `create()` and `element()` accept JS object to fully build the document. -- Added `nod()` and `n()` aliases for `node()`. -- Renamed `convertAttChar` decorator to `convertAttKey`. -- Ignore empty decorator strings when converting JS objects. - -## [1.0.2] - 2013-11-27 -- Removed temp file which was accidentally included in the package. - -## [1.0.1] - 2013-11-27 -- Custom stringify functions affect current instance only. - -## [1.0.0] - 2013-11-27 -- Added processing instructions. -- Added stringify functions to sanitize and convert input values. -- Added option for headless XML documents. -- Added vows tests. -- Removed Makefile. Using npm publish scripts instead. -- Removed the `begin()` function. `create()` begins the document by creating the root node. - -## [0.4.3] - 2013-11-08 -- Added option to include surrogate pairs in XML content. See [#29](https://github.com/oozcitak/xmlbuilder-js/issues/29). -- Fixed empty value string representation in pretty mode. -- Added pre and postpublish scripts to package.json. -- Filtered out prototype properties when appending attributes. See [#31](https://github.com/oozcitak/xmlbuilder-js/issues/31). - -## [0.4.2] - 2012-09-14 -- Removed README.md from `.npmignore`. - -## [0.4.1] - 2012-08-31 -- Removed `begin()` calls in favor of `XMLBuilder` constructor. -- Added the `end()` function. `end()` is a convenience over `doc().toString()`. - -## [0.4.0] - 2012-08-31 -- Added arguments to `XMLBuilder` constructor to allow the name of the root element and XML prolog to be defined in one line. -- Soft deprecated `begin()`. - -## [0.3.11] - 2012-08-13 -- Package keywords are fixed to be an array of values. - -## [0.3.10] - 2012-08-13 -- Brought back npm package contents which were lost due to incorrect configuration of `package.json` in previous releases. - -## [0.3.3] - 2012-07-27 -- Implemented `importXMLBuilder()`. - -## [0.3.2] - 2012-07-20 -- Fixed a duplicated escaping problem on `element()`. -- Fixed a problem with text node creation from empty string. -- Calling `root()` on the document element returns the root element. -- `XMLBuilder` no longer extends `XMLFragment`. - -## [0.3.1] - 2011-11-28 -- Added guards for document element so that nodes cannot be inserted at document level. - -## [0.3.0] - 2011-11-28 -- Added `doc()` to return the document element. - -## [0.2.2] - 2011-11-28 -- Prevent code relying on `up()`'s older behavior to break. - -## [0.2.1] - 2011-11-28 -- Added the `root()` function. - -## [0.2.0] - 2011-11-21 -- Added Travis-CI integration. -- Added coffee-script dependency. -- Added insert, traversal and delete functions. - -## [0.1.7] - 2011-10-25 -- No changes. Accidental release. - -## [0.1.6] - 2011-10-25 -- Corrected `package.json` bugs link to `url` from `web`. - -## [0.1.5] - 2011-08-08 -- Added missing npm package contents. - -## [0.1.4] - 2011-07-29 -- Text-only nodes are no longer indented. -- Added documentation for multiple instances. - -## [0.1.3] - 2011-07-27 -- Exported the `create()` function to return a new instance. This allows multiple builder instances to be constructed. -- Fixed `u()` function so that it now correctly calls `up()`. -- Fixed typo in `element()` so that `attributes` and `text` can be passed interchangeably. - -## [0.1.2] - 2011-06-03 -- `ele()` accepts element text. -- `attributes()` now overrides existing attributes if passed the same attribute name. - -## [0.1.1] - 2011-05-19 -- Added the raw output option. -- Removed most validity checks. - -## [0.1.0] - 2011-04-27 -- `text()` and `cdata()` now return parent element. -- Attribute values are escaped. - -## [0.0.7] - 2011-04-23 -- Coerced text values to string. - -## [0.0.6] - 2011-02-23 -- Added support for XML comments. -- Text nodes are checked against CharData. - -## [0.0.5] - 2010-12-31 -- Corrected the name of the main npm module in `package.json`. - -## [0.0.4] - 2010-12-28 -- Added `.npmignore`. - -## [0.0.3] - 2010-12-27 -- root element is now constructed in `begin()`. -- moved prolog to `begin()`. -- Added the ability to have CDATA in element text. -- Removed unused prolog aliases. -- Removed `builder()` function from main module. -- Added the name of the main npm module in `package.json`. - -## [0.0.2] - 2010-11-03 -- `element()` expands nested arrays. -- Added pretty printing. -- Added the `up()`, `build()` and `prolog()` functions. -- Added readme. - -## 0.0.1 - 2010-11-02 -- Initial release - -[8.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.1...v8.2.2 -[8.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.2.0...v8.2.1 -[8.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.1.0...v8.2.0 -[8.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v8.0.0...v8.1.0 -[8.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v7.0.0...v8.0.0 -[7.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v6.0.0...v7.0.0 -[6.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.1...v6.0.0 -[5.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v5.0.0...v5.0.1 -[5.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.1...v5.0.0 -[4.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.2.0...v4.2.1 -[4.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.1.0...v4.2.0 -[4.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v4.0.0...v4.1.0 -[4.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.1.0...v4.0.0 -[3.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v3.0.0...v3.1.0 -[3.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.5...v3.0.0 -[2.6.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.4...v2.6.5 -[2.6.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.3...v2.6.4 -[2.6.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.2...v2.6.3 -[2.6.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.1...v2.6.2 -[2.6.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.6.0...v2.6.1 -[2.6.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.2...v2.6.0 -[2.5.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.1...v2.5.2 -[2.5.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.5.0...v2.5.1 -[2.5.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.6...v2.5.0 -[2.4.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.5...v2.4.6 -[2.4.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.4...v2.4.5 -[2.4.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.3...v2.4.4 -[2.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.2...v2.4.3 -[2.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.1...v2.4.2 -[2.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.4.0...v2.4.1 -[2.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.3.0...v2.4.0 -[2.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.1...v2.3.0 -[2.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.2.0...v2.2.1 -[2.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.1.0...v2.2.0 -[2.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.1...v2.1.0 -[2.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v2.0.0...v2.0.1 -[2.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.2...v2.0.0 -[1.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.1...v1.1.2 -[1.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.1.0...v1.1.1 -[1.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.2...v1.1.0 -[1.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.1...v1.0.2 -[1.0.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v1.0.0...v1.0.1 -[1.0.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.3...v1.0.0 -[0.4.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.2...v0.4.3 -[0.4.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.1...v0.4.2 -[0.4.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.4.0...v0.4.1 -[0.4.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.11...v0.4.0 -[0.3.11]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.10...v0.3.11 -[0.3.10]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.3...v0.3.10 -[0.3.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.2...v0.3.3 -[0.3.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.1...v0.3.2 -[0.3.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.3.0...v0.3.1 -[0.3.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.2...v0.3.0 -[0.2.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.1...v0.2.2 -[0.2.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.2.0...v0.2.1 -[0.2.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.7...v0.2.0 -[0.1.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.6...v0.1.7 -[0.1.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.5...v0.1.6 -[0.1.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.4...v0.1.5 -[0.1.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.3...v0.1.4 -[0.1.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.2...v0.1.3 -[0.1.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.1...v0.1.2 -[0.1.1]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.1.0...v0.1.1 -[0.1.0]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.7...v0.1.0 -[0.0.7]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.6...v0.0.7 -[0.0.6]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.5...v0.0.6 -[0.0.5]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.4...v0.0.5 -[0.0.4]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.3...v0.0.4 -[0.0.3]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.2...v0.0.3 -[0.0.2]: https://github.com/oozcitak/xmlbuilder-js/compare/v0.0.1...v0.0.2 - diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/LICENSE b/node_modules/cordova-android/node_modules/xmlbuilder/LICENSE deleted file mode 100644 index e7cbac9..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2013 Ozgur Ozcitak - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/README.md b/node_modules/cordova-android/node_modules/xmlbuilder/README.md deleted file mode 100644 index d465aa4..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# xmlbuilder-js - -An XML builder for [node.js](https://nodejs.org/) similar to -[java-xmlbuilder](https://github.com/jmurty/java-xmlbuilder). - -[![License](http://img.shields.io/npm/l/xmlbuilder.svg?style=flat-square)](http://opensource.org/licenses/MIT) -[![NPM Version](http://img.shields.io/npm/v/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) -[![NPM Downloads](https://img.shields.io/npm/dm/xmlbuilder.svg?style=flat-square)](https://npmjs.com/package/xmlbuilder) - -[![Build Status](http://img.shields.io/travis/oozcitak/xmlbuilder-js.svg?style=flat-square)](http://travis-ci.org/oozcitak/xmlbuilder-js) -[![Dev Dependency Status](http://img.shields.io/david/dev/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://david-dm.org/oozcitak/xmlbuilder-js) -[![Code Coverage](https://img.shields.io/coveralls/oozcitak/xmlbuilder-js.svg?style=flat-square)](https://coveralls.io/github/oozcitak/xmlbuilder-js) - -### Installation: - -``` sh -npm install xmlbuilder -``` - -### Usage: - -``` js -var builder = require('xmlbuilder'); -var xml = builder.create('root') - .ele('xmlbuilder') - .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') - .end({ pretty: true}); - -console.log(xml); -``` - -will result in: - -``` xml - - - - git://github.com/oozcitak/xmlbuilder-js.git - - -``` - -It is also possible to convert objects into nodes: - -``` js -builder.create({ - root: { - xmlbuilder: { - repo: { - '@type': 'git', // attributes start with @ - '#text': 'git://github.com/oozcitak/xmlbuilder-js.git' // text node - } - } - } -}); -``` - -If you need to do some processing: - -``` js -var root = builder.create('squares'); -root.com('f(x) = x^2'); -for(var i = 1; i <= 5; i++) -{ - var item = root.ele('data'); - item.att('x', i); - item.att('y', i * i); -} -``` - -This will result in: - -``` xml - - - - - - - - - -``` - -See the [wiki](https://github.com/oozcitak/xmlbuilder-js/wiki) for details. diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/Utility.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/Utility.js deleted file mode 100644 index aca1d1e..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/Utility.js +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var assign, camelCase, capitalize, isArray, isEmpty, isFunction, isObject, isPlainObject, kebabCase, snakeCase, titleCase, words, - slice = [].slice, - hasProp = {}.hasOwnProperty; - - assign = function() { - var i, key, len, source, sources, target; - target = arguments[0], sources = 2 <= arguments.length ? slice.call(arguments, 1) : []; - if (isFunction(Object.assign)) { - Object.assign.apply(null, arguments); - } else { - for (i = 0, len = sources.length; i < len; i++) { - source = sources[i]; - if (source != null) { - for (key in source) { - if (!hasProp.call(source, key)) continue; - target[key] = source[key]; - } - } - } - } - return target; - }; - - isFunction = function(val) { - return !!val && Object.prototype.toString.call(val) === '[object Function]'; - }; - - isObject = function(val) { - var ref; - return !!val && ((ref = typeof val) === 'function' || ref === 'object'); - }; - - isArray = function(val) { - if (isFunction(Array.isArray)) { - return Array.isArray(val); - } else { - return Object.prototype.toString.call(val) === '[object Array]'; - } - }; - - isEmpty = function(val) { - var key; - if (isArray(val)) { - return !val.length; - } else { - for (key in val) { - if (!hasProp.call(val, key)) continue; - return false; - } - return true; - } - }; - - isPlainObject = function(val) { - var ctor, proto; - return isObject(val) && (proto = Object.getPrototypeOf(val)) && (ctor = proto.constructor) && (typeof ctor === 'function') && (ctor instanceof ctor) && (Function.prototype.toString.call(ctor) === Function.prototype.toString.call(Object)); - }; - - words = function(val) { - return (val.split(/[-_\s]+|(?=[A-Z][a-z])/) || []).filter(function(n) { - return !!n; - }); - }; - - camelCase = function(val) { - var i, index, len, r, ref, word; - r = ''; - ref = words(val); - for (index = i = 0, len = ref.length; i < len; index = ++i) { - word = ref[index]; - r += index ? capitalize(word.toLowerCase()) : word.toLowerCase(); - } - return r; - }; - - titleCase = function(val) { - var i, index, len, r, ref, word; - r = ''; - ref = words(val); - for (index = i = 0, len = ref.length; i < len; index = ++i) { - word = ref[index]; - r += capitalize(word.toLowerCase()); - } - return r; - }; - - kebabCase = function(val) { - var i, index, len, r, ref, word; - r = ''; - ref = words(val); - for (index = i = 0, len = ref.length; i < len; index = ++i) { - word = ref[index]; - r += (index ? '-' : '') + word.toLowerCase(); - } - return r; - }; - - snakeCase = function(val) { - var i, index, len, r, ref, word; - r = ''; - ref = words(val); - for (index = i = 0, len = ref.length; i < len; index = ++i) { - word = ref[index]; - r += (index ? '_' : '') + word.toLowerCase(); - } - return r; - }; - - capitalize = function(val) { - return val.charAt(0).toUpperCase() + val.slice(1); - }; - - module.exports.assign = assign; - - module.exports.isFunction = isFunction; - - module.exports.isObject = isObject; - - module.exports.isArray = isArray; - - module.exports.isEmpty = isEmpty; - - module.exports.isPlainObject = isPlainObject; - - module.exports.camelCase = camelCase; - - module.exports.titleCase = titleCase; - - module.exports.kebabCase = kebabCase; - - module.exports.snakeCase = snakeCase; - - module.exports.capitalize = capitalize; - - module.exports.words = words; - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLAttribute.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLAttribute.js deleted file mode 100644 index 51ccebe..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLAttribute.js +++ /dev/null @@ -1,31 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLAttribute; - - module.exports = XMLAttribute = (function() { - function XMLAttribute(parent, name, value) { - this.options = parent.options; - this.stringify = parent.stringify; - if (name == null) { - throw new Error("Missing attribute name of element " + parent.name); - } - if (value == null) { - throw new Error("Missing attribute value for attribute " + name + " of element " + parent.name); - } - this.name = this.stringify.attName(name); - this.value = this.stringify.attValue(value); - } - - XMLAttribute.prototype.clone = function() { - return Object.create(this); - }; - - XMLAttribute.prototype.toString = function(options) { - return this.options.writer.set(options).attribute(this); - }; - - return XMLAttribute; - - })(); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLCData.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLCData.js deleted file mode 100644 index 8ee861d..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLCData.js +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLCData, XMLNode, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLCData = (function(superClass) { - extend(XMLCData, superClass); - - function XMLCData(parent, text) { - XMLCData.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing CDATA text"); - } - this.text = this.stringify.cdata(text); - } - - XMLCData.prototype.clone = function() { - return Object.create(this); - }; - - XMLCData.prototype.toString = function(options) { - return this.options.writer.set(options).cdata(this); - }; - - return XMLCData; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLComment.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLComment.js deleted file mode 100644 index 2c987a3..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLComment.js +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLComment, XMLNode, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLComment = (function(superClass) { - extend(XMLComment, superClass); - - function XMLComment(parent, text) { - XMLComment.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing comment text"); - } - this.text = this.stringify.comment(text); - } - - XMLComment.prototype.clone = function() { - return Object.create(this); - }; - - XMLComment.prototype.toString = function(options) { - return this.options.writer.set(options).comment(this); - }; - - return XMLComment; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDAttList.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDAttList.js deleted file mode 100644 index 1d7e18e..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDAttList.js +++ /dev/null @@ -1,50 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDTDAttList, XMLNode, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLDTDAttList = (function(superClass) { - extend(XMLDTDAttList, superClass); - - function XMLDTDAttList(parent, elementName, attributeName, attributeType, defaultValueType, defaultValue) { - XMLDTDAttList.__super__.constructor.call(this, parent); - if (elementName == null) { - throw new Error("Missing DTD element name"); - } - if (attributeName == null) { - throw new Error("Missing DTD attribute name"); - } - if (!attributeType) { - throw new Error("Missing DTD attribute type"); - } - if (!defaultValueType) { - throw new Error("Missing DTD attribute default"); - } - if (defaultValueType.indexOf('#') !== 0) { - defaultValueType = '#' + defaultValueType; - } - if (!defaultValueType.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/)) { - throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT"); - } - if (defaultValue && !defaultValueType.match(/^(#FIXED|#DEFAULT)$/)) { - throw new Error("Default value only applies to #FIXED or #DEFAULT"); - } - this.elementName = this.stringify.eleName(elementName); - this.attributeName = this.stringify.attName(attributeName); - this.attributeType = this.stringify.dtdAttType(attributeType); - this.defaultValue = this.stringify.dtdAttDefault(defaultValue); - this.defaultValueType = defaultValueType; - } - - XMLDTDAttList.prototype.toString = function(options) { - return this.options.writer.set(options).dtdAttList(this); - }; - - return XMLDTDAttList; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDElement.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDElement.js deleted file mode 100644 index d206771..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDElement.js +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDTDElement, XMLNode, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLDTDElement = (function(superClass) { - extend(XMLDTDElement, superClass); - - function XMLDTDElement(parent, name, value) { - XMLDTDElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing DTD element name"); - } - if (!value) { - value = '(#PCDATA)'; - } - if (Array.isArray(value)) { - value = '(' + value.join(',') + ')'; - } - this.name = this.stringify.eleName(name); - this.value = this.stringify.dtdElementValue(value); - } - - XMLDTDElement.prototype.toString = function(options) { - return this.options.writer.set(options).dtdElement(this); - }; - - return XMLDTDElement; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDEntity.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDEntity.js deleted file mode 100644 index 4cfd422..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDEntity.js +++ /dev/null @@ -1,56 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDTDEntity, XMLNode, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - module.exports = XMLDTDEntity = (function(superClass) { - extend(XMLDTDEntity, superClass); - - function XMLDTDEntity(parent, pe, name, value) { - XMLDTDEntity.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing entity name"); - } - if (value == null) { - throw new Error("Missing entity value"); - } - this.pe = !!pe; - this.name = this.stringify.eleName(name); - if (!isObject(value)) { - this.value = this.stringify.dtdEntityValue(value); - } else { - if (!value.pubID && !value.sysID) { - throw new Error("Public and/or system identifiers are required for an external entity"); - } - if (value.pubID && !value.sysID) { - throw new Error("System identifier is required for a public external entity"); - } - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - if (value.nData != null) { - this.nData = this.stringify.dtdNData(value.nData); - } - if (this.pe && this.nData) { - throw new Error("Notation declaration is not allowed in a parameter entity"); - } - } - } - - XMLDTDEntity.prototype.toString = function(options) { - return this.options.writer.set(options).dtdEntity(this); - }; - - return XMLDTDEntity; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDNotation.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDNotation.js deleted file mode 100644 index 8747d9d..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDTDNotation.js +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDTDNotation, XMLNode, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLDTDNotation = (function(superClass) { - extend(XMLDTDNotation, superClass); - - function XMLDTDNotation(parent, name, value) { - XMLDTDNotation.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing notation name"); - } - if (!value.pubID && !value.sysID) { - throw new Error("Public or system identifiers are required for an external entity"); - } - this.name = this.stringify.eleName(name); - if (value.pubID != null) { - this.pubID = this.stringify.dtdPubID(value.pubID); - } - if (value.sysID != null) { - this.sysID = this.stringify.dtdSysID(value.sysID); - } - } - - XMLDTDNotation.prototype.toString = function(options) { - return this.options.writer.set(options).dtdNotation(this); - }; - - return XMLDTDNotation; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDeclaration.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDeclaration.js deleted file mode 100644 index c8f2c06..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDeclaration.js +++ /dev/null @@ -1,40 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDeclaration, XMLNode, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - module.exports = XMLDeclaration = (function(superClass) { - extend(XMLDeclaration, superClass); - - function XMLDeclaration(parent, version, encoding, standalone) { - var ref; - XMLDeclaration.__super__.constructor.call(this, parent); - if (isObject(version)) { - ref = version, version = ref.version, encoding = ref.encoding, standalone = ref.standalone; - } - if (!version) { - version = '1.0'; - } - this.version = this.stringify.xmlVersion(version); - if (encoding != null) { - this.encoding = this.stringify.xmlEncoding(encoding); - } - if (standalone != null) { - this.standalone = this.stringify.xmlStandalone(standalone); - } - } - - XMLDeclaration.prototype.toString = function(options) { - return this.options.writer.set(options).declaration(this); - }; - - return XMLDeclaration; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocType.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocType.js deleted file mode 100644 index fa5e020..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocType.js +++ /dev/null @@ -1,107 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDocType, XMLNode, isObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - isObject = require('./Utility').isObject; - - XMLNode = require('./XMLNode'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - module.exports = XMLDocType = (function(superClass) { - extend(XMLDocType, superClass); - - function XMLDocType(parent, pubID, sysID) { - var ref, ref1; - XMLDocType.__super__.constructor.call(this, parent); - this.documentObject = parent; - if (isObject(pubID)) { - ref = pubID, pubID = ref.pubID, sysID = ref.sysID; - } - if (sysID == null) { - ref1 = [pubID, sysID], sysID = ref1[0], pubID = ref1[1]; - } - if (pubID != null) { - this.pubID = this.stringify.dtdPubID(pubID); - } - if (sysID != null) { - this.sysID = this.stringify.dtdSysID(sysID); - } - } - - XMLDocType.prototype.element = function(name, value) { - var child; - child = new XMLDTDElement(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var child; - child = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.entity = function(name, value) { - var child; - child = new XMLDTDEntity(this, false, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.pEntity = function(name, value) { - var child; - child = new XMLDTDEntity(this, true, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.notation = function(name, value) { - var child; - child = new XMLDTDNotation(this, name, value); - this.children.push(child); - return this; - }; - - XMLDocType.prototype.toString = function(options) { - return this.options.writer.set(options).docType(this); - }; - - XMLDocType.prototype.ele = function(name, value) { - return this.element(name, value); - }; - - XMLDocType.prototype.att = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - return this.attList(elementName, attributeName, attributeType, defaultValueType, defaultValue); - }; - - XMLDocType.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocType.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocType.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - XMLDocType.prototype.up = function() { - return this.root() || this.documentObject; - }; - - return XMLDocType; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocument.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocument.js deleted file mode 100644 index 2882faf..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocument.js +++ /dev/null @@ -1,48 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLDocument, XMLNode, XMLStringWriter, XMLStringifier, isPlainObject, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - isPlainObject = require('./Utility').isPlainObject; - - XMLNode = require('./XMLNode'); - - XMLStringifier = require('./XMLStringifier'); - - XMLStringWriter = require('./XMLStringWriter'); - - module.exports = XMLDocument = (function(superClass) { - extend(XMLDocument, superClass); - - function XMLDocument(options) { - XMLDocument.__super__.constructor.call(this, null); - options || (options = {}); - if (!options.writer) { - options.writer = new XMLStringWriter(); - } - this.options = options; - this.stringify = new XMLStringifier(options); - this.isDocument = true; - } - - XMLDocument.prototype.end = function(writer) { - var writerOptions; - if (!writer) { - writer = this.options.writer; - } else if (isPlainObject(writer)) { - writerOptions = writer; - writer = this.options.writer.set(writerOptions); - } - return writer.document(this); - }; - - XMLDocument.prototype.toString = function(options) { - return this.options.writer.set(options).document(this); - }; - - return XMLDocument; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocumentCB.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocumentCB.js deleted file mode 100644 index b8506e2..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLDocumentCB.js +++ /dev/null @@ -1,402 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLAttribute, XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLDocumentCB, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLStringifier, XMLText, isFunction, isObject, isPlainObject, ref, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isPlainObject = ref.isPlainObject; - - XMLElement = require('./XMLElement'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLRaw = require('./XMLRaw'); - - XMLText = require('./XMLText'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLAttribute = require('./XMLAttribute'); - - XMLStringifier = require('./XMLStringifier'); - - XMLStringWriter = require('./XMLStringWriter'); - - module.exports = XMLDocumentCB = (function() { - function XMLDocumentCB(options, onData, onEnd) { - var writerOptions; - options || (options = {}); - if (!options.writer) { - options.writer = new XMLStringWriter(options); - } else if (isPlainObject(options.writer)) { - writerOptions = options.writer; - options.writer = new XMLStringWriter(writerOptions); - } - this.options = options; - this.writer = options.writer; - this.stringify = new XMLStringifier(options); - this.onDataCallback = onData || function() {}; - this.onEndCallback = onEnd || function() {}; - this.currentNode = null; - this.currentLevel = -1; - this.openTags = {}; - this.documentStarted = false; - this.documentCompleted = false; - this.root = null; - } - - XMLDocumentCB.prototype.node = function(name, attributes, text) { - var ref1; - if (name == null) { - throw new Error("Missing node name"); - } - if (this.root && this.currentLevel === -1) { - throw new Error("Document can only have one root node"); - } - this.openCurrent(); - name = name.valueOf(); - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; - } - this.currentNode = new XMLElement(this, name, attributes); - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - if (text != null) { - this.text(text); - } - return this; - }; - - XMLDocumentCB.prototype.element = function(name, attributes, text) { - if (this.currentNode && this.currentNode instanceof XMLDocType) { - return this.dtdElement.apply(this, arguments); - } else { - return this.node(name, attributes, text); - } - }; - - XMLDocumentCB.prototype.attribute = function(name, value) { - var attName, attValue; - if (!this.currentNode || this.currentNode.children) { - throw new Error("att() can only be used immediately after an ele() call in callback mode"); - } - if (name != null) { - name = name.valueOf(); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (!this.options.skipNullAttributes || (value != null)) { - this.currentNode.attributes[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLDocumentCB.prototype.text = function(value) { - var node; - this.openCurrent(); - node = new XMLText(this, value); - this.onData(this.writer.text(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.cdata = function(value) { - var node; - this.openCurrent(); - node = new XMLCData(this, value); - this.onData(this.writer.cdata(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.comment = function(value) { - var node; - this.openCurrent(); - node = new XMLComment(this, value); - this.onData(this.writer.comment(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.raw = function(value) { - var node; - this.openCurrent(); - node = new XMLRaw(this, value); - this.onData(this.writer.raw(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.instruction = function(target, value) { - var i, insTarget, insValue, len, node; - this.openCurrent(); - if (target != null) { - target = target.valueOf(); - } - if (value != null) { - value = value.valueOf(); - } - if (Array.isArray(target)) { - for (i = 0, len = target.length; i < len; i++) { - insTarget = target[i]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - node = new XMLProcessingInstruction(this, target, value); - this.onData(this.writer.processingInstruction(node, this.currentLevel + 1)); - } - return this; - }; - - XMLDocumentCB.prototype.declaration = function(version, encoding, standalone) { - var node; - this.openCurrent(); - if (this.documentStarted) { - throw new Error("declaration() must be the first node"); - } - node = new XMLDeclaration(this, version, encoding, standalone); - this.onData(this.writer.declaration(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.doctype = function(root, pubID, sysID) { - this.openCurrent(); - if (root == null) { - throw new Error("Missing root node name"); - } - if (this.root) { - throw new Error("dtd() must come before the root node"); - } - this.currentNode = new XMLDocType(this, pubID, sysID); - this.currentNode.rootNodeName = root; - this.currentNode.children = false; - this.currentLevel++; - this.openTags[this.currentLevel] = this.currentNode; - return this; - }; - - XMLDocumentCB.prototype.dtdElement = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDElement(this, name, value); - this.onData(this.writer.dtdElement(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.attList = function(elementName, attributeName, attributeType, defaultValueType, defaultValue) { - var node; - this.openCurrent(); - node = new XMLDTDAttList(this, elementName, attributeName, attributeType, defaultValueType, defaultValue); - this.onData(this.writer.dtdAttList(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.entity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, false, name, value); - this.onData(this.writer.dtdEntity(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.pEntity = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDEntity(this, true, name, value); - this.onData(this.writer.dtdEntity(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.notation = function(name, value) { - var node; - this.openCurrent(); - node = new XMLDTDNotation(this, name, value); - this.onData(this.writer.dtdNotation(node, this.currentLevel + 1)); - return this; - }; - - XMLDocumentCB.prototype.up = function() { - if (this.currentLevel < 0) { - throw new Error("The document node has no parent"); - } - if (this.currentNode) { - if (this.currentNode.children) { - this.closeNode(this.currentNode); - } else { - this.openNode(this.currentNode); - } - this.currentNode = null; - } else { - this.closeNode(this.openTags[this.currentLevel]); - } - delete this.openTags[this.currentLevel]; - this.currentLevel--; - return this; - }; - - XMLDocumentCB.prototype.end = function() { - while (this.currentLevel >= 0) { - this.up(); - } - return this.onEnd(); - }; - - XMLDocumentCB.prototype.openCurrent = function() { - if (this.currentNode) { - this.currentNode.children = true; - return this.openNode(this.currentNode); - } - }; - - XMLDocumentCB.prototype.openNode = function(node) { - if (!node.isOpen) { - if (!this.root && this.currentLevel === 0 && node instanceof XMLElement) { - this.root = node; - } - this.onData(this.writer.openNode(node, this.currentLevel)); - return node.isOpen = true; - } - }; - - XMLDocumentCB.prototype.closeNode = function(node) { - if (!node.isClosed) { - this.onData(this.writer.closeNode(node, this.currentLevel)); - return node.isClosed = true; - } - }; - - XMLDocumentCB.prototype.onData = function(chunk) { - this.documentStarted = true; - return this.onDataCallback(chunk); - }; - - XMLDocumentCB.prototype.onEnd = function() { - this.documentCompleted = true; - return this.onEndCallback(); - }; - - XMLDocumentCB.prototype.ele = function() { - return this.element.apply(this, arguments); - }; - - XMLDocumentCB.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLDocumentCB.prototype.txt = function(value) { - return this.text(value); - }; - - XMLDocumentCB.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLDocumentCB.prototype.com = function(value) { - return this.comment(value); - }; - - XMLDocumentCB.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocumentCB.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLDocumentCB.prototype.dtd = function(root, pubID, sysID) { - return this.doctype(root, pubID, sysID); - }; - - XMLDocumentCB.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLDocumentCB.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLDocumentCB.prototype.t = function(value) { - return this.text(value); - }; - - XMLDocumentCB.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLDocumentCB.prototype.c = function(value) { - return this.comment(value); - }; - - XMLDocumentCB.prototype.r = function(value) { - return this.raw(value); - }; - - XMLDocumentCB.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - XMLDocumentCB.prototype.att = function() { - if (this.currentNode && this.currentNode instanceof XMLDocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - - XMLDocumentCB.prototype.a = function() { - if (this.currentNode && this.currentNode instanceof XMLDocType) { - return this.attList.apply(this, arguments); - } else { - return this.attribute.apply(this, arguments); - } - }; - - XMLDocumentCB.prototype.ent = function(name, value) { - return this.entity(name, value); - }; - - XMLDocumentCB.prototype.pent = function(name, value) { - return this.pEntity(name, value); - }; - - XMLDocumentCB.prototype.not = function(name, value) { - return this.notation(name, value); - }; - - return XMLDocumentCB; - - })(); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLElement.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLElement.js deleted file mode 100644 index 620714b..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLElement.js +++ /dev/null @@ -1,111 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLAttribute, XMLElement, XMLNode, isFunction, isObject, ref, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction; - - XMLNode = require('./XMLNode'); - - XMLAttribute = require('./XMLAttribute'); - - module.exports = XMLElement = (function(superClass) { - extend(XMLElement, superClass); - - function XMLElement(parent, name, attributes) { - XMLElement.__super__.constructor.call(this, parent); - if (name == null) { - throw new Error("Missing element name"); - } - this.name = this.stringify.eleName(name); - this.attributes = {}; - if (attributes != null) { - this.attribute(attributes); - } - if (parent.isDocument) { - this.isRoot = true; - this.documentObject = parent; - parent.rootObject = this; - } - } - - XMLElement.prototype.clone = function() { - var att, attName, clonedSelf, ref1; - clonedSelf = Object.create(this); - if (clonedSelf.isRoot) { - clonedSelf.documentObject = null; - } - clonedSelf.attributes = {}; - ref1 = this.attributes; - for (attName in ref1) { - if (!hasProp.call(ref1, attName)) continue; - att = ref1[attName]; - clonedSelf.attributes[attName] = att.clone(); - } - clonedSelf.children = []; - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - return clonedSelf; - }; - - XMLElement.prototype.attribute = function(name, value) { - var attName, attValue; - if (name != null) { - name = name.valueOf(); - } - if (isObject(name)) { - for (attName in name) { - if (!hasProp.call(name, attName)) continue; - attValue = name[attName]; - this.attribute(attName, attValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - if (!this.options.skipNullAttributes || (value != null)) { - this.attributes[name] = new XMLAttribute(this, name, value); - } - } - return this; - }; - - XMLElement.prototype.removeAttribute = function(name) { - var attName, i, len; - if (name == null) { - throw new Error("Missing attribute name"); - } - name = name.valueOf(); - if (Array.isArray(name)) { - for (i = 0, len = name.length; i < len; i++) { - attName = name[i]; - delete this.attributes[attName]; - } - } else { - delete this.attributes[name]; - } - return this; - }; - - XMLElement.prototype.toString = function(options) { - return this.options.writer.set(options).element(this); - }; - - XMLElement.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLElement.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - return XMLElement; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLNode.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLNode.js deleted file mode 100644 index 1b3b456..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLNode.js +++ /dev/null @@ -1,432 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLCData, XMLComment, XMLDeclaration, XMLDocType, XMLElement, XMLNode, XMLProcessingInstruction, XMLRaw, XMLText, isEmpty, isFunction, isObject, ref, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), isObject = ref.isObject, isFunction = ref.isFunction, isEmpty = ref.isEmpty; - - XMLElement = null; - - XMLCData = null; - - XMLComment = null; - - XMLDeclaration = null; - - XMLDocType = null; - - XMLRaw = null; - - XMLText = null; - - XMLProcessingInstruction = null; - - module.exports = XMLNode = (function() { - function XMLNode(parent) { - this.parent = parent; - if (this.parent) { - this.options = this.parent.options; - this.stringify = this.parent.stringify; - } - this.children = []; - if (!XMLElement) { - XMLElement = require('./XMLElement'); - XMLCData = require('./XMLCData'); - XMLComment = require('./XMLComment'); - XMLDeclaration = require('./XMLDeclaration'); - XMLDocType = require('./XMLDocType'); - XMLRaw = require('./XMLRaw'); - XMLText = require('./XMLText'); - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - } - } - - XMLNode.prototype.element = function(name, attributes, text) { - var childNode, item, j, k, key, lastChild, len, len1, ref1, val; - lastChild = null; - if (attributes == null) { - attributes = {}; - } - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; - } - if (name != null) { - name = name.valueOf(); - } - if (Array.isArray(name)) { - for (j = 0, len = name.length; j < len; j++) { - item = name[j]; - lastChild = this.element(item); - } - } else if (isFunction(name)) { - lastChild = this.element(name.apply()); - } else if (isObject(name)) { - for (key in name) { - if (!hasProp.call(name, key)) continue; - val = name[key]; - if (isFunction(val)) { - val = val.apply(); - } - if ((isObject(val)) && (isEmpty(val))) { - val = null; - } - if (!this.options.ignoreDecorators && this.stringify.convertAttKey && key.indexOf(this.stringify.convertAttKey) === 0) { - lastChild = this.attribute(key.substr(this.stringify.convertAttKey.length), val); - } else if (!this.options.separateArrayItems && Array.isArray(val)) { - for (k = 0, len1 = val.length; k < len1; k++) { - item = val[k]; - childNode = {}; - childNode[key] = item; - lastChild = this.element(childNode); - } - } else if (isObject(val)) { - lastChild = this.element(key); - lastChild.element(val); - } else { - lastChild = this.element(key, val); - } - } - } else { - if (!this.options.ignoreDecorators && this.stringify.convertTextKey && name.indexOf(this.stringify.convertTextKey) === 0) { - lastChild = this.text(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCDataKey && name.indexOf(this.stringify.convertCDataKey) === 0) { - lastChild = this.cdata(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertCommentKey && name.indexOf(this.stringify.convertCommentKey) === 0) { - lastChild = this.comment(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertRawKey && name.indexOf(this.stringify.convertRawKey) === 0) { - lastChild = this.raw(text); - } else if (!this.options.ignoreDecorators && this.stringify.convertPIKey && name.indexOf(this.stringify.convertPIKey) === 0) { - lastChild = this.instruction(name.substr(this.stringify.convertPIKey.length), text); - } else { - lastChild = this.node(name, attributes, text); - } - } - if (lastChild == null) { - throw new Error("Could not create any elements with: " + name); - } - return lastChild; - }; - - XMLNode.prototype.insertBefore = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.insertAfter = function(name, attributes, text) { - var child, i, removed; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.element(name, attributes, text); - Array.prototype.push.apply(this.parent.children, removed); - return child; - }; - - XMLNode.prototype.remove = function() { - var i, ref1; - if (this.isRoot) { - throw new Error("Cannot remove the root element"); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(ref1 = [])), ref1; - return this.parent; - }; - - XMLNode.prototype.node = function(name, attributes, text) { - var child, ref1; - if (name != null) { - name = name.valueOf(); - } - attributes || (attributes = {}); - attributes = attributes.valueOf(); - if (!isObject(attributes)) { - ref1 = [attributes, text], text = ref1[0], attributes = ref1[1]; - } - child = new XMLElement(this, name, attributes); - if (text != null) { - child.text(text); - } - this.children.push(child); - return child; - }; - - XMLNode.prototype.text = function(value) { - var child; - child = new XMLText(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.cdata = function(value) { - var child; - child = new XMLCData(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.comment = function(value) { - var child; - child = new XMLComment(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.commentBefore = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.commentAfter = function(value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.comment(value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.raw = function(value) { - var child; - child = new XMLRaw(this, value); - this.children.push(child); - return this; - }; - - XMLNode.prototype.instruction = function(target, value) { - var insTarget, insValue, instruction, j, len; - if (target != null) { - target = target.valueOf(); - } - if (value != null) { - value = value.valueOf(); - } - if (Array.isArray(target)) { - for (j = 0, len = target.length; j < len; j++) { - insTarget = target[j]; - this.instruction(insTarget); - } - } else if (isObject(target)) { - for (insTarget in target) { - if (!hasProp.call(target, insTarget)) continue; - insValue = target[insTarget]; - this.instruction(insTarget, insValue); - } - } else { - if (isFunction(value)) { - value = value.apply(); - } - instruction = new XMLProcessingInstruction(this, target, value); - this.children.push(instruction); - } - return this; - }; - - XMLNode.prototype.instructionBefore = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.instructionAfter = function(target, value) { - var child, i, removed; - i = this.parent.children.indexOf(this); - removed = this.parent.children.splice(i + 1); - child = this.parent.instruction(target, value); - Array.prototype.push.apply(this.parent.children, removed); - return this; - }; - - XMLNode.prototype.declaration = function(version, encoding, standalone) { - var doc, xmldec; - doc = this.document(); - xmldec = new XMLDeclaration(doc, version, encoding, standalone); - if (doc.children[0] instanceof XMLDeclaration) { - doc.children[0] = xmldec; - } else { - doc.children.unshift(xmldec); - } - return doc.root() || doc; - }; - - XMLNode.prototype.doctype = function(pubID, sysID) { - var child, doc, doctype, i, j, k, len, len1, ref1, ref2; - doc = this.document(); - doctype = new XMLDocType(doc, pubID, sysID); - ref1 = doc.children; - for (i = j = 0, len = ref1.length; j < len; i = ++j) { - child = ref1[i]; - if (child instanceof XMLDocType) { - doc.children[i] = doctype; - return doctype; - } - } - ref2 = doc.children; - for (i = k = 0, len1 = ref2.length; k < len1; i = ++k) { - child = ref2[i]; - if (child.isRoot) { - doc.children.splice(i, 0, doctype); - return doctype; - } - } - doc.children.push(doctype); - return doctype; - }; - - XMLNode.prototype.up = function() { - if (this.isRoot) { - throw new Error("The root node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLNode.prototype.root = function() { - var node; - node = this; - while (node) { - if (node.isDocument) { - return node.rootObject; - } else if (node.isRoot) { - return node; - } else { - node = node.parent; - } - } - }; - - XMLNode.prototype.document = function() { - var node; - node = this; - while (node) { - if (node.isDocument) { - return node; - } else { - node = node.parent; - } - } - }; - - XMLNode.prototype.end = function(options) { - return this.document().end(options); - }; - - XMLNode.prototype.prev = function() { - var i; - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node"); - } - return this.parent.children[i - 1]; - }; - - XMLNode.prototype.next = function() { - var i; - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node"); - } - return this.parent.children[i + 1]; - }; - - XMLNode.prototype.importDocument = function(doc) { - var clonedRoot; - clonedRoot = doc.root().clone(); - clonedRoot.parent = this; - clonedRoot.isRoot = false; - this.children.push(clonedRoot); - return this; - }; - - XMLNode.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.nod = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.txt = function(value) { - return this.text(value); - }; - - XMLNode.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.com = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.ins = function(target, value) { - return this.instruction(target, value); - }; - - XMLNode.prototype.doc = function() { - return this.document(); - }; - - XMLNode.prototype.dec = function(version, encoding, standalone) { - return this.declaration(version, encoding, standalone); - }; - - XMLNode.prototype.dtd = function(pubID, sysID) { - return this.doctype(pubID, sysID); - }; - - XMLNode.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLNode.prototype.n = function(name, attributes, text) { - return this.node(name, attributes, text); - }; - - XMLNode.prototype.t = function(value) { - return this.text(value); - }; - - XMLNode.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLNode.prototype.c = function(value) { - return this.comment(value); - }; - - XMLNode.prototype.r = function(value) { - return this.raw(value); - }; - - XMLNode.prototype.i = function(target, value) { - return this.instruction(target, value); - }; - - XMLNode.prototype.u = function() { - return this.up(); - }; - - XMLNode.prototype.importXMLBuilder = function(doc) { - return this.importDocument(doc); - }; - - return XMLNode; - - })(); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js deleted file mode 100644 index a15be34..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLProcessingInstruction.js +++ /dev/null @@ -1,35 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLNode, XMLProcessingInstruction, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLProcessingInstruction = (function(superClass) { - extend(XMLProcessingInstruction, superClass); - - function XMLProcessingInstruction(parent, target, value) { - XMLProcessingInstruction.__super__.constructor.call(this, parent); - if (target == null) { - throw new Error("Missing instruction target"); - } - this.target = this.stringify.insTarget(target); - if (value) { - this.value = this.stringify.insValue(value); - } - } - - XMLProcessingInstruction.prototype.clone = function() { - return Object.create(this); - }; - - XMLProcessingInstruction.prototype.toString = function(options) { - return this.options.writer.set(options).processingInstruction(this); - }; - - return XMLProcessingInstruction; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLRaw.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLRaw.js deleted file mode 100644 index 152f83b..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLRaw.js +++ /dev/null @@ -1,32 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLNode, XMLRaw, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLNode = require('./XMLNode'); - - module.exports = XMLRaw = (function(superClass) { - extend(XMLRaw, superClass); - - function XMLRaw(parent, text) { - XMLRaw.__super__.constructor.call(this, parent); - if (text == null) { - throw new Error("Missing raw text"); - } - this.value = this.stringify.raw(text); - } - - XMLRaw.prototype.clone = function() { - return Object.create(this); - }; - - XMLRaw.prototype.toString = function(options) { - return this.options.writer.set(options).raw(this); - }; - - return XMLRaw; - - })(XMLNode); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStreamWriter.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStreamWriter.js deleted file mode 100644 index 10a0926..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStreamWriter.js +++ /dev/null @@ -1,278 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStreamWriter, XMLText, XMLWriterBase, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLElement = require('./XMLElement'); - - XMLRaw = require('./XMLRaw'); - - XMLText = require('./XMLText'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLWriterBase = require('./XMLWriterBase'); - - module.exports = XMLStreamWriter = (function(superClass) { - extend(XMLStreamWriter, superClass); - - function XMLStreamWriter(stream, options) { - this.stream = stream; - XMLStreamWriter.__super__.constructor.call(this, options); - } - - XMLStreamWriter.prototype.document = function(doc) { - var child, i, j, len, len1, ref, ref1, results; - ref = doc.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - child.isLastRootNode = false; - } - doc.children[doc.children.length - 1].isLastRootNode = true; - ref1 = doc.children; - results = []; - for (j = 0, len1 = ref1.length; j < len1; j++) { - child = ref1[j]; - switch (false) { - case !(child instanceof XMLDeclaration): - results.push(this.declaration(child)); - break; - case !(child instanceof XMLDocType): - results.push(this.docType(child)); - break; - case !(child instanceof XMLComment): - results.push(this.comment(child)); - break; - case !(child instanceof XMLProcessingInstruction): - results.push(this.processingInstruction(child)); - break; - default: - results.push(this.element(child)); - } - } - return results; - }; - - XMLStreamWriter.prototype.attribute = function(att) { - return this.stream.write(' ' + att.name + '="' + att.value + '"'); - }; - - XMLStreamWriter.prototype.cdata = function(node, level) { - return this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.comment = function(node, level) { - return this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.declaration = function(node, level) { - this.stream.write(this.space(level)); - this.stream.write(''); - return this.stream.write(this.endline(node)); - }; - - XMLStreamWriter.prototype.docType = function(node, level) { - var child, i, len, ref; - level || (level = 0); - this.stream.write(this.space(level)); - this.stream.write(' 0) { - this.stream.write(' ['); - this.stream.write(this.endline(node)); - ref = node.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - switch (false) { - case !(child instanceof XMLDTDAttList): - this.dtdAttList(child, level + 1); - break; - case !(child instanceof XMLDTDElement): - this.dtdElement(child, level + 1); - break; - case !(child instanceof XMLDTDEntity): - this.dtdEntity(child, level + 1); - break; - case !(child instanceof XMLDTDNotation): - this.dtdNotation(child, level + 1); - break; - case !(child instanceof XMLCData): - this.cdata(child, level + 1); - break; - case !(child instanceof XMLComment): - this.comment(child, level + 1); - break; - case !(child instanceof XMLProcessingInstruction): - this.processingInstruction(child, level + 1); - break; - default: - throw new Error("Unknown DTD node type: " + child.constructor.name); - } - } - this.stream.write(']'); - } - this.stream.write('>'); - return this.stream.write(this.endline(node)); - }; - - XMLStreamWriter.prototype.element = function(node, level) { - var att, child, i, len, name, ref, ref1, space; - level || (level = 0); - space = this.space(level); - this.stream.write(space + '<' + node.name); - ref = node.attributes; - for (name in ref) { - if (!hasProp.call(ref, name)) continue; - att = ref[name]; - this.attribute(att); - } - if (node.children.length === 0 || node.children.every(function(e) { - return e.value === ''; - })) { - if (this.allowEmpty) { - this.stream.write('>'); - } else { - this.stream.write('/>'); - } - } else if (this.pretty && node.children.length === 1 && (node.children[0].value != null)) { - this.stream.write('>'); - this.stream.write(node.children[0].value); - this.stream.write(''); - } else { - this.stream.write('>' + this.newline); - ref1 = node.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - switch (false) { - case !(child instanceof XMLCData): - this.cdata(child, level + 1); - break; - case !(child instanceof XMLComment): - this.comment(child, level + 1); - break; - case !(child instanceof XMLElement): - this.element(child, level + 1); - break; - case !(child instanceof XMLRaw): - this.raw(child, level + 1); - break; - case !(child instanceof XMLText): - this.text(child, level + 1); - break; - case !(child instanceof XMLProcessingInstruction): - this.processingInstruction(child, level + 1); - break; - default: - throw new Error("Unknown XML node type: " + child.constructor.name); - } - } - this.stream.write(space + ''); - } - return this.stream.write(this.endline(node)); - }; - - XMLStreamWriter.prototype.processingInstruction = function(node, level) { - this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.raw = function(node, level) { - return this.stream.write(this.space(level) + node.value + this.endline(node)); - }; - - XMLStreamWriter.prototype.text = function(node, level) { - return this.stream.write(this.space(level) + node.value + this.endline(node)); - }; - - XMLStreamWriter.prototype.dtdAttList = function(node, level) { - this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.dtdElement = function(node, level) { - return this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.dtdEntity = function(node, level) { - this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.dtdNotation = function(node, level) { - this.stream.write(this.space(level) + '' + this.endline(node)); - }; - - XMLStreamWriter.prototype.endline = function(node) { - if (!node.isLastRootNode) { - return this.newline; - } else { - return ''; - } - }; - - return XMLStreamWriter; - - })(XMLWriterBase); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringWriter.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringWriter.js deleted file mode 100644 index 3164006..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringWriter.js +++ /dev/null @@ -1,302 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLCData, XMLComment, XMLDTDAttList, XMLDTDElement, XMLDTDEntity, XMLDTDNotation, XMLDeclaration, XMLDocType, XMLElement, XMLProcessingInstruction, XMLRaw, XMLStringWriter, XMLText, XMLWriterBase, - extend = 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; }, - hasProp = {}.hasOwnProperty; - - XMLDeclaration = require('./XMLDeclaration'); - - XMLDocType = require('./XMLDocType'); - - XMLCData = require('./XMLCData'); - - XMLComment = require('./XMLComment'); - - XMLElement = require('./XMLElement'); - - XMLRaw = require('./XMLRaw'); - - XMLText = require('./XMLText'); - - XMLProcessingInstruction = require('./XMLProcessingInstruction'); - - XMLDTDAttList = require('./XMLDTDAttList'); - - XMLDTDElement = require('./XMLDTDElement'); - - XMLDTDEntity = require('./XMLDTDEntity'); - - XMLDTDNotation = require('./XMLDTDNotation'); - - XMLWriterBase = require('./XMLWriterBase'); - - module.exports = XMLStringWriter = (function(superClass) { - extend(XMLStringWriter, superClass); - - function XMLStringWriter(options) { - XMLStringWriter.__super__.constructor.call(this, options); - } - - XMLStringWriter.prototype.document = function(doc) { - var child, i, len, r, ref; - r = ''; - ref = doc.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += (function() { - switch (false) { - case !(child instanceof XMLDeclaration): - return this.declaration(child); - case !(child instanceof XMLDocType): - return this.docType(child); - case !(child instanceof XMLComment): - return this.comment(child); - case !(child instanceof XMLProcessingInstruction): - return this.processingInstruction(child); - default: - return this.element(child, 0); - } - }).call(this); - } - if (this.pretty && r.slice(-this.newline.length) === this.newline) { - r = r.slice(0, -this.newline.length); - } - return r; - }; - - XMLStringWriter.prototype.attribute = function(att) { - return ' ' + att.name + '="' + att.value + '"'; - }; - - XMLStringWriter.prototype.cdata = function(node, level) { - return this.space(level) + '' + this.newline; - }; - - XMLStringWriter.prototype.comment = function(node, level) { - return this.space(level) + '' + this.newline; - }; - - XMLStringWriter.prototype.declaration = function(node, level) { - var r; - r = this.space(level); - r += ''; - r += this.newline; - return r; - }; - - XMLStringWriter.prototype.docType = function(node, level) { - var child, i, len, r, ref; - level || (level = 0); - r = this.space(level); - r += ' 0) { - r += ' ['; - r += this.newline; - ref = node.children; - for (i = 0, len = ref.length; i < len; i++) { - child = ref[i]; - r += (function() { - switch (false) { - case !(child instanceof XMLDTDAttList): - return this.dtdAttList(child, level + 1); - case !(child instanceof XMLDTDElement): - return this.dtdElement(child, level + 1); - case !(child instanceof XMLDTDEntity): - return this.dtdEntity(child, level + 1); - case !(child instanceof XMLDTDNotation): - return this.dtdNotation(child, level + 1); - case !(child instanceof XMLCData): - return this.cdata(child, level + 1); - case !(child instanceof XMLComment): - return this.comment(child, level + 1); - case !(child instanceof XMLProcessingInstruction): - return this.processingInstruction(child, level + 1); - default: - throw new Error("Unknown DTD node type: " + child.constructor.name); - } - }).call(this); - } - r += ']'; - } - r += '>'; - r += this.newline; - return r; - }; - - XMLStringWriter.prototype.element = function(node, level) { - var att, child, i, len, name, r, ref, ref1, space; - level || (level = 0); - space = this.space(level); - r = ''; - r += space + '<' + node.name; - ref = node.attributes; - for (name in ref) { - if (!hasProp.call(ref, name)) continue; - att = ref[name]; - r += this.attribute(att); - } - if (node.children.length === 0 || node.children.every(function(e) { - return e.value === ''; - })) { - if (this.allowEmpty) { - r += '>' + this.newline; - } else { - r += '/>' + this.newline; - } - } else if (this.pretty && node.children.length === 1 && (node.children[0].value != null)) { - r += '>'; - r += node.children[0].value; - r += '' + this.newline; - } else { - r += '>' + this.newline; - ref1 = node.children; - for (i = 0, len = ref1.length; i < len; i++) { - child = ref1[i]; - r += (function() { - switch (false) { - case !(child instanceof XMLCData): - return this.cdata(child, level + 1); - case !(child instanceof XMLComment): - return this.comment(child, level + 1); - case !(child instanceof XMLElement): - return this.element(child, level + 1); - case !(child instanceof XMLRaw): - return this.raw(child, level + 1); - case !(child instanceof XMLText): - return this.text(child, level + 1); - case !(child instanceof XMLProcessingInstruction): - return this.processingInstruction(child, level + 1); - default: - throw new Error("Unknown XML node type: " + child.constructor.name); - } - }).call(this); - } - r += space + '' + this.newline; - } - return r; - }; - - XMLStringWriter.prototype.processingInstruction = function(node, level) { - var r; - r = this.space(level) + '' + this.newline; - return r; - }; - - XMLStringWriter.prototype.raw = function(node, level) { - return this.space(level) + node.value + this.newline; - }; - - XMLStringWriter.prototype.text = function(node, level) { - return this.space(level) + node.value + this.newline; - }; - - XMLStringWriter.prototype.dtdAttList = function(node, level) { - var r; - r = this.space(level) + '' + this.newline; - return r; - }; - - XMLStringWriter.prototype.dtdElement = function(node, level) { - return this.space(level) + '' + this.newline; - }; - - XMLStringWriter.prototype.dtdEntity = function(node, level) { - var r; - r = this.space(level) + '' + this.newline; - return r; - }; - - XMLStringWriter.prototype.dtdNotation = function(node, level) { - var r; - r = this.space(level) + '' + this.newline; - return r; - }; - - XMLStringWriter.prototype.openNode = function(node, level) { - var att, name, r, ref; - level || (level = 0); - if (node instanceof XMLElement) { - r = this.space(level) + '<' + node.name; - ref = node.attributes; - for (name in ref) { - if (!hasProp.call(ref, name)) continue; - att = ref[name]; - r += this.attribute(att); - } - r += (node.children ? '>' : '/>') + this.newline; - return r; - } else { - r = this.space(level) + '') + this.newline; - return r; - } - }; - - XMLStringWriter.prototype.closeNode = function(node, level) { - level || (level = 0); - switch (false) { - case !(node instanceof XMLElement): - return this.space(level) + '' + this.newline; - case !(node instanceof XMLDocType): - return this.space(level) + ']>' + this.newline; - } - }; - - return XMLStringWriter; - - })(XMLWriterBase); - -}).call(this); diff --git a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringifier.js b/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringifier.js deleted file mode 100644 index f549461..0000000 --- a/node_modules/cordova-android/node_modules/xmlbuilder/lib/XMLStringifier.js +++ /dev/null @@ -1,192 +0,0 @@ -// Generated by CoffeeScript 1.10.0 -(function() { - var XMLStringifier, camelCase, kebabCase, ref, snakeCase, titleCase, - bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - hasProp = {}.hasOwnProperty; - - ref = require('./Utility'), camelCase = ref.camelCase, titleCase = ref.titleCase, kebabCase = ref.kebabCase, snakeCase = ref.snakeCase; - - module.exports = XMLStringifier = (function() { - function XMLStringifier(options) { - this.assertLegalChar = bind(this.assertLegalChar, this); - var key, ref1, value; - options || (options = {}); - this.allowSurrogateChars = options.allowSurrogateChars; - this.noDoubleEncoding = options.noDoubleEncoding; - this.textCase = options.textCase; - ref1 = options.stringify || {}; - for (key in ref1) { - if (!hasProp.call(ref1, key)) continue; - value = ref1[key]; - this[key] = value; - } - } - - XMLStringifier.prototype.eleName = function(val) { - val = '' + val || ''; - val = this.applyCase(val); - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.eleText = function(val) { - val = '' + val || ''; - return this.assertLegalChar(this.elEscape(val)); - }; - - XMLStringifier.prototype.cdata = function(val) { - val = '' + val || ''; - val = val.replace(']]>', ']]]]>'); - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.comment = function(val) { - val = '' + val || ''; - if (val.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + val); - } - return this.assertLegalChar(val); - }; - - XMLStringifier.prototype.raw = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.attName = function(val) { - val = '' + val || ''; - return val = this.applyCase(val); - }; - - XMLStringifier.prototype.attValue = function(val) { - val = '' + val || ''; - return this.attEscape(val); - }; - - XMLStringifier.prototype.insTarget = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.insValue = function(val) { - val = '' + val || ''; - if (val.match(/\?>/)) { - throw new Error("Invalid processing instruction value: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlVersion = function(val) { - val = '' + val || ''; - if (!val.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlEncoding = function(val) { - val = '' + val || ''; - if (!val.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/)) { - throw new Error("Invalid encoding: " + val); - } - return val; - }; - - XMLStringifier.prototype.xmlStandalone = function(val) { - if (val) { - return "yes"; - } else { - return "no"; - } - }; - - XMLStringifier.prototype.dtdPubID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdSysID = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdElementValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttType = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdAttDefault = function(val) { - if (val != null) { - return '' + val || ''; - } else { - return val; - } - }; - - XMLStringifier.prototype.dtdEntityValue = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.dtdNData = function(val) { - return '' + val || ''; - }; - - XMLStringifier.prototype.convertAttKey = '@'; - - XMLStringifier.prototype.convertPIKey = '?'; - - XMLStringifier.prototype.convertTextKey = '#text'; - - XMLStringifier.prototype.convertCDataKey = '#cdata'; - - XMLStringifier.prototype.convertCommentKey = '#comment'; - - XMLStringifier.prototype.convertRawKey = '#raw'; - - XMLStringifier.prototype.assertLegalChar = function(str) { - var chars, chr; - if (this.allowSurrogateChars) { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/; - } else { - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; - } - chr = str.match(chars); - if (chr) { - throw new Error("Invalid character (" + chr + ") in string: " + str + " at index " + chr.index); - } - return str; - }; - - XMLStringifier.prototype.applyCase = function(str) { - switch (this.textCase) { - case "camel": - return camelCase(str); - case "title": - return titleCase(str); - case "kebab": - case "lower": - return kebabCase(str); - case "snake": - return snakeCase(str); - case "upper": - return kebabCase(str).toUpperCase(); - default: - return str; - } - }; - - XMLStringifier.prototype.elEscape = function(str) { - var ampregex; - ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, '&').replace(//g, '>').replace(/\r/g, ' '); - }; - - XMLStringifier.prototype.attEscape = function(str) { - var ampregex; - ampregex = this.noDoubleEncoding ? /(?!&\S+;)&/g : /&/g; - return str.replace(ampregex, '&').replace(/=4.0" - }, - "homepage": "http://github.com/oozcitak/xmlbuilder-js", - "keywords": [ - "xml", - "xmlbuilder" - ], - "license": "MIT", - "main": "./lib/index", - "name": "xmlbuilder", - "repository": { - "type": "git", - "url": "git://github.com/oozcitak/xmlbuilder-js.git" - }, - "scripts": { - "postpublish": "rm -rf lib", - "prepublish": "coffee -co lib src", - "test": "mocha && istanbul report text lcov" - }, - "version": "8.2.2" -} diff --git a/node_modules/cordova-android/node_modules/xmldom/.npmignore b/node_modules/cordova-android/node_modules/xmldom/.npmignore deleted file mode 100644 index b094a44..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -test -t -travis.yml -.project -changelog diff --git a/node_modules/cordova-android/node_modules/xmldom/.travis.yml b/node_modules/cordova-android/node_modules/xmldom/.travis.yml deleted file mode 100644 index b95408e..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -language: node_js - -node_js: - - '0.10' - -branches: - only: - - master - - proof - - travis-ci - -# Not using `npm install --dev` because it is recursive. It will pull in the all -# development dependencies for CoffeeScript. Way too much spew in the Travis CI -# build output. - -before_install: - - npm install - - npm install istanbul coveralls - -env: - global: - - secure: "BxUHTsa1WVANLQoimilbZwa1MCWSdM9hOmPWBE/rsYb7uT/iiqkRXXwnWhKtN5CLvTvIQbiAzq4iyPID0S8UHrnxClYQrOuA6QkrtwgIEuDAmijao/bgxobPOremvkwXcpMGIwzYKyYQQtSEaEIQbqf6gSSKW9dBh/GZ/vfTsqo=" diff --git a/node_modules/cordova-android/node_modules/xmldom/LICENSE b/node_modules/cordova-android/node_modules/xmldom/LICENSE deleted file mode 100644 index 68a9b5e..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -You can choose any one of those: - -The MIT License (MIT): - -link:http://opensource.org/licenses/MIT - -LGPL: -http://www.gnu.org/licenses/lgpl.html diff --git a/node_modules/cordova-android/node_modules/xmldom/__package__.js b/node_modules/cordova-android/node_modules/xmldom/__package__.js deleted file mode 100644 index b4cad28..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/__package__.js +++ /dev/null @@ -1,4 +0,0 @@ -this.addScript('dom.js',['DOMImplementation','XMLSerializer']); -this.addScript('dom-parser.js',['DOMHandler','DOMParser'], - ['DOMImplementation','XMLReader']); -this.addScript('sax.js','XMLReader'); \ No newline at end of file diff --git a/node_modules/cordova-android/node_modules/xmldom/changelog b/node_modules/cordova-android/node_modules/xmldom/changelog deleted file mode 100644 index ab815bb..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/changelog +++ /dev/null @@ -1,14 +0,0 @@ -### Version 0.1.16 - -Sat May 4 14:58:03 UTC 2013 - - * Correctly handle multibyte Unicode greater than two byts. #57. #56. - * Initial unit testing and test coverage. #53. #46. #19. - * Create Bower `component.json` #52. - -### Version 0.1.8 - - * Add: some test case from node-o3-xml(excludes xpath support) - * Fix: remove existed attribute before setting (bug introduced in v0.1.5) - * Fix: index direct access for childNodes and any NodeList collection(not w3c standard) - * Fix: remove last child bug diff --git a/node_modules/cordova-android/node_modules/xmldom/component.json b/node_modules/cordova-android/node_modules/xmldom/component.json deleted file mode 100644 index 93b4d57..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/component.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "xmldom", - "version": "0.1.15", - "main": "dom-parser.js", - "ignore": [ - "**/.*", - "node_modules", - "components" - ] -} diff --git a/node_modules/cordova-android/node_modules/xmldom/dom-parser.js b/node_modules/cordova-android/node_modules/xmldom/dom-parser.js deleted file mode 100644 index 41d5226..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/dom-parser.js +++ /dev/null @@ -1,251 +0,0 @@ -function DOMParser(options){ - this.options = options ||{locator:{}}; - -} -DOMParser.prototype.parseFromString = function(source,mimeType){ - var options = this.options; - var sax = new XMLReader(); - var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler - var errorHandler = options.errorHandler; - var locator = options.locator; - var defaultNSMap = options.xmlns||{}; - var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"} - if(locator){ - domBuilder.setDocumentLocator(locator) - } - - sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator); - sax.domBuilder = options.domBuilder || domBuilder; - if(/\/x?html?$/.test(mimeType)){ - entityMap.nbsp = '\xa0'; - entityMap.copy = '\xa9'; - defaultNSMap['']= 'http://www.w3.org/1999/xhtml'; - } - defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace'; - if(source){ - sax.parse(source,defaultNSMap,entityMap); - }else{ - sax.errorHandler.error("invalid doc source"); - } - return domBuilder.doc; -} -function buildErrorHandler(errorImpl,domBuilder,locator){ - if(!errorImpl){ - if(domBuilder instanceof DOMHandler){ - return domBuilder; - } - errorImpl = domBuilder ; - } - var errorHandler = {} - var isCallback = errorImpl instanceof Function; - locator = locator||{} - function build(key){ - var fn = errorImpl[key]; - if(!fn && isCallback){ - fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl; - } - errorHandler[key] = fn && function(msg){ - fn('[xmldom '+key+']\t'+msg+_locator(locator)); - }||function(){}; - } - build('warning'); - build('error'); - build('fatalError'); - return errorHandler; -} - -//console.log('#\n\n\n\n\n\n\n####') -/** - * +ContentHandler+ErrorHandler - * +LexicalHandler+EntityResolver2 - * -DeclHandler-DTDHandler - * - * DefaultHandler:EntityResolver, DTDHandler, ContentHandler, ErrorHandler - * DefaultHandler2:DefaultHandler,LexicalHandler, DeclHandler, EntityResolver2 - * @link http://www.saxproject.org/apidoc/org/xml/sax/helpers/DefaultHandler.html - */ -function DOMHandler() { - this.cdata = false; -} -function position(locator,node){ - node.lineNumber = locator.lineNumber; - node.columnNumber = locator.columnNumber; -} -/** - * @see org.xml.sax.ContentHandler#startDocument - * @link http://www.saxproject.org/apidoc/org/xml/sax/ContentHandler.html - */ -DOMHandler.prototype = { - startDocument : function() { - this.doc = new DOMImplementation().createDocument(null, null, null); - if (this.locator) { - this.doc.documentURI = this.locator.systemId; - } - }, - startElement:function(namespaceURI, localName, qName, attrs) { - var doc = this.doc; - var el = doc.createElementNS(namespaceURI, qName||localName); - var len = attrs.length; - appendElement(this, el); - this.currentElement = el; - - this.locator && position(this.locator,el) - for (var i = 0 ; i < len; i++) { - var namespaceURI = attrs.getURI(i); - var value = attrs.getValue(i); - var qName = attrs.getQName(i); - var attr = doc.createAttributeNS(namespaceURI, qName); - this.locator &&position(attrs.getLocator(i),attr); - attr.value = attr.nodeValue = value; - el.setAttributeNode(attr) - } - }, - endElement:function(namespaceURI, localName, qName) { - var current = this.currentElement - var tagName = current.tagName; - this.currentElement = current.parentNode; - }, - startPrefixMapping:function(prefix, uri) { - }, - endPrefixMapping:function(prefix) { - }, - processingInstruction:function(target, data) { - var ins = this.doc.createProcessingInstruction(target, data); - this.locator && position(this.locator,ins) - appendElement(this, ins); - }, - ignorableWhitespace:function(ch, start, length) { - }, - characters:function(chars, start, length) { - chars = _toString.apply(this,arguments) - //console.log(chars) - if(chars){ - if (this.cdata) { - var charNode = this.doc.createCDATASection(chars); - } else { - var charNode = this.doc.createTextNode(chars); - } - if(this.currentElement){ - this.currentElement.appendChild(charNode); - }else if(/^\s*$/.test(chars)){ - this.doc.appendChild(charNode); - //process xml - } - this.locator && position(this.locator,charNode) - } - }, - skippedEntity:function(name) { - }, - endDocument:function() { - this.doc.normalize(); - }, - setDocumentLocator:function (locator) { - if(this.locator = locator){// && !('lineNumber' in locator)){ - locator.lineNumber = 0; - } - }, - //LexicalHandler - comment:function(chars, start, length) { - chars = _toString.apply(this,arguments) - var comm = this.doc.createComment(chars); - this.locator && position(this.locator,comm) - appendElement(this, comm); - }, - - startCDATA:function() { - //used in characters() methods - this.cdata = true; - }, - endCDATA:function() { - this.cdata = false; - }, - - startDTD:function(name, publicId, systemId) { - var impl = this.doc.implementation; - if (impl && impl.createDocumentType) { - var dt = impl.createDocumentType(name, publicId, systemId); - this.locator && position(this.locator,dt) - appendElement(this, dt); - } - }, - /** - * @see org.xml.sax.ErrorHandler - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - warning:function(error) { - console.warn('[xmldom warning]\t'+error,_locator(this.locator)); - }, - error:function(error) { - console.error('[xmldom error]\t'+error,_locator(this.locator)); - }, - fatalError:function(error) { - console.error('[xmldom fatalError]\t'+error,_locator(this.locator)); - throw error; - } -} -function _locator(l){ - if(l){ - return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']' - } -} -function _toString(chars,start,length){ - if(typeof chars == 'string'){ - return chars.substr(start,length) - }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)") - if(chars.length >= start+length || start){ - return new java.lang.String(chars,start,length)+''; - } - return chars; - } -} - -/* - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/LexicalHandler.html - * used method of org.xml.sax.ext.LexicalHandler: - * #comment(chars, start, length) - * #startCDATA() - * #endCDATA() - * #startDTD(name, publicId, systemId) - * - * - * IGNORED method of org.xml.sax.ext.LexicalHandler: - * #endDTD() - * #startEntity(name) - * #endEntity(name) - * - * - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/DeclHandler.html - * IGNORED method of org.xml.sax.ext.DeclHandler - * #attributeDecl(eName, aName, type, mode, value) - * #elementDecl(name, model) - * #externalEntityDecl(name, publicId, systemId) - * #internalEntityDecl(name, value) - * @link http://www.saxproject.org/apidoc/org/xml/sax/ext/EntityResolver2.html - * IGNORED method of org.xml.sax.EntityResolver2 - * #resolveEntity(String name,String publicId,String baseURI,String systemId) - * #resolveEntity(publicId, systemId) - * #getExternalSubset(name, baseURI) - * @link http://www.saxproject.org/apidoc/org/xml/sax/DTDHandler.html - * IGNORED method of org.xml.sax.DTDHandler - * #notationDecl(name, publicId, systemId) {}; - * #unparsedEntityDecl(name, publicId, systemId, notationName) {}; - */ -"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){ - DOMHandler.prototype[key] = function(){return null} -}) - -/* Private static helpers treated below as private instance methods, so don't need to add these to the public API; we might use a Relator to also get rid of non-standard public properties */ -function appendElement (hander,node) { - if (!hander.currentElement) { - hander.doc.appendChild(node); - } else { - hander.currentElement.appendChild(node); - } -}//appendChild and setAttributeNS are preformance key - -//if(typeof require == 'function'){ - var XMLReader = require('./sax').XMLReader; - var DOMImplementation = exports.DOMImplementation = require('./dom').DOMImplementation; - exports.XMLSerializer = require('./dom').XMLSerializer ; - exports.DOMParser = DOMParser; -//} diff --git a/node_modules/cordova-android/node_modules/xmldom/dom.js b/node_modules/cordova-android/node_modules/xmldom/dom.js deleted file mode 100644 index b290df0..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/dom.js +++ /dev/null @@ -1,1244 +0,0 @@ -/* - * DOM Level 2 - * Object DOMException - * @see http://www.w3.org/TR/REC-DOM-Level-1/ecma-script-language-binding.html - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/ecma-script-binding.html - */ - -function copy(src,dest){ - for(var p in src){ - dest[p] = src[p]; - } -} -/** -^\w+\.prototype\.([_\w]+)\s*=\s*((?:.*\{\s*?[\r\n][\s\S]*?^})|\S.*?(?=[;\r\n]));? -^\w+\.prototype\.([_\w]+)\s*=\s*(\S.*?(?=[;\r\n]));? - */ -function _extends(Class,Super){ - var pt = Class.prototype; - if(Object.create){ - var ppt = Object.create(Super.prototype) - pt.__proto__ = ppt; - } - if(!(pt instanceof Super)){ - function t(){}; - t.prototype = Super.prototype; - t = new t(); - copy(pt,t); - Class.prototype = pt = t; - } - if(pt.constructor != Class){ - if(typeof Class != 'function'){ - console.error("unknow Class:"+Class) - } - pt.constructor = Class - } -} -var htmlns = 'http://www.w3.org/1999/xhtml' ; -// Node Types -var NodeType = {} -var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; -var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; -var TEXT_NODE = NodeType.TEXT_NODE = 3; -var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4; -var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5; -var ENTITY_NODE = NodeType.ENTITY_NODE = 6; -var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7; -var COMMENT_NODE = NodeType.COMMENT_NODE = 8; -var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; -var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; -var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; -var NOTATION_NODE = NodeType.NOTATION_NODE = 12; - -// ExceptionCode -var ExceptionCode = {} -var ExceptionMessage = {}; -var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); -var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); -var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3); -var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4); -var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5); -var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6); -var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7); -var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8); -var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9); -var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10); -//level2 -var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11); -var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12); -var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13); -var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14); -var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15); - - -function DOMException(code, message) { - if(message instanceof Error){ - var error = message; - }else{ - error = this; - Error.call(this, ExceptionMessage[code]); - this.message = ExceptionMessage[code]; - if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException); - } - error.code = code; - if(message) this.message = this.message + ": " + message; - return error; -}; -DOMException.prototype = Error.prototype; -copy(ExceptionCode,DOMException) -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177 - * The NodeList interface provides the abstraction of an ordered collection of nodes, without defining or constraining how this collection is implemented. NodeList objects in the DOM are live. - * The items in the NodeList are accessible via an integral index, starting from 0. - */ -function NodeList() { -}; -NodeList.prototype = { - /** - * The number of nodes in the list. The range of valid child node indices is 0 to length-1 inclusive. - * @standard level1 - */ - length:0, - /** - * Returns the indexth item in the collection. If index is greater than or equal to the number of nodes in the list, this returns null. - * @standard level1 - * @param index unsigned long - * Index into the collection. - * @return Node - * The node at the indexth position in the NodeList, or null if that is not a valid index. - */ - item: function(index) { - return this[index] || null; - }, - toString:function(isHTML,nodeFilter){ - for(var buf = [], i = 0;i=0){ - var lastIndex = list.length-1 - while(i0 || key == 'xmlns'){ -// return null; -// } - //console.log() - var i = this.length; - while(i--){ - var attr = this[i]; - //console.log(attr.nodeName,key) - if(attr.nodeName == key){ - return attr; - } - } - }, - setNamedItem: function(attr) { - var el = attr.ownerElement; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - var oldAttr = this.getNamedItem(attr.nodeName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - /* returns Node */ - setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR - var el = attr.ownerElement, oldAttr; - if(el && el!=this._ownerElement){ - throw new DOMException(INUSE_ATTRIBUTE_ERR); - } - oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName); - _addNamedNode(this._ownerElement,this,attr,oldAttr); - return oldAttr; - }, - - /* returns Node */ - removeNamedItem: function(key) { - var attr = this.getNamedItem(key); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - - - },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR - - //for level2 - removeNamedItemNS:function(namespaceURI,localName){ - var attr = this.getNamedItemNS(namespaceURI,localName); - _removeNamedNode(this._ownerElement,this,attr); - return attr; - }, - getNamedItemNS: function(namespaceURI, localName) { - var i = this.length; - while(i--){ - var node = this[i]; - if(node.localName == localName && node.namespaceURI == namespaceURI){ - return node; - } - } - return null; - } -}; -/** - * @see http://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-102161490 - */ -function DOMImplementation(/* Object */ features) { - this._features = {}; - if (features) { - for (var feature in features) { - this._features = features[feature]; - } - } -}; - -DOMImplementation.prototype = { - hasFeature: function(/* string */ feature, /* string */ version) { - var versions = this._features[feature.toLowerCase()]; - if (versions && (!version || version in versions)) { - return true; - } else { - return false; - } - }, - // Introduced in DOM Level 2: - createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR - var doc = new Document(); - doc.implementation = this; - doc.childNodes = new NodeList(); - doc.doctype = doctype; - if(doctype){ - doc.appendChild(doctype); - } - if(qualifiedName){ - var root = doc.createElementNS(namespaceURI,qualifiedName); - doc.appendChild(root); - } - return doc; - }, - // Introduced in DOM Level 2: - createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR - var node = new DocumentType(); - node.name = qualifiedName; - node.nodeName = qualifiedName; - node.publicId = publicId; - node.systemId = systemId; - // Introduced in DOM Level 2: - //readonly attribute DOMString internalSubset; - - //TODO:.. - // readonly attribute NamedNodeMap entities; - // readonly attribute NamedNodeMap notations; - return node; - } -}; - - -/** - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247 - */ - -function Node() { -}; - -Node.prototype = { - firstChild : null, - lastChild : null, - previousSibling : null, - nextSibling : null, - attributes : null, - parentNode : null, - childNodes : null, - ownerDocument : null, - nodeValue : null, - namespaceURI : null, - prefix : null, - localName : null, - // Modified in DOM Level 2: - insertBefore:function(newChild, refChild){//raises - return _insertBefore(this,newChild,refChild); - }, - replaceChild:function(newChild, oldChild){//raises - this.insertBefore(newChild,oldChild); - if(oldChild){ - this.removeChild(oldChild); - } - }, - removeChild:function(oldChild){ - return _removeChild(this,oldChild); - }, - appendChild:function(newChild){ - return this.insertBefore(newChild,null); - }, - hasChildNodes:function(){ - return this.firstChild != null; - }, - cloneNode:function(deep){ - return cloneNode(this.ownerDocument||this,this,deep); - }, - // Modified in DOM Level 2: - normalize:function(){ - var child = this.firstChild; - while(child){ - var next = child.nextSibling; - if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){ - this.removeChild(next); - child.appendData(next.data); - }else{ - child.normalize(); - child = next; - } - } - }, - // Introduced in DOM Level 2: - isSupported:function(feature, version){ - return this.ownerDocument.implementation.hasFeature(feature,version); - }, - // Introduced in DOM Level 2: - hasAttributes:function(){ - return this.attributes.length>0; - }, - lookupPrefix:function(namespaceURI){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - for(var n in map){ - if(map[n] == namespaceURI){ - return n; - } - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - lookupNamespaceURI:function(prefix){ - var el = this; - while(el){ - var map = el._nsMap; - //console.dir(map) - if(map){ - if(prefix in map){ - return map[prefix] ; - } - } - el = el.nodeType == ATTRIBUTE_NODE?el.ownerDocument : el.parentNode; - } - return null; - }, - // Introduced in DOM Level 3: - isDefaultNamespace:function(namespaceURI){ - var prefix = this.lookupPrefix(namespaceURI); - return prefix == null; - } -}; - - -function _xmlEncoder(c){ - return c == '<' && '<' || - c == '>' && '>' || - c == '&' && '&' || - c == '"' && '"' || - '&#'+c.charCodeAt()+';' -} - - -copy(NodeType,Node); -copy(NodeType,Node.prototype); - -/** - * @param callback return true for continue,false for break - * @return boolean true: break visit; - */ -function _visitNode(node,callback){ - if(callback(node)){ - return true; - } - if(node = node.firstChild){ - do{ - if(_visitNode(node,callback)){return true} - }while(node=node.nextSibling) - } -} - - - -function Document(){ -} -function _onAddAttribute(doc,el,newAttr){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value - } -} -function _onRemoveAttribute(doc,el,newAttr,remove){ - doc && doc._inc++; - var ns = newAttr.namespaceURI ; - if(ns == 'http://www.w3.org/2000/xmlns/'){ - //update namespace - delete el._nsMap[newAttr.prefix?newAttr.localName:''] - } -} -function _onUpdateChild(doc,el,newChild){ - if(doc && doc._inc){ - doc._inc++; - //update childNodes - var cs = el.childNodes; - if(newChild){ - cs[cs.length++] = newChild; - }else{ - //console.log(1) - var child = el.firstChild; - var i = 0; - while(child){ - cs[i++] = child; - child =child.nextSibling; - } - cs.length = i; - } - } -} - -/** - * attributes; - * children; - * - * writeable properties: - * nodeValue,Attr:value,CharacterData:data - * prefix - */ -function _removeChild(parentNode,child){ - var previous = child.previousSibling; - var next = child.nextSibling; - if(previous){ - previous.nextSibling = next; - }else{ - parentNode.firstChild = next - } - if(next){ - next.previousSibling = previous; - }else{ - parentNode.lastChild = previous; - } - _onUpdateChild(parentNode.ownerDocument,parentNode); - return child; -} -/** - * preformance key(refChild == null) - */ -function _insertBefore(parentNode,newChild,nextChild){ - var cp = newChild.parentNode; - if(cp){ - cp.removeChild(newChild);//remove and update - } - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - var newFirst = newChild.firstChild; - if (newFirst == null) { - return newChild; - } - var newLast = newChild.lastChild; - }else{ - newFirst = newLast = newChild; - } - var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild; - - newFirst.previousSibling = pre; - newLast.nextSibling = nextChild; - - - if(pre){ - pre.nextSibling = newFirst; - }else{ - parentNode.firstChild = newFirst; - } - if(nextChild == null){ - parentNode.lastChild = newLast; - }else{ - nextChild.previousSibling = newLast; - } - do{ - newFirst.parentNode = parentNode; - }while(newFirst !== newLast && (newFirst= newFirst.nextSibling)) - _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode); - //console.log(parentNode.lastChild.nextSibling == null) - if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) { - newChild.firstChild = newChild.lastChild = null; - } - return newChild; -} -function _appendSingleChild(parentNode,newChild){ - var cp = newChild.parentNode; - if(cp){ - var pre = parentNode.lastChild; - cp.removeChild(newChild);//remove and update - var pre = parentNode.lastChild; - } - var pre = parentNode.lastChild; - newChild.parentNode = parentNode; - newChild.previousSibling = pre; - newChild.nextSibling = null; - if(pre){ - pre.nextSibling = newChild; - }else{ - parentNode.firstChild = newChild; - } - parentNode.lastChild = newChild; - _onUpdateChild(parentNode.ownerDocument,parentNode,newChild); - return newChild; - //console.log("__aa",parentNode.lastChild.nextSibling == null) -} -Document.prototype = { - //implementation : null, - nodeName : '#document', - nodeType : DOCUMENT_NODE, - doctype : null, - documentElement : null, - _inc : 1, - - insertBefore : function(newChild, refChild){//raises - if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ - var child = newChild.firstChild; - while(child){ - var next = child.nextSibling; - this.insertBefore(child,refChild); - child = next; - } - return newChild; - } - if(this.documentElement == null && newChild.nodeType == ELEMENT_NODE){ - this.documentElement = newChild; - } - - return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; - }, - removeChild : function(oldChild){ - if(this.documentElement == oldChild){ - this.documentElement = null; - } - return _removeChild(this,oldChild); - }, - // Introduced in DOM Level 2: - importNode : function(importedNode,deep){ - return importNode(this,importedNode,deep); - }, - // Introduced in DOM Level 2: - getElementById : function(id){ - var rtv = null; - _visitNode(this.documentElement,function(node){ - if(node.nodeType == ELEMENT_NODE){ - if(node.getAttribute('id') == id){ - rtv = node; - return true; - } - } - }) - return rtv; - }, - - //document factory method: - createElement : function(tagName){ - var node = new Element(); - node.ownerDocument = this; - node.nodeName = tagName; - node.tagName = tagName; - node.childNodes = new NodeList(); - var attrs = node.attributes = new NamedNodeMap(); - attrs._ownerElement = node; - return node; - }, - createDocumentFragment : function(){ - var node = new DocumentFragment(); - node.ownerDocument = this; - node.childNodes = new NodeList(); - return node; - }, - createTextNode : function(data){ - var node = new Text(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createComment : function(data){ - var node = new Comment(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createCDATASection : function(data){ - var node = new CDATASection(); - node.ownerDocument = this; - node.appendData(data) - return node; - }, - createProcessingInstruction : function(target,data){ - var node = new ProcessingInstruction(); - node.ownerDocument = this; - node.tagName = node.target = target; - node.nodeValue= node.data = data; - return node; - }, - createAttribute : function(name){ - var node = new Attr(); - node.ownerDocument = this; - node.name = name; - node.nodeName = name; - node.localName = name; - node.specified = true; - return node; - }, - createEntityReference : function(name){ - var node = new EntityReference(); - node.ownerDocument = this; - node.nodeName = name; - return node; - }, - // Introduced in DOM Level 2: - createElementNS : function(namespaceURI,qualifiedName){ - var node = new Element(); - var pl = qualifiedName.split(':'); - var attrs = node.attributes = new NamedNodeMap(); - node.childNodes = new NodeList(); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.tagName = qualifiedName; - node.namespaceURI = namespaceURI; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - attrs._ownerElement = node; - return node; - }, - // Introduced in DOM Level 2: - createAttributeNS : function(namespaceURI,qualifiedName){ - var node = new Attr(); - var pl = qualifiedName.split(':'); - node.ownerDocument = this; - node.nodeName = qualifiedName; - node.name = qualifiedName; - node.namespaceURI = namespaceURI; - node.specified = true; - if(pl.length == 2){ - node.prefix = pl[0]; - node.localName = pl[1]; - }else{ - //el.prefix = null; - node.localName = qualifiedName; - } - return node; - } -}; -_extends(Document,Node); - - -function Element() { - this._nsMap = {}; -}; -Element.prototype = { - nodeType : ELEMENT_NODE, - hasAttribute : function(name){ - return this.getAttributeNode(name)!=null; - }, - getAttribute : function(name){ - var attr = this.getAttributeNode(name); - return attr && attr.value || ''; - }, - getAttributeNode : function(name){ - return this.attributes.getNamedItem(name); - }, - setAttribute : function(name, value){ - var attr = this.ownerDocument.createAttribute(name); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - removeAttribute : function(name){ - var attr = this.getAttributeNode(name) - attr && this.removeAttributeNode(attr); - }, - - //four real opeartion method - appendChild:function(newChild){ - if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){ - return this.insertBefore(newChild,null); - }else{ - return _appendSingleChild(this,newChild); - } - }, - setAttributeNode : function(newAttr){ - return this.attributes.setNamedItem(newAttr); - }, - setAttributeNodeNS : function(newAttr){ - return this.attributes.setNamedItemNS(newAttr); - }, - removeAttributeNode : function(oldAttr){ - //console.log(this == oldAttr.ownerElement) - return this.attributes.removeNamedItem(oldAttr.nodeName); - }, - //get real attribute name,and remove it by removeAttributeNode - removeAttributeNS : function(namespaceURI, localName){ - var old = this.getAttributeNodeNS(namespaceURI, localName); - old && this.removeAttributeNode(old); - }, - - hasAttributeNS : function(namespaceURI, localName){ - return this.getAttributeNodeNS(namespaceURI, localName)!=null; - }, - getAttributeNS : function(namespaceURI, localName){ - var attr = this.getAttributeNodeNS(namespaceURI, localName); - return attr && attr.value || ''; - }, - setAttributeNS : function(namespaceURI, qualifiedName, value){ - var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); - attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) - }, - getAttributeNodeNS : function(namespaceURI, localName){ - return this.attributes.getNamedItemNS(namespaceURI, localName); - }, - - getElementsByTagName : function(tagName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){ - ls.push(node); - } - }); - return ls; - }); - }, - getElementsByTagNameNS : function(namespaceURI, localName){ - return new LiveNodeList(this,function(base){ - var ls = []; - _visitNode(base,function(node){ - if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){ - ls.push(node); - } - }); - return ls; - - }); - } -}; -Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName; -Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS; - - -_extends(Element,Node); -function Attr() { -}; -Attr.prototype.nodeType = ATTRIBUTE_NODE; -_extends(Attr,Node); - - -function CharacterData() { -}; -CharacterData.prototype = { - data : '', - substringData : function(offset, count) { - return this.data.substring(offset, offset+count); - }, - appendData: function(text) { - text = this.data+text; - this.nodeValue = this.data = text; - this.length = text.length; - }, - insertData: function(offset,text) { - this.replaceData(offset,0,text); - - }, - appendChild:function(newChild){ - throw new Error(ExceptionMessage[HIERARCHY_REQUEST_ERR]) - }, - deleteData: function(offset, count) { - this.replaceData(offset,count,""); - }, - replaceData: function(offset, count, text) { - var start = this.data.substring(0,offset); - var end = this.data.substring(offset+count); - text = start + text + end; - this.nodeValue = this.data = text; - this.length = text.length; - } -} -_extends(CharacterData,Node); -function Text() { -}; -Text.prototype = { - nodeName : "#text", - nodeType : TEXT_NODE, - splitText : function(offset) { - var text = this.data; - var newText = text.substring(offset); - text = text.substring(0, offset); - this.data = this.nodeValue = text; - this.length = text.length; - var newNode = this.ownerDocument.createTextNode(newText); - if(this.parentNode){ - this.parentNode.insertBefore(newNode, this.nextSibling); - } - return newNode; - } -} -_extends(Text,CharacterData); -function Comment() { -}; -Comment.prototype = { - nodeName : "#comment", - nodeType : COMMENT_NODE -} -_extends(Comment,CharacterData); - -function CDATASection() { -}; -CDATASection.prototype = { - nodeName : "#cdata-section", - nodeType : CDATA_SECTION_NODE -} -_extends(CDATASection,CharacterData); - - -function DocumentType() { -}; -DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; -_extends(DocumentType,Node); - -function Notation() { -}; -Notation.prototype.nodeType = NOTATION_NODE; -_extends(Notation,Node); - -function Entity() { -}; -Entity.prototype.nodeType = ENTITY_NODE; -_extends(Entity,Node); - -function EntityReference() { -}; -EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; -_extends(EntityReference,Node); - -function DocumentFragment() { -}; -DocumentFragment.prototype.nodeName = "#document-fragment"; -DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; -_extends(DocumentFragment,Node); - - -function ProcessingInstruction() { -} -ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE; -_extends(ProcessingInstruction,Node); -function XMLSerializer(){} -XMLSerializer.prototype.serializeToString = function(node,isHtml,nodeFilter){ - return nodeSerializeToString.call(node,isHtml,nodeFilter); -} -Node.prototype.toString = nodeSerializeToString; -function nodeSerializeToString(isHtml,nodeFilter){ - var buf = []; - var refNode = this.nodeType == 9?this.documentElement:this; - var prefix = refNode.prefix; - var uri = refNode.namespaceURI; - - if(uri && prefix == null){ - //console.log(prefix) - var prefix = refNode.lookupPrefix(uri); - if(prefix == null){ - //isHTML = true; - var visibleNamespaces=[ - {namespace:uri,prefix:null} - //{namespace:uri,prefix:''} - ] - } - } - serializeToString(this,buf,isHtml,nodeFilter,visibleNamespaces); - //console.log('###',this.nodeType,uri,prefix,buf.join('')) - return buf.join(''); -} -function needNamespaceDefine(node,isHTML, visibleNamespaces) { - var prefix = node.prefix||''; - var uri = node.namespaceURI; - if (!prefix && !uri){ - return false; - } - if (prefix === "xml" && uri === "http://www.w3.org/XML/1998/namespace" - || uri == 'http://www.w3.org/2000/xmlns/'){ - return false; - } - - var i = visibleNamespaces.length - //console.log('@@@@',node.tagName,prefix,uri,visibleNamespaces) - while (i--) { - var ns = visibleNamespaces[i]; - // get namespace prefix - //console.log(node.nodeType,node.tagName,ns.prefix,prefix) - if (ns.prefix == prefix){ - return ns.namespace != uri; - } - } - //console.log(isHTML,uri,prefix=='') - //if(isHTML && prefix ==null && uri == 'http://www.w3.org/1999/xhtml'){ - // return false; - //} - //node.flag = '11111' - //console.error(3,true,node.flag,node.prefix,node.namespaceURI) - return true; -} -function serializeToString(node,buf,isHTML,nodeFilter,visibleNamespaces){ - if(nodeFilter){ - node = nodeFilter(node); - if(node){ - if(typeof node == 'string'){ - buf.push(node); - return; - } - }else{ - return; - } - //buf.sort.apply(attrs, attributeSorter); - } - switch(node.nodeType){ - case ELEMENT_NODE: - if (!visibleNamespaces) visibleNamespaces = []; - var startVisibleNamespaces = visibleNamespaces.length; - var attrs = node.attributes; - var len = attrs.length; - var child = node.firstChild; - var nodeName = node.tagName; - - isHTML = (htmlns === node.namespaceURI) ||isHTML - buf.push('<',nodeName); - - - - for(var i=0;i'); - //if is cdata child node - if(isHTML && /^script$/i.test(nodeName)){ - while(child){ - if(child.data){ - buf.push(child.data); - }else{ - serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); - } - child = child.nextSibling; - } - }else - { - while(child){ - serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); - child = child.nextSibling; - } - } - buf.push(''); - }else{ - buf.push('/>'); - } - // remove added visible namespaces - //visibleNamespaces.length = startVisibleNamespaces; - return; - case DOCUMENT_NODE: - case DOCUMENT_FRAGMENT_NODE: - var child = node.firstChild; - while(child){ - serializeToString(child,buf,isHTML,nodeFilter,visibleNamespaces); - child = child.nextSibling; - } - return; - case ATTRIBUTE_NODE: - return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"'); - case TEXT_NODE: - return buf.push(node.data.replace(/[<&]/g,_xmlEncoder)); - case CDATA_SECTION_NODE: - return buf.push( ''); - case COMMENT_NODE: - return buf.push( ""); - case DOCUMENT_TYPE_NODE: - var pubid = node.publicId; - var sysid = node.systemId; - buf.push(''); - }else if(sysid && sysid!='.'){ - buf.push(' SYSTEM "',sysid,'">'); - }else{ - var sub = node.internalSubset; - if(sub){ - buf.push(" [",sub,"]"); - } - buf.push(">"); - } - return; - case PROCESSING_INSTRUCTION_NODE: - return buf.push( ""); - case ENTITY_REFERENCE_NODE: - return buf.push( '&',node.nodeName,';'); - //case ENTITY_NODE: - //case NOTATION_NODE: - default: - buf.push('??',node.nodeName); - } -} -function importNode(doc,node,deep){ - var node2; - switch (node.nodeType) { - case ELEMENT_NODE: - node2 = node.cloneNode(false); - node2.ownerDocument = doc; - //var attrs = node2.attributes; - //var len = attrs.length; - //for(var i=0;i=0.1" - }, - "homepage": "https://github.com/jindw/xmldom", - "keywords": [ - "w3c", - "dom", - "xml", - "parser", - "javascript", - "DOMParser", - "XMLSerializer" - ], - "licenses": [ - { - "type": "LGPL", - "url": "http://www.gnu.org/licenses/lgpl.html", - "MIT": "http://opensource.org/licenses/MIT" - } - ], - "main": "./dom-parser.js", - "maintainers": [ - { - "name": "jindw", - "email": "jindw@xidea.org", - "url": "http://www.xidea.org" - } - ], - "name": "xmldom", - "repository": { - "type": "git", - "url": "git://github.com/jindw/xmldom.git" - }, - "scripts": { - "test": "proof platform win32 && proof test */*/*.t.js || t/test" - }, - "version": "0.1.27" -} diff --git a/node_modules/cordova-android/node_modules/xmldom/readme.md b/node_modules/cordova-android/node_modules/xmldom/readme.md deleted file mode 100644 index f832c44..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/readme.md +++ /dev/null @@ -1,219 +0,0 @@ -# XMLDOM [![Build Status](https://secure.travis-ci.org/bigeasy/xmldom.png?branch=master)](http://travis-ci.org/bigeasy/xmldom) [![Coverage Status](https://coveralls.io/repos/bigeasy/xmldom/badge.png?branch=master)](https://coveralls.io/r/bigeasy/xmldom) [![NPM version](https://badge.fury.io/js/xmldom.png)](http://badge.fury.io/js/xmldom) - -A JavaScript implementation of W3C DOM for Node.js, Rhino and the browser. Fully -compatible with `W3C DOM level2`; and some compatible with `level3`. Supports -`DOMParser` and `XMLSerializer` interface such as in browser. - -Install: -------- ->npm install xmldom - -Example: -==== -```javascript -var DOMParser = require('xmldom').DOMParser; -var doc = new DOMParser().parseFromString( - '\n'+ - '\ttest\n'+ - '\t\n'+ - '\t\n'+ - '' - ,'text/xml'); -doc.documentElement.setAttribute('x','y'); -doc.documentElement.setAttributeNS('./lite','c:x','y2'); -var nsAttr = doc.documentElement.getAttributeNS('./lite','x') -console.info(nsAttr) -console.info(doc) -``` -API Reference -===== - - * [DOMParser](https://developer.mozilla.org/en/DOMParser): - - ```javascript - parseFromString(xmlsource,mimeType) - ``` - * **options extension** _by xmldom_(not BOM standard!!) - - ```javascript - //added the options argument - new DOMParser(options) - - //errorHandler is supported - new DOMParser({ - /** - * locator is always need for error position info - */ - locator:{}, - /** - * you can override the errorHandler for xml parser - * @link http://www.saxproject.org/apidoc/org/xml/sax/ErrorHandler.html - */ - errorHandler:{warning:function(w){console.warn(w)},error:callback,fatalError:callback} - //only callback model - //errorHandler:function(level,msg){console.log(level,msg)} - }) - - ``` - - * [XMLSerializer](https://developer.mozilla.org/en/XMLSerializer) - - ```javascript - serializeToString(node) - ``` -DOM level2 method and attribute: ------- - - * [Node](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1950641247) - - attribute: - nodeValue|prefix - readonly attribute: - nodeName|nodeType|parentNode|childNodes|firstChild|lastChild|previousSibling|nextSibling|attributes|ownerDocument|namespaceURI|localName - method: - insertBefore(newChild, refChild) - replaceChild(newChild, oldChild) - removeChild(oldChild) - appendChild(newChild) - hasChildNodes() - cloneNode(deep) - normalize() - isSupported(feature, version) - hasAttributes() - - * [DOMImplementation](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-102161490) - - method: - hasFeature(feature, version) - createDocumentType(qualifiedName, publicId, systemId) - createDocument(namespaceURI, qualifiedName, doctype) - - * [Document](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#i-Document) : Node - - readonly attribute: - doctype|implementation|documentElement - method: - createElement(tagName) - createDocumentFragment() - createTextNode(data) - createComment(data) - createCDATASection(data) - createProcessingInstruction(target, data) - createAttribute(name) - createEntityReference(name) - getElementsByTagName(tagname) - importNode(importedNode, deep) - createElementNS(namespaceURI, qualifiedName) - createAttributeNS(namespaceURI, qualifiedName) - getElementsByTagNameNS(namespaceURI, localName) - getElementById(elementId) - - * [DocumentFragment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-B63ED1A3) : Node - * [Element](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-745549614) : Node - - readonly attribute: - tagName - method: - getAttribute(name) - setAttribute(name, value) - removeAttribute(name) - getAttributeNode(name) - setAttributeNode(newAttr) - removeAttributeNode(oldAttr) - getElementsByTagName(name) - getAttributeNS(namespaceURI, localName) - setAttributeNS(namespaceURI, qualifiedName, value) - removeAttributeNS(namespaceURI, localName) - getAttributeNodeNS(namespaceURI, localName) - setAttributeNodeNS(newAttr) - getElementsByTagNameNS(namespaceURI, localName) - hasAttribute(name) - hasAttributeNS(namespaceURI, localName) - - * [Attr](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-637646024) : Node - - attribute: - value - readonly attribute: - name|specified|ownerElement - - * [NodeList](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-536297177) - - readonly attribute: - length - method: - item(index) - - * [NamedNodeMap](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1780488922) - - readonly attribute: - length - method: - getNamedItem(name) - setNamedItem(arg) - removeNamedItem(name) - item(index) - getNamedItemNS(namespaceURI, localName) - setNamedItemNS(arg) - removeNamedItemNS(namespaceURI, localName) - - * [CharacterData](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-FF21A306) : Node - - method: - substringData(offset, count) - appendData(arg) - insertData(offset, arg) - deleteData(offset, count) - replaceData(offset, count, arg) - - * [Text](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1312295772) : CharacterData - - method: - splitText(offset) - - * [CDATASection](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-667469212) - * [Comment](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-1728279322) : CharacterData - - * [DocumentType](http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/core.html#ID-412266927) - - readonly attribute: - name|entities|notations|publicId|systemId|internalSubset - - * Notation : Node - - readonly attribute: - publicId|systemId - - * Entity : Node - - readonly attribute: - publicId|systemId|notationName - - * EntityReference : Node - * ProcessingInstruction : Node - - attribute: - data - readonly attribute: - target - -DOM level 3 support: ------ - - * [Node](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent) - - attribute: - textContent - method: - isDefaultNamespace(namespaceURI){ - lookupNamespaceURI(prefix) - -DOM extension by xmldom ---- - * [Node] Source position extension; - - attribute: - //Numbered starting from '1' - lineNumber - //Numbered starting from '1' - columnNumber diff --git a/node_modules/cordova-android/node_modules/xmldom/sax.js b/node_modules/cordova-android/node_modules/xmldom/sax.js deleted file mode 100644 index b33635f..0000000 --- a/node_modules/cordova-android/node_modules/xmldom/sax.js +++ /dev/null @@ -1,633 +0,0 @@ -//[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] -//[4a] NameChar ::= NameStartChar | "-" | "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] -//[5] Name ::= NameStartChar (NameChar)* -var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF -var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"); -var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); -//var tagNamePattern = /^[a-zA-Z_][\w\-\.]*(?:\:[a-zA-Z_][\w\-\.]*)?$/ -//var handlers = 'resolveEntity,getExternalSubset,characters,endDocument,endElement,endPrefixMapping,ignorableWhitespace,processingInstruction,setDocumentLocator,skippedEntity,startDocument,startElement,startPrefixMapping,notationDecl,unparsedEntityDecl,error,fatalError,warning,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,comment,endCDATA,endDTD,endEntity,startCDATA,startDTD,startEntity'.split(',') - -//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE -//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE -var S_TAG = 0;//tag name offerring -var S_ATTR = 1;//attr name offerring -var S_ATTR_SPACE=2;//attr name end and space offer -var S_EQ = 3;//=space? -var S_ATTR_NOQUOT_VALUE = 4;//attr value(no quot value only) -var S_ATTR_END = 5;//attr value end and no space(quot end) -var S_TAG_SPACE = 6;//(attr value end || tag end ) && (space offer) -var S_TAG_CLOSE = 7;//closed el - -function XMLReader(){ - -} - -XMLReader.prototype = { - parse:function(source,defaultNSMap,entityMap){ - var domBuilder = this.domBuilder; - domBuilder.startDocument(); - _copy(defaultNSMap ,defaultNSMap = {}) - parse(source,defaultNSMap,entityMap, - domBuilder,this.errorHandler); - domBuilder.endDocument(); - } -} -function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){ - function fixedFromCharCode(code) { - // String.prototype.fromCharCode does not supports - // > 2 bytes unicode chars directly - if (code > 0xffff) { - code -= 0x10000; - var surrogate1 = 0xd800 + (code >> 10) - , surrogate2 = 0xdc00 + (code & 0x3ff); - - return String.fromCharCode(surrogate1, surrogate2); - } else { - return String.fromCharCode(code); - } - } - function entityReplacer(a){ - var k = a.slice(1,-1); - if(k in entityMap){ - return entityMap[k]; - }else if(k.charAt(0) === '#'){ - return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x'))) - }else{ - errorHandler.error('entity not found:'+a); - return a; - } - } - function appendText(end){//has some bugs - if(end>start){ - var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer); - locator&&position(start); - domBuilder.characters(xt,0,end-start); - start = end - } - } - function position(p,m){ - while(p>=lineEnd && (m = linePattern.exec(source))){ - lineStart = m.index; - lineEnd = lineStart + m[0].length; - locator.lineNumber++; - //console.log('line++:',locator,startPos,endPos) - } - locator.columnNumber = p-lineStart+1; - } - var lineStart = 0; - var lineEnd = 0; - var linePattern = /.*(?:\r\n?|\n)|.*$/g - var locator = domBuilder.locator; - - var parseStack = [{currentNSMap:defaultNSMapCopy}] - var closeMap = {}; - var start = 0; - while(true){ - try{ - var tagStart = source.indexOf('<',start); - if(tagStart<0){ - if(!source.substr(start).match(/^\s*$/)){ - var doc = domBuilder.doc; - var text = doc.createTextNode(source.substr(start)); - doc.appendChild(text); - domBuilder.currentElement = text; - } - return; - } - if(tagStart>start){ - appendText(tagStart); - } - switch(source.charAt(tagStart+1)){ - case '/': - var end = source.indexOf('>',tagStart+3); - var tagName = source.substring(tagStart+2,end); - var config = parseStack.pop(); - if(end<0){ - - tagName = source.substring(tagStart+2).replace(/[\s<].*/,''); - //console.error('#@@@@@@'+tagName) - errorHandler.error("end tag name: "+tagName+' is not complete:'+config.tagName); - end = tagStart+1+tagName.length; - }else if(tagName.match(/\s - locator&&position(tagStart); - end = parseInstruction(source,tagStart,domBuilder); - break; - case '!':// start){ - start = end; - }else{ - //TODO: 这里有可能sax回退,有位置错误风险 - appendText(Math.max(tagStart,start)+1); - } - } -} -function copyLocator(f,t){ - t.lineNumber = f.lineNumber; - t.columnNumber = f.columnNumber; - return t; -} - -/** - * @see #appendElement(source,elStartEnd,el,selfClosed,entityReplacer,domBuilder,parseStack); - * @return end of the elementStartPart(end of elementEndPart for selfClosed el) - */ -function parseElementStartPart(source,start,el,currentNSMap,entityReplacer,errorHandler){ - var attrName; - var value; - var p = ++start; - var s = S_TAG;//status - while(true){ - var c = source.charAt(p); - switch(c){ - case '=': - if(s === S_ATTR){//attrName - attrName = source.slice(start,p); - s = S_EQ; - }else if(s === S_ATTR_SPACE){ - s = S_EQ; - }else{ - //fatalError: equal must after attrName or space after attrName - throw new Error('attribute equal must after attrName'); - } - break; - case '\'': - case '"': - if(s === S_EQ || s === S_ATTR //|| s == S_ATTR_SPACE - ){//equal - if(s === S_ATTR){ - errorHandler.warning('attribute value must after "="') - attrName = source.slice(start,p) - } - start = p+1; - p = source.indexOf(c,start) - if(p>0){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - el.add(attrName,value,start-1); - s = S_ATTR_END; - }else{ - //fatalError: no end quot match - throw new Error('attribute value no end \''+c+'\' match'); - } - }else if(s == S_ATTR_NOQUOT_VALUE){ - value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - //console.log(attrName,value,start,p) - el.add(attrName,value,start); - //console.dir(el) - errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!'); - start = p+1; - s = S_ATTR_END - }else{ - //fatalError: no equal before - throw new Error('attribute value must after "="'); - } - break; - case '/': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - s =S_TAG_CLOSE; - el.closed = true; - case S_ATTR_NOQUOT_VALUE: - case S_ATTR: - case S_ATTR_SPACE: - break; - //case S_EQ: - default: - throw new Error("attribute invalid close char('/')") - } - break; - case ''://end document - //throw new Error('unexpected end of input') - errorHandler.error('unexpected end of input'); - if(s == S_TAG){ - el.setTagName(source.slice(start,p)); - } - return p; - case '>': - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p)); - case S_ATTR_END: - case S_TAG_SPACE: - case S_TAG_CLOSE: - break;//normal - case S_ATTR_NOQUOT_VALUE://Compatible state - case S_ATTR: - value = source.slice(start,p); - if(value.slice(-1) === '/'){ - el.closed = true; - value = value.slice(0,-1) - } - case S_ATTR_SPACE: - if(s === S_ATTR_SPACE){ - value = attrName; - } - if(s == S_ATTR_NOQUOT_VALUE){ - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start) - }else{ - if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !value.match(/^(?:disabled|checked|selected)$/i)){ - errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!') - } - el.add(value,value,start) - } - break; - case S_EQ: - throw new Error('attribute value missed!!'); - } -// console.log(tagName,tagNamePattern,tagNamePattern.test(tagName)) - return p; - /*xml space '\x20' | #x9 | #xD | #xA; */ - case '\u0080': - c = ' '; - default: - if(c<= ' '){//space - switch(s){ - case S_TAG: - el.setTagName(source.slice(start,p));//tagName - s = S_TAG_SPACE; - break; - case S_ATTR: - attrName = source.slice(start,p) - s = S_ATTR_SPACE; - break; - case S_ATTR_NOQUOT_VALUE: - var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer); - errorHandler.warning('attribute "'+value+'" missed quot(")!!'); - el.add(attrName,value,start) - case S_ATTR_END: - s = S_TAG_SPACE; - break; - //case S_TAG_SPACE: - //case S_EQ: - //case S_ATTR_SPACE: - // void();break; - //case S_TAG_CLOSE: - //ignore warning - } - }else{//not space -//S_TAG, S_ATTR, S_EQ, S_ATTR_NOQUOT_VALUE -//S_ATTR_SPACE, S_ATTR_END, S_TAG_SPACE, S_TAG_CLOSE - switch(s){ - //case S_TAG:void();break; - //case S_ATTR:void();break; - //case S_ATTR_NOQUOT_VALUE:void();break; - case S_ATTR_SPACE: - var tagName = el.tagName; - if(currentNSMap[''] !== 'http://www.w3.org/1999/xhtml' || !attrName.match(/^(?:disabled|checked|selected)$/i)){ - errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead2!!') - } - el.add(attrName,attrName,start); - start = p; - s = S_ATTR; - break; - case S_ATTR_END: - errorHandler.warning('attribute space is required"'+attrName+'"!!') - case S_TAG_SPACE: - s = S_ATTR; - start = p; - break; - case S_EQ: - s = S_ATTR_NOQUOT_VALUE; - start = p; - break; - case S_TAG_CLOSE: - throw new Error("elements closed character '/' and '>' must be connected to"); - } - } - }//end outer switch - //console.log('p++',p) - p++; - } -} -/** - * @return true if has new namespace define - */ -function appendElement(el,domBuilder,currentNSMap){ - var tagName = el.tagName; - var localNSMap = null; - //var currentNSMap = parseStack[parseStack.length-1].currentNSMap; - var i = el.length; - while(i--){ - var a = el[i]; - var qName = a.qName; - var value = a.value; - var nsp = qName.indexOf(':'); - if(nsp>0){ - var prefix = a.prefix = qName.slice(0,nsp); - var localName = qName.slice(nsp+1); - var nsPrefix = prefix === 'xmlns' && localName - }else{ - localName = qName; - prefix = null - nsPrefix = qName === 'xmlns' && '' - } - //can not set prefix,because prefix !== '' - a.localName = localName ; - //prefix == null for no ns prefix attribute - if(nsPrefix !== false){//hack!! - if(localNSMap == null){ - localNSMap = {} - //console.log(currentNSMap,0) - _copy(currentNSMap,currentNSMap={}) - //console.log(currentNSMap,1) - } - currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value; - a.uri = 'http://www.w3.org/2000/xmlns/' - domBuilder.startPrefixMapping(nsPrefix, value) - } - } - var i = el.length; - while(i--){ - a = el[i]; - var prefix = a.prefix; - if(prefix){//no prefix attribute has no namespace - if(prefix === 'xml'){ - a.uri = 'http://www.w3.org/XML/1998/namespace'; - }if(prefix !== 'xmlns'){ - a.uri = currentNSMap[prefix || ''] - - //{console.log('###'+a.qName,domBuilder.locator.systemId+'',currentNSMap,a.uri)} - } - } - } - var nsp = tagName.indexOf(':'); - if(nsp>0){ - prefix = el.prefix = tagName.slice(0,nsp); - localName = el.localName = tagName.slice(nsp+1); - }else{ - prefix = null;//important!! - localName = el.localName = tagName; - } - //no prefix element has default namespace - var ns = el.uri = currentNSMap[prefix || '']; - domBuilder.startElement(ns,localName,tagName,el); - //endPrefixMapping and startPrefixMapping have not any help for dom builder - //localNSMap = null - if(el.closed){ - domBuilder.endElement(ns,localName,tagName); - if(localNSMap){ - for(prefix in localNSMap){ - domBuilder.endPrefixMapping(prefix) - } - } - }else{ - el.currentNSMap = currentNSMap; - el.localNSMap = localNSMap; - //parseStack.push(el); - return true; - } -} -function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){ - if(/^(?:script|textarea)$/i.test(tagName)){ - var elEndStart = source.indexOf('',elStartEnd); - var text = source.substring(elStartEnd+1,elEndStart); - if(/[&<]/.test(text)){ - if(/^script$/i.test(tagName)){ - //if(!/\]\]>/.test(text)){ - //lexHandler.startCDATA(); - domBuilder.characters(text,0,text.length); - //lexHandler.endCDATA(); - return elEndStart; - //} - }//}else{//text area - text = text.replace(/&#?\w+;/g,entityReplacer); - domBuilder.characters(text,0,text.length); - return elEndStart; - //} - - } - } - return elStartEnd+1; -} -function fixSelfClosed(source,elStartEnd,tagName,closeMap){ - //if(tagName in closeMap){ - var pos = closeMap[tagName]; - if(pos == null){ - //console.log(tagName) - pos = source.lastIndexOf('') - if(pos',start+4); - //append comment source.substring(4,end)//