mirror of
https://github.com/corda/corda.git
synced 2024-12-24 07:06:44 +00:00
Remove Bower dependencies from repo and download them on demand (#1959)
Bower dependencies installed by Gradle as a part of deployment
This commit is contained in:
parent
a74154a126
commit
02a5ddb7df
1
.idea/compiler.xml
generated
1
.idea/compiler.xml
generated
@ -42,7 +42,6 @@
|
||||
<module name="explorer-capsule_test" target="1.6" />
|
||||
<module name="explorer_main" target="1.8" />
|
||||
<module name="explorer_test" target="1.8" />
|
||||
<module name="finance_integrationTest" target="1.8" />
|
||||
<module name="finance_main" target="1.8" />
|
||||
<module name="finance_test" target="1.8" />
|
||||
<module name="graphs_main" target="1.8" />
|
||||
|
1
samples/irs-demo/web/.gitignore
vendored
Normal file
1
samples/irs-demo/web/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
src/main/resources/static/js/bower_components
|
@ -8,6 +8,29 @@ buildscript {
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.craigburke.client-dependencies' version '1.4.0'
|
||||
}
|
||||
|
||||
clientDependencies {
|
||||
registry 'realBower', type:'bower', url:'https://registry.bower.io'
|
||||
realBower {
|
||||
"angular"("1.5.8")
|
||||
"jquery"("^3.0.0")
|
||||
"angular-route"("1.5.8")
|
||||
"lodash"("^4.13.1")
|
||||
"angular-fcsa-number"("^1.5.3")
|
||||
"jquery.maskedinput"("^1.4.1")
|
||||
"requirejs"("^2.2.0")
|
||||
"semantic-ui"("^2.2.2", into: "semantic")
|
||||
}
|
||||
|
||||
// put the JS dependencies into src directory so it can easily be referenced
|
||||
// from HTML files in webapp frontend, useful for testing/development
|
||||
// Note that this dir is added to .gitignore
|
||||
installDir = 'src/main/resources/static/js/bower_components'
|
||||
}
|
||||
|
||||
// Spring Boot plugin adds a numerous hardcoded dependencies in the version much lower then Corda expects
|
||||
// causing the problems in runtime. Those can be changed by manipulating above properties
|
||||
// See https://github.com/spring-gradle-plugins/dependency-management-plugin/blob/master/README.md#changing-the-value-of-a-version-property
|
||||
@ -39,6 +62,7 @@ dependencies {
|
||||
|
||||
jar {
|
||||
from sourceSets.test.output
|
||||
dependsOn clientInstall
|
||||
}
|
||||
|
||||
task deployWebapps(type: Copy, dependsOn: ['jar', 'bootRepackage']) {
|
||||
|
@ -13,9 +13,9 @@
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "^1.5.6",
|
||||
"angular": "1.5.8",
|
||||
"jquery": "^3.0.0",
|
||||
"angular-route": "^1.5.7",
|
||||
"angular-route": "1.5.8",
|
||||
"lodash": "^4.13.1",
|
||||
"angular-fcsa-number": "^1.5.3",
|
||||
"jquery.maskedinput": "^1.4.1",
|
||||
|
@ -9,7 +9,7 @@
|
||||
<!-- Site Properties -->
|
||||
<title>IRS Demo Viewer</title>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="http://r3cev.com/favicon.ico" />
|
||||
<link rel="stylesheet" type="text/css" href="js/bower_components/semantic/dist/semantic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="js/bower_components/semantic/semantic.css" />
|
||||
<link rel="stylesheet" type="text/css" href="css/main.css" />
|
||||
|
||||
<script data-main="js/require-config" src="js/bower_components/requirejs/require.js"></script>
|
||||
|
@ -1,43 +0,0 @@
|
||||
{
|
||||
"name": "angular-fcsa-number",
|
||||
"version": "1.5.3",
|
||||
"authors": [
|
||||
"Paul Yoder <paulyoder@gmail.com>"
|
||||
],
|
||||
"description": "An Angular directive that validates numbers and adds commas for the thousands separator.",
|
||||
"main": "src/fcsaNumber.js",
|
||||
"keywords": [
|
||||
"angular",
|
||||
"directive",
|
||||
"format",
|
||||
"number",
|
||||
"validate"
|
||||
],
|
||||
"license": "Apache V2",
|
||||
"homepage": "https://github.com/FCSAmericaDev/angular-fcsa-number",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"**/*.coffee",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"Gruntfile.coffee",
|
||||
"karma.conf.js",
|
||||
"package.json"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "~1.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "~1.x"
|
||||
},
|
||||
"_release": "1.5.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.3",
|
||||
"commit": "3472da66d408c9fed412f954397ea9a860e56dc6"
|
||||
},
|
||||
"_source": "https://github.com/FCSAmericaDev/angular-fcsa-number.git",
|
||||
"_target": "^1.5.3",
|
||||
"_originalSource": "angular-fcsa-number"
|
||||
}
|
@ -1,56 +0,0 @@
|
||||
# Changelog
|
||||
|
||||
### 1.5.3
|
||||
|
||||
* Bug Fixes
|
||||
* Fixed a bug where `-1.2` was being formatted as `-1-1.2`
|
||||
|
||||
### 1.5.2
|
||||
|
||||
* Bug Fixes
|
||||
* `preventInvalidInput` is correctly working again
|
||||
|
||||
### 1.5.1
|
||||
|
||||
* Bug Fixes
|
||||
* Fixed issue where overriding a global option on a specific input element would override that
|
||||
option for all input elements
|
||||
|
||||
### 1.5.0
|
||||
|
||||
* Enhancements
|
||||
* Can set default options with `fcsaNumberConfigProvider.setDefaultOptions()`
|
||||
|
||||
### 1.4.1
|
||||
|
||||
* Bug Fixes
|
||||
* `prepend` and `append` values are removed on focus
|
||||
|
||||
### 1.4
|
||||
|
||||
* Enhancements
|
||||
* Added `prepend` option
|
||||
* Added `append` option
|
||||
|
||||
### 1.3
|
||||
|
||||
* Enhancements
|
||||
* Not adding commas to the decimal portion of the number
|
||||
* Allowing commas to be entered by the user. Thanks @jbulat
|
||||
* A hyphen only value is marked invalid
|
||||
|
||||
### 1.2.1
|
||||
|
||||
* Refactorings
|
||||
* using `angular.element` instead of `$` and therefore no longer requiring jQuery to be used
|
||||
|
||||
### 1.2
|
||||
|
||||
* Enhancements
|
||||
* added 'preventInvalidInput' option
|
||||
|
||||
### 1.1
|
||||
|
||||
* Enhancements
|
||||
* renamed `decimals` option to `maxDecimals`
|
||||
* renamed `digits` option to `maxDigits`
|
@ -1,201 +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.
|
@ -1,129 +0,0 @@
|
||||
# FCSA Number
|
||||
|
||||
An Angular directive that validates numbers and adds commas for the thousands separator.
|
||||
|
||||
So when the user enters `1000` into a textbox and tabs out, the value will be formatted to include the thousands separator and display: `1,000`
|
||||
|
||||
If an invalid number is entered, the textbox will be invalid with the `fcsaNumber` error.
|
||||
|
||||
## Installation
|
||||
|
||||
#### With Bower
|
||||
|
||||
bower install angular-fcsa-number
|
||||
|
||||
Then reference `angular-fcsa-number/src/fcsaNumber.js` in your project.
|
||||
|
||||
#### Manually
|
||||
|
||||
Copy `src/fcsaNumber.js` into your project and reference it.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Add the `fcsa-number` module as a dependency to you Angular app.
|
||||
|
||||
angular.module('yourApp', ['fcsa-number']);
|
||||
|
||||
Add the `fcsa-number` attribute to textboxes you want to have validated and formatted with thousands separators.
|
||||
|
||||
<input type='text' ng-model='company.employeeCount' fcsa-number />
|
||||
|
||||
When an invalid number is entered by the user, the form and control will become invalid and the 'fcsa-number-invalid' class will be added to the text box.
|
||||
|
||||
## Options
|
||||
|
||||
Without any options passed to it, fcsa-number will validate that the input is a valid number and will also add commas for the thousand separators.
|
||||
|
||||
|
||||
#### max
|
||||
|
||||
Validates the number is not above the max number.
|
||||
|
||||
fcsa-number="{ max: 100 }"
|
||||
|
||||
* Valid: 100
|
||||
* Invalid: 101
|
||||
|
||||
#### min
|
||||
|
||||
Validates the number is not below the min number.
|
||||
|
||||
fcsa-number="{ min: -5 }"
|
||||
|
||||
* Valid: -5
|
||||
* Invalid: -6
|
||||
|
||||
#### maxDecimals
|
||||
|
||||
Validates the number does not have more than the specified number of decimals.
|
||||
|
||||
fcsa-number="{ maxDecimals: 2 }"
|
||||
|
||||
* Valid: 1.23
|
||||
* Invalid: 1.234
|
||||
|
||||
#### maxDigits
|
||||
|
||||
Validates the number does not have more than the specified number of digits.
|
||||
|
||||
fcsa-number="{ maxDigits: 2 }"
|
||||
|
||||
* Valid: 76
|
||||
* Invalid: 123
|
||||
|
||||
#### preventInvalidInput
|
||||
|
||||
By default users are allowed to enter invalid characters, and then the textbox is marked invalid.
|
||||
If you want to prevent users from entering invalid characters altogether, then use the `preventInvalidInput` option.
|
||||
If the user presses the 'a' key, the directive will catch it and prevent 'a' from being shown in the textbox.
|
||||
|
||||
fcsa-number="{ preventInvalidInput: true }"
|
||||
|
||||
#### prepend
|
||||
|
||||
Prepends the specified text before the number.
|
||||
|
||||
fcsa-number="{ prepend: '$' }"
|
||||
|
||||
#### append
|
||||
|
||||
Appends the specified text after the number.
|
||||
|
||||
fcsa-number="{ append: '%' }"
|
||||
|
||||
## Default Options
|
||||
|
||||
It's possible to set the options globally too. You do this by calling `fcsaNumberConfigProvider.setDefaultOptions()`
|
||||
inside a config function in your app.
|
||||
|
||||
Here's a code example that sets the default options:
|
||||
|
||||
```javascript
|
||||
var app = angular.module('yourApp', ['fcsa-number']);
|
||||
app.config(['fcsaNumberConfigProvider', function(fcsaNumberConfigProvider) {
|
||||
fcsaNumberConfigProvider.setDefaultOptions({
|
||||
max: 100,
|
||||
min: 0
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
The default options can be overridden locally by passing in an options object: `fcsa-number="{ max: 10 }"`
|
||||
|
||||
## Developing
|
||||
|
||||
Grunt is used to compile the CoffeeScript files and run the tests. To get started run the following commands on the command line:
|
||||
|
||||
// installs the required node modules
|
||||
npm install
|
||||
|
||||
// installs the required bower components
|
||||
bower install
|
||||
|
||||
Run the following command to automatically compile and run the unit and end to end tests whenever you make a change to a file.
|
||||
|
||||
grunt karma:unit:start express:dev watch
|
||||
|
||||
To just run the protractor tests, you can run the following command.
|
||||
|
||||
grunt express:dev e2e
|
@ -1,34 +0,0 @@
|
||||
{
|
||||
"name": "angular-fcsa-number",
|
||||
"version": "1.5.3",
|
||||
"authors": [
|
||||
"Paul Yoder <paulyoder@gmail.com>"
|
||||
],
|
||||
"description": "An Angular directive that validates numbers and adds commas for the thousands separator.",
|
||||
"main": "src/fcsaNumber.js",
|
||||
"keywords": [
|
||||
"angular",
|
||||
"directive",
|
||||
"format",
|
||||
"number",
|
||||
"validate"
|
||||
],
|
||||
"license": "Apache V2",
|
||||
"homepage": "https://github.com/FCSAmericaDev/angular-fcsa-number",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"**/*.coffee",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"Gruntfile.coffee",
|
||||
"karma.conf.js",
|
||||
"package.json"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "~1.x"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "~1.x"
|
||||
}
|
||||
}
|
@ -1,29 +0,0 @@
|
||||
(function() {
|
||||
describe('fcsaNumber', function() {
|
||||
describe('on blur', function() {
|
||||
it('adds the thousand separator', function() {
|
||||
var input;
|
||||
input = element(By.model('amount'));
|
||||
input.clear();
|
||||
input.sendKeys('1000\t');
|
||||
return expect(input.getAttribute('value')).toBe('1,000');
|
||||
});
|
||||
return it('does not add commas to the decimal portion', function() {
|
||||
var input;
|
||||
input = element(By.model('amount'));
|
||||
input.clear();
|
||||
input.sendKeys('1234.5678\t');
|
||||
return expect(input.getAttribute('value')).toBe('1,234.5678');
|
||||
});
|
||||
});
|
||||
return it('removes the thousand separators on focus', function() {
|
||||
var input;
|
||||
input = element(By.model('amount'));
|
||||
input.clear();
|
||||
input.sendKeys('1000\t');
|
||||
input.click();
|
||||
return expect(input.getAttribute('value')).toBe('1000');
|
||||
});
|
||||
});
|
||||
|
||||
}).call(this);
|
@ -1,19 +0,0 @@
|
||||
exports.config = {
|
||||
specs: ['fcsaNumber.e2e.js'],
|
||||
|
||||
baseUrl: 'http://localhost:3000',
|
||||
onPrepare: function () {
|
||||
browser.driver.manage().window().maximize();
|
||||
browser.get('');
|
||||
},
|
||||
|
||||
capabilities: {
|
||||
'browserName': 'chrome'
|
||||
},
|
||||
|
||||
// Options to be passed to Jasmine-node.
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000
|
||||
}
|
||||
};
|
@ -1,6 +0,0 @@
|
||||
var express = require('express');
|
||||
var app = express();
|
||||
|
||||
app.use('/', express.static(__dirname + '/public'));
|
||||
|
||||
app.listen(3000);
|
File diff suppressed because it is too large
Load Diff
@ -1,195 +0,0 @@
|
||||
/*! angular-fcsa-number (version 1.5.3) 2014-10-17 */
|
||||
(function() {
|
||||
var fcsaNumberModule,
|
||||
__hasProp = {}.hasOwnProperty;
|
||||
|
||||
fcsaNumberModule = angular.module('fcsa-number', []);
|
||||
|
||||
fcsaNumberModule.directive('fcsaNumber', [
|
||||
'fcsaNumberConfig', function(fcsaNumberConfig) {
|
||||
var addCommasToInteger, controlKeys, defaultOptions, getOptions, hasMultipleDecimals, isNotControlKey, isNotDigit, isNumber, makeIsValid, makeMaxDecimals, makeMaxDigits, makeMaxNumber, makeMinNumber;
|
||||
defaultOptions = fcsaNumberConfig.defaultOptions;
|
||||
getOptions = function(scope) {
|
||||
var option, options, value, _ref;
|
||||
options = angular.copy(defaultOptions);
|
||||
if (scope.options != null) {
|
||||
_ref = scope.$eval(scope.options);
|
||||
for (option in _ref) {
|
||||
if (!__hasProp.call(_ref, option)) continue;
|
||||
value = _ref[option];
|
||||
options[option] = value;
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
isNumber = function(val) {
|
||||
return !isNaN(parseFloat(val)) && isFinite(val);
|
||||
};
|
||||
isNotDigit = function(which) {
|
||||
return which < 44 || which > 57 || which === 47;
|
||||
};
|
||||
controlKeys = [0, 8, 13];
|
||||
isNotControlKey = function(which) {
|
||||
return controlKeys.indexOf(which) === -1;
|
||||
};
|
||||
hasMultipleDecimals = function(val) {
|
||||
return (val != null) && val.toString().split('.').length > 2;
|
||||
};
|
||||
makeMaxDecimals = function(maxDecimals) {
|
||||
var regexString, validRegex;
|
||||
if (maxDecimals > 0) {
|
||||
regexString = "^-?\\d*\\.?\\d{0," + maxDecimals + "}$";
|
||||
} else {
|
||||
regexString = "^-?\\d*$";
|
||||
}
|
||||
validRegex = new RegExp(regexString);
|
||||
return function(val) {
|
||||
return validRegex.test(val);
|
||||
};
|
||||
};
|
||||
makeMaxNumber = function(maxNumber) {
|
||||
return function(val, number) {
|
||||
return number <= maxNumber;
|
||||
};
|
||||
};
|
||||
makeMinNumber = function(minNumber) {
|
||||
return function(val, number) {
|
||||
return number >= minNumber;
|
||||
};
|
||||
};
|
||||
makeMaxDigits = function(maxDigits) {
|
||||
var validRegex;
|
||||
validRegex = new RegExp("^-?\\d{0," + maxDigits + "}(\\.\\d*)?$");
|
||||
return function(val) {
|
||||
return validRegex.test(val);
|
||||
};
|
||||
};
|
||||
makeIsValid = function(options) {
|
||||
var validations;
|
||||
validations = [];
|
||||
if (options.maxDecimals != null) {
|
||||
validations.push(makeMaxDecimals(options.maxDecimals));
|
||||
}
|
||||
if (options.max != null) {
|
||||
validations.push(makeMaxNumber(options.max));
|
||||
}
|
||||
if (options.min != null) {
|
||||
validations.push(makeMinNumber(options.min));
|
||||
}
|
||||
if (options.maxDigits != null) {
|
||||
validations.push(makeMaxDigits(options.maxDigits));
|
||||
}
|
||||
return function(val) {
|
||||
var i, number, _i, _ref;
|
||||
if (!isNumber(val)) {
|
||||
return false;
|
||||
}
|
||||
if (hasMultipleDecimals(val)) {
|
||||
return false;
|
||||
}
|
||||
number = Number(val);
|
||||
for (i = _i = 0, _ref = validations.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
if (!validations[i](val, number)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
};
|
||||
addCommasToInteger = function(val) {
|
||||
var commas, decimals, wholeNumbers;
|
||||
decimals = val.indexOf('.') == -1 ? '' : val.replace(/^-?\d+(?=\.)/, '');
|
||||
wholeNumbers = val.replace(/(\.\d+)$/, '');
|
||||
commas = wholeNumbers.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
|
||||
return "" + commas + decimals;
|
||||
};
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: 'ngModel',
|
||||
scope: {
|
||||
options: '@fcsaNumber'
|
||||
},
|
||||
link: function(scope, elem, attrs, ngModelCtrl) {
|
||||
var isValid, options;
|
||||
options = getOptions(scope);
|
||||
isValid = makeIsValid(options);
|
||||
ngModelCtrl.$parsers.unshift(function(viewVal) {
|
||||
var noCommasVal;
|
||||
noCommasVal = viewVal.replace(/,/g, '');
|
||||
if (isValid(noCommasVal) || !noCommasVal) {
|
||||
ngModelCtrl.$setValidity('fcsaNumber', true);
|
||||
return noCommasVal;
|
||||
} else {
|
||||
ngModelCtrl.$setValidity('fcsaNumber', false);
|
||||
return void 0;
|
||||
}
|
||||
});
|
||||
ngModelCtrl.$formatters.push(function(val) {
|
||||
if ((options.nullDisplay != null) && (!val || val === '')) {
|
||||
return options.nullDisplay;
|
||||
}
|
||||
if ((val == null) || !isValid(val)) {
|
||||
return val;
|
||||
}
|
||||
ngModelCtrl.$setValidity('fcsaNumber', true);
|
||||
val = addCommasToInteger(val.toString());
|
||||
if (options.prepend != null) {
|
||||
val = "" + options.prepend + val;
|
||||
}
|
||||
if (options.append != null) {
|
||||
val = "" + val + options.append;
|
||||
}
|
||||
return val;
|
||||
});
|
||||
elem.on('blur', function() {
|
||||
var formatter, viewValue, _i, _len, _ref;
|
||||
viewValue = ngModelCtrl.$modelValue;
|
||||
if ((viewValue == null) || !isValid(viewValue)) {
|
||||
return;
|
||||
}
|
||||
_ref = ngModelCtrl.$formatters;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
formatter = _ref[_i];
|
||||
viewValue = formatter(viewValue);
|
||||
}
|
||||
ngModelCtrl.$viewValue = viewValue;
|
||||
return ngModelCtrl.$render();
|
||||
});
|
||||
elem.on('focus', function() {
|
||||
var val;
|
||||
val = elem.val();
|
||||
if (options.prepend != null) {
|
||||
val = val.replace(options.prepend, '');
|
||||
}
|
||||
if (options.append != null) {
|
||||
val = val.replace(options.append, '');
|
||||
}
|
||||
elem.val(val.replace(/,/g, ''));
|
||||
return elem[0].select();
|
||||
});
|
||||
if (options.preventInvalidInput === true) {
|
||||
return elem.on('keypress', function(e) {
|
||||
if (isNotDigit(e.which) && isNotControlKey(e.which)) {
|
||||
return e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
fcsaNumberModule.provider('fcsaNumberConfig', function() {
|
||||
var _defaultOptions;
|
||||
_defaultOptions = {};
|
||||
this.setDefaultOptions = function(defaultOptions) {
|
||||
return _defaultOptions = defaultOptions;
|
||||
};
|
||||
this.$get = function() {
|
||||
return {
|
||||
defaultOptions: _defaultOptions
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
}).call(this);
|
@ -1,16 +0,0 @@
|
||||
<html5>
|
||||
<html>
|
||||
<head>
|
||||
<script src='angular.js'></script>
|
||||
<script src='fcsaNumber.js'></script>
|
||||
<script>
|
||||
var app = angular.module('app', ['fcsa-number']);
|
||||
app.controller('HomeController', function($scope) {
|
||||
$scope.amount = 1000;
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body ng-app='app' ng-controller='HomeController'>
|
||||
<input type='text' ng-model='amount' fcsa-number />
|
||||
</body>
|
||||
</html>
|
@ -1,195 +0,0 @@
|
||||
/*! angular-fcsa-number (version 1.5.3) 2014-10-17 */
|
||||
(function() {
|
||||
var fcsaNumberModule,
|
||||
__hasProp = {}.hasOwnProperty;
|
||||
|
||||
fcsaNumberModule = angular.module('fcsa-number', []);
|
||||
|
||||
fcsaNumberModule.directive('fcsaNumber', [
|
||||
'fcsaNumberConfig', function(fcsaNumberConfig) {
|
||||
var addCommasToInteger, controlKeys, defaultOptions, getOptions, hasMultipleDecimals, isNotControlKey, isNotDigit, isNumber, makeIsValid, makeMaxDecimals, makeMaxDigits, makeMaxNumber, makeMinNumber;
|
||||
defaultOptions = fcsaNumberConfig.defaultOptions;
|
||||
getOptions = function(scope) {
|
||||
var option, options, value, _ref;
|
||||
options = angular.copy(defaultOptions);
|
||||
if (scope.options != null) {
|
||||
_ref = scope.$eval(scope.options);
|
||||
for (option in _ref) {
|
||||
if (!__hasProp.call(_ref, option)) continue;
|
||||
value = _ref[option];
|
||||
options[option] = value;
|
||||
}
|
||||
}
|
||||
return options;
|
||||
};
|
||||
isNumber = function(val) {
|
||||
return !isNaN(parseFloat(val)) && isFinite(val);
|
||||
};
|
||||
isNotDigit = function(which) {
|
||||
return which < 44 || which > 57 || which === 47;
|
||||
};
|
||||
controlKeys = [0, 8, 13];
|
||||
isNotControlKey = function(which) {
|
||||
return controlKeys.indexOf(which) === -1;
|
||||
};
|
||||
hasMultipleDecimals = function(val) {
|
||||
return (val != null) && val.toString().split('.').length > 2;
|
||||
};
|
||||
makeMaxDecimals = function(maxDecimals) {
|
||||
var regexString, validRegex;
|
||||
if (maxDecimals > 0) {
|
||||
regexString = "^-?\\d*\\.?\\d{0," + maxDecimals + "}$";
|
||||
} else {
|
||||
regexString = "^-?\\d*$";
|
||||
}
|
||||
validRegex = new RegExp(regexString);
|
||||
return function(val) {
|
||||
return validRegex.test(val);
|
||||
};
|
||||
};
|
||||
makeMaxNumber = function(maxNumber) {
|
||||
return function(val, number) {
|
||||
return number <= maxNumber;
|
||||
};
|
||||
};
|
||||
makeMinNumber = function(minNumber) {
|
||||
return function(val, number) {
|
||||
return number >= minNumber;
|
||||
};
|
||||
};
|
||||
makeMaxDigits = function(maxDigits) {
|
||||
var validRegex;
|
||||
validRegex = new RegExp("^-?\\d{0," + maxDigits + "}(\\.\\d*)?$");
|
||||
return function(val) {
|
||||
return validRegex.test(val);
|
||||
};
|
||||
};
|
||||
makeIsValid = function(options) {
|
||||
var validations;
|
||||
validations = [];
|
||||
if (options.maxDecimals != null) {
|
||||
validations.push(makeMaxDecimals(options.maxDecimals));
|
||||
}
|
||||
if (options.max != null) {
|
||||
validations.push(makeMaxNumber(options.max));
|
||||
}
|
||||
if (options.min != null) {
|
||||
validations.push(makeMinNumber(options.min));
|
||||
}
|
||||
if (options.maxDigits != null) {
|
||||
validations.push(makeMaxDigits(options.maxDigits));
|
||||
}
|
||||
return function(val) {
|
||||
var i, number, _i, _ref;
|
||||
if (!isNumber(val)) {
|
||||
return false;
|
||||
}
|
||||
if (hasMultipleDecimals(val)) {
|
||||
return false;
|
||||
}
|
||||
number = Number(val);
|
||||
for (i = _i = 0, _ref = validations.length; 0 <= _ref ? _i < _ref : _i > _ref; i = 0 <= _ref ? ++_i : --_i) {
|
||||
if (!validations[i](val, number)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
};
|
||||
addCommasToInteger = function(val) {
|
||||
var commas, decimals, wholeNumbers;
|
||||
decimals = val.indexOf('.') == -1 ? '' : val.replace(/^-?\d+(?=\.)/, '');
|
||||
wholeNumbers = val.replace(/(\.\d+)$/, '');
|
||||
commas = wholeNumbers.replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1,');
|
||||
return "" + commas + decimals;
|
||||
};
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: 'ngModel',
|
||||
scope: {
|
||||
options: '@fcsaNumber'
|
||||
},
|
||||
link: function(scope, elem, attrs, ngModelCtrl) {
|
||||
var isValid, options;
|
||||
options = getOptions(scope);
|
||||
isValid = makeIsValid(options);
|
||||
ngModelCtrl.$parsers.unshift(function(viewVal) {
|
||||
var noCommasVal;
|
||||
noCommasVal = viewVal.replace(/,/g, '');
|
||||
if (isValid(noCommasVal) || !noCommasVal) {
|
||||
ngModelCtrl.$setValidity('fcsaNumber', true);
|
||||
return noCommasVal;
|
||||
} else {
|
||||
ngModelCtrl.$setValidity('fcsaNumber', false);
|
||||
return void 0;
|
||||
}
|
||||
});
|
||||
ngModelCtrl.$formatters.push(function(val) {
|
||||
if ((options.nullDisplay != null) && (!val || val === '')) {
|
||||
return options.nullDisplay;
|
||||
}
|
||||
if ((val == null) || !isValid(val)) {
|
||||
return val;
|
||||
}
|
||||
ngModelCtrl.$setValidity('fcsaNumber', true);
|
||||
val = addCommasToInteger(val.toString());
|
||||
if (options.prepend != null) {
|
||||
val = "" + options.prepend + val;
|
||||
}
|
||||
if (options.append != null) {
|
||||
val = "" + val + options.append;
|
||||
}
|
||||
return val;
|
||||
});
|
||||
elem.on('blur', function() {
|
||||
var formatter, viewValue, _i, _len, _ref;
|
||||
viewValue = ngModelCtrl.$modelValue;
|
||||
if ((viewValue == null) || !isValid(viewValue)) {
|
||||
return;
|
||||
}
|
||||
_ref = ngModelCtrl.$formatters;
|
||||
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
|
||||
formatter = _ref[_i];
|
||||
viewValue = formatter(viewValue);
|
||||
}
|
||||
ngModelCtrl.$viewValue = viewValue;
|
||||
return ngModelCtrl.$render();
|
||||
});
|
||||
elem.on('focus', function() {
|
||||
var val;
|
||||
val = elem.val();
|
||||
if (options.prepend != null) {
|
||||
val = val.replace(options.prepend, '');
|
||||
}
|
||||
if (options.append != null) {
|
||||
val = val.replace(options.append, '');
|
||||
}
|
||||
elem.val(val.replace(/,/g, ''));
|
||||
return elem[0].select();
|
||||
});
|
||||
if (options.preventInvalidInput === true) {
|
||||
return elem.on('keypress', function(e) {
|
||||
if (isNotDigit(e.which) && isNotControlKey(e.which)) {
|
||||
return e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
||||
fcsaNumberModule.provider('fcsaNumberConfig', function() {
|
||||
var _defaultOptions;
|
||||
_defaultOptions = {};
|
||||
this.setDefaultOptions = function(defaultOptions) {
|
||||
return _defaultOptions = defaultOptions;
|
||||
};
|
||||
this.$get = function() {
|
||||
return {
|
||||
defaultOptions: _defaultOptions
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
}).call(this);
|
@ -1,2 +0,0 @@
|
||||
/*! angular-fcsa-number (version 1.5.3) 2014-10-17 */
|
||||
(function(){var a,b={}.hasOwnProperty;a=angular.module("fcsa-number",[]),a.directive("fcsaNumber",["fcsaNumberConfig",function(a){var c,d,e,f,g,h,i,j,k,l,m,n,o;return e=a.defaultOptions,f=function(a){var c,d,f,g;if(d=angular.copy(e),null!=a.options){g=a.$eval(a.options);for(c in g)b.call(g,c)&&(f=g[c],d[c]=f)}return d},j=function(a){return!isNaN(parseFloat(a))&&isFinite(a)},i=function(a){return 44>a||a>57||47===a},d=[0,8,13],h=function(a){return-1===d.indexOf(a)},g=function(a){return null!=a&&a.toString().split(".").length>2},l=function(a){var b,c;return b=a>0?"^-?\\d*\\.?\\d{0,"+a+"}$":"^-?\\d*$",c=new RegExp(b),function(a){return c.test(a)}},n=function(a){return function(b,c){return a>=c}},o=function(a){return function(b,c){return c>=a}},m=function(a){var b;return b=new RegExp("^-?\\d{0,"+a+"}(\\.\\d*)?$"),function(a){return b.test(a)}},k=function(a){var b;return b=[],null!=a.maxDecimals&&b.push(l(a.maxDecimals)),null!=a.max&&b.push(n(a.max)),null!=a.min&&b.push(o(a.min)),null!=a.maxDigits&&b.push(m(a.maxDigits)),function(a){var c,d,e,f;if(!j(a))return!1;if(g(a))return!1;for(d=Number(a),c=e=0,f=b.length;f>=0?f>e:e>f;c=f>=0?++e:--e)if(!b[c](a,d))return!1;return!0}},c=function(a){var b,c,d;return c=-1==a.indexOf(".")?"":a.replace(/^-?\d+(?=\.)/,""),d=a.replace(/(\.\d+)$/,""),b=d.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),""+b+c},{restrict:"A",require:"ngModel",scope:{options:"@fcsaNumber"},link:function(a,b,d,e){var g,j;return j=f(a),g=k(j),e.$parsers.unshift(function(a){var b;return b=a.replace(/,/g,""),g(b)||!b?(e.$setValidity("fcsaNumber",!0),b):void e.$setValidity("fcsaNumber",!1)}),e.$formatters.push(function(a){return null==j.nullDisplay||a&&""!==a?null!=a&&g(a)?(e.$setValidity("fcsaNumber",!0),a=c(a.toString()),null!=j.prepend&&(a=""+j.prepend+a),null!=j.append&&(a=""+a+j.append),a):a:j.nullDisplay}),b.on("blur",function(){var a,b,c,d,f;if(b=e.$modelValue,null!=b&&g(b)){for(f=e.$formatters,c=0,d=f.length;d>c;c++)a=f[c],b=a(b);return e.$viewValue=b,e.$render()}}),b.on("focus",function(){var a;return a=b.val(),null!=j.prepend&&(a=a.replace(j.prepend,"")),null!=j.append&&(a=a.replace(j.append,"")),b.val(a.replace(/,/g,"")),b[0].select()}),j.preventInvalidInput===!0?b.on("keypress",function(a){return i(a.which)&&h(a.which)?a.preventDefault():void 0}):void 0}}}]),a.provider("fcsaNumberConfig",function(){var a;a={},this.setDefaultOptions=function(b){return a=b},this.$get=function(){return{defaultOptions:a}}})}).call(this);
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"name": "angular-route",
|
||||
"version": "1.5.8",
|
||||
"license": "MIT",
|
||||
"main": "./angular-route.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.5.8"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-route",
|
||||
"_release": "1.5.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.8",
|
||||
"commit": "e96eff424fdd9689061659603ca59470375bf024"
|
||||
},
|
||||
"_source": "https://github.com/angular/bower-angular-route.git",
|
||||
"_target": "^1.5.7",
|
||||
"_originalSource": "angular-route"
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Angular
|
||||
|
||||
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.
|
@ -1,68 +0,0 @@
|
||||
# packaged angular-route
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngRoute).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-route
|
||||
```
|
||||
|
||||
Then add `ngRoute` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', [require('angular-route')]);
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular-route
|
||||
```
|
||||
|
||||
Add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular-route/angular-route.js"></script>
|
||||
```
|
||||
|
||||
Then add `ngRoute` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', ['ngRoute']);
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/api/ngRoute).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
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.
|
File diff suppressed because it is too large
Load Diff
@ -1,16 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.5.8
|
||||
(c) 2010-2016 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(E,d){'use strict';function y(t,l,g){return{restrict:"ECA",terminal:!0,priority:400,transclude:"element",link:function(b,e,a,c,k){function p(){m&&(g.cancel(m),m=null);h&&(h.$destroy(),h=null);n&&(m=g.leave(n),m.then(function(){m=null}),n=null)}function B(){var a=t.current&&t.current.locals;if(d.isDefined(a&&a.$template)){var a=b.$new(),c=t.current;n=k(a,function(a){g.enter(a,null,n||e).then(function(){!d.isDefined(A)||A&&!b.$eval(A)||l()});p()});h=c.scope=a;h.$emit("$viewContentLoaded");
|
||||
h.$eval(s)}else p()}var h,n,m,A=a.autoscroll,s=a.onload||"";b.$on("$routeChangeSuccess",B);B()}}}function w(d,l,g){return{restrict:"ECA",priority:-400,link:function(b,e){var a=g.current,c=a.locals;e.html(c.$template);var k=d(e.contents());if(a.controller){c.$scope=b;var p=l(a.controller,c);a.controllerAs&&(b[a.controllerAs]=p);e.data("$ngControllerController",p);e.children().data("$ngControllerController",p)}b[a.resolveAs||"$resolve"]=c;k(b)}}}var x,C,s=d.module("ngRoute",["ng"]).provider("$route",
|
||||
function(){function t(b,e){return d.extend(Object.create(b),e)}function l(b,d){var a=d.caseInsensitiveMatch,c={originalPath:b,regexp:b},g=c.keys=[];b=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[\?\*])?/g,function(b,a,d,c){b="?"===c||"*?"===c?"?":null;c="*"===c||"*?"===c?"*":null;g.push({name:d,optional:!!b});a=a||"";return""+(b?"":a)+"(?:"+(b?a:"")+(c&&"(.+?)"||"([^/]+)")+(b||"")+")"+(b||"")}).replace(/([\/$\*])/g,"\\$1");c.regexp=new RegExp("^"+b+"$",a?"i":"");return c}x=d.isArray;C=
|
||||
d.isObject;var g={};this.when=function(b,e){var a;a=void 0;if(x(e)){a=a||[];for(var c=0,k=e.length;c<k;c++)a[c]=e[c]}else if(C(e))for(c in a=a||{},e)if("$"!==c.charAt(0)||"$"!==c.charAt(1))a[c]=e[c];a=a||e;d.isUndefined(a.reloadOnSearch)&&(a.reloadOnSearch=!0);d.isUndefined(a.caseInsensitiveMatch)&&(a.caseInsensitiveMatch=this.caseInsensitiveMatch);g[b]=d.extend(a,b&&l(b,a));b&&(c="/"==b[b.length-1]?b.substr(0,b.length-1):b+"/",g[c]=d.extend({redirectTo:b},l(c,a)));return this};this.caseInsensitiveMatch=
|
||||
!1;this.otherwise=function(b){"string"===typeof b&&(b={redirectTo:b});this.when(null,b);return this};this.$get=["$rootScope","$location","$routeParams","$q","$injector","$templateRequest","$sce",function(b,e,a,c,k,p,l){function h(a){var f=v.current;(x=(r=y())&&f&&r.$$route===f.$$route&&d.equals(r.pathParams,f.pathParams)&&!r.reloadOnSearch&&!z)||!f&&!r||b.$broadcast("$routeChangeStart",r,f).defaultPrevented&&a&&a.preventDefault()}function n(){var u=v.current,f=r;if(x)u.params=f.params,d.copy(u.params,
|
||||
a),b.$broadcast("$routeUpdate",u);else if(f||u)z=!1,(v.current=f)&&f.redirectTo&&(d.isString(f.redirectTo)?e.path(w(f.redirectTo,f.params)).search(f.params).replace():e.url(f.redirectTo(f.pathParams,e.path(),e.search())).replace()),c.when(f).then(m).then(function(c){f==v.current&&(f&&(f.locals=c,d.copy(f.params,a)),b.$broadcast("$routeChangeSuccess",f,u))},function(a){f==v.current&&b.$broadcast("$routeChangeError",f,u,a)})}function m(a){if(a){var b=d.extend({},a.resolve);d.forEach(b,function(a,c){b[c]=
|
||||
d.isString(a)?k.get(a):k.invoke(a,null,null,c)});a=s(a);d.isDefined(a)&&(b.$template=a);return c.all(b)}}function s(a){var b,c;d.isDefined(b=a.template)?d.isFunction(b)&&(b=b(a.params)):d.isDefined(c=a.templateUrl)&&(d.isFunction(c)&&(c=c(a.params)),d.isDefined(c)&&(a.loadedTemplateUrl=l.valueOf(c),b=p(c)));return b}function y(){var a,b;d.forEach(g,function(c,g){var q;if(q=!b){var h=e.path();q=c.keys;var l={};if(c.regexp)if(h=c.regexp.exec(h)){for(var k=1,p=h.length;k<p;++k){var m=q[k-1],n=h[k];m&&
|
||||
n&&(l[m.name]=n)}q=l}else q=null;else q=null;q=a=q}q&&(b=t(c,{params:d.extend({},e.search(),a),pathParams:a}),b.$$route=c)});return b||g[null]&&t(g[null],{params:{},pathParams:{}})}function w(a,b){var c=[];d.forEach((a||"").split(":"),function(a,d){if(0===d)c.push(a);else{var e=a.match(/(\w+)(?:[?*])?(.*)/),g=e[1];c.push(b[g]);c.push(e[2]||"");delete b[g]}});return c.join("")}var z=!1,r,x,v={routes:g,reload:function(){z=!0;var a={defaultPrevented:!1,preventDefault:function(){this.defaultPrevented=
|
||||
!0;z=!1}};b.$evalAsync(function(){h(a);a.defaultPrevented||n()})},updateParams:function(a){if(this.current&&this.current.$$route)a=d.extend({},this.current.params,a),e.path(w(this.current.$$route.originalPath,a)),e.search(a);else throw D("norout");}};b.$on("$locationChangeStart",h);b.$on("$locationChangeSuccess",n);return v}]}),D=d.$$minErr("ngRoute");s.provider("$routeParams",function(){this.$get=function(){return{}}});s.directive("ngView",y);s.directive("ngView",w);y.$inject=["$route","$anchorScroll",
|
||||
"$animate"];w.$inject=["$compile","$controller","$route"]})(window,window.angular);
|
||||
//# sourceMappingURL=angular-route.min.js.map
|
File diff suppressed because one or more lines are too long
@ -1,10 +0,0 @@
|
||||
{
|
||||
"name": "angular-route",
|
||||
"version": "1.5.8",
|
||||
"license": "MIT",
|
||||
"main": "./angular-route.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.5.8"
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
require('./angular-route');
|
||||
module.exports = 'ngRoute';
|
@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "angular-route",
|
||||
"version": "1.5.8",
|
||||
"description": "AngularJS router module",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"router",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org",
|
||||
"jspm": {
|
||||
"shim": {
|
||||
"angular-route": {
|
||||
"deps": ["angular"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "angular",
|
||||
"version": "1.5.8",
|
||||
"license": "MIT",
|
||||
"main": "./angular.js",
|
||||
"ignore": [],
|
||||
"dependencies": {},
|
||||
"homepage": "https://github.com/angular/bower-angular",
|
||||
"_release": "1.5.8",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.5.8",
|
||||
"commit": "7e0e546eb6caedbb298c91a9f6bf7de7eeaa4ad2"
|
||||
},
|
||||
"_source": "https://github.com/angular/bower-angular.git",
|
||||
"_target": "^1.5.6",
|
||||
"_originalSource": "angular"
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Angular
|
||||
|
||||
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.
|
@ -1,64 +0,0 @@
|
||||
# packaged angular
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular
|
||||
```
|
||||
|
||||
Then add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/node_modules/angular/angular.js"></script>
|
||||
```
|
||||
|
||||
Or `require('angular')` from your code.
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular
|
||||
```
|
||||
|
||||
Then add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular/angular.js"></script>
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
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.
|
@ -1,21 +0,0 @@
|
||||
/* Include this file in your html if you are using the CSP mode. */
|
||||
|
||||
@charset "UTF-8";
|
||||
|
||||
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak],
|
||||
.ng-cloak, .x-ng-cloak,
|
||||
.ng-hide:not(.ng-hide-animate) {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
ng\:form {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ng-animate-shim {
|
||||
visibility:hidden;
|
||||
}
|
||||
|
||||
.ng-anchor {
|
||||
position:absolute;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,318 +0,0 @@
|
||||
/*
|
||||
AngularJS v1.5.8
|
||||
(c) 2010-2016 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(C){'use strict';function N(a){return function(){var b=arguments[0],d;d="["+(a?a+":":"")+b+"] http://errors.angularjs.org/1.5.8/"+(a?a+"/":"")+b;for(b=1;b<arguments.length;b++){d=d+(1==b?"?":"&")+"p"+(b-1)+"=";var c=encodeURIComponent,e;e=arguments[b];e="function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):"undefined"==typeof e?"undefined":"string"!=typeof e?JSON.stringify(e):e;d+=c(e)}return Error(d)}}function ta(a){if(null==a||Va(a))return!1;if(L(a)||G(a)||F&&a instanceof F)return!0;
|
||||
var b="length"in Object(a)&&a.length;return T(b)&&(0<=b&&(b-1 in a||a instanceof Array)||"function"==typeof a.item)}function q(a,b,d){var c,e;if(a)if(z(a))for(c in a)"prototype"==c||"length"==c||"name"==c||a.hasOwnProperty&&!a.hasOwnProperty(c)||b.call(d,a[c],c,a);else if(L(a)||ta(a)){var f="object"!==typeof a;c=0;for(e=a.length;c<e;c++)(f||c in a)&&b.call(d,a[c],c,a)}else if(a.forEach&&a.forEach!==q)a.forEach(b,d,a);else if(sc(a))for(c in a)b.call(d,a[c],c,a);else if("function"===typeof a.hasOwnProperty)for(c in a)a.hasOwnProperty(c)&&
|
||||
b.call(d,a[c],c,a);else for(c in a)ua.call(a,c)&&b.call(d,a[c],c,a);return a}function tc(a,b,d){for(var c=Object.keys(a).sort(),e=0;e<c.length;e++)b.call(d,a[c[e]],c[e]);return c}function uc(a){return function(b,d){a(d,b)}}function Yd(){return++pb}function Pb(a,b,d){for(var c=a.$$hashKey,e=0,f=b.length;e<f;++e){var g=b[e];if(D(g)||z(g))for(var h=Object.keys(g),k=0,l=h.length;k<l;k++){var m=h[k],n=g[m];d&&D(n)?da(n)?a[m]=new Date(n.valueOf()):Wa(n)?a[m]=new RegExp(n):n.nodeName?a[m]=n.cloneNode(!0):
|
||||
Qb(n)?a[m]=n.clone():(D(a[m])||(a[m]=L(n)?[]:{}),Pb(a[m],[n],!0)):a[m]=n}}c?a.$$hashKey=c:delete a.$$hashKey;return a}function S(a){return Pb(a,va.call(arguments,1),!1)}function Zd(a){return Pb(a,va.call(arguments,1),!0)}function Z(a){return parseInt(a,10)}function Rb(a,b){return S(Object.create(a),b)}function A(){}function Xa(a){return a}function ha(a){return function(){return a}}function vc(a){return z(a.toString)&&a.toString!==ma}function y(a){return"undefined"===typeof a}function w(a){return"undefined"!==
|
||||
typeof a}function D(a){return null!==a&&"object"===typeof a}function sc(a){return null!==a&&"object"===typeof a&&!wc(a)}function G(a){return"string"===typeof a}function T(a){return"number"===typeof a}function da(a){return"[object Date]"===ma.call(a)}function z(a){return"function"===typeof a}function Wa(a){return"[object RegExp]"===ma.call(a)}function Va(a){return a&&a.window===a}function Ya(a){return a&&a.$evalAsync&&a.$watch}function Ga(a){return"boolean"===typeof a}function $d(a){return a&&T(a.length)&&
|
||||
ae.test(ma.call(a))}function Qb(a){return!(!a||!(a.nodeName||a.prop&&a.attr&&a.find))}function be(a){var b={};a=a.split(",");var d;for(d=0;d<a.length;d++)b[a[d]]=!0;return b}function wa(a){return Q(a.nodeName||a[0]&&a[0].nodeName)}function Za(a,b){var d=a.indexOf(b);0<=d&&a.splice(d,1);return d}function pa(a,b){function d(a,b){var d=b.$$hashKey,e;if(L(a)){e=0;for(var f=a.length;e<f;e++)b.push(c(a[e]))}else if(sc(a))for(e in a)b[e]=c(a[e]);else if(a&&"function"===typeof a.hasOwnProperty)for(e in a)a.hasOwnProperty(e)&&
|
||||
(b[e]=c(a[e]));else for(e in a)ua.call(a,e)&&(b[e]=c(a[e]));d?b.$$hashKey=d:delete b.$$hashKey;return b}function c(a){if(!D(a))return a;var b=f.indexOf(a);if(-1!==b)return g[b];if(Va(a)||Ya(a))throw xa("cpws");var b=!1,c=e(a);void 0===c&&(c=L(a)?[]:Object.create(wc(a)),b=!0);f.push(a);g.push(c);return b?d(a,c):c}function e(a){switch(ma.call(a)){case "[object Int8Array]":case "[object Int16Array]":case "[object Int32Array]":case "[object Float32Array]":case "[object Float64Array]":case "[object Uint8Array]":case "[object Uint8ClampedArray]":case "[object Uint16Array]":case "[object Uint32Array]":return new a.constructor(c(a.buffer),
|
||||
a.byteOffset,a.length);case "[object ArrayBuffer]":if(!a.slice){var b=new ArrayBuffer(a.byteLength);(new Uint8Array(b)).set(new Uint8Array(a));return b}return a.slice(0);case "[object Boolean]":case "[object Number]":case "[object String]":case "[object Date]":return new a.constructor(a.valueOf());case "[object RegExp]":return b=new RegExp(a.source,a.toString().match(/[^\/]*$/)[0]),b.lastIndex=a.lastIndex,b;case "[object Blob]":return new a.constructor([a],{type:a.type})}if(z(a.cloneNode))return a.cloneNode(!0)}
|
||||
var f=[],g=[];if(b){if($d(b)||"[object ArrayBuffer]"===ma.call(b))throw xa("cpta");if(a===b)throw xa("cpi");L(b)?b.length=0:q(b,function(a,d){"$$hashKey"!==d&&delete b[d]});f.push(a);g.push(b);return d(a,b)}return c(a)}function na(a,b){if(a===b)return!0;if(null===a||null===b)return!1;if(a!==a&&b!==b)return!0;var d=typeof a,c;if(d==typeof b&&"object"==d)if(L(a)){if(!L(b))return!1;if((d=a.length)==b.length){for(c=0;c<d;c++)if(!na(a[c],b[c]))return!1;return!0}}else{if(da(a))return da(b)?na(a.getTime(),
|
||||
b.getTime()):!1;if(Wa(a))return Wa(b)?a.toString()==b.toString():!1;if(Ya(a)||Ya(b)||Va(a)||Va(b)||L(b)||da(b)||Wa(b))return!1;d=U();for(c in a)if("$"!==c.charAt(0)&&!z(a[c])){if(!na(a[c],b[c]))return!1;d[c]=!0}for(c in b)if(!(c in d)&&"$"!==c.charAt(0)&&w(b[c])&&!z(b[c]))return!1;return!0}return!1}function $a(a,b,d){return a.concat(va.call(b,d))}function ab(a,b){var d=2<arguments.length?va.call(arguments,2):[];return!z(b)||b instanceof RegExp?b:d.length?function(){return arguments.length?b.apply(a,
|
||||
$a(d,arguments,0)):b.apply(a,d)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}}function ce(a,b){var d=b;"string"===typeof a&&"$"===a.charAt(0)&&"$"===a.charAt(1)?d=void 0:Va(b)?d="$WINDOW":b&&C.document===b?d="$DOCUMENT":Ya(b)&&(d="$SCOPE");return d}function bb(a,b){if(!y(a))return T(b)||(b=b?2:null),JSON.stringify(a,ce,b)}function xc(a){return G(a)?JSON.parse(a):a}function yc(a,b){a=a.replace(de,"");var d=Date.parse("Jan 01, 1970 00:00:00 "+a)/6E4;return isNaN(d)?b:d}function Sb(a,
|
||||
b,d){d=d?-1:1;var c=a.getTimezoneOffset();b=yc(b,c);d*=b-c;a=new Date(a.getTime());a.setMinutes(a.getMinutes()+d);return a}function ya(a){a=F(a).clone();try{a.empty()}catch(b){}var d=F("<div>").append(a).html();try{return a[0].nodeType===Ma?Q(d):d.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Q(b)})}catch(c){return Q(d)}}function zc(a){try{return decodeURIComponent(a)}catch(b){}}function Ac(a){var b={};q((a||"").split("&"),function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),
|
||||
c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=zc(e),w(e)&&(f=w(f)?zc(f):!0,ua.call(b,e)?L(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Tb(a){var b=[];q(a,function(a,c){L(a)?q(a,function(a){b.push(ea(c,!0)+(!0===a?"":"="+ea(a,!0)))}):b.push(ea(c,!0)+(!0===a?"":"="+ea(a,!0)))});return b.length?b.join("&"):""}function qb(a){return ea(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ea(a,b){return encodeURIComponent(a).replace(/%40/gi,
|
||||
"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function ee(a,b){var d,c,e=Na.length;for(c=0;c<e;++c)if(d=Na[c]+b,G(d=a.getAttribute(d)))return d;return null}function fe(a,b){var d,c,e={};q(Na,function(b){b+="app";!d&&a.hasAttribute&&a.hasAttribute(b)&&(d=a,c=a.getAttribute(b))});q(Na,function(b){b+="app";var e;!d&&(e=a.querySelector("["+b.replace(":","\\:")+"]"))&&(d=e,c=e.getAttribute(b))});d&&(e.strictDi=null!==ee(d,"strict-di"),
|
||||
b(d,c?[c]:[],e))}function Bc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=F(a);if(a.injector()){var c=a[0]===C.document?"document":ya(a);throw xa("btstrpd",c.replace(/</,"<").replace(/>/,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=cb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",
|
||||
d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;C&&e.test(C.name)&&(d.debugInfoEnabled=!0,C.name=C.name.replace(e,""));if(C&&!f.test(C.name))return c();C.name=C.name.replace(f,"");ca.resumeBootstrap=function(a){q(a,function(a){b.push(a)});return c()};z(ca.resumeDeferredBootstrap)&&ca.resumeDeferredBootstrap()}function ge(){C.name="NG_ENABLE_DEBUG_INFO!"+C.name;C.location.reload()}function he(a){a=ca.element(a).injector();if(!a)throw xa("test");return a.get("$$testability")}
|
||||
function Cc(a,b){b=b||"_";return a.replace(ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function je(){var a;if(!Dc){var b=rb();(qa=y(b)?C.jQuery:b?C[b]:void 0)&&qa.fn.on?(F=qa,S(qa.fn,{scope:Oa.scope,isolateScope:Oa.isolateScope,controller:Oa.controller,injector:Oa.injector,inheritedData:Oa.inheritedData}),a=qa.cleanData,qa.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=qa._data(f,"events"))&&c.$destroy&&qa(f).triggerHandler("$destroy");a(b)}):F=O;ca.element=F;Dc=!0}}function sb(a,
|
||||
b,d){if(!a)throw xa("areq",b||"?",d||"required");return a}function Pa(a,b,d){d&&L(a)&&(a=a[a.length-1]);sb(z(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Qa(a,b){if("hasOwnProperty"===a)throw xa("badname",b);}function Ec(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g<f;g++)c=b[g],a&&(a=(e=a)[c]);return!d&&z(a)?ab(e,a):a}function tb(a){for(var b=a[0],d=a[a.length-1],c,e=1;b!==d&&(b=b.nextSibling);e++)if(c||a[e]!==
|
||||
b)c||(c=F(va.call(a,0,e))),c.push(b);return c||a}function U(){return Object.create(null)}function ke(a){function b(a,b,c){return a[b]||(a[b]=c())}var d=N("$injector"),c=N("ng");a=b(a,"angular",Object);a.$$minErr=a.$$minErr||N;return b(a,"module",function(){var a={};return function(f,g,h){if("hasOwnProperty"===f)throw c("badname","module");g&&a.hasOwnProperty(f)&&(a[f]=null);return b(a,f,function(){function a(b,d,e,f){f||(f=c);return function(){f[e||"push"]([b,d,arguments]);return R}}function b(a,
|
||||
d){return function(b,e){e&&z(e)&&(e.$$moduleName=f);c.push([a,d,arguments]);return R}}if(!g)throw d("nomod",f);var c=[],e=[],p=[],u=a("$injector","invoke","push",e),R={_invokeQueue:c,_configBlocks:e,_runBlocks:p,requires:g,name:f,provider:b("$provide","provider"),factory:b("$provide","factory"),service:b("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),decorator:b("$provide","decorator"),animation:b("$animateProvider","register"),filter:b("$filterProvider",
|
||||
"register"),controller:b("$controllerProvider","register"),directive:b("$compileProvider","directive"),component:b("$compileProvider","component"),config:u,run:function(a){p.push(a);return this}};h&&u(h);return R})}})}function ia(a,b){if(L(a)){b=b||[];for(var d=0,c=a.length;d<c;d++)b[d]=a[d]}else if(D(a))for(d in b=b||{},a)if("$"!==d.charAt(0)||"$"!==d.charAt(1))b[d]=a[d];return b||a}function le(a){S(a,{bootstrap:Bc,copy:pa,extend:S,merge:Zd,equals:na,element:F,forEach:q,injector:cb,noop:A,bind:ab,
|
||||
toJson:bb,fromJson:xc,identity:Xa,isUndefined:y,isDefined:w,isString:G,isFunction:z,isObject:D,isNumber:T,isElement:Qb,isArray:L,version:me,isDate:da,lowercase:Q,uppercase:ub,callbacks:{$$counter:0},getTestability:he,$$minErr:N,$$csp:Ba,reloadWithDebugInfo:ge});Ub=ke(C);Ub("ng",["ngLocale"],["$provide",function(a){a.provider({$$sanitizeUri:ne});a.provider("$compile",Fc).directive({a:oe,input:Gc,textarea:Gc,form:pe,script:qe,select:re,style:se,option:te,ngBind:ue,ngBindHtml:ve,ngBindTemplate:we,ngClass:xe,
|
||||
ngClassEven:ye,ngClassOdd:ze,ngCloak:Ae,ngController:Be,ngForm:Ce,ngHide:De,ngIf:Ee,ngInclude:Fe,ngInit:Ge,ngNonBindable:He,ngPluralize:Ie,ngRepeat:Je,ngShow:Ke,ngStyle:Le,ngSwitch:Me,ngSwitchWhen:Ne,ngSwitchDefault:Oe,ngOptions:Pe,ngTransclude:Qe,ngModel:Re,ngList:Se,ngChange:Te,pattern:Hc,ngPattern:Hc,required:Ic,ngRequired:Ic,minlength:Jc,ngMinlength:Jc,maxlength:Kc,ngMaxlength:Kc,ngValue:Ue,ngModelOptions:Ve}).directive({ngInclude:We}).directive(vb).directive(Lc);a.provider({$anchorScroll:Xe,
|
||||
$animate:Ye,$animateCss:Ze,$$animateJs:$e,$$animateQueue:af,$$AnimateRunner:bf,$$animateAsyncRun:cf,$browser:df,$cacheFactory:ef,$controller:ff,$document:gf,$exceptionHandler:hf,$filter:Mc,$$forceReflow:jf,$interpolate:kf,$interval:lf,$http:mf,$httpParamSerializer:nf,$httpParamSerializerJQLike:of,$httpBackend:pf,$xhrFactory:qf,$jsonpCallbacks:rf,$location:sf,$log:tf,$parse:uf,$rootScope:vf,$q:wf,$$q:xf,$sce:yf,$sceDelegate:zf,$sniffer:Af,$templateCache:Bf,$templateRequest:Cf,$$testability:Df,$timeout:Ef,
|
||||
$window:Ff,$$rAF:Gf,$$jqLite:Hf,$$HashMap:If,$$cookieReader:Jf})}])}function db(a){return a.replace(Kf,function(a,d,c,e){return e?c.toUpperCase():c}).replace(Lf,"Moz$1")}function Nc(a){a=a.nodeType;return 1===a||!a||9===a}function Oc(a,b){var d,c,e=b.createDocumentFragment(),f=[];if(Vb.test(a)){d=e.appendChild(b.createElement("div"));c=(Mf.exec(a)||["",""])[1].toLowerCase();c=ja[c]||ja._default;d.innerHTML=c[1]+a.replace(Nf,"<$1></$2>")+c[2];for(c=c[0];c--;)d=d.lastChild;f=$a(f,d.childNodes);d=e.firstChild;
|
||||
d.textContent=""}else f.push(b.createTextNode(a));e.textContent="";e.innerHTML="";q(f,function(a){e.appendChild(a)});return e}function Pc(a,b){var d=a.parentNode;d&&d.replaceChild(b,a);b.appendChild(a)}function O(a){if(a instanceof O)return a;var b;G(a)&&(a=W(a),b=!0);if(!(this instanceof O)){if(b&&"<"!=a.charAt(0))throw Wb("nosel");return new O(a)}if(b){b=C.document;var d;a=(d=Of.exec(a))?[b.createElement(d[1])]:(d=Oc(a,b))?d.childNodes:[]}Qc(this,a)}function Xb(a){return a.cloneNode(!0)}function wb(a,
|
||||
b){b||eb(a);if(a.querySelectorAll)for(var d=a.querySelectorAll("*"),c=0,e=d.length;c<e;c++)eb(d[c])}function Rc(a,b,d,c){if(w(c))throw Wb("offargs");var e=(c=xb(a))&&c.events,f=c&&c.handle;if(f)if(b){var g=function(b){var c=e[b];w(d)&&Za(c||[],d);w(d)&&c&&0<c.length||(a.removeEventListener(b,f,!1),delete e[b])};q(b.split(" "),function(a){g(a);yb[a]&&g(yb[a])})}else for(b in e)"$destroy"!==b&&a.removeEventListener(b,f,!1),delete e[b]}function eb(a,b){var d=a.ng339,c=d&&fb[d];c&&(b?delete c.data[b]:
|
||||
(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),Rc(a)),delete fb[d],a.ng339=void 0))}function xb(a,b){var d=a.ng339,d=d&&fb[d];b&&!d&&(a.ng339=d=++Pf,d=fb[d]={events:{},data:{},handle:void 0});return d}function Yb(a,b,d){if(Nc(a)){var c=w(d),e=!c&&b&&!D(b),f=!b;a=(a=xb(a,!e))&&a.data;if(c)a[b]=d;else{if(f)return a;if(e)return a&&a[b];S(a,b)}}}function zb(a,b){return a.getAttribute?-1<(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" "):!1}function Ab(a,b){b&&a.setAttribute&&
|
||||
q(b.split(" "),function(b){a.setAttribute("class",W((" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+W(b)+" "," ")))})}function Bb(a,b){if(b&&a.setAttribute){var d=(" "+(a.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");q(b.split(" "),function(a){a=W(a);-1===d.indexOf(" "+a+" ")&&(d+=a+" ")});a.setAttribute("class",W(d))}}function Qc(a,b){if(b)if(b.nodeType)a[a.length++]=b;else{var d=b.length;if("number"===typeof d&&b.window!==b){if(d)for(var c=0;c<d;c++)a[a.length++]=
|
||||
b[c]}else a[a.length++]=b}}function Sc(a,b){return Cb(a,"$"+(b||"ngController")+"Controller")}function Cb(a,b,d){9==a.nodeType&&(a=a.documentElement);for(b=L(b)?b:[b];a;){for(var c=0,e=b.length;c<e;c++)if(w(d=F.data(a,b[c])))return d;a=a.parentNode||11===a.nodeType&&a.host}}function Tc(a){for(wb(a,!0);a.firstChild;)a.removeChild(a.firstChild)}function Db(a,b){b||wb(a);var d=a.parentNode;d&&d.removeChild(a)}function Qf(a,b){b=b||C;if("complete"===b.document.readyState)b.setTimeout(a);else F(b).on("load",
|
||||
a)}function Uc(a,b){var d=Eb[b.toLowerCase()];return d&&Vc[wa(a)]&&d}function Rf(a,b){var d=function(c,d){c.isDefaultPrevented=function(){return c.defaultPrevented};var f=b[d||c.type],g=f?f.length:0;if(g){if(y(c.immediatePropagationStopped)){var h=c.stopImmediatePropagation;c.stopImmediatePropagation=function(){c.immediatePropagationStopped=!0;c.stopPropagation&&c.stopPropagation();h&&h.call(c)}}c.isImmediatePropagationStopped=function(){return!0===c.immediatePropagationStopped};var k=f.specialHandlerWrapper||
|
||||
Sf;1<g&&(f=ia(f));for(var l=0;l<g;l++)c.isImmediatePropagationStopped()||k(a,c,f[l])}};d.elem=a;return d}function Sf(a,b,d){d.call(a,b)}function Tf(a,b,d){var c=b.relatedTarget;c&&(c===a||Uf.call(a,c))||d.call(a,b)}function Hf(){this.$get=function(){return S(O,{hasClass:function(a,b){a.attr&&(a=a[0]);return zb(a,b)},addClass:function(a,b){a.attr&&(a=a[0]);return Bb(a,b)},removeClass:function(a,b){a.attr&&(a=a[0]);return Ab(a,b)}})}}function Ca(a,b){var d=a&&a.$$hashKey;if(d)return"function"===typeof d&&
|
||||
(d=a.$$hashKey()),d;d=typeof a;return d="function"==d||"object"==d&&null!==a?a.$$hashKey=d+":"+(b||Yd)():d+":"+a}function Ra(a,b){if(b){var d=0;this.nextUid=function(){return++d}}q(a,this.put,this)}function Wc(a){a=(Function.prototype.toString.call(a)+" ").replace(Vf,"");return a.match(Wf)||a.match(Xf)}function Yf(a){return(a=Wc(a))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function cb(a,b){function d(a){return function(b,c){if(D(b))q(b,uc(a));else return a(b,c)}}function c(a,b){Qa(a,
|
||||
"service");if(z(b)||L(b))b=p.instantiate(b);if(!b.$get)throw Ha("pget",a);return n[a+"Provider"]=b}function e(a,b){return function(){var c=B.invoke(b,this);if(y(c))throw Ha("undef",a);return c}}function f(a,b,d){return c(a,{$get:!1!==d?e(a,b):b})}function g(a){sb(y(a)||L(a),"modulesToLoad","not an array");var b=[],c;q(a,function(a){function d(a){var b,c;b=0;for(c=a.length;b<c;b++){var e=a[b],f=p.get(e[0]);f[e[1]].apply(f,e[2])}}if(!m.get(a)){m.put(a,!0);try{G(a)?(c=Ub(a),b=b.concat(g(c.requires)).concat(c._runBlocks),
|
||||
d(c._invokeQueue),d(c._configBlocks)):z(a)?b.push(p.invoke(a)):L(a)?b.push(p.invoke(a)):Pa(a,"module")}catch(e){throw L(a)&&(a=a[a.length-1]),e.message&&e.stack&&-1==e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Ha("modulerr",a,e.stack||e.message||e);}}});return b}function h(a,c){function d(b,e){if(a.hasOwnProperty(b)){if(a[b]===k)throw Ha("cdep",b+" <- "+l.join(" <- "));return a[b]}try{return l.unshift(b),a[b]=k,a[b]=c(b,e)}catch(f){throw a[b]===k&&delete a[b],f;}finally{l.shift()}}function e(a,
|
||||
c,f){var g=[];a=cb.$$annotate(a,b,f);for(var h=0,k=a.length;h<k;h++){var l=a[h];if("string"!==typeof l)throw Ha("itkn",l);g.push(c&&c.hasOwnProperty(l)?c[l]:d(l,f))}return g}return{invoke:function(a,b,c,d){"string"===typeof c&&(d=c,c=null);c=e(a,c,d);L(a)&&(a=a[a.length-1]);d=11>=Ea?!1:"function"===typeof a&&/^(?:class\b|constructor\()/.test(Function.prototype.toString.call(a)+" ");return d?(c.unshift(null),new (Function.prototype.bind.apply(a,c))):a.apply(b,c)},instantiate:function(a,b,c){var d=
|
||||
L(a)?a[a.length-1]:a;a=e(a,b,c);a.unshift(null);return new (Function.prototype.bind.apply(d,a))},get:d,annotate:cb.$$annotate,has:function(b){return n.hasOwnProperty(b+"Provider")||a.hasOwnProperty(b)}}}b=!0===b;var k={},l=[],m=new Ra([],!0),n={$provide:{provider:d(c),factory:d(f),service:d(function(a,b){return f(a,["$injector",function(a){return a.instantiate(b)}])}),value:d(function(a,b){return f(a,ha(b),!1)}),constant:d(function(a,b){Qa(a,"constant");n[a]=b;u[a]=b}),decorator:function(a,b){var c=
|
||||
p.get(a+"Provider"),d=c.$get;c.$get=function(){var a=B.invoke(d,c);return B.invoke(b,null,{$delegate:a})}}}},p=n.$injector=h(n,function(a,b){ca.isString(b)&&l.push(b);throw Ha("unpr",l.join(" <- "));}),u={},R=h(u,function(a,b){var c=p.get(a+"Provider",b);return B.invoke(c.$get,c,void 0,a)}),B=R;n.$injectorProvider={$get:ha(R)};var r=g(a),B=R.get("$injector");B.strictDi=b;q(r,function(a){a&&B.invoke(a)});return B}function Xe(){var a=!0;this.disableAutoScrolling=function(){a=!1};this.$get=["$window",
|
||||
"$location","$rootScope",function(b,d,c){function e(a){var b=null;Array.prototype.some.call(a,function(a){if("a"===wa(a))return b=a,!0});return b}function f(a){if(a){a.scrollIntoView();var c;c=g.yOffset;z(c)?c=c():Qb(c)?(c=c[0],c="fixed"!==b.getComputedStyle(c).position?0:c.getBoundingClientRect().bottom):T(c)||(c=0);c&&(a=a.getBoundingClientRect().top,b.scrollBy(0,a-c))}else b.scrollTo(0,0)}function g(a){a=G(a)?a:d.hash();var b;a?(b=h.getElementById(a))?f(b):(b=e(h.getElementsByName(a)))?f(b):"top"===
|
||||
a&&f(null):f(null)}var h=b.document;a&&c.$watch(function(){return d.hash()},function(a,b){a===b&&""===a||Qf(function(){c.$evalAsync(g)})});return g}]}function gb(a,b){if(!a&&!b)return"";if(!a)return b;if(!b)return a;L(a)&&(a=a.join(" "));L(b)&&(b=b.join(" "));return a+" "+b}function Zf(a){G(a)&&(a=a.split(" "));var b=U();q(a,function(a){a.length&&(b[a]=!0)});return b}function Ia(a){return D(a)?a:{}}function $f(a,b,d,c){function e(a){try{a.apply(null,va.call(arguments,1))}finally{if(R--,0===R)for(;B.length;)try{B.pop()()}catch(b){d.error(b)}}}
|
||||
function f(){t=null;g();h()}function g(){r=K();r=y(r)?null:r;na(r,E)&&(r=E);E=r}function h(){if(v!==k.url()||J!==r)v=k.url(),J=r,q(M,function(a){a(k.url(),r)})}var k=this,l=a.location,m=a.history,n=a.setTimeout,p=a.clearTimeout,u={};k.isMock=!1;var R=0,B=[];k.$$completeOutstandingRequest=e;k.$$incOutstandingRequestCount=function(){R++};k.notifyWhenNoOutstandingRequests=function(a){0===R?a():B.push(a)};var r,J,v=l.href,fa=b.find("base"),t=null,K=c.history?function(){try{return m.state}catch(a){}}:
|
||||
A;g();J=r;k.url=function(b,d,e){y(e)&&(e=null);l!==a.location&&(l=a.location);m!==a.history&&(m=a.history);if(b){var f=J===e;if(v===b&&(!c.history||f))return k;var h=v&&Ja(v)===Ja(b);v=b;J=e;!c.history||h&&f?(h||(t=b),d?l.replace(b):h?(d=l,e=b.indexOf("#"),e=-1===e?"":b.substr(e),d.hash=e):l.href=b,l.href!==b&&(t=b)):(m[d?"replaceState":"pushState"](e,"",b),g(),J=r);t&&(t=b);return k}return t||l.href.replace(/%27/g,"'")};k.state=function(){return r};var M=[],H=!1,E=null;k.onUrlChange=function(b){if(!H){if(c.history)F(a).on("popstate",
|
||||
f);F(a).on("hashchange",f);H=!0}M.push(b);return b};k.$$applicationDestroyed=function(){F(a).off("hashchange popstate",f)};k.$$checkUrlChange=h;k.baseHref=function(){var a=fa.attr("href");return a?a.replace(/^(https?\:)?\/\/[^\/]*/,""):""};k.defer=function(a,b){var c;R++;c=n(function(){delete u[c];e(a)},b||0);u[c]=!0;return c};k.defer.cancel=function(a){return u[a]?(delete u[a],p(a),e(A),!0):!1}}function df(){this.$get=["$window","$log","$sniffer","$document",function(a,b,d,c){return new $f(a,c,b,
|
||||
d)}]}function ef(){this.$get=function(){function a(a,c){function e(a){a!=n&&(p?p==a&&(p=a.n):p=a,f(a.n,a.p),f(a,n),n=a,n.n=null)}function f(a,b){a!=b&&(a&&(a.p=b),b&&(b.n=a))}if(a in b)throw N("$cacheFactory")("iid",a);var g=0,h=S({},c,{id:a}),k=U(),l=c&&c.capacity||Number.MAX_VALUE,m=U(),n=null,p=null;return b[a]={put:function(a,b){if(!y(b)){if(l<Number.MAX_VALUE){var c=m[a]||(m[a]={key:a});e(c)}a in k||g++;k[a]=b;g>l&&this.remove(p.key);return b}},get:function(a){if(l<Number.MAX_VALUE){var b=m[a];
|
||||
if(!b)return;e(b)}return k[a]},remove:function(a){if(l<Number.MAX_VALUE){var b=m[a];if(!b)return;b==n&&(n=b.p);b==p&&(p=b.n);f(b.n,b.p);delete m[a]}a in k&&(delete k[a],g--)},removeAll:function(){k=U();g=0;m=U();n=p=null},destroy:function(){m=h=k=null;delete b[a]},info:function(){return S({},h,{size:g})}}}var b={};a.info=function(){var a={};q(b,function(b,e){a[e]=b.info()});return a};a.get=function(a){return b[a]};return a}}function Bf(){this.$get=["$cacheFactory",function(a){return a("templates")}]}
|
||||
function Fc(a,b){function d(a,b,c){var d=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,e=U();q(a,function(a,f){if(a in n)e[f]=n[a];else{var g=a.match(d);if(!g)throw ga("iscp",b,f,a,c?"controller bindings definition":"isolate scope definition");e[f]={mode:g[1][0],collection:"*"===g[2],optional:"?"===g[3],attrName:g[4]||f};g[4]&&(n[a]=e[f])}});return e}function c(a){var b=a.charAt(0);if(!b||b!==Q(b))throw ga("baddir",a);if(a!==a.trim())throw ga("baddir",a);}function e(a){var b=a.require||a.controller&&a.name;
|
||||
!L(b)&&D(b)&&q(b,function(a,c){var d=a.match(l);a.substring(d[0].length)||(b[c]=d[0]+c)});return b}var f={},g=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,h=/(([\w\-]+)(?:\:([^;]+))?;?)/,k=be("ngSrc,ngSrcset,src,srcset"),l=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,m=/^(on[a-z]+|formaction)$/,n=U();this.directive=function B(b,d){Qa(b,"directive");G(b)?(c(b),sb(d,"directiveFactory"),f.hasOwnProperty(b)||(f[b]=[],a.factory(b+"Directive",["$injector","$exceptionHandler",function(a,c){var d=[];q(f[b],function(f,g){try{var h=
|
||||
a.invoke(f);z(h)?h={compile:ha(h)}:!h.compile&&h.link&&(h.compile=ha(h.link));h.priority=h.priority||0;h.index=g;h.name=h.name||b;h.require=e(h);h.restrict=h.restrict||"EA";h.$$moduleName=f.$$moduleName;d.push(h)}catch(k){c(k)}});return d}])),f[b].push(d)):q(b,uc(B));return this};this.component=function(a,b){function c(a){function e(b){return z(b)||L(b)?function(c,d){return a.invoke(b,this,{$element:c,$attrs:d})}:b}var f=b.template||b.templateUrl?b.template:"",g={controller:d,controllerAs:Xc(b.controller)||
|
||||
b.controllerAs||"$ctrl",template:e(f),templateUrl:e(b.templateUrl),transclude:b.transclude,scope:{},bindToController:b.bindings||{},restrict:"E",require:b.require};q(b,function(a,b){"$"===b.charAt(0)&&(g[b]=a)});return g}var d=b.controller||function(){};q(b,function(a,b){"$"===b.charAt(0)&&(c[b]=a,z(d)&&(d[b]=a))});c.$inject=["$injector"];return this.directive(a,c)};this.aHrefSanitizationWhitelist=function(a){return w(a)?(b.aHrefSanitizationWhitelist(a),this):b.aHrefSanitizationWhitelist()};this.imgSrcSanitizationWhitelist=
|
||||
function(a){return w(a)?(b.imgSrcSanitizationWhitelist(a),this):b.imgSrcSanitizationWhitelist()};var p=!0;this.debugInfoEnabled=function(a){return w(a)?(p=a,this):p};var u=10;this.onChangesTtl=function(a){return arguments.length?(u=a,this):u};this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(a,b,c,e,n,t,K,M,H,E){function I(){try{if(!--qa)throw Y=void 0,ga("infchng",u);K.$apply(function(){for(var a=
|
||||
[],b=0,c=Y.length;b<c;++b)try{Y[b]()}catch(d){a.push(d)}Y=void 0;if(a.length)throw a;})}finally{qa++}}function Da(a,b){if(b){var c=Object.keys(b),d,e,f;d=0;for(e=c.length;d<e;d++)f=c[d],this[f]=b[f]}else this.$attr={};this.$$element=a}function P(a,b,c){pa.innerHTML="<span "+b+">";b=pa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function x(a,b){try{a.addClass(b)}catch(c){}}function aa(a,b,c,d,e){a instanceof F||(a=F(a));for(var f=/\S+/,g=0,h=a.length;g<
|
||||
h;g++){var k=a[g];k.nodeType===Ma&&k.nodeValue.match(f)&&Pc(k,a[g]=C.document.createElement("span"))}var l=s(a,b,a,c,d,e);aa.$$addScopeClass(a);var m=null;return function(b,c,d){sb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var f=d.parentBoundTranscludeFn,g=d.transcludeControllers;d=d.futureParentElement;f&&f.$$boundTransclude&&(f=f.$$boundTransclude);m||(m=(d=d&&d[0])?"foreignobject"!==wa(d)&&ma.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==m?F(da(m,F("<div>").append(a).html())):
|
||||
c?Oa.clone.call(a):a;if(g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);aa.$$addScopeInfo(d,b);c&&c(d,b);l&&l(b,d,d,f);return d}}function s(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,r,v;if(n)for(v=Array(c.length),m=0;m<h.length;m+=3)f=h[m],v[f]=c[f];else v=c;m=0;for(p=h.length;m<p;)k=v[h[m++]],c=h[m++],f=h[m++],c?(c.scope?(l=a.$new(),aa.$$addScopeInfo(F(k),l)):l=a,r=c.transcludeOnThisElement?za(a,c.transclude,e):!c.templateOnThisElement&&e?e:!e&&b?za(a,b):null,c(f,l,k,d,r)):f&&f(a,
|
||||
k.childNodes,void 0,e)}for(var h=[],k,l,m,p,n,r=0;r<a.length;r++){k=new Da;l=$b(a[r],[],k,0===r?d:void 0,e);(f=l.length?oa(l,a[r],k,b,c,null,[],[],f):null)&&f.scope&&aa.$$addScopeClass(k.$$element);k=f&&f.terminal||!(m=a[r].childNodes)||!m.length?null:s(m,f?(f.transcludeOnThisElement||!f.templateOnThisElement)&&f.transclude:b);if(f||k)h.push(r,f,k),p=!0,n=n||f;f=null}return p?g:null}function za(a,b,c){function d(e,f,g,h,k){e||(e=a.$new(!1,k),e.$$transcluded=!0);return b(e,f,{parentBoundTranscludeFn:c,
|
||||
transcludeControllers:g,futureParentElement:h})}var e=d.$$slots=U(),f;for(f in b.$$slots)e[f]=b.$$slots[f]?za(a,b.$$slots[f],c):null;return d}function $b(a,b,c,d,e){var f=c.$attr;switch(a.nodeType){case 1:O(b,Aa(wa(a)),"E",d,e);for(var g,k,l,m,p=a.attributes,n=0,r=p&&p.length;n<r;n++){var v=!1,u=!1;g=p[n];k=g.name;l=W(g.value);g=Aa(k);if(m=Ba.test(g))k=k.replace(Yc,"").substr(8).replace(/_(.)/g,function(a,b){return b.toUpperCase()});(g=g.match(Ca))&&V(g[1])&&(v=k,u=k.substr(0,k.length-5)+"end",k=
|
||||
k.substr(0,k.length-6));g=Aa(k.toLowerCase());f[g]=k;if(m||!c.hasOwnProperty(g))c[g]=l,Uc(a,g)&&(c[g]=!0);ia(a,b,l,g,m);O(b,g,"A",d,e,v,u)}f=a.className;D(f)&&(f=f.animVal);if(G(f)&&""!==f)for(;a=h.exec(f);)g=Aa(a[2]),O(b,g,"C",d,e)&&(c[g]=W(a[3])),f=f.substr(a.index+a[0].length);break;case Ma:if(11===Ea)for(;a.parentNode&&a.nextSibling&&a.nextSibling.nodeType===Ma;)a.nodeValue+=a.nextSibling.nodeValue,a.parentNode.removeChild(a.nextSibling);ca(b,a.nodeValue);break;case 8:hb(a,b,c,d,e)}b.sort(Z);
|
||||
return b}function hb(a,b,c,d,e){try{var f=g.exec(a.nodeValue);if(f){var h=Aa(f[1]);O(b,h,"M",d,e)&&(c[h]=W(f[2]))}}catch(k){}}function N(a,b,c){var d=[],e=0;if(b&&a.hasAttribute&&a.hasAttribute(b)){do{if(!a)throw ga("uterdir",b,c);1==a.nodeType&&(a.hasAttribute(b)&&e++,a.hasAttribute(c)&&e--);d.push(a);a=a.nextSibling}while(0<e)}else d.push(a);return F(d)}function Zc(a,b,c){return function(d,e,f,g,h){e=N(e[0],b,c);return a(d,e,f,g,h)}}function ac(a,b,c,d,e,f){var g;return a?aa(b,c,d,e,f):function(){g||
|
||||
(g=aa(b,c,d,e,f),b=c=f=null);return g.apply(this,arguments)}}function oa(a,b,d,e,f,g,h,k,l){function m(a,b,c,d){if(a){c&&(a=Zc(a,c,d));a.require=x.require;a.directiveName=I;if(u===x||x.$$isolateScope)a=ja(a,{isolateScope:!0});h.push(a)}if(b){c&&(b=Zc(b,c,d));b.require=x.require;b.directiveName=I;if(u===x||x.$$isolateScope)b=ja(b,{isolateScope:!0});k.push(b)}}function p(a,e,f,g,l){function m(a,b,c,d){var e;Ya(a)||(d=c,c=b,b=a,a=void 0);fa&&(e=t);c||(c=fa?I.parent():I);if(d){var f=l.$$slots[d];if(f)return f(a,
|
||||
b,e,c,s);if(y(f))throw ga("noslot",d,ya(I));}else return l(a,b,e,c,s)}var n,E,x,M,B,t,P,I;b===f?(g=d,I=d.$$element):(I=F(f),g=new Da(I,d));B=e;u?M=e.$new(!0):r&&(B=e.$parent);l&&(P=m,P.$$boundTransclude=l,P.isSlotFilled=function(a){return!!l.$$slots[a]});v&&(t=ag(I,g,P,v,M,e,u));u&&(aa.$$addScopeInfo(I,M,!0,!(H&&(H===u||H===u.$$originalDirective))),aa.$$addScopeClass(I,!0),M.$$isolateBindings=u.$$isolateBindings,E=ka(e,g,M,M.$$isolateBindings,u),E.removeWatches&&M.$on("$destroy",E.removeWatches));
|
||||
for(n in t){E=v[n];x=t[n];var Zb=E.$$bindings.bindToController;x.bindingInfo=x.identifier&&Zb?ka(B,g,x.instance,Zb,E):{};var K=x();K!==x.instance&&(x.instance=K,I.data("$"+E.name+"Controller",K),x.bindingInfo.removeWatches&&x.bindingInfo.removeWatches(),x.bindingInfo=ka(B,g,x.instance,Zb,E))}q(v,function(a,b){var c=a.require;a.bindToController&&!L(c)&&D(c)&&S(t[b].instance,ib(b,c,I,t))});q(t,function(a){var b=a.instance;if(z(b.$onChanges))try{b.$onChanges(a.bindingInfo.initialChanges)}catch(d){c(d)}if(z(b.$onInit))try{b.$onInit()}catch(e){c(e)}z(b.$doCheck)&&
|
||||
(B.$watch(function(){b.$doCheck()}),b.$doCheck());z(b.$onDestroy)&&B.$on("$destroy",function(){b.$onDestroy()})});n=0;for(E=h.length;n<E;n++)x=h[n],la(x,x.isolateScope?M:e,I,g,x.require&&ib(x.directiveName,x.require,I,t),P);var s=e;u&&(u.template||null===u.templateUrl)&&(s=M);a&&a(s,f.childNodes,void 0,l);for(n=k.length-1;0<=n;n--)x=k[n],la(x,x.isolateScope?M:e,I,g,x.require&&ib(x.directiveName,x.require,I,t),P);q(t,function(a){a=a.instance;z(a.$postLink)&&a.$postLink()})}l=l||{};for(var n=-Number.MAX_VALUE,
|
||||
r=l.newScopeDirective,v=l.controllerDirectives,u=l.newIsolateScopeDirective,H=l.templateDirective,E=l.nonTlbTranscludeDirective,M=!1,B=!1,fa=l.hasElementTranscludeDirective,t=d.$$element=F(b),x,I,P,K=e,s,Fa=!1,za=!1,w,A=0,C=a.length;A<C;A++){x=a[A];var G=x.$$start,hb=x.$$end;G&&(t=N(b,G,hb));P=void 0;if(n>x.priority)break;if(w=x.scope)x.templateUrl||(D(w)?(X("new/isolated scope",u||r,x,t),u=x):X("new/isolated scope",u,x,t)),r=r||x;I=x.name;if(!Fa&&(x.replace&&(x.templateUrl||x.template)||x.transclude&&
|
||||
!x.$$tlb)){for(w=A+1;Fa=a[w++];)if(Fa.transclude&&!Fa.$$tlb||Fa.replace&&(Fa.templateUrl||Fa.template)){za=!0;break}Fa=!0}!x.templateUrl&&x.controller&&(w=x.controller,v=v||U(),X("'"+I+"' controller",v[I],x,t),v[I]=x);if(w=x.transclude)if(M=!0,x.$$tlb||(X("transclusion",E,x,t),E=x),"element"==w)fa=!0,n=x.priority,P=t,t=d.$$element=F(aa.$$createComment(I,d[I])),b=t[0],ea(f,va.call(P,0),b),P[0].$$parentNode=P[0].parentNode,K=ac(za,P,e,n,g&&g.name,{nonTlbTranscludeDirective:E});else{var oa=U();P=F(Xb(b)).contents();
|
||||
if(D(w)){P=[];var Q=U(),O=U();q(w,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Q[a]=b;oa[b]=null;O[b]=c});q(t.contents(),function(a){var b=Q[Aa(wa(a))];b?(O[b]=!0,oa[b]=oa[b]||[],oa[b].push(a)):P.push(a)});q(O,function(a,b){if(!a)throw ga("reqslot",b);});for(var V in oa)oa[V]&&(oa[V]=ac(za,oa[V],e))}t.empty();K=ac(za,P,e,void 0,void 0,{needsNewScope:x.$$isolateScope||x.$$newScope});K.$$slots=oa}if(x.template)if(B=!0,X("template",H,x,t),H=x,w=z(x.template)?x.template(t,d):x.template,
|
||||
w=xa(w),x.replace){g=x;P=Vb.test(w)?$c(da(x.templateNamespace,W(w))):[];b=P[0];if(1!=P.length||1!==b.nodeType)throw ga("tplrt",I,"");ea(f,t,b);C={$attr:{}};w=$b(b,[],C);var Z=a.splice(A+1,a.length-(A+1));(u||r)&&T(w,u,r);a=a.concat(w).concat(Z);$(d,C);C=a.length}else t.html(w);if(x.templateUrl)B=!0,X("template",H,x,t),H=x,x.replace&&(g=x),p=ba(a.splice(A,a.length-A),t,d,f,M&&K,h,k,{controllerDirectives:v,newScopeDirective:r!==x&&r,newIsolateScopeDirective:u,templateDirective:H,nonTlbTranscludeDirective:E}),
|
||||
C=a.length;else if(x.compile)try{s=x.compile(t,d,K);var Y=x.$$originalDirective||x;z(s)?m(null,ab(Y,s),G,hb):s&&m(ab(Y,s.pre),ab(Y,s.post),G,hb)}catch(ca){c(ca,ya(t))}x.terminal&&(p.terminal=!0,n=Math.max(n,x.priority))}p.scope=r&&!0===r.scope;p.transcludeOnThisElement=M;p.templateOnThisElement=B;p.transclude=K;l.hasElementTranscludeDirective=fa;return p}function ib(a,b,c,d){var e;if(G(b)){var f=b.match(l);b=b.substring(f[0].length);var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&
|
||||
e.instance;if(!e){var h="$"+b+"Controller";e=g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw ga("ctreq",b,a);}else if(L(b))for(e=[],g=0,f=b.length;g<f;g++)e[g]=ib(a,b[g],c,d);else D(b)&&(e={},q(b,function(b,f){e[f]=ib(a,b,c,d)}));return e||null}function ag(a,b,c,d,e,f,g){var h=U(),k;for(k in d){var l=d[k],m={$scope:l===g||l.$$isolateScope?e:f,$element:a,$attrs:b,$transclude:c},p=l.controller;"@"==p&&(p=b[l.name]);m=t(p,m,!0,l.controllerAs);h[l.name]=m;a.data("$"+l.name+"Controller",m.instance)}return h}
|
||||
function T(a,b,c){for(var d=0,e=a.length;d<e;d++)a[d]=Rb(a[d],{$$isolateScope:b,$$newScope:c})}function O(b,e,g,h,k,l,m){if(e===k)return null;k=null;if(f.hasOwnProperty(e)){var p;e=a.get(e+"Directive");for(var n=0,r=e.length;n<r;n++)try{if(p=e[n],(y(h)||h>p.priority)&&-1!=p.restrict.indexOf(g)){l&&(p=Rb(p,{$$start:l,$$end:m}));if(!p.$$bindings){var u=p,v=p,x=p.name,H={isolateScope:null,bindToController:null};D(v.scope)&&(!0===v.bindToController?(H.bindToController=d(v.scope,x,!0),H.isolateScope={}):
|
||||
H.isolateScope=d(v.scope,x,!1));D(v.bindToController)&&(H.bindToController=d(v.bindToController,x,!0));if(D(H.bindToController)){var E=v.controller,M=v.controllerAs;if(!E)throw ga("noctrl",x);if(!Xc(E,M))throw ga("noident",x);}var t=u.$$bindings=H;D(t.isolateScope)&&(p.$$isolateBindings=t.isolateScope)}b.push(p);k=p}}catch(I){c(I)}}return k}function V(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d<e;d++)if(b=c[d],b.multiElement)return!0;return!1}function $(a,b){var c=b.$attr,
|
||||
d=a.$attr;q(a,function(d,e){"$"!=e.charAt(0)&&(b[e]&&b[e]!==d&&(d+=("style"===e?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});q(b,function(b,e){a.hasOwnProperty(e)||"$"===e.charAt(0)||(a[e]=b,"class"!==e&&"style"!==e&&(d[e]=c[e]))})}function ba(a,b,c,d,f,g,h,k){var l=[],m,p,n=b[0],r=a.shift(),u=Rb(r,{templateUrl:null,transclude:null,replace:null,$$originalDirective:r}),H=z(r.templateUrl)?r.templateUrl(b,c):r.templateUrl,E=r.templateNamespace;b.empty();e(H).then(function(e){var v,M;e=xa(e);if(r.replace){e=
|
||||
Vb.test(e)?$c(da(E,W(e))):[];v=e[0];if(1!=e.length||1!==v.nodeType)throw ga("tplrt",r.name,H);e={$attr:{}};ea(d,b,v);var B=$b(v,[],e);D(r.scope)&&T(B,!0);a=B.concat(a);$(c,e)}else v=n,b.html(e);a.unshift(u);m=oa(a,v,c,f,b,r,g,h,k);q(d,function(a,c){a==v&&(d[c]=b[0])});for(p=s(b[0].childNodes,f);l.length;){e=l.shift();M=l.shift();var t=l.shift(),I=l.shift(),B=b[0];if(!e.$$destroyed){if(M!==n){var P=M.className;k.hasElementTranscludeDirective&&r.replace||(B=Xb(v));ea(t,F(M),B);x(F(B),P)}M=m.transcludeOnThisElement?
|
||||
za(e,m.transclude,I):I;m(p,e,B,d,M)}}l=null});return function(a,b,c,d,e){a=e;b.$$destroyed||(l?l.push(b,c,d,a):(m.transcludeOnThisElement&&(a=za(b,m.transclude,e)),m(p,b,c,d,a)))}}function Z(a,b){var c=b.priority-a.priority;return 0!==c?c:a.name!==b.name?a.name<b.name?-1:1:a.index-b.index}function X(a,b,c,d){function e(a){return a?" (module: "+a+")":""}if(b)throw ga("multidir",b.name,e(b.$$moduleName),c.name,e(c.$$moduleName),a,ya(d));}function ca(a,c){var d=b(c,!0);d&&a.push({priority:0,compile:function(a){a=
|
||||
a.parent();var b=!!a.length;b&&aa.$$addBindingClass(a);return function(a,c){var e=c.parent();b||aa.$$addBindingClass(e);aa.$$addBindingInfo(e,d.expressions);a.$watch(d,function(a){c[0].nodeValue=a})}}})}function da(a,b){a=Q(a||"html");switch(a){case "svg":case "math":var c=C.document.createElement("div");c.innerHTML="<"+a+">"+b+"</"+a+">";return c.childNodes[0].childNodes;default:return b}}function ha(a,b){if("srcdoc"==b)return M.HTML;var c=wa(a);if("xlinkHref"==b||"form"==c&&"action"==b||"img"!=
|
||||
c&&("src"==b||"ngSrc"==b))return M.RESOURCE_URL}function ia(a,c,d,e,f){var g=ha(a,e);f=k[e]||f;var h=b(d,!0,g,f);if(h){if("multiple"===e&&"select"===wa(a))throw ga("selmulti",ya(a));c.push({priority:100,compile:function(){return{pre:function(a,c,k){c=k.$$observers||(k.$$observers=U());if(m.test(e))throw ga("nodomevents");var l=k[e];l!==d&&(h=l&&b(l,!0,g,f),d=l);h&&(k[e]=h(a),(c[e]||(c[e]=[])).$$inter=!0,(k.$$observers&&k.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?k.$updateClass(a,
|
||||
b):k.$set(e,a)}))}}}})}}function ea(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g<h;g++)if(a[g]==d){a[g++]=c;h=g+e-1;for(var k=a.length;g<k;g++,h++)h<k?a[g]=a[h]:delete a[g];a.length-=e-1;a.context===d&&(a.context=c);break}f&&f.replaceChild(c,d);a=C.document.createDocumentFragment();for(g=0;g<e;g++)a.appendChild(b[g]);F.hasData(d)&&(F.data(c,F.data(d)),F(d).off("$destroy"));F.cleanData(a.querySelectorAll("*"));for(g=1;g<e;g++)delete b[g];b[0]=c;b.length=1}function ja(a,
|
||||
b){return S(function(){return a.apply(null,arguments)},a,b)}function la(a,b,d,e,f,g){try{a(b,d,e,f,g)}catch(h){c(h,ya(d))}}function ka(a,c,d,e,f){function g(b,c,e){z(d.$onChanges)&&c!==e&&(Y||(a.$$postDigest(I),Y=[]),m||(m={},Y.push(h)),m[b]&&(e=m[b].previousValue),m[b]=new Fb(e,c))}function h(){d.$onChanges(m);m=void 0}var k=[],l={},m;q(e,function(e,h){var m=e.attrName,p=e.optional,v,u,x,H;switch(e.mode){case "@":p||ua.call(c,m)||(d[h]=c[m]=void 0);c.$observe(m,function(a){if(G(a)||Ga(a))g(h,a,d[h]),
|
||||
d[h]=a});c.$$observers[m].$$scope=a;v=c[m];G(v)?d[h]=b(v)(a):Ga(v)&&(d[h]=v);l[h]=new Fb(bc,d[h]);break;case "=":if(!ua.call(c,m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;u=n(c[m]);H=u.literal?na:function(a,b){return a===b||a!==a&&b!==b};x=u.assign||function(){v=d[h]=u(a);throw ga("nonassign",c[m],m,f.name);};v=d[h]=u(a);p=function(b){H(b,d[h])||(H(b,v)?x(a,b=d[h]):d[h]=b);return v=b};p.$stateful=!0;p=e.collection?a.$watchCollection(c[m],p):a.$watch(n(c[m],p),null,u.literal);k.push(p);break;case "<":if(!ua.call(c,
|
||||
m)){if(p)break;c[m]=void 0}if(p&&!c[m])break;u=n(c[m]);var E=d[h]=u(a);l[h]=new Fb(bc,d[h]);p=a.$watch(u,function(a,b){if(b===a){if(b===E)return;b=E}g(h,a,b);d[h]=a},u.literal);k.push(p);break;case "&":u=c.hasOwnProperty(m)?n(c[m]):A;if(u===A&&p)break;d[h]=function(b){return u(a,b)}}});return{initialChanges:l,removeWatches:k.length&&function(){for(var a=0,b=k.length;a<b;++a)k[a]()}}}var ta=/^\w/,pa=C.document.createElement("div"),qa=u,Y;Da.prototype={$normalize:Aa,$addClass:function(a){a&&0<a.length&&
|
||||
H.addClass(this.$$element,a)},$removeClass:function(a){a&&0<a.length&&H.removeClass(this.$$element,a)},$updateClass:function(a,b){var c=ad(a,b);c&&c.length&&H.addClass(this.$$element,c);(c=ad(b,a))&&c.length&&H.removeClass(this.$$element,c)},$set:function(a,b,d,e){var f=Uc(this.$$element[0],a),g=bd[a],h=a;f?(this.$$element.prop(a,b),e=f):g&&(this[g]=b,h=g);this[a]=b;e?this.$attr[a]=e:(e=this.$attr[a])||(this.$attr[a]=e=Cc(a,"-"));f=wa(this.$$element);if("a"===f&&("href"===a||"xlinkHref"===a)||"img"===
|
||||
f&&"src"===a)this[a]=b=E(b,"src"===a);else if("img"===f&&"srcset"===a&&w(b)){for(var f="",g=W(b),k=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,k=/\s/.test(g)?k:/(,)/,g=g.split(k),k=Math.floor(g.length/2),l=0;l<k;l++)var m=2*l,f=f+E(W(g[m]),!0),f=f+(" "+W(g[m+1]));g=W(g[2*l]).split(/\s/);f+=E(W(g[0]),!0);2===g.length&&(f+=" "+W(g[1]));this[a]=b=f}!1!==d&&(null===b||y(b)?this.$$element.removeAttr(e):ta.test(e)?this.$$element.attr(e,b):P(this.$$element[0],e,b));(a=this.$$observers)&&q(a[h],function(a){try{a(b)}catch(d){c(d)}})},
|
||||
$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers=U()),e=d[a]||(d[a]=[]);e.push(b);K.$evalAsync(function(){e.$$inter||!c.hasOwnProperty(a)||y(c[a])||b(c[a])});return function(){Za(e,b)}}};var ra=b.startSymbol(),sa=b.endSymbol(),xa="{{"==ra&&"}}"==sa?Xa:function(a){return a.replace(/\{\{/g,ra).replace(/}}/g,sa)},Ba=/^ngAttr[A-Z]/,Ca=/^(.+)Start$/;aa.$$addBindingInfo=p?function(a,b){var c=a.data("$binding")||[];L(b)?c=c.concat(b):c.push(b);a.data("$binding",c)}:A;aa.$$addBindingClass=
|
||||
p?function(a){x(a,"ng-binding")}:A;aa.$$addScopeInfo=p?function(a,b,c,d){a.data(c?d?"$isolateScopeNoTemplate":"$isolateScope":"$scope",b)}:A;aa.$$addScopeClass=p?function(a,b){x(a,b?"ng-isolate-scope":"ng-scope")}:A;aa.$$createComment=function(a,b){var c="";p&&(c=" "+(a||"")+": ",b&&(c+=b+" "));return C.document.createComment(c)};return aa}]}function Fb(a,b){this.previousValue=a;this.currentValue=b}function Aa(a){return db(a.replace(Yc,""))}function ad(a,b){var d="",c=a.split(/\s+/),e=b.split(/\s+/),
|
||||
f=0;a:for(;f<c.length;f++){for(var g=c[f],h=0;h<e.length;h++)if(g==e[h])continue a;d+=(0<d.length?" ":"")+g}return d}function $c(a){a=F(a);var b=a.length;if(1>=b)return a;for(;b--;)8===a[b].nodeType&&bg.call(a,b,1);return a}function Xc(a,b){if(b&&G(b))return b;if(G(a)){var d=cd.exec(a);if(d)return d[3]}}function ff(){var a={},b=!1;this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,c){Qa(b,"controller");D(b)?S(a,b):a[b]=c};this.allowGlobals=function(){b=!0};this.$get=["$injector",
|
||||
"$window",function(d,c){function e(a,b,c,d){if(!a||!D(a.$scope))throw N("$controller")("noscp",d,b);a.$scope[b]=c}return function(f,g,h,k){var l,m,n;h=!0===h;k&&G(k)&&(n=k);if(G(f)){k=f.match(cd);if(!k)throw cg("ctrlfmt",f);m=k[1];n=n||k[3];f=a.hasOwnProperty(m)?a[m]:Ec(g.$scope,m,!0)||(b?Ec(c,m,!0):void 0);Pa(f,m,!0)}if(h)return h=(L(f)?f[f.length-1]:f).prototype,l=Object.create(h||null),n&&e(g,n,l,m||f.name),S(function(){var a=d.invoke(f,l,g,m);a!==l&&(D(a)||z(a))&&(l=a,n&&e(g,n,l,m||f.name));return l},
|
||||
{instance:l,identifier:n});l=d.instantiate(f,g,m);n&&e(g,n,l,m||f.name);return l}}]}function gf(){this.$get=["$window",function(a){return F(a.document)}]}function hf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function cc(a){return D(a)?da(a)?a.toISOString():bb(a):a}function nf(){this.$get=function(){return function(a){if(!a)return"";var b=[];tc(a,function(a,c){null===a||y(a)||(L(a)?q(a,function(a){b.push(ea(c)+"="+ea(cc(a)))}):b.push(ea(c)+"="+ea(cc(a))))});
|
||||
return b.join("&")}}}function of(){this.$get=function(){return function(a){function b(a,e,f){null===a||y(a)||(L(a)?q(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!da(a)?tc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):d.push(ea(e)+"="+ea(cc(a))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function dc(a,b){if(G(a)){var d=a.replace(dg,"").trim();if(d){var c=b("Content-Type");(c=c&&0===c.indexOf(dd))||(c=(c=d.match(eg))&&fg[c[0]].test(d));c&&(a=xc(d))}}return a}function ed(a){var b=
|
||||
U(),d;G(a)?q(a.split("\n"),function(a){d=a.indexOf(":");var e=Q(W(a.substr(0,d)));a=W(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&q(a,function(a,d){var f=Q(d),g=W(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function fd(a){var b;return function(d){b||(b=ed(a));return d?(d=b[Q(d)],void 0===d&&(d=null),d):b}}function gd(a,b,d,c){if(z(c))return c(a,b,d);q(c,function(c){a=c(a,b,d)});return a}function mf(){var a=this.defaults={transformResponse:[dc],transformRequest:[function(a){return D(a)&&"[object File]"!==
|
||||
ma.call(a)&&"[object Blob]"!==ma.call(a)&&"[object FormData]"!==ma.call(a)?bb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ia(ec),put:ia(ec),patch:ia(ec)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=!0;this.useLegacyPromiseExtensions=function(a){return w(a)?(d=!!a,this):d};var c=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory",
|
||||
"$rootScope","$q","$injector",function(e,f,g,h,k,l){function m(b){function c(a,b){for(var d=0,e=b.length;d<e;){var f=b[d++],g=b[d++];a=a.then(f,g)}b.length=0;return a}function e(a,b){var c,d={};q(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a});return d}function f(a){var b=S({},a);b.data=gd(a.data,a.headers,a.status,g.transformResponse);a=a.status;return 200<=a&&300>a?b:k.reject(b)}if(!D(b))throw N("$http")("badreq",b);if(!G(b.url))throw N("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,
|
||||
transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);g.headers=function(b){var c=a.headers,d=S({},b.headers),f,g,h,c=S({},c.common,c[Q(b.method)]);a:for(f in c){g=Q(f);for(h in d)if(Q(h)===g)continue a;d[f]=c[f]}return e(d,ia(b))}(b);g.method=ub(g.method);g.paramSerializer=G(g.paramSerializer)?l.get(g.paramSerializer):g.paramSerializer;var h=[],m=[],p=k.when(g);q(R,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&m.push(a.response,
|
||||
a.responseError)});p=c(p,h);p=p.then(function(b){var c=b.headers,d=gd(b.data,fd(c),void 0,b.transformRequest);y(d)&&q(c,function(a,b){"content-type"===Q(b)&&delete c[b]});y(b.withCredentials)&&!y(a.withCredentials)&&(b.withCredentials=a.withCredentials);return n(b,d).then(f,f)});p=c(p,m);d?(p.success=function(a){Pa(a,"fn");p.then(function(b){a(b.data,b.status,b.headers,g)});return p},p.error=function(a){Pa(a,"fn");p.then(null,function(b){a(b.data,b.status,b.headers,g)});return p}):(p.success=hd("success"),
|
||||
p.error=hd("error"));return p}function n(c,d){function g(a){if(a){var c={};q(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function l(a,c,d,e){function f(){n(c,a,d,e)}E&&(200<=a&&300>a?E.put(P,[a,c,ed(d),e]):E.remove(P));b?h.$applyAsync(f):(f(),h.$$phase||h.$apply())}function n(a,b,d,e){b=-1<=b?b:0;(200<=b&&300>b?M.resolve:M.reject)({data:a,status:b,headers:fd(d),config:c,statusText:e})}function t(a){n(a.data,a.status,ia(a.headers()),
|
||||
a.statusText)}function R(){var a=m.pendingRequests.indexOf(c);-1!==a&&m.pendingRequests.splice(a,1)}var M=k.defer(),H=M.promise,E,I,Da=c.headers,P=p(c.url,c.paramSerializer(c.params));m.pendingRequests.push(c);H.then(R,R);!c.cache&&!a.cache||!1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(E=D(c.cache)?c.cache:D(a.cache)?a.cache:u);E&&(I=E.get(P),w(I)?I&&z(I.then)?I.then(t,t):L(I)?n(I[1],I[0],ia(I[2]),I[3]):n(I,200,{},"OK"):E.put(P,H));y(I)&&((I=id(c.url)?f()[c.xsrfCookieName||a.xsrfCookieName]:
|
||||
void 0)&&(Da[c.xsrfHeaderName||a.xsrfHeaderName]=I),e(c.method,P,d,l,Da,c.timeout,c.withCredentials,c.responseType,g(c.eventHandlers),g(c.uploadEventHandlers)));return H}function p(a,b){0<b.length&&(a+=(-1==a.indexOf("?")?"?":"&")+b);return a}var u=g("$http");a.paramSerializer=G(a.paramSerializer)?l.get(a.paramSerializer):a.paramSerializer;var R=[];q(c,function(a){R.unshift(G(a)?l.get(a):l.invoke(a))});m.pendingRequests=[];(function(a){q(arguments,function(a){m[a]=function(b,c){return m(S({},c||{},
|
||||
{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){q(arguments,function(a){m[a]=function(b,c,d){return m(S({},d||{},{method:a,url:b,data:c}))}})})("post","put","patch");m.defaults=a;return m}]}function qf(){this.$get=function(){return function(){return new C.XMLHttpRequest}}}function pf(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(a,b,d,c){return gg(a,c,a.defer,b,d[0])}]}function gg(a,b,d,c,e){function f(a,b,d){a=a.replace("JSON_CALLBACK",b);var f=
|
||||
e.createElement("script"),m=null;f.type="text/javascript";f.src=a;f.async=!0;m=function(a){f.removeEventListener("load",m,!1);f.removeEventListener("error",m,!1);e.body.removeChild(f);f=null;var g=-1,u="unknown";a&&("load"!==a.type||c.wasCalled(b)||(a={type:"error"}),u=a.type,g="error"===a.type?404:200);d&&d(g,u)};f.addEventListener("load",m,!1);f.addEventListener("error",m,!1);e.body.appendChild(f);return m}return function(e,h,k,l,m,n,p,u,R,B){function r(){fa&&fa();t&&t.abort()}function J(b,c,e,
|
||||
f,g){w(M)&&d.cancel(M);fa=t=null;b(c,e,f,g);a.$$completeOutstandingRequest(A)}a.$$incOutstandingRequestCount();h=h||a.url();if("jsonp"===Q(e))var v=c.createCallback(h),fa=f(h,v,function(a,b){var d=200===a&&c.getResponse(v);J(l,a,d,"",b);c.removeCallback(v)});else{var t=b(e,h);t.open(e,h,!0);q(m,function(a,b){w(a)&&t.setRequestHeader(b,a)});t.onload=function(){var a=t.statusText||"",b="response"in t?t.response:t.responseText,c=1223===t.status?204:t.status;0===c&&(c=b?200:"file"==Y(h).protocol?404:
|
||||
0);J(l,c,b,t.getAllResponseHeaders(),a)};e=function(){J(l,-1,null,null,"")};t.onerror=e;t.onabort=e;q(R,function(a,b){t.addEventListener(b,a)});q(B,function(a,b){t.upload.addEventListener(b,a)});p&&(t.withCredentials=!0);if(u)try{t.responseType=u}catch(K){if("json"!==u)throw K;}t.send(y(k)?null:k)}if(0<n)var M=d(r,n);else n&&z(n.then)&&n.then(r)}}function kf(){var a="{{",b="}}";this.startSymbol=function(b){return b?(a=b,this):a};this.endSymbol=function(a){return a?(b=a,this):b};this.$get=["$parse",
|
||||
"$exceptionHandler","$sce",function(d,c,e){function f(a){return"\\\\\\"+a}function g(c){return c.replace(n,a).replace(p,b)}function h(a,b,c,d){var e;return e=a.$watch(function(a){e();return d(a)},b,c)}function k(f,k,p,n){function J(a){try{var b=a;a=p?e.getTrusted(p,b):e.valueOf(b);var d;if(n&&!w(a))d=a;else if(null==a)d="";else{switch(typeof a){case "string":break;case "number":a=""+a;break;default:a=bb(a)}d=a}return d}catch(g){c(Ka.interr(f,g))}}if(!f.length||-1===f.indexOf(a)){var v;k||(k=g(f),
|
||||
v=ha(k),v.exp=f,v.expressions=[],v.$$watchDelegate=h);return v}n=!!n;var q,t,K=0,M=[],H=[];v=f.length;for(var E=[],I=[];K<v;)if(-1!=(q=f.indexOf(a,K))&&-1!=(t=f.indexOf(b,q+l)))K!==q&&E.push(g(f.substring(K,q))),K=f.substring(q+l,t),M.push(K),H.push(d(K,J)),K=t+m,I.push(E.length),E.push("");else{K!==v&&E.push(g(f.substring(K)));break}p&&1<E.length&&Ka.throwNoconcat(f);if(!k||M.length){var Da=function(a){for(var b=0,c=M.length;b<c;b++){if(n&&y(a[b]))return;E[I[b]]=a[b]}return E.join("")};return S(function(a){var b=
|
||||
0,d=M.length,e=Array(d);try{for(;b<d;b++)e[b]=H[b](a);return Da(e)}catch(g){c(Ka.interr(f,g))}},{exp:f,expressions:M,$$watchDelegate:function(a,b){var c;return a.$watchGroup(H,function(d,e){var f=Da(d);z(b)&&b.call(this,f,d!==e?c:f,a);c=f})}})}}var l=a.length,m=b.length,n=new RegExp(a.replace(/./g,f),"g"),p=new RegExp(b.replace(/./g,f),"g");k.startSymbol=function(){return a};k.endSymbol=function(){return b};return k}]}function lf(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(a,
|
||||
b,d,c,e){function f(f,k,l,m){function n(){p?f.apply(null,u):f(r)}var p=4<arguments.length,u=p?va.call(arguments,4):[],R=b.setInterval,q=b.clearInterval,r=0,J=w(m)&&!m,v=(J?c:d).defer(),fa=v.promise;l=w(l)?l:0;fa.$$intervalId=R(function(){J?e.defer(n):a.$evalAsync(n);v.notify(r++);0<l&&r>=l&&(v.resolve(r),q(fa.$$intervalId),delete g[fa.$$intervalId]);J||a.$apply()},k);g[fa.$$intervalId]=v;return fa}var g={};f.cancel=function(a){return a&&a.$$intervalId in g?(g[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),
|
||||
delete g[a.$$intervalId],!0):!1};return f}]}function fc(a){a=a.split("/");for(var b=a.length;b--;)a[b]=qb(a[b]);return a.join("/")}function jd(a,b){var d=Y(a);b.$$protocol=d.protocol;b.$$host=d.hostname;b.$$port=Z(d.port)||hg[d.protocol]||null}function kd(a,b){var d="/"!==a.charAt(0);d&&(a="/"+a);var c=Y(a);b.$$path=decodeURIComponent(d&&"/"===c.pathname.charAt(0)?c.pathname.substring(1):c.pathname);b.$$search=Ac(c.search);b.$$hash=decodeURIComponent(c.hash);b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path=
|
||||
"/"+b.$$path)}function ka(a,b){if(0===b.lastIndexOf(a,0))return b.substr(a.length)}function Ja(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function jb(a){return a.replace(/(#.+)|#$/,"$1")}function gc(a,b,d){this.$$html5=!0;d=d||"";jd(a,this);this.$$parse=function(a){var d=ka(b,a);if(!G(d))throw Gb("ipthprfx",a,b);kd(d,this);this.$$path||(this.$$path="/");this.$$compose()};this.$$compose=function(){var a=Tb(this.$$search),d=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(a?"?"+
|
||||
a:"")+d;this.$$absUrl=b+this.$$url.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ka(a,c))?(g=f,g=w(f=ka(d,f))?b+(ka("/",f)||f):a+g):w(f=ka(b,c))?g=b+f:b==c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function hc(a,b,d){jd(a,this);this.$$parse=function(c){var e=ka(a,c)||ka(b,c),f;y(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",y(e)&&(a=c,this.replace())):(f=ka(d,e),y(f)&&(f=e));kd(f,this);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;0===f.lastIndexOf(e,
|
||||
0)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$compose=function(){var b=Tb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+(this.$$url?d+this.$$url:"")};this.$$parseLinkUrl=function(b,d){return Ja(a)==Ja(b)?(this.$$parse(b),!0):!1}}function ld(a,b,d){this.$$html5=!0;hc.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a==Ja(c)?
|
||||
f=c:(g=ka(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$compose=function(){var b=Tb(this.$$search),e=this.$$hash?"#"+qb(this.$$hash):"";this.$$url=fc(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=a+d+this.$$url}}function Hb(a){return function(){return this[a]}}function md(a,b){return function(d){if(y(d))return this[a];this[a]=b(d);this.$$compose();return this}}function sf(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):
|
||||
a};this.html5Mode=function(a){return Ga(a)?(b.enabled=a,this):D(a)?(Ga(a.enabled)&&(b.enabled=a.enabled),Ga(a.requireBase)&&(b.requireBase=a.requireBase),Ga(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function h(a,b,d){var e=l.url(),f=l.$$state;try{c.url(a,b,d),l.$$state=c.state()}catch(g){throw l.url(e),l.$$state=f,g;}}function k(a,b){d.$broadcast("$locationChangeSuccess",l.absUrl(),a,l.$$state,
|
||||
b)}var l,m;m=c.baseHref();var n=c.url(),p;if(b.enabled){if(!m&&b.requireBase)throw Gb("nobase");p=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(m||"/");m=e.history?gc:ld}else p=Ja(n),m=hc;var u=p.substr(0,Ja(p).lastIndexOf("/")+1);l=new m(p,u,"#"+a);l.$$parseLinkUrl(n,n);l.$$state=c.state();var R=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=F(a.target);"a"!==wa(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;
|
||||
var h=e.prop("href"),k=e.attr("href")||e.attr("xlink:href");D(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=Y(h.animVal).href);R.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!l.$$parseLinkUrl(h,k)||(a.preventDefault(),l.absUrl()!=c.url()&&(d.$apply(),g.angular["ff-684208-preventDefault"]=!0))}});jb(l.absUrl())!=jb(n)&&c.url(l.absUrl(),!0);var q=!0;c.onUrlChange(function(a,b){y(ka(u,a))?g.location.href=a:(d.$evalAsync(function(){var c=l.absUrl(),e=l.$$state,f;a=jb(a);l.$$parse(a);l.$$state=
|
||||
b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;l.absUrl()===a&&(f?(l.$$parse(c),l.$$state=e,h(c,!1,e)):(q=!1,k(c,e)))}),d.$$phase||d.$digest())});d.$watch(function(){var a=jb(c.url()),b=jb(l.absUrl()),f=c.state(),g=l.$$replace,m=a!==b||l.$$html5&&e.history&&f!==l.$$state;if(q||m)q=!1,d.$evalAsync(function(){var b=l.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,l.$$state,f).defaultPrevented;l.absUrl()===b&&(c?(l.$$parse(a),l.$$state=f):(m&&h(b,g,f===l.$$state?null:l.$$state),
|
||||
k(a,f)))});l.$$replace=!1});return l}]}function tf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||A;a=!1;try{a=!!e.apply}catch(k){}return a?function(){var a=[];q(arguments,function(b){a.push(c(b))});
|
||||
return e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Sa(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw X("isecfld",b);return a}function ig(a){return a+""}function ra(a,b){if(a){if(a.constructor===a)throw X("isecfn",b);if(a.window===a)throw X("isecwindow",b);if(a.children&&
|
||||
(a.nodeName||a.prop&&a.attr&&a.find))throw X("isecdom",b);if(a===Object)throw X("isecobj",b);}return a}function nd(a,b){if(a){if(a.constructor===a)throw X("isecfn",b);if(a===jg||a===kg||a===lg)throw X("isecff",b);}}function Ib(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw X("isecaf",b);}function mg(a,b){return"undefined"!==typeof a?a:b}function od(a,b){return"undefined"===typeof a?b:"undefined"===
|
||||
typeof b?a:a+b}function V(a,b){var d,c;switch(a.type){case s.Program:d=!0;q(a.body,function(a){V(a.expression,b);d=d&&a.expression.constant});a.constant=d;break;case s.Literal:a.constant=!0;a.toWatch=[];break;case s.UnaryExpression:V(a.argument,b);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case s.BinaryExpression:V(a.left,b);V(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case s.LogicalExpression:V(a.left,b);V(a.right,
|
||||
b);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case s.ConditionalExpression:V(a.test,b);V(a.alternate,b);V(a.consequent,b);a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case s.Identifier:a.constant=!1;a.toWatch=[a];break;case s.MemberExpression:V(a.object,b);a.computed&&V(a.property,b);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=[a];break;case s.CallExpression:d=a.filter?!b(a.callee.name).$stateful:
|
||||
!1;c=[];q(a.arguments,function(a){V(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=a.filter&&!b(a.callee.name).$stateful?c:[a];break;case s.AssignmentExpression:V(a.left,b);V(a.right,b);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case s.ArrayExpression:d=!0;c=[];q(a.elements,function(a){V(a,b);d=d&&a.constant;a.constant||c.push.apply(c,a.toWatch)});a.constant=d;a.toWatch=c;break;case s.ObjectExpression:d=!0;c=[];q(a.properties,function(a){V(a.value,
|
||||
b);d=d&&a.value.constant&&!a.computed;a.value.constant||c.push.apply(c,a.value.toWatch)});a.constant=d;a.toWatch=c;break;case s.ThisExpression:a.constant=!1;a.toWatch=[];break;case s.LocalsExpression:a.constant=!1,a.toWatch=[]}}function pd(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function qd(a){return a.type===s.Identifier||a.type===s.MemberExpression}function rd(a){if(1===a.body.length&&qd(a.body[0].expression))return{type:s.AssignmentExpression,
|
||||
left:a.body[0].expression,right:{type:s.NGValueParameter},operator:"="}}function sd(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===s.Literal||a.body[0].expression.type===s.ArrayExpression||a.body[0].expression.type===s.ObjectExpression)}function td(a,b){this.astBuilder=a;this.$filter=b}function ud(a,b){this.astBuilder=a;this.$filter=b}function Jb(a){return"constructor"==a}function ic(a){return z(a.valueOf)?a.valueOf():ng.call(a)}function uf(){var a=U(),b=U(),d={"true":!0,
|
||||
"false":!1,"null":null,undefined:void 0},c,e;this.addLiteral=function(a,b){d[a]=b};this.setIdentifierFns=function(a,b){c=a;e=b;return this};this.$get=["$filter",function(f){function g(c,d,e){var g,k,H;e=e||J;switch(typeof c){case "string":H=c=c.trim();var E=e?b:a;g=E[H];if(!g){":"===c.charAt(0)&&":"===c.charAt(1)&&(k=!0,c=c.substring(2));g=e?r:B;var q=new jc(g);g=(new kc(q,f,g)).parse(c);g.constant?g.$$watchDelegate=p:k?g.$$watchDelegate=g.literal?n:m:g.inputs&&(g.$$watchDelegate=l);e&&(g=h(g));E[H]=
|
||||
g}return u(g,d);case "function":return u(c,d);default:return u(A,d)}}function h(a){function b(c,d,e,f){var g=J;J=!0;try{return a(c,d,e,f)}finally{J=g}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate;b.assign=h(a.assign);b.constant=a.constant;b.literal=a.literal;for(var c=0;a.inputs&&c<a.inputs.length;++c)a.inputs[c]=h(a.inputs[c]);b.inputs=a.inputs;return b}function k(a,b){return null==a||null==b?a===b:"object"===typeof a&&(a=ic(a),"object"===typeof a)?!1:a===b||a!==a&&b!==b}function l(a,b,c,d,
|
||||
e){var f=d.inputs,g;if(1===f.length){var h=k,f=f[0];return a.$watch(function(a){var b=f(a);k(b,h)||(g=d(a,void 0,void 0,[b]),h=b&&ic(b));return g},b,c,e)}for(var l=[],m=[],p=0,n=f.length;p<n;p++)l[p]=k,m[p]=null;return a.$watch(function(a){for(var b=!1,c=0,e=f.length;c<e;c++){var h=f[c](a);if(b||(b=!k(h,l[c])))m[c]=h,l[c]=h&&ic(h)}b&&(g=d(a,void 0,void 0,m));return g},b,c,e)}function m(a,b,c,d){var e,f;return e=a.$watch(function(a){return d(a)},function(a,c,d){f=a;z(b)&&b.apply(this,arguments);w(a)&&
|
||||
d.$$postDigest(function(){w(f)&&e()})},c)}function n(a,b,c,d){function e(a){var b=!0;q(a,function(a){w(a)||(b=!1)});return b}var f,g;return f=a.$watch(function(a){return d(a)},function(a,c,d){g=a;z(b)&&b.call(this,a,c,d);e(a)&&d.$$postDigest(function(){e(g)&&f()})},c)}function p(a,b,c,d){var e;return e=a.$watch(function(a){e();return d(a)},b,c)}function u(a,b){if(!b)return a;var c=a.$$watchDelegate,d=!1,c=c!==n&&c!==m?function(c,e,f,g){f=d&&g?g[0]:a(c,e,f,g);return b(f,c,e)}:function(c,d,e,f){e=a(c,
|
||||
d,e,f);c=b(e,c,d);return w(e)?c:e};a.$$watchDelegate&&a.$$watchDelegate!==l?c.$$watchDelegate=a.$$watchDelegate:b.$stateful||(c.$$watchDelegate=l,d=!a.inputs,c.inputs=a.inputs?a.inputs:[a]);return c}var R=Ba().noUnsafeEval,B={csp:R,expensiveChecks:!1,literals:pa(d),isIdentifierStart:z(c)&&c,isIdentifierContinue:z(e)&&e},r={csp:R,expensiveChecks:!0,literals:pa(d),isIdentifierStart:z(c)&&c,isIdentifierContinue:z(e)&&e},J=!1;g.$$runningExpensiveChecks=function(){return J};return g}]}function wf(){this.$get=
|
||||
["$rootScope","$exceptionHandler",function(a,b){return vd(function(b){a.$evalAsync(b)},b)}]}function xf(){this.$get=["$browser","$exceptionHandler",function(a,b){return vd(function(b){a.defer(b)},b)}]}function vd(a,b){function d(){this.$$state={status:0}}function c(a,b){return function(c){b.call(a,c)}}function e(c){!c.processScheduled&&c.pending&&(c.processScheduled=!0,a(function(){var a,d,e;e=c.pending;c.processScheduled=!1;c.pending=void 0;for(var f=0,g=e.length;f<g;++f){d=e[f][0];a=e[f][c.status];
|
||||
try{z(a)?d.resolve(a(c.value)):1===c.status?d.resolve(c.value):d.reject(c.value)}catch(h){d.reject(h),b(h)}}}))}function f(){this.promise=new d}var g=N("$q",TypeError),h=function(){var a=new f;a.resolve=c(a,a.resolve);a.reject=c(a,a.reject);a.notify=c(a,a.notify);return a};S(d.prototype,{then:function(a,b,c){if(y(a)&&y(b)&&y(c))return this;var d=new f;this.$$state.pending=this.$$state.pending||[];this.$$state.pending.push([d,a,b,c]);0<this.$$state.status&&e(this.$$state);return d.promise},"catch":function(a){return this.then(null,
|
||||
a)},"finally":function(a,b){return this.then(function(b){return l(b,!0,a)},function(b){return l(b,!1,a)},b)}});S(f.prototype,{resolve:function(a){this.promise.$$state.status||(a===this.promise?this.$$reject(g("qcycle",a)):this.$$resolve(a))},$$resolve:function(a){function d(a){k||(k=!0,h.$$resolve(a))}function f(a){k||(k=!0,h.$$reject(a))}var g,h=this,k=!1;try{if(D(a)||z(a))g=a&&a.then;z(g)?(this.promise.$$state.status=-1,g.call(a,d,f,c(this,this.notify))):(this.promise.$$state.value=a,this.promise.$$state.status=
|
||||
1,e(this.promise.$$state))}catch(l){f(l),b(l)}},reject:function(a){this.promise.$$state.status||this.$$reject(a)},$$reject:function(a){this.promise.$$state.value=a;this.promise.$$state.status=2;e(this.promise.$$state)},notify:function(c){var d=this.promise.$$state.pending;0>=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;f<g;f++){e=d[f][0];a=d[f][3];try{e.notify(z(a)?a(c):c)}catch(h){b(h)}}})}});var k=function(a,b){var c=new f;b?c.resolve(a):c.reject(a);return c.promise},
|
||||
l=function(a,b,c){var d=null;try{z(c)&&(d=c())}catch(e){return k(e,!1)}return d&&z(d.then)?d.then(function(){return k(a,b)},function(a){return k(a,!1)}):k(a,b)},m=function(a,b,c,d){var e=new f;e.resolve(a);return e.promise.then(b,c,d)},n=function(a){if(!z(a))throw g("norslvr",a);var b=new f;a(function(a){b.resolve(a)},function(a){b.reject(a)});return b.promise};n.prototype=d.prototype;n.defer=h;n.reject=function(a){var b=new f;b.reject(a);return b.promise};n.when=m;n.resolve=m;n.all=function(a){var b=
|
||||
new f,c=0,d=L(a)?[]:{};q(a,function(a,e){c++;m(a).then(function(a){d.hasOwnProperty(e)||(d[e]=a,--c||b.resolve(d))},function(a){d.hasOwnProperty(e)||b.reject(a)})});0===c&&b.resolve(d);return b.promise};n.race=function(a){var b=h();q(a,function(a){m(a).then(b.resolve,b.reject)});return b.promise};return n}function Gf(){this.$get=["$window","$timeout",function(a,b){var d=a.requestAnimationFrame||a.webkitRequestAnimationFrame,c=a.cancelAnimationFrame||a.webkitCancelAnimationFrame||a.webkitCancelRequestAnimationFrame,
|
||||
e=!!d,f=e?function(a){var b=d(a);return function(){c(b)}}:function(a){var c=b(a,16.66,!1);return function(){b.cancel(c)}};f.supported=e;return f}]}function vf(){function a(a){function b(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null;this.$$listeners={};this.$$listenerCount={};this.$$watchersCount=0;this.$id=++pb;this.$$ChildScope=null}b.prototype=a;return b}var b=10,d=N("$rootScope"),c=null,e=null;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=
|
||||
["$exceptionHandler","$parse","$browser",function(f,g,h){function k(a){a.currentScope.$$destroyed=!0}function l(a){9===Ea&&(a.$$childHead&&l(a.$$childHead),a.$$nextSibling&&l(a.$$nextSibling));a.$parent=a.$$nextSibling=a.$$prevSibling=a.$$childHead=a.$$childTail=a.$root=a.$$watchers=null}function m(){this.$id=++pb;this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this.$root=this;this.$$destroyed=!1;this.$$listeners={};this.$$listenerCount=
|
||||
{};this.$$watchersCount=0;this.$$isolateBindings=null}function n(a){if(J.$$phase)throw d("inprog",J.$$phase);J.$$phase=a}function p(a,b){do a.$$watchersCount+=b;while(a=a.$parent)}function u(a,b,c){do a.$$listenerCount[c]-=b,0===a.$$listenerCount[c]&&delete a.$$listenerCount[c];while(a=a.$parent)}function s(){}function B(){for(;t.length;)try{t.shift()()}catch(a){f(a)}e=null}function r(){null===e&&(e=h.defer(function(){J.$apply(B)}))}m.prototype={constructor:m,$new:function(b,c){var d;c=c||this;b?
|
||||
(d=new m,d.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=a(this)),d=new this.$$ChildScope);d.$parent=c;d.$$prevSibling=c.$$childTail;c.$$childHead?(c.$$childTail.$$nextSibling=d,c.$$childTail=d):c.$$childHead=c.$$childTail=d;(b||c!=this)&&d.$on("$destroy",k);return d},$watch:function(a,b,d,e){var f=g(a);if(f.$$watchDelegate)return f.$$watchDelegate(this,b,d,f,a);var h=this,k=h.$$watchers,l={fn:b,last:s,get:f,exp:e||a,eq:!!d};c=null;z(b)||(l.fn=A);k||(k=h.$$watchers=[]);k.unshift(l);p(this,
|
||||
1);return function(){0<=Za(k,l)&&p(h,-1);c=null}},$watchGroup:function(a,b){function c(){h=!1;k?(k=!1,b(e,e,g)):b(e,d,g)}var d=Array(a.length),e=Array(a.length),f=[],g=this,h=!1,k=!0;if(!a.length){var l=!0;g.$evalAsync(function(){l&&b(e,e,g)});return function(){l=!1}}if(1===a.length)return this.$watch(a[0],function(a,c,f){e[0]=a;d[0]=c;b(e,a===c?e:d,f)});q(a,function(a,b){var k=g.$watch(a,function(a,f){e[b]=a;d[b]=f;h||(h=!0,g.$evalAsync(c))});f.push(k)});return function(){for(;f.length;)f.shift()()}},
|
||||
$watchCollection:function(a,b){function c(a){e=a;var b,d,g,h;if(!y(e)){if(D(e))if(ta(e))for(f!==n&&(f=n,u=f.length=0,l++),a=e.length,u!==a&&(l++,f.length=u=a),b=0;b<a;b++)h=f[b],g=e[b],d=h!==h&&g!==g,d||h===g||(l++,f[b]=g);else{f!==p&&(f=p={},u=0,l++);a=0;for(b in e)ua.call(e,b)&&(a++,g=e[b],h=f[b],b in f?(d=h!==h&&g!==g,d||h===g||(l++,f[b]=g)):(u++,f[b]=g,l++));if(u>a)for(b in l++,f)ua.call(e,b)||(u--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$stateful=!0;var d=this,e,f,h,k=1<b.length,l=0,m=
|
||||
g(a,c),n=[],p={},r=!0,u=0;return this.$watch(m,function(){r?(r=!1,b(e,e,d)):b(e,h,d);if(k)if(D(e))if(ta(e)){h=Array(e.length);for(var a=0;a<e.length;a++)h[a]=e[a]}else for(a in h={},e)ua.call(e,a)&&(h[a]=e[a]);else h=e})},$digest:function(){var a,g,k,l,m,p,u,r,q=b,t,y=[],A,C;n("$digest");h.$$checkUrlChange();this===J&&null!==e&&(h.defer.cancel(e),B());c=null;do{r=!1;t=this;for(p=0;p<v.length;p++){try{C=v[p],C.scope.$eval(C.expression,C.locals)}catch(F){f(F)}c=null}v.length=0;a:do{if(p=t.$$watchers)for(u=
|
||||
p.length;u--;)try{if(a=p[u])if(m=a.get,(g=m(t))!==(k=a.last)&&!(a.eq?na(g,k):"number"===typeof g&&"number"===typeof k&&isNaN(g)&&isNaN(k)))r=!0,c=a,a.last=a.eq?pa(g,null):g,l=a.fn,l(g,k===s?g:k,t),5>q&&(A=4-q,y[A]||(y[A]=[]),y[A].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:k}));else if(a===c){r=!1;break a}}catch(G){f(G)}if(!(p=t.$$watchersCount&&t.$$childHead||t!==this&&t.$$nextSibling))for(;t!==this&&!(p=t.$$nextSibling);)t=t.$parent}while(t=p);if((r||v.length)&&
|
||||
!q--)throw J.$$phase=null,d("infdig",b,y);}while(r||v.length);for(J.$$phase=null;K<w.length;)try{w[K++]()}catch(D){f(D)}w.length=K=0},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;this===J&&h.$$applicationDestroyed();p(this,-this.$$watchersCount);for(var b in this.$$listenerCount)u(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling);a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling);this.$$prevSibling&&
|
||||
(this.$$prevSibling.$$nextSibling=this.$$nextSibling);this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling);this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=A;this.$on=this.$watch=this.$watchGroup=function(){return A};this.$$listeners={};this.$$nextSibling=null;l(this)}},$eval:function(a,b){return g(a)(this,b)},$evalAsync:function(a,b){J.$$phase||v.length||h.defer(function(){v.length&&J.$digest()});v.push({scope:this,expression:g(a),locals:b})},$$postDigest:function(a){w.push(a)},
|
||||
$apply:function(a){try{n("$apply");try{return this.$eval(a)}finally{J.$$phase=null}}catch(b){f(b)}finally{try{J.$digest()}catch(c){throw f(c),c;}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&t.push(b);a=g(a);r()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,u(e,1,a))}},$emit:function(a,
|
||||
b){var c=[],d,e=this,g=!1,h={name:a,targetScope:e,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},k=$a([h],arguments,1),l,m;do{d=e.$$listeners[a]||c;h.currentScope=e;l=0;for(m=d.length;l<m;l++)if(d[l])try{d[l].apply(null,k)}catch(n){f(n)}else d.splice(l,1),l--,m--;if(g)return h.currentScope=null,h;e=e.$parent}while(e);h.currentScope=null;return h},$broadcast:function(a,b){var c=this,d=this,e={name:a,targetScope:this,preventDefault:function(){e.defaultPrevented=
|
||||
!0},defaultPrevented:!1};if(!this.$$listenerCount[a])return e;for(var g=$a([e],arguments,1),h,k;c=d;){e.currentScope=c;d=c.$$listeners[a]||[];h=0;for(k=d.length;h<k;h++)if(d[h])try{d[h].apply(null,g)}catch(l){f(l)}else d.splice(h,1),h--,k--;if(!(d=c.$$listenerCount[a]&&c.$$childHead||c!==this&&c.$$nextSibling))for(;c!==this&&!(d=c.$$nextSibling);)c=c.$parent}e.currentScope=null;return e}};var J=new m,v=J.$$asyncQueue=[],w=J.$$postDigestQueue=[],t=J.$$applyAsyncQueue=[],K=0;return J}]}function ne(){var a=
|
||||
/^\s*(https?|ftp|mailto|tel|file):/,b=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(b){return w(b)?(a=b,this):a};this.imgSrcSanitizationWhitelist=function(a){return w(a)?(b=a,this):b};this.$get=function(){return function(d,c){var e=c?b:a,f;f=Y(d).href;return""===f||f.match(e)?d:"unsafe:"+f}}}function og(a){if("self"===a)return a;if(G(a)){if(-1<a.indexOf("***"))throw sa("iwcard",a);a=wd(a).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*");return new RegExp("^"+
|
||||
a+"$")}if(Wa(a))return new RegExp("^"+a.source+"$");throw sa("imatcher");}function xd(a){var b=[];w(a)&&q(a,function(a){b.push(og(a))});return b}function zf(){this.SCE_CONTEXTS=la;var a=["self"],b=[];this.resourceUrlWhitelist=function(b){arguments.length&&(a=xd(b));return a};this.resourceUrlBlacklist=function(a){arguments.length&&(b=xd(a));return b};this.$get=["$injector",function(d){function c(a,b){return"self"===a?id(b):!!a.exec(b.href)}function e(a){var b=function(a){this.$$unwrapTrustedValue=
|
||||
function(){return a}};a&&(b.prototype=new a);b.prototype.valueOf=function(){return this.$$unwrapTrustedValue()};b.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()};return b}var f=function(a){throw sa("unsafe");};d.has("$sanitize")&&(f=d.get("$sanitize"));var g=e(),h={};h[la.HTML]=e(g);h[la.CSS]=e(g);h[la.URL]=e(g);h[la.JS]=e(g);h[la.RESOURCE_URL]=e(h[la.URL]);return{trustAs:function(a,b){var c=h.hasOwnProperty(a)?h[a]:null;if(!c)throw sa("icontext",a,b);if(null===b||y(b)||
|
||||
""===b)return b;if("string"!==typeof b)throw sa("itype",a);return new c(b)},getTrusted:function(d,e){if(null===e||y(e)||""===e)return e;var g=h.hasOwnProperty(d)?h[d]:null;if(g&&e instanceof g)return e.$$unwrapTrustedValue();if(d===la.RESOURCE_URL){var g=Y(e.toString()),n,p,u=!1;n=0;for(p=a.length;n<p;n++)if(c(a[n],g)){u=!0;break}if(u)for(n=0,p=b.length;n<p;n++)if(c(b[n],g)){u=!1;break}if(u)return e;throw sa("insecurl",e.toString());}if(d===la.HTML)return f(e);throw sa("unsafe");},valueOf:function(a){return a instanceof
|
||||
g?a.$$unwrapTrustedValue():a}}}]}function yf(){var a=!0;this.enabled=function(b){arguments.length&&(a=!!b);return a};this.$get=["$parse","$sceDelegate",function(b,d){if(a&&8>Ea)throw sa("iequirks");var c=ia(la);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Xa);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,
|
||||
f=c.getTrusted,g=c.trustAs;q(la,function(a,b){var d=Q(b);c[db("parse_as_"+d)]=function(b){return e(a,b)};c[db("get_trusted_"+d)]=function(b){return f(a,b)};c[db("trust_as_"+d)]=function(b){return g(a,b)}});return c}]}function Af(){this.$get=["$window","$document",function(a,b){var d={},c=!(a.chrome&&a.chrome.app&&a.chrome.app.runtime)&&a.history&&a.history.pushState,e=Z((/android (\d+)/.exec(Q((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h,k=/^(Moz|webkit|ms)(?=[A-Z])/,
|
||||
l=g.body&&g.body.style,m=!1,n=!1;if(l){for(var p in l)if(m=k.exec(p)){h=m[0];h=h[0].toUpperCase()+h.substr(1);break}h||(h="WebkitOpacity"in l&&"webkit");m=!!("transition"in l||h+"Transition"in l);n=!!("animation"in l||h+"Animation"in l);!e||m&&n||(m=G(l.webkitTransition),n=G(l.webkitAnimation))}return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&11>=Ea)return!1;if(y(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),vendorPrefix:h,transitions:m,animations:n,android:e}}]}
|
||||
function Cf(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$templateCache","$http","$q","$sce",function(b,d,c,e){function f(g,h){f.totalPendingRequests++;if(!G(g)||y(b.get(g)))g=e.getTrustedResourceUrl(g);var k=d.defaults&&d.defaults.transformResponse;L(k)?k=k.filter(function(a){return a!==dc}):k===dc&&(k=null);return d.get(g,S({cache:b,transformResponse:k},a))["finally"](function(){f.totalPendingRequests--}).then(function(a){b.put(g,a.data);return a.data},function(a){if(!h)throw pg("tpload",
|
||||
g,a.status,a.statusText);return c.reject(a)})}f.totalPendingRequests=0;return f}]}function Df(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];q(a,function(a){var c=ca.element(a).data("$binding");c&&q(c,function(c){d?(new RegExp("(^|\\s)"+wd(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!=c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-","data-ng-","ng\\:"],h=0;h<g.length;++h){var k=
|
||||
a.querySelectorAll("["+g[h]+"model"+(d?"=":"*=")+'"'+b+'"]');if(k.length)return k}},getLocation:function(){return d.url()},setLocation:function(b){b!==d.url()&&(d.url(b),a.$digest())},whenStable:function(a){b.notifyWhenNoOutstandingRequests(a)}}}]}function Ef(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(a,b,d,c,e){function f(f,k,l){z(f)||(l=k,k=f,f=A);var m=va.call(arguments,3),n=w(l)&&!l,p=(n?c:d).defer(),u=p.promise,q;q=b.defer(function(){try{p.resolve(f.apply(null,
|
||||
m))}catch(b){p.reject(b),e(b)}finally{delete g[u.$$timeoutId]}n||a.$apply()},k);u.$$timeoutId=q;g[q]=p;return u}var g={};f.cancel=function(a){return a&&a.$$timeoutId in g?(g[a.$$timeoutId].reject("canceled"),delete g[a.$$timeoutId],b.defer.cancel(a.$$timeoutId)):!1};return f}]}function Y(a){Ea&&($.setAttribute("href",a),a=$.href);$.setAttribute("href",a);return{href:$.href,protocol:$.protocol?$.protocol.replace(/:$/,""):"",host:$.host,search:$.search?$.search.replace(/^\?/,""):"",hash:$.hash?$.hash.replace(/^#/,
|
||||
""):"",hostname:$.hostname,port:$.port,pathname:"/"===$.pathname.charAt(0)?$.pathname:"/"+$.pathname}}function id(a){a=G(a)?Y(a):a;return a.protocol===yd.protocol&&a.host===yd.host}function Ff(){this.$get=ha(C)}function zd(a){function b(a){try{return decodeURIComponent(a)}catch(b){return a}}var d=a[0]||{},c={},e="";return function(){var a,g,h,k,l;a=d.cookie||"";if(a!==e)for(e=a,a=e.split("; "),c={},h=0;h<a.length;h++)g=a[h],k=g.indexOf("="),0<k&&(l=b(g.substring(0,k)),y(c[l])&&(c[l]=b(g.substring(k+
|
||||
1))));return c}}function Jf(){this.$get=zd}function Mc(a){function b(d,c){if(D(d)){var e={};q(d,function(a,c){e[c]=b(c,a)});return e}return a.factory(d+"Filter",c)}this.register=b;this.$get=["$injector",function(a){return function(b){return a.get(b+"Filter")}}];b("currency",Ad);b("date",Bd);b("filter",qg);b("json",rg);b("limitTo",sg);b("lowercase",tg);b("number",Cd);b("orderBy",Dd);b("uppercase",ug)}function qg(){return function(a,b,d,c){if(!ta(a)){if(null==a)return a;throw N("filter")("notarray",
|
||||
a);}c=c||"$";var e;switch(lc(b)){case "function":break;case "boolean":case "null":case "number":case "string":e=!0;case "object":b=vg(b,d,c,e);break;default:return a}return Array.prototype.filter.call(a,b)}}function vg(a,b,d,c){var e=D(a)&&d in a;!0===b?b=na:z(b)||(b=function(a,b){if(y(a))return!1;if(null===a||null===b)return a===b;if(D(b)||D(a)&&!vc(a))return!1;a=Q(""+a);b=Q(""+b);return-1!==a.indexOf(b)});return function(f){return e&&!D(f)?La(f,a[d],b,d,!1):La(f,a,b,d,c)}}function La(a,b,d,c,e,
|
||||
f){var g=lc(a),h=lc(b);if("string"===h&&"!"===b.charAt(0))return!La(a,b.substring(1),d,c,e);if(L(a))return a.some(function(a){return La(a,b,d,c,e)});switch(g){case "object":var k;if(e){for(k in a)if("$"!==k.charAt(0)&&La(a[k],b,d,c,!0))return!0;return f?!1:La(a,b,d,c,!1)}if("object"===h){for(k in b)if(f=b[k],!z(f)&&!y(f)&&(g=k===c,!La(g?a:a[k],f,d,c,g,g)))return!1;return!0}return d(a,b);case "function":return!1;default:return d(a,b)}}function lc(a){return null===a?"null":typeof a}function Ad(a){var b=
|
||||
a.NUMBER_FORMATS;return function(a,c,e){y(c)&&(c=b.CURRENCY_SYM);y(e)&&(e=b.PATTERNS[1].maxFrac);return null==a?a:Ed(a,b.PATTERNS[1],b.GROUP_SEP,b.DECIMAL_SEP,e).replace(/\u00A4/g,c)}}function Cd(a){var b=a.NUMBER_FORMATS;return function(a,c){return null==a?a:Ed(a,b.PATTERNS[0],b.GROUP_SEP,b.DECIMAL_SEP,c)}}function wg(a){var b=0,d,c,e,f,g;-1<(c=a.indexOf(Fd))&&(a=a.replace(Fd,""));0<(e=a.search(/e/i))?(0>c&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)==mc;e++);
|
||||
if(e==(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)==mc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Gd&&(d=d.splice(0,Gd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function xg(a,b,d,c){var e=a.d,f=e.length-a.i;b=y(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0<d){e.splice(Math.max(a.i,d));for(var g=d;g<e.length;g++)e[g]=0}else for(f=Math.max(0,f),a.i=1,e.length=Math.max(1,d=b+1),e[0]=0,g=1;g<d;g++)e[g]=0;if(5<=c)if(0>d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;
|
||||
for(;f<Math.max(0,b);f++)e.push(0);if(b=e.reduceRight(function(a,b,c,d){b+=a;d[c]=b%10;return Math.floor(b/10)},0))e.unshift(b),a.i++}function Ed(a,b,d,c,e){if(!G(a)&&!T(a)||isNaN(a))return"";var f=!isFinite(a),g=!1,h=Math.abs(a)+"",k="";if(f)k="\u221e";else{g=wg(h);xg(g,e,b.minFrac,b.maxFrac);k=g.d;h=g.i;e=g.e;f=[];for(g=k.reduce(function(a,b){return a&&!b},!0);0>h;)k.unshift(0),h++;0<h?f=k.splice(h,k.length):(f=k,k=[0]);h=[];for(k.length>=b.lgSize&&h.unshift(k.splice(-b.lgSize,k.length).join(""));k.length>
|
||||
b.gSize;)h.unshift(k.splice(-b.gSize,k.length).join(""));k.length&&h.unshift(k.join(""));k=h.join(d);f.length&&(k+=c+f.join(""));e&&(k+="e+"+e)}return 0>a&&!g?b.negPre+k+b.negSuf:b.posPre+k+b.posSuf}function Kb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length<b;)a=mc+a;d&&(a=a.substr(a.length-b));return e+a}function ba(a,b,d,c,e){d=d||0;return function(f){f=f["get"+a]();if(0<d||f>-d)f+=d;0===f&&-12==d&&(f=12);return Kb(f,b,c,e)}}function kb(a,b,d){return function(c,e){var f=
|
||||
c["get"+a](),g=ub((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Hd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function Id(a){return function(b){var d=Hd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Kb(b,a)}}function nc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Bd(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,h=b[8]?a.setUTCFullYear:a.setFullYear,
|
||||
k=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=Z(b[9]+b[10]),g=Z(b[9]+b[11]));h.call(a,Z(b[1]),Z(b[2])-1,Z(b[3]));f=Z(b[4]||0)-f;g=Z(b[5]||0)-g;h=Z(b[6]||0);b=Math.round(1E3*parseFloat("0."+(b[7]||0)));k.call(a,f,g,h,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",h=[],k,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;G(c)&&(c=yg.test(c)?Z(c):b(c));T(c)&&(c=new Date(c));if(!da(c)||!isFinite(c.getTime()))return c;
|
||||
for(;d;)(l=zg.exec(d))?(h=$a(h,l,1),d=h.pop()):(h.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=yc(f,m),c=Sb(c,f,!0));q(h,function(b){k=Ag[b];g+=k?k(c,a.DATETIME_FORMATS,m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function rg(){return function(a,b){y(b)&&(b=2);return bb(a,b)}}function sg(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):Z(b);if(isNaN(b))return a;T(a)&&(a=a.toString());if(!ta(a))return a;d=!d||isNaN(d)?0:Z(d);d=0>d?Math.max(0,a.length+
|
||||
d):d;return 0<=b?oc(a,d,d+b):0===d?oc(a,b,a.length):oc(a,Math.max(0,d+b),d)}}function oc(a,b,d){return G(a)?a.slice(b,d):va.call(a,b,d)}function Dd(a){function b(b){return b.map(function(b){var c=1,d=Xa;if(z(b))d=b;else if(G(b)){if("+"==b.charAt(0)||"-"==b.charAt(0))c="-"==b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}
|
||||
function c(a,b){var c=0,d=a.type,k=b.type;if(d===k){var k=a.value,l=b.value;"string"===d?(k=k.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(k)&&(k=a.index),D(l)&&(l=b.index));k!==l&&(c=k<l?-1:1)}else c=d<k?-1:1;return c}return function(a,f,g,h){if(null==a)return a;if(!ta(a))throw N("orderBy")("notarray",a);L(f)||(f=[f]);0===f.length&&(f=["+"]);var k=b(f),l=g?-1:1,m=z(h)?h:c;a=Array.prototype.map.call(a,function(a,b){return{value:a,tieBreaker:{value:b,type:"number",index:b},predicateValues:k.map(function(c){var e=
|
||||
c.get(a);c=typeof e;if(null===e)c="string",e="null";else if("object"===c)a:{if(z(e.valueOf)&&(e=e.valueOf(),d(e)))break a;vc(e)&&(e=e.toString(),d(e))}return{value:e,type:c,index:b}})}});a.sort(function(a,b){for(var c=0,d=k.length;c<d;c++){var e=m(a.predicateValues[c],b.predicateValues[c]);if(e)return e*k[c].descending*l}return m(a.tieBreaker,b.tieBreaker)*l});return a=a.map(function(a){return a.value})}}function Ta(a){z(a)&&(a={link:a});a.restrict=a.restrict||"AC";return ha(a)}function Jd(a,b,d,
|
||||
c,e){var f=this,g=[];f.$error={};f.$$success={};f.$pending=void 0;f.$name=e(b.name||b.ngForm||"")(d);f.$dirty=!1;f.$pristine=!0;f.$valid=!0;f.$invalid=!1;f.$submitted=!1;f.$$parentForm=Lb;f.$rollbackViewValue=function(){q(g,function(a){a.$rollbackViewValue()})};f.$commitViewValue=function(){q(g,function(a){a.$commitViewValue()})};f.$addControl=function(a){Qa(a.$name,"input");g.push(a);a.$name&&(f[a.$name]=a);a.$$parentForm=f};f.$$renameControl=function(a,b){var c=a.$name;f[c]===a&&delete f[c];f[b]=
|
||||
a;a.$name=b};f.$removeControl=function(a){a.$name&&f[a.$name]===a&&delete f[a.$name];q(f.$pending,function(b,c){f.$setValidity(c,null,a)});q(f.$error,function(b,c){f.$setValidity(c,null,a)});q(f.$$success,function(b,c){f.$setValidity(c,null,a)});Za(g,a);a.$$parentForm=Lb};Kd({ctrl:this,$element:a,set:function(a,b,c){var d=a[b];d?-1===d.indexOf(c)&&d.push(c):a[b]=[c]},unset:function(a,b,c){var d=a[b];d&&(Za(d,c),0===d.length&&delete a[b])},$animate:c});f.$setDirty=function(){c.removeClass(a,Ua);c.addClass(a,
|
||||
Mb);f.$dirty=!0;f.$pristine=!1;f.$$parentForm.$setDirty()};f.$setPristine=function(){c.setClass(a,Ua,Mb+" ng-submitted");f.$dirty=!1;f.$pristine=!0;f.$submitted=!1;q(g,function(a){a.$setPristine()})};f.$setUntouched=function(){q(g,function(a){a.$setUntouched()})};f.$setSubmitted=function(){c.addClass(a,"ng-submitted");f.$submitted=!0;f.$$parentForm.$setSubmitted()}}function pc(a){a.$formatters.push(function(b){return a.$isEmpty(b)?b:b.toString()})}function lb(a,b,d,c,e,f){var g=Q(b[0].type);if(!e.android){var h=
|
||||
!1;b.on("compositionstart",function(){h=!0});b.on("compositionend",function(){h=!1;l()})}var k,l=function(a){k&&(f.defer.cancel(k),k=null);if(!h){var e=b.val();a=a&&a.type;"password"===g||d.ngTrim&&"false"===d.ngTrim||(e=W(e));(c.$viewValue!==e||""===e&&c.$$hasNativeValidators)&&c.$setViewValue(e,a)}};if(e.hasEvent("input"))b.on("input",l);else{var m=function(a,b,c){k||(k=f.defer(function(){k=null;b&&b.value===c||l(a)}))};b.on("keydown",function(a){var b=a.keyCode;91===b||15<b&&19>b||37<=b&&40>=b||
|
||||
m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut",m)}b.on("change",l);if(Ld[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!k){var b=this.validity,c=b.badInput,d=b.typeMismatch;k=f.defer(function(){k=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Nb(a,b){return function(d,c){var e,f;if(da(d))return d;if(G(d)){'"'==d.charAt(0)&&'"'==d.charAt(d.length-
|
||||
1)&&(d=d.substring(1,d.length-1));if(Bg.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},q(e,function(a,c){c<b.length&&(f[b[c]]=+a)}),new Date(f.yyyy,f.MM-1,f.dd,f.HH,f.mm,f.ss||0,1E3*f.sss||0)}return NaN}}function mb(a,b,d,c){return function(e,f,g,h,k,l,m){function n(a){return a&&!(a.getTime&&
|
||||
a.getTime()!==a.getTime())}function p(a){return w(a)&&!da(a)?d(a)||void 0:a}Md(e,f,g,h);lb(e,f,g,h,k,l);var u=h&&h.$options&&h.$options.timezone,q;h.$$parserName=a;h.$parsers.push(function(a){if(h.$isEmpty(a))return null;if(b.test(a))return a=d(a,q),u&&(a=Sb(a,u)),a});h.$formatters.push(function(a){if(a&&!da(a))throw nb("datefmt",a);if(n(a))return(q=a)&&u&&(q=Sb(q,u,!0)),m("date")(a,c,u);q=null;return""});if(w(g.min)||g.ngMin){var s;h.$validators.min=function(a){return!n(a)||y(s)||d(a)>=s};g.$observe("min",
|
||||
function(a){s=p(a);h.$validate()})}if(w(g.max)||g.ngMax){var r;h.$validators.max=function(a){return!n(a)||y(r)||d(a)<=r};g.$observe("max",function(a){r=p(a);h.$validate()})}}}function Md(a,b,d,c){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var c=b.prop("validity")||{};return c.badInput||c.typeMismatch?void 0:a})}function Nd(a,b,d,c,e){if(w(c)){a=a(c);if(!a.constant)throw nb("constexpr",d,c);return a(b)}return e}function qc(a,b){a="ngClass"+a;return["$animate",function(d){function c(a,
|
||||
b){var c=[],d=0;a:for(;d<a.length;d++){for(var e=a[d],m=0;m<b.length;m++)if(e==b[m])continue a;c.push(e)}return c}function e(a){var b=[];return L(a)?(q(a,function(a){b=b.concat(e(a))}),b):G(a)?a.split(" "):D(a)?(q(a,function(a,c){a&&(b=b.concat(c.split(" ")))}),b):a}return{restrict:"AC",link:function(f,g,h){function k(a){a=l(a,1);h.$addClass(a)}function l(a,b){var c=g.data("$classCounts")||U(),d=[];q(a,function(a){if(0<b||c[a])c[a]=(c[a]||0)+b,c[a]===+(0<b)&&d.push(a)});g.data("$classCounts",c);return d.join(" ")}
|
||||
function m(a,b){var e=c(b,a),f=c(a,b),e=l(e,1),f=l(f,-1);e&&e.length&&d.addClass(g,e);f&&f.length&&d.removeClass(g,f)}function n(a){if(!0===b||(f.$index&1)===b){var c=e(a||[]);if(!p)k(c);else if(!na(a,p)){var d=e(p);m(d,c)}}p=L(a)?a.map(function(a){return ia(a)}):ia(a)}var p;f.$watch(h[a],n,!0);h.$observe("class",function(b){n(f.$eval(h[a]))});"ngClass"!==a&&f.$watch("$index",function(c,d){var g=c&1;if(g!==(d&1)){var m=e(f.$eval(h[a]));g===b?k(m):(g=l(m,-1),h.$removeClass(g))}})}}}]}function Kd(a){function b(a,
|
||||
b){b&&!f[a]?(k.addClass(e,a),f[a]=!0):!b&&f[a]&&(k.removeClass(e,a),f[a]=!1)}function d(a,c){a=a?"-"+Cc(a,"-"):"";b(ob+a,!0===c);b(Od+a,!1===c)}var c=a.ctrl,e=a.$element,f={},g=a.set,h=a.unset,k=a.$animate;f[Od]=!(f[ob]=e.hasClass(ob));c.$setValidity=function(a,e,f){y(e)?(c.$pending||(c.$pending={}),g(c.$pending,a,f)):(c.$pending&&h(c.$pending,a,f),Pd(c.$pending)&&(c.$pending=void 0));Ga(e)?e?(h(c.$error,a,f),g(c.$$success,a,f)):(g(c.$error,a,f),h(c.$$success,a,f)):(h(c.$error,a,f),h(c.$$success,
|
||||
a,f));c.$pending?(b(Qd,!0),c.$valid=c.$invalid=void 0,d("",null)):(b(Qd,!1),c.$valid=Pd(c.$error),c.$invalid=!c.$valid,d("",c.$valid));e=c.$pending&&c.$pending[a]?void 0:c.$error[a]?!1:c.$$success[a]?!0:null;d(a,e);c.$$parentForm.$setValidity(a,e,c)}}function Pd(a){if(a)for(var b in a)if(a.hasOwnProperty(b))return!1;return!0}var Cg=/^\/(.+)\/([a-z]*)$/,ua=Object.prototype.hasOwnProperty,Q=function(a){return G(a)?a.toLowerCase():a},ub=function(a){return G(a)?a.toUpperCase():a},Ea,F,qa,va=[].slice,
|
||||
bg=[].splice,Dg=[].push,ma=Object.prototype.toString,wc=Object.getPrototypeOf,xa=N("ng"),ca=C.angular||(C.angular={}),Ub,pb=0;Ea=C.document.documentMode;A.$inject=[];Xa.$inject=[];var L=Array.isArray,ae=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,W=function(a){return G(a)?a.trim():a},wd=function(a){return a.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Ba=function(){if(!w(Ba.rules)){var a=C.document.querySelector("[ng-csp]")||
|
||||
C.document.querySelector("[data-ng-csp]");if(a){var b=a.getAttribute("ng-csp")||a.getAttribute("data-ng-csp");Ba.rules={noUnsafeEval:!b||-1!==b.indexOf("no-unsafe-eval"),noInlineStyle:!b||-1!==b.indexOf("no-inline-style")}}else{a=Ba;try{new Function(""),b=!1}catch(d){b=!0}a.rules={noUnsafeEval:b,noInlineStyle:!1}}}return Ba.rules},rb=function(){if(w(rb.name_))return rb.name_;var a,b,d=Na.length,c,e;for(b=0;b<d;++b)if(c=Na[b],a=C.document.querySelector("["+c.replace(":","\\:")+"jq]")){e=a.getAttribute(c+
|
||||
"jq");break}return rb.name_=e},de=/:/g,Na=["ng-","data-ng-","ng:","x-ng-"],ie=/[A-Z]/g,Dc=!1,Ma=3,me={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};O.expando="ng339";var fb=O.cache={},Pf=1;O._data=function(a){return this.cache[a[this.expando]]||{}};var Kf=/([\:\-\_]+(.))/g,Lf=/^moz([A-Z])/,yb={mouseleave:"mouseout",mouseenter:"mouseover"},Wb=N("jqLite"),Of=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Vb=/<|&#?\w+;/,Mf=/<([\w:-]+)/,Nf=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
|
||||
ja={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ja.optgroup=ja.option;ja.tbody=ja.tfoot=ja.colgroup=ja.caption=ja.thead;ja.th=ja.td;var Uf=C.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Oa=O.prototype={ready:function(a){function b(){d||(d=!0,a())}var d=!1;"complete"===
|
||||
C.document.readyState?C.setTimeout(b):(this.on("DOMContentLoaded",b),O(C).on("load",b))},toString:function(){var a=[];q(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return 0<=a?F(this[a]):F(this[this.length+a])},length:0,push:Dg,sort:[].sort,splice:[].splice},Eb={};q("multiple selected checked disabled readOnly required open".split(" "),function(a){Eb[Q(a)]=a});var Vc={};q("input select option textarea button form details".split(" "),function(a){Vc[a]=!0});var bd={ngMinlength:"minlength",
|
||||
ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};q({data:Yb,removeData:eb,hasData:function(a){for(var b in fb[a.ng339])return!0;return!1},cleanData:function(a){for(var b=0,d=a.length;b<d;b++)eb(a[b])}},function(a,b){O[b]=a});q({data:Yb,inheritedData:Cb,scope:function(a){return F.data(a,"$scope")||Cb(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return F.data(a,"$isolateScope")||F.data(a,"$isolateScopeNoTemplate")},controller:Sc,injector:function(a){return Cb(a,
|
||||
"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:zb,css:function(a,b,d){b=db(b);if(w(d))a.style[b]=d;else return a.style[b]},attr:function(a,b,d){var c=a.nodeType;if(c!==Ma&&2!==c&&8!==c)if(c=Q(b),Eb[c])if(w(d))d?(a[b]=!0,a.setAttribute(b,c)):(a[b]=!1,a.removeAttribute(c));else return a[b]||(a.attributes.getNamedItem(b)||A).specified?c:void 0;else if(w(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?void 0:a},prop:function(a,b,d){if(w(d))a[b]=
|
||||
d;else return a[b]},text:function(){function a(a,d){if(y(d)){var c=a.nodeType;return 1===c||c===Ma?a.textContent:""}a.textContent=d}a.$dv="";return a}(),val:function(a,b){if(y(b)){if(a.multiple&&"select"===wa(a)){var d=[];q(a.options,function(a){a.selected&&d.push(a.value||a.text)});return 0===d.length?null:d}return a.value}a.value=b},html:function(a,b){if(y(b))return a.innerHTML;wb(a,!0);a.innerHTML=b},empty:Tc},function(a,b){O.prototype[b]=function(b,c){var e,f,g=this.length;if(a!==Tc&&y(2==a.length&&
|
||||
a!==zb&&a!==Sc?b:c)){if(D(b)){for(e=0;e<g;e++)if(a===Yb)a(this[e],b);else for(f in b)a(this[e],f,b[f]);return this}e=a.$dv;g=y(e)?Math.min(g,1):g;for(f=0;f<g;f++){var h=a(this[f],b,c);e=e?e+h:h}return e}for(e=0;e<g;e++)a(this[e],b,c);return this}});q({removeData:eb,on:function(a,b,d,c){if(w(c))throw Wb("onargs");if(Nc(a)){c=xb(a,!0);var e=c.events,f=c.handle;f||(f=c.handle=Rf(a,e));c=0<=b.indexOf(" ")?b.split(" "):[b];for(var g=c.length,h=function(b,c,g){var h=e[b];h||(h=e[b]=[],h.specialHandlerWrapper=
|
||||
c,"$destroy"===b||g||a.addEventListener(b,f,!1));h.push(d)};g--;)b=c[g],yb[b]?(h(yb[b],Tf),h(b,void 0,!0)):h(b)}},off:Rc,one:function(a,b,d){a=F(a);a.on(b,function e(){a.off(b,d);a.off(b,e)});a.on(b,d)},replaceWith:function(a,b){var d,c=a.parentNode;wb(a);q(new O(b),function(b){d?c.insertBefore(b,d.nextSibling):c.replaceChild(b,a);d=b})},children:function(a){var b=[];q(a.childNodes,function(a){1===a.nodeType&&b.push(a)});return b},contents:function(a){return a.contentDocument||a.childNodes||[]},append:function(a,
|
||||
b){var d=a.nodeType;if(1===d||11===d){b=new O(b);for(var d=0,c=b.length;d<c;d++)a.appendChild(b[d])}},prepend:function(a,b){if(1===a.nodeType){var d=a.firstChild;q(new O(b),function(b){a.insertBefore(b,d)})}},wrap:function(a,b){Pc(a,F(b).eq(0).clone()[0])},remove:Db,detach:function(a){Db(a,!0)},after:function(a,b){var d=a,c=a.parentNode;b=new O(b);for(var e=0,f=b.length;e<f;e++){var g=b[e];c.insertBefore(g,d.nextSibling);d=g}},addClass:Bb,removeClass:Ab,toggleClass:function(a,b,d){b&&q(b.split(" "),
|
||||
function(b){var e=d;y(e)&&(e=!zb(a,b));(e?Bb:Ab)(a,b)})},parent:function(a){return(a=a.parentNode)&&11!==a.nodeType?a:null},next:function(a){return a.nextElementSibling},find:function(a,b){return a.getElementsByTagName?a.getElementsByTagName(b):[]},clone:Xb,triggerHandler:function(a,b,d){var c,e,f=b.type||b,g=xb(a);if(g=(g=g&&g.events)&&g[f])c={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=
|
||||
!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:A,type:f,target:a},b.type&&(c=S(c,b)),b=ia(g),e=d?[c].concat(d):[c],q(b,function(b){c.isImmediatePropagationStopped()||b.apply(a,e)})}},function(a,b){O.prototype[b]=function(b,c,e){for(var f,g=0,h=this.length;g<h;g++)y(f)?(f=a(this[g],b,c,e),w(f)&&(f=F(f))):Qc(f,a(this[g],b,c,e));return w(f)?f:this};O.prototype.bind=O.prototype.on;O.prototype.unbind=O.prototype.off});Ra.prototype={put:function(a,
|
||||
b){this[Ca(a,this.nextUid)]=b},get:function(a){return this[Ca(a,this.nextUid)]},remove:function(a){var b=this[a=Ca(a,this.nextUid)];delete this[a];return b}};var If=[function(){this.$get=[function(){return Ra}]}],Wf=/^([^\(]+?)=>/,Xf=/^[^\(]*\(\s*([^\)]*)\)/m,Eg=/,/,Fg=/^\s*(_?)(\S+?)\1\s*$/,Vf=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ha=N("$injector");cb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw G(d)&&d||(d=a.name||Yf(a)),Ha("strictdi",d);
|
||||
b=Wc(a);q(b[1].split(Eg),function(a){a.replace(Fg,function(a,b,d){c.push(d)})})}a.$inject=c}}else L(a)?(b=a.length-1,Pa(a[b],"fn"),c=a.slice(0,b)):Pa(a,"fn",!0);return c};var Rd=N("$animate"),$e=function(){this.$get=A},af=function(){var a=new Ra,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=G(b)?b.split(" "):L(b)?b:[],q(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){q(b,function(b){var c=a.get(b);if(c){var d=Zf(b.attr("class")),e="",f="";q(c,
|
||||
function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});q(b,function(a){e&&Bb(a,e);f&&Ab(a,f)});a.remove(b)}});b.length=0}return{enabled:A,on:A,off:A,pin:A,push:function(g,h,k,l){l&&l();k=k||{};k.from&&g.css(k.from);k.to&&g.css(k.to);if(k.addClass||k.removeClass)if(h=k.addClass,l=k.removeClass,k=a.get(g)||{},h=e(k,h,!0),l=e(k,l,!1),h||l)a.put(g,k),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Ye=["$provide",function(a){var b=this;this.$$registeredAnimations=
|
||||
Object.create(null);this.register=function(d,c){if(d&&"."!==d.charAt(0))throw Rd("notcsel",d);var e=d+"-animation";b.$$registeredAnimations[d.substr(1)]=e;a.factory(e,c)};this.classNameFilter=function(a){if(1===arguments.length&&(this.$$classNameFilter=a instanceof RegExp?a:null)&&/(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString()))throw Rd("nongcls","ng-animate");return this.$$classNameFilter};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var h;a:{for(h=0;h<d.length;h++){var k=
|
||||
d[h];if(1===k.nodeType){h=k;break a}}h=void 0}!h||h.parentNode||h.previousElementSibling||(d=null)}d?d.after(a):c.prepend(a)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(a){a.end&&a.end()},enter:function(e,f,g,h){f=f&&F(f);g=g&&F(g);f=f||g.parent();b(e,f,g);return a.push(e,"enter",Ia(h))},move:function(e,f,g,h){f=f&&F(f);g=g&&F(g);f=f||g.parent();b(e,f,g);return a.push(e,"move",Ia(h))},leave:function(b,c){return a.push(b,"leave",Ia(c),function(){b.remove()})},addClass:function(b,
|
||||
c,g){g=Ia(g);g.addClass=gb(g.addclass,c);return a.push(b,"addClass",g)},removeClass:function(b,c,g){g=Ia(g);g.removeClass=gb(g.removeClass,c);return a.push(b,"removeClass",g)},setClass:function(b,c,g,h){h=Ia(h);h.addClass=gb(h.addClass,c);h.removeClass=gb(h.removeClass,g);return a.push(b,"setClass",h)},animate:function(b,c,g,h,k){k=Ia(k);k.from=k.from?S(k.from,c):c;k.to=k.to?S(k.to,g):g;k.tempClasses=gb(k.tempClasses,h||"ng-inline-animate");return a.push(b,"animate",k)}}}]}],cf=function(){this.$get=
|
||||
["$$rAF",function(a){function b(b){d.push(b);1<d.length||a(function(){for(var a=0;a<d.length;a++)d[a]();d=[]})}var d=[];return function(){var a=!1;b(function(){a=!0});return function(d){a?d():b(d)}}}]},bf=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(a,b,d,c,e){function f(a){this.setHost(a);var b=d();this._doneCallbacks=[];this._tick=function(a){var d=c[0];d&&d.hidden?e(a,0,!1):b(a)};this._state=0}f.chain=function(a,b){function c(){if(d===a.length)b(!0);
|
||||
else a[d](function(a){!1===a?b(!1):(d++,c())})}var d=0;c()};f.all=function(a,b){function c(f){e=e&&f;++d===a.length&&b(e)}var d=0,e=!0;q(a,function(a){a.done(c)})};f.prototype={setHost:function(a){this.host=a||{}},done:function(a){2===this._state?a():this._doneCallbacks.push(a)},progress:A,getPromise:function(){if(!this.promise){var b=this;this.promise=a(function(a,c){b.done(function(b){!1===b?c():a()})})}return this.promise},then:function(a,b){return this.getPromise().then(a,b)},"catch":function(a){return this.getPromise()["catch"](a)},
|
||||
"finally":function(a){return this.getPromise()["finally"](a)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end();this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel();this._resolve(!1)},complete:function(a){var b=this;0===b._state&&(b._state=1,b._tick(function(){b._resolve(a)}))},_resolve:function(a){2!==this._state&&(q(this._doneCallbacks,function(b){b(a)}),this._doneCallbacks.length=
|
||||
0,this._state=2)}};return f}]},Ze=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(a,b,d){return function(b,e){function f(){a(function(){g.addClass&&(b.addClass(g.addClass),g.addClass=null);g.removeClass&&(b.removeClass(g.removeClass),g.removeClass=null);g.to&&(b.css(g.to),g.to=null);h||k.complete();h=!0});return k}var g=e||{};g.$$prepared||(g=pa(g));g.cleanupStyles&&(g.from=g.to=null);g.from&&(b.css(g.from),g.from=null);var h,k=new d;return{start:f,end:f}}}]},ga=N("$compile"),bc=new function(){};
|
||||
Fc.$inject=["$provide","$$sanitizeUriProvider"];Fb.prototype.isFirstChange=function(){return this.previousValue===bc};var Yc=/^((?:x|data)[\:\-_])/i,cg=N("$controller"),cd=/^(\S+)(\s+as\s+([\w$]+))?$/,jf=function(){this.$get=["$document",function(a){return function(b){b?!b.nodeType&&b instanceof F&&(b=b[0]):b=a[0].body;return b.offsetWidth+1}}]},dd="application/json",ec={"Content-Type":dd+";charset=utf-8"},eg=/^\[|^\{(?!\{)/,fg={"[":/]$/,"{":/}$/},dg=/^\)\]\}',?\n/,Gg=N("$http"),hd=function(a){return function(){throw Gg("legacy",
|
||||
a);}},Ka=ca.$interpolateMinErr=N("$interpolate");Ka.throwNoconcat=function(a){throw Ka("noconcat",a);};Ka.interr=function(a,b){return Ka("interr",a,b.toString())};var rf=function(){this.$get=["$window",function(a){function b(a){var b=function(a){b.data=a;b.called=!0};b.id=a;return b}var d=a.angular.callbacks,c={};return{createCallback:function(a){a="_"+(d.$$counter++).toString(36);var f="angular.callbacks."+a,g=b(a);c[f]=d[a]=g;return f},wasCalled:function(a){return c[a].called},getResponse:function(a){return c[a].data},
|
||||
removeCallback:function(a){delete d[c[a].id];delete c[a]}}}]},Hg=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,hg={http:80,https:443,ftp:21},Gb=N("$location"),Ig={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Hb("$$absUrl"),url:function(a){if(y(a))return this.$$url;var b=Hg.exec(a);(b[1]||""===a)&&this.path(decodeURIComponent(b[1]));(b[2]||b[1]||""===a)&&this.search(b[3]||"");this.hash(b[5]||"");return this},protocol:Hb("$$protocol"),host:Hb("$$host"),port:Hb("$$port"),path:md("$$path",function(a){a=null!==a?a.toString():
|
||||
"";return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(G(a)||T(a))a=a.toString(),this.$$search=Ac(a);else if(D(a))a=pa(a,{}),q(a,function(b,c){null==b&&delete a[c]}),this.$$search=a;else throw Gb("isrcharg");break;default:y(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}this.$$compose();return this},hash:md("$$hash",function(a){return null!==a?a.toString():""}),replace:function(){this.$$replace=!0;return this}};q([ld,hc,gc],
|
||||
function(a){a.prototype=Object.create(Ig);a.prototype.state=function(b){if(!arguments.length)return this.$$state;if(a!==gc||!this.$$html5)throw Gb("nostate");this.$$state=y(b)?null:b;return this}});var X=N("$parse"),jg=Function.prototype.call,kg=Function.prototype.apply,lg=Function.prototype.bind,Ob=U();q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(a){Ob[a]=!0});var Jg={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},jc=function(a){this.options=a};jc.prototype={constructor:jc,
|
||||
lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index<this.text.length;)if(a=this.text.charAt(this.index),'"'===a||"'"===a)this.readString(a);else if(this.isNumber(a)||"."===a&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(a,"(){}[].,;:?"))this.tokens.push({index:this.index,text:a}),this.index++;else if(this.isWhitespace(a))this.index++;else{var b=a+this.peek(),d=b+this.peek(2),c=Ob[b],e=Ob[d];Ob[a]||
|
||||
c||e?(a=e?d:c?b:a,this.tokens.push({index:this.index,text:a,operator:!0}),this.index+=a.length):this.throwError("Unexpected next character ",this.index,this.index+1)}return this.tokens},is:function(a,b){return-1!==b.indexOf(a)},peek:function(a){a=a||1;return this.index+a<this.text.length?this.text.charAt(this.index+a):!1},isNumber:function(a){return"0"<=a&&"9">=a&&"string"===typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?
|
||||
this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)},isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):
|
||||
(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b=w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw X("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index<
|
||||
this.text.length;){var d=Q(this.text.charAt(this.index));if("."==d||this.isNumber(d))a+=d;else{var c=this.peek();if("e"==d&&this.isExpOperator(c))a+=d;else if(this.isExpOperator(d)&&c&&this.isNumber(c)&&"e"==a.charAt(a.length-1))a+=d;else if(!this.isExpOperator(d)||c&&this.isNumber(c)||"e"!=a.charAt(a.length-1))break;else this.throwError("Invalid exponent")}this.index++}this.tokens.push({index:b,text:a,constant:!0,value:Number(a)})},readIdent:function(){var a=this.index;for(this.index+=this.peekMultichar().length;this.index<
|
||||
this.text.length;){var b=this.peekMultichar();if(!this.isIdentifierContinue(b))break;this.index+=b.length}this.tokens.push({index:a,text:this.text.slice(a,this.index),identifier:!0})},readString:function(a){var b=this.index;this.index++;for(var d="",c=a,e=!1;this.index<this.text.length;){var f=this.text.charAt(this.index),c=c+f;if(e)"u"===f?(e=this.text.substring(this.index+1,this.index+5),e.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+e+"]"),this.index+=4,d+=String.fromCharCode(parseInt(e,
|
||||
16))):d+=Jg[f]||f,e=!1;else if("\\"===f)e=!0;else{if(f===a){this.index++;this.tokens.push({index:b,text:c,constant:!0,value:d});return}d+=f}this.index++}this.throwError("Unterminated quote",b)}};var s=function(a,b){this.lexer=a;this.options=b};s.Program="Program";s.ExpressionStatement="ExpressionStatement";s.AssignmentExpression="AssignmentExpression";s.ConditionalExpression="ConditionalExpression";s.LogicalExpression="LogicalExpression";s.BinaryExpression="BinaryExpression";s.UnaryExpression="UnaryExpression";
|
||||
s.CallExpression="CallExpression";s.MemberExpression="MemberExpression";s.Identifier="Identifier";s.Literal="Literal";s.ArrayExpression="ArrayExpression";s.Property="Property";s.ObjectExpression="ObjectExpression";s.ThisExpression="ThisExpression";s.LocalsExpression="LocalsExpression";s.NGValueParameter="NGValueParameter";s.prototype={ast:function(a){this.text=a;this.tokens=this.lexer.lex(a);a=this.program();0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]);return a},
|
||||
program:function(){for(var a=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&a.push(this.expressionStatement()),!this.expect(";"))return{type:s.Program,body:a}},expressionStatement:function(){return{type:s.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var a=this.expression();this.expect("|");)a=this.filter(a);return a},expression:function(){return this.assignment()},assignment:function(){var a=this.ternary();this.expect("=")&&(a={type:s.AssignmentExpression,
|
||||
left:a,right:this.assignment(),operator:"="});return a},ternary:function(){var a=this.logicalOR(),b,d;return this.expect("?")&&(b=this.expression(),this.consume(":"))?(d=this.expression(),{type:s.ConditionalExpression,test:a,alternate:b,consequent:d}):a},logicalOR:function(){for(var a=this.logicalAND();this.expect("||");)a={type:s.LogicalExpression,operator:"||",left:a,right:this.logicalAND()};return a},logicalAND:function(){for(var a=this.equality();this.expect("&&");)a={type:s.LogicalExpression,
|
||||
operator:"&&",left:a,right:this.equality()};return a},equality:function(){for(var a=this.relational(),b;b=this.expect("==","!=","===","!==");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.relational()};return a},relational:function(){for(var a=this.additive(),b;b=this.expect("<",">","<=",">=");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:s.BinaryExpression,operator:b.text,
|
||||
left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:s.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:s.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():
|
||||
this.selfReferential.hasOwnProperty(this.peek().text)?a=pa(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:s.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:s.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):
|
||||
"["===b.text?(a={type:s.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:s.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:s.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))
|
||||
}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:s.Identifier,name:a.text}},constant:function(){return{type:s.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]");return{type:s.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;
|
||||
b={type:s.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"),b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");
|
||||
return{type:s.ObjectExpression,properties:a}},throwError:function(a,b){throw X("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw X("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw X("ueoe",this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>
|
||||
a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:s.ThisExpression},$locals:{type:s.LocalsExpression}}};td.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};V(c,d.$filter);var e="",f;this.stage="assign";
|
||||
if(f=rd(c))this.state.computing="assign",e=this.nextId(),this.recurse(f,e),this.return_(e),e="fn.assign="+this.generateFunction("assign","s,v,l");f=pd(c.body);d.stage="inputs";q(f,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}};d.state.computing=c;var e=d.nextId();d.recurse(a,e);d.return_(e);d.state.inputs.push(c);a.watchId=b});this.state.computing="fn";this.stage="main";this.recurse(c);e='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+
|
||||
e+this.watchFns()+"return fn;";e=(new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",e))(this.$filter,Sa,ra,nd,ig,Ib,mg,od,a);this.state=this.stage=void 0;e.literal=sd(c);e.constant=c.constant;return e},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;q(b,function(b){a.push("var "+b+"="+d.generateFunction(b,"s"))});b.length&&a.push("fn.inputs=["+b.join(",")+"];");
|
||||
return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;q(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,c,e,f){var g,h,k=this,l,m,n;c=c||A;if(!f&&w(a.watchId))b=
|
||||
b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case s.Program:q(a.body,function(b,c){k.recurse(b.expression,void 0,void 0,function(a){h=a});c!==a.body.length-1?k.current().body.push(h,";"):k.return_(h)});break;case s.Literal:m=this.escape(a.value);this.assign(b,m);c(m);break;case s.UnaryExpression:this.recurse(a.argument,void 0,void 0,function(a){h=a});m=a.operator+"("+this.ifDefined(h,0)+")";this.assign(b,m);
|
||||
c(m);break;case s.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){h=a});m="+"===a.operator?this.plus(g,h):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(h,0):"("+g+")"+a.operator+"("+h+")";this.assign(b,m);c(m);break;case s.LogicalExpression:b=b||this.nextId();k.recurse(a.left,b);k.if_("&&"===a.operator?b:k.not(b),k.lazyRecurse(a.right,b));c(b);break;case s.ConditionalExpression:b=b||this.nextId();k.recurse(a.test,
|
||||
b);k.if_(b,k.lazyRecurse(a.alternate,b),k.lazyRecurse(a.consequent,b));c(b);break;case s.Identifier:b=b||this.nextId();d&&(d.context="inputs"===k.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);Sa(a.name);k.if_("inputs"===k.stage||k.not(k.getHasOwnProperty("l",a.name)),function(){k.if_("inputs"===k.stage||"s",function(){e&&1!==e&&k.if_(k.not(k.nonComputedMember("s",a.name)),k.lazyAssign(k.nonComputedMember("s",a.name),"{}"));k.assign(b,k.nonComputedMember("s",
|
||||
a.name))})},b&&k.lazyAssign(b,k.nonComputedMember("l",a.name)));(k.state.expensiveChecks||Jb(a.name))&&k.addEnsureSafeObject(b);c(b);break;case s.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();k.recurse(a.object,g,void 0,function(){k.if_(k.notNull(g),function(){e&&1!==e&&k.addEnsureSafeAssignContext(g);if(a.computed)h=k.nextId(),k.recurse(a.property,h),k.getStringValue(h),k.addEnsureSafeMemberName(h),e&&1!==e&&k.if_(k.not(k.computedMember(g,h)),k.lazyAssign(k.computedMember(g,
|
||||
h),"{}")),m=k.ensureSafeObject(k.computedMember(g,h)),k.assign(b,m),d&&(d.computed=!0,d.name=h);else{Sa(a.property.name);e&&1!==e&&k.if_(k.not(k.nonComputedMember(g,a.property.name)),k.lazyAssign(k.nonComputedMember(g,a.property.name),"{}"));m=k.nonComputedMember(g,a.property.name);if(k.state.expensiveChecks||Jb(a.property.name))m=k.ensureSafeObject(m);k.assign(b,m);d&&(d.computed=!1,d.name=a.property.name)}},function(){k.assign(b,"undefined")});c(b)},!!e);break;case s.CallExpression:b=b||this.nextId();
|
||||
a.filter?(h=k.filter(a.callee.name),l=[],q(a.arguments,function(a){var b=k.nextId();k.recurse(a,b);l.push(b)}),m=h+"("+l.join(",")+")",k.assign(b,m),c(b)):(h=k.nextId(),g={},l=[],k.recurse(a.callee,h,g,function(){k.if_(k.notNull(h),function(){k.addEnsureSafeFunction(h);q(a.arguments,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(k.ensureSafeObject(a))})});g.name?(k.state.expensiveChecks||k.addEnsureSafeObject(g.context),m=k.member(g.context,g.name,g.computed)+"("+l.join(",")+")"):m=
|
||||
h+"("+l.join(",")+")";m=k.ensureSafeObject(m);k.assign(b,m)},function(){k.assign(b,"undefined")});c(b)}));break;case s.AssignmentExpression:h=this.nextId();g={};if(!qd(a.left))throw X("lval");this.recurse(a.left,void 0,g,function(){k.if_(k.notNull(g.context),function(){k.recurse(a.right,h);k.addEnsureSafeObject(k.member(g.context,g.name,g.computed));k.addEnsureSafeAssignContext(g.context);m=k.member(g.context,g.name,g.computed)+a.operator+h;k.assign(b,m);c(b||m)})},1);break;case s.ArrayExpression:l=
|
||||
[];q(a.elements,function(a){k.recurse(a,k.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(m);break;case s.ObjectExpression:l=[];n=!1;q(a.properties,function(a){a.computed&&(n=!0)});n?(b=b||this.nextId(),this.assign(b,"{}"),q(a.properties,function(a){a.computed?(g=k.nextId(),k.recurse(a.key,g)):g=a.key.type===s.Identifier?a.key.name:""+a.key.value;h=k.nextId();k.recurse(a.value,h);k.assign(k.member(b,g,a.computed),h)})):(q(a.properties,function(b){k.recurse(b.value,
|
||||
a.constant?void 0:k.nextId(),void 0,function(a){l.push(k.escape(b.key.type===s.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case s.ThisExpression:this.assign(b,"s");c("s");break;case s.LocalsExpression:this.assign(b,"l");c("l");break;case s.NGValueParameter:this.assign(b,"v"),c("v")}},getHasOwnProperty:function(a,b){var d=a+"."+b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},
|
||||
assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),
|
||||
d(),c.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/[$_a-zA-Z][$_a-zA-Z0-9]*/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),
|
||||
";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+
|
||||
a+",text)"},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(G(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(T(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"===
|
||||
typeof a)return"undefined";throw X("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};ud.prototype={compile:function(a,b){var d=this,c=this.astBuilder.ast(a);this.expression=a;this.expensiveChecks=b;V(c,d.$filter);var e,f;if(e=rd(c))f=this.recurse(e);e=pd(c.body);var g;e&&(g=[],q(e,function(a,b){var c=d.recurse(a);a.input=c;g.push(c);a.watchId=b}));var h=[];q(c.body,function(a){h.push(d.recurse(a.expression))});
|
||||
e=0===c.body.length?A:1===c.body.length?h[0]:function(a,b){var c;q(h,function(d){c=d(a,b)});return c};f&&(e.assign=function(a,b,c){return f(a,c,b)});g&&(e.inputs=g);e.literal=sd(c);e.constant=c.constant;return e},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case s.Literal:return this.value(a.value,b);case s.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case s.BinaryExpression:return c=this.recurse(a.left),
|
||||
e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case s.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case s.Identifier:return Sa(a.name,f.expression),f.identifier(a.name,f.expensiveChecks||Jb(a.name),b,d,f.expression);case s.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(Sa(a.property.name,
|
||||
f.expression),e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c,e,b,d,f.expression):this.nonComputedMember(c,e,f.expensiveChecks,b,d,f.expression);case s.CallExpression:return g=[],q(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var n=[],p=0;p<g.length;++p)n.push(g[p](a,c,d,f));a=e.apply(void 0,n,f);return b?{context:void 0,name:void 0,value:a}:
|
||||
a}:function(a,c,d,m){var n=e(a,c,d,m),p;if(null!=n.value){ra(n.context,f.expression);nd(n.value,f.expression);p=[];for(var q=0;q<g.length;++q)p.push(ra(g[q](a,c,d,m),f.expression));p=ra(n.value.apply(n.context,p),f.expression)}return b?{value:p}:p};case s.AssignmentExpression:return c=this.recurse(a.left,!0,1),e=this.recurse(a.right),function(a,d,g,m){var n=c(a,d,g,m);a=e(a,d,g,m);ra(n.value,f.expression);Ib(n.context);n.context[n.name]=a;return b?{value:a}:a};case s.ArrayExpression:return g=[],q(a.elements,
|
||||
function(a){g.push(f.recurse(a))}),function(a,c,d,e){for(var f=[],p=0;p<g.length;++p)f.push(g[p](a,c,d,e));return b?{value:f}:f};case s.ObjectExpression:return g=[],q(a.properties,function(a){a.computed?g.push({key:f.recurse(a.key),computed:!0,value:f.recurse(a.value)}):g.push({key:a.key.type===s.Identifier?a.key.name:""+a.key.value,computed:!1,value:f.recurse(a.value)})}),function(a,c,d,e){for(var f={},p=0;p<g.length;++p)g[p].computed?f[g[p].key(a,c,d,e)]=g[p].value(a,c,d,e):f[g[p].key]=g[p].value(a,
|
||||
c,d,e);return b?{value:f}:f};case s.ThisExpression:return function(a){return b?{value:a}:a};case s.LocalsExpression:return function(a,c){return b?{value:c}:c};case s.NGValueParameter:return function(a,c,d){return b?{value:d}:d}}},"unary+":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?+d:0;return b?{value:d}:d}},"unary-":function(a,b){return function(d,c,e,f){d=a(d,c,e,f);d=w(d)?-d:0;return b?{value:d}:d}},"unary!":function(a,b){return function(d,c,e,f){d=!a(d,c,e,f);return b?{value:d}:
|
||||
d}},"binary+":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=od(h,c);return d?{value:h}:h}},"binary-":function(a,b,d){return function(c,e,f,g){var h=a(c,e,f,g);c=b(c,e,f,g);h=(w(h)?h:0)-(w(c)?c:0);return d?{value:h}:h}},"binary*":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)*b(c,e,f,g);return d?{value:c}:c}},"binary/":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)/b(c,e,f,g);return d?{value:c}:c}},"binary%":function(a,b,d){return function(c,e,f,g){c=a(c,e,
|
||||
f,g)%b(c,e,f,g);return d?{value:c}:c}},"binary===":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)===b(c,e,f,g);return d?{value:c}:c}},"binary!==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!==b(c,e,f,g);return d?{value:c}:c}},"binary==":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)==b(c,e,f,g);return d?{value:c}:c}},"binary!=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)!=b(c,e,f,g);return d?{value:c}:c}},"binary<":function(a,b,d){return function(c,e,f,g){c=a(c,e,
|
||||
f,g)<b(c,e,f,g);return d?{value:c}:c}},"binary>":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||
|
||||
b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,h){e=a(e,f,g,h)?b(e,f,g,h):d(e,f,g,h);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d,c,e){return function(f,g,h,k){f=g&&a in g?g:f;c&&1!==c&&f&&!f[a]&&(f[a]={});g=f?f[a]:void 0;b&&ra(g,e);return d?{context:f,name:a,value:g}:g}},computedMember:function(a,b,d,c,e){return function(f,g,h,k){var l=a(f,g,h,k),m,n;null!=l&&(m=b(f,
|
||||
g,h,k),m+="",Sa(m,e),c&&1!==c&&(Ib(l),l&&!l[m]&&(l[m]={})),n=l[m],ra(n,e));return d?{context:l,name:m,value:n}:n}},nonComputedMember:function(a,b,d,c,e,f){return function(g,h,k,l){g=a(g,h,k,l);e&&1!==e&&(Ib(g),g&&!g[b]&&(g[b]={}));h=null!=g?g[b]:void 0;(d||Jb(b))&&ra(h,f);return c?{context:g,name:b,value:h}:h}},inputs:function(a,b){return function(d,c,e,f){return f?f[b]:a(d,c,e)}}};var kc=function(a,b,d){this.lexer=a;this.$filter=b;this.options=d;this.ast=new s(a,d);this.astCompiler=d.csp?new ud(this.ast,
|
||||
b):new td(this.ast,b)};kc.prototype={constructor:kc,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var ng=Object.prototype.valueOf,sa=N("$sce"),la={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},pg=N("$compile"),$=C.document.createElement("a"),yd=Y(C.location.href);zd.$inject=["$document"];Mc.$inject=["$provide"];var Gd=22,Fd=".",mc="0";Ad.$inject=["$locale"];Cd.$inject=["$locale"];var Ag={yyyy:ba("FullYear",4,0,!1,!0),yy:ba("FullYear",2,0,
|
||||
!0,!0),y:ba("FullYear",1,0,!1,!0),MMMM:kb("Month"),MMM:kb("Month",!0),MM:ba("Month",2,1),M:ba("Month",1,1),LLLL:kb("Month",!1,!0),dd:ba("Date",2),d:ba("Date",1),HH:ba("Hours",2),H:ba("Hours",1),hh:ba("Hours",2,-12),h:ba("Hours",1,-12),mm:ba("Minutes",2),m:ba("Minutes",1),ss:ba("Seconds",2),s:ba("Seconds",1),sss:ba("Milliseconds",3),EEEE:kb("Day"),EEE:kb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Kb(Math[0<a?"floor":"ceil"](a/
|
||||
60),2)+Kb(Math.abs(a%60),2))},ww:Id(2),w:Id(1),G:nc,GG:nc,GGG:nc,GGGG:function(a,b){return 0>=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},zg=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,yg=/^\-?\d+$/;Bd.$inject=["$locale"];var tg=ha(Q),ug=ha(ub);Dd.$inject=["$parse"];var oe=ha({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===ma.call(b.prop("href"))?
|
||||
"xlink:href":"href";b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),vb={};q(Eb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!=a){var c=Aa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});vb[c]=function(){return{restrict:"A",priority:100,link:e}}}});q(bd,function(a,b){vb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"==e.ngPattern.charAt(0)&&(c=e.ngPattern.match(Cg))){e.$set("ngPattern",
|
||||
new RegExp(c[1],c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});q(["src","srcset","href"],function(a){var b=Aa("ng-"+a);vb[b]=function(){return{priority:99,link:function(d,c,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===ma.call(c.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null);e.$observe(b,function(b){b?(e.$set(g,b),Ea&&f&&c.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Lb={$addControl:A,$$renameControl:function(a,b){a.$name=b},$removeControl:A,$setValidity:A,
|
||||
$setDirty:A,$setPristine:A,$setSubmitted:A};Jd.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Sd=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||A}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Jd,compile:function(d,f){d.addClass(Ua).addClass(ob);var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var n=f[0];if(!("action"in e)){var p=function(b){a.$apply(function(){n.$commitViewValue();
|
||||
n.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",p,!1);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",p,!1)},0,!1)})}(f[1]||n.$$parentForm).$addControl(n);var q=g?c(n.$name):A;g&&(q(a,n),e.$observe(g,function(b){n.$name!==b&&(q(a,void 0),n.$$parentForm.$$renameControl(n,b),q=c(n.$name),q(a,n))}));d.on("$destroy",function(){n.$$parentForm.$removeControl(n);q(a,void 0);S(n,Lb)})}}}}}]},pe=Sd(),Ce=Sd(!0),Bg=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
|
||||
Kg=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Lg=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,Mg=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Td=/^(\d{4,})-(\d{2})-(\d{2})$/,Ud=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,rc=/^(\d{4,})-W(\d\d)$/,Vd=/^(\d{4,})-(\d\d)$/,
|
||||
Wd=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Ld=U();q(["date","datetime-local","month","time","week"],function(a){Ld[a]=!0});var Xd={text:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c)},date:mb("date",Td,Nb(Td,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mb("datetimelocal",Ud,Nb(Ud,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:mb("time",Wd,Nb(Wd,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mb("week",rc,function(a,b){if(da(a))return a;if(G(a)){rc.lastIndex=0;var d=rc.exec(a);
|
||||
if(d){var c=+d[1],e=+d[2],f=d=0,g=0,h=0,k=Hd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds());return new Date(c,0,k.getDate()+e,d,f,g,h)}}return NaN},"yyyy-Www"),month:mb("month",Vd,Nb(Vd,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f){Md(a,b,d,c);lb(a,b,d,c,e,f);c.$$parserName="number";c.$parsers.push(function(a){if(c.$isEmpty(a))return null;if(Mg.test(a))return parseFloat(a)});c.$formatters.push(function(a){if(!c.$isEmpty(a)){if(!T(a))throw nb("numfmt",
|
||||
a);a=a.toString()}return a});if(w(d.min)||d.ngMin){var g;c.$validators.min=function(a){return c.$isEmpty(a)||y(g)||a>=g};d.$observe("min",function(a){w(a)&&!T(a)&&(a=parseFloat(a));g=T(a)&&!isNaN(a)?a:void 0;c.$validate()})}if(w(d.max)||d.ngMax){var h;c.$validators.max=function(a){return c.$isEmpty(a)||y(h)||a<=h};d.$observe("max",function(a){w(a)&&!T(a)&&(a=parseFloat(a));h=T(a)&&!isNaN(a)?a:void 0;c.$validate()})}},url:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c);c.$$parserName="url";c.$validators.url=
|
||||
function(a,b){var d=a||b;return c.$isEmpty(d)||Kg.test(d)}},email:function(a,b,d,c,e,f){lb(a,b,d,c,e,f);pc(c);c.$$parserName="email";c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||Lg.test(d)}},radio:function(a,b,d,c){y(d.name)&&b.attr("name",++pb);b.on("click",function(a){b[0].checked&&c.$setViewValue(d.value,a&&a.type)});c.$render=function(){b[0].checked=d.value==c.$viewValue};d.$observe("value",c.$render)},checkbox:function(a,b,d,c,e,f,g,h){var k=Nd(h,a,"ngTrueValue",d.ngTrueValue,
|
||||
!0),l=Nd(h,a,"ngFalseValue",d.ngFalseValue,!1);b.on("click",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty=function(a){return!1===a};c.$formatters.push(function(a){return na(a,k)});c.$parsers.push(function(a){return a?k:l})},hidden:A,button:A,submit:A,reset:A,file:A},Gc=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Xd[Q(g.type)]||Xd.text)(e,f,
|
||||
g,h[0],b,a,d,c)}}}}],Ng=/^(true|false|\d+)$/,Ue=function(){return{restrict:"A",priority:100,compile:function(a,b){return Ng.test(b.ngValue)?function(a,b,e){e.$set("value",a.$eval(e.ngValue))}:function(a,b,e){a.$watch(e.ngValue,function(a){e.$set("value",a)})}}}},ue=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=y(a)?"":a})}}}}],we=["$interpolate","$compile",
|
||||
function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=y(a)?"":a})}}}}],ve=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=
|
||||
f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],Te=ha({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),xe=qc("",!0),ze=qc("Odd",0),ye=qc("Even",1),Ae=Ta({compile:function(a,b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),Be=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Lc={},Og={blur:!0,focus:!0};q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),
|
||||
function(a){var b=Aa("ng-"+a);Lc[b]=["$parse","$rootScope",function(d,c){return{restrict:"A",compile:function(e,f){var g=d(f[b],null,!0);return function(b,d){d.on(a,function(d){var e=function(){g(b,{$event:d})};Og[a]&&c.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var Ee=["$animate","$compile",function(a,b){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var h,k,l;d.$watch(e.ngIf,function(d){d?k||g(function(d,f){k=f;d[d.length++]=
|
||||
b.$$createComment("end ngIf",e.ngIf);h={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),k&&(k.$destroy(),k=null),h&&(l=tb(h.clone),a.leave(l).then(function(){l=null}),h=null))})}}}],Fe=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(c,e,m,n,p){var q=0,s,B,r,y=function(){B&&(B.remove(),B=null);s&&
|
||||
(s.$destroy(),s=null);r&&(d.leave(r).then(function(){B=null}),B=r,r=null)};c.$watch(f,function(f){var m=function(){!w(h)||h&&!c.$eval(h)||b()},t=++q;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===q){var b=c.$new();n.template=a;a=p(b,function(a){y();d.enter(a,null,e).then(m)});s=b;r=a;s.$emit("$includeContentLoaded",f);c.$eval(g)}},function(){c.$$destroyed||t!==q||(y(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(y(),n.template=null)})}}}}],We=["$compile",function(a){return{restrict:"ECA",
|
||||
priority:-400,require:"ngInclude",link:function(b,d,c,e){ma.call(d[0]).match(/SVG/)?(d.empty(),a(Oc(e.template,C.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],Ge=Ta({priority:450,compile:function(){return{pre:function(a,b,d){a.$eval(d.ngInit)}}}}),Se=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=b.attr(d.$attr.ngList)||", ",f="false"!==d.ngTrim,g=f?W(e):e;c.$parsers.push(function(a){if(!y(a)){var b=
|
||||
[];a&&q(a.split(g),function(a){a&&b.push(f?W(a):a)});return b}});c.$formatters.push(function(a){if(L(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},ob="ng-valid",Od="ng-invalid",Ua="ng-pristine",Mb="ng-dirty",Qd="ng-pending",nb=N("ngModel"),Pg=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,c,e,f,g,h,k,l){this.$modelValue=this.$viewValue=Number.NaN;this.$$rawModelValue=void 0;this.$validators={};
|
||||
this.$asyncValidators={};this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$untouched=!0;this.$touched=!1;this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$error={};this.$$success={};this.$pending=void 0;this.$name=l(d.name||"",!1)(a);this.$$parentForm=Lb;var m=e(d.ngModel),n=m.assign,p=m,u=n,s=null,B,r=this;this.$$setOptions=function(a){if((r.$options=a)&&a.getterSetter){var b=e(d.ngModel+"()"),f=e(d.ngModel+"($$$p)");p=function(a){var c=m(a);z(c)&&(c=b(a));
|
||||
return c};u=function(a,b){z(m(a))?f(a,{$$$p:b}):n(a,b)}}else if(!m.assign)throw nb("nonassign",d.ngModel,ya(c));};this.$render=A;this.$isEmpty=function(a){return y(a)||""===a||null===a||a!==a};this.$$updateEmptyClasses=function(a){r.$isEmpty(a)?(f.removeClass(c,"ng-not-empty"),f.addClass(c,"ng-empty")):(f.removeClass(c,"ng-empty"),f.addClass(c,"ng-not-empty"))};var J=0;Kd({ctrl:this,$element:c,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:f});this.$setPristine=function(){r.$dirty=
|
||||
!1;r.$pristine=!0;f.removeClass(c,Mb);f.addClass(c,Ua)};this.$setDirty=function(){r.$dirty=!0;r.$pristine=!1;f.removeClass(c,Ua);f.addClass(c,Mb);r.$$parentForm.$setDirty()};this.$setUntouched=function(){r.$touched=!1;r.$untouched=!0;f.setClass(c,"ng-untouched","ng-touched")};this.$setTouched=function(){r.$touched=!0;r.$untouched=!1;f.setClass(c,"ng-touched","ng-untouched")};this.$rollbackViewValue=function(){g.cancel(s);r.$viewValue=r.$$lastCommittedViewValue;r.$render()};this.$validate=function(){if(!T(r.$modelValue)||
|
||||
!isNaN(r.$modelValue)){var a=r.$$rawModelValue,b=r.$valid,c=r.$modelValue,d=r.$options&&r.$options.allowInvalid;r.$$runValidators(a,r.$$lastCommittedViewValue,function(e){d||b===e||(r.$modelValue=e?a:void 0,r.$modelValue!==c&&r.$$writeModelToScope())})}};this.$$runValidators=function(a,b,c){function d(){var c=!0;q(r.$validators,function(d,e){var g=d(a,b);c=c&&g;f(e,g)});return c?!0:(q(r.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;q(r.$asyncValidators,function(e,g){var h=
|
||||
e(a,b);if(!h||!z(h.then))throw nb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?k.all(c).then(function(){g(d)},A):g(!0)}function f(a,b){h===J&&r.$setValidity(a,b)}function g(a){h===J&&c(a)}J++;var h=J;(function(){var a=r.$$parserName||"parse";if(y(B))f(a,null);else return B||(q(r.$validators,function(a,b){f(b,null)}),q(r.$asyncValidators,function(a,b){f(b,null)})),f(a,B),B;return!0})()?d()?e():g(!1):g(!1)};this.$commitViewValue=function(){var a=
|
||||
r.$viewValue;g.cancel(s);if(r.$$lastCommittedViewValue!==a||""===a&&r.$$hasNativeValidators)r.$$updateEmptyClasses(a),r.$$lastCommittedViewValue=a,r.$pristine&&this.$setDirty(),this.$$parseAndValidate()};this.$$parseAndValidate=function(){var b=r.$$lastCommittedViewValue;if(B=y(b)?void 0:!0)for(var c=0;c<r.$parsers.length;c++)if(b=r.$parsers[c](b),y(b)){B=!1;break}T(r.$modelValue)&&isNaN(r.$modelValue)&&(r.$modelValue=p(a));var d=r.$modelValue,e=r.$options&&r.$options.allowInvalid;r.$$rawModelValue=
|
||||
b;e&&(r.$modelValue=b,r.$modelValue!==d&&r.$$writeModelToScope());r.$$runValidators(b,r.$$lastCommittedViewValue,function(a){e||(r.$modelValue=a?b:void 0,r.$modelValue!==d&&r.$$writeModelToScope())})};this.$$writeModelToScope=function(){u(a,r.$modelValue);q(r.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}})};this.$setViewValue=function(a,b){r.$viewValue=a;r.$options&&!r.$options.updateOnDefault||r.$$debounceViewValueCommit(b)};this.$$debounceViewValueCommit=function(b){var c=0,d=r.$options;
|
||||
d&&w(d.debounce)&&(d=d.debounce,T(d)?c=d:T(d[b])?c=d[b]:T(d["default"])&&(c=d["default"]));g.cancel(s);c?s=g(function(){r.$commitViewValue()},c):h.$$phase?r.$commitViewValue():a.$apply(function(){r.$commitViewValue()})};a.$watch(function(){var b=p(a);if(b!==r.$modelValue&&(r.$modelValue===r.$modelValue||b===b)){r.$modelValue=r.$$rawModelValue=b;B=void 0;for(var c=r.$formatters,d=c.length,e=b;d--;)e=c[d](e);r.$viewValue!==e&&(r.$$updateEmptyClasses(e),r.$viewValue=r.$$lastCommittedViewValue=e,r.$render(),
|
||||
r.$$runValidators(b,e,A))}return b})}],Re=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Pg,priority:1,compile:function(b){b.addClass(Ua).addClass("ng-untouched").addClass(ob);return{pre:function(a,b,e,f){var g=f[0];b=f[1]||g.$$parentForm;g.$$setOptions(f[2]&&f[2].$options);b.$addControl(g);e.$observe("name",function(a){g.$name!==a&&g.$$parentForm.$$renameControl(g,a)});a.$on("$destroy",function(){g.$$parentForm.$removeControl(g)})},post:function(b,
|
||||
c,e,f){var g=f[0];if(g.$options&&g.$options.updateOn)c.on(g.$options.updateOn,function(a){g.$$debounceViewValueCommit(a&&a.type)});c.on("blur",function(){g.$touched||(a.$$phase?b.$evalAsync(g.$setTouched):b.$apply(g.$setTouched))})}}}}}],Qg=/(\s+|^)default(\s+|$)/,Ve=function(){return{restrict:"A",controller:["$scope","$attrs",function(a,b){var d=this;this.$options=pa(a.$eval(b.ngModelOptions));w(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=W(this.$options.updateOn.replace(Qg,
|
||||
function(){d.$options.updateOnDefault=!0;return" "}))):this.$options.updateOnDefault=!0}]}},He=Ta({terminal:!0,priority:1E3}),Rg=N("ngOptions"),Sg=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,Pe=["$compile","$document","$parse",function(a,b,d){function c(a,b,c){function e(a,b,c,d,f){this.selectValue=a;this.viewValue=
|
||||
b;this.label=c;this.group=d;this.disabled=f}function f(a){var b;if(!q&&ta(a))b=a;else{b=[];for(var c in a)a.hasOwnProperty(c)&&"$"!==c.charAt(0)&&b.push(c)}return b}var n=a.match(Sg);if(!n)throw Rg("iexp",a,ya(b));var p=n[5]||n[7],q=n[6];a=/ as /.test(n[0])&&n[1];var s=n[9];b=d(n[2]?n[1]:p);var w=a&&d(a)||b,r=s&&d(s),y=s?function(a,b){return r(c,b)}:function(a){return Ca(a)},v=function(a,b){return y(a,E(a,b))},A=d(n[2]||n[1]),t=d(n[3]||""),K=d(n[4]||""),z=d(n[8]),H={},E=q?function(a,b){H[q]=b;H[p]=
|
||||
a;return H}:function(a){H[p]=a;return H};return{trackBy:s,getTrackByValue:v,getWatchables:d(z,function(a){var b=[];a=a||[];for(var d=f(a),e=d.length,g=0;g<e;g++){var h=a===d?g:d[g],l=a[h],h=E(l,h),l=y(l,h);b.push(l);if(n[2]||n[1])l=A(c,h),b.push(l);n[4]&&(h=K(c,h),b.push(h))}return b}),getOptions:function(){for(var a=[],b={},d=z(c)||[],g=f(d),h=g.length,n=0;n<h;n++){var p=d===g?n:g[n],q=E(d[p],p),r=w(c,q),p=y(r,q),u=A(c,q),H=t(c,q),q=K(c,q),r=new e(p,r,u,H,q);a.push(r);b[p]=r}return{items:a,selectValueMap:b,
|
||||
getOptionFromViewValue:function(a){return b[v(a)]},getViewValueFromOption:function(a){return s?ca.copy(a.viewValue):a.viewValue}}}}}var e=C.document.createElement("option"),f=C.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(a,b,c,d){d[0].registerOption=A},post:function(d,h,k,l){function m(a,b){a.element=b;b.disabled=a.disabled;a.label!==b.label&&(b.label=a.label,b.textContent=a.label);a.value!==b.value&&(b.value=a.selectValue)}function n(){var a=
|
||||
t&&p.readValue();if(t)for(var b=t.items.length-1;0<=b;b--){var c=t.items[b];w(c.group)?Db(c.element.parentNode):Db(c.element)}t=K.getOptions();var d={};v&&h.prepend(B);t.items.forEach(function(a){var b;if(w(a.group)){b=d[a.group];b||(b=f.cloneNode(!1),C.appendChild(b),b.label=null===a.group?"null":a.group,d[a.group]=b);var c=e.cloneNode(!1)}else b=C,c=e.cloneNode(!1);b.appendChild(c);m(a,c)});h[0].appendChild(C);s.$render();s.$isEmpty(a)||(b=p.readValue(),(K.trackBy||y?na(a,b):a===b)||(s.$setViewValue(b),
|
||||
s.$render()))}var p=l[0],s=l[1],y=k.multiple,B;l=0;for(var r=h.children(),A=r.length;l<A;l++)if(""===r[l].value){B=r.eq(l);break}var v=!!B,z=F(e.cloneNode(!1));z.val("?");var t,K=c(k.ngOptions,h,d),C=b[0].createDocumentFragment();y?(s.$isEmpty=function(a){return!a||0===a.length},p.writeValue=function(a){t.items.forEach(function(a){a.element.selected=!1});a&&a.forEach(function(a){if(a=t.getOptionFromViewValue(a))a.element.selected=!0})},p.readValue=function(){var a=h.val()||[],b=[];q(a,function(a){(a=
|
||||
t.selectValueMap[a])&&!a.disabled&&b.push(t.getViewValueFromOption(a))});return b},K.trackBy&&d.$watchCollection(function(){if(L(s.$viewValue))return s.$viewValue.map(function(a){return K.getTrackByValue(a)})},function(){s.$render()})):(p.writeValue=function(a){var b=t.getOptionFromViewValue(a);b?(h[0].value!==b.selectValue&&(z.remove(),v||B.remove(),h[0].value=b.selectValue,b.element.selected=!0),b.element.setAttribute("selected","selected")):null===a||v?(z.remove(),v||h.prepend(B),h.val(""),B.prop("selected",
|
||||
!0),B.attr("selected",!0)):(v||B.remove(),h.prepend(z),h.val("?"),z.prop("selected",!0),z.attr("selected",!0))},p.readValue=function(){var a=t.selectValueMap[h.val()];return a&&!a.disabled?(v||B.remove(),z.remove(),t.getViewValueFromOption(a)):null},K.trackBy&&d.$watch(function(){return K.getTrackByValue(s.$viewValue)},function(){s.$render()}));v?(B.remove(),a(B)(d),B.removeClass("ng-scope")):B=F(e.cloneNode(!1));h.empty();n();d.$watchCollection(K.getWatchables,n)}}}}],Ie=["$locale","$interpolate",
|
||||
"$log",function(a,b,d){var c=/{}/g,e=/^when(Minus)?(.+)$/;return{link:function(f,g,h){function k(a){g.text(a||"")}var l=h.count,m=h.$attr.when&&g.attr(h.$attr.when),n=h.offset||0,p=f.$eval(m)||{},s={},w=b.startSymbol(),B=b.endSymbol(),r=w+l+"-"+n+B,z=ca.noop,v;q(h,function(a,b){var c=e.exec(b);c&&(c=(c[1]?"-":"")+Q(c[2]),p[c]=g.attr(h.$attr[b]))});q(p,function(a,d){s[d]=b(a.replace(c,r))});f.$watch(l,function(b){var c=parseFloat(b),e=isNaN(c);e||c in p||(c=a.pluralCat(c-n));c===v||e&&T(v)&&isNaN(v)||
|
||||
(z(),e=s[c],y(e)?(null!=b&&d.debug("ngPluralize: no rule defined for '"+c+"' in "+m),z=A,k()):z=f.$watch(e,k),v=c)})}}}],Je=["$parse","$animate","$compile",function(a,b,d){var c=N("ngRepeat"),e=function(a,b,c,d,e,m,n){a[c]=d;e&&(a[e]=m);a.$index=b;a.$first=0===b;a.$last=b===n-1;a.$middle=!(a.$first||a.$last);a.$odd=!(a.$even=0===(b&1))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1E3,terminal:!0,$$tlb:!0,compile:function(f,g){var h=g.ngRepeat,k=d.$$createComment("end ngRepeat",
|
||||
h),l=h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!l)throw c("iexp",h);var m=l[1],n=l[2],p=l[3],s=l[4],l=m.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/);if(!l)throw c("iidexp",m);var w=l[3]||l[1],y=l[2];if(p&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(p)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(p)))throw c("badident",p);var r,z,v,A,t={$id:Ca};s?r=a(s):(v=function(a,b){return Ca(b)},
|
||||
A=function(a){return a});return function(a,d,f,g,l){r&&(z=function(b,c,d){y&&(t[y]=b);t[w]=c;t.$index=d;return r(a,t)});var m=U();a.$watchCollection(n,function(f){var g,n,r=d[0],s,u=U(),t,C,F,E,G,D,H;p&&(a[p]=f);if(ta(f))G=f,n=z||v;else for(H in n=z||A,G=[],f)ua.call(f,H)&&"$"!==H.charAt(0)&&G.push(H);t=G.length;H=Array(t);for(g=0;g<t;g++)if(C=f===G?g:G[g],F=f[C],E=n(C,F,g),m[E])D=m[E],delete m[E],u[E]=D,H[g]=D;else{if(u[E])throw q(H,function(a){a&&a.scope&&(m[a.id]=a)}),c("dupes",h,E,F);H[g]={id:E,
|
||||
scope:void 0,clone:void 0};u[E]=!0}for(s in m){D=m[s];E=tb(D.clone);b.leave(E);if(E[0].parentNode)for(g=0,n=E.length;g<n;g++)E[g].$$NG_REMOVED=!0;D.scope.$destroy()}for(g=0;g<t;g++)if(C=f===G?g:G[g],F=f[C],D=H[g],D.scope){s=r;do s=s.nextSibling;while(s&&s.$$NG_REMOVED);D.clone[0]!=s&&b.move(tb(D.clone),null,r);r=D.clone[D.clone.length-1];e(D.scope,g,w,F,y,C,t)}else l(function(a,c){D.scope=c;var d=k.cloneNode(!1);a[a.length++]=d;b.enter(a,null,r);r=d;D.clone=a;u[D.id]=D;e(D.scope,g,w,F,y,C,t)});m=
|
||||
u})}}}}],Ke=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngShow,function(b){a[b?"removeClass":"addClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],De=["$animate",function(a){return{restrict:"A",multiElement:!0,link:function(b,d,c){b.$watch(c.ngHide,function(b){a[b?"addClass":"removeClass"](d,"ng-hide",{tempClasses:"ng-hide-animate"})})}}}],Le=Ta(function(a,b,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&q(d,function(a,c){b.css(c,"")});a&&b.css(a)},
|
||||
!0)}),Me=["$animate","$compile",function(a,b){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(d,c,e,f){var g=[],h=[],k=[],l=[],m=function(a,b){return function(){a.splice(b,1)}};d.$watch(e.ngSwitch||e.on,function(c){var d,e;d=0;for(e=k.length;d<e;++d)a.cancel(k[d]);d=k.length=0;for(e=l.length;d<e;++d){var s=tb(h[d].clone);l[d].$destroy();(k[d]=a.leave(s)).then(m(k,d))}h.length=0;l.length=0;(g=f.cases["!"+c]||f.cases["?"])&&q(g,function(c){c.transclude(function(d,
|
||||
e){l.push(e);var f=c.element;d[d.length++]=b.$$createComment("end ngSwitchWhen");h.push({clone:d});a.enter(d,f.parent(),f)})})})}}}],Ne=Ta({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["!"+d.ngSwitchWhen]=c.cases["!"+d.ngSwitchWhen]||[];c.cases["!"+d.ngSwitchWhen].push({transclude:e,element:b})}}),Oe=Ta({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(a,b,d,c,e){c.cases["?"]=c.cases["?"]||[];c.cases["?"].push({transclude:e,
|
||||
element:b})}}),Tg=N("ngTransclude"),Qe=["$compile",function(a){return{restrict:"EAC",terminal:!0,compile:function(b){var d=a(b.contents());b.empty();return function(a,b,f,g,h){function k(){d(a,function(a){b.append(a)})}if(!h)throw Tg("orphan",ya(b));f.ngTransclude===f.$attr.ngTransclude&&(f.ngTransclude="");f=f.ngTransclude||f.ngTranscludeSlot;h(function(a,c){a.length?b.append(a):(k(),c.$destroy())},null,f);f&&!h.isSlotFilled(f)&&k()}}}}],qe=["$templateCache",function(a){return{restrict:"E",terminal:!0,
|
||||
compile:function(b,d){"text/ng-template"==d.type&&a.put(d.id,b[0].text)}}}],Ug={$setViewValue:A,$render:A},Vg=["$element","$scope",function(a,b){var d=this,c=new Ra;d.ngModelCtrl=Ug;d.unknownOption=F(C.document.createElement("option"));d.renderUnknownOption=function(b){b="? "+Ca(b)+" ?";d.unknownOption.val(b);a.prepend(d.unknownOption);a.val(b)};b.$on("$destroy",function(){d.renderUnknownOption=A});d.removeUnknownOption=function(){d.unknownOption.parent()&&d.unknownOption.remove()};d.readValue=function(){d.removeUnknownOption();
|
||||
return a.val()};d.writeValue=function(b){d.hasOption(b)?(d.removeUnknownOption(),a.val(b),""===b&&d.emptyOption.prop("selected",!0)):null==b&&d.emptyOption?(d.removeUnknownOption(),a.val("")):d.renderUnknownOption(b)};d.addOption=function(a,b){if(8!==b[0].nodeType){Qa(a,'"option value"');""===a&&(d.emptyOption=b);var g=c.get(a)||0;c.put(a,g+1);d.ngModelCtrl.$render();b[0].hasAttribute("selected")&&(b[0].selected=!0)}};d.removeOption=function(a){var b=c.get(a);b&&(1===b?(c.remove(a),""===a&&(d.emptyOption=
|
||||
void 0)):c.put(a,b-1))};d.hasOption=function(a){return!!c.get(a)};d.registerOption=function(a,b,c,h,k){if(h){var l;c.$observe("value",function(a){w(l)&&d.removeOption(l);l=a;d.addOption(a,b)})}else k?a.$watch(k,function(a,e){c.$set("value",a);e!==a&&d.removeOption(e);d.addOption(a,b)}):d.addOption(c.value,b);b.on("$destroy",function(){d.removeOption(c.value);d.ngModelCtrl.$render()})}}],re=function(){return{restrict:"E",require:["select","?ngModel"],controller:Vg,priority:1,link:{pre:function(a,b,
|
||||
d,c){var e=c[1];if(e){var f=c[0];f.ngModelCtrl=e;b.on("change",function(){a.$apply(function(){e.$setViewValue(f.readValue())})});if(d.multiple){f.readValue=function(){var a=[];q(b.find("option"),function(b){b.selected&&a.push(b.value)});return a};f.writeValue=function(a){var c=new Ra(a);q(b.find("option"),function(a){a.selected=w(c.get(a.value))})};var g,h=NaN;a.$watch(function(){h!==e.$viewValue||na(g,e.$viewValue)||(g=ia(e.$viewValue),e.$render());h=e.$viewValue});e.$isEmpty=function(a){return!a||
|
||||
0===a.length}}}},post:function(a,b,d,c){var e=c[1];if(e){var f=c[0];e.$render=function(){f.writeValue(e.$viewValue)}}}}}},te=["$interpolate",function(a){return{restrict:"E",priority:100,compile:function(b,d){if(w(d.value))var c=a(d.value,!0);else{var e=a(b.text(),!0);e||d.$set("value",b.text())}return function(a,b,d){var k=b.parent();(k=k.data("$selectController")||k.parent().data("$selectController"))&&k.registerOption(a,b,d,c,e)}}}}],se=ha({restrict:"E",terminal:!1}),Ic=function(){return{restrict:"A",
|
||||
require:"?ngModel",link:function(a,b,d,c){c&&(d.required=!0,c.$validators.required=function(a,b){return!d.required||!c.$isEmpty(b)},d.$observe("required",function(){c.$validate()}))}}},Hc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e,f=d.ngPattern||d.pattern;d.$observe("pattern",function(a){G(a)&&0<a.length&&(a=new RegExp("^"+a+"$"));if(a&&!a.test)throw N("ngPattern")("noregexp",f,a,ya(b));e=a||void 0;c.$validate()});c.$validators.pattern=function(a,b){return c.$isEmpty(b)||
|
||||
y(e)||e.test(b)}}}}},Kc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=-1;d.$observe("maxlength",function(a){a=Z(a);e=isNaN(a)?-1:a;c.$validate()});c.$validators.maxlength=function(a,b){return 0>e||c.$isEmpty(b)||b.length<=e}}}}},Jc=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,d,c){if(c){var e=0;d.$observe("minlength",function(a){e=Z(a)||0;c.$validate()});c.$validators.minlength=function(a,b){return c.$isEmpty(b)||b.length>=e}}}}};C.angular.bootstrap?
|
||||
C.console&&console.log("WARNING: Tried to load angular more than once."):(je(),le(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),
|
||||
SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",
|
||||
PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),F(C.document).ready(function(){fe(C.document,Bc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>');
|
||||
//# sourceMappingURL=angular.min.js.map
|
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -1,9 +0,0 @@
|
||||
{
|
||||
"name": "angular",
|
||||
"version": "1.5.8",
|
||||
"license": "MIT",
|
||||
"main": "./angular.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
require('./angular');
|
||||
module.exports = angular;
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "angular",
|
||||
"version": "1.5.8",
|
||||
"description": "HTML enhanced for web apps",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org"
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
{
|
||||
"name": "jquery.maskedinput",
|
||||
"version": "1.4.1",
|
||||
"homepage": "http://digitalbush.com/projects/masked-input-plugin/",
|
||||
"authors": [
|
||||
"Josh Bush (digitalbush.com)"
|
||||
],
|
||||
"description": "jQuery Masked Input Plugin",
|
||||
"main": "./dist/jquery.maskedinput.js",
|
||||
"moduleType": [
|
||||
"es6"
|
||||
],
|
||||
"keywords": [
|
||||
"input",
|
||||
"form",
|
||||
"mask",
|
||||
"jquery"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"spec",
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.8.3"
|
||||
},
|
||||
"_release": "1.4.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.1",
|
||||
"commit": "f19728180c604c1b0c62d6aa97af262c0c04d71c"
|
||||
},
|
||||
"_source": "https://github.com/digitalBush/jquery.maskedinput.git",
|
||||
"_target": "^1.4.1",
|
||||
"_originalSource": "jquery.maskedinput"
|
||||
}
|
@ -1,127 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
Please take a moment to review this document in order to make the contribution
|
||||
process easy and effective for everyone involved!
|
||||
|
||||
## Using the issue tracker
|
||||
|
||||
The issue tracker is for:
|
||||
* [Bug Reports](#bug-reports)
|
||||
* [Feature Requests](#feature-requests)
|
||||
* [Submitting Pull Requests](#pull-requests)
|
||||
|
||||
Please **do not** use the issue tracker for personal support requests.
|
||||
|
||||
## Bug Reports
|
||||
|
||||
A bug is a _demonstrable problem_ that is caused by the code in the repository.
|
||||
|
||||
Guidelines for bug reports:
|
||||
|
||||
1. **Use the GitHub issue search** — check if the issue has already been
|
||||
reported.
|
||||
|
||||
2. **Check if the issue has been fixed** — try to reproduce it using the
|
||||
`master` branch in the repository.
|
||||
|
||||
3. **Isolate and report the problem** — ideally create a reduced test
|
||||
case or a small [jsfiddle](http://jsfiddle.net) showing the issue.
|
||||
|
||||
Please try to be as detailed as possible in your report. Include information about
|
||||
your operating system, browser, jQuery version, and masked input plugin version.
|
||||
Please provide steps to reproduce the issue as well as the outcome you were expecting.
|
||||
|
||||
## Feature Requests
|
||||
|
||||
Feature requests are welcome. It's up to *you* to make a strong case of the merits of
|
||||
this feature. Please provide as much detail and context as possible.
|
||||
|
||||
Features that have a very narrow use case are unlikely to be accepted unless we
|
||||
can come up with a way to come to a more general solution. Please don't let
|
||||
that stop you from sharing your ideas, just keep that in mind.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Good pull requests are very helpful. They should remain focused
|
||||
in scope and avoid containing unrelated commits.
|
||||
|
||||
**IMPORTANT**: By submitting a patch, you agree that your work will be
|
||||
licensed under the license used by the project.
|
||||
|
||||
If you have any large pull request in mind (e.g. implementing features,
|
||||
refactoring code, etc), **please ask first** otherwise you risk spending
|
||||
a lot of time working on something that the project's developers might
|
||||
not want to merge into the project.
|
||||
|
||||
Please adhere to the coding conventions in the project (indentation,
|
||||
accurate comments, etc.) and don't forget to add your own tests and
|
||||
documentation. When working with git, we recommend the following process
|
||||
in order to craft an excellent pull request:
|
||||
|
||||
1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
|
||||
and configure the remotes:
|
||||
|
||||
```bash
|
||||
# Clone your fork of the repo into the current directory
|
||||
git clone https://github.com/<your-username>/jquery.maskedinput
|
||||
# Navigate to the newly cloned directory
|
||||
cd jquery.maskedinput
|
||||
# Assign the original repo to a remote called "upstream"
|
||||
git remote add upstream https://github.com/digitalBush/jquery.maskedinput
|
||||
```
|
||||
|
||||
2. If you cloned a while ago, get the latest changes from upstream:
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
```
|
||||
|
||||
3. Create a new topic branch (off of `master`) to contain your feature, change,
|
||||
or fix.
|
||||
|
||||
**IMPORTANT**: Making changes in `master` is discouraged. You should always
|
||||
keep your local `master` in sync with upstream `master` and make your
|
||||
changes in topic branches.
|
||||
|
||||
```bash
|
||||
git checkout -b <topic-branch-name>
|
||||
```
|
||||
|
||||
4. Commit your changes in logical chunks. Keep your commit messages organized,
|
||||
with a short description in the first line and more detailed information on
|
||||
the following lines.
|
||||
|
||||
Please use git's
|
||||
[interactive rebase](https://help.github.com/articles/interactive-rebase)
|
||||
feature to tidy up your commits before making them public. Ideally when you
|
||||
are finished you'll have a single commit.
|
||||
|
||||
5. Make sure all the tests are still passing.
|
||||
|
||||
```bash
|
||||
npm test
|
||||
```
|
||||
|
||||
6. Push your topic branch up to your fork:
|
||||
|
||||
```bash
|
||||
git push origin <topic-branch-name>
|
||||
```
|
||||
|
||||
7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
|
||||
with a clear title and description.
|
||||
|
||||
8. If you haven't updated your pull request for a while, you should consider
|
||||
rebasing on master and resolving any conflicts.
|
||||
|
||||
**IMPORTANT**: _Never ever_ merge upstream `master` into your branches. You
|
||||
should always `git rebase` on `master` to bring your changes up to date when
|
||||
necessary.
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
git checkout <your-topic-branch>
|
||||
git rebase master
|
||||
```
|
@ -1,22 +0,0 @@
|
||||
Copyright (c) 2007-2015 Josh Bush (digitalbush.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.
|
@ -1,95 +0,0 @@
|
||||
Masked Input Plugin for jQuery
|
||||
==============================
|
||||
[![Build Status](https://travis-ci.org/digitalBush/jquery.maskedinput.png)](https://travis-ci.org/digitalBush/jquery.maskedinput)
|
||||
Overview
|
||||
--------
|
||||
This is a masked input plugin for the jQuery javascript library. It allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format (dates,phone numbers, etc). It has been tested on Internet Explorer, Firefox, Safari, Opera, and Chrome. A mask is defined by a format made up of mask literals and mask definitions. Any character not in the definitions list below is considered a mask literal. Mask literals will be automatically entered for the user as they type and will not be able to be removed by the user.The following mask definitions are predefined:
|
||||
|
||||
* a - Represents an alpha character (A-Z,a-z)
|
||||
* 9 - Represents a numeric character (0-9)
|
||||
* \* - Represents an alphanumeric character (A-Z,a-z,0-9)
|
||||
|
||||
### Usage
|
||||
First, include the jQuery and masked input javascript files.
|
||||
|
||||
```html
|
||||
<script src="jquery.js" type="text/javascript"></script>
|
||||
<script src="jquery.maskedinput.js" type="text/javascript"></script>
|
||||
```
|
||||
|
||||
Next, call the mask function for those items you wish to have masked.
|
||||
|
||||
```html
|
||||
jQuery(function($){
|
||||
$("#date").mask("99/99/9999");
|
||||
$("#phone").mask("(999) 999-9999");
|
||||
$("#tin").mask("99-9999999");
|
||||
$("#ssn").mask("999-99-9999");
|
||||
});
|
||||
```
|
||||
|
||||
Optionally, if you are not satisfied with the underscore ('_') character as a placeholder, you may pass an optional argument to the maskedinput method.
|
||||
|
||||
```html
|
||||
jQuery(function($){
|
||||
$("#product").mask("99/99/9999",{placeholder:" "});
|
||||
});
|
||||
```
|
||||
|
||||
Optionally, if you would like to execute a function once the mask has been completed, you can specify that function as an optional argument to the maskedinput method.
|
||||
|
||||
```html
|
||||
jQuery(function($){
|
||||
$("#product").mask("99/99/9999",{completed:function(){alert("You typed the following: "+this.val());}});
|
||||
});
|
||||
```
|
||||
|
||||
You can now supply your own mask definitions.
|
||||
```html
|
||||
jQuery(function($){
|
||||
$.mask.definitions['~']='[+-]';
|
||||
$("#eyescript").mask("~9.99 ~9.99 999");
|
||||
});
|
||||
```
|
||||
|
||||
You can have part of your mask be optional. Anything listed after '?' within the mask is considered optional user input. The common example for this is phone number + optional extension.
|
||||
|
||||
```html
|
||||
jQuery(function($){
|
||||
$("#phone").mask("(999) 999-9999? x99999");
|
||||
});
|
||||
```
|
||||
|
||||
If your requirements aren't met by the predefined placeholders, you can always add your own. For example, maybe you need a mask to only allow hexadecimal characters. You can add your own definition for a placeholder, say 'h', like so: `$.mask.definitions['h'] = "[A-Fa-f0-9]";` Then you can use that to mask for something like css colors in hex with a `mask "#hhhhhh"`.
|
||||
|
||||
```html
|
||||
jQuery(function($){
|
||||
$("#phone").mask("#hhhhhh");
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
By design, this plugin will reject input which doesn't complete the mask. You can bypass this by using a '?' character at the position where you would like to consider input optional. For example, a mask of "(999) 999-9999? x99999" would require only the first 10 digits of a phone number with extension being optional.
|
||||
|
||||
|
||||
Getting the bits
|
||||
----------------
|
||||
We generally recommend that you use [bower](http://bower.io) to install jquery.maskedinput plugin.
|
||||
|
||||
$ bower install --save jquery.maskedinput
|
||||
|
||||
|
||||
Setting up your Developer Environment
|
||||
-------------------------------------
|
||||
jQuery Masked Input uses [NodeJS](http://www.nodejs.org) and [GruntJS](http://www.gruntjs.com) as it's developer platform and build automation tool.
|
||||
|
||||
To get your environment setup correctly, you'll need nodejs version 0.8.25 or greater installed. You'll also need to install the grunt command line tool:
|
||||
|
||||
$ sudo npm install -g grunt-cli
|
||||
|
||||
Once node is installed on your system all that you need to do is install the developer dependencies and run the grunt build:
|
||||
|
||||
$ npm install
|
||||
$ grunt
|
||||
|
||||
All of the tests for jQuery Masked Input are run using the [jasmine](http://jasmine.github.io/) test runner.
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"name": "jquery.maskedinput",
|
||||
"version": "1.4.1",
|
||||
"homepage": "http://digitalbush.com/projects/masked-input-plugin/",
|
||||
"authors": [
|
||||
"Josh Bush (digitalbush.com)"
|
||||
],
|
||||
"description": "jQuery Masked Input Plugin",
|
||||
"main": "./dist/jquery.maskedinput.js",
|
||||
"moduleType": [
|
||||
"es6"
|
||||
],
|
||||
"keywords": [
|
||||
"input",
|
||||
"form",
|
||||
"mask",
|
||||
"jquery"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"spec",
|
||||
"lib"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": ">=1.8.3"
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title> datepicker demo </title>
|
||||
<script src="../lib/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../src/jquery.maskedinput.js" type="text/javascript"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<link type="text/css" rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/redmond/jquery-ui.css" />
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$("#date")
|
||||
.datepicker({ nextText: "", prevText: "", changeMonth: true, changeYear: true })
|
||||
.mask("99/99/9999");
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><td>Date</td><td><input id="date" value="1231" type="text" tabindex="1" /></td><td>99/99/9999</td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -1,49 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title> jQuery Mask Test </title>
|
||||
<script src="../lib/jquery-1.9.0.min.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script src="../dist/jquery.maskedinput.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$.mask.definitions['~'] = "[+-]";
|
||||
$("#date").mask("99/99/9999",{placeholder:"mm/dd/yyyy",completed:function(){alert("completed!");}});
|
||||
$(".phone").mask("(999) 999-9999");
|
||||
$("#phoneExt").mask("(999) 999-9999? x99999");
|
||||
$("#iphone").mask("+33 999 999 999");
|
||||
$("#tin").mask("99-9999999");
|
||||
$("#ssn").mask("999-99-9999");
|
||||
$("#product").mask("a*-999-a999", { placeholder: " " });
|
||||
$("#eyescript").mask("~9.99 ~9.99 999");
|
||||
$("#po").mask("PO: aaa-999-***");
|
||||
$("#pct").mask("99%");
|
||||
$("#phoneAutoclearFalse").mask("(999) 999-9999", { autoclear: false, completed:function(){alert("completed autoclear!");} });
|
||||
$("#phoneExtAutoclearFalse").mask("(999) 999-9999? x99999", { autoclear: false });
|
||||
|
||||
$("input").blur(function() {
|
||||
$("#info").html("Unmasked value: " + $(this).mask());
|
||||
}).dblclick(function() {
|
||||
$(this).unmask();
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr><td>Date</td><td><input id="date" value="1231" type="text" tabindex="1" /></td><td>99/99/9999</td></tr>
|
||||
<tr><td>Phone</td><td><input class="phone" type="text" tabindex="2"/></td><td>(999) 999-9999</td></tr>
|
||||
<tr><td>Phone(Readonly)</td><td><input class="phone" type="text" tabindex="2" readonly/></td><td>(999) 999-9999</td></tr>
|
||||
<tr><td>Phone + Ext</td><td><input id="phoneExt" type="text" tabindex="2"/></td><td>(999) 999-9999? x99999</td></tr>
|
||||
<tr><td>Int'l Phone</td><td><input id="iphone" type="text" tabindex="2"/></td><td>+33 999 999 999</td></tr>
|
||||
<tr><td>Tax ID</td><td><input id="tin" type="text" tabindex="3"/></td><td>99-9999999</td></tr>
|
||||
<tr><td>SSN</td><td><input id="ssn" type="text" tabindex="4"/></td><td>999-99-9999</td></tr>
|
||||
<tr><td>Product Key</td><td><input id="product" type="text" tabindex="5"/></td><td>a*-999-a999</td></tr>
|
||||
<tr><td>Eye Script</td><td><input id="eyescript" type="text" tabindex="6"/></td><td>~9.99 ~9.99 999</td></tr>
|
||||
<tr><td>Purchase Order</td><td><input id="po" type="text" tabindex="6"/></td><td>aaa-999-***</td></tr>
|
||||
<tr><td>Percent</td><td><input id="pct" type="text" tabindex="6"/></td><td>99%</td></tr>
|
||||
<tr><td>Phone (autoclear=false)</td><td><input id="phoneAutoclearFalse" type="text" tabindex="6"/></td><td>(999) 999-9999</td></tr>
|
||||
<tr><td>Phone + Ext (autoclear=false)</td><td><input id="phoneExtAutoclearFalse" type="text" tabindex="6"/></td><td>(999) 999-9999? x99999</td></tr>
|
||||
</table>
|
||||
<div id="info"></div>
|
||||
</body>
|
||||
</html>
|
@ -1,182 +0,0 @@
|
||||
/*
|
||||
jQuery Masked Input Plugin
|
||||
Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.4.1
|
||||
*/
|
||||
!function(factory) {
|
||||
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : factory("object" == typeof exports ? require("jquery") : jQuery);
|
||||
}(function($) {
|
||||
var caretTimeoutId, ua = navigator.userAgent, iPhone = /iphone/i.test(ua), chrome = /chrome/i.test(ua), android = /android/i.test(ua);
|
||||
$.mask = {
|
||||
definitions: {
|
||||
"9": "[0-9]",
|
||||
a: "[A-Za-z]",
|
||||
"*": "[A-Za-z0-9]"
|
||||
},
|
||||
autoclear: !0,
|
||||
dataName: "rawMaskFn",
|
||||
placeholder: "_"
|
||||
}, $.fn.extend({
|
||||
caret: function(begin, end) {
|
||||
var range;
|
||||
if (0 !== this.length && !this.is(":hidden")) return "number" == typeof begin ? (end = "number" == typeof end ? end : begin,
|
||||
this.each(function() {
|
||||
this.setSelectionRange ? this.setSelectionRange(begin, end) : this.createTextRange && (range = this.createTextRange(),
|
||||
range.collapse(!0), range.moveEnd("character", end), range.moveStart("character", begin),
|
||||
range.select());
|
||||
})) : (this[0].setSelectionRange ? (begin = this[0].selectionStart, end = this[0].selectionEnd) : document.selection && document.selection.createRange && (range = document.selection.createRange(),
|
||||
begin = 0 - range.duplicate().moveStart("character", -1e5), end = begin + range.text.length),
|
||||
{
|
||||
begin: begin,
|
||||
end: end
|
||||
});
|
||||
},
|
||||
unmask: function() {
|
||||
return this.trigger("unmask");
|
||||
},
|
||||
mask: function(mask, settings) {
|
||||
var input, defs, tests, partialPosition, firstNonMaskPos, lastRequiredNonMaskPos, len, oldVal;
|
||||
if (!mask && this.length > 0) {
|
||||
input = $(this[0]);
|
||||
var fn = input.data($.mask.dataName);
|
||||
return fn ? fn() : void 0;
|
||||
}
|
||||
return settings = $.extend({
|
||||
autoclear: $.mask.autoclear,
|
||||
placeholder: $.mask.placeholder,
|
||||
completed: null
|
||||
}, settings), defs = $.mask.definitions, tests = [], partialPosition = len = mask.length,
|
||||
firstNonMaskPos = null, $.each(mask.split(""), function(i, c) {
|
||||
"?" == c ? (len--, partialPosition = i) : defs[c] ? (tests.push(new RegExp(defs[c])),
|
||||
null === firstNonMaskPos && (firstNonMaskPos = tests.length - 1), partialPosition > i && (lastRequiredNonMaskPos = tests.length - 1)) : tests.push(null);
|
||||
}), this.trigger("unmask").each(function() {
|
||||
function tryFireCompleted() {
|
||||
if (settings.completed) {
|
||||
for (var i = firstNonMaskPos; lastRequiredNonMaskPos >= i; i++) if (tests[i] && buffer[i] === getPlaceholder(i)) return;
|
||||
settings.completed.call(input);
|
||||
}
|
||||
}
|
||||
function getPlaceholder(i) {
|
||||
return settings.placeholder.charAt(i < settings.placeholder.length ? i : 0);
|
||||
}
|
||||
function seekNext(pos) {
|
||||
for (;++pos < len && !tests[pos]; ) ;
|
||||
return pos;
|
||||
}
|
||||
function seekPrev(pos) {
|
||||
for (;--pos >= 0 && !tests[pos]; ) ;
|
||||
return pos;
|
||||
}
|
||||
function shiftL(begin, end) {
|
||||
var i, j;
|
||||
if (!(0 > begin)) {
|
||||
for (i = begin, j = seekNext(end); len > i; i++) if (tests[i]) {
|
||||
if (!(len > j && tests[i].test(buffer[j]))) break;
|
||||
buffer[i] = buffer[j], buffer[j] = getPlaceholder(j), j = seekNext(j);
|
||||
}
|
||||
writeBuffer(), input.caret(Math.max(firstNonMaskPos, begin));
|
||||
}
|
||||
}
|
||||
function shiftR(pos) {
|
||||
var i, c, j, t;
|
||||
for (i = pos, c = getPlaceholder(pos); len > i; i++) if (tests[i]) {
|
||||
if (j = seekNext(i), t = buffer[i], buffer[i] = c, !(len > j && tests[j].test(t))) break;
|
||||
c = t;
|
||||
}
|
||||
}
|
||||
function androidInputEvent() {
|
||||
var curVal = input.val(), pos = input.caret();
|
||||
if (oldVal && oldVal.length && oldVal.length > curVal.length) {
|
||||
for (checkVal(!0); pos.begin > 0 && !tests[pos.begin - 1]; ) pos.begin--;
|
||||
if (0 === pos.begin) for (;pos.begin < firstNonMaskPos && !tests[pos.begin]; ) pos.begin++;
|
||||
input.caret(pos.begin, pos.begin);
|
||||
} else {
|
||||
for (checkVal(!0); pos.begin < len && !tests[pos.begin]; ) pos.begin++;
|
||||
input.caret(pos.begin, pos.begin);
|
||||
}
|
||||
tryFireCompleted();
|
||||
}
|
||||
function blurEvent() {
|
||||
checkVal(), input.val() != focusText && input.change();
|
||||
}
|
||||
function keydownEvent(e) {
|
||||
if (!input.prop("readonly")) {
|
||||
var pos, begin, end, k = e.which || e.keyCode;
|
||||
oldVal = input.val(), 8 === k || 46 === k || iPhone && 127 === k ? (pos = input.caret(),
|
||||
begin = pos.begin, end = pos.end, end - begin === 0 && (begin = 46 !== k ? seekPrev(begin) : end = seekNext(begin - 1),
|
||||
end = 46 === k ? seekNext(end) : end), clearBuffer(begin, end), shiftL(begin, end - 1),
|
||||
e.preventDefault()) : 13 === k ? blurEvent.call(this, e) : 27 === k && (input.val(focusText),
|
||||
input.caret(0, checkVal()), e.preventDefault());
|
||||
}
|
||||
}
|
||||
function keypressEvent(e) {
|
||||
if (!input.prop("readonly")) {
|
||||
var p, c, next, k = e.which || e.keyCode, pos = input.caret();
|
||||
if (!(e.ctrlKey || e.altKey || e.metaKey || 32 > k) && k && 13 !== k) {
|
||||
if (pos.end - pos.begin !== 0 && (clearBuffer(pos.begin, pos.end), shiftL(pos.begin, pos.end - 1)),
|
||||
p = seekNext(pos.begin - 1), len > p && (c = String.fromCharCode(k), tests[p].test(c))) {
|
||||
if (shiftR(p), buffer[p] = c, writeBuffer(), next = seekNext(p), android) {
|
||||
var proxy = function() {
|
||||
$.proxy($.fn.caret, input, next)();
|
||||
};
|
||||
setTimeout(proxy, 0);
|
||||
} else input.caret(next);
|
||||
pos.begin <= lastRequiredNonMaskPos && tryFireCompleted();
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
function clearBuffer(start, end) {
|
||||
var i;
|
||||
for (i = start; end > i && len > i; i++) tests[i] && (buffer[i] = getPlaceholder(i));
|
||||
}
|
||||
function writeBuffer() {
|
||||
input.val(buffer.join(""));
|
||||
}
|
||||
function checkVal(allow) {
|
||||
var i, c, pos, test = input.val(), lastMatch = -1;
|
||||
for (i = 0, pos = 0; len > i; i++) if (tests[i]) {
|
||||
for (buffer[i] = getPlaceholder(i); pos++ < test.length; ) if (c = test.charAt(pos - 1),
|
||||
tests[i].test(c)) {
|
||||
buffer[i] = c, lastMatch = i;
|
||||
break;
|
||||
}
|
||||
if (pos > test.length) {
|
||||
clearBuffer(i + 1, len);
|
||||
break;
|
||||
}
|
||||
} else buffer[i] === test.charAt(pos) && pos++, partialPosition > i && (lastMatch = i);
|
||||
return allow ? writeBuffer() : partialPosition > lastMatch + 1 ? settings.autoclear || buffer.join("") === defaultBuffer ? (input.val() && input.val(""),
|
||||
clearBuffer(0, len)) : writeBuffer() : (writeBuffer(), input.val(input.val().substring(0, lastMatch + 1))),
|
||||
partialPosition ? i : firstNonMaskPos;
|
||||
}
|
||||
var input = $(this), buffer = $.map(mask.split(""), function(c, i) {
|
||||
return "?" != c ? defs[c] ? getPlaceholder(i) : c : void 0;
|
||||
}), defaultBuffer = buffer.join(""), focusText = input.val();
|
||||
input.data($.mask.dataName, function() {
|
||||
return $.map(buffer, function(c, i) {
|
||||
return tests[i] && c != getPlaceholder(i) ? c : null;
|
||||
}).join("");
|
||||
}), input.one("unmask", function() {
|
||||
input.off(".mask").removeData($.mask.dataName);
|
||||
}).on("focus.mask", function() {
|
||||
if (!input.prop("readonly")) {
|
||||
clearTimeout(caretTimeoutId);
|
||||
var pos;
|
||||
focusText = input.val(), pos = checkVal(), caretTimeoutId = setTimeout(function() {
|
||||
input.get(0) === document.activeElement && (writeBuffer(), pos == mask.replace("?", "").length ? input.caret(0, pos) : input.caret(pos));
|
||||
}, 10);
|
||||
}
|
||||
}).on("blur.mask", blurEvent).on("keydown.mask", keydownEvent).on("keypress.mask", keypressEvent).on("input.mask paste.mask", function() {
|
||||
input.prop("readonly") || setTimeout(function() {
|
||||
var pos = checkVal(!0);
|
||||
input.caret(pos), tryFireCompleted();
|
||||
}, 0);
|
||||
}), chrome && android && input.off("input.mask").on("input.mask", androidInputEvent),
|
||||
checkVal();
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
jQuery Masked Input Plugin
|
||||
Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)
|
||||
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
|
||||
Version: 1.4.1
|
||||
*/
|
||||
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):jQuery)}(function(a){var b,c=navigator.userAgent,d=/iphone/i.test(c),e=/chrome/i.test(c),f=/android/i.test(c);a.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},a.fn.extend({caret:function(a,b){var c;if(0!==this.length&&!this.is(":hidden"))return"number"==typeof a?(b="number"==typeof b?b:a,this.each(function(){this.setSelectionRange?this.setSelectionRange(a,b):this.createTextRange&&(c=this.createTextRange(),c.collapse(!0),c.moveEnd("character",b),c.moveStart("character",a),c.select())})):(this[0].setSelectionRange?(a=this[0].selectionStart,b=this[0].selectionEnd):document.selection&&document.selection.createRange&&(c=document.selection.createRange(),a=0-c.duplicate().moveStart("character",-1e5),b=a+c.text.length),{begin:a,end:b})},unmask:function(){return this.trigger("unmask")},mask:function(c,g){var h,i,j,k,l,m,n,o;if(!c&&this.length>0){h=a(this[0]);var p=h.data(a.mask.dataName);return p?p():void 0}return g=a.extend({autoclear:a.mask.autoclear,placeholder:a.mask.placeholder,completed:null},g),i=a.mask.definitions,j=[],k=n=c.length,l=null,a.each(c.split(""),function(a,b){"?"==b?(n--,k=a):i[b]?(j.push(new RegExp(i[b])),null===l&&(l=j.length-1),k>a&&(m=j.length-1)):j.push(null)}),this.trigger("unmask").each(function(){function h(){if(g.completed){for(var a=l;m>=a;a++)if(j[a]&&C[a]===p(a))return;g.completed.call(B)}}function p(a){return g.placeholder.charAt(a<g.placeholder.length?a:0)}function q(a){for(;++a<n&&!j[a];);return a}function r(a){for(;--a>=0&&!j[a];);return a}function s(a,b){var c,d;if(!(0>a)){for(c=a,d=q(b);n>c;c++)if(j[c]){if(!(n>d&&j[c].test(C[d])))break;C[c]=C[d],C[d]=p(d),d=q(d)}z(),B.caret(Math.max(l,a))}}function t(a){var b,c,d,e;for(b=a,c=p(a);n>b;b++)if(j[b]){if(d=q(b),e=C[b],C[b]=c,!(n>d&&j[d].test(e)))break;c=e}}function u(){var a=B.val(),b=B.caret();if(o&&o.length&&o.length>a.length){for(A(!0);b.begin>0&&!j[b.begin-1];)b.begin--;if(0===b.begin)for(;b.begin<l&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}else{for(A(!0);b.begin<n&&!j[b.begin];)b.begin++;B.caret(b.begin,b.begin)}h()}function v(){A(),B.val()!=E&&B.change()}function w(a){if(!B.prop("readonly")){var b,c,e,f=a.which||a.keyCode;o=B.val(),8===f||46===f||d&&127===f?(b=B.caret(),c=b.begin,e=b.end,e-c===0&&(c=46!==f?r(c):e=q(c-1),e=46===f?q(e):e),y(c,e),s(c,e-1),a.preventDefault()):13===f?v.call(this,a):27===f&&(B.val(E),B.caret(0,A()),a.preventDefault())}}function x(b){if(!B.prop("readonly")){var c,d,e,g=b.which||b.keyCode,i=B.caret();if(!(b.ctrlKey||b.altKey||b.metaKey||32>g)&&g&&13!==g){if(i.end-i.begin!==0&&(y(i.begin,i.end),s(i.begin,i.end-1)),c=q(i.begin-1),n>c&&(d=String.fromCharCode(g),j[c].test(d))){if(t(c),C[c]=d,z(),e=q(c),f){var k=function(){a.proxy(a.fn.caret,B,e)()};setTimeout(k,0)}else B.caret(e);i.begin<=m&&h()}b.preventDefault()}}}function y(a,b){var c;for(c=a;b>c&&n>c;c++)j[c]&&(C[c]=p(c))}function z(){B.val(C.join(""))}function A(a){var b,c,d,e=B.val(),f=-1;for(b=0,d=0;n>b;b++)if(j[b]){for(C[b]=p(b);d++<e.length;)if(c=e.charAt(d-1),j[b].test(c)){C[b]=c,f=b;break}if(d>e.length){y(b+1,n);break}}else C[b]===e.charAt(d)&&d++,k>b&&(f=b);return a?z():k>f+1?g.autoclear||C.join("")===D?(B.val()&&B.val(""),y(0,n)):z():(z(),B.val(B.val().substring(0,f+1))),k?b:l}var B=a(this),C=a.map(c.split(""),function(a,b){return"?"!=a?i[a]?p(b):a:void 0}),D=C.join(""),E=B.val();B.data(a.mask.dataName,function(){return a.map(C,function(a,b){return j[b]&&a!=p(b)?a:null}).join("")}),B.one("unmask",function(){B.off(".mask").removeData(a.mask.dataName)}).on("focus.mask",function(){if(!B.prop("readonly")){clearTimeout(b);var a;E=B.val(),a=A(),b=setTimeout(function(){B.get(0)===document.activeElement&&(z(),a==c.replace("?","").length?B.caret(0,a):B.caret(a))},10)}}).on("blur.mask",v).on("keydown.mask",w).on("keypress.mask",x).on("input.mask paste.mask",function(){B.prop("readonly")||setTimeout(function(){var a=A(!0);B.caret(a),h()},0)}),e&&f&&B.off("input.mask").on("input.mask",u),A()})}})});
|
@ -1,62 +0,0 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
module.exports = function( grunt ) {
|
||||
grunt.initConfig({
|
||||
// TODO: change to read component.json
|
||||
pkg: require('./package.json'),
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '/*\n <%= pkg.description %>\n Copyright (c) 2007 - <%= grunt.template.today("yyyy") %> <%= pkg.author %>\n Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)\n Version: <%= pkg.version %>\n*/\n'
|
||||
},
|
||||
|
||||
dev: {
|
||||
options: {
|
||||
beautify: true,
|
||||
mangle: false
|
||||
},
|
||||
|
||||
files: {
|
||||
'dist/jquery.maskedinput.js': ['src/jquery.maskedinput.js']
|
||||
}
|
||||
},
|
||||
|
||||
min: {
|
||||
files: {
|
||||
'dist/jquery.maskedinput.min.js': ['src/jquery.maskedinput.js']
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
jasmine: {
|
||||
full: {
|
||||
src: "src/**/*.js",
|
||||
options: {
|
||||
specs: "spec/*[S|s]pec.js",
|
||||
vendor: [
|
||||
"spec/lib/matchers.js",
|
||||
"spec/lib/jasmine-species/jasmine-grammar.js",
|
||||
"spec/lib/setup.js",
|
||||
"lib/jquery-1.9.0.min.js",
|
||||
"spec/lib/jquery.keymasher.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
nugetpack: {
|
||||
dist: {
|
||||
src: 'jquery.maskedinput.nuspec',
|
||||
dest: 'dist/'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks("grunt-contrib-jasmine");
|
||||
grunt.loadNpmTasks("grunt-contrib-uglify");
|
||||
grunt.loadNpmTasks('grunt-nuget');
|
||||
|
||||
grunt.registerTask('test', ['jasmine']);
|
||||
grunt.registerTask('pack', ['default','nugetpack']);
|
||||
grunt.registerTask('default', ['test', 'uglify']);
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>jQuery.MaskedInput</id>
|
||||
<version>1.4.1.0</version>
|
||||
<authors>digitalBush</authors>
|
||||
<owners>stimms</owners>
|
||||
<licenseUrl>https://github.com/digitalBush/jquery.maskedinput/blob/master/LICENSE</licenseUrl>
|
||||
<projectUrl>http://digitalbush.com/projects/masked-input-plugin/</projectUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>A jQuery plugin which applies a mask to input boxes to provide both a UI hint for users as well as some rudimentary input checking.</description>
|
||||
<tags>jQuery,plugins</tags>
|
||||
<dependencies>
|
||||
<dependency id="jQuery" version="1.9" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="dist/jquery.maskedinput.js" target="content\scripts" />
|
||||
<file src="dist/jquery.maskedinput.min.js" target="content\scripts" />
|
||||
</files>
|
||||
</package>
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "jquery.maskedinput",
|
||||
"version": "1.4.1",
|
||||
"author": "Josh Bush (digitalbush.com)",
|
||||
"description": "jQuery Masked Input Plugin",
|
||||
"devDependencies": {
|
||||
"grunt": "0.4.x",
|
||||
"grunt-contrib-jasmine": "0.5.x",
|
||||
"grunt-contrib-uglify": "0.2.x",
|
||||
"grunt-contrib-watch": "0.5.x",
|
||||
"grunt-nuget": "^0.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt test"
|
||||
}
|
||||
}
|
@ -1,436 +0,0 @@
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node/CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var ua = navigator.userAgent,
|
||||
iPhone = /iphone/i.test(ua),
|
||||
chrome = /chrome/i.test(ua),
|
||||
android = /android/i.test(ua),
|
||||
caretTimeoutId;
|
||||
|
||||
$.mask = {
|
||||
//Predefined character definitions
|
||||
definitions: {
|
||||
'9': "[0-9]",
|
||||
'a': "[A-Za-z]",
|
||||
'*': "[A-Za-z0-9]"
|
||||
},
|
||||
autoclear: true,
|
||||
dataName: "rawMaskFn",
|
||||
placeholder: '_'
|
||||
};
|
||||
|
||||
$.fn.extend({
|
||||
//Helper Function for Caret positioning
|
||||
caret: function(begin, end) {
|
||||
var range;
|
||||
|
||||
if (this.length === 0 || this.is(":hidden")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof begin == 'number') {
|
||||
end = (typeof end === 'number') ? end : begin;
|
||||
return this.each(function() {
|
||||
if (this.setSelectionRange) {
|
||||
this.setSelectionRange(begin, end);
|
||||
} else if (this.createTextRange) {
|
||||
range = this.createTextRange();
|
||||
range.collapse(true);
|
||||
range.moveEnd('character', end);
|
||||
range.moveStart('character', begin);
|
||||
range.select();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (this[0].setSelectionRange) {
|
||||
begin = this[0].selectionStart;
|
||||
end = this[0].selectionEnd;
|
||||
} else if (document.selection && document.selection.createRange) {
|
||||
range = document.selection.createRange();
|
||||
begin = 0 - range.duplicate().moveStart('character', -100000);
|
||||
end = begin + range.text.length;
|
||||
}
|
||||
return { begin: begin, end: end };
|
||||
}
|
||||
},
|
||||
unmask: function() {
|
||||
return this.trigger("unmask");
|
||||
},
|
||||
mask: function(mask, settings) {
|
||||
var input,
|
||||
defs,
|
||||
tests,
|
||||
partialPosition,
|
||||
firstNonMaskPos,
|
||||
lastRequiredNonMaskPos,
|
||||
len,
|
||||
oldVal;
|
||||
|
||||
if (!mask && this.length > 0) {
|
||||
input = $(this[0]);
|
||||
var fn = input.data($.mask.dataName)
|
||||
return fn?fn():undefined;
|
||||
}
|
||||
|
||||
settings = $.extend({
|
||||
autoclear: $.mask.autoclear,
|
||||
placeholder: $.mask.placeholder, // Load default placeholder
|
||||
completed: null
|
||||
}, settings);
|
||||
|
||||
|
||||
defs = $.mask.definitions;
|
||||
tests = [];
|
||||
partialPosition = len = mask.length;
|
||||
firstNonMaskPos = null;
|
||||
|
||||
$.each(mask.split(""), function(i, c) {
|
||||
if (c == '?') {
|
||||
len--;
|
||||
partialPosition = i;
|
||||
} else if (defs[c]) {
|
||||
tests.push(new RegExp(defs[c]));
|
||||
if (firstNonMaskPos === null) {
|
||||
firstNonMaskPos = tests.length - 1;
|
||||
}
|
||||
if(i < partialPosition){
|
||||
lastRequiredNonMaskPos = tests.length - 1;
|
||||
}
|
||||
} else {
|
||||
tests.push(null);
|
||||
}
|
||||
});
|
||||
|
||||
return this.trigger("unmask").each(function() {
|
||||
var input = $(this),
|
||||
buffer = $.map(
|
||||
mask.split(""),
|
||||
function(c, i) {
|
||||
if (c != '?') {
|
||||
return defs[c] ? getPlaceholder(i) : c;
|
||||
}
|
||||
}),
|
||||
defaultBuffer = buffer.join(''),
|
||||
focusText = input.val();
|
||||
|
||||
function tryFireCompleted(){
|
||||
if (!settings.completed) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = firstNonMaskPos; i <= lastRequiredNonMaskPos; i++) {
|
||||
if (tests[i] && buffer[i] === getPlaceholder(i)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
settings.completed.call(input);
|
||||
}
|
||||
|
||||
function getPlaceholder(i){
|
||||
if(i < settings.placeholder.length)
|
||||
return settings.placeholder.charAt(i);
|
||||
return settings.placeholder.charAt(0);
|
||||
}
|
||||
|
||||
function seekNext(pos) {
|
||||
while (++pos < len && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function seekPrev(pos) {
|
||||
while (--pos >= 0 && !tests[pos]);
|
||||
return pos;
|
||||
}
|
||||
|
||||
function shiftL(begin,end) {
|
||||
var i,
|
||||
j;
|
||||
|
||||
if (begin<0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = begin, j = seekNext(end); i < len; i++) {
|
||||
if (tests[i]) {
|
||||
if (j < len && tests[i].test(buffer[j])) {
|
||||
buffer[i] = buffer[j];
|
||||
buffer[j] = getPlaceholder(j);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
j = seekNext(j);
|
||||
}
|
||||
}
|
||||
writeBuffer();
|
||||
input.caret(Math.max(firstNonMaskPos, begin));
|
||||
}
|
||||
|
||||
function shiftR(pos) {
|
||||
var i,
|
||||
c,
|
||||
j,
|
||||
t;
|
||||
|
||||
for (i = pos, c = getPlaceholder(pos); i < len; i++) {
|
||||
if (tests[i]) {
|
||||
j = seekNext(i);
|
||||
t = buffer[i];
|
||||
buffer[i] = c;
|
||||
if (j < len && tests[j].test(t)) {
|
||||
c = t;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function androidInputEvent(e) {
|
||||
var curVal = input.val();
|
||||
var pos = input.caret();
|
||||
if (oldVal && oldVal.length && oldVal.length > curVal.length ) {
|
||||
// a deletion or backspace happened
|
||||
checkVal(true);
|
||||
while (pos.begin > 0 && !tests[pos.begin-1])
|
||||
pos.begin--;
|
||||
if (pos.begin === 0)
|
||||
{
|
||||
while (pos.begin < firstNonMaskPos && !tests[pos.begin])
|
||||
pos.begin++;
|
||||
}
|
||||
input.caret(pos.begin,pos.begin);
|
||||
} else {
|
||||
var pos2 = checkVal(true);
|
||||
while (pos.begin < len && !tests[pos.begin])
|
||||
pos.begin++;
|
||||
|
||||
input.caret(pos.begin,pos.begin);
|
||||
}
|
||||
|
||||
tryFireCompleted();
|
||||
}
|
||||
|
||||
function blurEvent(e) {
|
||||
checkVal();
|
||||
|
||||
if (input.val() != focusText)
|
||||
input.change();
|
||||
}
|
||||
|
||||
function keydownEvent(e) {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
var k = e.which || e.keyCode,
|
||||
pos,
|
||||
begin,
|
||||
end;
|
||||
oldVal = input.val();
|
||||
//backspace, delete, and escape get special treatment
|
||||
if (k === 8 || k === 46 || (iPhone && k === 127)) {
|
||||
pos = input.caret();
|
||||
begin = pos.begin;
|
||||
end = pos.end;
|
||||
|
||||
if (end - begin === 0) {
|
||||
begin=k!==46?seekPrev(begin):(end=seekNext(begin-1));
|
||||
end=k===46?seekNext(end):end;
|
||||
}
|
||||
clearBuffer(begin, end);
|
||||
shiftL(begin, end - 1);
|
||||
|
||||
e.preventDefault();
|
||||
} else if( k === 13 ) { // enter
|
||||
blurEvent.call(this, e);
|
||||
} else if (k === 27) { // escape
|
||||
input.val(focusText);
|
||||
input.caret(0, checkVal());
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function keypressEvent(e) {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
var k = e.which || e.keyCode,
|
||||
pos = input.caret(),
|
||||
p,
|
||||
c,
|
||||
next;
|
||||
|
||||
if (e.ctrlKey || e.altKey || e.metaKey || k < 32) {//Ignore
|
||||
return;
|
||||
} else if ( k && k !== 13 ) {
|
||||
if (pos.end - pos.begin !== 0){
|
||||
clearBuffer(pos.begin, pos.end);
|
||||
shiftL(pos.begin, pos.end-1);
|
||||
}
|
||||
|
||||
p = seekNext(pos.begin - 1);
|
||||
if (p < len) {
|
||||
c = String.fromCharCode(k);
|
||||
if (tests[p].test(c)) {
|
||||
shiftR(p);
|
||||
|
||||
buffer[p] = c;
|
||||
writeBuffer();
|
||||
next = seekNext(p);
|
||||
|
||||
if(android){
|
||||
//Path for CSP Violation on FireFox OS 1.1
|
||||
var proxy = function() {
|
||||
$.proxy($.fn.caret,input,next)();
|
||||
};
|
||||
|
||||
setTimeout(proxy,0);
|
||||
}else{
|
||||
input.caret(next);
|
||||
}
|
||||
if(pos.begin <= lastRequiredNonMaskPos){
|
||||
tryFireCompleted();
|
||||
}
|
||||
}
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function clearBuffer(start, end) {
|
||||
var i;
|
||||
for (i = start; i < end && i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = getPlaceholder(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function writeBuffer() { input.val(buffer.join('')); }
|
||||
|
||||
function checkVal(allow) {
|
||||
//try to place characters where they belong
|
||||
var test = input.val(),
|
||||
lastMatch = -1,
|
||||
i,
|
||||
c,
|
||||
pos;
|
||||
|
||||
for (i = 0, pos = 0; i < len; i++) {
|
||||
if (tests[i]) {
|
||||
buffer[i] = getPlaceholder(i);
|
||||
while (pos++ < test.length) {
|
||||
c = test.charAt(pos - 1);
|
||||
if (tests[i].test(c)) {
|
||||
buffer[i] = c;
|
||||
lastMatch = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pos > test.length) {
|
||||
clearBuffer(i + 1, len);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (buffer[i] === test.charAt(pos)) {
|
||||
pos++;
|
||||
}
|
||||
if( i < partialPosition){
|
||||
lastMatch = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (allow) {
|
||||
writeBuffer();
|
||||
} else if (lastMatch + 1 < partialPosition) {
|
||||
if (settings.autoclear || buffer.join('') === defaultBuffer) {
|
||||
// Invalid value. Remove it and replace it with the
|
||||
// mask, which is the default behavior.
|
||||
if(input.val()) input.val("");
|
||||
clearBuffer(0, len);
|
||||
} else {
|
||||
// Invalid value, but we opt to show the value to the
|
||||
// user and allow them to correct their mistake.
|
||||
writeBuffer();
|
||||
}
|
||||
} else {
|
||||
writeBuffer();
|
||||
input.val(input.val().substring(0, lastMatch + 1));
|
||||
}
|
||||
return (partialPosition ? i : firstNonMaskPos);
|
||||
}
|
||||
|
||||
input.data($.mask.dataName,function(){
|
||||
return $.map(buffer, function(c, i) {
|
||||
return tests[i]&&c!=getPlaceholder(i) ? c : null;
|
||||
}).join('');
|
||||
});
|
||||
|
||||
|
||||
input
|
||||
.one("unmask", function() {
|
||||
input
|
||||
.off(".mask")
|
||||
.removeData($.mask.dataName);
|
||||
})
|
||||
.on("focus.mask", function() {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
clearTimeout(caretTimeoutId);
|
||||
var pos;
|
||||
|
||||
focusText = input.val();
|
||||
|
||||
pos = checkVal();
|
||||
|
||||
caretTimeoutId = setTimeout(function(){
|
||||
if(input.get(0) !== document.activeElement){
|
||||
return;
|
||||
}
|
||||
writeBuffer();
|
||||
if (pos == mask.replace("?","").length) {
|
||||
input.caret(0, pos);
|
||||
} else {
|
||||
input.caret(pos);
|
||||
}
|
||||
}, 10);
|
||||
})
|
||||
.on("blur.mask", blurEvent)
|
||||
.on("keydown.mask", keydownEvent)
|
||||
.on("keypress.mask", keypressEvent)
|
||||
.on("input.mask paste.mask", function() {
|
||||
if (input.prop("readonly")){
|
||||
return;
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
var pos=checkVal(true);
|
||||
input.caret(pos);
|
||||
tryFireCompleted();
|
||||
}, 0);
|
||||
});
|
||||
if (chrome && android)
|
||||
{
|
||||
input
|
||||
.off('input.mask')
|
||||
.on('input.mask', androidInputEvent);
|
||||
}
|
||||
checkVal(); //Perform initial check for existing values
|
||||
});
|
||||
}
|
||||
});
|
||||
}));
|
@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "jquery",
|
||||
"main": "dist/jquery.js",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"package.json"
|
||||
],
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"javascript",
|
||||
"browser",
|
||||
"library"
|
||||
],
|
||||
"homepage": "https://github.com/jquery/jquery-dist",
|
||||
"version": "3.1.1",
|
||||
"_release": "3.1.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "3.1.1",
|
||||
"commit": "1b30f3ad466ebf2714d47eda34dbd7fdf6849fe3"
|
||||
},
|
||||
"_source": "https://github.com/jquery/jquery-dist.git",
|
||||
"_target": "^3.0.0",
|
||||
"_originalSource": "jquery"
|
||||
}
|
@ -1,295 +0,0 @@
|
||||
Authors ordered by first contribution.
|
||||
|
||||
John Resig <jeresig@gmail.com>
|
||||
Gilles van den Hoven <gilles0181@gmail.com>
|
||||
Michael Geary <mike@geary.com>
|
||||
Stefan Petre <stefan.petre@gmail.com>
|
||||
Yehuda Katz <wycats@gmail.com>
|
||||
Corey Jewett <cj@syntheticplayground.com>
|
||||
Klaus Hartl <klaus.hartl@gmail.com>
|
||||
Franck Marcia <franck.marcia@gmail.com>
|
||||
Jörn Zaefferer <joern.zaefferer@gmail.com>
|
||||
Paul Bakaus <paul.bakaus@gmail.com>
|
||||
Brandon Aaron <brandon.aaron@gmail.com>
|
||||
Mike Alsup <malsup@gmail.com>
|
||||
Dave Methvin <dave.methvin@gmail.com>
|
||||
Ed Engelhardt <edengelhardt@gmail.com>
|
||||
Sean Catchpole <littlecooldude@gmail.com>
|
||||
Paul Mclanahan <pmclanahan@gmail.com>
|
||||
David Serduke <davidserduke@gmail.com>
|
||||
Richard D. Worth <rdworth@gmail.com>
|
||||
Scott González <scott.gonzalez@gmail.com>
|
||||
Ariel Flesler <aflesler@gmail.com>
|
||||
Jon Evans <jon@springyweb.com>
|
||||
TJ Holowaychuk <tj@vision-media.ca>
|
||||
Michael Bensoussan <mickey@seesmic.com>
|
||||
Robert Katić <robert.katic@gmail.com>
|
||||
Louis-Rémi Babé <lrbabe@gmail.com>
|
||||
Earle Castledine <mrspeaker@gmail.com>
|
||||
Damian Janowski <damian.janowski@gmail.com>
|
||||
Rich Dougherty <rich@rd.gen.nz>
|
||||
Kim Dalsgaard <kim@kimdalsgaard.com>
|
||||
Andrea Giammarchi <andrea.giammarchi@gmail.com>
|
||||
Mark Gibson <jollytoad@gmail.com>
|
||||
Karl Swedberg <kswedberg@gmail.com>
|
||||
Justin Meyer <justinbmeyer@gmail.com>
|
||||
Ben Alman <cowboy@rj3.net>
|
||||
James Padolsey <cla@padolsey.net>
|
||||
David Petersen <public@petersendidit.com>
|
||||
Batiste Bieler <batiste.bieler@gmail.com>
|
||||
Alexander Farkas <info@corrupt-system.de>
|
||||
Rick Waldron <waldron.rick@gmail.com>
|
||||
Filipe Fortes <filipe@fortes.com>
|
||||
Neeraj Singh <neerajdotname@gmail.com>
|
||||
Paul Irish <paul.irish@gmail.com>
|
||||
Iraê Carvalho <irae@irae.pro.br>
|
||||
Matt Curry <matt@pseudocoder.com>
|
||||
Michael Monteleone <michael@michaelmonteleone.net>
|
||||
Noah Sloan <noah.sloan@gmail.com>
|
||||
Tom Viner <github@viner.tv>
|
||||
Douglas Neiner <doug@dougneiner.com>
|
||||
Adam J. Sontag <ajpiano@ajpiano.com>
|
||||
Dave Reed <dareed@microsoft.com>
|
||||
Ralph Whitbeck <ralph.whitbeck@gmail.com>
|
||||
Carl Fürstenberg <azatoth@gmail.com>
|
||||
Jacob Wright <jacwright@gmail.com>
|
||||
J. Ryan Stinnett <jryans@gmail.com>
|
||||
unknown <Igen005@.upcorp.ad.uprr.com>
|
||||
temp01 <temp01irc@gmail.com>
|
||||
Heungsub Lee <h@subl.ee>
|
||||
Colin Snover <github.com@zetafleet.com>
|
||||
Ryan W Tenney <ryan@10e.us>
|
||||
Pinhook <contact@pinhooklabs.com>
|
||||
Ron Otten <r.j.g.otten@gmail.com>
|
||||
Jephte Clain <Jephte.Clain@univ-reunion.fr>
|
||||
Anton Matzneller <obhvsbypqghgc@gmail.com>
|
||||
Alex Sexton <AlexSexton@gmail.com>
|
||||
Dan Heberden <danheberden@gmail.com>
|
||||
Henri Wiechers <hwiechers@gmail.com>
|
||||
Russell Holbrook <russell.holbrook@patch.com>
|
||||
Julian Aubourg <aubourg.julian@gmail.com>
|
||||
Gianni Alessandro Chiappetta <gianni@runlevel6.org>
|
||||
Scott Jehl <scottjehl@gmail.com>
|
||||
James Burke <jrburke@gmail.com>
|
||||
Jonas Pfenniger <jonas@pfenniger.name>
|
||||
Xavi Ramirez <xavi.rmz@gmail.com>
|
||||
Jared Grippe <jared@deadlyicon.com>
|
||||
Sylvester Keil <sylvester@keil.or.at>
|
||||
Brandon Sterne <bsterne@mozilla.com>
|
||||
Mathias Bynens <mathias@qiwi.be>
|
||||
Timmy Willison <4timmywil@gmail.com>
|
||||
Corey Frang <gnarf37@gmail.com>
|
||||
Digitalxero <digitalxero>
|
||||
Anton Kovalyov <anton@kovalyov.net>
|
||||
David Murdoch <david@davidmurdoch.com>
|
||||
Josh Varner <josh.varner@gmail.com>
|
||||
Charles McNulty <cmcnulty@kznf.com>
|
||||
Jordan Boesch <jboesch26@gmail.com>
|
||||
Jess Thrysoee <jess@thrysoee.dk>
|
||||
Michael Murray <m@murz.net>
|
||||
Lee Carpenter <elcarpie@gmail.com>
|
||||
Alexis Abril <me@alexisabril.com>
|
||||
Rob Morgan <robbym@gmail.com>
|
||||
John Firebaugh <john_firebaugh@bigfix.com>
|
||||
Sam Bisbee <sam@sbisbee.com>
|
||||
Gilmore Davidson <gilmoreorless@gmail.com>
|
||||
Brian Brennan <me@brianlovesthings.com>
|
||||
Xavier Montillet <xavierm02.net@gmail.com>
|
||||
Daniel Pihlstrom <sciolist.se@gmail.com>
|
||||
Sahab Yazdani <sahab.yazdani+github@gmail.com>
|
||||
avaly <github-com@agachi.name>
|
||||
Scott Hughes <hi@scott-hughes.me>
|
||||
Mike Sherov <mike.sherov@gmail.com>
|
||||
Greg Hazel <ghazel@gmail.com>
|
||||
Schalk Neethling <schalk@ossreleasefeed.com>
|
||||
Denis Knauf <Denis.Knauf@gmail.com>
|
||||
Timo Tijhof <krinklemail@gmail.com>
|
||||
Steen Nielsen <swinedk@gmail.com>
|
||||
Anton Ryzhov <anton@ryzhov.me>
|
||||
Shi Chuan <shichuanr@gmail.com>
|
||||
Berker Peksag <berker.peksag@gmail.com>
|
||||
Toby Brain <tobyb@freshview.com>
|
||||
Matt Mueller <mattmuelle@gmail.com>
|
||||
Justin <drakefjustin@gmail.com>
|
||||
Daniel Herman <daniel.c.herman@gmail.com>
|
||||
Oleg Gaidarenko <markelog@gmail.com>
|
||||
Richard Gibson <richard.gibson@gmail.com>
|
||||
Rafaël Blais Masson <rafbmasson@gmail.com>
|
||||
cmc3cn <59194618@qq.com>
|
||||
Joe Presbrey <presbrey@gmail.com>
|
||||
Sindre Sorhus <sindresorhus@gmail.com>
|
||||
Arne de Bree <arne@bukkie.nl>
|
||||
Vladislav Zarakovsky <vlad.zar@gmail.com>
|
||||
Andrew E Monat <amonat@gmail.com>
|
||||
Oskari <admin@o-programs.com>
|
||||
Joao Henrique de Andrade Bruni <joaohbruni@yahoo.com.br>
|
||||
tsinha <tsinha@Anthonys-MacBook-Pro.local>
|
||||
Matt Farmer <matt@frmr.me>
|
||||
Trey Hunner <treyhunner@gmail.com>
|
||||
Jason Moon <jmoon@socialcast.com>
|
||||
Jeffery To <jeffery.to@gmail.com>
|
||||
Kris Borchers <kris.borchers@gmail.com>
|
||||
Vladimir Zhuravlev <private.face@gmail.com>
|
||||
Jacob Thornton <jacobthornton@gmail.com>
|
||||
Chad Killingsworth <chadkillingsworth@missouristate.edu>
|
||||
Nowres Rafid <nowres.rafed@gmail.com>
|
||||
David Benjamin <davidben@mit.edu>
|
||||
Uri Gilad <antishok@gmail.com>
|
||||
Chris Faulkner <thefaulkner@gmail.com>
|
||||
Elijah Manor <elijah.manor@gmail.com>
|
||||
Daniel Chatfield <chatfielddaniel@gmail.com>
|
||||
Nikita Govorov <nikita.govorov@gmail.com>
|
||||
Wesley Walser <waw325@gmail.com>
|
||||
Mike Pennisi <mike@mikepennisi.com>
|
||||
Markus Staab <markus.staab@redaxo.de>
|
||||
Dave Riddle <david@joyvuu.com>
|
||||
Callum Macrae <callum@lynxphp.com>
|
||||
Benjamin Truyman <bentruyman@gmail.com>
|
||||
James Huston <james@jameshuston.net>
|
||||
Erick Ruiz de Chávez <erickrdch@gmail.com>
|
||||
David Bonner <dbonner@cogolabs.com>
|
||||
Akintayo Akinwunmi <aakinwunmi@judge.com>
|
||||
MORGAN <morgan@morgangraphics.com>
|
||||
Ismail Khair <ismail.khair@gmail.com>
|
||||
Carl Danley <carldanley@gmail.com>
|
||||
Mike Petrovich <michael.c.petrovich@gmail.com>
|
||||
Greg Lavallee <greglavallee@wapolabs.com>
|
||||
Daniel Gálvez <dgalvez@editablething.com>
|
||||
Sai Lung Wong <sai.wong@huffingtonpost.com>
|
||||
Tom H Fuertes <TomFuertes@gmail.com>
|
||||
Roland Eckl <eckl.roland@googlemail.com>
|
||||
Jay Merrifield <fracmak@gmail.com>
|
||||
Allen J Schmidt Jr <cobrasoft@gmail.com>
|
||||
Jonathan Sampson <jjdsampson@gmail.com>
|
||||
Marcel Greter <marcel.greter@ocbnet.ch>
|
||||
Matthias Jäggli <matthias.jaeggli@gmail.com>
|
||||
David Fox <dfoxinator@gmail.com>
|
||||
Yiming He <yiminghe@gmail.com>
|
||||
Devin Cooper <cooper.semantics@gmail.com>
|
||||
Paul Ramos <paul.b.ramos@gmail.com>
|
||||
Rod Vagg <rod@vagg.org>
|
||||
Bennett Sorbo <bsorbo@gmail.com>
|
||||
Sebastian Burkhard <sebi.burkhard@gmail.com>
|
||||
Zachary Adam Kaplan <razic@viralkitty.com>
|
||||
nanto_vi <nanto@moon.email.ne.jp>
|
||||
nanto <nanto@moon.email.ne.jp>
|
||||
Danil Somsikov <danilasomsikov@gmail.com>
|
||||
Ryunosuke SATO <tricknotes.rs@gmail.com>
|
||||
Jean Boussier <jean.boussier@gmail.com>
|
||||
Adam Coulombe <me@adam.co>
|
||||
Andrew Plummer <plummer.andrew@gmail.com>
|
||||
Mark Raddatz <mraddatz@gmail.com>
|
||||
Isaac Z. Schlueter <i@izs.me>
|
||||
Karl Sieburg <ksieburg@yahoo.com>
|
||||
Pascal Borreli <pascal@borreli.com>
|
||||
Nguyen Phuc Lam <ruado1987@gmail.com>
|
||||
Dmitry Gusev <dmitry.gusev@gmail.com>
|
||||
Michał Gołębiowski <m.goleb@gmail.com>
|
||||
Li Xudong <istonelee@gmail.com>
|
||||
Steven Benner <admin@stevenbenner.com>
|
||||
Tom H Fuertes <tomfuertes@gmail.com>
|
||||
Renato Oliveira dos Santos <ros3@cin.ufpe.br>
|
||||
ros3cin <ros3@cin.ufpe.br>
|
||||
Jason Bedard <jason+jquery@jbedard.ca>
|
||||
Kyle Robinson Young <kyle@dontkry.com>
|
||||
Chris Talkington <chris@talkingtontech.com>
|
||||
Eddie Monge <eddie@eddiemonge.com>
|
||||
Terry Jones <terry@jon.es>
|
||||
Jason Merino <jasonmerino@gmail.com>
|
||||
Jeremy Dunck <jdunck@gmail.com>
|
||||
Chris Price <price.c@gmail.com>
|
||||
Guy Bedford <guybedford@gmail.com>
|
||||
Amey Sakhadeo <me@ameyms.com>
|
||||
Mike Sidorov <mikes.ekb@gmail.com>
|
||||
Anthony Ryan <anthonyryan1@gmail.com>
|
||||
Dominik D. Geyer <dominik.geyer@gmail.com>
|
||||
George Kats <katsgeorgeek@gmail.com>
|
||||
Lihan Li <frankieteardrop@gmail.com>
|
||||
Ronny Springer <springer.ronny@gmail.com>
|
||||
Chris Antaki <ChrisAntaki@gmail.com>
|
||||
Marian Sollmann <marian.sollmann@cargomedia.ch>
|
||||
njhamann <njhamann@gmail.com>
|
||||
Ilya Kantor <iliakan@gmail.com>
|
||||
David Hong <d.hong@me.com>
|
||||
John Paul <john@johnkpaul.com>
|
||||
Jakob Stoeck <jakob@pokermania.de>
|
||||
Christopher Jones <chris@cjqed.com>
|
||||
Forbes Lindesay <forbes@lindesay.co.uk>
|
||||
S. Andrew Sheppard <andrew@wq.io>
|
||||
Leonardo Balter <leonardo.balter@gmail.com>
|
||||
Roman Reiß <me@silverwind.io>
|
||||
Benjy Cui <benjytrys@gmail.com>
|
||||
Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>
|
||||
John Hoven <hovenj@gmail.com>
|
||||
Philip Jägenstedt <philip@foolip.org>
|
||||
Christian Kosmowski <ksmwsk@gmail.com>
|
||||
Liang Peng <poppinlp@gmail.com>
|
||||
TJ VanToll <tj.vantoll@gmail.com>
|
||||
Senya Pugach <upisfree@outlook.com>
|
||||
Aurelio De Rosa <aurelioderosa@gmail.com>
|
||||
Nazar Mokrynskyi <nazar@mokrynskyi.com>
|
||||
Amit Merchant <bullredeyes@gmail.com>
|
||||
Jason Bedard <jason+github@jbedard.ca>
|
||||
Arthur Verschaeve <contact@arthurverschaeve.be>
|
||||
Dan Hart <danhart@notonthehighstreet.com>
|
||||
Bin Xin <rhyzix@gmail.com>
|
||||
David Corbacho <davidcorbacho@gmail.com>
|
||||
Veaceslav Grimalschi <grimalschi@yandex.ru>
|
||||
Daniel Husar <dano.husar@gmail.com>
|
||||
Frederic Hemberger <mail@frederic-hemberger.de>
|
||||
Ben Toews <mastahyeti@gmail.com>
|
||||
Aditya Raghavan <araghavan3@gmail.com>
|
||||
Victor Homyakov <vkhomyackov@gmail.com>
|
||||
Shivaji Varma <contact@shivajivarma.com>
|
||||
Nicolas HENRY <icewil@gmail.com>
|
||||
Anne-Gaelle Colom <coloma@westminster.ac.uk>
|
||||
George Mauer <gmauer@gmail.com>
|
||||
Leonardo Braga <leonardo.braga@gmail.com>
|
||||
Stephen Edgar <stephen@netweb.com.au>
|
||||
Thomas Tortorini <thomastortorini@gmail.com>
|
||||
Winston Howes <winstonhowes@gmail.com>
|
||||
Jon Hester <jon.d.hester@gmail.com>
|
||||
Alexander O'Mara <me@alexomara.com>
|
||||
Bastian Buchholz <buchholz.bastian@googlemail.com>
|
||||
Arthur Stolyar <nekr.fabula@gmail.com>
|
||||
Calvin Metcalf <calvin.metcalf@gmail.com>
|
||||
Mu Haibao <mhbseal@163.com>
|
||||
Richard McDaniel <rm0026@uah.edu>
|
||||
Chris Rebert <github@rebertia.com>
|
||||
Gabriel Schulhof <gabriel.schulhof@intel.com>
|
||||
Gilad Peleg <giladp007@gmail.com>
|
||||
Martin Naumann <martin@geekonaut.de>
|
||||
Marek Lewandowski <m.lewandowski@cksource.com>
|
||||
Bruno Pérel <brunoperel@gmail.com>
|
||||
Reed Loden <reed@reedloden.com>
|
||||
Daniel Nill <daniellnill@gmail.com>
|
||||
Yongwoo Jeon <yongwoo.jeon@navercorp.com>
|
||||
Sean Henderson <seanh.za@gmail.com>
|
||||
Richard Kraaijenhagen <stdin+git@riichard.com>
|
||||
Connor Atherton <c.liam.atherton@gmail.com>
|
||||
Gary Ye <garysye@gmail.com>
|
||||
Christian Grete <webmaster@christiangrete.com>
|
||||
Liza Ramo <liza.h.ramo@gmail.com>
|
||||
Julian Alexander Murillo <julian.alexander.murillo@gmail.com>
|
||||
Joelle Fleurantin <joasqueeniebee@gmail.com>
|
||||
Jae Sung Park <alberto.park@gmail.com>
|
||||
Jun Sun <klsforever@gmail.com>
|
||||
Josh Soref <apache@soref.com>
|
||||
Henry Wong <henryw4k@gmail.com>
|
||||
Jon Dufresne <jon.dufresne@gmail.com>
|
||||
Martijn W. van der Lee <martijn@vanderlee.com>
|
||||
Devin Wilson <dwilson6.github@gmail.com>
|
||||
Steve Mao <maochenyan@gmail.com>
|
||||
Zack Hall <zackhall@outlook.com>
|
||||
Bernhard M. Wiedemann <jquerybmw@lsmod.de>
|
||||
Todor Prikumov <tono_pr@abv.bg>
|
||||
Jha Naman <createnaman@gmail.com>
|
||||
William Robinet <william.robinet@conostix.com>
|
||||
Alexander Lisianoi <all3fox@gmail.com>
|
||||
Vitaliy Terziev <vitaliyterziev@gmail.com>
|
||||
Joe Trumbull <trumbull.j@gmail.com>
|
||||
Alexander K <xpyro@ya.ru>
|
||||
Damian Senn <jquery@topaxi.codes>
|
||||
Ralin Chimev <ralin.chimev@gmail.com>
|
||||
Felipe Sateler <fsateler@gmail.com>
|
||||
Christophe Tafani-Dereeper <christophetd@hotmail.fr>
|
@ -1,36 +0,0 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/jquery
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
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.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
@ -1,65 +0,0 @@
|
||||
# jQuery
|
||||
|
||||
> jQuery is a fast, small, and feature-rich JavaScript library.
|
||||
|
||||
For information on how to get started and how to use jQuery, please see [jQuery's documentation](http://api.jquery.com/).
|
||||
For source files and issues, please visit the [jQuery repo](https://github.com/jquery/jquery).
|
||||
|
||||
## Including jQuery
|
||||
|
||||
Below are some of the most common ways to include jQuery.
|
||||
|
||||
### Browser
|
||||
|
||||
#### Script tag
|
||||
|
||||
```html
|
||||
<script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
|
||||
```
|
||||
|
||||
#### Babel
|
||||
|
||||
[Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively.
|
||||
|
||||
```js
|
||||
import $ from "jquery";
|
||||
```
|
||||
|
||||
#### Browserify/Webpack
|
||||
|
||||
There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this...
|
||||
|
||||
```js
|
||||
var $ = require("jquery");
|
||||
```
|
||||
|
||||
#### AMD (Asynchronous Module Definition)
|
||||
|
||||
AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html).
|
||||
|
||||
```js
|
||||
define(["jquery"], function($) {
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
### Node
|
||||
|
||||
To include jQuery in [Node](nodejs.org), first install with npm.
|
||||
|
||||
```sh
|
||||
npm install jquery
|
||||
```
|
||||
|
||||
For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes.
|
||||
|
||||
```js
|
||||
require("jsdom").env("", function(err, window) {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
|
||||
var $ = require("jquery")(window);
|
||||
});
|
||||
```
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "jquery",
|
||||
"main": "dist/jquery.js",
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"package.json"
|
||||
],
|
||||
"keywords": [
|
||||
"jquery",
|
||||
"javascript",
|
||||
"browser",
|
||||
"library"
|
||||
]
|
||||
}
|
@ -1,482 +0,0 @@
|
||||
/* global Symbol */
|
||||
// Defining this global in .eslintrc.json would create a danger of using the global
|
||||
// unguarded in another place, it seems safer to define global only for this module
|
||||
|
||||
define( [
|
||||
"./var/arr",
|
||||
"./var/document",
|
||||
"./var/getProto",
|
||||
"./var/slice",
|
||||
"./var/concat",
|
||||
"./var/push",
|
||||
"./var/indexOf",
|
||||
"./var/class2type",
|
||||
"./var/toString",
|
||||
"./var/hasOwn",
|
||||
"./var/fnToString",
|
||||
"./var/ObjectFunctionString",
|
||||
"./var/support",
|
||||
"./core/DOMEval"
|
||||
], function( arr, document, getProto, slice, concat, push, indexOf,
|
||||
class2type, toString, hasOwn, fnToString, ObjectFunctionString,
|
||||
support, DOMEval ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var
|
||||
version = "3.1.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
|
||||
// The jQuery object is actually just the init constructor 'enhanced'
|
||||
// Need init if jQuery is called (just allow error to be thrown if not included)
|
||||
return new jQuery.fn.init( selector, context );
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only
|
||||
// Make sure we trim BOM and NBSP
|
||||
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
||||
|
||||
// Matches dashed string for camelizing
|
||||
rmsPrefix = /^-ms-/,
|
||||
rdashAlpha = /-([a-z])/g,
|
||||
|
||||
// Used by jQuery.camelCase as callback to replace()
|
||||
fcamelCase = function( all, letter ) {
|
||||
return letter.toUpperCase();
|
||||
};
|
||||
|
||||
jQuery.fn = jQuery.prototype = {
|
||||
|
||||
// The current version of jQuery being used
|
||||
jquery: version,
|
||||
|
||||
constructor: jQuery,
|
||||
|
||||
// The default length of a jQuery object is 0
|
||||
length: 0,
|
||||
|
||||
toArray: function() {
|
||||
return slice.call( this );
|
||||
},
|
||||
|
||||
// Get the Nth element in the matched element set OR
|
||||
// Get the whole matched element set as a clean array
|
||||
get: function( num ) {
|
||||
|
||||
// Return all the elements in a clean array
|
||||
if ( num == null ) {
|
||||
return slice.call( this );
|
||||
}
|
||||
|
||||
// Return just the one element from the set
|
||||
return num < 0 ? this[ num + this.length ] : this[ num ];
|
||||
},
|
||||
|
||||
// Take an array of elements and push it onto the stack
|
||||
// (returning the new matched element set)
|
||||
pushStack: function( elems ) {
|
||||
|
||||
// Build a new jQuery matched element set
|
||||
var ret = jQuery.merge( this.constructor(), elems );
|
||||
|
||||
// Add the old object onto the stack (as a reference)
|
||||
ret.prevObject = this;
|
||||
|
||||
// Return the newly-formed element set
|
||||
return ret;
|
||||
},
|
||||
|
||||
// Execute a callback for every element in the matched set.
|
||||
each: function( callback ) {
|
||||
return jQuery.each( this, callback );
|
||||
},
|
||||
|
||||
map: function( callback ) {
|
||||
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
||||
return callback.call( elem, i, elem );
|
||||
} ) );
|
||||
},
|
||||
|
||||
slice: function() {
|
||||
return this.pushStack( slice.apply( this, arguments ) );
|
||||
},
|
||||
|
||||
first: function() {
|
||||
return this.eq( 0 );
|
||||
},
|
||||
|
||||
last: function() {
|
||||
return this.eq( -1 );
|
||||
},
|
||||
|
||||
eq: function( i ) {
|
||||
var len = this.length,
|
||||
j = +i + ( i < 0 ? len : 0 );
|
||||
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
||||
},
|
||||
|
||||
end: function() {
|
||||
return this.prevObject || this.constructor();
|
||||
},
|
||||
|
||||
// For internal use only.
|
||||
// Behaves like an Array's method, not like a jQuery method.
|
||||
push: push,
|
||||
sort: arr.sort,
|
||||
splice: arr.splice
|
||||
};
|
||||
|
||||
jQuery.extend = jQuery.fn.extend = function() {
|
||||
var options, name, src, copy, copyIsArray, clone,
|
||||
target = arguments[ 0 ] || {},
|
||||
i = 1,
|
||||
length = arguments.length,
|
||||
deep = false;
|
||||
|
||||
// Handle a deep copy situation
|
||||
if ( typeof target === "boolean" ) {
|
||||
deep = target;
|
||||
|
||||
// Skip the boolean and the target
|
||||
target = arguments[ i ] || {};
|
||||
i++;
|
||||
}
|
||||
|
||||
// Handle case when target is a string or something (possible in deep copy)
|
||||
if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
|
||||
target = {};
|
||||
}
|
||||
|
||||
// Extend jQuery itself if only one argument is passed
|
||||
if ( i === length ) {
|
||||
target = this;
|
||||
i--;
|
||||
}
|
||||
|
||||
for ( ; i < length; i++ ) {
|
||||
|
||||
// Only deal with non-null/undefined values
|
||||
if ( ( options = arguments[ i ] ) != null ) {
|
||||
|
||||
// Extend the base object
|
||||
for ( name in options ) {
|
||||
src = target[ name ];
|
||||
copy = options[ name ];
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
}
|
||||
|
||||
// Never move original objects, clone them
|
||||
target[ name ] = jQuery.extend( deep, clone, copy );
|
||||
|
||||
// Don't bring in undefined values
|
||||
} else if ( copy !== undefined ) {
|
||||
target[ name ] = copy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return the modified object
|
||||
return target;
|
||||
};
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Unique for each copy of jQuery on the page
|
||||
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
||||
|
||||
// Assume jQuery is ready without the ready module
|
||||
isReady: true,
|
||||
|
||||
error: function( msg ) {
|
||||
throw new Error( msg );
|
||||
},
|
||||
|
||||
noop: function() {},
|
||||
|
||||
isFunction: function( obj ) {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
|
||||
isNumeric: function( obj ) {
|
||||
|
||||
// As of jQuery 3.0, isNumeric is limited to
|
||||
// strings and numbers (primitives or objects)
|
||||
// that can be coerced to finite numbers (gh-2662)
|
||||
var type = jQuery.type( obj );
|
||||
return ( type === "number" || type === "string" ) &&
|
||||
|
||||
// parseFloat NaNs numeric-cast false positives ("")
|
||||
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
||||
// subtraction forces infinities to NaN
|
||||
!isNaN( obj - parseFloat( obj ) );
|
||||
},
|
||||
|
||||
isPlainObject: function( obj ) {
|
||||
var proto, Ctor;
|
||||
|
||||
// Detect obvious negatives
|
||||
// Use toString instead of jQuery.type to catch host objects
|
||||
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
proto = getProto( obj );
|
||||
|
||||
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
||||
if ( !proto ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Objects with prototype are plain iff they were constructed by a global Object function
|
||||
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
||||
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
||||
},
|
||||
|
||||
isEmptyObject: function( obj ) {
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
// See https://github.com/eslint/eslint/issues/6125
|
||||
var name;
|
||||
|
||||
for ( name in obj ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
type: function( obj ) {
|
||||
if ( obj == null ) {
|
||||
return obj + "";
|
||||
}
|
||||
|
||||
// Support: Android <=2.3 only (functionish RegExp)
|
||||
return typeof obj === "object" || typeof obj === "function" ?
|
||||
class2type[ toString.call( obj ) ] || "object" :
|
||||
typeof obj;
|
||||
},
|
||||
|
||||
// Evaluates a script in a global context
|
||||
globalEval: function( code ) {
|
||||
DOMEval( code );
|
||||
},
|
||||
|
||||
// Convert dashed to camelCase; used by the css and data modules
|
||||
// Support: IE <=9 - 11, Edge 12 - 13
|
||||
// Microsoft forgot to hump their vendor prefix (#9572)
|
||||
camelCase: function( string ) {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
if ( isArrayLike( obj ) ) {
|
||||
length = obj.length;
|
||||
for ( ; i < length; i++ ) {
|
||||
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ( i in obj ) {
|
||||
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only
|
||||
trim: function( text ) {
|
||||
return text == null ?
|
||||
"" :
|
||||
( text + "" ).replace( rtrim, "" );
|
||||
},
|
||||
|
||||
// results is for internal usage only
|
||||
makeArray: function( arr, results ) {
|
||||
var ret = results || [];
|
||||
|
||||
if ( arr != null ) {
|
||||
if ( isArrayLike( Object( arr ) ) ) {
|
||||
jQuery.merge( ret,
|
||||
typeof arr === "string" ?
|
||||
[ arr ] : arr
|
||||
);
|
||||
} else {
|
||||
push.call( ret, arr );
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
inArray: function( elem, arr, i ) {
|
||||
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only, PhantomJS 1 only
|
||||
// push.apply(_, arraylike) throws on ancient WebKit
|
||||
merge: function( first, second ) {
|
||||
var len = +second.length,
|
||||
j = 0,
|
||||
i = first.length;
|
||||
|
||||
for ( ; j < len; j++ ) {
|
||||
first[ i++ ] = second[ j ];
|
||||
}
|
||||
|
||||
first.length = i;
|
||||
|
||||
return first;
|
||||
},
|
||||
|
||||
grep: function( elems, callback, invert ) {
|
||||
var callbackInverse,
|
||||
matches = [],
|
||||
i = 0,
|
||||
length = elems.length,
|
||||
callbackExpect = !invert;
|
||||
|
||||
// Go through the array, only saving the items
|
||||
// that pass the validator function
|
||||
for ( ; i < length; i++ ) {
|
||||
callbackInverse = !callback( elems[ i ], i );
|
||||
if ( callbackInverse !== callbackExpect ) {
|
||||
matches.push( elems[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
},
|
||||
|
||||
// arg is for internal usage only
|
||||
map: function( elems, callback, arg ) {
|
||||
var length, value,
|
||||
i = 0,
|
||||
ret = [];
|
||||
|
||||
// Go through the array, translating each of the items to their new values
|
||||
if ( isArrayLike( elems ) ) {
|
||||
length = elems.length;
|
||||
for ( ; i < length; i++ ) {
|
||||
value = callback( elems[ i ], i, arg );
|
||||
|
||||
if ( value != null ) {
|
||||
ret.push( value );
|
||||
}
|
||||
}
|
||||
|
||||
// Go through every key on the object,
|
||||
} else {
|
||||
for ( i in elems ) {
|
||||
value = callback( elems[ i ], i, arg );
|
||||
|
||||
if ( value != null ) {
|
||||
ret.push( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flatten any nested arrays
|
||||
return concat.apply( [], ret );
|
||||
},
|
||||
|
||||
// A global GUID counter for objects
|
||||
guid: 1,
|
||||
|
||||
// Bind a function to a context, optionally partially applying any
|
||||
// arguments.
|
||||
proxy: function( fn, context ) {
|
||||
var tmp, args, proxy;
|
||||
|
||||
if ( typeof context === "string" ) {
|
||||
tmp = fn[ context ];
|
||||
context = fn;
|
||||
fn = tmp;
|
||||
}
|
||||
|
||||
// Quick check to determine if target is callable, in the spec
|
||||
// this throws a TypeError, but we will just return undefined.
|
||||
if ( !jQuery.isFunction( fn ) ) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Simulated bind
|
||||
args = slice.call( arguments, 2 );
|
||||
proxy = function() {
|
||||
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
||||
};
|
||||
|
||||
// Set the guid of unique handler to the same of original handler, so it can be removed
|
||||
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
||||
|
||||
return proxy;
|
||||
},
|
||||
|
||||
now: Date.now,
|
||||
|
||||
// jQuery.support is not used in Core but other projects attach their
|
||||
// properties to it so it needs to exist.
|
||||
support: support
|
||||
} );
|
||||
|
||||
if ( typeof Symbol === "function" ) {
|
||||
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
||||
}
|
||||
|
||||
// Populate the class2type map
|
||||
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
||||
function( i, name ) {
|
||||
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
||||
} );
|
||||
|
||||
function isArrayLike( obj ) {
|
||||
|
||||
// Support: real iOS 8.2 only (not reproducible in simulator)
|
||||
// `in` check used to prevent JIT error (gh-2145)
|
||||
// hasOwn isn't used here due to false negatives
|
||||
// regarding Nodelist length in IE
|
||||
var length = !!obj && "length" in obj && obj.length,
|
||||
type = jQuery.type( obj );
|
||||
|
||||
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return type === "array" || length === 0 ||
|
||||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
||||
}
|
||||
|
||||
return jQuery;
|
||||
} );
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,36 +0,0 @@
|
||||
Copyright jQuery Foundation and other contributors, https://jquery.org/
|
||||
|
||||
This software consists of voluntary contributions made by many
|
||||
individuals. For exact contribution history, see the revision history
|
||||
available at https://github.com/jquery/sizzle
|
||||
|
||||
The following license applies to all parts of this software except as
|
||||
documented below:
|
||||
|
||||
====
|
||||
|
||||
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.
|
||||
|
||||
====
|
||||
|
||||
All files located in the node_modules and external directories are
|
||||
externally maintained libraries used by this software which have their
|
||||
own licenses; we recommend you read them, as their terms may differ from
|
||||
the terms above.
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,18 +0,0 @@
|
||||
{
|
||||
// Support: IE <=9 only, Android <=4.0 only
|
||||
// The above browsers are failing a lot of tests in the ES5
|
||||
// test suite at http://test262.ecmascript.org.
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 3
|
||||
},
|
||||
"globals": {
|
||||
"window": true,
|
||||
"jQuery": true,
|
||||
"define": true,
|
||||
"module": true,
|
||||
"noGlobal": true
|
||||
},
|
||||
"rules": {
|
||||
"strict": ["error", "function"]
|
||||
}
|
||||
}
|
@ -1,855 +0,0 @@
|
||||
define( [
|
||||
"./core",
|
||||
"./var/document",
|
||||
"./var/rnothtmlwhite",
|
||||
"./ajax/var/location",
|
||||
"./ajax/var/nonce",
|
||||
"./ajax/var/rquery",
|
||||
|
||||
"./core/init",
|
||||
"./ajax/parseXML",
|
||||
"./event/trigger",
|
||||
"./deferred",
|
||||
"./serialize" // jQuery.param
|
||||
], function( jQuery, document, rnothtmlwhite, location, nonce, rquery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var
|
||||
r20 = /%20/g,
|
||||
rhash = /#.*$/,
|
||||
rantiCache = /([?&])_=[^&]*/,
|
||||
rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg,
|
||||
|
||||
// #7653, #8125, #8152: local protocol detection
|
||||
rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
|
||||
rnoContent = /^(?:GET|HEAD)$/,
|
||||
rprotocol = /^\/\//,
|
||||
|
||||
/* Prefilters
|
||||
* 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
|
||||
* 2) These are called:
|
||||
* - BEFORE asking for a transport
|
||||
* - AFTER param serialization (s.data is a string if s.processData is true)
|
||||
* 3) key is the dataType
|
||||
* 4) the catchall symbol "*" can be used
|
||||
* 5) execution will start with transport dataType and THEN continue down to "*" if needed
|
||||
*/
|
||||
prefilters = {},
|
||||
|
||||
/* Transports bindings
|
||||
* 1) key is the dataType
|
||||
* 2) the catchall symbol "*" can be used
|
||||
* 3) selection will start with transport dataType and THEN go to "*" if needed
|
||||
*/
|
||||
transports = {},
|
||||
|
||||
// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
|
||||
allTypes = "*/".concat( "*" ),
|
||||
|
||||
// Anchor tag for parsing the document origin
|
||||
originAnchor = document.createElement( "a" );
|
||||
originAnchor.href = location.href;
|
||||
|
||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||
function addToPrefiltersOrTransports( structure ) {
|
||||
|
||||
// dataTypeExpression is optional and defaults to "*"
|
||||
return function( dataTypeExpression, func ) {
|
||||
|
||||
if ( typeof dataTypeExpression !== "string" ) {
|
||||
func = dataTypeExpression;
|
||||
dataTypeExpression = "*";
|
||||
}
|
||||
|
||||
var dataType,
|
||||
i = 0,
|
||||
dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || [];
|
||||
|
||||
if ( jQuery.isFunction( func ) ) {
|
||||
|
||||
// For each dataType in the dataTypeExpression
|
||||
while ( ( dataType = dataTypes[ i++ ] ) ) {
|
||||
|
||||
// Prepend if requested
|
||||
if ( dataType[ 0 ] === "+" ) {
|
||||
dataType = dataType.slice( 1 ) || "*";
|
||||
( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func );
|
||||
|
||||
// Otherwise append
|
||||
} else {
|
||||
( structure[ dataType ] = structure[ dataType ] || [] ).push( func );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Base inspection function for prefilters and transports
|
||||
function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
|
||||
|
||||
var inspected = {},
|
||||
seekingTransport = ( structure === transports );
|
||||
|
||||
function inspect( dataType ) {
|
||||
var selected;
|
||||
inspected[ dataType ] = true;
|
||||
jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
|
||||
var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
|
||||
if ( typeof dataTypeOrTransport === "string" &&
|
||||
!seekingTransport && !inspected[ dataTypeOrTransport ] ) {
|
||||
|
||||
options.dataTypes.unshift( dataTypeOrTransport );
|
||||
inspect( dataTypeOrTransport );
|
||||
return false;
|
||||
} else if ( seekingTransport ) {
|
||||
return !( selected = dataTypeOrTransport );
|
||||
}
|
||||
} );
|
||||
return selected;
|
||||
}
|
||||
|
||||
return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
|
||||
}
|
||||
|
||||
// A special extend for ajax options
|
||||
// that takes "flat" options (not to be deep extended)
|
||||
// Fixes #9887
|
||||
function ajaxExtend( target, src ) {
|
||||
var key, deep,
|
||||
flatOptions = jQuery.ajaxSettings.flatOptions || {};
|
||||
|
||||
for ( key in src ) {
|
||||
if ( src[ key ] !== undefined ) {
|
||||
( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ];
|
||||
}
|
||||
}
|
||||
if ( deep ) {
|
||||
jQuery.extend( true, target, deep );
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
/* Handles responses to an ajax request:
|
||||
* - finds the right dataType (mediates between content-type and expected dataType)
|
||||
* - returns the corresponding response
|
||||
*/
|
||||
function ajaxHandleResponses( s, jqXHR, responses ) {
|
||||
|
||||
var ct, type, finalDataType, firstDataType,
|
||||
contents = s.contents,
|
||||
dataTypes = s.dataTypes;
|
||||
|
||||
// Remove auto dataType and get content-type in the process
|
||||
while ( dataTypes[ 0 ] === "*" ) {
|
||||
dataTypes.shift();
|
||||
if ( ct === undefined ) {
|
||||
ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" );
|
||||
}
|
||||
}
|
||||
|
||||
// Check if we're dealing with a known content-type
|
||||
if ( ct ) {
|
||||
for ( type in contents ) {
|
||||
if ( contents[ type ] && contents[ type ].test( ct ) ) {
|
||||
dataTypes.unshift( type );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check to see if we have a response for the expected dataType
|
||||
if ( dataTypes[ 0 ] in responses ) {
|
||||
finalDataType = dataTypes[ 0 ];
|
||||
} else {
|
||||
|
||||
// Try convertible dataTypes
|
||||
for ( type in responses ) {
|
||||
if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) {
|
||||
finalDataType = type;
|
||||
break;
|
||||
}
|
||||
if ( !firstDataType ) {
|
||||
firstDataType = type;
|
||||
}
|
||||
}
|
||||
|
||||
// Or just use first one
|
||||
finalDataType = finalDataType || firstDataType;
|
||||
}
|
||||
|
||||
// If we found a dataType
|
||||
// We add the dataType to the list if needed
|
||||
// and return the corresponding response
|
||||
if ( finalDataType ) {
|
||||
if ( finalDataType !== dataTypes[ 0 ] ) {
|
||||
dataTypes.unshift( finalDataType );
|
||||
}
|
||||
return responses[ finalDataType ];
|
||||
}
|
||||
}
|
||||
|
||||
/* Chain conversions given the request and the original response
|
||||
* Also sets the responseXXX fields on the jqXHR instance
|
||||
*/
|
||||
function ajaxConvert( s, response, jqXHR, isSuccess ) {
|
||||
var conv2, current, conv, tmp, prev,
|
||||
converters = {},
|
||||
|
||||
// Work with a copy of dataTypes in case we need to modify it for conversion
|
||||
dataTypes = s.dataTypes.slice();
|
||||
|
||||
// Create converters map with lowercased keys
|
||||
if ( dataTypes[ 1 ] ) {
|
||||
for ( conv in s.converters ) {
|
||||
converters[ conv.toLowerCase() ] = s.converters[ conv ];
|
||||
}
|
||||
}
|
||||
|
||||
current = dataTypes.shift();
|
||||
|
||||
// Convert to each sequential dataType
|
||||
while ( current ) {
|
||||
|
||||
if ( s.responseFields[ current ] ) {
|
||||
jqXHR[ s.responseFields[ current ] ] = response;
|
||||
}
|
||||
|
||||
// Apply the dataFilter if provided
|
||||
if ( !prev && isSuccess && s.dataFilter ) {
|
||||
response = s.dataFilter( response, s.dataType );
|
||||
}
|
||||
|
||||
prev = current;
|
||||
current = dataTypes.shift();
|
||||
|
||||
if ( current ) {
|
||||
|
||||
// There's only work to do if current dataType is non-auto
|
||||
if ( current === "*" ) {
|
||||
|
||||
current = prev;
|
||||
|
||||
// Convert response if prev dataType is non-auto and differs from current
|
||||
} else if ( prev !== "*" && prev !== current ) {
|
||||
|
||||
// Seek a direct converter
|
||||
conv = converters[ prev + " " + current ] || converters[ "* " + current ];
|
||||
|
||||
// If none found, seek a pair
|
||||
if ( !conv ) {
|
||||
for ( conv2 in converters ) {
|
||||
|
||||
// If conv2 outputs current
|
||||
tmp = conv2.split( " " );
|
||||
if ( tmp[ 1 ] === current ) {
|
||||
|
||||
// If prev can be converted to accepted input
|
||||
conv = converters[ prev + " " + tmp[ 0 ] ] ||
|
||||
converters[ "* " + tmp[ 0 ] ];
|
||||
if ( conv ) {
|
||||
|
||||
// Condense equivalence converters
|
||||
if ( conv === true ) {
|
||||
conv = converters[ conv2 ];
|
||||
|
||||
// Otherwise, insert the intermediate dataType
|
||||
} else if ( converters[ conv2 ] !== true ) {
|
||||
current = tmp[ 0 ];
|
||||
dataTypes.unshift( tmp[ 1 ] );
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Apply converter (if not an equivalence)
|
||||
if ( conv !== true ) {
|
||||
|
||||
// Unless errors are allowed to bubble, catch and return them
|
||||
if ( conv && s.throws ) {
|
||||
response = conv( response );
|
||||
} else {
|
||||
try {
|
||||
response = conv( response );
|
||||
} catch ( e ) {
|
||||
return {
|
||||
state: "parsererror",
|
||||
error: conv ? e : "No conversion from " + prev + " to " + current
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return { state: "success", data: response };
|
||||
}
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Counter for holding the number of active queries
|
||||
active: 0,
|
||||
|
||||
// Last-Modified header cache for next request
|
||||
lastModified: {},
|
||||
etag: {},
|
||||
|
||||
ajaxSettings: {
|
||||
url: location.href,
|
||||
type: "GET",
|
||||
isLocal: rlocalProtocol.test( location.protocol ),
|
||||
global: true,
|
||||
processData: true,
|
||||
async: true,
|
||||
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
|
||||
|
||||
/*
|
||||
timeout: 0,
|
||||
data: null,
|
||||
dataType: null,
|
||||
username: null,
|
||||
password: null,
|
||||
cache: null,
|
||||
throws: false,
|
||||
traditional: false,
|
||||
headers: {},
|
||||
*/
|
||||
|
||||
accepts: {
|
||||
"*": allTypes,
|
||||
text: "text/plain",
|
||||
html: "text/html",
|
||||
xml: "application/xml, text/xml",
|
||||
json: "application/json, text/javascript"
|
||||
},
|
||||
|
||||
contents: {
|
||||
xml: /\bxml\b/,
|
||||
html: /\bhtml/,
|
||||
json: /\bjson\b/
|
||||
},
|
||||
|
||||
responseFields: {
|
||||
xml: "responseXML",
|
||||
text: "responseText",
|
||||
json: "responseJSON"
|
||||
},
|
||||
|
||||
// Data converters
|
||||
// Keys separate source (or catchall "*") and destination types with a single space
|
||||
converters: {
|
||||
|
||||
// Convert anything to text
|
||||
"* text": String,
|
||||
|
||||
// Text to html (true = no transformation)
|
||||
"text html": true,
|
||||
|
||||
// Evaluate text as a json expression
|
||||
"text json": JSON.parse,
|
||||
|
||||
// Parse text as xml
|
||||
"text xml": jQuery.parseXML
|
||||
},
|
||||
|
||||
// For options that shouldn't be deep extended:
|
||||
// you can add your own custom options here if
|
||||
// and when you create one that shouldn't be
|
||||
// deep extended (see ajaxExtend)
|
||||
flatOptions: {
|
||||
url: true,
|
||||
context: true
|
||||
}
|
||||
},
|
||||
|
||||
// Creates a full fledged settings object into target
|
||||
// with both ajaxSettings and settings fields.
|
||||
// If target is omitted, writes into ajaxSettings.
|
||||
ajaxSetup: function( target, settings ) {
|
||||
return settings ?
|
||||
|
||||
// Building a settings object
|
||||
ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
|
||||
|
||||
// Extending ajaxSettings
|
||||
ajaxExtend( jQuery.ajaxSettings, target );
|
||||
},
|
||||
|
||||
ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
|
||||
ajaxTransport: addToPrefiltersOrTransports( transports ),
|
||||
|
||||
// Main method
|
||||
ajax: function( url, options ) {
|
||||
|
||||
// If url is an object, simulate pre-1.5 signature
|
||||
if ( typeof url === "object" ) {
|
||||
options = url;
|
||||
url = undefined;
|
||||
}
|
||||
|
||||
// Force options to be an object
|
||||
options = options || {};
|
||||
|
||||
var transport,
|
||||
|
||||
// URL without anti-cache param
|
||||
cacheURL,
|
||||
|
||||
// Response headers
|
||||
responseHeadersString,
|
||||
responseHeaders,
|
||||
|
||||
// timeout handle
|
||||
timeoutTimer,
|
||||
|
||||
// Url cleanup var
|
||||
urlAnchor,
|
||||
|
||||
// Request state (becomes false upon send and true upon completion)
|
||||
completed,
|
||||
|
||||
// To know if global events are to be dispatched
|
||||
fireGlobals,
|
||||
|
||||
// Loop variable
|
||||
i,
|
||||
|
||||
// uncached part of the url
|
||||
uncached,
|
||||
|
||||
// Create the final options object
|
||||
s = jQuery.ajaxSetup( {}, options ),
|
||||
|
||||
// Callbacks context
|
||||
callbackContext = s.context || s,
|
||||
|
||||
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
||||
globalEventContext = s.context &&
|
||||
( callbackContext.nodeType || callbackContext.jquery ) ?
|
||||
jQuery( callbackContext ) :
|
||||
jQuery.event,
|
||||
|
||||
// Deferreds
|
||||
deferred = jQuery.Deferred(),
|
||||
completeDeferred = jQuery.Callbacks( "once memory" ),
|
||||
|
||||
// Status-dependent callbacks
|
||||
statusCode = s.statusCode || {},
|
||||
|
||||
// Headers (they are sent all at once)
|
||||
requestHeaders = {},
|
||||
requestHeadersNames = {},
|
||||
|
||||
// Default abort message
|
||||
strAbort = "canceled",
|
||||
|
||||
// Fake xhr
|
||||
jqXHR = {
|
||||
readyState: 0,
|
||||
|
||||
// Builds headers hashtable if needed
|
||||
getResponseHeader: function( key ) {
|
||||
var match;
|
||||
if ( completed ) {
|
||||
if ( !responseHeaders ) {
|
||||
responseHeaders = {};
|
||||
while ( ( match = rheaders.exec( responseHeadersString ) ) ) {
|
||||
responseHeaders[ match[ 1 ].toLowerCase() ] = match[ 2 ];
|
||||
}
|
||||
}
|
||||
match = responseHeaders[ key.toLowerCase() ];
|
||||
}
|
||||
return match == null ? null : match;
|
||||
},
|
||||
|
||||
// Raw string
|
||||
getAllResponseHeaders: function() {
|
||||
return completed ? responseHeadersString : null;
|
||||
},
|
||||
|
||||
// Caches the header
|
||||
setRequestHeader: function( name, value ) {
|
||||
if ( completed == null ) {
|
||||
name = requestHeadersNames[ name.toLowerCase() ] =
|
||||
requestHeadersNames[ name.toLowerCase() ] || name;
|
||||
requestHeaders[ name ] = value;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Overrides response content-type header
|
||||
overrideMimeType: function( type ) {
|
||||
if ( completed == null ) {
|
||||
s.mimeType = type;
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Status-dependent callbacks
|
||||
statusCode: function( map ) {
|
||||
var code;
|
||||
if ( map ) {
|
||||
if ( completed ) {
|
||||
|
||||
// Execute the appropriate callbacks
|
||||
jqXHR.always( map[ jqXHR.status ] );
|
||||
} else {
|
||||
|
||||
// Lazy-add the new callbacks in a way that preserves old ones
|
||||
for ( code in map ) {
|
||||
statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
|
||||
}
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Cancel the request
|
||||
abort: function( statusText ) {
|
||||
var finalText = statusText || strAbort;
|
||||
if ( transport ) {
|
||||
transport.abort( finalText );
|
||||
}
|
||||
done( 0, finalText );
|
||||
return this;
|
||||
}
|
||||
};
|
||||
|
||||
// Attach deferreds
|
||||
deferred.promise( jqXHR );
|
||||
|
||||
// Add protocol if not provided (prefilters might expect it)
|
||||
// Handle falsy url in the settings object (#10093: consistency with old signature)
|
||||
// We also use the url parameter if available
|
||||
s.url = ( ( url || s.url || location.href ) + "" )
|
||||
.replace( rprotocol, location.protocol + "//" );
|
||||
|
||||
// Alias method option to type as per ticket #12004
|
||||
s.type = options.method || options.type || s.method || s.type;
|
||||
|
||||
// Extract dataTypes list
|
||||
s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ];
|
||||
|
||||
// A cross-domain request is in order when the origin doesn't match the current origin.
|
||||
if ( s.crossDomain == null ) {
|
||||
urlAnchor = document.createElement( "a" );
|
||||
|
||||
// Support: IE <=8 - 11, Edge 12 - 13
|
||||
// IE throws exception on accessing the href property if url is malformed,
|
||||
// e.g. http://example.com:80x/
|
||||
try {
|
||||
urlAnchor.href = s.url;
|
||||
|
||||
// Support: IE <=8 - 11 only
|
||||
// Anchor's host property isn't correctly set when s.url is relative
|
||||
urlAnchor.href = urlAnchor.href;
|
||||
s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !==
|
||||
urlAnchor.protocol + "//" + urlAnchor.host;
|
||||
} catch ( e ) {
|
||||
|
||||
// If there is an error parsing the URL, assume it is crossDomain,
|
||||
// it can be rejected by the transport if it is invalid
|
||||
s.crossDomain = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert data if not already a string
|
||||
if ( s.data && s.processData && typeof s.data !== "string" ) {
|
||||
s.data = jQuery.param( s.data, s.traditional );
|
||||
}
|
||||
|
||||
// Apply prefilters
|
||||
inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
|
||||
|
||||
// If request was aborted inside a prefilter, stop there
|
||||
if ( completed ) {
|
||||
return jqXHR;
|
||||
}
|
||||
|
||||
// We can fire global events as of now if asked to
|
||||
// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)
|
||||
fireGlobals = jQuery.event && s.global;
|
||||
|
||||
// Watch for a new set of requests
|
||||
if ( fireGlobals && jQuery.active++ === 0 ) {
|
||||
jQuery.event.trigger( "ajaxStart" );
|
||||
}
|
||||
|
||||
// Uppercase the type
|
||||
s.type = s.type.toUpperCase();
|
||||
|
||||
// Determine if request has content
|
||||
s.hasContent = !rnoContent.test( s.type );
|
||||
|
||||
// Save the URL in case we're toying with the If-Modified-Since
|
||||
// and/or If-None-Match header later on
|
||||
// Remove hash to simplify url manipulation
|
||||
cacheURL = s.url.replace( rhash, "" );
|
||||
|
||||
// More options handling for requests with no content
|
||||
if ( !s.hasContent ) {
|
||||
|
||||
// Remember the hash so we can put it back
|
||||
uncached = s.url.slice( cacheURL.length );
|
||||
|
||||
// If data is available, append data to url
|
||||
if ( s.data ) {
|
||||
cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data;
|
||||
|
||||
// #9682: remove data so that it's not used in an eventual retry
|
||||
delete s.data;
|
||||
}
|
||||
|
||||
// Add or update anti-cache param if needed
|
||||
if ( s.cache === false ) {
|
||||
cacheURL = cacheURL.replace( rantiCache, "$1" );
|
||||
uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached;
|
||||
}
|
||||
|
||||
// Put hash and anti-cache on the URL that will be requested (gh-1732)
|
||||
s.url = cacheURL + uncached;
|
||||
|
||||
// Change '%20' to '+' if this is encoded form body content (gh-2658)
|
||||
} else if ( s.data && s.processData &&
|
||||
( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) {
|
||||
s.data = s.data.replace( r20, "+" );
|
||||
}
|
||||
|
||||
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
||||
if ( s.ifModified ) {
|
||||
if ( jQuery.lastModified[ cacheURL ] ) {
|
||||
jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
|
||||
}
|
||||
if ( jQuery.etag[ cacheURL ] ) {
|
||||
jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
|
||||
}
|
||||
}
|
||||
|
||||
// Set the correct header, if data is being sent
|
||||
if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
|
||||
jqXHR.setRequestHeader( "Content-Type", s.contentType );
|
||||
}
|
||||
|
||||
// Set the Accepts header for the server, depending on the dataType
|
||||
jqXHR.setRequestHeader(
|
||||
"Accept",
|
||||
s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ?
|
||||
s.accepts[ s.dataTypes[ 0 ] ] +
|
||||
( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
|
||||
s.accepts[ "*" ]
|
||||
);
|
||||
|
||||
// Check for headers option
|
||||
for ( i in s.headers ) {
|
||||
jqXHR.setRequestHeader( i, s.headers[ i ] );
|
||||
}
|
||||
|
||||
// Allow custom headers/mimetypes and early abort
|
||||
if ( s.beforeSend &&
|
||||
( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) {
|
||||
|
||||
// Abort if not done already and return
|
||||
return jqXHR.abort();
|
||||
}
|
||||
|
||||
// Aborting is no longer a cancellation
|
||||
strAbort = "abort";
|
||||
|
||||
// Install callbacks on deferreds
|
||||
completeDeferred.add( s.complete );
|
||||
jqXHR.done( s.success );
|
||||
jqXHR.fail( s.error );
|
||||
|
||||
// Get transport
|
||||
transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
|
||||
|
||||
// If no transport, we auto-abort
|
||||
if ( !transport ) {
|
||||
done( -1, "No Transport" );
|
||||
} else {
|
||||
jqXHR.readyState = 1;
|
||||
|
||||
// Send global event
|
||||
if ( fireGlobals ) {
|
||||
globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
|
||||
}
|
||||
|
||||
// If request was aborted inside ajaxSend, stop there
|
||||
if ( completed ) {
|
||||
return jqXHR;
|
||||
}
|
||||
|
||||
// Timeout
|
||||
if ( s.async && s.timeout > 0 ) {
|
||||
timeoutTimer = window.setTimeout( function() {
|
||||
jqXHR.abort( "timeout" );
|
||||
}, s.timeout );
|
||||
}
|
||||
|
||||
try {
|
||||
completed = false;
|
||||
transport.send( requestHeaders, done );
|
||||
} catch ( e ) {
|
||||
|
||||
// Rethrow post-completion exceptions
|
||||
if ( completed ) {
|
||||
throw e;
|
||||
}
|
||||
|
||||
// Propagate others as results
|
||||
done( -1, e );
|
||||
}
|
||||
}
|
||||
|
||||
// Callback for when everything is done
|
||||
function done( status, nativeStatusText, responses, headers ) {
|
||||
var isSuccess, success, error, response, modified,
|
||||
statusText = nativeStatusText;
|
||||
|
||||
// Ignore repeat invocations
|
||||
if ( completed ) {
|
||||
return;
|
||||
}
|
||||
|
||||
completed = true;
|
||||
|
||||
// Clear timeout if it exists
|
||||
if ( timeoutTimer ) {
|
||||
window.clearTimeout( timeoutTimer );
|
||||
}
|
||||
|
||||
// Dereference transport for early garbage collection
|
||||
// (no matter how long the jqXHR object will be used)
|
||||
transport = undefined;
|
||||
|
||||
// Cache response headers
|
||||
responseHeadersString = headers || "";
|
||||
|
||||
// Set readyState
|
||||
jqXHR.readyState = status > 0 ? 4 : 0;
|
||||
|
||||
// Determine if successful
|
||||
isSuccess = status >= 200 && status < 300 || status === 304;
|
||||
|
||||
// Get response data
|
||||
if ( responses ) {
|
||||
response = ajaxHandleResponses( s, jqXHR, responses );
|
||||
}
|
||||
|
||||
// Convert no matter what (that way responseXXX fields are always set)
|
||||
response = ajaxConvert( s, response, jqXHR, isSuccess );
|
||||
|
||||
// If successful, handle type chaining
|
||||
if ( isSuccess ) {
|
||||
|
||||
// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
|
||||
if ( s.ifModified ) {
|
||||
modified = jqXHR.getResponseHeader( "Last-Modified" );
|
||||
if ( modified ) {
|
||||
jQuery.lastModified[ cacheURL ] = modified;
|
||||
}
|
||||
modified = jqXHR.getResponseHeader( "etag" );
|
||||
if ( modified ) {
|
||||
jQuery.etag[ cacheURL ] = modified;
|
||||
}
|
||||
}
|
||||
|
||||
// if no content
|
||||
if ( status === 204 || s.type === "HEAD" ) {
|
||||
statusText = "nocontent";
|
||||
|
||||
// if not modified
|
||||
} else if ( status === 304 ) {
|
||||
statusText = "notmodified";
|
||||
|
||||
// If we have data, let's convert it
|
||||
} else {
|
||||
statusText = response.state;
|
||||
success = response.data;
|
||||
error = response.error;
|
||||
isSuccess = !error;
|
||||
}
|
||||
} else {
|
||||
|
||||
// Extract error from statusText and normalize for non-aborts
|
||||
error = statusText;
|
||||
if ( status || !statusText ) {
|
||||
statusText = "error";
|
||||
if ( status < 0 ) {
|
||||
status = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set data for the fake xhr object
|
||||
jqXHR.status = status;
|
||||
jqXHR.statusText = ( nativeStatusText || statusText ) + "";
|
||||
|
||||
// Success/Error
|
||||
if ( isSuccess ) {
|
||||
deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
|
||||
} else {
|
||||
deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
|
||||
}
|
||||
|
||||
// Status-dependent callbacks
|
||||
jqXHR.statusCode( statusCode );
|
||||
statusCode = undefined;
|
||||
|
||||
if ( fireGlobals ) {
|
||||
globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
|
||||
[ jqXHR, s, isSuccess ? success : error ] );
|
||||
}
|
||||
|
||||
// Complete
|
||||
completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
|
||||
|
||||
if ( fireGlobals ) {
|
||||
globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
|
||||
|
||||
// Handle the global AJAX counter
|
||||
if ( !( --jQuery.active ) ) {
|
||||
jQuery.event.trigger( "ajaxStop" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return jqXHR;
|
||||
},
|
||||
|
||||
getJSON: function( url, data, callback ) {
|
||||
return jQuery.get( url, data, callback, "json" );
|
||||
},
|
||||
|
||||
getScript: function( url, callback ) {
|
||||
return jQuery.get( url, undefined, callback, "script" );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.each( [ "get", "post" ], function( i, method ) {
|
||||
jQuery[ method ] = function( url, data, callback, type ) {
|
||||
|
||||
// Shift arguments if data argument was omitted
|
||||
if ( jQuery.isFunction( data ) ) {
|
||||
type = type || callback;
|
||||
callback = data;
|
||||
data = undefined;
|
||||
}
|
||||
|
||||
// The url can be an options object (which then must have .url)
|
||||
return jQuery.ajax( jQuery.extend( {
|
||||
url: url,
|
||||
type: method,
|
||||
dataType: type,
|
||||
data: data,
|
||||
success: callback
|
||||
}, jQuery.isPlainObject( url ) && url ) );
|
||||
};
|
||||
} );
|
||||
|
||||
return jQuery;
|
||||
} );
|
@ -1,102 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"./var/nonce",
|
||||
"./var/rquery",
|
||||
"../ajax"
|
||||
], function( jQuery, nonce, rquery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var oldCallbacks = [],
|
||||
rjsonp = /(=)\?(?=&|$)|\?\?/;
|
||||
|
||||
// Default jsonp settings
|
||||
jQuery.ajaxSetup( {
|
||||
jsonp: "callback",
|
||||
jsonpCallback: function() {
|
||||
var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
|
||||
this[ callback ] = true;
|
||||
return callback;
|
||||
}
|
||||
} );
|
||||
|
||||
// Detect, normalize options and install callbacks for jsonp requests
|
||||
jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
|
||||
|
||||
var callbackName, overwritten, responseContainer,
|
||||
jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
|
||||
"url" :
|
||||
typeof s.data === "string" &&
|
||||
( s.contentType || "" )
|
||||
.indexOf( "application/x-www-form-urlencoded" ) === 0 &&
|
||||
rjsonp.test( s.data ) && "data"
|
||||
);
|
||||
|
||||
// Handle iff the expected data type is "jsonp" or we have a parameter to set
|
||||
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
|
||||
|
||||
// Get callback name, remembering preexisting value associated with it
|
||||
callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
|
||||
s.jsonpCallback() :
|
||||
s.jsonpCallback;
|
||||
|
||||
// Insert callback into url or form data
|
||||
if ( jsonProp ) {
|
||||
s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
|
||||
} else if ( s.jsonp !== false ) {
|
||||
s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
|
||||
}
|
||||
|
||||
// Use data converter to retrieve json after script execution
|
||||
s.converters[ "script json" ] = function() {
|
||||
if ( !responseContainer ) {
|
||||
jQuery.error( callbackName + " was not called" );
|
||||
}
|
||||
return responseContainer[ 0 ];
|
||||
};
|
||||
|
||||
// Force json dataType
|
||||
s.dataTypes[ 0 ] = "json";
|
||||
|
||||
// Install callback
|
||||
overwritten = window[ callbackName ];
|
||||
window[ callbackName ] = function() {
|
||||
responseContainer = arguments;
|
||||
};
|
||||
|
||||
// Clean-up function (fires after converters)
|
||||
jqXHR.always( function() {
|
||||
|
||||
// If previous value didn't exist - remove it
|
||||
if ( overwritten === undefined ) {
|
||||
jQuery( window ).removeProp( callbackName );
|
||||
|
||||
// Otherwise restore preexisting value
|
||||
} else {
|
||||
window[ callbackName ] = overwritten;
|
||||
}
|
||||
|
||||
// Save back as free
|
||||
if ( s[ callbackName ] ) {
|
||||
|
||||
// Make sure that re-using the options doesn't screw things around
|
||||
s.jsonpCallback = originalSettings.jsonpCallback;
|
||||
|
||||
// Save the callback name for future use
|
||||
oldCallbacks.push( callbackName );
|
||||
}
|
||||
|
||||
// Call if it was a function and we have a response
|
||||
if ( responseContainer && jQuery.isFunction( overwritten ) ) {
|
||||
overwritten( responseContainer[ 0 ] );
|
||||
}
|
||||
|
||||
responseContainer = overwritten = undefined;
|
||||
} );
|
||||
|
||||
// Delegate to script
|
||||
return "script";
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
@ -1,76 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/stripAndCollapse",
|
||||
"../core/parseHTML",
|
||||
"../ajax",
|
||||
"../traversing",
|
||||
"../manipulation",
|
||||
"../selector"
|
||||
], function( jQuery, stripAndCollapse ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Load a url into a page
|
||||
*/
|
||||
jQuery.fn.load = function( url, params, callback ) {
|
||||
var selector, type, response,
|
||||
self = this,
|
||||
off = url.indexOf( " " );
|
||||
|
||||
if ( off > -1 ) {
|
||||
selector = stripAndCollapse( url.slice( off ) );
|
||||
url = url.slice( 0, off );
|
||||
}
|
||||
|
||||
// If it's a function
|
||||
if ( jQuery.isFunction( params ) ) {
|
||||
|
||||
// We assume that it's the callback
|
||||
callback = params;
|
||||
params = undefined;
|
||||
|
||||
// Otherwise, build a param string
|
||||
} else if ( params && typeof params === "object" ) {
|
||||
type = "POST";
|
||||
}
|
||||
|
||||
// If we have elements to modify, make the request
|
||||
if ( self.length > 0 ) {
|
||||
jQuery.ajax( {
|
||||
url: url,
|
||||
|
||||
// If "type" variable is undefined, then "GET" method will be used.
|
||||
// Make value of this field explicit since
|
||||
// user can override it through ajaxSetup method
|
||||
type: type || "GET",
|
||||
dataType: "html",
|
||||
data: params
|
||||
} ).done( function( responseText ) {
|
||||
|
||||
// Save response for use in complete callback
|
||||
response = arguments;
|
||||
|
||||
self.html( selector ?
|
||||
|
||||
// If a selector was specified, locate the right elements in a dummy div
|
||||
// Exclude scripts to avoid IE 'Permission Denied' errors
|
||||
jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) :
|
||||
|
||||
// Otherwise use the full result
|
||||
responseText );
|
||||
|
||||
// If the request succeeds, this function gets "data", "status", "jqXHR"
|
||||
// but they are ignored because response was set above.
|
||||
// If it fails, this function gets "jqXHR", "status", "error"
|
||||
} ).always( callback && function( jqXHR, status ) {
|
||||
self.each( function() {
|
||||
callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] );
|
||||
} );
|
||||
} );
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
} );
|
@ -1,30 +0,0 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Cross-browser xml parsing
|
||||
jQuery.parseXML = function( data ) {
|
||||
var xml;
|
||||
if ( !data || typeof data !== "string" ) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Support: IE 9 - 11 only
|
||||
// IE throws on parseFromString with invalid input.
|
||||
try {
|
||||
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||
} catch ( e ) {
|
||||
xml = undefined;
|
||||
}
|
||||
|
||||
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
||||
jQuery.error( "Invalid XML: " + data );
|
||||
}
|
||||
return xml;
|
||||
};
|
||||
|
||||
return jQuery.parseXML;
|
||||
|
||||
} );
|
@ -1,77 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"../ajax"
|
||||
], function( jQuery, document ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432)
|
||||
jQuery.ajaxPrefilter( function( s ) {
|
||||
if ( s.crossDomain ) {
|
||||
s.contents.script = false;
|
||||
}
|
||||
} );
|
||||
|
||||
// Install script dataType
|
||||
jQuery.ajaxSetup( {
|
||||
accepts: {
|
||||
script: "text/javascript, application/javascript, " +
|
||||
"application/ecmascript, application/x-ecmascript"
|
||||
},
|
||||
contents: {
|
||||
script: /\b(?:java|ecma)script\b/
|
||||
},
|
||||
converters: {
|
||||
"text script": function( text ) {
|
||||
jQuery.globalEval( text );
|
||||
return text;
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// Handle cache's special case and crossDomain
|
||||
jQuery.ajaxPrefilter( "script", function( s ) {
|
||||
if ( s.cache === undefined ) {
|
||||
s.cache = false;
|
||||
}
|
||||
if ( s.crossDomain ) {
|
||||
s.type = "GET";
|
||||
}
|
||||
} );
|
||||
|
||||
// Bind script tag hack transport
|
||||
jQuery.ajaxTransport( "script", function( s ) {
|
||||
|
||||
// This transport only deals with cross domain requests
|
||||
if ( s.crossDomain ) {
|
||||
var script, callback;
|
||||
return {
|
||||
send: function( _, complete ) {
|
||||
script = jQuery( "<script>" ).prop( {
|
||||
charset: s.scriptCharset,
|
||||
src: s.url
|
||||
} ).on(
|
||||
"load error",
|
||||
callback = function( evt ) {
|
||||
script.remove();
|
||||
callback = null;
|
||||
if ( evt ) {
|
||||
complete( evt.type === "error" ? 404 : 200, evt.type );
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// Use native DOM manipulation to avoid our domManip AJAX trickery
|
||||
document.head.appendChild( script[ 0 ] );
|
||||
},
|
||||
abort: function() {
|
||||
if ( callback ) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
@ -1,5 +0,0 @@
|
||||
define( function() {
|
||||
"use strict";
|
||||
|
||||
return window.location;
|
||||
} );
|
@ -1,7 +0,0 @@
|
||||
define( [
|
||||
"../../core"
|
||||
], function( jQuery ) {
|
||||
"use strict";
|
||||
|
||||
return jQuery.now();
|
||||
} );
|
@ -1,5 +0,0 @@
|
||||
define( function() {
|
||||
"use strict";
|
||||
|
||||
return ( /\?/ );
|
||||
} );
|
@ -1,169 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/support",
|
||||
"../ajax"
|
||||
], function( jQuery, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
jQuery.ajaxSettings.xhr = function() {
|
||||
try {
|
||||
return new window.XMLHttpRequest();
|
||||
} catch ( e ) {}
|
||||
};
|
||||
|
||||
var xhrSuccessStatus = {
|
||||
|
||||
// File protocol always yields status code 0, assume 200
|
||||
0: 200,
|
||||
|
||||
// Support: IE <=9 only
|
||||
// #1450: sometimes IE returns 1223 when it should be 204
|
||||
1223: 204
|
||||
},
|
||||
xhrSupported = jQuery.ajaxSettings.xhr();
|
||||
|
||||
support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
|
||||
support.ajax = xhrSupported = !!xhrSupported;
|
||||
|
||||
jQuery.ajaxTransport( function( options ) {
|
||||
var callback, errorCallback;
|
||||
|
||||
// Cross domain only allowed if supported through XMLHttpRequest
|
||||
if ( support.cors || xhrSupported && !options.crossDomain ) {
|
||||
return {
|
||||
send: function( headers, complete ) {
|
||||
var i,
|
||||
xhr = options.xhr();
|
||||
|
||||
xhr.open(
|
||||
options.type,
|
||||
options.url,
|
||||
options.async,
|
||||
options.username,
|
||||
options.password
|
||||
);
|
||||
|
||||
// Apply custom fields if provided
|
||||
if ( options.xhrFields ) {
|
||||
for ( i in options.xhrFields ) {
|
||||
xhr[ i ] = options.xhrFields[ i ];
|
||||
}
|
||||
}
|
||||
|
||||
// Override mime type if needed
|
||||
if ( options.mimeType && xhr.overrideMimeType ) {
|
||||
xhr.overrideMimeType( options.mimeType );
|
||||
}
|
||||
|
||||
// X-Requested-With header
|
||||
// For cross-domain requests, seeing as conditions for a preflight are
|
||||
// akin to a jigsaw puzzle, we simply never set it to be sure.
|
||||
// (it can always be set on a per-request basis or even using ajaxSetup)
|
||||
// For same-domain requests, won't change header if already provided.
|
||||
if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) {
|
||||
headers[ "X-Requested-With" ] = "XMLHttpRequest";
|
||||
}
|
||||
|
||||
// Set headers
|
||||
for ( i in headers ) {
|
||||
xhr.setRequestHeader( i, headers[ i ] );
|
||||
}
|
||||
|
||||
// Callback
|
||||
callback = function( type ) {
|
||||
return function() {
|
||||
if ( callback ) {
|
||||
callback = errorCallback = xhr.onload =
|
||||
xhr.onerror = xhr.onabort = xhr.onreadystatechange = null;
|
||||
|
||||
if ( type === "abort" ) {
|
||||
xhr.abort();
|
||||
} else if ( type === "error" ) {
|
||||
|
||||
// Support: IE <=9 only
|
||||
// On a manual native abort, IE9 throws
|
||||
// errors on any property access that is not readyState
|
||||
if ( typeof xhr.status !== "number" ) {
|
||||
complete( 0, "error" );
|
||||
} else {
|
||||
complete(
|
||||
|
||||
// File: protocol always yields status 0; see #8605, #14207
|
||||
xhr.status,
|
||||
xhr.statusText
|
||||
);
|
||||
}
|
||||
} else {
|
||||
complete(
|
||||
xhrSuccessStatus[ xhr.status ] || xhr.status,
|
||||
xhr.statusText,
|
||||
|
||||
// Support: IE <=9 only
|
||||
// IE9 has no XHR2 but throws on binary (trac-11426)
|
||||
// For XHR2 non-text, let the caller handle it (gh-2498)
|
||||
( xhr.responseType || "text" ) !== "text" ||
|
||||
typeof xhr.responseText !== "string" ?
|
||||
{ binary: xhr.response } :
|
||||
{ text: xhr.responseText },
|
||||
xhr.getAllResponseHeaders()
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
// Listen to events
|
||||
xhr.onload = callback();
|
||||
errorCallback = xhr.onerror = callback( "error" );
|
||||
|
||||
// Support: IE 9 only
|
||||
// Use onreadystatechange to replace onabort
|
||||
// to handle uncaught aborts
|
||||
if ( xhr.onabort !== undefined ) {
|
||||
xhr.onabort = errorCallback;
|
||||
} else {
|
||||
xhr.onreadystatechange = function() {
|
||||
|
||||
// Check readyState before timeout as it changes
|
||||
if ( xhr.readyState === 4 ) {
|
||||
|
||||
// Allow onerror to be called first,
|
||||
// but that will not handle a native abort
|
||||
// Also, save errorCallback to a variable
|
||||
// as xhr.onerror cannot be accessed
|
||||
window.setTimeout( function() {
|
||||
if ( callback ) {
|
||||
errorCallback();
|
||||
}
|
||||
} );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Create the abort callback
|
||||
callback = callback( "abort" );
|
||||
|
||||
try {
|
||||
|
||||
// Do send the request (this may raise an exception)
|
||||
xhr.send( options.hasContent && options.data || null );
|
||||
} catch ( e ) {
|
||||
|
||||
// #14683: Only rethrow if this hasn't been notified as an error yet
|
||||
if ( callback ) {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
abort: function() {
|
||||
if ( callback ) {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
@ -1,13 +0,0 @@
|
||||
define( [
|
||||
"./core",
|
||||
"./attributes/attr",
|
||||
"./attributes/prop",
|
||||
"./attributes/classes",
|
||||
"./attributes/val"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Return jQuery for attributes-only inclusion
|
||||
return jQuery;
|
||||
} );
|
@ -1,140 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/access",
|
||||
"./support",
|
||||
"../var/rnothtmlwhite",
|
||||
"../selector"
|
||||
], function( jQuery, access, support, rnothtmlwhite ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var boolHook,
|
||||
attrHandle = jQuery.expr.attrHandle;
|
||||
|
||||
jQuery.fn.extend( {
|
||||
attr: function( name, value ) {
|
||||
return access( this, jQuery.attr, name, value, arguments.length > 1 );
|
||||
},
|
||||
|
||||
removeAttr: function( name ) {
|
||||
return this.each( function() {
|
||||
jQuery.removeAttr( this, name );
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.extend( {
|
||||
attr: function( elem, name, value ) {
|
||||
var ret, hooks,
|
||||
nType = elem.nodeType;
|
||||
|
||||
// Don't get/set attributes on text, comment and attribute nodes
|
||||
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Fallback to prop when attributes are not supported
|
||||
if ( typeof elem.getAttribute === "undefined" ) {
|
||||
return jQuery.prop( elem, name, value );
|
||||
}
|
||||
|
||||
// Attribute hooks are determined by the lowercase version
|
||||
// Grab necessary hook if one is defined
|
||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||
hooks = jQuery.attrHooks[ name.toLowerCase() ] ||
|
||||
( jQuery.expr.match.bool.test( name ) ? boolHook : undefined );
|
||||
}
|
||||
|
||||
if ( value !== undefined ) {
|
||||
if ( value === null ) {
|
||||
jQuery.removeAttr( elem, name );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( hooks && "set" in hooks &&
|
||||
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
elem.setAttribute( name, value + "" );
|
||||
return value;
|
||||
}
|
||||
|
||||
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = jQuery.find.attr( elem, name );
|
||||
|
||||
// Non-existent attributes return null, we normalize to undefined
|
||||
return ret == null ? undefined : ret;
|
||||
},
|
||||
|
||||
attrHooks: {
|
||||
type: {
|
||||
set: function( elem, value ) {
|
||||
if ( !support.radioValue && value === "radio" &&
|
||||
jQuery.nodeName( elem, "input" ) ) {
|
||||
var val = elem.value;
|
||||
elem.setAttribute( "type", value );
|
||||
if ( val ) {
|
||||
elem.value = val;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
removeAttr: function( elem, value ) {
|
||||
var name,
|
||||
i = 0,
|
||||
|
||||
// Attribute names can contain non-HTML whitespace characters
|
||||
// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2
|
||||
attrNames = value && value.match( rnothtmlwhite );
|
||||
|
||||
if ( attrNames && elem.nodeType === 1 ) {
|
||||
while ( ( name = attrNames[ i++ ] ) ) {
|
||||
elem.removeAttribute( name );
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// Hooks for boolean attributes
|
||||
boolHook = {
|
||||
set: function( elem, value, name ) {
|
||||
if ( value === false ) {
|
||||
|
||||
// Remove boolean attributes when set to false
|
||||
jQuery.removeAttr( elem, name );
|
||||
} else {
|
||||
elem.setAttribute( name, name );
|
||||
}
|
||||
return name;
|
||||
}
|
||||
};
|
||||
|
||||
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
|
||||
var getter = attrHandle[ name ] || jQuery.find.attr;
|
||||
|
||||
attrHandle[ name ] = function( elem, name, isXML ) {
|
||||
var ret, handle,
|
||||
lowercaseName = name.toLowerCase();
|
||||
|
||||
if ( !isXML ) {
|
||||
|
||||
// Avoid an infinite loop by temporarily removing this function from the getter
|
||||
handle = attrHandle[ lowercaseName ];
|
||||
attrHandle[ lowercaseName ] = ret;
|
||||
ret = getter( elem, name, isXML ) != null ?
|
||||
lowercaseName :
|
||||
null;
|
||||
attrHandle[ lowercaseName ] = handle;
|
||||
}
|
||||
return ret;
|
||||
};
|
||||
} );
|
||||
|
||||
} );
|
@ -1,174 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/stripAndCollapse",
|
||||
"../var/rnothtmlwhite",
|
||||
"../data/var/dataPriv",
|
||||
"../core/init"
|
||||
], function( jQuery, stripAndCollapse, rnothtmlwhite, dataPriv ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function getClass( elem ) {
|
||||
return elem.getAttribute && elem.getAttribute( "class" ) || "";
|
||||
}
|
||||
|
||||
jQuery.fn.extend( {
|
||||
addClass: function( value ) {
|
||||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
jQuery( this ).addClass( value.call( this, j, getClass( this ) ) );
|
||||
} );
|
||||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
while ( ( clazz = classes[ j++ ] ) ) {
|
||||
if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
|
||||
cur += clazz + " ";
|
||||
}
|
||||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
removeClass: function( value ) {
|
||||
var classes, elem, cur, curValue, clazz, j, finalValue,
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each( function( j ) {
|
||||
jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) );
|
||||
} );
|
||||
}
|
||||
|
||||
if ( !arguments.length ) {
|
||||
return this.attr( "class", "" );
|
||||
}
|
||||
|
||||
if ( typeof value === "string" && value ) {
|
||||
classes = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
curValue = getClass( elem );
|
||||
|
||||
// This expression is here for better compressibility (see addClass)
|
||||
cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " );
|
||||
|
||||
if ( cur ) {
|
||||
j = 0;
|
||||
while ( ( clazz = classes[ j++ ] ) ) {
|
||||
|
||||
// Remove *all* instances
|
||||
while ( cur.indexOf( " " + clazz + " " ) > -1 ) {
|
||||
cur = cur.replace( " " + clazz + " ", " " );
|
||||
}
|
||||
}
|
||||
|
||||
// Only assign if different to avoid unneeded rendering.
|
||||
finalValue = stripAndCollapse( cur );
|
||||
if ( curValue !== finalValue ) {
|
||||
elem.setAttribute( "class", finalValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
toggleClass: function( value, stateVal ) {
|
||||
var type = typeof value;
|
||||
|
||||
if ( typeof stateVal === "boolean" && type === "string" ) {
|
||||
return stateVal ? this.addClass( value ) : this.removeClass( value );
|
||||
}
|
||||
|
||||
if ( jQuery.isFunction( value ) ) {
|
||||
return this.each( function( i ) {
|
||||
jQuery( this ).toggleClass(
|
||||
value.call( this, i, getClass( this ), stateVal ),
|
||||
stateVal
|
||||
);
|
||||
} );
|
||||
}
|
||||
|
||||
return this.each( function() {
|
||||
var className, i, self, classNames;
|
||||
|
||||
if ( type === "string" ) {
|
||||
|
||||
// Toggle individual class names
|
||||
i = 0;
|
||||
self = jQuery( this );
|
||||
classNames = value.match( rnothtmlwhite ) || [];
|
||||
|
||||
while ( ( className = classNames[ i++ ] ) ) {
|
||||
|
||||
// Check each className given, space separated list
|
||||
if ( self.hasClass( className ) ) {
|
||||
self.removeClass( className );
|
||||
} else {
|
||||
self.addClass( className );
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle whole class name
|
||||
} else if ( value === undefined || type === "boolean" ) {
|
||||
className = getClass( this );
|
||||
if ( className ) {
|
||||
|
||||
// Store className if set
|
||||
dataPriv.set( this, "__className__", className );
|
||||
}
|
||||
|
||||
// If the element has a class name or if we're passed `false`,
|
||||
// then remove the whole classname (if there was one, the above saved it).
|
||||
// Otherwise bring back whatever was previously saved (if anything),
|
||||
// falling back to the empty string if nothing was stored.
|
||||
if ( this.setAttribute ) {
|
||||
this.setAttribute( "class",
|
||||
className || value === false ?
|
||||
"" :
|
||||
dataPriv.get( this, "__className__" ) || ""
|
||||
);
|
||||
}
|
||||
}
|
||||
} );
|
||||
},
|
||||
|
||||
hasClass: function( selector ) {
|
||||
var className, elem,
|
||||
i = 0;
|
||||
|
||||
className = " " + selector + " ";
|
||||
while ( ( elem = this[ i++ ] ) ) {
|
||||
if ( elem.nodeType === 1 &&
|
||||
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
@ -1,143 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/access",
|
||||
"./support",
|
||||
"../selector"
|
||||
], function( jQuery, access, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rfocusable = /^(?:input|select|textarea|button)$/i,
|
||||
rclickable = /^(?:a|area)$/i;
|
||||
|
||||
jQuery.fn.extend( {
|
||||
prop: function( name, value ) {
|
||||
return access( this, jQuery.prop, name, value, arguments.length > 1 );
|
||||
},
|
||||
|
||||
removeProp: function( name ) {
|
||||
return this.each( function() {
|
||||
delete this[ jQuery.propFix[ name ] || name ];
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.extend( {
|
||||
prop: function( elem, name, value ) {
|
||||
var ret, hooks,
|
||||
nType = elem.nodeType;
|
||||
|
||||
// Don't get/set properties on text, comment and attribute nodes
|
||||
if ( nType === 3 || nType === 8 || nType === 2 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
|
||||
|
||||
// Fix name and attach hooks
|
||||
name = jQuery.propFix[ name ] || name;
|
||||
hooks = jQuery.propHooks[ name ];
|
||||
}
|
||||
|
||||
if ( value !== undefined ) {
|
||||
if ( hooks && "set" in hooks &&
|
||||
( ret = hooks.set( elem, value, name ) ) !== undefined ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ( elem[ name ] = value );
|
||||
}
|
||||
|
||||
if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
return elem[ name ];
|
||||
},
|
||||
|
||||
propHooks: {
|
||||
tabIndex: {
|
||||
get: function( elem ) {
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// elem.tabIndex doesn't always return the
|
||||
// correct value when it hasn't been explicitly set
|
||||
// https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
|
||||
// Use proper attribute retrieval(#12072)
|
||||
var tabindex = jQuery.find.attr( elem, "tabindex" );
|
||||
|
||||
if ( tabindex ) {
|
||||
return parseInt( tabindex, 10 );
|
||||
}
|
||||
|
||||
if (
|
||||
rfocusable.test( elem.nodeName ) ||
|
||||
rclickable.test( elem.nodeName ) &&
|
||||
elem.href
|
||||
) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
propFix: {
|
||||
"for": "htmlFor",
|
||||
"class": "className"
|
||||
}
|
||||
} );
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Accessing the selectedIndex property
|
||||
// forces the browser to respect setting selected
|
||||
// on the option
|
||||
// The getter ensures a default option is selected
|
||||
// when in an optgroup
|
||||
// eslint rule "no-unused-expressions" is disabled for this code
|
||||
// since it considers such accessions noop
|
||||
if ( !support.optSelected ) {
|
||||
jQuery.propHooks.selected = {
|
||||
get: function( elem ) {
|
||||
|
||||
/* eslint no-unused-expressions: "off" */
|
||||
|
||||
var parent = elem.parentNode;
|
||||
if ( parent && parent.parentNode ) {
|
||||
parent.parentNode.selectedIndex;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
set: function( elem ) {
|
||||
|
||||
/* eslint no-unused-expressions: "off" */
|
||||
|
||||
var parent = elem.parentNode;
|
||||
if ( parent ) {
|
||||
parent.selectedIndex;
|
||||
|
||||
if ( parent.parentNode ) {
|
||||
parent.parentNode.selectedIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
jQuery.each( [
|
||||
"tabIndex",
|
||||
"readOnly",
|
||||
"maxLength",
|
||||
"cellSpacing",
|
||||
"cellPadding",
|
||||
"rowSpan",
|
||||
"colSpan",
|
||||
"useMap",
|
||||
"frameBorder",
|
||||
"contentEditable"
|
||||
], function() {
|
||||
jQuery.propFix[ this.toLowerCase() ] = this;
|
||||
} );
|
||||
|
||||
} );
|
@ -1,33 +0,0 @@
|
||||
define( [
|
||||
"../var/document",
|
||||
"../var/support"
|
||||
], function( document, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
( function() {
|
||||
var input = document.createElement( "input" ),
|
||||
select = document.createElement( "select" ),
|
||||
opt = select.appendChild( document.createElement( "option" ) );
|
||||
|
||||
input.type = "checkbox";
|
||||
|
||||
// Support: Android <=4.3 only
|
||||
// Default value for a checkbox should be "on"
|
||||
support.checkOn = input.value !== "";
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Must access selectedIndex to make default options select
|
||||
support.optSelected = opt.selected;
|
||||
|
||||
// Support: IE <=11 only
|
||||
// An input loses its value after becoming a radio
|
||||
input = document.createElement( "input" );
|
||||
input.value = "t";
|
||||
input.type = "radio";
|
||||
support.radioValue = input.value === "t";
|
||||
} )();
|
||||
|
||||
return support;
|
||||
|
||||
} );
|
@ -1,188 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../core/stripAndCollapse",
|
||||
"./support",
|
||||
"../core/init"
|
||||
], function( jQuery, stripAndCollapse, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var rreturn = /\r/g;
|
||||
|
||||
jQuery.fn.extend( {
|
||||
val: function( value ) {
|
||||
var hooks, ret, isFunction,
|
||||
elem = this[ 0 ];
|
||||
|
||||
if ( !arguments.length ) {
|
||||
if ( elem ) {
|
||||
hooks = jQuery.valHooks[ elem.type ] ||
|
||||
jQuery.valHooks[ elem.nodeName.toLowerCase() ];
|
||||
|
||||
if ( hooks &&
|
||||
"get" in hooks &&
|
||||
( ret = hooks.get( elem, "value" ) ) !== undefined
|
||||
) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = elem.value;
|
||||
|
||||
// Handle most common string cases
|
||||
if ( typeof ret === "string" ) {
|
||||
return ret.replace( rreturn, "" );
|
||||
}
|
||||
|
||||
// Handle cases where value is null/undef or number
|
||||
return ret == null ? "" : ret;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
isFunction = jQuery.isFunction( value );
|
||||
|
||||
return this.each( function( i ) {
|
||||
var val;
|
||||
|
||||
if ( this.nodeType !== 1 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( isFunction ) {
|
||||
val = value.call( this, i, jQuery( this ).val() );
|
||||
} else {
|
||||
val = value;
|
||||
}
|
||||
|
||||
// Treat null/undefined as ""; convert numbers to string
|
||||
if ( val == null ) {
|
||||
val = "";
|
||||
|
||||
} else if ( typeof val === "number" ) {
|
||||
val += "";
|
||||
|
||||
} else if ( jQuery.isArray( val ) ) {
|
||||
val = jQuery.map( val, function( value ) {
|
||||
return value == null ? "" : value + "";
|
||||
} );
|
||||
}
|
||||
|
||||
hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
|
||||
|
||||
// If set returns undefined, fall back to normal setting
|
||||
if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) {
|
||||
this.value = val;
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.extend( {
|
||||
valHooks: {
|
||||
option: {
|
||||
get: function( elem ) {
|
||||
|
||||
var val = jQuery.find.attr( elem, "value" );
|
||||
return val != null ?
|
||||
val :
|
||||
|
||||
// Support: IE <=10 - 11 only
|
||||
// option.text throws exceptions (#14686, #14858)
|
||||
// Strip and collapse whitespace
|
||||
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
|
||||
stripAndCollapse( jQuery.text( elem ) );
|
||||
}
|
||||
},
|
||||
select: {
|
||||
get: function( elem ) {
|
||||
var value, option, i,
|
||||
options = elem.options,
|
||||
index = elem.selectedIndex,
|
||||
one = elem.type === "select-one",
|
||||
values = one ? null : [],
|
||||
max = one ? index + 1 : options.length;
|
||||
|
||||
if ( index < 0 ) {
|
||||
i = max;
|
||||
|
||||
} else {
|
||||
i = one ? index : 0;
|
||||
}
|
||||
|
||||
// Loop through all the selected options
|
||||
for ( ; i < max; i++ ) {
|
||||
option = options[ i ];
|
||||
|
||||
// Support: IE <=9 only
|
||||
// IE8-9 doesn't update selected after form reset (#2551)
|
||||
if ( ( option.selected || i === index ) &&
|
||||
|
||||
// Don't return options that are disabled or in a disabled optgroup
|
||||
!option.disabled &&
|
||||
( !option.parentNode.disabled ||
|
||||
!jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
|
||||
|
||||
// Get the specific value for the option
|
||||
value = jQuery( option ).val();
|
||||
|
||||
// We don't need an array for one selects
|
||||
if ( one ) {
|
||||
return value;
|
||||
}
|
||||
|
||||
// Multi-Selects return an array
|
||||
values.push( value );
|
||||
}
|
||||
}
|
||||
|
||||
return values;
|
||||
},
|
||||
|
||||
set: function( elem, value ) {
|
||||
var optionSet, option,
|
||||
options = elem.options,
|
||||
values = jQuery.makeArray( value ),
|
||||
i = options.length;
|
||||
|
||||
while ( i-- ) {
|
||||
option = options[ i ];
|
||||
|
||||
/* eslint-disable no-cond-assign */
|
||||
|
||||
if ( option.selected =
|
||||
jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1
|
||||
) {
|
||||
optionSet = true;
|
||||
}
|
||||
|
||||
/* eslint-enable no-cond-assign */
|
||||
}
|
||||
|
||||
// Force browsers to behave consistently when non-matching value is set
|
||||
if ( !optionSet ) {
|
||||
elem.selectedIndex = -1;
|
||||
}
|
||||
return values;
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
// Radios and checkboxes getter/setter
|
||||
jQuery.each( [ "radio", "checkbox" ], function() {
|
||||
jQuery.valHooks[ this ] = {
|
||||
set: function( elem, value ) {
|
||||
if ( jQuery.isArray( value ) ) {
|
||||
return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 );
|
||||
}
|
||||
}
|
||||
};
|
||||
if ( !support.checkOn ) {
|
||||
jQuery.valHooks[ this ].get = function( elem ) {
|
||||
return elem.getAttribute( "value" ) === null ? "on" : elem.value;
|
||||
};
|
||||
}
|
||||
} );
|
||||
|
||||
} );
|
@ -1,234 +0,0 @@
|
||||
define( [
|
||||
"./core",
|
||||
"./var/rnothtmlwhite"
|
||||
], function( jQuery, rnothtmlwhite ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Convert String-formatted options into Object-formatted ones
|
||||
function createOptions( options ) {
|
||||
var object = {};
|
||||
jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) {
|
||||
object[ flag ] = true;
|
||||
} );
|
||||
return object;
|
||||
}
|
||||
|
||||
/*
|
||||
* Create a callback list using the following parameters:
|
||||
*
|
||||
* options: an optional list of space-separated options that will change how
|
||||
* the callback list behaves or a more traditional option object
|
||||
*
|
||||
* By default a callback list will act like an event callback list and can be
|
||||
* "fired" multiple times.
|
||||
*
|
||||
* Possible options:
|
||||
*
|
||||
* once: will ensure the callback list can only be fired once (like a Deferred)
|
||||
*
|
||||
* memory: will keep track of previous values and will call any callback added
|
||||
* after the list has been fired right away with the latest "memorized"
|
||||
* values (like a Deferred)
|
||||
*
|
||||
* unique: will ensure a callback can only be added once (no duplicate in the list)
|
||||
*
|
||||
* stopOnFalse: interrupt callings when a callback returns false
|
||||
*
|
||||
*/
|
||||
jQuery.Callbacks = function( options ) {
|
||||
|
||||
// Convert options from String-formatted to Object-formatted if needed
|
||||
// (we check in cache first)
|
||||
options = typeof options === "string" ?
|
||||
createOptions( options ) :
|
||||
jQuery.extend( {}, options );
|
||||
|
||||
var // Flag to know if list is currently firing
|
||||
firing,
|
||||
|
||||
// Last fire value for non-forgettable lists
|
||||
memory,
|
||||
|
||||
// Flag to know if list was already fired
|
||||
fired,
|
||||
|
||||
// Flag to prevent firing
|
||||
locked,
|
||||
|
||||
// Actual callback list
|
||||
list = [],
|
||||
|
||||
// Queue of execution data for repeatable lists
|
||||
queue = [],
|
||||
|
||||
// Index of currently firing callback (modified by add/remove as needed)
|
||||
firingIndex = -1,
|
||||
|
||||
// Fire callbacks
|
||||
fire = function() {
|
||||
|
||||
// Enforce single-firing
|
||||
locked = options.once;
|
||||
|
||||
// Execute callbacks for all pending executions,
|
||||
// respecting firingIndex overrides and runtime changes
|
||||
fired = firing = true;
|
||||
for ( ; queue.length; firingIndex = -1 ) {
|
||||
memory = queue.shift();
|
||||
while ( ++firingIndex < list.length ) {
|
||||
|
||||
// Run callback and check for early termination
|
||||
if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
|
||||
options.stopOnFalse ) {
|
||||
|
||||
// Jump to end and forget the data so .add doesn't re-fire
|
||||
firingIndex = list.length;
|
||||
memory = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Forget the data if we're done with it
|
||||
if ( !options.memory ) {
|
||||
memory = false;
|
||||
}
|
||||
|
||||
firing = false;
|
||||
|
||||
// Clean up if we're done firing for good
|
||||
if ( locked ) {
|
||||
|
||||
// Keep an empty list if we have data for future add calls
|
||||
if ( memory ) {
|
||||
list = [];
|
||||
|
||||
// Otherwise, this object is spent
|
||||
} else {
|
||||
list = "";
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Actual Callbacks object
|
||||
self = {
|
||||
|
||||
// Add a callback or a collection of callbacks to the list
|
||||
add: function() {
|
||||
if ( list ) {
|
||||
|
||||
// If we have memory from a past run, we should fire after adding
|
||||
if ( memory && !firing ) {
|
||||
firingIndex = list.length - 1;
|
||||
queue.push( memory );
|
||||
}
|
||||
|
||||
( function add( args ) {
|
||||
jQuery.each( args, function( _, arg ) {
|
||||
if ( jQuery.isFunction( arg ) ) {
|
||||
if ( !options.unique || !self.has( arg ) ) {
|
||||
list.push( arg );
|
||||
}
|
||||
} else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
|
||||
|
||||
// Inspect recursively
|
||||
add( arg );
|
||||
}
|
||||
} );
|
||||
} )( arguments );
|
||||
|
||||
if ( memory && !firing ) {
|
||||
fire();
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Remove a callback from the list
|
||||
remove: function() {
|
||||
jQuery.each( arguments, function( _, arg ) {
|
||||
var index;
|
||||
while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
|
||||
list.splice( index, 1 );
|
||||
|
||||
// Handle firing indexes
|
||||
if ( index <= firingIndex ) {
|
||||
firingIndex--;
|
||||
}
|
||||
}
|
||||
} );
|
||||
return this;
|
||||
},
|
||||
|
||||
// Check if a given callback is in the list.
|
||||
// If no argument is given, return whether or not list has callbacks attached.
|
||||
has: function( fn ) {
|
||||
return fn ?
|
||||
jQuery.inArray( fn, list ) > -1 :
|
||||
list.length > 0;
|
||||
},
|
||||
|
||||
// Remove all callbacks from the list
|
||||
empty: function() {
|
||||
if ( list ) {
|
||||
list = [];
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Disable .fire and .add
|
||||
// Abort any current/pending executions
|
||||
// Clear all callbacks and values
|
||||
disable: function() {
|
||||
locked = queue = [];
|
||||
list = memory = "";
|
||||
return this;
|
||||
},
|
||||
disabled: function() {
|
||||
return !list;
|
||||
},
|
||||
|
||||
// Disable .fire
|
||||
// Also disable .add unless we have memory (since it would have no effect)
|
||||
// Abort any pending executions
|
||||
lock: function() {
|
||||
locked = queue = [];
|
||||
if ( !memory && !firing ) {
|
||||
list = memory = "";
|
||||
}
|
||||
return this;
|
||||
},
|
||||
locked: function() {
|
||||
return !!locked;
|
||||
},
|
||||
|
||||
// Call all callbacks with the given context and arguments
|
||||
fireWith: function( context, args ) {
|
||||
if ( !locked ) {
|
||||
args = args || [];
|
||||
args = [ context, args.slice ? args.slice() : args ];
|
||||
queue.push( args );
|
||||
if ( !firing ) {
|
||||
fire();
|
||||
}
|
||||
}
|
||||
return this;
|
||||
},
|
||||
|
||||
// Call all the callbacks with the given arguments
|
||||
fire: function() {
|
||||
self.fireWith( this, arguments );
|
||||
return this;
|
||||
},
|
||||
|
||||
// To know if the callbacks have already been called at least once
|
||||
fired: function() {
|
||||
return !!fired;
|
||||
}
|
||||
};
|
||||
|
||||
return self;
|
||||
};
|
||||
|
||||
return jQuery;
|
||||
} );
|
@ -1,482 +0,0 @@
|
||||
/* global Symbol */
|
||||
// Defining this global in .eslintrc.json would create a danger of using the global
|
||||
// unguarded in another place, it seems safer to define global only for this module
|
||||
|
||||
define( [
|
||||
"./var/arr",
|
||||
"./var/document",
|
||||
"./var/getProto",
|
||||
"./var/slice",
|
||||
"./var/concat",
|
||||
"./var/push",
|
||||
"./var/indexOf",
|
||||
"./var/class2type",
|
||||
"./var/toString",
|
||||
"./var/hasOwn",
|
||||
"./var/fnToString",
|
||||
"./var/ObjectFunctionString",
|
||||
"./var/support",
|
||||
"./core/DOMEval"
|
||||
], function( arr, document, getProto, slice, concat, push, indexOf,
|
||||
class2type, toString, hasOwn, fnToString, ObjectFunctionString,
|
||||
support, DOMEval ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var
|
||||
version = "3.1.1",
|
||||
|
||||
// Define a local copy of jQuery
|
||||
jQuery = function( selector, context ) {
|
||||
|
||||
// The jQuery object is actually just the init constructor 'enhanced'
|
||||
// Need init if jQuery is called (just allow error to be thrown if not included)
|
||||
return new jQuery.fn.init( selector, context );
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only
|
||||
// Make sure we trim BOM and NBSP
|
||||
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
|
||||
|
||||
// Matches dashed string for camelizing
|
||||
rmsPrefix = /^-ms-/,
|
||||
rdashAlpha = /-([a-z])/g,
|
||||
|
||||
// Used by jQuery.camelCase as callback to replace()
|
||||
fcamelCase = function( all, letter ) {
|
||||
return letter.toUpperCase();
|
||||
};
|
||||
|
||||
jQuery.fn = jQuery.prototype = {
|
||||
|
||||
// The current version of jQuery being used
|
||||
jquery: version,
|
||||
|
||||
constructor: jQuery,
|
||||
|
||||
// The default length of a jQuery object is 0
|
||||
length: 0,
|
||||
|
||||
toArray: function() {
|
||||
return slice.call( this );
|
||||
},
|
||||
|
||||
// Get the Nth element in the matched element set OR
|
||||
// Get the whole matched element set as a clean array
|
||||
get: function( num ) {
|
||||
|
||||
// Return all the elements in a clean array
|
||||
if ( num == null ) {
|
||||
return slice.call( this );
|
||||
}
|
||||
|
||||
// Return just the one element from the set
|
||||
return num < 0 ? this[ num + this.length ] : this[ num ];
|
||||
},
|
||||
|
||||
// Take an array of elements and push it onto the stack
|
||||
// (returning the new matched element set)
|
||||
pushStack: function( elems ) {
|
||||
|
||||
// Build a new jQuery matched element set
|
||||
var ret = jQuery.merge( this.constructor(), elems );
|
||||
|
||||
// Add the old object onto the stack (as a reference)
|
||||
ret.prevObject = this;
|
||||
|
||||
// Return the newly-formed element set
|
||||
return ret;
|
||||
},
|
||||
|
||||
// Execute a callback for every element in the matched set.
|
||||
each: function( callback ) {
|
||||
return jQuery.each( this, callback );
|
||||
},
|
||||
|
||||
map: function( callback ) {
|
||||
return this.pushStack( jQuery.map( this, function( elem, i ) {
|
||||
return callback.call( elem, i, elem );
|
||||
} ) );
|
||||
},
|
||||
|
||||
slice: function() {
|
||||
return this.pushStack( slice.apply( this, arguments ) );
|
||||
},
|
||||
|
||||
first: function() {
|
||||
return this.eq( 0 );
|
||||
},
|
||||
|
||||
last: function() {
|
||||
return this.eq( -1 );
|
||||
},
|
||||
|
||||
eq: function( i ) {
|
||||
var len = this.length,
|
||||
j = +i + ( i < 0 ? len : 0 );
|
||||
return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] );
|
||||
},
|
||||
|
||||
end: function() {
|
||||
return this.prevObject || this.constructor();
|
||||
},
|
||||
|
||||
// For internal use only.
|
||||
// Behaves like an Array's method, not like a jQuery method.
|
||||
push: push,
|
||||
sort: arr.sort,
|
||||
splice: arr.splice
|
||||
};
|
||||
|
||||
jQuery.extend = jQuery.fn.extend = function() {
|
||||
var options, name, src, copy, copyIsArray, clone,
|
||||
target = arguments[ 0 ] || {},
|
||||
i = 1,
|
||||
length = arguments.length,
|
||||
deep = false;
|
||||
|
||||
// Handle a deep copy situation
|
||||
if ( typeof target === "boolean" ) {
|
||||
deep = target;
|
||||
|
||||
// Skip the boolean and the target
|
||||
target = arguments[ i ] || {};
|
||||
i++;
|
||||
}
|
||||
|
||||
// Handle case when target is a string or something (possible in deep copy)
|
||||
if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
|
||||
target = {};
|
||||
}
|
||||
|
||||
// Extend jQuery itself if only one argument is passed
|
||||
if ( i === length ) {
|
||||
target = this;
|
||||
i--;
|
||||
}
|
||||
|
||||
for ( ; i < length; i++ ) {
|
||||
|
||||
// Only deal with non-null/undefined values
|
||||
if ( ( options = arguments[ i ] ) != null ) {
|
||||
|
||||
// Extend the base object
|
||||
for ( name in options ) {
|
||||
src = target[ name ];
|
||||
copy = options[ name ];
|
||||
|
||||
// Prevent never-ending loop
|
||||
if ( target === copy ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Recurse if we're merging plain objects or arrays
|
||||
if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
|
||||
( copyIsArray = jQuery.isArray( copy ) ) ) ) {
|
||||
|
||||
if ( copyIsArray ) {
|
||||
copyIsArray = false;
|
||||
clone = src && jQuery.isArray( src ) ? src : [];
|
||||
|
||||
} else {
|
||||
clone = src && jQuery.isPlainObject( src ) ? src : {};
|
||||
}
|
||||
|
||||
// Never move original objects, clone them
|
||||
target[ name ] = jQuery.extend( deep, clone, copy );
|
||||
|
||||
// Don't bring in undefined values
|
||||
} else if ( copy !== undefined ) {
|
||||
target[ name ] = copy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Return the modified object
|
||||
return target;
|
||||
};
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Unique for each copy of jQuery on the page
|
||||
expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
|
||||
|
||||
// Assume jQuery is ready without the ready module
|
||||
isReady: true,
|
||||
|
||||
error: function( msg ) {
|
||||
throw new Error( msg );
|
||||
},
|
||||
|
||||
noop: function() {},
|
||||
|
||||
isFunction: function( obj ) {
|
||||
return jQuery.type( obj ) === "function";
|
||||
},
|
||||
|
||||
isArray: Array.isArray,
|
||||
|
||||
isWindow: function( obj ) {
|
||||
return obj != null && obj === obj.window;
|
||||
},
|
||||
|
||||
isNumeric: function( obj ) {
|
||||
|
||||
// As of jQuery 3.0, isNumeric is limited to
|
||||
// strings and numbers (primitives or objects)
|
||||
// that can be coerced to finite numbers (gh-2662)
|
||||
var type = jQuery.type( obj );
|
||||
return ( type === "number" || type === "string" ) &&
|
||||
|
||||
// parseFloat NaNs numeric-cast false positives ("")
|
||||
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
|
||||
// subtraction forces infinities to NaN
|
||||
!isNaN( obj - parseFloat( obj ) );
|
||||
},
|
||||
|
||||
isPlainObject: function( obj ) {
|
||||
var proto, Ctor;
|
||||
|
||||
// Detect obvious negatives
|
||||
// Use toString instead of jQuery.type to catch host objects
|
||||
if ( !obj || toString.call( obj ) !== "[object Object]" ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
proto = getProto( obj );
|
||||
|
||||
// Objects with no prototype (e.g., `Object.create( null )`) are plain
|
||||
if ( !proto ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Objects with prototype are plain iff they were constructed by a global Object function
|
||||
Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor;
|
||||
return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString;
|
||||
},
|
||||
|
||||
isEmptyObject: function( obj ) {
|
||||
|
||||
/* eslint-disable no-unused-vars */
|
||||
// See https://github.com/eslint/eslint/issues/6125
|
||||
var name;
|
||||
|
||||
for ( name in obj ) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
type: function( obj ) {
|
||||
if ( obj == null ) {
|
||||
return obj + "";
|
||||
}
|
||||
|
||||
// Support: Android <=2.3 only (functionish RegExp)
|
||||
return typeof obj === "object" || typeof obj === "function" ?
|
||||
class2type[ toString.call( obj ) ] || "object" :
|
||||
typeof obj;
|
||||
},
|
||||
|
||||
// Evaluates a script in a global context
|
||||
globalEval: function( code ) {
|
||||
DOMEval( code );
|
||||
},
|
||||
|
||||
// Convert dashed to camelCase; used by the css and data modules
|
||||
// Support: IE <=9 - 11, Edge 12 - 13
|
||||
// Microsoft forgot to hump their vendor prefix (#9572)
|
||||
camelCase: function( string ) {
|
||||
return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
|
||||
},
|
||||
|
||||
nodeName: function( elem, name ) {
|
||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||
},
|
||||
|
||||
each: function( obj, callback ) {
|
||||
var length, i = 0;
|
||||
|
||||
if ( isArrayLike( obj ) ) {
|
||||
length = obj.length;
|
||||
for ( ; i < length; i++ ) {
|
||||
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for ( i in obj ) {
|
||||
if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only
|
||||
trim: function( text ) {
|
||||
return text == null ?
|
||||
"" :
|
||||
( text + "" ).replace( rtrim, "" );
|
||||
},
|
||||
|
||||
// results is for internal usage only
|
||||
makeArray: function( arr, results ) {
|
||||
var ret = results || [];
|
||||
|
||||
if ( arr != null ) {
|
||||
if ( isArrayLike( Object( arr ) ) ) {
|
||||
jQuery.merge( ret,
|
||||
typeof arr === "string" ?
|
||||
[ arr ] : arr
|
||||
);
|
||||
} else {
|
||||
push.call( ret, arr );
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
},
|
||||
|
||||
inArray: function( elem, arr, i ) {
|
||||
return arr == null ? -1 : indexOf.call( arr, elem, i );
|
||||
},
|
||||
|
||||
// Support: Android <=4.0 only, PhantomJS 1 only
|
||||
// push.apply(_, arraylike) throws on ancient WebKit
|
||||
merge: function( first, second ) {
|
||||
var len = +second.length,
|
||||
j = 0,
|
||||
i = first.length;
|
||||
|
||||
for ( ; j < len; j++ ) {
|
||||
first[ i++ ] = second[ j ];
|
||||
}
|
||||
|
||||
first.length = i;
|
||||
|
||||
return first;
|
||||
},
|
||||
|
||||
grep: function( elems, callback, invert ) {
|
||||
var callbackInverse,
|
||||
matches = [],
|
||||
i = 0,
|
||||
length = elems.length,
|
||||
callbackExpect = !invert;
|
||||
|
||||
// Go through the array, only saving the items
|
||||
// that pass the validator function
|
||||
for ( ; i < length; i++ ) {
|
||||
callbackInverse = !callback( elems[ i ], i );
|
||||
if ( callbackInverse !== callbackExpect ) {
|
||||
matches.push( elems[ i ] );
|
||||
}
|
||||
}
|
||||
|
||||
return matches;
|
||||
},
|
||||
|
||||
// arg is for internal usage only
|
||||
map: function( elems, callback, arg ) {
|
||||
var length, value,
|
||||
i = 0,
|
||||
ret = [];
|
||||
|
||||
// Go through the array, translating each of the items to their new values
|
||||
if ( isArrayLike( elems ) ) {
|
||||
length = elems.length;
|
||||
for ( ; i < length; i++ ) {
|
||||
value = callback( elems[ i ], i, arg );
|
||||
|
||||
if ( value != null ) {
|
||||
ret.push( value );
|
||||
}
|
||||
}
|
||||
|
||||
// Go through every key on the object,
|
||||
} else {
|
||||
for ( i in elems ) {
|
||||
value = callback( elems[ i ], i, arg );
|
||||
|
||||
if ( value != null ) {
|
||||
ret.push( value );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Flatten any nested arrays
|
||||
return concat.apply( [], ret );
|
||||
},
|
||||
|
||||
// A global GUID counter for objects
|
||||
guid: 1,
|
||||
|
||||
// Bind a function to a context, optionally partially applying any
|
||||
// arguments.
|
||||
proxy: function( fn, context ) {
|
||||
var tmp, args, proxy;
|
||||
|
||||
if ( typeof context === "string" ) {
|
||||
tmp = fn[ context ];
|
||||
context = fn;
|
||||
fn = tmp;
|
||||
}
|
||||
|
||||
// Quick check to determine if target is callable, in the spec
|
||||
// this throws a TypeError, but we will just return undefined.
|
||||
if ( !jQuery.isFunction( fn ) ) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Simulated bind
|
||||
args = slice.call( arguments, 2 );
|
||||
proxy = function() {
|
||||
return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
|
||||
};
|
||||
|
||||
// Set the guid of unique handler to the same of original handler, so it can be removed
|
||||
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
|
||||
|
||||
return proxy;
|
||||
},
|
||||
|
||||
now: Date.now,
|
||||
|
||||
// jQuery.support is not used in Core but other projects attach their
|
||||
// properties to it so it needs to exist.
|
||||
support: support
|
||||
} );
|
||||
|
||||
if ( typeof Symbol === "function" ) {
|
||||
jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
|
||||
}
|
||||
|
||||
// Populate the class2type map
|
||||
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
||||
function( i, name ) {
|
||||
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
||||
} );
|
||||
|
||||
function isArrayLike( obj ) {
|
||||
|
||||
// Support: real iOS 8.2 only (not reproducible in simulator)
|
||||
// `in` check used to prevent JIT error (gh-2145)
|
||||
// hasOwn isn't used here due to false negatives
|
||||
// regarding Nodelist length in IE
|
||||
var length = !!obj && "length" in obj && obj.length,
|
||||
type = jQuery.type( obj );
|
||||
|
||||
if ( type === "function" || jQuery.isWindow( obj ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return type === "array" || length === 0 ||
|
||||
typeof length === "number" && length > 0 && ( length - 1 ) in obj;
|
||||
}
|
||||
|
||||
return jQuery;
|
||||
} );
|
@ -1,16 +0,0 @@
|
||||
define( [
|
||||
"../var/document"
|
||||
], function( document ) {
|
||||
"use strict";
|
||||
|
||||
function DOMEval( code, doc ) {
|
||||
doc = doc || document;
|
||||
|
||||
var script = doc.createElement( "script" );
|
||||
|
||||
script.text = code;
|
||||
doc.head.appendChild( script ).parentNode.removeChild( script );
|
||||
}
|
||||
|
||||
return DOMEval;
|
||||
} );
|
@ -1,70 +0,0 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Multifunctional method to get and set values of a collection
|
||||
// The value/s can optionally be executed if it's a function
|
||||
var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
||||
var i = 0,
|
||||
len = elems.length,
|
||||
bulk = key == null;
|
||||
|
||||
// Sets many values
|
||||
if ( jQuery.type( key ) === "object" ) {
|
||||
chainable = true;
|
||||
for ( i in key ) {
|
||||
access( elems, fn, i, key[ i ], true, emptyGet, raw );
|
||||
}
|
||||
|
||||
// Sets one value
|
||||
} else if ( value !== undefined ) {
|
||||
chainable = true;
|
||||
|
||||
if ( !jQuery.isFunction( value ) ) {
|
||||
raw = true;
|
||||
}
|
||||
|
||||
if ( bulk ) {
|
||||
|
||||
// Bulk operations run against the entire set
|
||||
if ( raw ) {
|
||||
fn.call( elems, value );
|
||||
fn = null;
|
||||
|
||||
// ...except when executing function values
|
||||
} else {
|
||||
bulk = fn;
|
||||
fn = function( elem, key, value ) {
|
||||
return bulk.call( jQuery( elem ), value );
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if ( fn ) {
|
||||
for ( ; i < len; i++ ) {
|
||||
fn(
|
||||
elems[ i ], key, raw ?
|
||||
value :
|
||||
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( chainable ) {
|
||||
return elems;
|
||||
}
|
||||
|
||||
// Gets
|
||||
if ( bulk ) {
|
||||
return fn.call( elems );
|
||||
}
|
||||
|
||||
return len ? fn( elems[ 0 ], key ) : emptyGet;
|
||||
};
|
||||
|
||||
return access;
|
||||
|
||||
} );
|
@ -1,127 +0,0 @@
|
||||
// Initialize a jQuery object
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"./var/rsingleTag",
|
||||
"../traversing/findFilter"
|
||||
], function( jQuery, document, rsingleTag ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// A central reference to the root jQuery(document)
|
||||
var rootjQuery,
|
||||
|
||||
// A simple way to check for HTML strings
|
||||
// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
|
||||
// Strict HTML recognition (#11290: must start with <)
|
||||
// Shortcut simple #id case for speed
|
||||
rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,
|
||||
|
||||
init = jQuery.fn.init = function( selector, context, root ) {
|
||||
var match, elem;
|
||||
|
||||
// HANDLE: $(""), $(null), $(undefined), $(false)
|
||||
if ( !selector ) {
|
||||
return this;
|
||||
}
|
||||
|
||||
// Method init() accepts an alternate rootjQuery
|
||||
// so migrate can support jQuery.sub (gh-2101)
|
||||
root = root || rootjQuery;
|
||||
|
||||
// Handle HTML strings
|
||||
if ( typeof selector === "string" ) {
|
||||
if ( selector[ 0 ] === "<" &&
|
||||
selector[ selector.length - 1 ] === ">" &&
|
||||
selector.length >= 3 ) {
|
||||
|
||||
// Assume that strings that start and end with <> are HTML and skip the regex check
|
||||
match = [ null, selector, null ];
|
||||
|
||||
} else {
|
||||
match = rquickExpr.exec( selector );
|
||||
}
|
||||
|
||||
// Match html or make sure no context is specified for #id
|
||||
if ( match && ( match[ 1 ] || !context ) ) {
|
||||
|
||||
// HANDLE: $(html) -> $(array)
|
||||
if ( match[ 1 ] ) {
|
||||
context = context instanceof jQuery ? context[ 0 ] : context;
|
||||
|
||||
// Option to run scripts is true for back-compat
|
||||
// Intentionally let the error be thrown if parseHTML is not present
|
||||
jQuery.merge( this, jQuery.parseHTML(
|
||||
match[ 1 ],
|
||||
context && context.nodeType ? context.ownerDocument || context : document,
|
||||
true
|
||||
) );
|
||||
|
||||
// HANDLE: $(html, props)
|
||||
if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
|
||||
for ( match in context ) {
|
||||
|
||||
// Properties of context are called as methods if possible
|
||||
if ( jQuery.isFunction( this[ match ] ) ) {
|
||||
this[ match ]( context[ match ] );
|
||||
|
||||
// ...and otherwise set as attributes
|
||||
} else {
|
||||
this.attr( match, context[ match ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
|
||||
// HANDLE: $(#id)
|
||||
} else {
|
||||
elem = document.getElementById( match[ 2 ] );
|
||||
|
||||
if ( elem ) {
|
||||
|
||||
// Inject the element directly into the jQuery object
|
||||
this[ 0 ] = elem;
|
||||
this.length = 1;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
// HANDLE: $(expr, $(...))
|
||||
} else if ( !context || context.jquery ) {
|
||||
return ( context || root ).find( selector );
|
||||
|
||||
// HANDLE: $(expr, context)
|
||||
// (which is just equivalent to: $(context).find(expr)
|
||||
} else {
|
||||
return this.constructor( context ).find( selector );
|
||||
}
|
||||
|
||||
// HANDLE: $(DOMElement)
|
||||
} else if ( selector.nodeType ) {
|
||||
this[ 0 ] = selector;
|
||||
this.length = 1;
|
||||
return this;
|
||||
|
||||
// HANDLE: $(function)
|
||||
// Shortcut for document ready
|
||||
} else if ( jQuery.isFunction( selector ) ) {
|
||||
return root.ready !== undefined ?
|
||||
root.ready( selector ) :
|
||||
|
||||
// Execute immediately if ready is not present
|
||||
selector( jQuery );
|
||||
}
|
||||
|
||||
return jQuery.makeArray( selector, this );
|
||||
};
|
||||
|
||||
// Give the init function the jQuery prototype for later instantiation
|
||||
init.prototype = jQuery.fn;
|
||||
|
||||
// Initialize central reference
|
||||
rootjQuery = jQuery( document );
|
||||
|
||||
return init;
|
||||
|
||||
} );
|
@ -1,65 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"./var/rsingleTag",
|
||||
"../manipulation/buildFragment",
|
||||
|
||||
// This is the only module that needs core/support
|
||||
"./support"
|
||||
], function( jQuery, document, rsingleTag, buildFragment, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Argument "data" should be string of html
|
||||
// context (optional): If specified, the fragment will be created in this context,
|
||||
// defaults to document
|
||||
// keepScripts (optional): If true, will include scripts passed in the html string
|
||||
jQuery.parseHTML = function( data, context, keepScripts ) {
|
||||
if ( typeof data !== "string" ) {
|
||||
return [];
|
||||
}
|
||||
if ( typeof context === "boolean" ) {
|
||||
keepScripts = context;
|
||||
context = false;
|
||||
}
|
||||
|
||||
var base, parsed, scripts;
|
||||
|
||||
if ( !context ) {
|
||||
|
||||
// Stop scripts or inline event handlers from being executed immediately
|
||||
// by using document.implementation
|
||||
if ( support.createHTMLDocument ) {
|
||||
context = document.implementation.createHTMLDocument( "" );
|
||||
|
||||
// Set the base href for the created document
|
||||
// so any parsed elements with URLs
|
||||
// are based on the document's URL (gh-2965)
|
||||
base = context.createElement( "base" );
|
||||
base.href = document.location.href;
|
||||
context.head.appendChild( base );
|
||||
} else {
|
||||
context = document;
|
||||
}
|
||||
}
|
||||
|
||||
parsed = rsingleTag.exec( data );
|
||||
scripts = !keepScripts && [];
|
||||
|
||||
// Single tag
|
||||
if ( parsed ) {
|
||||
return [ context.createElement( parsed[ 1 ] ) ];
|
||||
}
|
||||
|
||||
parsed = buildFragment( [ data ], context, scripts );
|
||||
|
||||
if ( scripts && scripts.length ) {
|
||||
jQuery( scripts ).remove();
|
||||
}
|
||||
|
||||
return jQuery.merge( [], parsed.childNodes );
|
||||
};
|
||||
|
||||
return jQuery.parseHTML;
|
||||
|
||||
} );
|
@ -1,105 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document"
|
||||
], function( jQuery, document ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var readyCallbacks = [],
|
||||
whenReady = function( fn ) {
|
||||
readyCallbacks.push( fn );
|
||||
},
|
||||
executeReady = function( fn ) {
|
||||
|
||||
// Prevent errors from freezing future callback execution (gh-1823)
|
||||
// Not backwards-compatible as this does not execute sync
|
||||
window.setTimeout( function() {
|
||||
fn.call( document, jQuery );
|
||||
} );
|
||||
};
|
||||
|
||||
jQuery.fn.ready = function( fn ) {
|
||||
whenReady( fn );
|
||||
return this;
|
||||
};
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Is the DOM ready to be used? Set to true once it occurs.
|
||||
isReady: false,
|
||||
|
||||
// A counter to track how many items to wait for before
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
ready: function( wait ) {
|
||||
|
||||
// Abort if there are pending holds or we're already ready
|
||||
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remember that the DOM is ready
|
||||
jQuery.isReady = true;
|
||||
|
||||
// If a normal DOM Ready event fired, decrement, and wait if need be
|
||||
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
whenReady = function( fn ) {
|
||||
readyCallbacks.push( fn );
|
||||
|
||||
while ( readyCallbacks.length ) {
|
||||
fn = readyCallbacks.shift();
|
||||
if ( jQuery.isFunction( fn ) ) {
|
||||
executeReady( fn );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
whenReady();
|
||||
}
|
||||
} );
|
||||
|
||||
// Make jQuery.ready Promise consumable (gh-1778)
|
||||
jQuery.ready.then = jQuery.fn.ready;
|
||||
|
||||
/**
|
||||
* The ready event handler and self cleanup method
|
||||
*/
|
||||
function completed() {
|
||||
document.removeEventListener( "DOMContentLoaded", completed );
|
||||
window.removeEventListener( "load", completed );
|
||||
jQuery.ready();
|
||||
}
|
||||
|
||||
// Catch cases where $(document).ready() is called
|
||||
// after the browser event has already occurred.
|
||||
// Support: IE9-10 only
|
||||
// Older IE sometimes signals "interactive" too soon
|
||||
if ( document.readyState === "complete" ||
|
||||
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
||||
|
||||
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
||||
window.setTimeout( jQuery.ready );
|
||||
|
||||
} else {
|
||||
|
||||
// Use the handy event callback
|
||||
document.addEventListener( "DOMContentLoaded", completed );
|
||||
|
||||
// A fallback to window.onload, that will always work
|
||||
window.addEventListener( "load", completed );
|
||||
}
|
||||
|
||||
} );
|
@ -1,95 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/document",
|
||||
"../core/readyException",
|
||||
"../deferred"
|
||||
], function( jQuery, document ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// The deferred used on DOM ready
|
||||
var readyList = jQuery.Deferred();
|
||||
|
||||
jQuery.fn.ready = function( fn ) {
|
||||
|
||||
readyList
|
||||
.then( fn )
|
||||
|
||||
// Wrap jQuery.readyException in a function so that the lookup
|
||||
// happens at the time of error handling instead of callback
|
||||
// registration.
|
||||
.catch( function( error ) {
|
||||
jQuery.readyException( error );
|
||||
} );
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Is the DOM ready to be used? Set to true once it occurs.
|
||||
isReady: false,
|
||||
|
||||
// A counter to track how many items to wait for before
|
||||
// the ready event fires. See #6781
|
||||
readyWait: 1,
|
||||
|
||||
// Hold (or release) the ready event
|
||||
holdReady: function( hold ) {
|
||||
if ( hold ) {
|
||||
jQuery.readyWait++;
|
||||
} else {
|
||||
jQuery.ready( true );
|
||||
}
|
||||
},
|
||||
|
||||
// Handle when the DOM is ready
|
||||
ready: function( wait ) {
|
||||
|
||||
// Abort if there are pending holds or we're already ready
|
||||
if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Remember that the DOM is ready
|
||||
jQuery.isReady = true;
|
||||
|
||||
// If a normal DOM Ready event fired, decrement, and wait if need be
|
||||
if ( wait !== true && --jQuery.readyWait > 0 ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If there are functions bound, to execute
|
||||
readyList.resolveWith( document, [ jQuery ] );
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.ready.then = readyList.then;
|
||||
|
||||
// The ready event handler and self cleanup method
|
||||
function completed() {
|
||||
document.removeEventListener( "DOMContentLoaded", completed );
|
||||
window.removeEventListener( "load", completed );
|
||||
jQuery.ready();
|
||||
}
|
||||
|
||||
// Catch cases where $(document).ready() is called
|
||||
// after the browser event has already occurred.
|
||||
// Support: IE <=9 - 10 only
|
||||
// Older IE sometimes signals "interactive" too soon
|
||||
if ( document.readyState === "complete" ||
|
||||
( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
|
||||
|
||||
// Handle it asynchronously to allow scripts the opportunity to delay ready
|
||||
window.setTimeout( jQuery.ready );
|
||||
|
||||
} else {
|
||||
|
||||
// Use the handy event callback
|
||||
document.addEventListener( "DOMContentLoaded", completed );
|
||||
|
||||
// A fallback to window.onload, that will always work
|
||||
window.addEventListener( "load", completed );
|
||||
}
|
||||
|
||||
} );
|
@ -1,13 +0,0 @@
|
||||
define( [
|
||||
"../core"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
jQuery.readyException = function( error ) {
|
||||
window.setTimeout( function() {
|
||||
throw error;
|
||||
} );
|
||||
};
|
||||
|
||||
} );
|
@ -1,14 +0,0 @@
|
||||
define( [
|
||||
"../var/rnothtmlwhite"
|
||||
], function( rnothtmlwhite ) {
|
||||
"use strict";
|
||||
|
||||
// Strip and collapse whitespace according to HTML spec
|
||||
// https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace
|
||||
function stripAndCollapse( value ) {
|
||||
var tokens = value.match( rnothtmlwhite ) || [];
|
||||
return tokens.join( " " );
|
||||
}
|
||||
|
||||
return stripAndCollapse;
|
||||
} );
|
@ -1,20 +0,0 @@
|
||||
define( [
|
||||
"../var/document",
|
||||
"../var/support"
|
||||
], function( document, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
// Support: Safari 8 only
|
||||
// In Safari 8 documents created via document.implementation.createHTMLDocument
|
||||
// collapse sibling forms: the second one becomes a child of the first one.
|
||||
// Because of that, this security measure has to be disabled in Safari 8.
|
||||
// https://bugs.webkit.org/show_bug.cgi?id=137337
|
||||
support.createHTMLDocument = ( function() {
|
||||
var body = document.implementation.createHTMLDocument( "" ).body;
|
||||
body.innerHTML = "<form></form><form></form>";
|
||||
return body.childNodes.length === 2;
|
||||
} )();
|
||||
|
||||
return support;
|
||||
} );
|
@ -1,6 +0,0 @@
|
||||
define( function() {
|
||||
"use strict";
|
||||
|
||||
// Match a standalone tag
|
||||
return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||
} );
|
@ -1,426 +0,0 @@
|
||||
define( [
|
||||
"./core",
|
||||
"./var/pnum",
|
||||
"./core/access",
|
||||
"./css/var/rmargin",
|
||||
"./var/document",
|
||||
"./var/rcssNum",
|
||||
"./css/var/rnumnonpx",
|
||||
"./css/var/cssExpand",
|
||||
"./css/var/getStyles",
|
||||
"./css/var/swap",
|
||||
"./css/curCSS",
|
||||
"./css/adjustCSS",
|
||||
"./css/addGetHookIf",
|
||||
"./css/support",
|
||||
|
||||
"./core/init",
|
||||
"./core/ready",
|
||||
"./selector" // contains
|
||||
], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand,
|
||||
getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
var
|
||||
|
||||
// Swappable if display is none or starts with table
|
||||
// except "table", "table-cell", or "table-caption"
|
||||
// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
|
||||
rdisplayswap = /^(none|table(?!-c[ea]).+)/,
|
||||
cssShow = { position: "absolute", visibility: "hidden", display: "block" },
|
||||
cssNormalTransform = {
|
||||
letterSpacing: "0",
|
||||
fontWeight: "400"
|
||||
},
|
||||
|
||||
cssPrefixes = [ "Webkit", "Moz", "ms" ],
|
||||
emptyStyle = document.createElement( "div" ).style;
|
||||
|
||||
// Return a css property mapped to a potentially vendor prefixed property
|
||||
function vendorPropName( name ) {
|
||||
|
||||
// Shortcut for names that are not vendor prefixed
|
||||
if ( name in emptyStyle ) {
|
||||
return name;
|
||||
}
|
||||
|
||||
// Check for vendor prefixed names
|
||||
var capName = name[ 0 ].toUpperCase() + name.slice( 1 ),
|
||||
i = cssPrefixes.length;
|
||||
|
||||
while ( i-- ) {
|
||||
name = cssPrefixes[ i ] + capName;
|
||||
if ( name in emptyStyle ) {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function setPositiveNumber( elem, value, subtract ) {
|
||||
|
||||
// Any relative (+/-) values have already been
|
||||
// normalized at this point
|
||||
var matches = rcssNum.exec( value );
|
||||
return matches ?
|
||||
|
||||
// Guard against undefined "subtract", e.g., when used as in cssHooks
|
||||
Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) :
|
||||
value;
|
||||
}
|
||||
|
||||
function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
|
||||
var i,
|
||||
val = 0;
|
||||
|
||||
// If we already have the right measurement, avoid augmentation
|
||||
if ( extra === ( isBorderBox ? "border" : "content" ) ) {
|
||||
i = 4;
|
||||
|
||||
// Otherwise initialize for horizontal or vertical properties
|
||||
} else {
|
||||
i = name === "width" ? 1 : 0;
|
||||
}
|
||||
|
||||
for ( ; i < 4; i += 2 ) {
|
||||
|
||||
// Both box models exclude margin, so add it if we want it
|
||||
if ( extra === "margin" ) {
|
||||
val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
|
||||
}
|
||||
|
||||
if ( isBorderBox ) {
|
||||
|
||||
// border-box includes padding, so remove it if we want content
|
||||
if ( extra === "content" ) {
|
||||
val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
||||
}
|
||||
|
||||
// At this point, extra isn't border nor margin, so remove border
|
||||
if ( extra !== "margin" ) {
|
||||
val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
||||
}
|
||||
} else {
|
||||
|
||||
// At this point, extra isn't content, so add padding
|
||||
val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
|
||||
|
||||
// At this point, extra isn't content nor padding, so add border
|
||||
if ( extra !== "padding" ) {
|
||||
val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
function getWidthOrHeight( elem, name, extra ) {
|
||||
|
||||
// Start with offset property, which is equivalent to the border-box value
|
||||
var val,
|
||||
valueIsBorderBox = true,
|
||||
styles = getStyles( elem ),
|
||||
isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
|
||||
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a disconnected node
|
||||
// in IE throws an error.
|
||||
if ( elem.getClientRects().length ) {
|
||||
val = elem.getBoundingClientRect()[ name ];
|
||||
}
|
||||
|
||||
// Some non-html elements return undefined for offsetWidth, so check for null/undefined
|
||||
// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
|
||||
// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
|
||||
if ( val <= 0 || val == null ) {
|
||||
|
||||
// Fall back to computed then uncomputed css if necessary
|
||||
val = curCSS( elem, name, styles );
|
||||
if ( val < 0 || val == null ) {
|
||||
val = elem.style[ name ];
|
||||
}
|
||||
|
||||
// Computed unit is not pixels. Stop here and return.
|
||||
if ( rnumnonpx.test( val ) ) {
|
||||
return val;
|
||||
}
|
||||
|
||||
// Check for style in case a browser which returns unreliable values
|
||||
// for getComputedStyle silently falls back to the reliable elem.style
|
||||
valueIsBorderBox = isBorderBox &&
|
||||
( support.boxSizingReliable() || val === elem.style[ name ] );
|
||||
|
||||
// Normalize "", auto, and prepare for extra
|
||||
val = parseFloat( val ) || 0;
|
||||
}
|
||||
|
||||
// Use the active box-sizing model to add/subtract irrelevant styles
|
||||
return ( val +
|
||||
augmentWidthOrHeight(
|
||||
elem,
|
||||
name,
|
||||
extra || ( isBorderBox ? "border" : "content" ),
|
||||
valueIsBorderBox,
|
||||
styles
|
||||
)
|
||||
) + "px";
|
||||
}
|
||||
|
||||
jQuery.extend( {
|
||||
|
||||
// Add in style property hooks for overriding the default
|
||||
// behavior of getting and setting a style property
|
||||
cssHooks: {
|
||||
opacity: {
|
||||
get: function( elem, computed ) {
|
||||
if ( computed ) {
|
||||
|
||||
// We should always get a number back from opacity
|
||||
var ret = curCSS( elem, "opacity" );
|
||||
return ret === "" ? "1" : ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Don't automatically add "px" to these possibly-unitless properties
|
||||
cssNumber: {
|
||||
"animationIterationCount": true,
|
||||
"columnCount": true,
|
||||
"fillOpacity": true,
|
||||
"flexGrow": true,
|
||||
"flexShrink": true,
|
||||
"fontWeight": true,
|
||||
"lineHeight": true,
|
||||
"opacity": true,
|
||||
"order": true,
|
||||
"orphans": true,
|
||||
"widows": true,
|
||||
"zIndex": true,
|
||||
"zoom": true
|
||||
},
|
||||
|
||||
// Add in properties whose names you wish to fix before
|
||||
// setting or getting the value
|
||||
cssProps: {
|
||||
"float": "cssFloat"
|
||||
},
|
||||
|
||||
// Get and set the style property on a DOM Node
|
||||
style: function( elem, name, value, extra ) {
|
||||
|
||||
// Don't set styles on text and comment nodes
|
||||
if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Make sure that we're working with the right name
|
||||
var ret, type, hooks,
|
||||
origName = jQuery.camelCase( name ),
|
||||
style = elem.style;
|
||||
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
|
||||
// Gets hook for the prefixed version, then unprefixed version
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
|
||||
// Check if we're setting a value
|
||||
if ( value !== undefined ) {
|
||||
type = typeof value;
|
||||
|
||||
// Convert "+=" or "-=" to relative numbers (#7345)
|
||||
if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) {
|
||||
value = adjustCSS( elem, name, ret );
|
||||
|
||||
// Fixes bug #9237
|
||||
type = "number";
|
||||
}
|
||||
|
||||
// Make sure that null and NaN values aren't set (#7116)
|
||||
if ( value == null || value !== value ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If a number was passed in, add the unit (except for certain CSS properties)
|
||||
if ( type === "number" ) {
|
||||
value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" );
|
||||
}
|
||||
|
||||
// background-* props affect original clone's values
|
||||
if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) {
|
||||
style[ name ] = "inherit";
|
||||
}
|
||||
|
||||
// If a hook was provided, use that value, otherwise just set the specified value
|
||||
if ( !hooks || !( "set" in hooks ) ||
|
||||
( value = hooks.set( elem, value, extra ) ) !== undefined ) {
|
||||
|
||||
style[ name ] = value;
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
// If a hook was provided get the non-computed value from there
|
||||
if ( hooks && "get" in hooks &&
|
||||
( ret = hooks.get( elem, false, extra ) ) !== undefined ) {
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Otherwise just get the value from the style object
|
||||
return style[ name ];
|
||||
}
|
||||
},
|
||||
|
||||
css: function( elem, name, extra, styles ) {
|
||||
var val, num, hooks,
|
||||
origName = jQuery.camelCase( name );
|
||||
|
||||
// Make sure that we're working with the right name
|
||||
name = jQuery.cssProps[ origName ] ||
|
||||
( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName );
|
||||
|
||||
// Try prefixed name followed by the unprefixed name
|
||||
hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
|
||||
|
||||
// If a hook was provided get the computed value from there
|
||||
if ( hooks && "get" in hooks ) {
|
||||
val = hooks.get( elem, true, extra );
|
||||
}
|
||||
|
||||
// Otherwise, if a way to get the computed value exists, use that
|
||||
if ( val === undefined ) {
|
||||
val = curCSS( elem, name, styles );
|
||||
}
|
||||
|
||||
// Convert "normal" to computed value
|
||||
if ( val === "normal" && name in cssNormalTransform ) {
|
||||
val = cssNormalTransform[ name ];
|
||||
}
|
||||
|
||||
// Make numeric if forced or a qualifier was provided and val looks numeric
|
||||
if ( extra === "" || extra ) {
|
||||
num = parseFloat( val );
|
||||
return extra === true || isFinite( num ) ? num || 0 : val;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.each( [ "height", "width" ], function( i, name ) {
|
||||
jQuery.cssHooks[ name ] = {
|
||||
get: function( elem, computed, extra ) {
|
||||
if ( computed ) {
|
||||
|
||||
// Certain elements can have dimension info if we invisibly show them
|
||||
// but it must have a current display style that would benefit
|
||||
return rdisplayswap.test( jQuery.css( elem, "display" ) ) &&
|
||||
|
||||
// Support: Safari 8+
|
||||
// Table columns in Safari have non-zero offsetWidth & zero
|
||||
// getBoundingClientRect().width unless display is changed.
|
||||
// Support: IE <=11 only
|
||||
// Running getBoundingClientRect on a disconnected node
|
||||
// in IE throws an error.
|
||||
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
||||
swap( elem, cssShow, function() {
|
||||
return getWidthOrHeight( elem, name, extra );
|
||||
} ) :
|
||||
getWidthOrHeight( elem, name, extra );
|
||||
}
|
||||
},
|
||||
|
||||
set: function( elem, value, extra ) {
|
||||
var matches,
|
||||
styles = extra && getStyles( elem ),
|
||||
subtract = extra && augmentWidthOrHeight(
|
||||
elem,
|
||||
name,
|
||||
extra,
|
||||
jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
|
||||
styles
|
||||
);
|
||||
|
||||
// Convert to pixels if value adjustment is needed
|
||||
if ( subtract && ( matches = rcssNum.exec( value ) ) &&
|
||||
( matches[ 3 ] || "px" ) !== "px" ) {
|
||||
|
||||
elem.style[ name ] = value;
|
||||
value = jQuery.css( elem, name );
|
||||
}
|
||||
|
||||
return setPositiveNumber( elem, value, subtract );
|
||||
}
|
||||
};
|
||||
} );
|
||||
|
||||
jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
||||
function( elem, computed ) {
|
||||
if ( computed ) {
|
||||
return ( parseFloat( curCSS( elem, "marginLeft" ) ) ||
|
||||
elem.getBoundingClientRect().left -
|
||||
swap( elem, { marginLeft: 0 }, function() {
|
||||
return elem.getBoundingClientRect().left;
|
||||
} )
|
||||
) + "px";
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
// These hooks are used by animate to expand properties
|
||||
jQuery.each( {
|
||||
margin: "",
|
||||
padding: "",
|
||||
border: "Width"
|
||||
}, function( prefix, suffix ) {
|
||||
jQuery.cssHooks[ prefix + suffix ] = {
|
||||
expand: function( value ) {
|
||||
var i = 0,
|
||||
expanded = {},
|
||||
|
||||
// Assumes a single number if not a string
|
||||
parts = typeof value === "string" ? value.split( " " ) : [ value ];
|
||||
|
||||
for ( ; i < 4; i++ ) {
|
||||
expanded[ prefix + cssExpand[ i ] + suffix ] =
|
||||
parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
|
||||
}
|
||||
|
||||
return expanded;
|
||||
}
|
||||
};
|
||||
|
||||
if ( !rmargin.test( prefix ) ) {
|
||||
jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
|
||||
}
|
||||
} );
|
||||
|
||||
jQuery.fn.extend( {
|
||||
css: function( name, value ) {
|
||||
return access( this, function( elem, name, value ) {
|
||||
var styles, len,
|
||||
map = {},
|
||||
i = 0;
|
||||
|
||||
if ( jQuery.isArray( name ) ) {
|
||||
styles = getStyles( elem );
|
||||
len = name.length;
|
||||
|
||||
for ( ; i < len; i++ ) {
|
||||
map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
return value !== undefined ?
|
||||
jQuery.style( elem, name, value ) :
|
||||
jQuery.css( elem, name );
|
||||
}, name, value, arguments.length > 1 );
|
||||
}
|
||||
} );
|
||||
|
||||
return jQuery;
|
||||
} );
|
@ -1,26 +0,0 @@
|
||||
define( function() {
|
||||
|
||||
"use strict";
|
||||
|
||||
function addGetHookIf( conditionFn, hookFn ) {
|
||||
|
||||
// Define the hook, we'll check on the first run if it's really needed.
|
||||
return {
|
||||
get: function() {
|
||||
if ( conditionFn() ) {
|
||||
|
||||
// Hook not needed (or it's not possible to use it due
|
||||
// to missing dependency), remove it.
|
||||
delete this.get;
|
||||
return;
|
||||
}
|
||||
|
||||
// Hook needed; redefine it so that the support test is not executed again.
|
||||
return ( this.get = hookFn ).apply( this, arguments );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return addGetHookIf;
|
||||
|
||||
} );
|
@ -1,71 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../var/rcssNum"
|
||||
], function( jQuery, rcssNum ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function adjustCSS( elem, prop, valueParts, tween ) {
|
||||
var adjusted,
|
||||
scale = 1,
|
||||
maxIterations = 20,
|
||||
currentValue = tween ?
|
||||
function() {
|
||||
return tween.cur();
|
||||
} :
|
||||
function() {
|
||||
return jQuery.css( elem, prop, "" );
|
||||
},
|
||||
initial = currentValue(),
|
||||
unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
|
||||
|
||||
// Starting value computation is required for potential unit mismatches
|
||||
initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
|
||||
rcssNum.exec( jQuery.css( elem, prop ) );
|
||||
|
||||
if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
|
||||
|
||||
// Trust units reported by jQuery.css
|
||||
unit = unit || initialInUnit[ 3 ];
|
||||
|
||||
// Make sure we update the tween properties later on
|
||||
valueParts = valueParts || [];
|
||||
|
||||
// Iteratively approximate from a nonzero starting point
|
||||
initialInUnit = +initial || 1;
|
||||
|
||||
do {
|
||||
|
||||
// If previous iteration zeroed out, double until we get *something*.
|
||||
// Use string for doubling so we don't accidentally see scale as unchanged below
|
||||
scale = scale || ".5";
|
||||
|
||||
// Adjust and apply
|
||||
initialInUnit = initialInUnit / scale;
|
||||
jQuery.style( elem, prop, initialInUnit + unit );
|
||||
|
||||
// Update scale, tolerating zero or NaN from tween.cur()
|
||||
// Break the loop if scale is unchanged or perfect, or if we've just had enough.
|
||||
} while (
|
||||
scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
|
||||
);
|
||||
}
|
||||
|
||||
if ( valueParts ) {
|
||||
initialInUnit = +initialInUnit || +initial || 0;
|
||||
|
||||
// Apply relative offset (+=/-=) if specified
|
||||
adjusted = valueParts[ 1 ] ?
|
||||
initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
|
||||
+valueParts[ 2 ];
|
||||
if ( tween ) {
|
||||
tween.unit = unit;
|
||||
tween.start = initialInUnit;
|
||||
tween.end = adjusted;
|
||||
}
|
||||
}
|
||||
return adjusted;
|
||||
}
|
||||
|
||||
return adjustCSS;
|
||||
} );
|
@ -1,59 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"./var/rnumnonpx",
|
||||
"./var/rmargin",
|
||||
"./var/getStyles",
|
||||
"./support",
|
||||
"../selector" // Get jQuery.contains
|
||||
], function( jQuery, rnumnonpx, rmargin, getStyles, support ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
function curCSS( elem, name, computed ) {
|
||||
var width, minWidth, maxWidth, ret,
|
||||
style = elem.style;
|
||||
|
||||
computed = computed || getStyles( elem );
|
||||
|
||||
// Support: IE <=9 only
|
||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||
if ( computed ) {
|
||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
||||
|
||||
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
||||
ret = jQuery.style( elem, name );
|
||||
}
|
||||
|
||||
// A tribute to the "awesome hack by Dean Edwards"
|
||||
// Android Browser returns percentage for some values,
|
||||
// but width seems to be reliably pixels.
|
||||
// This is against the CSSOM draft spec:
|
||||
// https://drafts.csswg.org/cssom/#resolved-values
|
||||
if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) {
|
||||
|
||||
// Remember the original values
|
||||
width = style.width;
|
||||
minWidth = style.minWidth;
|
||||
maxWidth = style.maxWidth;
|
||||
|
||||
// Put in the new values to get a computed value out
|
||||
style.minWidth = style.maxWidth = style.width = ret;
|
||||
ret = computed.width;
|
||||
|
||||
// Revert the changed values
|
||||
style.width = width;
|
||||
style.minWidth = minWidth;
|
||||
style.maxWidth = maxWidth;
|
||||
}
|
||||
}
|
||||
|
||||
return ret !== undefined ?
|
||||
|
||||
// Support: IE <=9 - 11 only
|
||||
// IE returns zIndex value as an integer.
|
||||
ret + "" :
|
||||
ret;
|
||||
}
|
||||
|
||||
return curCSS;
|
||||
} );
|
@ -1,15 +0,0 @@
|
||||
define( [
|
||||
"../core",
|
||||
"../selector"
|
||||
], function( jQuery ) {
|
||||
|
||||
"use strict";
|
||||
|
||||
jQuery.expr.pseudos.hidden = function( elem ) {
|
||||
return !jQuery.expr.pseudos.visible( elem );
|
||||
};
|
||||
jQuery.expr.pseudos.visible = function( elem ) {
|
||||
return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length );
|
||||
};
|
||||
|
||||
} );
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user