Version Description
- Release 2016-10-04
- Fixes for version 2.0.0
Download this release
Release Info
Developer | mrsztuczkens |
Plugin | jQuery Pin It Button for Images |
Version | 2.0.1 |
Comparing to | |
See all releases |
Code changes from version 2.00 to 2.0.1
- includes/admin/settings/class-jpibfi-selection-settings.php +8 -8
- includes/admin/settings/class-jpibfi-settings-base.php +1 -1
- includes/admin/settings/class-jpibfi-visual-settings.php +1 -1
- includes/includes/options/class-jpibfi-visual-options.php +3 -0
- jquery-pin-it-button-for-images.php +2 -2
- js/jpibfi.admin.js +9 -9
- js/jpibfi.client.js +1 -1
- languages/jquery-pin-it-button-for-images.pot +12 -12
- readme.txt +7 -0
includes/admin/settings/class-jpibfi-selection-settings.php
CHANGED
@@ -7,9 +7,9 @@ class JPIBFI_Selection_Settings extends JPIBFI_Settings_Base {
|
|
7 |
$i18n['image_resolution_label'] = __( 'Minimum image resolution', 'jquery-pin-it-button-for-images' );
|
8 |
$i18n['image_resolution_desc'] = __( 'Use this settings to hide the "Pin it" button on small images (e.g. social media icons).', 'jquery-pin-it-button-for-images' );
|
9 |
$i18n['image_resolution_desc_2'] = __( '* - screen that is less than 768 pixels wide', 'jquery-pin-it-button-for-images' );
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
$i18n['show_on_field_label'] = __( 'On which pages the "Pin it" button should be shown', 'jquery-pin-it-button-for-images' );
|
14 |
$i18n['show_on_field_desc'] = __('Separate settings using commas. For the button to show up on a certain page, the page must be included in the "Show on" section and not included in the "Disable on" section. You can use the following settings:')
|
15 |
. '<p>'
|
@@ -29,10 +29,14 @@ class JPIBFI_Selection_Settings extends JPIBFI_Settings_Base {
|
|
29 |
'slug' => 'select',
|
30 |
'name' => __('Selection', 'jquery-pin-it-button-for-images'),
|
31 |
'priority' => 0,
|
32 |
-
'setting_name' => $this->
|
33 |
);
|
34 |
}
|
35 |
|
|
|
|
|
|
|
|
|
36 |
function get_settings_configuration($params) {
|
37 |
|
38 |
$option_value = $this->options->get();
|
@@ -85,10 +89,6 @@ class JPIBFI_Selection_Settings extends JPIBFI_Settings_Base {
|
|
85 |
return $res;
|
86 |
}
|
87 |
|
88 |
-
function get_options() {
|
89 |
-
return new JPIBFI_Selection_Options();
|
90 |
-
}
|
91 |
-
|
92 |
public function sanitize_selection_options( $input ) {
|
93 |
|
94 |
$this->sanitize_input($input);
|
7 |
$i18n['image_resolution_label'] = __( 'Minimum image resolution', 'jquery-pin-it-button-for-images' );
|
8 |
$i18n['image_resolution_desc'] = __( 'Use this settings to hide the "Pin it" button on small images (e.g. social media icons).', 'jquery-pin-it-button-for-images' );
|
9 |
$i18n['image_resolution_desc_2'] = __( '* - screen that is less than 768 pixels wide', 'jquery-pin-it-button-for-images' );
|
10 |
+
$i18n['min_resolution_template_small'] = __('For small screens* the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images');
|
11 |
+
$i18n['min_resolution_template'] = __('Otherwise, the "Pin it" button will show up if the image is at least %height% pixels high and %width% pixels wide.', 'jquery-pin-it-button-for-images');
|
12 |
+
|
13 |
$i18n['show_on_field_label'] = __( 'On which pages the "Pin it" button should be shown', 'jquery-pin-it-button-for-images' );
|
14 |
$i18n['show_on_field_desc'] = __('Separate settings using commas. For the button to show up on a certain page, the page must be included in the "Show on" section and not included in the "Disable on" section. You can use the following settings:')
|
15 |
. '<p>'
|
29 |
'slug' => 'select',
|
30 |
'name' => __('Selection', 'jquery-pin-it-button-for-images'),
|
31 |
'priority' => 0,
|
32 |
+
'setting_name' => $this->get_options()->get_option_name()
|
33 |
);
|
34 |
}
|
35 |
|
36 |
+
function get_options() {
|
37 |
+
return new JPIBFI_Selection_Options();
|
38 |
+
}
|
39 |
+
|
40 |
function get_settings_configuration($params) {
|
41 |
|
42 |
$option_value = $this->options->get();
|
89 |
return $res;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
92 |
public function sanitize_selection_options( $input ) {
|
93 |
|
94 |
$this->sanitize_input($input);
|
includes/admin/settings/class-jpibfi-settings-base.php
CHANGED
@@ -48,7 +48,7 @@ abstract class JPIBFI_Settings_Base extends JPIBFI_Settings_Tab {
|
|
48 |
|
49 |
protected $ajax_save_action;
|
50 |
protected $options;
|
51 |
-
|
52 |
|
53 |
function __construct() {
|
54 |
parent::__construct();
|
48 |
|
49 |
protected $ajax_save_action;
|
50 |
protected $options;
|
51 |
+
public $settings_name;
|
52 |
|
53 |
function __construct() {
|
54 |
parent::__construct();
|
includes/admin/settings/class-jpibfi-visual-settings.php
CHANGED
@@ -25,7 +25,7 @@ class JPIBFI_Visual_Settings extends JPIBFI_Settings_Base {
|
|
25 |
'slug' => 'visual',
|
26 |
'name' => __( 'Visual', 'jquery-pin-it-button-for-images' ),
|
27 |
'priority' => 1,
|
28 |
-
'setting_name' => $this->
|
29 |
);
|
30 |
}
|
31 |
|
25 |
'slug' => 'visual',
|
26 |
'name' => __( 'Visual', 'jquery-pin-it-button-for-images' ),
|
27 |
'priority' => 1,
|
28 |
+
'setting_name' => $this->get_options()->get_option_name()
|
29 |
);
|
30 |
}
|
31 |
|
includes/includes/options/class-jpibfi-visual-options.php
CHANGED
@@ -26,6 +26,9 @@ class JPIBFI_Visual_Options extends JPIBFI_Options {
|
|
26 |
|
27 |
protected function sanitize($input){
|
28 |
$input['show_button'] = 'hover';
|
|
|
|
|
|
|
29 |
return $input;
|
30 |
}
|
31 |
|
26 |
|
27 |
protected function sanitize($input){
|
28 |
$input['show_button'] = 'hover';
|
29 |
+
if ( !is_array( $input['description_option'] ) ) {
|
30 |
+
$input['description_option'] = array ( 'img_title', 'img_alt', 'post_title' );
|
31 |
+
}
|
32 |
return $input;
|
33 |
}
|
34 |
|
jquery-pin-it-button-for-images.php
CHANGED
@@ -6,7 +6,7 @@ Description: Highlights images on hover and adds a "Pin It" button over them for
|
|
6 |
Text Domain: jquery-pin-it-button-for-images
|
7 |
Domain Path: /languages
|
8 |
Author: Marcin Skrzypiec
|
9 |
-
Version:2.0.
|
10 |
Author URI: http://mrsztuczkens.me/
|
11 |
*/
|
12 |
|
@@ -19,7 +19,7 @@ if ( ! class_exists( 'jQuery_Pin_It_Button_For_Images' ) ) :
|
|
19 |
final class jQuery_Pin_It_Button_For_Images {
|
20 |
|
21 |
function __construct() {
|
22 |
-
$version = '2.0.
|
23 |
require_once plugin_dir_path(__FILE__) . 'includes/class-jpibfi.php';
|
24 |
new JPIBFI(__FILE__, $version);
|
25 |
}
|
6 |
Text Domain: jquery-pin-it-button-for-images
|
7 |
Domain Path: /languages
|
8 |
Author: Marcin Skrzypiec
|
9 |
+
Version:2.0.1
|
10 |
Author URI: http://mrsztuczkens.me/
|
11 |
*/
|
12 |
|
19 |
final class jQuery_Pin_It_Button_For_Images {
|
20 |
|
21 |
function __construct() {
|
22 |
+
$version = '2.0.1';
|
23 |
require_once plugin_dir_path(__FILE__) . 'includes/class-jpibfi.php';
|
24 |
new JPIBFI(__FILE__, $version);
|
25 |
}
|
js/jpibfi.admin.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
-
!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./app.controller"),o=r(i),a={bindings:{settingsName:"@"},controller:o["default"],template:'<navbar id="settings-navbar"\n tabs="$ctrl.config.tabs"\n page="$ctrl.config.page"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <status i18n="$ctrl.config.i18n.status"></status>\n <select-editor\n ng-if="$ctrl.config.currentTab == \'select\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </select-editor>\n <visual-editor\n ng-if="$ctrl.config.currentTab == \'visual\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </visual-editor>\n <import-editor\n ng-if="$ctrl.config.currentTab == \'import\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </import-editor>\n '};n["default"]=a},{"./app.controller":2}],2:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){r(this,e),this.httpService=t,this.linkService=n,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.httpService.init(this.config.ajax),this.linkService.init(this.config.page)}}]),e}();o.$inject=["httpService","linkService"],n["default"]=o},{}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("angular-sanitize"),s=r(a),u=e("ng-file-upload"),l=r(u),c=e("angular-drag-and-drop-lists"),f=(r(c),e("./app.component")),d=r(f),p=e("./components/components"),h=r(p),g=e("./common/components"),v=r(g),$=e("./services"),m=r($),b=o["default"].module("app",[s["default"],l["default"],h["default"],v["default"],m["default"]]).component("app",d["default"]).name;n["default"]=b},{"./app.component":1,"./common/components":5,"./components/components":14,"./services":34,angular:41,"angular-drag-and-drop-lists":37,"angular-sanitize":39,"ng-file-upload":43}],4:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.httpService=t}return i(e,[{key:"$onChanges",value:function(e){var t=this;e.settings&&(this.settings=Object.assign({},this.settings),this.values=Object.keys(this.settings).reduce(function(e,n){return e[n]=t.settings[n].value,e},{}))}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n}},{key:"updateValue",value:function(e,t){this.settings[e]=Object.assign({},this.settings[e],{value:t}),this.values[e]=t}},{key:"save",value:function(){var e=this;this.httpService.saveSettings(this.values).then(function(t){var n=t.status,r=t.model;"OK"===n.status&&(e.values=r)})}}]),e}();o.$inject=["httpService"],n["default"]=o},{}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./select"),s=r(a),u=e("./visual"),l=r(u),c=e("./import"),f=r(c),d=o["default"].module("app.common",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./import":8,"./select":9,"./visual":11,angular:41}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./import.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:'\n <h2>{{ ::$ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label>{{ ::$ctrl.i18n.export_title }}</label></th>\n <td>\n <a href="{{ ::$ctrl.i18n.export_url }}" class="button button-default">\n {{ ::$ctrl.i18n.export_button_text }}\n </a>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.import_title }}</label></th>\n <td>\n <button class="button button-primary" type="file"\n ngf-accept="\'.json\'"\n ngf-select="$ctrl.uploadFiles($file, $invalidFiles)" ngf-max-size="1MB">\n {{ ::$ctrl.i18n.import_button_text }}\n </button>\n <div ng-if="$ctrl.upload_status === \'OK\' || $ctrl.upload_status === \'ERROR\'" class="notice"\n ng-class="{ \'error\': $ctrl.upload_status === \'ERROR\', \'updated\': $ctrl.upload_status === \'OK\' }">\n <p><strong ng-bind-html="$ctrl.upload_message"></strong></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n '};n["default"]=a},{"./import.controller":7}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n,i){r(this,e),this.$timeout=t,this.httpService=i,this.Upload=n,this.upload_status="",this.upload_message=""}return i(e,[{key:"uploadFiles",value:function(e,t){this.f=e,this.errFile=t&&t[0],e&&this.httpService.uploadFile(this.i18n.import_action_name,e)}}]),e}();o.$inject=["$timeout","Upload","httpService"],n["default"]=o},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./import.component"),s=r(a),u=o["default"].module("app.common.import",[]).component("importEditor",s["default"]).name;n["default"]=u},{"./import.component":6,angular:41}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./select.component"),s=r(a),u=e("./../../components/components"),l=r(u),c=o["default"].module("app.common.select",[l["default"]]).component("selectEditor",s["default"]).name;n["default"]=c},{"./../../components/components":14,"./select.component":10,angular:41}],10:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../base.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>{{ $ctrl.i18n.min_image_resolution }}</p>\n <p>For small screens* the "Pin it" button will show up if the image is at least <editor-number args="$ctrl.settings.min_image_height_small" on-update="$ctrl.update($event)"></editor-number> pixels high and <editor-number args="$ctrl.settings.min_image_width_small" on-update="$ctrl.update($event)"></editor-number> pixels wide.</p>\n <p>Otherwise, the "Pin it" button will show up if the image is at least <editor-number args="$ctrl.settings.min_image_height" on-update="$ctrl.update($event)"></editor-number> pixels high and <editor-number args="$ctrl.settings.min_image_width" on-update="$ctrl.update($event)"></editor-number> pixels wide.</p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </buton>\n '};n["default"]=a},{"./../base.controller":4}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./visual.component"),s=r(a),u=e("./../../components/components"),l=r(u),c=o["default"].module("app.common.visual",[l["default"]]).component("visualEditor",s["default"]).name;n["default"]=c},{"./../../components/components":14,"./visual.component":12,angular:41}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./visual.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="show_button">{{ ::$ctrl.settings.show_button.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.show_button" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.show_button.desc"></p>\n <!-- @ifdef JPIBFI_LITE -->\n <p ng-if="$ctrl.showButtonError">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n <!-- @endif -->\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.description_option.label }}</label></th>\n <td>\n <editor-sortable-select args="$ctrl.settings.description_option" on-update="$ctrl.update($event)"></editor-sortable-select>\n <p class="description" ng-bind-html="$ctrl.settings.description_option.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="pinLinkedImages">{{ ::$ctrl.settings.pinLinkedImages.label }}</label></th>\n <td>\n <editor-checkbox args="$ctrl.settings.pinLinkedImages" on-update="$ctrl.update($event)"></editor-checkbox>\n <p class="description" ng-bind-html="$ctrl.settings.pinLinkedImages.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="transparency_value">{{ ::$ctrl.settings.transparency_value.label }}</label></th>\n <td>\n <editor-number args="$ctrl.settings.transparency_value" on-update="$ctrl.update($event)"></editor-number>\n <p class="description" ng-bind-html="$ctrl.settings.transparency_value.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.custom_button_label }}</label></th>\n <td>\n <p><editor-checkbox args="$ctrl.settings.use_custom_image" on-update="$ctrl.update($event)"></editor-checkbox></p>\n <p><button class="button button-default" ng-click="$ctrl.upload()">{{ ::$ctrl.i18n.custom_button_upload }}</button></p>\n <p>\n <label for="custom_image_url">{{ ::$ctrl.settings.custom_image_url.label }}</label>\n <editor-text args="$ctrl.settings.custom_image_url" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="custom_image_height">{{ ::$ctrl.settings.custom_image_height.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_height" on-update="$ctrl.update($event)"></editor-number>\n </p>\n <p>\n <label for="custom_image_width">{{ ::$ctrl.settings.custom_image_width.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_width" on-update="$ctrl.update($event)"></editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.custom_button_desc"></p>\n <div ng-if="$ctrl.values.custom_image_url">\n <div style="width: {{ $ctrl.values.custom_image_width }}px;\n height: {{ $ctrl.values.custom_image_height }}px;\n background-image: url(\'{{ $ctrl.values.custom_image_url }}\');">\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th><label for="button_position">{{ ::$ctrl.settings.button_position.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.button_position" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.button_position.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.margins_label }}</label></th>\n <td>\n <p>\n <label for="button_margin_top">{{ ::$ctrl.settings.button_margin_top.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.top" args="$ctrl.settings.button_margin_top" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_bottom">{{ ::$ctrl.settings.button_margin_bottom.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.bottom" args="$ctrl.settings.button_margin_bottom" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_left">{{ ::$ctrl.settings.button_margin_left.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.left" args="$ctrl.settings.button_margin_left" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_right">{{ ::$ctrl.settings.button_margin_right.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.right" args="$ctrl.settings.button_margin_right" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.margins_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </buton>\n '};n["default"]=a},{"./visual.controller":13}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./../base.controller"),c=r(l),f=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.$scope=e,r.fileFrame=null,r}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),this.updateMarginAvailability()}},{key:"update",value:function(e){var t=e.key,n=e.value;return"show_button"===t?(this.showButtonError=!0,void this.updateValue("show_button","hover")):(this.values[t]=n,void("button_position"===t&&this.updateMarginAvailability()))}},{key:"updateMarginAvailability",value:function(){var e=this.values.button_position;this.marginAvailability={top:"top-left"===e||"top-right"===e,bottom:"bottom-left"===e||"bottom-right"===e,left:"top-left"===e||"bottom-left"===e,right:"top-right"===e||"bottom-right"===e}}},{key:"upload",value:function(){var e=this;return this.fileFrame?void this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.i18n.custom_button_frame_title,button:{text:this.i18n.custom_button_frame_button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.updateValue("custom_image_url",t.url),e.updateValue("custom_image_width",t.width),e.updateValue("custom_image_height",t.height),e.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope","httpService"],n["default"]=f},{"./../base.controller":4}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar"),s=r(a),u=e("./editors"),l=r(u),c=e("./status"),f=r(c),d=o["default"].module("app.components",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./editors":27,"./navbar":28,"./status":30,angular:41}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<input type="checkbox" ng-change="$ctrl.change()" id="{{ $ctrl.key }}" ng-model="$ctrl.value">\n <label for=" {{ $ctrl.key }}">{{ ::$ctrl.args.text }}</label><br/>'};n["default"]=a},{"./editor.controller":18}],16:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.checkboxes.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<p ng-repeat="(key, label) in $ctrl.args.options">\n <input type="checkbox" id="{{:: $ctrl.key + \'_\' + key }}" ng-change="$ctrl.change()" ng-model="$ctrl.values[key]" />\n <label for="{{ $ctrl.key + \'_\' + key }}">{{ ::label }}</label>\n </p>'};n["default"]=a},{"./editor.checkboxes.controller":17}],17:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.key=this.args.key;var t=this.args.value||[];this.values=Object.keys(this.args.options).reduce(function(e,n){return e[n]=t.indexOf(n)!==-1,e},{})}return i(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=Object.assign({},this.args))}},{key:"change",value:function(e){var t=this;return this.onUpdate({$event:{key:this.key,value:Object.keys(this.args.options).reduce(function(e,n){return t.values[n]?e.concat([n]):e},[])}}),e}}]),e}();o.$inject=[],n["default"]=o},{}],18:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=Object.assign({},this.args),this.key=this.args.key,this.value=this.args.value)}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.value}})}}]),e}();o.$inject=[],n["default"]=o},{}],19:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'\n <input id="{{ $ctrl.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" /> \n <span>{{ ::$ctrl.args.unit }}</span>'};n["default"]=a},{"./editor.controller":18}],20:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$parse=t,this.restrict="A"}return i(e,[{key:"link",value:function(e,t,n){var r=this.$parse(n.numberAttributes)(e),i=["step","min","max"];i.forEach(function(e){void 0!==r[e]&&t.attr(e,r[e])})}}]),e}();n["default"]=o},{}],21:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.select.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <select ng-model="$ctrl.value" ng-change="$ctrl.change()">\n <option ng-repeat="(value, name) in $ctrl.args.options" value="{{ value }}">{{ name }}</option>\n </select>'};n["default"]=a},{"./editor.select.controller":22}],22:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./editor.controller"),c=r(l),f=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),e.args&&(void 0!==this.args.value&&null!==this.args.value||(this.value=Object.keys(this.args.options)[0],this.change()),this.args.truthy&&(this.value=this.value?"1":"0"))}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.args.truthy?"1"===this.value:this.value}})}}]),t}(c["default"]);f.$inject=[],n["default"]=f},{"./editor.controller":18}],23:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.sortableSelect.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <ul class="frizzly-sortable" dnd-list="$ctrl.options">\n <li ng-repeat="item in $ctrl.options"\n dnd-draggable="item"\n dnd-moved="$ctrl.options.splice($index, 1); $ctrl.change()"\n dnd-effect-allowed="move">\n <input type="checkbox" id="{{ item.key }}" ng-model="item.selected" ng-change="$ctrl.change()" />\n <label for="{{ item.key }}">{{ item.label }}\n </li>\n </ul>\n '};n["default"]=a},{"./editor.sortableSelect.controller":24}],24:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,[{key:"$onChanges",value:function(e){var t=this;if(e.args){this.args=Object.assign({},this.args),this.key=this.args.key,this.value=this.args.value||[];var n=this.value.slice().concat(Object.keys(this.args.options).filter(function(e){return t.value.indexOf(e)===-1}));this.options=n.map(function(e){return{key:e,label:t.args.options[e],selected:t.value.indexOf(e)!==-1}})}}},{key:"change",value:function(){var e=this.options.reduce(function(e,t){return t.selected?e.concat([t.key]):e},[]);this.onUpdate({$event:{key:this.key,value:e}})}}]),e}();o.$inject=[],n["default"]=o},{}],25:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<input type="text" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />'};n["default"]=a},{"./editor.controller":18}],26:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<textarea rows="3" cols="50" id="{{ $ctrl.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":18}],27:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./editor.text.component"),s=r(a),u=e("./editor.textarea.component"),l=r(u),c=e("./editor.number.component"),f=r(c),d=e("./editor.number.directive"),p=r(d),h=e("./editor.checkbox.component"),g=r(h),v=e("./editor.checkboxes.component"),$=r(v),m=e("./editor.select.component"),b=r(m),y=e("./editor.sortableSelect.component"),w=r(y),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorNumber",f["default"]).component("editorCheckbox",g["default"]).component("editorCheckboxes",$["default"]).component("editorSelect",b["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new p["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":15,"./editor.checkboxes.component":16,"./editor.number.component":19,"./editor.number.directive":20,"./editor.select.component":21,"./editor.sortableSelect.component":23,"./editor.text.component":25,"./editor.textarea.component":26,angular:41}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar.component"),s=r(a),u=o["default"].module("navbar",[]).component("navbar",s["default"]).name;n["default"]=u},{"./navbar.component":29,angular:41}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindings:{currentTab:"<",tabs:"<",page:"<"},controller:function(){},template:'\n <h2 class="nav-tab-wrapper">\n <a ng-repeat="tab in $ctrl.tabs" \n href="?page={{ $ctrl.page }}&tab={{ tab.slug }}" class="nav-tab {{ $ctrl.currentTab == tab.slug ? \'nav-tab-active\' : \'\' }}">\n {{ tab.name }}\n </a>\n </h2>\n '};n["default"]=r;
|
2 |
-
},{}],30:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./status.component"),s=r(a),u=o["default"].module("status",[]).component("status",s["default"]).name;n["default"]=u},{"./status.component":31,angular:41}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./status.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:"\n <div class=\"notice notice-success\" ng-if=\"$ctrl.status.status != ''\" ng-class=\"{ \n 'notice-success': $ctrl.status.status === 'OK',\n 'notice-info' : $ctrl.status.status === 'PENDING',\n 'notice-error': $ctrl.status.status === 'ERROR'\n }\">\n <p ng-repeat=\"(key, text) in $ctrl.status.messages\"><strong>{{ text }}</strong></p>\n </div>\n "};n["default"]=a},{"./status.controller":32}],32:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var i=this;r(this,e),this.$anchorScroll=t,this.status={status:""},n.onRequest(function(){return i.onRequestHandler()}),n.onResponse(function(e){var t=e.status;return i.onResponseHandler(t)})}return i(e,[{key:"onResponseHandler",value:function(e){this.status=e}},{key:"onRequestHandler",value:function(){this.$anchorScroll(),this.status.status="PENDING",this.status.messages={pending:this.i18n.pending}}}]),e}();o.$inject=["$anchorScroll","httpService"],n["default"]=o},{}],33:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("angular"),s=r(a),u=function(){function e(t,n,r){i(this,e),this.$http=t,this.$timeout=n,this.Upload=r,this.responseObservers=[],this.requestObservers=[]}return o(e,[{key:"init",value:function(e){this.url=e.url,this.saveSettingsParams={action:e.saveSettingsAction,nonce:e.saveSettingsNonce,tab:e.tab},this.customActionParams={action:e.customAction,nonce:e.customActionNonce}}},{key:"onRequest",value:function(e){this.requestObservers.push(e)}},{key:"onResponse",value:function(e){this.responseObservers.push(e)}},{key:"saveSettings",value:function(e){var t=s["default"].extend({},this.saveSettingsParams,{settings:e});return this.processRequest(t)}},{key:"customAction",value:function(e,t){var n=s["default"].extend({},this.customActionParams,{name:e,settings:t});return this.processRequest(n)}},{key:"uploadFile",value:function(e,t){var n=this,r=s["default"].extend({},this.customActionParams,{name:e,"import":t}),i=this.Upload.upload({url:this.url,data:r});this.requestObservers.forEach(function(e){e()}),i.then(function(e){var t=e.data;n.$timeout(function(){n.responseObservers.forEach(function(e){e(t)})})},function(e){e.status>0&&(n.errorMsg=e.status+": "+e.data)})}},{key:"processRequest",value:function(e){var t=this,n={method:"POST",url:this.url,params:e};return this.requestObservers.forEach(function(e){e()}),this.$http(n).then(function(e){var n=e.data;return t.responseObservers.forEach(function(e){e(n)}),n})}}]),e}();u.$inject=["$http","$timeout","Upload"],n["default"]=u},{angular:41}],34:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./http.service"),s=r(a),u=e("./link.service"),l=r(u),c=o["default"].module("services",[]).service("httpService",s["default"]).service("linkService",l["default"]).name;n["default"]=c},{"./http.service":33,"./link.service":35,angular:41}],35:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.baseLink=""}return o(e,[{key:"init",value:function(e){this.baseLink="?page="+e}},{key:"generateQuery",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=i(t,2),r=n[0],o=n[1];return e+"&"+r+"="+o},this.baseLink)}}]),e}();a.$inject=[],n["default"]=a},{}],36:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=e("./app/app");r(i);!function(e){e(document).ready(function(){})}(jQuery)},{"./app/app":3}],37:[function(e,t,n){angular.module("dndLists",[]).directive("dndDraggable",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){o.attr("draggable","true"),a.dndDisableIf&&i.$watch(a.dndDisableIf,function(e){o.attr("draggable",!e)}),o.on("dragstart",function(s){return s=s.originalEvent||s,"false"==o.attr("draggable")||(s.dataTransfer.setData("Text",angular.toJson(i.$eval(a.dndDraggable))),s.dataTransfer.effectAllowed=a.dndEffectAllowed||"move",o.addClass("dndDragging"),t(function(){o.addClass("dndDraggingSource")},0),n.dropEffect="none",r.isDragging=!0,r.dragType=a.dndType?i.$eval(a.dndType):void 0,s._dndHandle&&s.dataTransfer.setDragImage&&s.dataTransfer.setDragImage(o[0],0,0),e(a.dndDragstart)(i,{event:s}),void s.stopPropagation())}),o.on("dragend",function(s){s=s.originalEvent||s;var u=n.dropEffect;i.$apply(function(){switch(u){case"move":e(a.dndMoved)(i,{event:s});break;case"copy":e(a.dndCopied)(i,{event:s});break;case"none":e(a.dndCanceled)(i,{event:s})}e(a.dndDragend)(i,{event:s,dropEffect:u})}),o.removeClass("dndDragging"),t(function(){o.removeClass("dndDraggingSource")},0),r.isDragging=!1,s.stopPropagation()}),o.on("click",function(t){a.dndSelected&&(t=t.originalEvent||t,i.$apply(function(){e(a.dndSelected)(i,{event:t})}),t.stopPropagation())}),o.on("selectstart",function(){this.dragDrop&&this.dragDrop()})}}]).directive("dndList",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){function s(e,t,n){var r=$?e.offsetX||e.layerX:e.offsetY||e.layerY,i=$?t.offsetWidth:t.offsetHeight,o=$?t.offsetLeft:t.offsetTop;return o=n?o:0,r<o+i/2}function u(){var e;return angular.forEach(o.children(),function(t){var n=angular.element(t);n.hasClass("dndPlaceholder")&&(e=n)}),e||angular.element("<li class='dndPlaceholder'></li>")}function l(){return Array.prototype.indexOf.call(v.children,g)}function c(e){if(!r.isDragging&&!m)return!1;if(!p(e.dataTransfer.types))return!1;if(a.dndAllowedTypes&&r.isDragging){var t=i.$eval(a.dndAllowedTypes);if(angular.isArray(t)&&t.indexOf(r.dragType)===-1)return!1}return!a.dndDisableIf||!i.$eval(a.dndDisableIf)}function f(){return h.remove(),o.removeClass("dndDragover"),!0}function d(t,n,o,a){return e(t)(i,{event:n,index:o,item:a||void 0,external:!r.isDragging,type:r.isDragging?r.dragType:void 0})}function p(e){if(!e)return!0;for(var t=0;t<e.length;t++)if("Text"===e[t]||"text/plain"===e[t])return!0;return!1}var h=u(),g=h[0],v=o[0];h.remove();var $=a.dndHorizontalList&&i.$eval(a.dndHorizontalList),m=a.dndExternalSources&&i.$eval(a.dndExternalSources);o.on("dragenter",function(e){return e=e.originalEvent||e,!c(e)||void e.preventDefault()}),o.on("dragover",function(e){if(e=e.originalEvent||e,!c(e))return!0;if(g.parentNode!=v&&o.append(h),e.target!==v){for(var t=e.target;t.parentNode!==v&&t.parentNode;)t=t.parentNode;t.parentNode===v&&t!==g&&(s(e,t)?v.insertBefore(g,t):v.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)v.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)v.insertBefore(g,g.nextElementSibling.nextElementSibling);return a.dndDragover&&!d(a.dndDragover,e,l())?f():(o.addClass("dndDragover"),e.preventDefault(),e.stopPropagation(),!1)}),o.on("drop",function(e){if(e=e.originalEvent||e,!c(e))return!0;e.preventDefault();var t,r=e.dataTransfer.getData("Text")||e.dataTransfer.getData("text/plain");try{t=JSON.parse(r)}catch(o){return f()}var s=l();return a.dndDrop&&(t=d(a.dndDrop,e,s,t),!t)?f():(t!==!0&&i.$apply(function(){i.$eval(a.dndList).splice(s,0,t)}),d(a.dndInserted,e,s,t),"none"===e.dataTransfer.dropEffect?"copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?n.dropEffect=e.dataTransfer.effectAllowed:n.dropEffect=e.ctrlKey?"copy":"move":n.dropEffect=e.dataTransfer.dropEffect,f(),e.stopPropagation(),!1)}),o.on("dragleave",function(e){e=e.originalEvent||e,o.removeClass("dndDragover"),t(function(){o.hasClass("dndDragover")||h.remove()},100)})}}]).directive("dndNodrag",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart",function(e){e=e.originalEvent||e,e._dndHandle||(e.dataTransfer.types&&e.dataTransfer.types.length||e.preventDefault(),e.stopPropagation())}),t.on("dragend",function(e){e=e.originalEvent||e,e._dndHandle||e.stopPropagation()})}}).directive("dndHandle",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart dragend",function(e){e=e.originalEvent||e,e._dndHandle=!0})}}).factory("dndDragTypeWorkaround",function(){return{}}).factory("dndDropEffectWorkaround",function(){return{}})},{}],38:[function(e,t,n){!function(e,t){"use strict";function n(){function n(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?u(i[n]):i[n]]=!0;return r}function r(t,n){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),m.innerHTML=t;var r=5;do{if(0===r)throw d("uinput","Failed to sanitize html because the input is unstable");r--,e.document.documentMode&&v(m),t=m.innerHTML,m.innerHTML=t}while(t!==m.innerHTML);for(var i=m.firstChild;i;){switch(i.nodeType){case 1:n.start(i.nodeName.toLowerCase(),p(i.attributes));break;case 3:n.chars(i.textContent)}var o;if(!(o=i.firstChild)&&(1==i.nodeType&&n.end(i.nodeName.toLowerCase()),o=i.nextSibling,!o))for(;null==o&&(i=i.parentNode,i!==m);)o=i.nextSibling,1==i.nodeType&&n.end(i.nodeName.toLowerCase());i=o}for(;i=m.firstChild;)m.removeChild(i)}function p(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function h(e){return e.replace(/&/g,"&").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(y,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function g(e,t){var n=!1,r=i(e,e.push);return{start:function(e,i){e=u(e),!n&&A[e]&&(n=e),n||O[e]!==!0||(r("<"),r(e),a(i,function(n,i){var o=u(i),a="img"===e&&"src"===o||"background"===o;T[o]!==!0||M[o]===!0&&!t(n,a)||(r(" "),r(i),r('="'),r(h(n)),r('"'))}),r(">"))},end:function(e){e=u(e),n||O[e]!==!0||w[e]===!0||(r("</"),r(e),r(">")),e==n&&(n=!1)},chars:function(e){n||r(h(e))}}}function v(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),r--,i--)}var s=t.firstChild;s&&v(s),s=t.nextSibling,s&&v(s)}var $=!1;this.$get=["$$sanitizeUri",function(e){return $&&o(O,C),function(t){var n=[];return c(t,f(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?($=e,this):$},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var m,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=/([^\#-~ |!])/g,w=n("area,br,col,hr,img,wbr"),x=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),_=n("rp,rt"),S=o({},_,x),k=o({},x,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),E=o({},_,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),A=n("script,style"),O=o({},w,k,E,S),M=n("background,cite,href,longdesc,src,xlink:href"),j=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),P=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),T=o({},M,P,j);!function(e){var t;if(!e.document||!e.document.implementation)throw d("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)m=r[0];else{var i=t.createElement("html");m=t.createElement("body"),i.appendChild(m),t.appendChild(i)}}(e)}function r(e){var t=[],n=f(t,l);return n.chars(e),t.join("")}var i,o,a,s,u,l,c,f,d=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,u=t.isObject,l=t.isString;return function(t,c,f){function d(e){e&&b.push(r(e))}function p(e,t){var n,r=$(e);b.push("<a ");for(n in r)b.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||b.push('target="',c,'" '),b.push('href="',e.replace(/"/g,"""),'">'),d(t),b.push("</a>")}if(null==t||""===t)return t;if(!l(t))throw o("notstring","Expected string but received: {0}",t);for(var h,g,v,$=s(f)?f:u(f)?function(){return f}:function(){return{}},m=t,b=[];h=m.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),v=h.index,d(m.substr(0,v)),p(g,h[0].replace(i,"")),m=m.substring(v+h[0].length);return d(m),e(b.join(""))}}])}(window,window.angular)},{}],39:[function(e,t,n){e("./angular-sanitize"),t.exports="ngSanitize"},{"./angular-sanitize":38}],40:[function(e,t,n){!function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",u=o[1];for(s+=u.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n<o.length?me(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.5.8/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent(me(o[r]));return new t(s)}}function n(e){if(null==e||E(e))return!1;if(Kr(e)||w(e)||Rr&&e instanceof Rr)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function r(e,t,i){var o,a;if(e)if(S(e))for(o in e)"prototype"==o||"length"==o||"name"==o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(i,e[o],o,e);else if(Kr(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(i,e[o],o,e)}else if(e.forEach&&e.forEach!==r)e.forEach(t,i,e);else if(y(e))for(o in e)t.call(i,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e);else for(o in e)Pr.call(e,o)&&t.call(i,e[o],o,e);return e}function i(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function o(e){return function(t,n){e(n,t)}}function a(){return++Xr}function s(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function u(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(b(a)||S(a))for(var l=Object.keys(a),c=0,f=l.length;c<f;c++){var d=l[c],p=a[d];n&&b(p)?_(p)?e[d]=new Date(p.valueOf()):k(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):F(p)?e[d]=p.clone():(b(e[d])||(e[d]=Kr(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,zr.call(arguments,1),!1)}function c(e){return u(e,zr.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function d(e,t){return l(Object.create(e),t)}function p(){}function h(e){return e}function g(e){return function(){return e}}function v(e){return S(e.toString)&&e.toString!==Hr}function $(e){return"undefined"==typeof e}function m(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!Br(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===Hr.call(e)}function S(e){return"function"==typeof e}function k(e){return"[object RegExp]"===Hr.call(e)}function E(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===Hr.call(e)}function O(e){return"[object FormData]"===Hr.call(e)}function M(e){return"[object Blob]"===Hr.call(e)}function j(e){return"boolean"==typeof e}function P(e){return e&&S(e.then)}function T(e){return e&&x(e.length)&&Yr.test(Hr.call(e))}function D(e){return"[object ArrayBuffer]"===Hr.call(e)}function F(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function N(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function I(e){return Tr(e.nodeName||e[0]&&e[0].nodeName)}function R(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function U(e,t){function n(e,t){var n,r=t.$$hashKey;if(Kr(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(y(e))for(n in e)t[n]=i(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));else for(n in e)Pr.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!b(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(E(e)||C(e))throw Wr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var r=!1,i=o(e);return void 0===i&&(i=Kr(e)?[]:Object.create(Br(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(Hr.call(e)){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 e.constructor(i(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(S(e.cloneNode))return e.cloneNode(!0)}var a=[],u=[];if(t){if(T(t)||D(t))throw Wr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw Wr("cpi","Can't copy! Source and destination are identical.");return Kr(t)?t.length=0:r(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),a.push(e),u.push(t),n(e,t)}return i(e)}function V(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,r,i,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Kr(e)){if(_(e))return!!_(t)&&V(e.getTime(),t.getTime());if(k(e))return!!k(t)&&e.toString()==t.toString();if(C(e)||C(t)||E(e)||E(t)||Kr(t)||_(t)||k(t))return!1;i=he();for(r in e)if("$"!==r.charAt(0)&&!S(e[r])){if(!V(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&m(t[r])&&!S(t[r]))return!1;return!0}if(!Kr(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!V(e[r],t[r]))return!1;return!0}}return!1}function z(e,t,n){return e.concat(zr.call(t,n))}function L(e,t){return zr.call(e,t||0)}function q(e,t){var n=arguments.length>2?L(arguments,2):[];return!S(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,z(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:E(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function B(e,t){if(!$(e))return x(t)||(t=t?2:null),JSON.stringify(e,H,t)}function W(e){return w(e)?JSON.parse(e):e}function G(e,t){e=e.replace(ti,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function K(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=G(t,r);return X(e,n*(i-r))}function Y(e){e=Rr(e).clone();try{e.empty()}catch(t){}var n=Rr("<div>").append(e).html();try{return e[0].nodeType===si?Tr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tr(t)})}catch(t){return Tr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function J(e){var t={};return r((e||"").split("&"),function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),n!==-1&&(r=e.substring(0,n),i=e.substring(n+1)),r=Z(r),m(r)&&(i=!m(i)||Z(i),Pr.call(t,r)?Kr(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function Q(e){var t=[];return r(e,function(e,n){Kr(e)?r(e,function(e){t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}):t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}),t.length?t.join("&"):""}function ee(e){return te(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function te(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var n,r,i=ni.length;for(r=0;r<i;++r)if(n=ni[r]+t,w(n=e.getAttribute(n)))return n;return null}function re(e,t){var n,i,o={};r(ni,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),r(ni,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(o.strictDi=null!==ne(n,"strict-di"),t(n,i?[i]:[],o))}function ie(t,n,i){b(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Rr(t),t.injector()){var r=t[0]===e.document?"document":Y(t);throw Wr("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"<").replace(/>/,">"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=rt(n,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&s.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!u.test(e.name)?a():(e.name=e.name.replace(u,""),Gr.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(S(Gr.resumeDeferredBootstrap)&&Gr.resumeDeferredBootstrap()))}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ae(e){var t=Gr.element(e).injector();if(!t)throw Wr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function se(e,t){return t=t||"_",e.replace(ri,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!ii){var n=ei();Ur=$(n)?e.jQuery:n?e[n]:void 0,Ur&&Ur.fn.on?(Rr=Ur,l(Ur.fn,{scope:Ei.scope,isolateScope:Ei.isolateScope,controller:Ei.controller,injector:Ei.injector,inheritedData:Ei.inheritedData}),t=Ur.cleanData,Ur.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Ur._data(r,"events"),n&&n.$destroy&&Ur(r).triggerHandler("$destroy");t(e)}):Rr=Oe,Gr.element=Rr,ii=!0}}function le(e,t,n){if(!e)throw Wr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ce(e,t,n){return n&&Kr(e)&&(e=e[e.length-1]),le(S(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function fe(e,t){if("hasOwnProperty"===e)throw Wr("badname","hasOwnProperty is not a valid {0} name",t)}function de(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;s<a;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&S(e)?q(o,e):e}function pe(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Rr(zr.call(e,0,i))),t.push(n));return t||e}function he(){return Object.create(null)}function ge(e){function n(e,t,n){return e[t]||(e[t]=n())}var r=t("$injector"),i=t("ng"),o=n(e,"angular",Object);return o.$$minErr=o.$$minErr||t,n(o,"module",function(){var e={};return function(t,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(t,"module"),o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(r,o){return o&&S(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),c}}if(!o)throw r("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",t);var i=[],s=[],u=[],l=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:u,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:l,run:function(e){return u.push(e),this}};return a&&l(a),c})}})}function ve(e,t){if(Kr(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function $e(e){var t=[];return JSON.stringify(e,function(e,n){if(n=H(e,n),b(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function me(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):$(e)?"undefined":"string"!=typeof e?$e(e):e}function be(n){l(n,{bootstrap:ie,copy:U,extend:l,merge:c,equals:V,element:Rr,forEach:r,injector:rt,noop:p,bind:q,toJson:B,fromJson:W,identity:h,isUndefined:$,isDefined:m,isString:w,isFunction:S,isObject:b,isNumber:x,isElement:F,isArray:Kr,version:fi,isDate:_,lowercase:Tr,uppercase:Dr,callbacks:{$$counter:0},getTestability:ae,$$minErr:t,$$csp:Qr,reloadWithDebugInfo:oe}),(Vr=ge(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:kn}),e.provider("$compile",ht).directive({a:Fo,input:ea,textarea:ea,form:Vo,script:Ka,select:Ja,style:es,option:Qa,ngBind:ra,ngBindHtml:oa,ngBindTemplate:ia,ngClass:sa,ngClassEven:la,ngClassOdd:ua,ngCloak:ca,ngController:fa,ngForm:zo,ngHide:La,ngIf:ha,ngInclude:ga,ngInit:$a,ngNonBindable:Ta,ngPluralize:Ia,ngRepeat:Ra,ngShow:za,ngStyle:qa,ngSwitch:Ha,ngSwitchWhen:Ba,ngSwitchDefault:Wa,ngOptions:Na,ngTransclude:Xa,ngModel:Ma,ngList:ma,ngChange:aa,pattern:ns,ngPattern:ns,required:ts,ngRequired:ts,minlength:is,ngMinlength:is,maxlength:rs,ngMaxlength:rs,ngValue:na,ngModelOptions:Pa}).directive({ngInclude:va}).directive(No).directive(da),e.provider({$anchorScroll:it,$animate:Li,$animateCss:Bi,$$animateJs:Vi,$$animateQueue:zi,$$AnimateRunner:Hi,$$animateAsyncRun:qi,$browser:ct,$cacheFactory:ft,$controller:yt,$document:wt,$exceptionHandler:xt,$filter:Un,$$forceReflow:Zi,$interpolate:Nt,$interval:It,$http:Pt,$httpParamSerializer:St,$httpParamSerializerJQLike:kt,$httpBackend:Dt,$xhrFactory:Tt,$jsonpCallbacks:ao,$location:Jt,$log:Qt,$parse:bn,$rootScope:Sn,$q:yn,$$q:wn,$sce:On,$sceDelegate:An,$sniffer:Mn,$templateCache:dt,$templateRequest:jn,$$testability:Pn,$timeout:Tn,$window:Nn,$$rAF:_n,$$jqLite:Ye,$$HashMap:Mi,$$cookieReader:Rn})}])}function ye(){return++pi}function we(e){return e.replace(vi,function(e,t,n,r){return r?n.toUpperCase():n}).replace($i,"Moz$1")}function xe(e){return!wi.test(e)}function _e(e){var t=e.nodeType;return t===oi||!t||t===li}function Se(e){for(var t in di[e.ng339])return!0;return!1}function ke(e){for(var t=0,n=e.length;t<n;t++)Te(e[t])}function Ee(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(xe(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(xi.exec(e)||["",""])[1].toLowerCase(),o=Si[i]||Si._default,n.innerHTML=o[1]+e.replace(_i,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=z(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function Ce(t,n){n=n||e.document;var r;return(r=yi.exec(t))?[n.createElement(r[1])]:(r=Ee(t,n))?r.childNodes:[]}function Ae(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function Oe(e){if(e instanceof Oe)return e;var t;if(w(e)&&(e=Zr(e),t=!0),!(this instanceof Oe)){if(t&&"<"!=e.charAt(0))throw bi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new Oe(e)}t?Ue(this,Ce(e)):Ue(this,e)}function Me(e){return e.cloneNode(!0)}function je(e,t){if(t||Te(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Te(n[r])}function Pe(e,t,n,i){if(m(i))throw bi("offargs","jqLite#off() does not support the `selector` argument");var o=De(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];m(n)&&R(r||[],n),m(n)&&r&&r.length>0||(gi(e,t,s),delete a[t])};r(t.split(" "),function(e){u(e),mi[e]&&u(mi[e])})}else for(t in a)"$destroy"!==t&&gi(e,t,s),delete a[t]}function Te(e,t){var n=e.ng339,r=n&&di[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Pe(e)),delete di[n],e.ng339=void 0}}function De(e,t){var n=e.ng339,r=n&&di[n];return t&&!r&&(e.ng339=n=ye(),r=di[n]={events:{},data:{},handle:void 0}),r}function Fe(e,t,n){if(_e(e)){var r=m(n),i=!r&&t&&!b(t),o=!t,a=De(e,!i),s=a&&a.data;
|
3 |
-
if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];l(s,t)}}}function Ne(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ie(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",Zr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zr(t)+" "," ")))})}function Re(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=Zr(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",Zr(n))}}function Ue(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Ve(e,t){return ze(e,"$"+(t||"ngController")+"Controller")}function ze(e,t,n){e.nodeType==li&&(e=e.documentElement);for(var r=Kr(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if(m(n=Rr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===ci&&e.host}}function Le(e){for(je(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function qe(e,t){t||je(e);var n=e.parentNode;n&&n.removeChild(e)}function He(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Rr(n).on("load",t)}function Be(e,t){var n=Ci[t.toLowerCase()];return n&&Ai[I(e)]&&n}function We(e){return Oi[e]}function Ge(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if($(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0};var s=i.specialHandlerWrapper||Xe;o>1&&(i=ve(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function Xe(e,t,n){n.call(e,t)}function Ke(e,t,n){var r=t.relatedTarget;r&&(r===e||ki.call(e,r))||n.call(e,t)}function Ye(){this.$get=function(){return l(Oe,{hasClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ie(e,t)}})}}function Ze(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||a)():r+":"+e}function Je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function Qe(e){return Function.prototype.toString.call(e)+" "}function et(e){var t=Qe(e).replace(Fi,""),n=t.match(ji)||t.match(Pi);return n}function tt(e){var t=et(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function nt(e,t,n){var i,o,a;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw w(n)&&n||(n=e.name||tt(e)),Ni("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=et(e),r(o[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Kr(e)?(a=e.length-1,ce(e[a],"fn"),i=e.slice(0,a)):ce(e,"fn",!0);return i}function rt(e,t){function n(e){return function(t,n){return b(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(fe(e,"service"),(S(t)||Kr(t))&&(t=_.instantiate(t)),!t.$get)throw Ni("pget","Provider '{0}' must define $get factory method.",e);return x[e+v]=t}function a(e,t){return function(){var n=C.invoke(t,this);if($(n))throw Ni("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function l(e,t){return s(e,g(t),!1)}function c(e,t){fe(e,"constant"),x[e]=t,k[e]=t}function f(e,t){var n=_.get(e+v),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){le($(e)||Kr(e),"modulesToLoad","not an array");var t,n=[];return r(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=_.get(r[0]);i[r[1]].apply(i,r[2])}}if(!y.get(e)){y.put(e,!0);try{w(e)?(t=Vr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):S(e)?n.push(_.invoke(e)):Kr(e)?n.push(_.invoke(e)):ce(e,"module")}catch(i){throw Kr(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)==-1&&(i=i.message+"\n"+i.stack),Ni("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function p(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===h)throw Ni("cdep","Circular dependency found: {0}",t+" <- "+m.join(" <- "));return e[t]}try{return m.unshift(t),e[t]=h,e[t]=n(t,r)}catch(i){throw e[t]===h&&delete e[t],i}finally{m.shift()}}function i(e,n,i){for(var o=[],a=rt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ni("itkn","Incorrect injection token! Expected service name as string, got {0}",l);o.push(n&&n.hasOwnProperty(l)?n[l]:r(l,i))}return o}function o(e){return!(Ir<=11)&&("function"==typeof e&&/^(?:class\b|constructor\()/.test(Qe(e)))}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return Kr(e)&&(e=e[e.length-1]),o(e)?(a.unshift(null),new(Function.prototype.bind.apply(e,a))):e.apply(t,a)}function s(e,t,n){var r=Kr(e)?e[e.length-1]:e,o=i(e,t,n);return o.unshift(null),new(Function.prototype.bind.apply(r,o))}return{invoke:a,instantiate:s,get:r,annotate:rt.$$annotate,has:function(t){return x.hasOwnProperty(t+v)||e.hasOwnProperty(t)}}}t=t===!0;var h={},v="Provider",m=[],y=new Je([],(!0)),x={$provide:{provider:n(i),factory:n(s),service:n(u),value:n(l),constant:n(c),decorator:f}},_=x.$injector=p(x,function(e,t){throw Gr.isString(t)&&m.push(t),Ni("unpr","Unknown provider: {0}",m.join(" <- "))}),k={},E=p(k,function(e,t){var n=_.get(e+v,t);return C.invoke(n.$get,n,void 0,e)}),C=E;x["$injector"+v]={$get:g(E)};var A=d(e);return C=E.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function it(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===I(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(S(e))e=e();else if(F(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=w(e)?e:n.hash();var t;e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||He(function(){r.$evalAsync(s)})}),s}]}function ot(e,t){return e||t?e?t?(Kr(e)&&(e=e.join(" ")),Kr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function at(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ri)return n}}function st(e){w(e)&&(e=e.split(" "));var t=he();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ut(e){return b(e)?e:{}}function lt(e,t,n,i){function o(e){try{e.apply(null,L(arguments,1))}finally{if(m--,0===m)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return t===-1?"":e.substr(t)}function s(){S=null,u(),l()}function u(){y=k(),y=$(y)?null:y,V(y,A)&&(y=A),A=y}function l(){x===c.url()&&w===y||(x=c.url(),w=y,r(E,function(e){e(c.url(),y)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,v={};c.isMock=!1;var m=0,b=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){m++},c.notifyWhenNoOutstandingRequests=function(e){0===m?e():b.push(e)};var y,w,x=f.href,_=t.find("base"),S=null,k=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=y,c.url=function(t,n,r){if($(r)&&(r=null),f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){var o=w===r;if(x===t&&(!i.history||o))return c;var s=x&&qt(x)===qt(t);return x=t,w=r,!i.history||s&&o?(s||(S=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(S=t)):(d[n?"replaceState":"pushState"](r,"",t),u(),w=y),S&&(S=t),c}return S||f.href.replace(/%27/g,"'")},c.state=function(){return y};var E=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Rr(e).on("popstate",s),Rr(e).on("hashchange",s),C=!0),E.push(t),t},c.$$applicationDestroyed=function(){Rr(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=_.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return m++,n=h(function(){delete v[n],o(e)},t||0),v[n]=!0,n},c.defer.cancel=function(e){return!!v[e]&&(delete v[e],g(e),o(p),!0)}}function ct(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new lt(e,r,t,n)}]}function ft(){this.$get=function(){function e(e,r){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=l({},r,{id:e}),u=he(),c=r&&r.capacity||Number.MAX_VALUE,f=he(),d=null,p=null;return n[e]={put:function(e,t){if(!$(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});i(n)}return e in u||a++,u[e]=t,a>c&&this.remove(p.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),o(t.n,t.p),delete f[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=he(),a=0,f=he(),d=p=null},destroy:function(){u=null,s=null,f=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function dt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function pt(){}function ht(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=he();return r(e,function(e,r){if(e in E)return void(o[r]=E[e]);var a=e.match(i);if(!a)throw Wi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(E[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(b(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),b(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),b(n.bindToController)){var r=e.controller,o=e.controllerAs;if(!r)throw Wi("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!bt(r,o))throw Wi("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function s(e){var t=e.charAt(0);if(!t||t!==Tr(t))throw Wi("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Wi("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function u(e){var t=e.require||e.controller&&e.name;return!Kr(t)&&b(t)&&r(t,function(e,n){var r=e.match(_),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}var c={},f="Directive",v=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,y=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=N("ngSrc,ngSrcset,src,srcset"),_=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/,E=he();this.directive=function M(e,n){return fe(e,"directive"),w(e)?(s(e),le(n,"directiveFactory"),c.hasOwnProperty(e)||(c[e]=[],t.factory(e+f,["$injector","$exceptionHandler",function(t,n){var i=[];return r(c[e],function(r,o){try{var a=t.invoke(r);S(a)?a={compile:g(a)}:!a.compile&&a.link&&(a.compile=g(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||e,a.require=u(a),a.restrict=a.restrict||"EA",a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),c[e].push(n)):r(e,o(M)),this},this.component=function(e,t){function n(e){function n(t){return S(t)||Kr(t)?function(n,r){return e.invoke(t,this,{$element:n,$attrs:r})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:i,controllerAs:bt(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return r(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e)}),a}var i=t.controller||function(){};return r(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,S(i)&&(i[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var A=!0;this.debugInfoEnabled=function(e){return m(e)?(A=e,this):A};var O=10;this.onChangesTtl=function(e){return arguments.length?(O=e,this):O},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,g,E,M,P){function T(){try{if(!--_e)throw be=void 0,Wi("infchng","{0} $onChanges() iterations reached. Aborting!\n",O);g.$apply(function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(r){e.push(r)}if(be=void 0,e.length)throw e})}finally{_e++}}function D(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e}function F(e,t,n){we.innerHTML="<span "+t+">";var r=we.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function N(e,t){try{e.addClass(t)}catch(n){}}function U(t,n,r,i,o){t instanceof Rr||(t=Rr(t));for(var a=/\S+/,s=0,u=t.length;s<u;s++){var l=t[s];l.nodeType===si&&l.nodeValue.match(a)&&Ae(l,t[s]=e.document.createElement("span"))}var c=H(t,n,t,r,i,o);U.$$addScopeClass(t);var f=null;return function(e,n,r){le(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new()),r=r||{};var i=r.parentBoundTranscludeFn,a=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),f||(f=z(s));var u;if(u="html"!==f?Rr(fe(f,Rr("<div>").append(t).html())):n?Ei.clone.call(t):t,a)for(var l in a)u.data("$"+l+"Controller",a[l].instance);return U.$$addScopeInfo(u,e),n&&n(u,e),c&&c(e,u,u,i),u}}function z(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&Hr.call(t).match(/SVG/)?"svg":"html"}function H(e,t,n,r,i,o){function a(e,n,r,i){var o,a,s,u,l,c,f,d,g;if(p){var v=n.length;for(g=new Array(v),l=0;l<h.length;l+=3)f=h[l],g[f]=n[f]}else g=n;for(l=0,c=h.length;l<c;)s=g[h[l++]],o=h[l++],a=h[l++],o?(o.scope?(u=e.$new(),U.$$addScopeInfo(Rr(s),u)):u=e,d=o.transcludeOnThisElement?B(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?B(e,t):null,o(a,u,s,r,d)):a&&a(e,s.childNodes,void 0,i)}for(var s,u,l,c,f,d,p,h=[],g=0;g<e.length;g++)s=new D,u=W(e[g],[],s,0===g?r:void 0,i),l=u.length?J(u,e[g],s,t,n,null,[],[],o):null,l&&l.scope&&U.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[g].childNodes)||!c.length?null:H(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push(g,l,f),d=!0,p=p||l),o=null;return d?a:null}function B(e,t,n){function r(r,i,o,a,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var i=r.$$slots=he();for(var o in t.$$slots)t.$$slots[o]?i[o]=B(e,t.$$slots[o],n):i[o]=null;return r}function W(e,t,n,r,i){var o,a,s=e.nodeType,u=n.$attr;switch(s){case oi:ne(t,vt(I(e)),"E",r,i);for(var l,c,f,d,p,h,g=e.attributes,v=0,$=g&&g.length;v<$;v++){var m=!1,x=!1;l=g[v],c=l.name,p=Zr(l.value),d=vt(c),(h=Ce.test(d))&&(c=c.replace(Xi,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=d.match(Oe);_&&re(_[1])&&(m=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=vt(c.toLowerCase()),u[f]=c,!h&&n.hasOwnProperty(f)||(n[f]=p,Be(e,f)&&(n[f]=!0)),pe(e,t,p,f,h),ne(t,f,"A",r,i,m,x)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=y.exec(a);)f=vt(o[2]),ne(t,f,"C",r,i)&&(n[f]=Zr(o[3])),a=a.substr(o.index+o[0].length);break;case si:if(11===Ir)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===si;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ce(t,e.nodeValue);break;case ui:G(e,t,n,r,i)}return t.sort(ae),t}function G(e,t,n,r,i){try{var o=v.exec(e.nodeValue);if(o){var a=vt(o[1]);ne(t,a,"M",r,i)&&(n[a]=Zr(o[2]))}}catch(s){}}function X(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Wi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==oi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Rr(r)}function K(e,t,n){return function(r,i,o,a,s){return i=X(i[0],t,n),e(r,i,o,a,s)}}function Z(e,t,n,r,i,o){var a;return e?U(t,n,r,i,o):function(){return a||(a=U(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function J(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=K(e,n,r)),e.require=h.require,e.directiveName=g,(k===h||h.$$isolateScope)&&(e=ve(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=K(t,n,r)),t.require=h.require,t.directiveName=g,(k===h||h.$$isolateScope)&&(t=ve(t,{isolateScope:!0})),c.push(t))}function p(e,o,a,s,f){function d(e,t,n,r){var i;if(C(e)||(r=n,n=t,t=e,e=void 0),j&&(i=y),n||(n=j?A.parent():A),!r)return f(e,t,i,n,R);var o=f.$$slots[r];if(o)return o(e,t,i,n,R);if($(o))throw Wi("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Y(A))}var p,h,g,v,m,y,w,A,O,M;t===a?(O=n,A=n.$$element):(A=Rr(a),O=new D(A,n)),m=o,k?v=o.$new(!0):x&&(m=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(y=ee(A,O,w,_,v,o,k)),k&&(U.$$addScopeInfo(A,v,!0,!(E&&(E===k||E===k.$$originalDirective))),U.$$addScopeClass(A,!0),v.$$isolateBindings=k.$$isolateBindings,M=me(o,O,v,v.$$isolateBindings,k),M.removeWatches&&v.$on("$destroy",M.removeWatches));for(var P in y){var T=_[P],F=y[P],N=T.$$bindings.bindToController;F.identifier&&N?F.bindingInfo=me(m,O,F.instance,N,T):F.bindingInfo={};var I=F();I!==F.instance&&(F.instance=I,A.data("$"+T.name+"Controller",I),F.bindingInfo.removeWatches&&F.bindingInfo.removeWatches(),F.bindingInfo=me(m,O,F.instance,N,T))}for(r(_,function(e,t){var n=e.require;e.bindToController&&!Kr(n)&&b(n)&&l(y[t].instance,Q(t,n,A,y))}),r(y,function(e){var t=e.instance;if(S(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(n){i(n)}if(S(t.$onInit))try{t.$onInit()}catch(n){i(n)}S(t.$doCheck)&&(m.$watch(function(){t.$doCheck()}),t.$doCheck()),S(t.$onDestroy)&&m.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);var R=o;for(k&&(k.template||null===k.templateUrl)&&(R=v),e&&e(R,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);r(y,function(e){var t=e.instance;S(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,v,m,y,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,k=f.newIsolateScopeDirective,E=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,M=!1,j=f.hasElementTranscludeDirective,P=n.$$element=Rr(t),T=s,F=o,N=!1,R=!1,V=0,z=e.length;V<z;V++){h=e[V];var H=h.$$start,B=h.$$end;if(H&&(P=X(t,H,B)),v=void 0,w>h.priority)break;if((y=h.scope)&&(h.templateUrl||(b(y)?(ue("new/isolated scope",k||x,h,P),k=h):ue("new/isolated scope",k,h,P)),x=x||h),g=h.name,!N&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,J=V+1;G=e[J++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){R=!0;break}N=!0}if(!h.templateUrl&&h.controller&&(y=h.controller,_=_||he(),ue("'"+g+"' controller",_[g],h,P),_[g]=h),y=h.transclude)if(O=!0,h.$$tlb||(ue("transclusion",A,h,P),A=h),"element"==y)j=!0,w=h.priority,v=P,P=n.$$element=Rr(U.$$createComment(g,n[g])),t=P[0],ge(a,L(v),t),v[0].$$parentNode=v[0].parentNode,F=Z(R,v,o,w,T&&T.name,{nonTlbTranscludeDirective:A});else{var ne=he();if(v=Rr(Me(t)).contents(),b(y)){v=[];var re=he(),ae=he();r(y,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,re[e]=t,ne[t]=null,ae[t]=n}),r(P.contents(),function(e){var t=re[vt(I(e))];t?(ae[t]=!0,ne[t]=ne[t]||[],ne[t].push(e)):v.push(e)}),r(ae,function(e,t){if(!e)throw Wi("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var se in ne)ne[se]&&(ne[se]=Z(R,ne[se],o))}P.empty(),F=Z(R,v,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),F.$$slots=ne}if(h.template)if(M=!0,ue("template",E,h,P),E=h,y=S(h.template)?h.template(P,n):h.template,y=Ee(y),h.replace){if(T=h,v=xe(y)?[]:mt(fe(h.templateNamespace,Zr(y))),t=v[0],1!=v.length||t.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ge(a,P,t);var le={$attr:{}},ce=W(t,[],le),de=e.splice(V+1,e.length-(V+1));(k||x)&&te(ce,k,x),e=e.concat(ce).concat(de),ie(n,le),z=e.length}else P.html(y);if(h.templateUrl)M=!0,ue("template",E,h,P),E=h,h.replace&&(T=h),p=oe(e.splice(V,e.length-V),P,n,a,O&&F,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:k,templateDirective:E,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{m=h.compile(P,n,F);var pe=h.$$originalDirective||h;S(m)?d(null,q(pe,m),H,B):m&&d(q(pe,m.pre),q(pe,m.post),H,B)}catch(be){i(be,Y(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=M,p.transclude=F,f.hasElementTranscludeDirective=j,p}function Q(e,t,n,i){var o;if(w(t)){var a=t.match(_),s=t.substring(a[0].length),u=a[1]||a[3],l="?"===a[2];if("^^"===u?n=n.parent():(o=i&&i[s],o=o&&o.instance),!o){var c="$"+s+"Controller";o=u?n.inheritedData(c):n.data(c)}if(!o&&!l)throw Wi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(Kr(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=Q(e,t[f],n,i)}else b(t)&&(o={},r(t,function(t,r){o[r]=Q(e,t,n,i)}));return o||null}function ee(e,t,n,r,i,o,a){var s=he();for(var l in r){var c=r[l],f={$scope:c===a||c.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},d=c.controller;"@"==d&&(d=t[c.name]);var p=u(d,f,!0,c.controllerAs);s[c.name]=p,e.data("$"+c.name+"Controller",p.instance)}return s}function te(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,$$newScope:n})}function ne(e,n,r,o,s,u,l){if(n===s)return null;var p=null;if(c.hasOwnProperty(n))for(var h,g=t.get(n+f),v=0,m=g.length;v<m;v++)try{if(h=g[v],($(o)||o>h.priority)&&h.restrict.indexOf(r)!=-1){if(u&&(h=d(h,{$$start:u,$$end:l})),!h.$$bindings){var y=h.$$bindings=a(h,h.name);b(y.isolateScope)&&(h.$$isolateBindings=y.isolateScope)}e.push(h),p=h}}catch(w){i(w)}return p}function re(e){if(c.hasOwnProperty(e))for(var n,r=t.get(e+f),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ie(e,t){var n=t.$attr,i=e.$attr;e.$$element;r(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){e.hasOwnProperty(r)||"$"===r.charAt(0)||(e[r]=t,"class"!==r&&"style"!==r&&(i[r]=n[r]))})}function oe(e,t,n,i,a,s,u,l){var c,f,p=[],h=t[0],g=e.shift(),v=d(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),$=S(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,m=g.templateNamespace;return t.empty(),o($).then(function(o){var d,y,w,x;if(o=Ee(o),g.replace){if(w=xe(o)?[]:mt(fe(m,Zr(o))),d=w[0],1!=w.length||d.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,$);y={$attr:{}},ge(i,t,d);var _=W(d,[],y);b(g.scope)&&te(_,!0),e=_.concat(e),ie(n,y)}else d=h,t.html(o);for(e.unshift(v),c=J(e,d,n,a,t,g,s,u,l),r(i,function(e,n){e==d&&(i[n]=t[0])}),f=H(t[0].childNodes,a);p.length;){var S=p.shift(),k=p.shift(),E=p.shift(),C=p.shift(),A=t[0];if(!S.$$destroyed){if(k!==h){var O=k.className;l.hasElementTranscludeDirective&&g.replace||(A=Me(d)),ge(E,Rr(k),A),N(Rr(A),O)}x=c.transcludeOnThisElement?B(S,c.transclude,C):C,c(f,S,A,i,x)}}p=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(p?p.push(t,n,r,o):(c.transcludeOnThisElement&&(o=B(t,c.transclude,i)),c(f,t,n,r,o)))}}function ae(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function ue(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Wi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Y(r))}function ce(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&U.$$addBindingClass(t),function(e,t){var i=t.parent();n||U.$$addBindingClass(i),U.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function fe(t,n){switch(t=Tr(t||"html")){case"svg":case"math":var r=e.document.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function de(e,t){if("srcdoc"==t)return E.HTML;var n=I(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?E.RESOURCE_URL:void 0}function pe(e,t,r,i,o){var a=de(e,i);o=x[i]||o;var s=n(r,!0,a,o);if(s){if("multiple"===i&&"select"===I(e))throw Wi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(e));t.push({priority:100,compile:function(){return{pre:function(e,t,u){var l=u.$$observers||(u.$$observers=he());if(k.test(i))throw Wi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=u[i];c!==r&&(s=c&&n(c,!0,a,o),r=c),s&&(u[i]=s(e),(l[i]||(l[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?u.$updateClass(e,t):u.$set(i,e)}))}}}})}}function ge(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;i<o;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+s-1,f=t.length;l<f;l++,c++)c<f?t[l]=t[c]:delete t[l];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var d=e.document.createDocumentFragment();for(i=0;i<s;i++)d.appendChild(n[i]);for(Rr.hasData(a)&&(Rr.data(r,Rr.data(a)),Rr(a).off("$destroy")),Rr.cleanData(d.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function ve(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function $e(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,Y(n))}}function me(e,t,i,o,a){function u(t,n,r){S(i.$onChanges)&&n!==r&&(be||(e.$$postDigest(T),be=[]),c||(c={},be.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new gt(r,n))}function l(){i.$onChanges(c),c=void 0}var c,f=[],d={};return r(o,function(r,o){var l,c,h,g,v,$=r.attrName,m=r.optional,b=r.mode;switch(b){case"@":m||Pr.call(t,$)||(i[o]=t[$]=void 0),t.$observe($,function(e){if(w(e)||j(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[$].$$scope=e,l=t[$],w(l)?i[o]=n(l)(e):j(l)&&(i[o]=l),d[o]=new gt(Gi,i[o]);break;case"=":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]),g=c.literal?V:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),Wi("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[$],$,a.name)},l=i[o]=c(e);var y=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};y.$stateful=!0,v=r.collection?e.$watchCollection(t[$],y):e.$watch(s(t[$],y),null,c.literal),f.push(v);break;case"<":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]);var x=i[o]=c(e);d[o]=new gt(Gi,i[o]),v=e.$watch(c,function(e,t){if(t===e){if(t===x)return;t=x}u(o,e,t),i[o]=e},c.literal),f.push(v);break;case"&":if(c=t.hasOwnProperty($)?s(t[$]):p,c===p&&m)break;i[o]=function(t){return c(e,t)}}}),{initialChanges:d,removeWatches:f.length&&function(){for(var e=0,t=f.length;e<t;++e)f[e]()}}}var be,ye=/^\w/,we=e.document.createElement("div"),_e=O;D.prototype={$normalize:vt,$addClass:function(e){e&&e.length>0&&M.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&M.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=$t(e,t);n&&n.length&&M.addClass(this.$$element,n);var r=$t(t,e);r&&r.length&&M.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Be(s,e),l=We(e),c=e;if(u?(this.$$element.prop(e,t),o=u):l&&(this[l]=t,c=l),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e],o||(this.$attr[e]=o=se(e,"-"))),a=I(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=P(t,"src"===e);else if("img"===a&&"srcset"===e&&m(t)){for(var f="",d=Zr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),v=Math.floor(g.length/2),b=0;b<v;b++){var y=2*b;f+=P(Zr(g[y]),!0),f+=" "+Zr(g[y+1])}var w=Zr(g[2*b]).split(/\s/);f+=P(Zr(w[0]),!0),2===w.length&&(f+=" "+Zr(w[1])),this[e]=t=f}n!==!1&&(null===t||$(t)?this.$$element.removeAttr(o):ye.test(o)?this.$$element.attr(o,t):F(this.$$element[0],o,t));var x=this.$$observers;x&&r(x[c],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=he()),i=r[e]||(r[e]=[]);return i.push(t),g.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||$(n[e])||t(n[e])}),function(){R(i,t)}}};var Se=n.startSymbol(),ke=n.endSymbol(),Ee="{{"==Se&&"}}"==ke?h:function(e){return e.replace(/\{\{/g,Se).replace(/}}/g,ke)},Ce=/^ngAttr[A-Z]/,Oe=/^(.+)Start$/;return U.$$addBindingInfo=A?function(e,t){var n=e.data("$binding")||[];Kr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,U.$$addBindingClass=A?function(e){N(e,"ng-binding")}:p,U.$$addScopeInfo=A?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,U.$$addScopeClass=A?function(e,t){N(e,t?"ng-isolate-scope":"ng-scope")}:p,U.$$createComment=function(t,n){var r="";return A&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},U}]}function gt(e,t){this.previousValue=e,this.currentValue=t}function vt(e){return we(e.replace(Xi,""))}function $t(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(n.length>0?" ":"")+a}return n}function mt(e){e=Rr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];n.nodeType===ui&&Lr.call(e,t,1)}return e}function bt(e,t){if(t&&w(t))return t;if(w(e)){var n=Yi.exec(e);if(n)return n[3]}}function yt(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){fe(t,"controller"),b(t)?l(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(r,i){function o(e,n,r,i){if(!e||!b(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);e.$scope[n]=r}return function(t,a,s,u){var c,f,d,p;if(s=s===!0,u&&w(u)&&(p=u),w(t)){if(f=t.match(Yi),!f)throw Ki("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:de(a.$scope,d,!0)||(n?de(i,d,!0):void 0),ce(t,d,!0)}if(s){var h=(Kr(t)?t[t.length-1]:t).prototype;c=Object.create(h||null),p&&o(a,p,c,d||t.name);var g;return g=l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(b(e)||S(e))&&(c=e,p&&o(a,p,c,d||t.name)),c},{instance:c,identifier:p})}return c=r.instantiate(t,a,d),p&&o(a,p,c,d||t.name),c}}]}function wt(){this.$get=["$window",function(e){return Rr(e.document)}]}function xt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){return b(e)?_(e)?e.toISOString():B(e):e}function St(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||$(e)||(Kr(e)?r(e,function(e){t.push(te(n)+"="+te(_t(e)))}):t.push(te(n)+"="+te(_t(e))))}),t.join("&")}}}function kt(){this.$get=function(){return function(e){function t(e,o,a){null===e||$(e)||(Kr(e)?r(e,function(e,n){t(e,o+"["+(b(e)?n:"")+"]")}):b(e)&&!_(e)?i(e,function(e,n){
|
4 |
-
t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(te(o)+"="+te(_t(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Et(e,t){if(w(e)){var n=e.replace(no,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Ji)||Ct(n))&&(e=W(n))}}return e}function Ct(e){var t=e.match(eo);return t&&to[t[0]].test(e)}function At(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=he();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Tr(Zr(e.substr(0,n))),Zr(e.substr(n+1)))}):b(e)&&r(e,function(e,n){t(Tr(n),Zr(e))}),i}function Ot(e){var t;return function(n){if(t||(t=At(e)),n){var r=t[Tr(n)];return void 0===r&&(r=null),r}return t}}function Mt(e,t,n,i){return S(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function jt(e){return 200<=e&&e<300}function Pt(){var e=this.defaults={transformResponse:[Et],transformRequest:[function(e){return!b(e)||A(e)||M(e)||O(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ve(Qi),put:ve(Qi),patch:ve(Qi)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var i=!0;this.useLegacyPromiseExtensions=function(e){return m(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,u,c,f,d){function p(n){function o(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],o=t[n++];e=e.then(i,o)}return t.length=0,e}function a(e,t){var n,i={};return r(e,function(e,r){S(e)?(n=e(t),null!=n&&(i[r]=n)):i[r]=e}),i}function s(t){var n,r,i,o=e.headers,s=l({},t.headers);o=l({},o.common,o[Tr(t.method)]);e:for(n in o){r=Tr(n);for(i in s)if(Tr(i)===r)continue e;s[n]=o[n]}return a(s,ve(t))}function u(t){var n=t.headers,i=Mt(t.data,Ot(n),void 0,t.transformRequest);return $(i)&&r(n,function(e,t){"content-type"===Tr(t)&&delete n[t]}),$(t.withCredentials)&&!$(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,i).then(c,c)}function c(e){var t=l({},e);return t.data=Mt(e.data,e.headers,e.status,p.transformResponse),jt(e.status)?t:f.reject(t)}if(!b(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(n.url))throw t("$http")("badreq","Http request configuration url must be a string. Received: {0}",n.url);var p=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);p.headers=s(n),p.method=Dr(p.method),p.paramSerializer=w(p.paramSerializer)?d.get(p.paramSerializer):p.paramSerializer;var h=[],g=[],m=f.when(p);return r(_,function(e){(e.request||e.requestError)&&h.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)}),m=o(m,h),m=m.then(u),m=o(m,g),i?(m.success=function(e){return ce(e,"fn"),m.then(function(t){e(t.data,t.status,t.headers,p)}),m},m.error=function(e){return ce(e,"fn"),m.then(null,function(t){e(t.data,t.status,t.headers,p)}),m}):(m.success=io("success"),m.error=io("error")),m}function h(e){r(arguments,function(e){p[e]=function(t,n){return p(l({},n||{},{method:e,url:t}))}})}function g(e){r(arguments,function(e){p[e]=function(t,n,r){return p(l({},r||{},{method:e,url:t,data:n}))}})}function v(t,i){function o(e){if(e){var t={};return r(e,function(e,r){t[r]=function(t){function r(){e(t)}n?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}}),t}}function u(e,t,r,i){function o(){l(t,e,r,i)}g&&(jt(e)?g.put(k,[e,t,At(r),i]):g.remove(k)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(jt(n)?w.resolve:w.reject)({data:e,status:n,headers:Ot(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ve(e.headers()),e.statusText)}function h(){var e=p.pendingRequests.indexOf(t);e!==-1&&p.pendingRequests.splice(e,1)}var g,v,w=f.defer(),_=w.promise,S=t.headers,k=y(t.url,t.paramSerializer(t.params));if(p.pendingRequests.push(t),_.then(h,h),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||(g=b(t.cache)?t.cache:b(e.cache)?e.cache:x),g&&(v=g.get(k),m(v)?P(v)?v.then(d,d):Kr(v)?l(v[1],v[0],ve(v[2]),v[3]):l(v,200,{},"OK"):g.put(k,_)),$(v)){var E=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;E&&(S[t.xsrfHeaderName||e.xsrfHeaderName]=E),a(t.method,k,i,u,S,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return _}function y(e,t){return t.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+t),e}var x=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var _=[];return r(o,function(e){_.unshift(w(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function Tt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Dt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Ft(e,r,e.defer,t,n[0])}]}function Ft(e,t,n,i,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var r=o.createElement("script"),a=null;return r.type="text/javascript",r.src=e,r.async=!0,a=function(e){gi(r,"load",a),gi(r,"error",a),o.body.removeChild(r),r=null;var s=-1,u="unknown";e&&("load"!==e.type||i.wasCalled(t)||(e={type:"error"}),u=e.type,s="error"===e.type?404:200),n&&n(s,u)},hi(r,"load",a),hi(r,"error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,h,g,v){function b(){x&&x(),_&&_.abort()}function y(t,r,i,o,a){m(E)&&n.cancel(E),x=_=null,t(r,i,o,a),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Tr(o))var w=i.createCallback(s),x=a(s,w,function(e,t){var n=200===e&&i.getResponse(w);y(l,e,n,"",t),i.removeCallback(w)});else{var _=t(o,s);_.open(o,s,!0),r(c,function(e,t){m(e)&&_.setRequestHeader(t,e)}),_.onload=function(){var e=_.statusText||"",t="response"in _?_.response:_.responseText,n=1223===_.status?204:_.status;0===n&&(n=t?200:"file"==Dn(s).protocol?404:0),y(l,n,t,_.getAllResponseHeaders(),e)};var S=function(){y(l,-1,null,null,"")};if(_.onerror=S,_.onabort=S,r(g,function(e,t){_.addEventListener(t,e)}),r(v,function(e,t){_.upload.addEventListener(t,e)}),d&&(_.withCredentials=!0),h)try{_.responseType=h}catch(k){if("json"!==h)throw k}_.send($(u)?null:u)}if(f>0)var E=n(b,f);else P(f)&&f.then(b)}}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(p,e).replace(h,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e}function u(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(o,c,p,h){function v(e){try{return e=P(e),h&&!m(e)?e:s(e)}catch(t){r(oo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var b;if(!c){var y=a(o);b=g(y),b.exp=o,b.expressions=[],b.$$watchDelegate=u}return b}h=!!h;for(var w,x,_,k=0,E=[],C=[],A=o.length,O=[],M=[];k<A;){if((w=o.indexOf(e,k))==-1||(x=o.indexOf(t,w+f))==-1){k!==A&&O.push(a(o.substring(k)));break}k!==w&&O.push(a(o.substring(k,w))),_=o.substring(w+f,x),E.push(_),C.push(n(_,v)),k=x+d,M.push(O.length),O.push("")}if(p&&O.length>1&&oo.throwNoconcat(o),!c||E.length){var j=function(e){for(var t=0,n=E.length;t<n;t++){if(h&&$(e[t]))return;O[M[t]]=e[t]}return O.join("")},P=function(e){return p?i.getTrusted(p,e):i.valueOf(e)};return l(function(e){var t=0,n=E.length,i=new Array(n);try{for(;t<n;t++)i[t]=C[t](e);return j(i)}catch(a){r(oo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(C,function(r,i){var o=j(r);S(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var f=e.length,d=t.length,p=new RegExp(e.replace(/./g,o),"g"),h=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function It(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,u,l){function c(){f?o.apply(null,d):o(g)}var f=arguments.length>4,d=f?L(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,v=m(l)&&!l,$=(v?r:n).defer(),b=$.promise;return u=m(u)?u:0,b.$$intervalId=p(function(){v?i.defer(c):e.$evalAsync(c),$.notify(g++),u>0&&g>=u&&($.resolve(g),h(b.$$intervalId),delete a[b.$$intervalId]),v||e.$apply()},s),a[b.$$intervalId]=$,b}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Rt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ee(t[n]);return t.join("/")}function Ut(e,t){var n=Dn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||uo[n.protocol]||null}function Vt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Dn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=J(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function zt(e,t){return 0===e.lastIndexOf(t,0)}function Lt(e,t){if(zt(t,e))return t.substr(e.length)}function qt(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function Ht(e){return e.replace(/(#.+)|#$/,"$1")}function Bt(e){return e.substr(0,qt(e).lastIndexOf("/")+1)}function Wt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Gt(e,t,n){this.$$html5=!0,n=n||"",Ut(e,this),this.$$parse=function(e){var n=Lt(t,e);if(!w(n))throw lo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Vt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),n=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,s;return m(o=Lt(e,r))?(a=o,s=m(o=Lt(n,o))?t+(Lt("/",o)||o):e+a):m(o=Lt(t,r))?s=t+o:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Xt(e,t,n){Ut(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return zt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Lt(e,r)||Lt(t,r);$(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",$(a)&&(e=r,this.replace())):(o=Lt(n,a),$(o)&&(o=a)),Vt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return qt(e)==qt(t)&&(this.$$parse(t),!0)}}function Kt(e,t,n){this.$$html5=!0,Xt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==qt(r)?o=r:(a=Lt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function Yt(e){return function(){return this[e]}}function Zt(e,t){return function(n){return $(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Jt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return m(t)?(e=t,this):e},this.html5Mode=function(e){return j(e)?(t.enabled=e,this):b(e)?(j(e.enabled)&&(t.enabled=e.enabled),j(e.requireBase)&&(t.requireBase=e.requireBase),j(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=l.url(),o=l.$$state;try{r.url(e,t,n),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function u(e,t){n.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}var l,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw lo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Wt(p)+(d||"/"),c=i.history?Gt:Kt}else f=qt(p),c=Xt;var h=Bt(f);l=new c(f,h,"#"+e),l.$$parseLinkUrl(p,p),l.$$state=r.state();var g=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Rr(e.target);"a"!==I(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Dn(s.animVal).href),g.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(s,u)&&(e.preventDefault(),l.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Ht(l.absUrl())!=Ht(p)&&r.url(l.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){return $(Lt(h,e))?void(a.location.href=e):(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Ht(e),l.$$parse(e),l.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,l.absUrl()===e&&(r?(l.$$parse(i),l.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=Ht(r.url()),t=Ht(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;(v||c)&&(v=!1,n.$evalAsync(function(){var t=l.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,l.$$state,o).defaultPrevented;l.absUrl()===t&&(r?(l.$$parse(e),l.$$state=o):(c&&s(t,a,o===l.$$state?null:l.$$state),u(e,o)))})),l.$$replace=!1}),l}]}function Qt(){var e=!0,t=this;this.debugEnabled=function(t){return m(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function o(e){var t=n.console||{},o=t[e]||t.log||p,a=!1;try{a=!!o.apply}catch(s){}return a?function(){var e=[];return r(arguments,function(t){e.push(i(t))}),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw fo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function tn(e){return e+""}function nn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw fo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw fo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw fo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function rn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===po||e===ho||e===go)throw fo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function on(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw fo("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function an(e,t){return"undefined"!=typeof e?e:t}function sn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function un(e,t){var n=e(t);return!n.$stateful}function ln(e,t){var n,i;switch(e.type){case bo.Program:n=!0,r(e.body,function(e){ln(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case bo.Literal:e.constant=!0,e.toWatch=[];break;case bo.UnaryExpression:ln(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case bo.BinaryExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case bo.LogicalExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case bo.ConditionalExpression:ln(e.test,t),ln(e.alternate,t),ln(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case bo.Identifier:e.constant=!1,e.toWatch=[e];break;case bo.MemberExpression:ln(e.object,t),e.computed&&ln(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case bo.CallExpression:n=!!e.filter&&un(t,e.callee.name),i=[],r(e.arguments,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&un(t,e.callee.name)?i:[e];break;case bo.AssignmentExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case bo.ArrayExpression:n=!0,i=[],r(e.elements,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ObjectExpression:n=!0,i=[],r(e.properties,function(e){ln(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ThisExpression:e.constant=!1,e.toWatch=[];break;case bo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function cn(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function fn(e){return e.type===bo.Identifier||e.type===bo.MemberExpression}function dn(e){if(1===e.body.length&&fn(e.body[0].expression))return{type:bo.AssignmentExpression,left:e.body[0].expression,right:{type:bo.NGValueParameter},operator:"="}}function pn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===bo.Literal||e.body[0].expression.type===bo.ArrayExpression||e.body[0].expression.type===bo.ObjectExpression)}function hn(e){return e.constant}function gn(e,t){this.astBuilder=e,this.$filter=t}function vn(e,t){this.astBuilder=e,this.$filter=t}function $n(e){return"constructor"==e}function mn(e){return S(e.valueOf)?e.valueOf():wo.call(e)}function bn(){var e,t,n=he(),i=he(),o={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(a){function s(e,t,r){var o,s,l;switch(r=r||y,typeof e){case"string":e=e.trim(),l=e;var v=r?i:n;if(o=v[l],!o){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var m=r?b:$,w=new mo(m),x=new yo(w,a,m);o=x.parse(e),o.constant?o.$$watchDelegate=h:s?o.$$watchDelegate=o.literal?d:f:o.inputs&&(o.$$watchDelegate=c),r&&(o=u(o)),v[l]=o}return g(o,t);case"function":return g(e,t);default:return g(p,t)}}function u(e){function t(t,n,r,i){var o=y;y=!0;try{return e(t,n,r,i)}finally{y=o}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=u(e.assign),t.constant=e.constant,t.literal=e.literal;for(var n=0;e.inputs&&n<e.inputs.length;++n)e.inputs[n]=u(e.inputs[n]);return t.inputs=e.inputs,t}function l(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=mn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function c(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var s=l;return a=a[0],e.$watch(function(e){var t=a(e);return l(t,s)||(o=r(e,void 0,void 0,[t]),s=t&&mn(t)),o},t,n,i)}for(var u=[],c=[],f=0,d=a.length;f<d;f++)u[f]=l,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var s=a[n](e);(t||(t=!l(s,u[n])))&&(c[n]=s,u[n]=s&&mn(s))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function f(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,S(t)&&t.apply(this,arguments),m(e)&&r.$$postDigest(function(){m(o)&&i()})},n)}function d(e,t,n,i){function o(e){var t=!0;return r(e,function(e){m(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,r){s=e,S(t)&&t.call(this,e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function h(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function g(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==d&&n!==f,o=i?function(n,i,o,a){var s=r&&a?a[0]:e(n,i,o,a);return t(s,n,i)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return m(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==c?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=c,r=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var v=Qr().noUnsafeEval,$={csp:v,expensiveChecks:!1,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},b={csp:v,expensiveChecks:!0,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},y=!1;return s.$$runningExpensiveChecks=function(){return y},s}]}function yn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return xn(function(t){e.$evalAsync(t)},t)}]}function wn(){this.$get=["$browser","$exceptionHandler",function(e,t){return xn(function(t){e.defer(t)},t)}]}function xn(e,n){function i(){this.$$state={status:0}}function o(e,t){return function(n){t.call(e,n)}}function a(e){var t,r,i;i=e.pending,e.processScheduled=!1,e.pending=void 0;for(var o=0,a=i.length;o<a;++o){r=i[o][0],t=i[o][e.status];try{S(t)?r.resolve(t(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(s){r.reject(s),n(s)}}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){a(t)}))}function u(){this.promise=new i}function c(e){var t=new u,n=0,i=Kr(e)?[]:{};return r(e,function(e,r){n++,m(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}function f(e){var t=p();return r(e,function(e){m(e).then(t.resolve,t.reject)}),t.promise}var d=t("$q",TypeError),p=function(){var e=new u;return e.resolve=o(e,e.resolve),e.reject=o(e,e.reject),e.notify=o(e,e.notify),e};l(i.prototype,{then:function(e,t,n){if($(e)&&$(t)&&$(n))return this;var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&s(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),l(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){u||(u=!0,a.$$resolve(e))}function r(e){u||(u=!0,a.$$reject(e))}var i,a=this,u=!1;try{(b(e)||S(e))&&(i=e&&e.then),S(i)?(this.promise.$$state.status=-1,i.call(e,t,r,o(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(l){r(l),n(l)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;o<a;o++){i=r[o][0],e=r[o][3];try{i.notify(S(e)?e(t):t)}catch(s){n(s)}}})}});var h=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{S(n)&&(r=n())}catch(i){return g(i,!1)}return P(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)},y=m,w=function(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!S(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);var r=new u;return e(t,n),r.promise};return w.prototype=i.prototype,w.defer=p,w.reject=h,w.when=m,w.resolve=y,w.all=c,w.race=f,w}function _n(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Sn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=a(),this.$$ChildScope=null}return t.prototype=e,t}var i=10,o=t("$rootScope"),s=null,u=null;this.digestTtl=function(e){return arguments.length&&(i=e),i},this.$get=["$exceptionHandler","$parse","$browser",function(t,l,c){function f(e){e.currentScope.$$destroyed=!0}function d(e){9===Ir&&(e.$$childHead&&d(e.$$childHead),e.$$nextSibling&&d(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function h(){this.$id=a(),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 g(e){if(k.$$phase)throw o("inprog","{0} already in progress",k.$$phase);k.$$phase=e}function v(){k.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function x(){for(;A.length;)try{A.shift()()}catch(e){t(e)}u=null}function _(){null===u&&(u=c.defer(function(){k.$apply(x)}))}h.prototype={constructor:h,$new:function(t,n){var r;return n=n||this,t?(r=new h,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",f),r},$watch:function(e,t,n,r){var i=l(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,a=o.$$watchers,u={fn:t,last:w,get:i,exp:r||e,eq:!!n};return s=null,S(t)||(u.fn=p),a||(a=o.$$watchers=[]),a.unshift(u),m(this,1),function(){R(a,u)>=0&&m(o,-1),s=null}},$watchGroup:function(e,t){function n(){u=!1,l?(l=!1,t(o,o,s)):t(o,i,s)}var i=new Array(e.length),o=new Array(e.length),a=[],s=this,u=!1,l=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(o,o,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,r){o[0]=e,i[0]=n,t(o,e===n?o:i,r)}):(r(e,function(e,t){var r=s.$watch(e,function(e,r){o[t]=e,i[t]=r,u||(u=!0,s.$evalAsync(n))});a.push(r)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function r(e){o=e;var t,r,i,s,u;if(!$(o)){if(b(o))if(n(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var l=0;l<t;l++)u=a[l],s=o[l],i=u!==u&&s!==s,i||u===s||(f++,a[l]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(r in o)Pr.call(o,r)&&(t++,s=o[r],u=a[r],r in a?(i=u!==u&&s!==s,i||u===s||(f++,a[r]=s)):(v++,a[r]=s,f++));if(v>t){f++;for(r in a)Pr.call(o,r)||(v--,delete a[r])}}else a!==o&&(a=o,f++);return f}}function i(){if(g?(g=!1,t(o,o,u)):t(o,s,u),c)if(b(o))if(n(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var r in o)Pr.call(o,r)&&(s[r]=o[r])}else s=o}r.$stateful=!0;var o,a,s,u=this,c=t.length>1,f=0,d=l(e,r),p=[],h={},g=!0,v=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,$,m,b,y=i,_=this,A=[];g("$digest"),c.$$checkUrlChange(),this===k&&null!==u&&(c.defer.cancel(u),x()),s=null;do{p=!1,$=_;for(var M=0;M<E.length;M++){try{b=E[M],b.scope.$eval(b.expression,b.locals)}catch(j){t(j)}s=null}E.length=0;e:do{if(f=$.$$watchers)for(d=f.length;d--;)try{if(e=f[d])if(l=e.get,(n=l($))===(r=e.last)||(e.eq?V(n,r):"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))){if(e===s){p=!1;break e}}else p=!0,s=e,e.last=e.eq?U(n,null):n,a=e.fn,a(n,r===w?n:r,$),y<5&&(m=4-y,A[m]||(A[m]=[]),A[m].push({msg:S(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(j){t(j)}if(!(h=$.$$watchersCount&&$.$$childHead||$!==_&&$.$$nextSibling))for(;$!==_&&!(h=$.$$nextSibling);)$=$.$parent}while($=h);if((p||E.length)&&!y--)throw v(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,A)}while(p||E.length);for(v();O<C.length;)try{C[O++]()}catch(j){t(j)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===k&&c.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$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=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,d(this)}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e,t){k.$$phase||E.length||c.defer(function(){E.length&&k.$digest()}),E.push({scope:this,expression:l(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{v()}}catch(n){t(n)}finally{try{k.$digest()}catch(n){throw t(n),n}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&A.push(t),e=l(e),_()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);r!==-1&&(n[r]=null,y(i,1,e))}},$emit:function(e,n){var r,i,o,a=[],s=this,u=!1,l={name:e,targetScope:s,stopPropagation:function(){u=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=z([l],arguments,1);do{for(r=s.$$listeners[e]||a,l.currentScope=s,i=0,o=r.length;i<o;i++)if(r[i])try{r[i].apply(null,c)}catch(f){t(f)}else r.splice(i,1),i--,o--;if(u)return l.currentScope=null,l;s=s.$parent}while(s);return l.currentScope=null,l},$broadcast:function(e,n){var r=this,i=r,o=r,a={name:e,targetScope:r,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!r.$$listenerCount[e])return a;for(var s,u,l,c=z([a],arguments,1);i=o;){for(a.currentScope=i,s=i.$$listeners[e]||[],u=0,l=s.length;u<l;u++)if(s[u])try{s[u].apply(null,c)}catch(f){t(f)}else s.splice(u,1),u--,l--;if(!(o=i.$$listenerCount[e]&&i.$$childHead||i!==r&&i.$$nextSibling))for(;i!==r&&!(o=i.$$nextSibling);)i=i.$parent}return a.currentScope=null,a}};var k=new h,E=k.$$asyncQueue=[],C=k.$$postDigestQueue=[],A=k.$$applyAsyncQueue=[],O=0;return k}]}function kn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return m(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=Dn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function En(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw xo("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Jr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw xo("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Cn(e){var t=[];return m(e)&&r(e,function(e){t.push(En(e))}),t}function An(){this.SCE_CONTEXTS=_o;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Cn(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?Fn(t):!!e.exec(t.href)}function i(n){var i,o,a=Dn(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){
|
5 |
-
return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw xo("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||$(t)||""===t)return t;if("string"!=typeof t)throw xo("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||$(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===_o.RESOURCE_URL){if(i(t))return t;throw xo("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===_o.HTML)return l(t);throw xo("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw xo("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[_o.HTML]=o(c),f[_o.CSS]=o(c),f[_o.URL]=o(c),f[_o.JS]=o(c),f[_o.RESOURCE_URL]=o(f[_o.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function On(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Ir<8)throw xo("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=ve(_o);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=h),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return r(_o,function(e,t){var n=Tr(t);i[we("parse_as_"+n)]=function(t){return o(e,t)},i[we("get_trusted_"+n)]=function(t){return a(e,t)},i[we("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Mn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=e.chrome&&e.chrome.app&&e.chrome.app.runtime,a=!o&&e.history&&e.history.pushState,s=f((/android (\d+)/.exec(Tr((e.navigator||{}).userAgent))||[])[1]),u=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,d=l.body&&l.body.style,p=!1,h=!1;if(d){for(var g in d)if(r=c.exec(g)){n=r[0],n=n[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in d&&"webkit"),p=!!("transition"in d||n+"Transition"in d),h=!!("animation"in d||n+"Animation"in d),!s||p&&h||(p=w(d.webkitTransition),h=w(d.webkitAnimation))}return{history:!(!a||s<4||u),hasEvent:function(e){if("input"===e&&Ir<=11)return!1;if($(i[e])){var t=l.createElement("div");i[e]="on"+e in t}return i[e]},csp:Qr(),vendorPrefix:n,transitions:p,animations:h,android:s}}]}function jn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,r,i){function o(a,s){function u(e){if(!s)throw So("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return r.reject(e)}o.totalPendingRequests++,w(a)&&!$(t.get(a))||(a=i.getTrustedResourceUrl(a));var c=n.defaults&&n.defaults.transformResponse;return Kr(c)?c=c.filter(function(e){return e!==Et}):c===Et&&(c=null),n.get(a,l({cache:t,transformResponse:c},e))["finally"](function(){o.totalPendingRequests--}).then(function(e){return t.put(a,e.data),e.data},u)}return o.totalPendingRequests=0,o}]}function Pn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),o=[];return r(i,function(e){var i=Gr.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+Jr(t)+"(\\s|\\||$)");i.test(r)&&o.push(e)}else r.indexOf(t)!=-1&&o.push(e)})}),o},i.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Tn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,s,u){S(o)||(u=s,s=o,o=p);var l,c=L(arguments,3),f=m(u)&&!u,d=(f?r:n).defer(),h=d.promise;return l=t.defer(function(){try{d.resolve(o.apply(null,c))}catch(t){d.reject(t),i(t)}finally{delete a[h.$$timeoutId]}f||e.$apply()},s),h.$$timeoutId=l,a[l]=d,h}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Dn(e){var t=e;return Ir&&(ko.setAttribute("href",t),t=ko.href),ko.setAttribute("href",t),{href:ko.href,protocol:ko.protocol?ko.protocol.replace(/:$/,""):"",host:ko.host,search:ko.search?ko.search.replace(/^\?/,""):"",hash:ko.hash?ko.hash.replace(/^#/,""):"",hostname:ko.hostname,port:ko.port,pathname:"/"===ko.pathname.charAt(0)?ko.pathname:"/"+ko.pathname}}function Fn(e){var t=w(e)?Dn(e):e;return t.protocol===Eo.protocol&&t.host===Eo.host}function Nn(){this.$get=g(e)}function In(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,o,a,s,u,l=n.cookie||"";if(l!==i)for(i=l,e=i.split("; "),r={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(u=t(o.substring(0,s)),$(r[u])&&(r[u]=t(o.substring(s+1))));return r}}function Rn(){this.$get=In}function Un(e){function t(i,o){if(b(i)){var a={};return r(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,o)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Hn),t("date",or),t("filter",Vn),t("json",ar),t("limitTo",sr),t("lowercase",To),t("number",Bn),t("orderBy",lr),t("uppercase",Do)}function Vn(){return function(e,r,i,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}o=o||"$";var a,s,u=qn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=zn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function zn(e,t,n,r){var i,o=b(e)&&n in e;return t===!0?t=V:S(t)||(t=function(e,t){return!$(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!v(e))&&(e=Tr(""+e),t=Tr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!b(i)?Ln(i,e[n],t,n,!1):Ln(i,e,t,n,r)}}function Ln(e,t,n,r,i,o){var a=qn(e),s=qn(t);if("string"===s&&"!"===t.charAt(0))return!Ln(e,t.substring(1),n,r,i);if(Kr(e))return e.some(function(e){return Ln(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Ln(e[u],t,n,r,!0))return!0;return!o&&Ln(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!S(l)&&!$(l)){var c=u===r,f=c?e:e[u];if(!Ln(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function qn(e){return null===e?"null":typeof e}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return $(n)&&(n=t.CURRENCY_SYM),$(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Wn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ao))>-1&&(e=e.replace(Ao,"")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)==Oo;r++);if(r==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==Oo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>Co&&(t=t.splice(0,Co-1),a=n-1,n=1),{d:t,e:a,i:n}}function Gn(e,t,n,r){var i=e.d,o=i.length-e.i;t=$(t)?Math.min(Math.max(n,o),r):+t;var a=t+e.i,s=i[a];if(a>0){i.splice(Math.max(e.i,a));for(var u=a;u<i.length;u++)i[u]=0}else{o=Math.max(0,o),e.i=1,i.length=Math.max(1,a=t+1),i[0]=0;for(var l=1;l<a;l++)i[l]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[a-1]++;for(;o<Math.max(0,t);o++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)}function Xn(e,t,n,r,i){if(!w(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,u=Math.abs(e)+"",l="";if(a)l="∞";else{o=Wn(u),Gn(o,i,t.minFrac,t.maxFrac);var c=o.d,f=o.i,d=o.e,p=[];for(s=c.reduce(function(e,t){return e&&!t},!0);f<0;)c.unshift(0),f++;f>0?p=c.splice(f,c.length):(p=c,c=[0]);var h=[];for(c.length>=t.lgSize&&h.unshift(c.splice(-t.lgSize,c.length).join(""));c.length>t.gSize;)h.unshift(c.splice(-t.gSize,c.length).join(""));c.length&&h.unshift(c.join("")),l=h.join(n),p.length&&(l+=r+p.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function Kn(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,i="-")),e=""+e;e.length<t;)e=Oo+e;return n&&(e=e.substr(e.length-t)),i+e}function Yn(e,t,n,r,i){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&n==-12&&(a=12),Kn(a,t,r,i)}}function Zn(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Dr(a+e);return i[s][o]}}function Jn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Kn(Math[r>0?"floor":"ceil"](r/60),2)+Kn(Math.abs(r%60),2)}function Qn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function er(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function tr(e){return function(t){var n=Qn(t.getFullYear()),r=er(t),i=+r-+n,o=1+Math.round(i/6048e5);return Kn(o,e)}}function nr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function rr(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function ir(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function or(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(r,f(t[1]),f(t[2])-1,f(t[3]));var u=f(t[4]||0)-i,l=f(t[5]||0)-o,c=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,u,l,c,d),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,u="",l=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Po.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=jo.exec(i),s?(l=z(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=K(n,o,!0)),r(l,function(t){a=Mo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function ar(){return function(e,t){return $(t)&&(t=2),B(e,t)}}function sr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&&(e=e.toString()),n(e)?(r=!r||isNaN(r)?0:f(r),r=r<0?Math.max(0,e.length+r):r,t>=0?ur(e,r,r+t):0===r?ur(e,t,e.length):ur(e,Math.max(0,r+t),r)):e)}}function ur(e,t,n){return w(e)?e.slice(t,n):zr.call(e,t,n)}function lr(e){function r(t){return t.map(function(t){var n=1,r=h;if(S(t))r=t;else if(w(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var i=r();r=function(e){return e[i]}}return{get:r,descending:n}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e){return S(e.valueOf)&&(e=e.valueOf(),i(e))?e:v(e)&&(e=e.toString(),i(e))?e:e}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"object"===n&&(e=o(e)),{value:e,type:n,index:t}}function s(e,t){var n=0,r=e.type,i=t.type;if(r===i){var o=e.value,a=t.value;"string"===r?(o=o.toLowerCase(),a=a.toLowerCase()):"object"===r&&(b(o)&&(o=e.index),b(a)&&(a=t.index)),o!==a&&(n=o<a?-1:1)}else n=r<i?-1:1;return n}return function(e,i,o,u){function l(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:f.map(function(n){return a(n.get(e),t)})}}function c(e,t){for(var n=0,r=f.length;n<r;n++){var i=p(e.predicateValues[n],t.predicateValues[n]);if(i)return i*f[n].descending*d}return p(e.tieBreaker,t.tieBreaker)*d}if(null==e)return e;if(!n(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);Kr(i)||(i=[i]),0===i.length&&(i=["+"]);var f=r(i),d=o?-1:1,p=S(u)?u:s,h=Array.prototype.map.call(e,l);return h.sort(c),e=h.map(function(e){return e.value})}}function cr(e){return S(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function fr(e,t){e.$name=t}function dr(e,t,n,i,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Io,a.$rollbackViewValue=function(){r(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){r(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){fe(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],r(a.$pending,function(t,n){a.$setValidity(n,null,e)}),r(a.$error,function(t,n){a.$setValidity(n,null,e)}),r(a.$$success,function(t,n){a.$setValidity(n,null,e)}),R(s,e),e.$$parentForm=Io},Cr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);i===-1&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(R(r,n),0===r.length&&delete e[t])},$animate:i}),a.$setDirty=function(){i.removeClass(e,wa),i.addClass(e,xa),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){i.setClass(e,wa,xa+" "+Ro),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,r(s,function(e){e.$setPristine()})},a.$setUntouched=function(){r(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){i.addClass(e,Ro),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function pr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function hr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r)}function gr(e,t,n,r,i,o){var a=Tr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(){s=!0}),t.on("compositionend",function(){s=!1,l()})}var u,l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),Jo[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(Zo,function(e){if(!u){var t=this[jr],n=t.badInput,r=t.typeMismatch;u=o.defer(function(){u=null,t.badInput===n&&t.typeMismatch===r||l(e)})}}),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function vr(e,t){if(_(e))return e;if(w(e)){Xo.lastIndex=0;var n=Xo.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=Qn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),u=t.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,s,u)}}return NaN}function $r(e,t){return function(n,i){var o,a;if(_(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Lo.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(o,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function mr(e,t,n,r){return function(i,o,a,s,u,l,c){function f(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function d(e){return m(e)&&!_(e)?n(e)||void 0:e}br(i,o,a,s),gr(i,o,a,s,u,l);var p,h=s&&s.$options&&s.$options.timezone;if(s.$$parserName=e,s.$parsers.push(function(e){if(s.$isEmpty(e))return null;if(t.test(e)){var r=n(e,p);return h&&(r=K(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Aa("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=K(p,h,!0)),c("date")(e,r,h)):(p=null,"")}),m(a.min)||a.ngMin){var g;s.$validators.min=function(e){return!f(e)||$(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if(m(a.max)||a.ngMax){var v;s.$validators.max=function(e){return!f(e)||$(v)||n(e)<=v},a.$observe("max",function(e){v=d(e),s.$validate()})}}}function br(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=b(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(jr)||{};return n.badInput||n.typeMismatch?void 0:e})}function yr(e,t,n,r,i,o){if(br(e,t,n,r),gr(e,t,n,r,i,o),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Bo.test(e)?parseFloat(e):void 0}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!x(e))throw Aa("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),m(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||$(a)||e>=a},n.$observe("min",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),a=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}if(m(n.max)||n.ngMax){var s;r.$validators.max=function(e){return r.$isEmpty(e)||$(s)||e<=s},n.$observe("max",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),s=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}}function wr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||qo.test(n)}}function xr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ho.test(n)}}function _r(e,t,n,r){$(n.name)&&t.attr("name",a());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Sr(e,t,n,r,i){var o;if(m(r)){if(o=e(r),!o.constant)throw Aa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function kr(e,t,n,r,i,o,a,s){var u=Sr(s,e,"ngTrueValue",n.ngTrueValue,!0),l=Sr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return V(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Er(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function o(e){var t=[];return Kr(e)?(r(e,function(e){t=t.concat(o(e))}),t):w(e)?e.split(" "):b(e)?(r(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,u){function l(e){var t=f(e,1);u.$addClass(t)}function c(e){var t=f(e,-1);u.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||he(),i=[];return r(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);r=f(r,1),o=f(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||(1&a.$index)===t){var n=o(e||[]);if(h){if(!V(e,h)){var r=o(h);d(r,n)}}else l(n)}h=Kr(e)?e.map(function(e){return ve(e)}):ve(e)}var h;a.$watch(u[e],p,!0),u.$observe("class",function(t){p(a.$eval(u[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var i=1&n;if(i!==(1&r)){var s=o(a.$eval(u[e]));i===t?l(s):c(s)}})}}}]}function Cr(e){function t(e,t,s){$(t)?n("$pending",e,s):r("$pending",e,s),j(t)?t?(c(a.$error,e,s),l(a.$$success,e,s)):(l(a.$error,e,s),c(a.$$success,e,s)):(c(a.$error,e,s),c(a.$$success,e,s)),a.$pending?(i(ka,!0),a.$valid=a.$invalid=void 0,o("",null)):(i(ka,!1),a.$valid=Ar(a.$error),a.$invalid=!a.$valid,o("",a.$valid));var u;u=a.$pending&&a.$pending[e]?void 0:!a.$error[e]&&(!!a.$$success[e]||null),o(e,u),a.$$parentForm.$setValidity(e,u,a)}function n(e,t,n){a[e]||(a[e]={}),l(a[e],t,n)}function r(e,t,n){a[e]&&c(a[e],t,n),Ar(a[e])&&(a[e]=void 0)}function i(e,t){t&&!u[e]?(f.addClass(s,e),u[e]=!0):!t&&u[e]&&(f.removeClass(s,e),u[e]=!1)}function o(e,t){e=e?"-"+se(e,"-"):"",i(ba+e,t===!0),i(ya+e,t===!1)}var a=e.ctrl,s=e.$element,u={},l=e.set,c=e.unset,f=e.$animate;u[ya]=!(u[ba]=s.hasClass(ba)),a.$setValidity=t}function Ar(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Or(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var Mr=/^\/(.+)\/([a-z]*)$/,jr="validity",Pr=Object.prototype.hasOwnProperty,Tr=function(e){return w(e)?e.toLowerCase():e},Dr=function(e){return w(e)?e.toUpperCase():e},Fr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Nr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Tr=Fr,Dr=Nr);var Ir,Rr,Ur,Vr,zr=[].slice,Lr=[].splice,qr=[].push,Hr=Object.prototype.toString,Br=Object.getPrototypeOf,Wr=t("ng"),Gr=e.angular||(e.angular={}),Xr=0;Ir=e.document.documentMode,p.$inject=[],h.$inject=[];var Kr=Array.isArray,Yr=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Zr=function(e){return w(e)?e.trim():e},Jr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Qr=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!m(Qr.rules)){var n=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(n){var r=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Qr.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else Qr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Qr.rules},ei=function(){if(m(ei.name_))return ei.name_;var t,n,r,i,o=ni.length;for(n=0;n<o;++n)if(r=ni[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return ei.name_=i},ti=/:/g,ni=["ng-","data-ng-","ng:","x-ng-"],ri=/[A-Z]/g,ii=!1,oi=1,ai=2,si=3,ui=8,li=9,ci=11,fi={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};Oe.expando="ng339";var di=Oe.cache={},pi=1,hi=function(e,t,n){e.addEventListener(t,n,!1)},gi=function(e,t,n){e.removeEventListener(t,n,!1)};Oe._data=function(e){return this.cache[e[this.expando]]||{}};var vi=/([\:\-\_]+(.))/g,$i=/^moz([A-Z])/,mi={mouseleave:"mouseout",mouseenter:"mouseover"},bi=t("jqLite"),yi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,wi=/<|&#?\w+;/,xi=/<([\w:-]+)/,_i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Si={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,"",""]};Si.optgroup=Si.option,Si.tbody=Si.tfoot=Si.colgroup=Si.caption=Si.thead,Si.th=Si.td;var ki=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ei=Oe.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),Oe(e).on("load",n))},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Rr(e>=0?this[e]:this[this.length+e])},length:0,push:qr,sort:[].sort,splice:[].splice},Ci={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Tr(e)]=e});var Ai={};r("input,select,option,textarea,button,form,details".split(","),function(e){Ai[e]=!0});var Oi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:Fe,removeData:Te,hasData:Se,cleanData:ke},function(e,t){Oe[t]=e}),r({data:Fe,inheritedData:ze,scope:function(e){return Rr.data(e,"$scope")||ze(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Rr.data(e,"$isolateScope")||Rr.data(e,"$isolateScopeNoTemplate")},controller:Ve,injector:function(e){return ze(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ne,css:function(e,t,n){return t=we(t),m(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r=e.nodeType;if(r!==si&&r!==ai&&r!==ui){var i=Tr(t);if(Ci[i]){if(!m(n))return e[t]||(e.attributes.getNamedItem(t)||p).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(m(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?void 0:o}}},prop:function(e,t,n){return m(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if($(t)){var n=e.nodeType;return n===oi||n===si?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if($(t)){if(e.multiple&&"select"===I(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return $(t)?e.innerHTML:(je(e,!0),void(e.innerHTML=t))},empty:Le},function(e,t){Oe.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Le&&$(2==e.length&&e!==Ne&&e!==Ve?t:n)){if(b(t)){for(r=0;r<o;r++)if(e===Fe)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=$(a)?Math.min(o,1):o,u=0;u<s;u++){var l=e(this[u],t,n);a=a?a+l:l}return a}for(r=0;r<o;r++)e(this[r],t,n);return this}}),r({removeData:Te,on:function(e,t,n,r){if(m(r))throw bi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(_e(e)){var i=De(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Ge(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],u=s.length,l=function(t,r,i){var s=o[t];s||(s=o[t]=[],s.specialHandlerWrapper=r,"$destroy"===t||i||hi(e,t,a)),s.push(n)};u--;)t=s[u],mi[t]?(l(mi[t],Ke),l(t,void 0,!0)):l(t)}},off:Pe,one:function(e,t,n){e=Rr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;je(e),r(new Oe(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===oi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===oi||n===ci){t=new Oe(t);for(var r=0,i=t.length;r<i;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===oi){var n=e.firstChild;r(new Oe(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Ae(e,Rr(t).eq(0).clone()[0])},remove:qe,detach:function(e){qe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Oe(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Re,removeClass:Ie,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;$(r)&&(r=!Ne(e,t)),(r?Re:Ie)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==ci?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Me,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=De(e),c=u&&u.events,f=c&&c[s];f&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:e},t.type&&(i=l(i,t)),o=ve(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Oe.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)$(i)?(i=e(this[o],t,n,r),m(i)&&(i=Rr(i))):Ue(i,e(this[o],t,n,r));return m(i)?i:this},Oe.prototype.bind=Oe.prototype.on,Oe.prototype.unbind=Oe.prototype.off}),Je.prototype={put:function(e,t){this[Ze(e,this.nextUid)]=t},get:function(e){return this[Ze(e,this.nextUid)]},remove:function(e){var t=this[e=Ze(e,this.nextUid)];return delete this[e],t}};var Mi=[function(){this.$get=[function(){return Je}]}],ji=/^([^\(]+?)=>/,Pi=/^[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Fi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ni=t("$injector");rt.$$annotate=nt;var Ii=t("$animate"),Ri=1,Ui="ng-animate",Vi=function(){this.$get=p},zi=function(){var e=new Je,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):Kr(t)?t:[],r(t,function(t){t&&(i=!0,e[t]=n)})),i}function a(){r(t,function(t){var n=e.get(t);if(n){var i=st(t.attr("class")),o="",a="";r(n,function(e,t){var n=!!i[t];e!==n&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)}),r(t,function(e){o&&Re(e,o),a&&Ie(e,a)}),e.remove(t)}}),t.length=0}function s(n,r,s){var u=e.get(n)||{},l=o(u,r,!0),c=o(u,s,!1);(l||c)&&(e.put(n,u),t.push(n),1===t.length&&i.$$postDigest(a))}return{enabled:p,on:p,off:p,pin:p,push:function(e,t,r,i){i&&i(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&s(e,r.addClass,r.removeClass);var o=new n;return o.complete(),o}}}]},Li=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ii("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Ui+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ii("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ui)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=at(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ut(o))},move:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ut(o))},leave:function(t,n){return e.push(t,"leave",ut(n),function(){t.remove()})},addClass:function(t,n,r){return r=ut(r),r.addClass=ot(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ut(r),r.removeClass=ot(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ut(i),i.addClass=ot(i.addClass,n),i.removeClass=ot(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ut(o),o.from=o.from?l(o.from,n):n,o.to=o.to?l(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=ot(o.tempClasses,i),e.push(t,"animate",o)}}}]}],qi=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},Hi=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,i,o){function a(e){this.setHost(e);var t=n(),r=function(e){o(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var n=i[0];n&&n.hidden?r(e):t(e)},this._state=0}var s=0,u=1,l=2;return a.chain=function(e,t){function n(){return r===e.length?void t(!0):void e[r](function(e){return e===!1?void t(!1):(r++,void n())})}var r=0;n()},a.all=function(e,t){function n(n){o=o&&n,++i===e.length&&t(o)}var i=0,o=!0;r(e,function(e){e.done(n)})},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===l?e():this._doneCallbacks.push(e)},progress:p,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e);
|
6 |
-
},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(e){var t=this;t._state===s&&(t._state=u,t._tick(function(){t._resolve(e)}))},_resolve:function(e){this._state!==l&&(r(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=l)}},a}]},Bi=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,r){function i(){return e(function(){o(),s||u.complete(),s=!0}),u}function o(){a.addClass&&(t.addClass(a.addClass),a.addClass=null),a.removeClass&&(t.removeClass(a.removeClass),a.removeClass=null),a.to&&(t.css(a.to),a.to=null)}var a=r||{};a.$$prepared||(a=U(a)),a.cleanupStyles&&(a.from=a.to=null),a.from&&(t.css(a.from),a.from=null);var s,u=new n;return{start:i,end:i}}}]},Wi=t("$compile"),Gi=new pt;ht.$inject=["$provide","$$sanitizeUriProvider"],gt.prototype.isFirstChange=function(){return this.previousValue===Gi};var Xi=/^((?:x|data)[\:\-_])/i,Ki=t("$controller"),Yi=/^(\S+)(\s+as\s+([\w$]+))?$/,Zi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Rr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Ji="application/json",Qi={"Content-Type":Ji+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,to={"[":/]$/,"{":/}$/},no=/^\)\]\}',?\n/,ro=t("$http"),io=function(e){return function(){throw ro("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},oo=Gr.$interpolateMinErr=t("$interpolate");oo.throwNoconcat=function(e){throw oo("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},oo.interr=function(e,t){return oo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var ao=function(){this.$get=["$window",function(e){function t(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}var n=e.angular.callbacks,r={};return{createCallback:function(e){var i="_"+(n.$$counter++).toString(36),o="angular.callbacks."+i,a=t(i);return r[o]=n[i]=a,o},wasCalled:function(e){return r[e].called},getResponse:function(e){return r[e].data},removeCallback:function(e){var t=r[e];delete n[t.id],delete r[e]}}}]},so=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,uo={http:80,https:443,ftp:21},lo=t("$location"),co={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Yt("$$absUrl"),url:function(e){if($(e))return this.$$url;var t=so.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Yt("$$protocol"),host:Yt("$$host"),port:Yt("$$port"),path:Zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||x(e))e=e.toString(),this.$$search=J(e);else{if(!b(e))throw lo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=U(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:$(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([Kt,Xt,Gt],function(e){e.prototype=Object.create(co),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Gt||!this.$$html5)throw lo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=$(t)?null:t,this}});var fo=t("$parse"),po=Function.prototype.call,ho=Function.prototype.apply,go=Function.prototype.bind,vo=he();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){vo[e]=!0});var $o={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},mo=function(e){this.options=e};mo.prototype={constructor:mo,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=vo[t],o=vo[n],a=vo[r];if(i||o||a){var s=a?r:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return n>=55296&&n<=56319&&r>=56320&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=m(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw fo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Tr(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=$o[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var bo=function(e,t){this.lexer=e,this.options=t};bo.Program="Program",bo.ExpressionStatement="ExpressionStatement",bo.AssignmentExpression="AssignmentExpression",bo.ConditionalExpression="ConditionalExpression",bo.LogicalExpression="LogicalExpression",bo.BinaryExpression="BinaryExpression",bo.UnaryExpression="UnaryExpression",bo.CallExpression="CallExpression",bo.MemberExpression="MemberExpression",bo.Identifier="Identifier",bo.Literal="Literal",bo.ArrayExpression="ArrayExpression",bo.Property="Property",bo.ObjectExpression="ObjectExpression",bo.ThisExpression="ThisExpression",bo.LocalsExpression="LocalsExpression",bo.NGValueParameter="NGValueParameter",bo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:bo.Program,body:e}},expressionStatement:function(){return{type:bo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:bo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:bo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:bo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:bo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:bo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=U(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:bo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:bo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:bo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:bo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:bo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:bo.Identifier,name:e.text}},constant:function(){return{type:bo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:bo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:bo.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:bo.ObjectExpression,properties:t}},throwError:function(e,t){throw fo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{"this":{type:bo.ThisExpression},$locals:{type:bo.LocalsExpression}}},gn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ln(i,n.$filter);var o,a="";if(this.stage="assign",o=dn(i)){this.state.computing="assign";var s=this.nextId();this.recurse(o,s),this.return_(s),a="fn.assign="+this.generateFunction("assign","s,v,l")}var u=cn(i.body);n.stage="inputs",r(u,function(e,t){var r="fn"+t;n.state[r]={vars:[],body:[],own:{}},n.state.computing=r;var i=n.nextId();n.recurse(e,i),n.return_(i),n.state.inputs.push(r),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",l)(this.$filter,en,nn,rn,tn,on,an,sn,e);return this.state=this.stage=void 0,c.literal=pn(i),c.constant=hn(i),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return r(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return r(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,i,o,a){var s,u,l,c,f,d=this;if(i=i||p,!a&&m(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,i,o,!0));switch(e.type){case bo.Program:r(e.body,function(t,n){d.recurse(t.expression,void 0,void 0,function(e){u=e}),n!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case bo.Literal:c=this.escape(e.value),this.assign(t,c),i(c);break;case bo.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){u=e}),c=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,c),i(c);break;case bo.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){s=e}),this.recurse(e.right,void 0,void 0,function(e){u=e}),c="+"===e.operator?this.plus(s,u):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(u,0):"("+s+")"+e.operator+"("+u+")",this.assign(t,c),i(c);break;case bo.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case bo.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case bo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),en(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){o&&1!==o&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||$n(e.name))&&d.addEnsureSafeObject(t),i(t);break;case bo.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,s,void 0,function(){d.if_(d.notNull(s),function(){o&&1!==o&&d.addEnsureSafeAssignContext(s),e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),d.addEnsureSafeMemberName(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.ensureSafeObject(d.computedMember(s,u)),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(en(e.property.name),o&&1!==o&&d.if_(d.not(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),(d.state.expensiveChecks||$n(e.property.name))&&(c=d.ensureSafeObject(c)),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case bo.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),l=[],r(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),l.push(t)}),c=u+"("+l.join(",")+")",d.assign(t,c),i(t)):(u=d.nextId(),s={},l=[],d.recurse(e.callee,u,s,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),r(e.arguments,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(d.ensureSafeObject(e))})}),s.name?(d.state.expensiveChecks||d.addEnsureSafeObject(s.context),c=d.member(s.context,s.name,s.computed)+"("+l.join(",")+")"):c=u+"("+l.join(",")+")",c=d.ensureSafeObject(c),d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case bo.AssignmentExpression:if(u=this.nextId(),s={},!fn(e.left))throw fo("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(s.context,s.name,s.computed)),d.addEnsureSafeAssignContext(s.context),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case bo.ArrayExpression:l=[],r(e.elements,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(c);break;case bo.ObjectExpression:l=[],f=!1,r(e.properties,function(e){e.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),r(e.properties,function(e){e.computed?(s=d.nextId(),d.recurse(e.key,s)):s=e.key.type===bo.Identifier?e.key.name:""+e.key.value,u=d.nextId(),d.recurse(e.value,u),d.assign(d.member(t,s,e.computed),u)})):(r(e.properties,function(t){d.recurse(t.value,e.constant?void 0:d.nextId(),void 0,function(e){l.push(d.escape(t.key.type===bo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case bo.ThisExpression:this.assign(t,"s"),i("s");break;case bo.LocalsExpression:this.assign(t,"l"),i("l");break;case bo.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var n=/[$_a-zA-Z][$_a-zA-Z0-9]*/,r=/[^$_a-zA-Z0-9]/g;return n.test(t)?e+"."+t:e+'["'+t.replace(r,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(w(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw fo("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},vn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ln(i,n.$filter);var o,a;(o=dn(i))&&(a=this.recurse(o));var s,u=cn(i.body);u&&(s=[],r(u,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var l=[];r(i.body,function(e){l.push(n.recurse(e.expression))});var c=0===i.body.length?p:1===i.body.length?l[0]:function(e,t){var n;return r(l,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=pn(i),c.constant=hn(i),c},recurse:function(e,t,n){var i,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case bo.Literal:return this.value(e.value,t);case bo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case bo.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case bo.Identifier:return en(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||$n(e.name),t,n,s.expression);case bo.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(en(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n,s.expression):this.nonComputedMember(i,o,s.expensiveChecks,t,n,s.expression);case bo.CallExpression:return a=[],r(e.arguments,function(e){a.push(s.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,r,i){for(var s=[],u=0;u<a.length;++u)s.push(a[u](e,n,r,i));var l=o.apply(void 0,s,i);return t?{context:void 0,name:void 0,value:l}:l}:function(e,n,r,i){var u,l=o(e,n,r,i);if(null!=l.value){nn(l.context,s.expression),rn(l.value,s.expression);for(var c=[],f=0;f<a.length;++f)c.push(nn(a[f](e,n,r,i),s.expression));u=nn(l.value.apply(l.context,c),s.expression)}return t?{value:u}:u};case bo.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var u=i(e,n,r,a),l=o(e,n,r,a);return nn(u.value,s.expression),on(u.context),u.context[u.name]=l,t?{value:l}:l};case bo.ArrayExpression:return a=[],r(e.elements,function(e){a.push(s.recurse(e))}),function(e,n,r,i){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,r,i));return t?{value:o}:o};case bo.ObjectExpression:return a=[],r(e.properties,function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===bo.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})}),function(e,n,r,i){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,r,i)]=a[s].value(e,n,r,i):o[a[s].key]=a[s].value(e,n,r,i);return t?{value:o}:o};case bo.ThisExpression:return function(e){return t?{value:e}:e};case bo.LocalsExpression:return function(e,n){return t?{value:n}:n};case bo.NGValueParameter:return function(e,n,r){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,r,i,o){var a=!e(n,r,i,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=sn(s,u);return n?{value:l}:l}},"binary-":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=(m(s)?s:0)-(m(u)?u:0);return n?{value:l}:l}},"binary*":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)*t(r,i,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)/t(r,i,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)%t(r,i,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)===t(r,i,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!==t(r,i,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)==t(r,i,o,a);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!=t(r,i,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<t(r,i,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:u}:u}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,r,i){return function(o,a,s,u){var l=a&&e in a?a:o;r&&1!==r&&l&&!l[e]&&(l[e]={});var c=l?l[e]:void 0;return t&&nn(c,i),n?{context:l,name:e,value:c}:c}},computedMember:function(e,t,n,r,i){return function(o,a,s,u){var l,c,f=e(o,a,s,u);return null!=f&&(l=t(o,a,s,u),l=tn(l),en(l,i),r&&1!==r&&(on(f),f&&!f[l]&&(f[l]={})),c=f[l],nn(c,i)),n?{context:f,name:l,value:c}:c}},nonComputedMember:function(e,t,n,r,i,o){return function(a,s,u,l){var c=e(a,s,u,l);i&&1!==i&&(on(c),c&&!c[t]&&(c[t]={}));var f=null!=c?c[t]:void 0;return(n||$n(t))&&nn(f,o),r?{context:c,name:t,value:f}:f}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var yo=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new bo(e,n),this.astCompiler=n.csp?new vn(this.ast,t):new gn(this.ast,t)};yo.prototype={constructor:yo,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var wo=Object.prototype.valueOf,xo=t("$sce"),_o={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},So=t("$compile"),ko=e.document.createElement("a"),Eo=Dn(e.location.href);In.$inject=["$document"],Un.$inject=["$provide"];var Co=22,Ao=".",Oo="0";Hn.$inject=["$locale"],Bn.$inject=["$locale"];var Mo={yyyy:Yn("FullYear",4,0,!1,!0),yy:Yn("FullYear",2,0,!0,!0),y:Yn("FullYear",1,0,!1,!0),MMMM:Zn("Month"),MMM:Zn("Month",!0),MM:Yn("Month",2,1),M:Yn("Month",1,1),LLLL:Zn("Month",!1,!0),dd:Yn("Date",2),d:Yn("Date",1),HH:Yn("Hours",2),H:Yn("Hours",1),hh:Yn("Hours",2,-12),h:Yn("Hours",1,-12),mm:Yn("Minutes",2),m:Yn("Minutes",1),ss:Yn("Seconds",2),s:Yn("Seconds",1),sss:Yn("Milliseconds",3),EEEE:Zn("Day"),EEE:Zn("Day",!0),a:nr,Z:Jn,ww:tr(2),w:tr(1),G:rr,GG:rr,GGG:rr,GGGG:ir},jo=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Po=/^\-?\d+$/;or.$inject=["$locale"];var To=g(Tr),Do=g(Dr);lr.$inject=["$parse"];var Fo=g({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Hr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),No={};r(Ci,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=vt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),No[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Oi,function(e,t){No[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Mr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),r(["src","srcset","href"],function(e){var t=vt("ng-"+e);No[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Hr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(Ir&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Io={$addControl:p,$$renameControl:fr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ro="ng-submitted";dr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Uo=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||p}var i={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:dr,compile:function(n,i){n.addClass(wa).addClass(ba);var o=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,n,i,a){var s=a[0];if(!("action"in i)){var u=function(t){e.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),t.preventDefault()};hi(n[0],"submit",u),n.on("$destroy",function(){t(function(){gi(n[0],"submit",u)},0,!1)})}var c=a[1]||s.$$parentForm;c.$addControl(s);var f=o?r(s.$name):p;o&&(f(e,s),i.$observe(o,function(t){s.$name!==t&&(f(e,void 0),s.$$parentForm.$$renameControl(s,t),(f=r(s.$name))(e,s))})),n.on("$destroy",function(){s.$$parentForm.$removeControl(s),f(e,void 0),l(s,Io)})}}}};return i}]},Vo=Uo(),zo=Uo(!0),Lo=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,qo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ho=/^(?=.{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])?)*$/,Bo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Wo=/^(\d{4,})-(\d{2})-(\d{2})$/,Go=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xo=/^(\d{4,})-W(\d\d)$/,Ko=/^(\d{4,})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zo="keydown wheel mousedown",Jo=he();
|
7 |
-
r("date,datetime-local,month,time,week".split(","),function(e){Jo[e]=!0});var Qo={text:hr,date:mr("date",Wo,$r(Wo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mr("datetimelocal",Go,$r(Go,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:mr("time",Yo,$r(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mr("week",Xo,vr,"yyyy-Www"),month:mr("month",Ko,$r(Ko,["yyyy","MM"]),"yyyy-MM"),number:yr,url:wr,email:xr,radio:_r,checkbox:kr,hidden:p,button:p,submit:p,reset:p,file:p},ea=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Qo[Tr(a.type)]||Qo.text)(i,o,a,s[0],t,e,n,r)}}}}],ta=/^(true|false|\d+)$/,na=function(){return{restrict:"A",priority:100,compile:function(e,t){return ta.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ra=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,function(e){n.textContent=$(e)?"":e})}}}}],ia=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var o=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(e){r.textContent=$(e)?"":e})}}}}],oa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){var n=o(t);r.html(e.getTrustedHtml(n)||"")})}}}}],aa=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),sa=Er("",!0),ua=Er("Odd",0),la=Er("Even",1),ca=cr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),fa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],da={},pa={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=vt("ng-"+e);da[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};pa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var ha=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,l;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=t.$$createComment("end ngIf",i.ngIf),s={clone:n},e.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=pe(s.clone),e.leave(l).then(function(){l=null}),s=null))})}}}],ga=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Gr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,l,c){var f,d,p,h=0,g=function(){d&&(d.remove(),d=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){d=null}),d=p,p=null)};r.$watch(o,function(o){var u=function(){!m(s)||s&&!r.$eval(s)||t()},d=++h;o?(e(o,!0).then(function(e){if(!r.$$destroyed&&d===h){var t=r.$new();l.template=e;var s=c(t,function(e){g(),n.enter(e,null,i).then(u)});f=t,p=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){r.$$destroyed||d===h&&(g(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(g(),l.template=null)})}}}}],va=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return Hr.call(r[0]).match(/SVG/)?(r.empty(),void t(Ee(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],$a=cr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ma=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?Zr(o):o,u=function(e){if(!$(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?Zr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(Kr(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},ba="ng-valid",ya="ng-invalid",wa="ng-pristine",xa="ng-dirty",_a="ng-untouched",Sa="ng-touched",ka="ng-pending",Ea="ng-empty",Ca="ng-not-empty",Aa=t("ngModel"),Oa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,i,o,a,s,u,l,c){this.$viewValue=Number.NaN,this.$modelValue=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=c(n.name||"",!1)(e),this.$$parentForm=Io;var f,d=o(n.ngModel),h=d.assign,g=d,v=h,b=null,y=this;this.$$setOptions=function(e){if(y.$options=e,e&&e.getterSetter){var t=o(n.ngModel+"()"),r=o(n.ngModel+"($$$p)");g=function(e){var n=d(e);return S(n)&&(n=t(e)),n},v=function(e,t){S(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Aa("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,Y(i))},this.$render=p,this.$isEmpty=function(e){return $(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){y.$isEmpty(e)?(a.removeClass(i,Ca),a.addClass(i,Ea)):(a.removeClass(i,Ea),a.addClass(i,Ca))};var w=0;Cr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){y.$dirty=!1,y.$pristine=!0,a.removeClass(i,xa),a.addClass(i,wa)},this.$setDirty=function(){y.$dirty=!0,y.$pristine=!1,a.removeClass(i,wa),a.addClass(i,xa),y.$$parentForm.$setDirty()},this.$setUntouched=function(){y.$touched=!1,y.$untouched=!0,a.setClass(i,_a,Sa)},this.$setTouched=function(){y.$touched=!0,y.$untouched=!1,a.setClass(i,Sa,_a)},this.$rollbackViewValue=function(){s.cancel(b),y.$viewValue=y.$$lastCommittedViewValue,y.$render()},this.$validate=function(){if(!x(y.$modelValue)||!isNaN(y.$modelValue)){var e=y.$$lastCommittedViewValue,t=y.$$rawModelValue,n=y.$valid,r=y.$modelValue,i=y.$options&&y.$options.allowInvalid;y.$$runValidators(t,e,function(e){i||n===e||(y.$modelValue=e?t:void 0,y.$modelValue!==r&&y.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function i(){var e=y.$$parserName||"parse";return $(f)?(s(e,null),!0):(f||(r(y.$validators,function(e,t){s(t,null)}),r(y.$asyncValidators,function(e,t){s(t,null)})),s(e,f),f)}function o(){var n=!0;return r(y.$validators,function(r,i){var o=r(e,t);n=n&&o,s(i,o)}),!!n||(r(y.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(y.$asyncValidators,function(r,o){var a=r(e,t);if(!P(a))throw Aa("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",a);s(o,void 0),n.push(a.then(function(){s(o,!0)},function(){i=!1,s(o,!1)}))}),n.length?l.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){c===w&&y.$setValidity(e,t)}function u(e){c===w&&n(e)}w++;var c=w;return i()&&o()?void a():void u(!1)},this.$commitViewValue=function(){var e=y.$viewValue;s.cancel(b),(y.$$lastCommittedViewValue!==e||""===e&&y.$$hasNativeValidators)&&(y.$$updateEmptyClasses(e),y.$$lastCommittedViewValue=e,y.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){y.$modelValue!==o&&y.$$writeModelToScope()}var n=y.$$lastCommittedViewValue,r=n;if(f=!$(r)||void 0)for(var i=0;i<y.$parsers.length;i++)if(r=y.$parsers[i](r),$(r)){f=!1;break}x(y.$modelValue)&&isNaN(y.$modelValue)&&(y.$modelValue=g(e));var o=y.$modelValue,a=y.$options&&y.$options.allowInvalid;y.$$rawModelValue=r,a&&(y.$modelValue=r,t()),y.$$runValidators(r,y.$$lastCommittedViewValue,function(e){a||(y.$modelValue=e?r:void 0,t())})},this.$$writeModelToScope=function(){v(e,y.$modelValue),r(y.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){y.$viewValue=e,y.$options&&!y.$options.updateOnDefault||y.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=y.$options;i&&m(i.debounce)&&(n=i.debounce,x(n)?r=n:x(n[t])?r=n[t]:x(n["default"])&&(r=n["default"])),s.cancel(b),r?b=s(function(){y.$commitViewValue()},r):u.$$phase?y.$commitViewValue():e.$apply(function(){y.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==y.$modelValue&&(y.$modelValue===y.$modelValue||t===t)){y.$modelValue=y.$$rawModelValue=t,f=void 0;for(var n=y.$formatters,r=n.length,i=t;r--;)i=n[r](i);y.$viewValue!==i&&(y.$$updateEmptyClasses(i),y.$viewValue=y.$$lastCommittedViewValue=i,y.$render(),y.$$runValidators(t,i,p))}return t})}],Ma=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Oa,priority:1,compile:function(t){return t.addClass(wa).addClass(_a).addClass(ba),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],ja=/(\s+|^)default(\s+|$)/,Pa=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),m(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Zr(this.$options.updateOn.replace(ja,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ta=cr({terminal:!0,priority:1e3}),Da=t("ngOptions"),Fa=/^\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]+?))?$/,Na=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!l&&n(e))t=e;else{t=[];for(var r in e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r)}return t}var s=e.match(Fa);if(!s)throw Da("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Y(t));var u=s[5]||s[7],l=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=o(s[2]?s[1]:u),p=c&&o(c),h=p||d,g=f&&o(f),v=f?function(e,t){return g(r,t)}:function(e){return Ze(e)},$=function(e,t){return v(e,_(e,t))},m=o(s[2]||s[1]),b=o(s[3]||""),y=o(s[4]||""),w=o(s[8]),x={},_=l?function(e,t){return x[l]=t,x[u]=e,x}:function(e){return x[u]=e,x};return{trackBy:f,getTrackByValue:$,getWatchables:o(w,function(e){var t=[];e=e||[];for(var n=a(e),i=n.length,o=0;o<i;o++){var u=e===n?o:n[o],l=e[u],c=_(l,u),f=v(l,c);if(t.push(f),s[2]||s[1]){var d=m(r,c);t.push(d)}if(s[4]){var p=y(r,c);t.push(p)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],o=a(n),s=o.length,u=0;u<s;u++){var l=n===o?u:o[u],c=n[l],d=_(c,l),p=h(r,d),g=v(p,d),x=m(r,d),S=b(r,d),k=y(r,d),E=new i(g,p,x,S,k);e.push(E),t[g]=E}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[$(e)]},getViewValueFromOption:function(e){return f?Gr.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function d(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];qe(m(r.group)?r.element.parentNode:r.element)}_=S.getOptions();var i={};if(w&&n.prepend(p),_.items.forEach(function(e){var t;m(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),k.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,k)}),n[0].appendChild(k),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=S.trackBy||v;(a?V(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var p,h=s[0],g=s[1],v=o.multiple,$=0,b=n.children(),y=b.length;$<y;$++)if(""===b[$].value){p=b.eq($);break}var w=!!p,x=Rr(u.cloneNode(!1));x.val("?");var _,S=a(o.ngOptions,n,e),k=i[0].createDocumentFragment(),E=function(){w||n.prepend(p),n.val(""),p.prop("selected",!0),p.attr("selected",!0)},C=function(){w||p.remove()},A=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};v?(g.$isEmpty=function(e){return!e||0===e.length},h.writeValue=function(e){_.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=_.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},h.readValue=function(){var e=n.val()||[],t=[];return r(e,function(e){var n=_.selectValueMap[e];n&&!n.disabled&&t.push(_.getViewValueFromOption(n))}),t},S.trackBy&&e.$watchCollection(function(){if(Kr(g.$viewValue))return g.$viewValue.map(function(e){return S.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.getOptionFromViewValue(e);t?(n[0].value!==t.selectValue&&(O(),C(),n[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||w?(O(),E()):(C(),A())},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(C(),O(),_.getViewValueFromOption(e)):null},S.trackBy&&e.$watch(function(){return S.getTrackByValue(g.$viewValue)},function(){g.$render()})),w?(p.remove(),t(p)(e),p.removeClass("ng-scope")):p=Rr(u.cloneNode(!1)),n.empty(),d(),e.$watchCollection(S.getWatchables,d)}var u=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=p},post:s}}}],Ia=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,u){function l(e){s.text(e||"")}var c,f=u.count,d=u.$attr.when&&s.attr(u.$attr.when),h=u.offset||0,g=a.$eval(d)||{},v={},m=t.startSymbol(),b=t.endSymbol(),y=m+f+"-"+h+b,w=Gr.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Tr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){v[n]=t(e.replace(i,y))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in g||(r=e.pluralCat(r-h)),r!==c&&!(i&&x(c)&&isNaN(c))){w();var o=v[r];$(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ra=["$parse","$animate","$compile",function(e,i,o){var a="$$NG_REMOVED",s=t("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},l=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,f){var d=f.ngRepeat,p=o.$$createComment("end ngRepeat",d),h=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=h[1],v=h[2],$=h[3],m=h[4];if(h=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!h)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=h[3]||h[1],y=h[2];if($&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test($)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test($)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",$);var w,x,_,S,k={$id:Ze};return m?w=e(m):(_=function(e,t){return Ze(t)},S=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return y&&(k[y]=t),k[b]=n,k.$index=r,w(e,k)});var g=he();e.$watchCollection(v,function(o){var f,v,m,w,k,E,C,A,O,M,j,P,T=t[0],D=he();if($&&(e[$]=o),n(o))O=o,A=x||_;else{A=x||S,O=[];for(var F in o)Pr.call(o,F)&&"$"!==F.charAt(0)&&O.push(F)}for(w=O.length,j=new Array(w),f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],C=A(k,E,f),g[C])M=g[C],delete g[C],D[C]=M,j[f]=M;else{if(D[C])throw r(j,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,C,E);j[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var N in g){if(M=g[N],P=pe(M.clone),i.leave(P),P[0].parentNode)for(f=0,v=P.length;f<v;f++)P[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],M=j[f],M.scope){m=T;do m=m.nextSibling;while(m&&m[a]);l(M)!=m&&i.move(pe(M.clone),null,T),T=c(M),u(M.scope,f,b,E,y,k,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,T),T=n,M.clone=e,D[M.id]=M,u(M.scope,f,b,E,y,k,w)});g=D})}}}}],Ua="ng-hide",Va="ng-hide-animate",za=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ua,{tempClasses:Va})})}}}],La=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ua,{tempClasses:Va})})}}}],qa=cr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ha=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,o,a){var s=o.ngSwitch||o.on,u=[],l=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,o;for(i=0,o=c.length;i<o;++i)e.cancel(c[i]);for(c.length=0,i=0,o=f.length;i<o;++i){var s=pe(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.then(d(c,i))}l.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&r(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.$$createComment("end ngSwitchWhen");var a={clone:r};l.push(a),e.enter(r,o.parent(),o)})})})}}}],Ba=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Wa=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Ga=t("ngTransclude"),Xa=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,r,i,o){function a(e,n){e.length?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}if(!o)throw Ga("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var u=r.ngTransclude||r.ngTranscludeSlot;o(a,null,u),u&&!o.isSlotFilled(u)&&s()}}}}],Ka=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Ya={$setViewValue:p,$render:p},Za=["$element","$scope",function(t,n){var r=this,i=new Je;r.ngModelCtrl=Ya,r.unknownOption=Rr(e.document.createElement("option")),r.renderUnknownOption=function(e){var n="? "+Ze(e)+" ?";r.unknownOption.val(n),t.prepend(r.unknownOption),t.val(n)},n.$on("$destroy",function(){r.renderUnknownOption=p}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),t.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),t.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){if(t[0].nodeType!==ui){fe(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1),r.ngModelCtrl.$render(),Or(t)}},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=void 0)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)},r.registerOption=function(e,t,n,i,o){if(i){var a;n.$observe("value",function(e){m(a)&&r.removeOption(a),a=e,r.addOption(e,t)})}else o?e.$watch(o,function(e,i){n.$set("value",e),i!==e&&r.removeOption(i),r.addOption(e,t)}):r.addOption(n.value,t);t.on("$destroy",function(){r.removeOption(n.value),r.ngModelCtrl.$render()})}}],Ja=function(){function e(e,t,n,i){var o=i[1];if(o){var a=i[0];if(a.ngModelCtrl=o,t.on("change",function(){e.$apply(function(){o.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return r(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Je(e);r(t.find("option"),function(e){e.selected=m(n.get(e.value))})};var s,u=NaN;e.$watch(function(){u!==o.$viewValue||V(s,o.$viewValue)||(s=ve(o.$viewValue),o.$render()),u=o.$viewValue}),o.$isEmpty=function(e){return!e||0===e.length}}}}function t(e,t,n,r){var i=r[1];if(i){var o=r[0];i.$render=function(){o.writeValue(i.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Za,priority:1,link:{pre:e,post:t}}},Qa=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if(m(n.value))var r=e(n.value,!0);else{var i=e(t.text(),!0);i||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,r,i)}}}}],es=g({restrict:"E",terminal:!1}),ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},ns=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,r,i){if(i){var o,a=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Y(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||$(o)||o.test(t)}}}}},rs=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=f(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},is=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=f(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void(e.console&&console.log("WARNING: Tried to load angular more than once.")):(ue(),be(Gr),Gr.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return t==-1?0:e.length-t-1}function n(e,n){var r=n;void 0===r&&(r=Math.min(t(e),3));var i=Math.pow(10,r),o=(e*i|0)%i;return{v:r,f:o}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],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:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var i=0|e,o=n(e,t);return 1==i&&0==o.v?r.ONE:r.OTHER}})}]),void Rr(e.document).ready(function(){re(e.document,ie)}))}(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>')},{}],41:[function(e,t,n){e("./angular"),t.exports=angular},{"./angular":40}],42:[function(e,t,n){!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(r){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var n=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,r){e.__listeners[n]=r,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,r,i){n(this),this.__url=r;try{e.apply(this,[t,r,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,r){if("__setXHR_"===t){n(this);var i=r(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=r,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],i={url:n.__url,jsonp:!1,cache:!0,complete:function(e,r){e&&angular.isString(e)&&e.indexOf("#2174")!==-1&&(e=null),n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==r.status&&t(n,"status",function(){return 0===r.status&&e&&"abort"!==e?500:r.status}),void 0!==r.statusText&&t(n,"statusText",function(){return r.statusText}),t(n,"readyState",function(){return 4}),void 0!==r.response&&t(n,"response",function(){return r.response});var i=r.responseText||(e&&0===r.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return i}),t(n,"response",function(){return i}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=r,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},progress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};i.data={},i.files={};for(var o=0;o<r.data.length;o++){var a=r.data[o];null!=a.val&&null!=a.val.name&&null!=a.val.size&&null!=a.val.type?i.files[a.key]=a.val:i.data[a.key]=a.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(i)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}function t(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function n(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)do t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;while(e);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.hasFlash=t(),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var r,i,o,a,s,u=document.createElement("script"),l=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)r=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)i=window.FileAPI.jsPath;else for(o=0;o<l.length;o++)if(s=l[o].src,a=s.search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/),a>-1){i=s.substring(0,a+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=i),u.setAttribute("src",r||i+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(u)}FileAPI.ngfFixIE=function(r,i,o){if(!t())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var a=function(){var t=i.parent();r.attr("disabled")?t&&t.removeClass("js-fileapi-wrapper"):(i.attr("__ngf_flash_")||(i.unbind("change"),i.unbind("click"),i.bind("change",function(e){s.apply(this,[e]),o.apply(this,[e])}),i.attr("__ngf_flash_","true")),t.addClass("js-fileapi-wrapper"),e(r)||(t.css("position","absolute").css("top",n(r[0]).top+"px").css("left",n(r[0]).left+"px").css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",r.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),i.css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};r.bind("mouseenter",a);var s=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");e.target||(e.target={}),e.target.files=t,e.target.files!==t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var r=0;r<n.length;r++)n[r].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var r={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(r.target.result=n.result),r},r=function(r){
|
8 |
-
t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",r)));var i;"load"===r.type?(e.onloadend&&e.onloadend(n("loadend",r)),i=n("load",r),e.onload&&e.onload(i),e.dispatchEvent(i)):"progress"===r.type?(i=n("progress",r),e.onprogress&&e.onprogress(i),e.dispatchEvent(i)):(i=n("error",r),e.onerror&&e.onerror(i),e.dispatchEvent(i))};this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,r)},this.readAsText=function(e){FileAPI.readAsText(e,r)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(e){return function(t,n){if("__setXHR_"===t){var r=n(this);r instanceof Function&&r(this)}else e.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var r=angular.module("ngFileUpload",[]);r.version="12.2.12",r.service("UploadBase",["$http","$q","$timeout",function(e,t,n){function i(r){function i(e){l.notify&&l.notify(e),c.progressFunc&&n(function(){c.progressFunc(e)})}function o(e){return null!=r._start&&s?{loaded:e.loaded+r._start,total:r._file&&r._file.size||e.total,type:e.type,config:r,lengthComputable:!0,target:e.target}:e}function u(){e(r).then(function(e){if(s&&r._chunkSize&&!r._finished&&r._file){var t=r._file&&r._file.size||0;i({loaded:Math.min(r._end,t),total:t,config:r,type:"progress"}),a.upload(r,!0)}else r._finished&&delete r._finished,l.resolve(e)},function(e){l.reject(e)},function(e){l.notify(e)})}r.method=r.method||"POST",r.headers=r.headers||{};var l=r._deferred=r._deferred||t.defer(),c=l.promise;return r.disableProgress||(r.headers.__setXHR_=function(){return function(e){e&&e.upload&&e.upload.addEventListener&&(r.__XHR=e,r.xhrFn&&r.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=r,i(o(e))},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=r,i(o(e)))},!1))}}),s?r._chunkSize&&r._end&&!r._finished?(r._start=r._end,r._end+=r._chunkSize,u()):r.resumeSizeUrl?e.get(r.resumeSizeUrl).then(function(e){r.resumeSizeResponseReader?r._start=r.resumeSizeResponseReader(e.data):r._start=parseInt((null==e.data.size?e.data:e.data.size).toString()),r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):r.resumeSize?r.resumeSize().then(function(e){r._start=e,r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):(r._chunkSize&&(r._start=0,r._end=r._start+r._chunkSize),u()):u(),c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,r)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,r)}),c},c.progress=function(e){return c.progressFunc=e,c.then(null,null,function(t){e(t)}),c},c.abort=c.pause=function(){return r.__XHR&&n(function(){r.__XHR.abort()}),c},c.xhr=function(e){return r.xhrFn=function(t){return function(){t&&t.apply(c,arguments),e.apply(c,arguments)}}(r.xhrFn),c},a.promisesCount++,c["finally"]&&c["finally"]instanceof Function&&c["finally"](function(){a.promisesCount--}),c}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=this;a.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var s=this.isResumeSupported();this.isUploadInProgress=function(){return a.promisesCount>0},this.rename=function(e,t){return e.ngfName=t,e},this.jsonBlob=function(e){null==e||angular.isString(e)||(e=JSON.stringify(e));var t=new window.Blob([e],{type:"application/json"});return t._ngfBlob=!0,t},this.json=function(e){return angular.toJson(e)},this.isFile=function(e){return null!=e&&(e instanceof window.Blob||e.flashId&&e.name&&e.size)},this.upload=function(e,t){function n(t,n){if(t._ngfBlob)return t;if(e._file=e._file||t,null!=e._start&&s){e._end&&e._end>=t.size&&(e._finished=!0,e._end=t.size);var r=t.slice(e._start,e._end||t.size);return r.name=t.name,r.ngfName=t.ngfName,e._chunkSize&&(n.append("_chunkSize",e._chunkSize),n.append("_currentChunkSize",e._end-e._start),n.append("_chunkNumber",Math.floor(e._start/e._chunkSize)),n.append("_totalSize",e._file.size)),r}return t}function r(t,i,o){if(void 0!==i)if(angular.isDate(i)&&(i=i.toISOString()),angular.isString(i))t.append(o,i);else if(a.isFile(i)){var s=n(i,t),u=o.split(",");u[1]&&(s.ngfName=u[1].replace(/^\s+|\s+$/g,""),o=u[0]),e._fileKey=e._fileKey||o,t.append(o,s,s.ngfName||s.name)}else if(angular.isObject(i)){if(i.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+o;i.$$ngfCircularDetection=!0;try{for(var l in i)if(i.hasOwnProperty(l)&&"$$ngfCircularDetection"!==l){var c=null==e.objectKey?"[i]":e.objectKey;i.length&&parseInt(l)>-1&&(c=null==e.arrayKey?c:e.arrayKey),r(t,i[l],o+c.replace(/[ik]/g,l))}}finally{delete i.$$ngfCircularDetection}}else t.append(o,i)}function u(){e._chunkSize=a.translateScalars(e.resumeChunkSize),e._chunkSize=e._chunkSize?parseInt(e._chunkSize.toString()):null,e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(t){var n,i=new window.FormData;t=t||e.fields||{},e.file&&(t.file=e.file);for(n in t)if(t.hasOwnProperty(n)){var o=t[n];e.formDataAppender?e.formDataAppender(i,n,o):r(i,o,n)}return i})}return t||(e=o(e)),e._isDigested||(e._isDigested=!0,u()),i(e)},this.http=function(t){return t=o(t),t.transformRequest=t.transformRequest||function(t){return window.ArrayBuffer&&t instanceof window.ArrayBuffer||t instanceof window.Blob?t:e.defaults.transformRequest[0].apply(this,arguments)},t._chunkSize=a.translateScalars(t.resumeChunkSize),t._chunkSize=t._chunkSize?parseInt(t._chunkSize.toString()):null,i(t)},this.translateScalars=function(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1024*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1048576*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1073741824*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e},this.urlToBlob=function(n){var r=t.defer();return e({url:n,method:"get",responseType:"arraybuffer"}).then(function(e){var t=new Uint8Array(e.data),i=e.headers("content-type")||"image/WebP",o=new window.Blob([t],{type:i}),a=n.match(/.*\/(.+?)(\?.*)?$/);a.length>1&&(o.name=a[1]),r.resolve(o)},function(e){r.reject(e)}),r.promise},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=r.version}]),r.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(e,t,n,r,i){function o(e,t,n){var i=[u.emptyPromise()];return angular.forEach(e,function(r,o){0===r.type.indexOf("image/jpeg")&&u.attrGetter("ngfFixOrientation",t,n,{$file:r})&&i.push(u.happyPromise(u.applyExifRotation(r),r).then(function(t){e.splice(o,1,t)}))}),r.all(i)}function a(e,t,n,i){var o=u.attrGetter("ngfResize",t,n);if(!o||!u.isResizeSupported()||!e.length)return u.emptyPromise();if(o instanceof Function){var a=r.defer();return o(e).then(function(r){s(r,e,t,n,i).then(function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})}return s(o,e,t,n,i)}function s(e,t,n,i,o){function a(r,a){if(0===r.type.indexOf("image")){if(e.pattern&&!u.validatePattern(r,e.pattern))return;e.resizeIf=function(e,t){return u.attrGetter("ngfResizeIf",n,i,{$width:e,$height:t,$file:r})};var l=u.resize(r,e);s.push(l),l.then(function(e){t.splice(a,1,e)},function(e){r.$error="resize",(r.$errorMessages=r.$errorMessages||{}).resize=!0,r.$errorParam=(e?(e.message?e.message:e)+": ":"")+(r&&r.name),o.$ngfValidations.push({name:"resize",valid:!1}),u.applyModelValidation(o,t)})}}for(var s=[u.emptyPromise()],l=0;l<t.length;l++)a(t[l],l);return r.all(s)}var u=i;return u.getAttrWithDefaults=function(e,t){if(null!=e[t])return e[t];var n=u.defaults[t];return null==n?n:angular.isString(n)?n:JSON.stringify(n)},u.attrGetter=function(t,n,r,i){var o=this.getAttrWithDefaults(n,t);if(!r)return o;try{return i?e(o)(r,i):e(o)(r)}catch(a){if(t.search(/min|max|pattern/i))return o;throw a}},u.shouldUpdateOn=function(e,t,n){var r=u.attrGetter("ngfModelOptions",t,n);return!r||!r.updateOn||r.updateOn.split(" ").indexOf(e)>-1},u.emptyPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.resolve.apply(e,n)}),e.promise},u.rejectPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.reject.apply(e,n)}),e.promise},u.happyPromise=function(e,n){var i=r.defer();return e.then(function(e){i.resolve(e)},function(e){t(function(){throw e}),i.resolve(n)}),i.promise},u.updateModel=function(n,r,i,s,l,c,f){function d(o,a,l,f,d){r.$$ngfPrevValidFiles=o,r.$$ngfPrevInvalidFiles=a;var p=o&&o.length?o[0]:null,h=a&&a.length?a[0]:null;n&&(u.applyModelValidation(n,o),n.$setViewValue(d?p:o)),s&&e(s)(i,{$files:o,$file:p,$newFiles:l,$duplicateFiles:f,$invalidFiles:a,$invalidFile:h,$event:c});var g=u.attrGetter("ngfModelInvalid",r);g&&t(function(){e(g).assign(i,d?h:a)}),t(function(){})}function p(){function e(e,t){return e.name===t.name&&(e.$ngfOrigSize||e.size)===(t.$ngfOrigSize||t.size)&&e.type===t.type}function t(t){var n;for(n=0;n<$.length;n++)if(e(t,$[n]))return!0;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;return!1}if(l){v=[],b=[];for(var n=0;n<l.length;n++)t(l[n])?b.push(l[n]):v.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?$.concat(w):w,x?m.concat(y):y,l,b,_)},k&&k.debounce?k.debounce.change||k.debounce:0)}var o=S?v:w;a(o,r,i,n).then(function(){S?u.validate(v,x?$.length:0,n,r,i).then(function(t){w=t.validsFiles,y=t.invalidsFiles,e()}):e()},function(){for(var t=0;t<o.length;t++){var n=o[t];if("resize"===n.$error){var r=w.indexOf(n);r>-1&&(w.splice(r,1),y.push(n)),e()}}})}var v,$,m,b=[],y=[],w=[];$=r.$$ngfPrevValidFiles||[],m=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&($=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);v=(l||[]).slice(0),"distinct"!==x&&u.attrGetter("ngfKeepDistinct",r,i)!==!0||p(r,i);var _=!x&&!u.attrGetter("ngfMultiple",r,i)&&!u.attrGetter("multiple",r);if(!x||v.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:v,$duplicateFiles:b,$event:c});var S=u.attrGetter("ngfValidateAfterResize",r,i),k=u.attrGetter("ngfModelOptions",r,i);u.validate(v,x?$.length:0,n,r,i).then(function(e){f?d(v,[],l,b,_):(k&&k.allowInvalid||S?w=v:(w=e.validFiles,y=e.invalidFiles),u.attrGetter("ngfFixOrientation",r,i)&&u.isExifSupported()?o(w,r,i).then(function(){g()}):g())})}},u}]),r.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(e,t,n,r){function i(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&t.length>2){var n=r.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return e.indexOf("Chrome")===-1&&/.*Windows.*Safari.*/.test(e)}function o(e,t,n,r,o,s,u,l){function c(){return"input"===t[0].tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()}function f(){return b("ngfChange")||b("ngfSelect")}function d(t){if(l.shouldUpdateOn("change",n,e)){var i=t.__files_||t.target&&t.target.files,o=[];if(!i)return;for(var a=0;a<i.length;a++)o.push(i[a]);l.updateModel(r,n,e,f(),o.length?o:null,t)}}function p(e,r){function i(t){e.attr("id","ngf-"+t),r.attr("id","ngf-label-"+t)}for(var o=0;o<t[0].attributes.length;o++){var a=t[0].attributes[o];"type"!==a.name&&"class"!==a.name&&"style"!==a.name&&("id"===a.name?(i(a.value),y.push(n.$observe("id",i))):e.attr(a.name,a.value||"required"!==a.name&&"multiple"!==a.name?a.value:a.name))}}function h(){if(c())return t;var e=angular.element('<input type="file">'),n=angular.element("<label>upload</label>");return n.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),p(e,n),a.push({el:t,ref:n}),document.body.appendChild(n.append(e)[0]),e}function g(n){if(t.attr("disabled"))return!1;if(!b("ngfSelectDisabled",e)){var r=v(n);if(null!=r)return r;$(n);try{c()||document.body.contains(_[0])||(a.push({el:t,ref:_.parent()}),document.body.appendChild(_.parent()[0]),_.bind("change",d))}catch(o){}return i(navigator.userAgent)?setTimeout(function(){_[0].click()},0):_[0].click(),!1}}function v(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if(t){if("touchstart"===e.type)return x=t[0].clientX,w=t[0].clientY,!0;if("touchend"===e.type){var n=t[0].clientX,r=t[0].clientY;if(Math.abs(n-x)>20||Math.abs(r-w)>20)return e.stopPropagation(),e.preventDefault(),!1}return!0}}function $(t){l.shouldUpdateOn("click",n,e)&&_.val()&&(_.val(null),l.updateModel(r,n,e,f(),null,t,!0))}function m(e){if(_&&!_.attr("__ngf_ie10_Fix_")){if(!_[0].parentNode)return void(_=null);e.preventDefault(),e.stopPropagation(),_.unbind("click");var t=_.clone();return _.replaceWith(t),_=t,_.attr("__ngf_ie10_Fix_","true"),_.bind("change",d),_.bind("click",m),_[0].click(),!1}_.removeAttr("__ngf_ie10_Fix_")}var b=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var y=[];b("ngfMultiple")&&y.push(e.$watch(b("ngfMultiple"),function(){_.attr("multiple",b("ngfMultiple",e))})),b("ngfCapture")&&y.push(e.$watch(b("ngfCapture"),function(){_.attr("capture",b("ngfCapture",e))})),b("ngfAccept")&&y.push(e.$watch(b("ngfAccept"),function(){_.attr("accept",b("ngfAccept",e))})),y.push(n.$observe("accept",function(){_.attr("accept",b("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",$):t.bind("click touchstart touchend",g),navigator.appVersion.indexOf("MSIE 10")!==-1&&_.bind("click",m),r&&r.$formatters.push(function(e){return null!=e&&0!==e.length||_.val()&&_.val(null),e}),e.$on("$destroy",function(){c()||_.parent().remove(),angular.forEach(y,function(e){e()})}),s(function(){for(var e=0;e<a.length;e++){var t=a[e];document.body.contains(t.el[0])||(a.splice(e,1),t.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(t,_,d)}var a=[];return{restrict:"AEC",require:"?ngModel",link:function(i,a,s,u){o(i,a,s,u,e,t,n,r)}}}]),function(){function e(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/./}function t(t,n,r,i,o,a,s,u){function l(e){var a=t.attrGetter("ngfNoObjectUrl",o,r);t.dataUrl(e,a)["finally"](function(){n(function(){var t=(a?e.$ngfDataUrl:e.$ngfBlobUrl)||e.$ngfDataUrl;u?i.css("background-image","url('"+(t||"")+"')"):i.attr("src",t),t?i.removeClass("ng-hide"):i.addClass("ng-hide")})})}n(function(){var n=r.$watch(o[a],function(n){var c=s;if("ngfThumbnail"===a&&(c||(c={width:i[0].naturalWidth||i[0].clientWidth,height:i[0].naturalHeight||i[0].clientHeight}),0===c.width&&window.getComputedStyle)){var f=getComputedStyle(i[0]);c={width:parseInt(f.width.slice(0,-2)),height:parseInt(f.height.slice(0,-2))}}return angular.isString(n)?(i.removeClass("ng-hide"),u?i.css("background-image","url('"+n+"')"):i.attr("src",n)):void(!n||!n.type||0!==n.type.search(e(i[0]))||u&&0!==n.type.indexOf("image")?i.addClass("ng-hide"):c&&t.isResizeSupported()?(c.resizeIf=function(e,i){return t.attrGetter("ngfResizeIf",o,r,{$width:e,$height:i,$file:n})},t.resize(n,c).then(function(e){l(e)},function(e){throw e})):l(n))});r.$on("$destroy",function(){n()})})}r.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,t,n){var r=e;return r.base64DataUrl=function(e){if(angular.isArray(e)){var t=n.defer(),i=0;return angular.forEach(e,function(n){r.dataUrl(n,!0)["finally"](function(){if(i++,i===e.length){var n=[];angular.forEach(e,function(e){n.push(e.$ngfDataUrl)}),t.resolve(n,e)}})}),t.promise}return r.dataUrl(e,!0)},r.dataUrl=function(e,i){if(!e)return r.emptyPromise(e,e);if(i&&null!=e.$ngfDataUrl||!i&&null!=e.$ngfBlobUrl)return r.emptyPromise(i?e.$ngfDataUrl:e.$ngfBlobUrl,e);var o=i?e.$$ngfDataUrlPromise:e.$$ngfBlobUrlPromise;if(o)return o;var a=n.defer();return t(function(){if(window.FileReader&&e&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 8")===-1||e.size<2e4)&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 9")===-1||e.size<4e6)){var n=window.URL||window.webkitURL;if(n&&n.createObjectURL&&!i){var o;try{o=n.createObjectURL(e)}catch(s){return void t(function(){e.$ngfBlobUrl="",a.reject()})}t(function(){if(e.$ngfBlobUrl=o,o){a.resolve(o,e),r.blobUrls=r.blobUrls||[],r.blobUrlsTotalSize=r.blobUrlsTotalSize||0,r.blobUrls.push({url:o,size:e.size}),r.blobUrlsTotalSize+=e.size||0;for(var t=r.defaults.blobUrlsMaxMemory||268435456,i=r.defaults.blobUrlsMaxQueueSize||200;(r.blobUrlsTotalSize>t||r.blobUrls.length>i)&&r.blobUrls.length>1;){var s=r.blobUrls.splice(0,1)[0];n.revokeObjectURL(s.url),r.blobUrlsTotalSize-=s.size}}})}else{var u=new FileReader;u.onload=function(n){t(function(){e.$ngfDataUrl=n.target.result,a.resolve(n.target.result,e),t(function(){delete e.$ngfDataUrl},1e3)})},u.onerror=function(){t(function(){e.$ngfDataUrl="",a.reject()})},u.readAsDataURL(e)}}else t(function(){e[i?"$ngfDataUrl":"$ngfBlobUrl"]="",a.reject()})}),o=i?e.$$ngfDataUrlPromise=a.promise:e.$$ngfBlobUrlPromise=a.promise,o["finally"](function(){delete e[i?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),o},r}]),r.directive("ngfSrc",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfSrc",e.attrGetter("ngfResize",o,r),!1)}}}]),r.directive("ngfBackground",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfBackground",e.attrGetter("ngfResize",o,r),!0)}}}]),r.directive("ngfThumbnail",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){var a=e.attrGetter("ngfSize",o,r);t(e,n,r,i,o,"ngfThumbnail",a,e.attrGetter("ngfAsBackground",o,r))}}}]),r.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),r.filter("ngfDataUrl",["UploadDataUrl","$sce",function(e,t){return function(n,r,i){if(angular.isString(n))return t.trustAsResourceUrl(n);var o=n&&((r?n.$ngfDataUrl:n.$ngfBlobUrl)||n.$ngfDataUrl);return n&&!o?(!n.$ngfDataUrlFilterInProgress&&angular.isObject(n)&&(n.$ngfDataUrlFilterInProgress=!0,e.dataUrl(n,r)),""):(n&&delete n.$ngfDataUrlFilterInProgress,(n&&o?i?t.trustAsResourceUrl(o):o:n)||"")}}])}(),r.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(e,t,n){function r(e){var t="",n=[];if(e.length>2&&"/"===e[0]&&"/"===e[e.length-1])t=e.substring(1,e.length-1);else{var i=e.split(",");if(i.length>1)for(var o=0;o<i.length;o++){var a=r(i[o]);a.regexp?(t+="("+a.regexp+")",o<i.length-1&&(t+="|")):n=n.concat(a.excludes)}else 0===e.indexOf("!")?n.push("^((?!"+r(e.substring(1)).regexp+").)*$"):(0===e.indexOf(".")&&(e="*"+e),t="^"+e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",t=t.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:t,excludes:n}}function i(e,t){null==t||e.$dirty||(e.$setDirty?e.$setDirty():e.$dirty=!0)}var o=e;return o.validatePattern=function(e,t){if(!t)return!0;var n=r(t),i=!0;if(n.regexp&&n.regexp.length){var o=new RegExp(n.regexp,"i");i=null!=e.type&&o.test(e.type)||null!=e.name&&o.test(e.name)}for(var a=n.excludes.length;a--;){var s=new RegExp(n.excludes[a],"i");i=i&&(null==e.type||s.test(e.type))&&(null==e.name||s.test(e.name))}return i},o.ratioToFloat=function(e){var t=e.toString(),n=t.search(/[x:]/i);return t=n>-1?parseFloat(t.substring(0,n))/parseFloat(t.substring(n+1)):parseFloat(t)},o.registerModelChangeValidator=function(e,t,n){e&&e.$formatters.push(function(r){if(e.$dirty){var i=r;r&&!angular.isArray(r)&&(i=[r]),o.validate(i,0,e,t,n).then(function(){o.applyModelValidation(e,i)})}return r})},o.applyModelValidation=function(e,t){i(e,t),angular.forEach(e.$ngfValidations,function(t){e.$setValidity(t.name,t.valid)})},o.getValidationAttr=function(e,t,n,r,i){var a="ngf"+n[0].toUpperCase()+n.substr(1),s=o.attrGetter(a,e,t,{$file:i});if(null==s&&(s=o.attrGetter("ngfValidate",e,t,{$file:i}))){var u=(r||n).split(".");s=s[u[0]],u.length>1&&(s=s&&s[u[1]])}return s},o.validate=function(e,n,r,i,a){function s(t,n,s){if(e){for(var u=e.length,l=null;u--;){var p=e[u];if(p){var h=o.getValidationAttr(i,a,t,n,p);null!=h&&(s(p,h,u)||(c.indexOf(t)===-1?(p.$error=t,(p.$errorMessages=p.$errorMessages||{})[t]=!0,p.$errorParam=h,d.indexOf(p)===-1&&d.push(p),f||e.splice(u,1),l=!1):e.splice(u,1)))}}null!==l&&r.$ngfValidations.push({name:t,valid:l})}}function u(n,s,u,p,h){function g(t,r,i){function o(o){if(o())if(c.indexOf(n)===-1){if(r.$error=n,(r.$errorMessages=r.$errorMessages||{})[n]=!0,r.$errorParam=i,d.indexOf(r)===-1&&d.push(r),!f){var a=e.indexOf(r);a>-1&&e.splice(a,1)}t.resolve(!1)}else{var s=e.indexOf(r);s>-1&&e.splice(s,1),t.resolve(!0)}else t.resolve(!0)}null!=i?p(r,i).then(function(e){o(function(){return!h(e,i)})},function(){o(function(){return l("ngfValidateForce",{$file:r})})}):t.resolve(!0)}var v=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return v.push(r.promise),!u||null!=e.type&&0===e.type.search(u)?void("dimensions"===n&&null!=o.attrGetter("ngfDimensions",i)?o.imageDimensions(e).then(function(t){g(r,e,l("ngfDimensions",{$file:e,$width:t.width,$height:t.height}))},function(){r.resolve(!1)}):"duration"===n&&null!=o.attrGetter("ngfDuration",i)?o.mediaDuration(e).then(function(t){g(r,e,l("ngfDuration",{$file:e,$duration:t}))},function(){r.resolve(!1)}):g(r,e,o.getValidationAttr(i,a,n,s,e))):void r.resolve(!0)}));var $=t.defer();return t.all(v).then(function(e){for(var t=!0,i=0;i<e.length;i++)if(!e[i]){t=!1;break}r.$ngfValidations.push({name:n,valid:t}),$.resolve(t)}),$.promise}r=r||{},r.$ngfValidations=r.$ngfValidations||[],angular.forEach(r.$ngfValidations,function(e){e.valid=!0});var l=function(e,t){return o.attrGetter(e,i,a,t)},c=(o.attrGetter("ngfIgnoreInvalid",i,a)||"").split(" "),f=o.attrGetter("ngfRunAllValidations",i,a);if(null==e||0===e.length)return o.emptyPromise({validFiles:e,invalidFiles:[]});e=void 0===e.length?[e]:e.slice(0);var d=[];s("pattern",null,o.validatePattern),s("minSize","size.min",function(e,t){return e.size+.1>=o.translateScalars(t)}),s("maxSize","size.max",function(e,t){return e.size-.1<=o.translateScalars(t)});var p=0;if(s("maxTotalSize",null,function(t,n){return p+=t.size,!(p>o.translateScalars(n))||(e.splice(0,e.length),!1)}),s("validateFn",null,function(e,t){return t===!0||null===t||""===t}),!e.length)return o.emptyPromise({validFiles:[],invalidFiles:d});var h=t.defer(),g=[];return g.push(u("maxHeight","height.max",/image/,this.imageDimensions,function(e,t){return e.height<=t})),g.push(u("minHeight","height.min",/image/,this.imageDimensions,function(e,t){return e.height>=t})),g.push(u("maxWidth","width.max",/image/,this.imageDimensions,function(e,t){return e.width<=t})),g.push(u("minWidth","width.min",/image/,this.imageDimensions,function(e,t){return e.width>=t})),g.push(u("dimensions",null,/image/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("ratio",null,/image/,this.imageDimensions,function(e,t){for(var n=t.toString().split(","),r=!1,i=0;i<n.length;i++)Math.abs(e.width/e.height-o.ratioToFloat(n[i]))<.01&&(r=!0);return r})),g.push(u("maxRatio","ratio.max",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)<1e-4})),g.push(u("minRatio","ratio.min",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)>-1e-4})),g.push(u("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(e,t){return e<=o.translateScalars(t)})),g.push(u("minDuration","duration.min",/audio|video/,this.mediaDuration,function(e,t){return e>=o.translateScalars(t)})),g.push(u("duration",null,/audio|video/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("validateAsyncFn",null,null,function(e,t){return t},function(e){return e===!0||null===e||""===e})),t.all(g).then(function(){if(f)for(var t=0;t<e.length;t++){var r=e[t];r.$error&&e.splice(t--,1)}f=!1,s("maxFiles",null,function(e,t,r){return n+r<t}),h.resolve({validFiles:e,invalidFiles:d})}),h.promise},o.imageDimensions=function(e){if(e.$ngfWidth&&e.$ngfHeight){var r=t.defer();return n(function(){r.resolve({width:e.$ngfWidth,height:e.$ngfHeight})}),r.promise}if(e.$ngfDimensionPromise)return e.$ngfDimensionPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("image")?void i.reject("not image"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].naturalWidth||s[0].clientWidth,n=s[0].naturalHeight||s[0].clientHeight;s.remove(),e.$ngfWidth=t,e.$ngfHeight=n,i.resolve({width:t,height:n})}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].clientWidth?r():u++>10?o():a())},1e3)}var s=angular.element("<img>").attr("src",t).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");s.on("load",r),s.on("error",o);var u=0;a(),angular.element(document.getElementsByTagName("body")[0]).append(s)},function(){i.reject("load error")})}),e.$ngfDimensionPromise=i.promise,e.$ngfDimensionPromise["finally"](function(){delete e.$ngfDimensionPromise}),e.$ngfDimensionPromise},o.mediaDuration=function(e){if(e.$ngfDuration){var r=t.defer();return n(function(){r.resolve(e.$ngfDuration)}),r.promise}if(e.$ngfDurationPromise)return e.$ngfDurationPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("audio")&&0!==e.type.indexOf("video")?void i.reject("not media"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].duration;e.$ngfDuration=t,s.remove(),i.resolve(t)}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].duration?r():u>10?o():a())},1e3)}var s=angular.element(0===e.type.indexOf("audio")?"<audio>":"<video>").attr("src",t).css("visibility","none").css("position","fixed");s.on("loadedmetadata",r),s.on("error",o);var u=0;a(),angular.element(document.body).append(s)},function(){i.reject("load error")})}),e.$ngfDurationPromise=i.promise,e.$ngfDurationPromise["finally"](function(){delete e.$ngfDurationPromise}),e.$ngfDurationPromise},o}]),r.service("UploadResize",["UploadValidate","$q",function(e,t){var n=e,r=function(e,t,n,r,i){var o=i?Math.max(n/e,r/t):Math.min(n/e,r/t);return{width:e*o,height:t*o,marginX:e*o-n,marginY:t*o-r}},i=function(e,i,o,a,s,u,l,c){var f=t.defer(),d=document.createElement("canvas"),p=document.createElement("img");return p.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(p),p.onload=function(){var e=p.width,t=p.height;if(p.parentNode.removeChild(p),null!=c&&c(e,t)===!1)return void f.reject("resizeIf");try{if(u){var h=n.ratioToFloat(u),g=e/t;g<h?(i=e,o=i/h):(o=t,i=o*h)}i||(i=e),o||(o=t);var v=r(e,t,i,o,l);d.width=Math.min(v.width,i),d.height=Math.min(v.height,o);var $=d.getContext("2d");$.drawImage(p,Math.min(0,-v.marginX/2),Math.min(0,-v.marginY/2),v.width,v.height),f.resolve(d.toDataURL(s||"image/WebP",a||.934))}catch(m){f.reject(m)}},p.onerror=function(){p.parentNode.removeChild(p),f.reject()},p.src=e,f.promise};return n.dataUrltoBlob=function(e,t,n){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var u=new window.Blob([s],{type:i});return u.name=t,u.$ngfOrigSize=n,u},n.isResizeSupported=function(){var e=document.createElement("canvas");return window.atob&&e.getContext&&e.getContext("2d")&&window.Blob},n.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(e){this.$ngfName=e},configurable:!0}),n.resize=function(e,r){if(0!==e.type.indexOf("image"))return n.emptyPromise(e);var o=t.defer();return n.dataUrl(e,!0).then(function(t){i(t,r.width,r.height,r.quality,r.type||e.type,r.ratio,r.centerCrop,r.resizeIf).then(function(i){if("image/jpeg"===e.type&&r.restoreExif!==!1)try{i=n.restoreExif(t,i)}catch(a){setTimeout(function(){throw a},1)}try{var s=n.dataUrltoBlob(i,e.name,e.size);o.resolve(s)}catch(a){o.reject(a)}},function(t){"resizeIf"===t&&o.resolve(e),o.reject(t)})},function(e){o.reject(e)}),o.promise},n}]),function(){function e(e,n,r,i,o,a,s,u,l,c){function f(){return n.attr("disabled")||$("ngfDropDisabled",e)}function d(t,n){u.updateModel(i,r,e,$("ngfChange")||$("ngfDrop"),t,n)}function p(t,n){if(!u.shouldUpdateOn(t,r,e)||"string"!=typeof n)return u.rejectPromise([]);var i=[];n.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(e,t,n){i.push(n)});var o=[],a=[];if(i.length){angular.forEach(i,function(e){o.push(u.urlToBlob(e).then(function(e){a.push(e)}))});var s=c.defer();return c.all(o).then(function(){s.resolve(a)},function(e){s.reject(e)}),s.promise}return u.emptyPromise()}function h(e,t,n,r){var i=$("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(w=i.delay),i.accept||i.reject)){var a=n.dataTransfer.items;if(null!=a&&a.length)for(var s=i.pattern||$("ngfPattern",e,{$event:n}),l=a.length;l--;){if(!u.validatePattern(a[l],s)){o=i.reject;break}o=i.accept}else o=i.accept}r(o)}function g(t,n,i,o){function a(e,t){var n=c.defer();if(null!=e)if(e.isDirectory){var r=[u.emptyPromise()];if(d){var i={type:"directory"};i.name=i.path=(t||"")+e.name,p.push(i)}var o=e.createReader(),s=[],g=function(){o.readEntries(function(i){try{i.length?(s=s.concat(Array.prototype.slice.call(i||[],0)),g()):(angular.forEach(s.slice(0),function(n){p.length<=l&&h<=f&&r.push(a(n,(t?t:"")+e.name+"/"))}),c.all(r).then(function(){n.resolve()},function(e){n.reject(e)}))}catch(o){n.reject(o)}},function(e){n.reject(e)})};g()}else e.file(function(e){try{e.path=(t?t:"")+e.name,d&&(e=u.rename(e,e.path)),p.push(e),h+=e.size,n.resolve()}catch(r){n.reject(r)}},function(e){n.reject(e)});return n.promise}var l=u.getValidationAttr(r,e,"maxFiles");null==l&&(l=Number.MAX_VALUE);var f=u.getValidationAttr(r,e,"maxTotalSize");null==f&&(f=Number.MAX_VALUE);var d=$("ngfIncludeDir",e),p=[],h=0,g=[u.emptyPromise()];if(t&&t.length>0&&"file:"!==s.location.protocol)for(var v=0;v<t.length;v++){if(t[v].webkitGetAsEntry&&t[v].webkitGetAsEntry()&&t[v].webkitGetAsEntry().isDirectory){var m=t[v].webkitGetAsEntry();if(m.isDirectory&&!i)continue;null!=m&&g.push(a(m))}else{var b=t[v].getAsFile();null!=b&&(p.push(b),h+=b.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var y=0;y<n.length;y++){var w=n.item(y);if((w.type||w.size>0)&&(p.push(w),h+=w.size),p.length>l||h>f||!o&&p.length>0)break}var x=c.defer();return c.all(g).then(function(){if(o||d||!p.length)x.resolve(p);else{for(var e=0;p[e]&&"directory"===p[e].type;)e++;x.resolve([p[e]])}},function(e){x.reject(e)}),x.promise}var v=t(),$=function(e,t,n){return u.attrGetter(e,r,t,n)};if($("dropAvailable")&&a(function(){e[$("dropAvailable")]?e[$("dropAvailable")].value=v:e[$("dropAvailable")]=v}),!v)return void($("ngfHideOnDropNotAvailable",e)===!0&&n.css("display","none"));null==$("ngfSelect")&&u.registerModelChangeValidator(i,r,e);var m,b=null,y=o($("ngfStopPropagation")),w=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),y(e)&&t.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var i=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy"}a.cancel(b),m||(m="C",h(e,r,t,function(r){m=r,n.addClass(m),$("ngfDrag",e,{$isDragging:!0,$class:m,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),
|
9 |
-
y(e)&&t.stopPropagation(),b=a(function(){m&&n.removeClass(m),m=null,$("ngfDrag",e,{$isDragging:!1,$event:t})},w||100))},!1),n[0].addEventListener("drop",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){t.preventDefault(),y(e)&&t.stopPropagation(),m&&n.removeClass(m),m=null;var i,o=t.dataTransfer.items;try{i=t.dataTransfer&&t.dataTransfer.getData&&t.dataTransfer.getData("text/html")}catch(a){}g(o,t.dataTransfer.files,$("ngfAllowDir",e)!==!1,$("multiple")||$("ngfMultiple",e)).then(function(e){e.length?d(e,t):p("dropUrl",i).then(function(e){d(e,t)})})}},!1),n[0].addEventListener("paste",function(t){if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)){var n=[],i=t.clipboardData||t.originalEvent.clipboardData;if(i&&i.items)for(var o=0;o<i.items.length;o++)i.items[o].type.indexOf("image")!==-1&&n.push(i.items[o].getAsFile());n.length?d(n,t):p("pasteUrl",i).then(function(e){d(e,t)})}},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&(n.attr("contenteditable",!0),n.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}function t(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}r.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(t,n,r,i,o,a){return{restrict:"AEC",require:"?ngModel",link:function(s,u,l,c){e(s,u,l,c,t,n,r,i,o,a)}}}]),r.directive("ngfNoFileDrop",function(){return function(e,n){t()&&n.css("display","none")}}),r.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(e,n,r){return function(i,o,a){if(t()){var s=e(r.attrGetter("ngfDropAvailable",a));n(function(){s(i),s.assign&&s.assign(i,!0)})}}}])}(),r.service("UploadExif",["UploadResize","$q",function(e,t){function n(e,t,n,r){switch(t){case 2:return e.transform(-1,0,0,1,n,0);case 3:return e.transform(-1,0,0,-1,n,r);case 4:return e.transform(1,0,0,-1,0,r);case 5:return e.transform(0,1,1,0,0,0);case 6:return e.transform(0,1,-1,0,r,0);case 7:return e.transform(0,-1,-1,0,r,n);case 8:return e.transform(0,-1,1,0,0,n)}}function r(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}var i=e;return i.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&i.isResizeSupported()},i.readOrientation=function(e){var n=t.defer(),r=new FileReader,i=e.slice?e.slice(0,65536):e;return r.readAsArrayBuffer(i),r.onerror=function(e){return n.reject(e)},r.onload=function(e){var t={orientation:1},r=new DataView(this.result);if(65496!==r.getUint16(0,!1))return n.resolve(t);for(var i=r.byteLength,o=2;o<i;){var a=r.getUint16(o,!1);if(o+=2,65505===a){if(1165519206!==r.getUint32(o+=2,!1))return n.resolve(t);var s=18761===r.getUint16(o+=6,!1);o+=r.getUint32(o+4,s);var u=r.getUint16(o,s);o+=2;for(var l=0;l<u;l++)if(274===r.getUint16(o+12*l,s)){var c=r.getUint16(o+12*l+8,s);return c>=2&&c<=8&&(r.setUint16(o+12*l+8,1,s),t.fixedArrayBuffer=e.target.result),t.orientation=c,n.resolve(t)}}else{if(65280!==(65280&a))break;o+=r.getUint16(o,!1)}}return n.resolve(t)},n.promise},i.applyExifRotation=function(e){if(0!==e.type.indexOf("image/jpeg"))return i.emptyPromise(e);var o=t.defer();return i.readOrientation(e).then(function(t){return t.orientation<2||t.orientation>8?o.resolve(e):void i.dataUrl(e,!0).then(function(a){var s=document.createElement("canvas"),u=document.createElement("img");u.onload=function(){try{s.width=t.orientation>4?u.height:u.width,s.height=t.orientation>4?u.width:u.height;var a=s.getContext("2d");n(a,t.orientation,u.width,u.height),a.drawImage(u,0,0);var l=s.toDataURL(e.type||"image/WebP",.934);l=i.restoreExif(r(t.fixedArrayBuffer),l);var c=i.dataUrltoBlob(l,e.name);o.resolve(c)}catch(f){return o.reject(f)}},u.onerror=function(){o.reject()},u.src=a},function(e){o.reject(e)})},function(e){o.reject(e)}),o.promise},i.restoreExif=function(e,t){var n={};return n.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n.encode64=function(e){var t,n,r,i,o,a="",s="",u="",l=0;do t=e[l++],n=e[l++],s=e[l++],r=t>>2,i=(3&t)<<4|n>>4,o=(15&n)<<2|s>>6,u=63&s,isNaN(n)?o=u=64:isNaN(s)&&(u=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(u),t=n=s="",r=i=o=u="";while(l<e.length);return a},n.restore=function(e,t){e.match("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,",""));var n=this.decode64(e),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,"+this.encode64(i)},n.exifManipulation=function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)},n.getExifArray=function(e){for(var t,n=0;n<e.length;n++)if(t=e[n],255===t[0]&225===t[1])return t;return[]},n.insertExif=function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=s.concat(t),s=s.concat(a)},n.slice2Segments=function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var r=256*e[t+2]+e[t+3],i=t+r+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.length)break}return n},n.decode64=function(e){var t,n,r,i,o,a="",s="",u=0,l=[],c=/[^A-Za-z0-9\+\/\=]/g;c.exec(e)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do r=this.KEY_STR.indexOf(e.charAt(u++)),i=this.KEY_STR.indexOf(e.charAt(u++)),o=this.KEY_STR.indexOf(e.charAt(u++)),s=this.KEY_STR.indexOf(e.charAt(u++)),t=r<<2|i>>4,n=(15&i)<<4|o>>2,a=(3&o)<<6|s,l.push(t),64!==o&&l.push(n),64!==s&&l.push(a),t=n=a="",r=i=o=s="";while(u<e.length);return l},n.restore(e,t)},i}])},{}],
|
1 |
+
!function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./app.controller"),o=r(i),a={bindings:{settingsName:"@"},controller:o["default"],template:'<navbar id="settings-navbar"\n tabs="$ctrl.config.tabs"\n page="$ctrl.config.page"\n current-tab="$ctrl.config.currentTab">\n </navbar>\n <status i18n="$ctrl.config.i18n.status"></status>\n <select-editor\n ng-if="$ctrl.config.currentTab == \'select\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </select-editor>\n <visual-editor\n ng-if="$ctrl.config.currentTab == \'visual\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </visual-editor>\n <import-editor\n ng-if="$ctrl.config.currentTab == \'import\'"\n settings="$ctrl.config.settings"\n i18n="$ctrl.config.i18n.editor">\n </import-editor>\n '};n["default"]=a},{"./app.controller":2}],2:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){r(this,e),this.httpService=t,this.linkService=n,this.config={},this.settingsValue={}}return i(e,[{key:"$onInit",value:function(){this.config=window[this.settingsName],this.httpService.init(this.config.ajax),this.linkService.init(this.config.page)}}]),e}();o.$inject=["httpService","linkService"],n["default"]=o},{}],3:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("angular-sanitize"),s=r(a),u=e("ng-file-upload"),l=r(u),c=e("angular-drag-and-drop-lists"),f=(r(c),e("./app.component")),d=r(f),p=e("./components/components"),h=r(p),g=e("./common/components"),v=r(g),$=e("./services"),m=r($),b=o["default"].module("app",[s["default"],l["default"],h["default"],v["default"],m["default"]]).component("app",d["default"]).name;n["default"]=b},{"./app.component":1,"./common/components":5,"./components/components":15,"./services":35,angular:42,"angular-drag-and-drop-lists":38,"angular-sanitize":40,"ng-file-upload":44}],4:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.httpService=t}return i(e,[{key:"$onChanges",value:function(e){var t=this;e.settings&&(this.settings=Object.assign({},this.settings),this.values=Object.keys(this.settings).reduce(function(e,n){return e[n]=t.settings[n].value,e},{}))}},{key:"update",value:function(e){var t=e.key,n=e.value;this.values[t]=n}},{key:"updateValue",value:function(e,t){this.settings[e]=Object.assign({},this.settings[e],{value:t}),this.values[e]=t}},{key:"save",value:function(){var e=this;this.httpService.saveSettings(this.values).then(function(t){var n=t.status,r=t.model;"OK"===n.status&&(e.values=r)})}}]),e}();o.$inject=["httpService"],n["default"]=o},{}],5:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./select"),s=r(a),u=e("./visual"),l=r(u),c=e("./import"),f=r(c),d=o["default"].module("app.common",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./import":8,"./select":9,"./visual":12,angular:42}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./import.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:'\n <h2>{{ ::$ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label>{{ ::$ctrl.i18n.export_title }}</label></th>\n <td>\n <a href="{{ ::$ctrl.i18n.export_url }}" class="button button-default">\n {{ ::$ctrl.i18n.export_button_text }}\n </a>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.import_title }}</label></th>\n <td>\n <button class="button button-primary" type="file"\n ngf-accept="\'.json\'"\n ngf-select="$ctrl.uploadFiles($file, $invalidFiles)" ngf-max-size="1MB">\n {{ ::$ctrl.i18n.import_button_text }}\n </button>\n <div ng-if="$ctrl.upload_status === \'OK\' || $ctrl.upload_status === \'ERROR\'" class="notice"\n ng-class="{ \'error\': $ctrl.upload_status === \'ERROR\', \'updated\': $ctrl.upload_status === \'OK\' }">\n <p><strong ng-bind-html="$ctrl.upload_message"></strong></p>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n '};n["default"]=a},{"./import.controller":7}],7:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n,i){r(this,e),this.$timeout=t,this.httpService=i,this.Upload=n,this.upload_status="",this.upload_message=""}return i(e,[{key:"uploadFiles",value:function(e,t){this.f=e,this.errFile=t&&t[0],e&&this.httpService.uploadFile(this.i18n.import_action_name,e)}}]),e}();o.$inject=["$timeout","Upload","httpService"],n["default"]=o},{}],8:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./import.component"),s=r(a),u=o["default"].module("app.common.import",[]).component("importEditor",s["default"]).name;n["default"]=u},{"./import.component":6,angular:42}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./resolution.directive"),s=r(a),u=e("./select.component"),l=r(u),c=e("./../../components/components"),f=r(c),d=o["default"].module("app.common.select",[f["default"]]).directive("resolution",["$compile",function(e){return new s["default"](e)}]).component("selectEditor",l["default"]).name;n["default"]=d},{"./../../components/components":15,"./resolution.directive":10,"./select.component":11,angular:42}],10:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$compile=t,this.restrict="E",this.scope={height:"=",width:"=",template:"=",update:"&"}}return i(e,[{key:"link",value:function(e,t,n){var r=e.template,i=r.replace("%height%",'<editor-number args="height" on-update="update({ $event })"></editor-number>').replace("%width%",'<editor-number args="width" on-update="update({ $event })"></editor-number>');t.html(i),this.$compile(t.contents())(e)}}]),e}();n["default"]=o},{}],11:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./../base.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="image_selector">{{ ::$ctrl.settings.image_selector.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.image_selector" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.image_selector.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="disabled_classes">{{ ::$ctrl.settings.disabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.disabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.disabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="enabled_classes">{{ ::$ctrl.settings.enabled_classes.label }}</label></th>\n <td>\n <editor-text args="$ctrl.settings.enabled_classes" on-update="$ctrl.update($event)"></editor-text>\n <p class="description" ng-bind-html="$ctrl.settings.enabled_classes.desc"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.image_resolution_label }}</th>\n <td>\n <p>\n <resolution height="$ctrl.settings.min_image_height_small" width="$ctrl.settings.min_image_width_small"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template_small">\n </resolution>\n </p>\n <p>\n <resolution height="$ctrl.settings.min_image_height" width="$ctrl.settings.min_image_width"\n update="$ctrl.update($event)" template="$ctrl.i18n.min_resolution_template">\n </resolution>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc"></p>\n <p class="description" ng-bind-html="$ctrl.i18n.image_resolution_desc_2"></p>\n </td>\n </tr>\n <tr>\n <th>{{ ::$ctrl.i18n.show_on_field_label }}</th>\n <td>\n <p>\n <label for="show_on">{{ ::$ctrl.settings.show_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.show_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="disable_on">{{ ::$ctrl.settings.disable_on.label }}:</label><br/>\n <editor-textarea args="$ctrl.settings.disable_on" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.show_on_field_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </buton>\n '};n["default"]=a},{"./../base.controller":4}],12:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./visual.component"),s=r(a),u=e("./../../components/components"),l=r(u),c=o["default"].module("app.common.visual",[l["default"]]).component("visualEditor",s["default"]).name;n["default"]=c},{"./../../components/components":15,"./visual.component":13,angular:42}],13:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./visual.controller"),o=r(i),a={bindings:{settings:"<",i18n:"<"},controller:o["default"],template:'\n <h2>{{ $ctrl.i18n.title }}</h2>\n <table class="form-table">\n <tbody>\n <tr>\n <th><label for="show_button">{{ ::$ctrl.settings.show_button.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.show_button" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.show_button.desc"></p>\n <!-- @ifdef JPIBFI_LITE -->\n <p ng-if="$ctrl.showButtonError">\n <b ng-bind-html="$ctrl.i18n.pro_feature_error"></b>\n </p>\n <!-- @endif -->\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.settings.description_option.label }}</label></th>\n <td>\n <editor-sortable-select args="$ctrl.settings.description_option" on-update="$ctrl.update($event)"></editor-sortable-select>\n <p class="description" ng-bind-html="$ctrl.settings.description_option.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="pinLinkedImages">{{ ::$ctrl.settings.pinLinkedImages.label }}</label></th>\n <td>\n <editor-checkbox args="$ctrl.settings.pinLinkedImages" on-update="$ctrl.update($event)"></editor-checkbox>\n <p class="description" ng-bind-html="$ctrl.settings.pinLinkedImages.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label for="transparency_value">{{ ::$ctrl.settings.transparency_value.label }}</label></th>\n <td>\n <editor-number args="$ctrl.settings.transparency_value" on-update="$ctrl.update($event)"></editor-number>\n <p class="description" ng-bind-html="$ctrl.settings.transparency_value.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.custom_button_label }}</label></th>\n <td>\n <p><editor-checkbox args="$ctrl.settings.use_custom_image" on-update="$ctrl.update($event)"></editor-checkbox></p>\n <p><button class="button button-default" ng-click="$ctrl.upload()">{{ ::$ctrl.i18n.custom_button_upload }}</button></p>\n <p>\n <label for="custom_image_url">{{ ::$ctrl.settings.custom_image_url.label }}</label>\n <editor-text args="$ctrl.settings.custom_image_url" on-update="$ctrl.update($event)"></editor-text>\n </p>\n <p>\n <label for="custom_image_height">{{ ::$ctrl.settings.custom_image_height.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_height" on-update="$ctrl.update($event)"></editor-number>\n </p>\n <p>\n <label for="custom_image_width">{{ ::$ctrl.settings.custom_image_width.label }}</label>\n <editor-number args="$ctrl.settings.custom_image_width" on-update="$ctrl.update($event)"></editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.custom_button_desc"></p>\n <div ng-if="$ctrl.values.custom_image_url">\n <div style="width: {{ $ctrl.values.custom_image_width }}px;\n height: {{ $ctrl.values.custom_image_height }}px;\n background-image: url(\'{{ $ctrl.values.custom_image_url }}\');">\n </div>\n </div>\n </td>\n </tr>\n <tr>\n <th><label for="button_position">{{ ::$ctrl.settings.button_position.label }}</label></th>\n <td>\n <editor-select args="$ctrl.settings.button_position" on-update="$ctrl.update($event)"></editor-select>\n <p class="description" ng-bind-html="$ctrl.settings.button_position.desc"></p>\n </td>\n </tr>\n <tr>\n <th><label>{{ ::$ctrl.i18n.margins_label }}</label></th>\n <td>\n <p>\n <label for="button_margin_top">{{ ::$ctrl.settings.button_margin_top.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.top" args="$ctrl.settings.button_margin_top" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_bottom">{{ ::$ctrl.settings.button_margin_bottom.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.bottom" args="$ctrl.settings.button_margin_bottom" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_left">{{ ::$ctrl.settings.button_margin_left.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.left" args="$ctrl.settings.button_margin_left" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p>\n <label for="button_margin_right">{{ ::$ctrl.settings.button_margin_right.label }}</label>\n <editor-number ng-disabled="!$ctrl.marginAvailability.right" args="$ctrl.settings.button_margin_right" on-update="$ctrl.update($event)">\n </editor-number>\n </p>\n <p class="description" ng-bind-html="$ctrl.i18n.margins_desc"></p>\n </td>\n </tr>\n </tbody>\n </table>\n <button class="button button-primary" ng-click="$ctrl.save()">\n {{ ::$ctrl.i18n.submit }}\n </buton>\n '};n["default"]=a},{"./visual.controller":14}],14:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./../base.controller"),c=r(l),f=function(e){function t(e,n){i(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n));return r.$scope=e,r.fileFrame=null,r}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),this.updateMarginAvailability()}},{key:"update",value:function(e){var t=e.key,n=e.value;return"show_button"===t?(this.showButtonError=!0,void this.updateValue("show_button","hover")):(this.values[t]=n,void("button_position"===t&&this.updateMarginAvailability()))}},{key:"updateMarginAvailability",value:function(){var e=this.values.button_position;this.marginAvailability={top:"top-left"===e||"top-right"===e,bottom:"bottom-left"===e||"bottom-right"===e,left:"top-left"===e||"bottom-left"===e,right:"top-right"===e||"bottom-right"===e}}},{key:"upload",value:function(){var e=this;return this.fileFrame?void this.fileFrame.open():(this.fileFrame=wp.media.frames.file_frame=wp.media({title:this.i18n.custom_button_frame_title,button:{text:this.i18n.custom_button_frame_button_text},multiple:!1}).on("select",function(){var t=e.fileFrame.state().get("selection").first().toJSON();e.updateValue("custom_image_url",t.url),e.updateValue("custom_image_width",t.width),e.updateValue("custom_image_height",t.height),e.$scope.$digest()}),void this.fileFrame.open())}}]),t}(c["default"]);f.$inject=["$scope","httpService"],n["default"]=f},{"./../base.controller":4}],15:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar"),s=r(a),u=e("./editors"),l=r(u),c=e("./status"),f=r(c),d=o["default"].module("app.components",[s["default"],l["default"],f["default"]]).name;n["default"]=d},{"./editors":28,"./navbar":29,"./status":31,angular:42}],16:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<input type="checkbox" ng-change="$ctrl.change()" id="{{ $ctrl.key }}" ng-model="$ctrl.value">\n <label for=" {{ $ctrl.key }}">{{ ::$ctrl.args.text }}</label><br/>'};n["default"]=a},{"./editor.controller":19}],17:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.checkboxes.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<p ng-repeat="(key, label) in $ctrl.args.options">\n <input type="checkbox" id="{{:: $ctrl.key + \'_\' + key }}" ng-change="$ctrl.change()" ng-model="$ctrl.values[key]" />\n <label for="{{ $ctrl.key + \'_\' + key }}">{{ ::label }}</label>\n </p>'};n["default"]=a},{"./editor.checkboxes.controller":18}],18:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e),this.key=this.args.key;var t=this.args.value||[];this.values=Object.keys(this.args.options).reduce(function(e,n){return e[n]=t.indexOf(n)!==-1,e},{})}return i(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=Object.assign({},this.args))}},{key:"change",value:function(e){var t=this;return this.onUpdate({$event:{key:this.key,value:Object.keys(this.args.options).reduce(function(e,n){return t.values[n]?e.concat([n]):e},[])}}),e}}]),e}();o.$inject=[],n["default"]=o},{}],19:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,[{key:"$onChanges",value:function(e){e.args&&(this.args=Object.assign({},this.args),this.key=this.args.key,this.value=this.args.value)}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.value}})}}]),e}();o.$inject=[],n["default"]=o},{}],20:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",ngDisabled:"<",onUpdate:"&"},controller:o["default"],template:'\n <input id="{{ $ctrl.key }}" ng-disabled="$ctrl.ngDisabled" number-attributes="$ctrl.args" class="small-text" type="number" ng-model="$ctrl.value" ng-change="$ctrl.change()" /> \n <span>{{ ::$ctrl.args.unit }}</span>'};n["default"]=a},{"./editor.controller":19}],21:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t){r(this,e),this.$parse=t,this.restrict="A"}return i(e,[{key:"link",value:function(e,t,n){var r=this.$parse(n.numberAttributes)(e),i=["step","min","max"];i.forEach(function(e){void 0!==r[e]&&t.attr(e,r[e])})}}]),e}();n["default"]=o},{}],22:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.select.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <select ng-model="$ctrl.value" ng-change="$ctrl.change()">\n <option ng-repeat="(value, name) in $ctrl.args.options" value="{{ value }}">{{ name }}</option>\n </select>'};n["default"]=a},{"./editor.select.controller":23}],23:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=function d(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:d(i,t,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},l=e("./editor.controller"),c=r(l),f=function(e){function t(){return i(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return a(t,e),s(t,[{key:"$onChanges",value:function(e){u(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"$onChanges",this).call(this,e),e.args&&(void 0!==this.args.value&&null!==this.args.value||(this.value=Object.keys(this.args.options)[0],this.change()),this.args.truthy&&(this.value=this.value?"1":"0"))}},{key:"change",value:function(){this.onUpdate({$event:{key:this.key,value:this.args.truthy?"1"===this.value:this.value}})}}]),t}(c["default"]);f.$inject=[],n["default"]=f},{"./editor.controller":19}],24:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.sortableSelect.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'\n <ul class="frizzly-sortable" dnd-list="$ctrl.options">\n <li ng-repeat="item in $ctrl.options"\n dnd-draggable="item"\n dnd-moved="$ctrl.options.splice($index, 1); $ctrl.change()"\n dnd-effect-allowed="move">\n <input type="checkbox" id="{{ item.key }}" ng-model="item.selected" ng-change="$ctrl.change()" />\n <label for="{{ item.key }}">{{ item.label }}\n </li>\n </ul>\n '};n["default"]=a},{"./editor.sortableSelect.controller":25}],25:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(){r(this,e)}return i(e,[{key:"$onChanges",value:function(e){var t=this;if(e.args){this.args=Object.assign({},this.args),this.key=this.args.key,this.value=this.args.value||[];var n=this.value.slice().concat(Object.keys(this.args.options).filter(function(e){return t.value.indexOf(e)===-1}));this.options=n.map(function(e){return{key:e,label:t.args.options[e],selected:t.value.indexOf(e)!==-1}})}}},{key:"change",value:function(){var e=this.options.reduce(function(e,t){return t.selected?e.concat([t.key]):e},[]);this.onUpdate({$event:{key:this.key,value:e}})}}]),e}();o.$inject=[],n["default"]=o},{}],26:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<input type="text" id="{{ $ctrl.key }}" ng-model="$ctrl.value" ng-change="$ctrl.change()" class="regular-text" />'};n["default"]=a},{"./editor.controller":19}],27:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./editor.controller"),o=r(i),a={bindings:{args:"<",onUpdate:"&"},controller:o["default"],template:'<textarea rows="3" cols="50" id="{{ $ctrl.key }}" class="large-text code" ng-model="$ctrl.value" ng-change="$ctrl.change()"></textarea>'};n["default"]=a},{"./editor.controller":19}],28:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./editor.text.component"),s=r(a),u=e("./editor.textarea.component"),l=r(u),c=e("./editor.number.component"),f=r(c),d=e("./editor.number.directive"),p=r(d),h=e("./editor.checkbox.component"),g=r(h),v=e("./editor.checkboxes.component"),$=r(v),m=e("./editor.select.component"),b=r(m),y=e("./editor.sortableSelect.component"),w=r(y),x=o["default"].module("editors",["dndLists"]).component("editorText",s["default"]).component("editorTextarea",l["default"]).component("editorNumber",f["default"]).component("editorCheckbox",g["default"]).component("editorCheckboxes",$["default"]).component("editorSelect",b["default"]).component("editorSortableSelect",w["default"]).directive("numberAttributes",["$parse",function(e){return new p["default"](e)}]).name;n["default"]=x},{"./editor.checkbox.component":16,"./editor.checkboxes.component":17,"./editor.number.component":20,"./editor.number.directive":21,"./editor.select.component":22,
|
2 |
+
"./editor.sortableSelect.component":24,"./editor.text.component":26,"./editor.textarea.component":27,angular:42}],29:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./navbar.component"),s=r(a),u=o["default"].module("navbar",[]).component("navbar",s["default"]).name;n["default"]=u},{"./navbar.component":30,angular:42}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r={bindings:{currentTab:"<",tabs:"<",page:"<"},controller:function(){},template:'\n <h2 class="nav-tab-wrapper">\n <a ng-repeat="tab in $ctrl.tabs" \n href="?page={{ $ctrl.page }}&tab={{ tab.slug }}" class="nav-tab {{ $ctrl.currentTab == tab.slug ? \'nav-tab-active\' : \'\' }}">\n {{ tab.name }}\n </a>\n </h2>\n '};n["default"]=r},{}],31:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./status.component"),s=r(a),u=o["default"].module("status",[]).component("status",s["default"]).name;n["default"]=u},{"./status.component":32,angular:42}],32:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("./status.controller"),o=r(i),a={bindings:{i18n:"<"},controller:o["default"],template:"\n <div class=\"notice notice-success\" ng-if=\"$ctrl.status.status != ''\" ng-class=\"{ \n 'notice-success': $ctrl.status.status === 'OK',\n 'notice-info' : $ctrl.status.status === 'PENDING',\n 'notice-error': $ctrl.status.status === 'ERROR'\n }\">\n <p ng-repeat=\"(key, text) in $ctrl.status.messages\"><strong>{{ text }}</strong></p>\n </div>\n "};n["default"]=a},{"./status.controller":33}],33:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=function(){function e(t,n){var i=this;r(this,e),this.$anchorScroll=t,this.status={status:""},n.onRequest(function(){return i.onRequestHandler()}),n.onResponse(function(e){var t=e.status;return i.onResponseHandler(t)})}return i(e,[{key:"onResponseHandler",value:function(e){this.status=e}},{key:"onRequestHandler",value:function(){this.$anchorScroll(),this.status.status="PENDING",this.status.messages={pending:this.i18n.pending}}}]),e}();o.$inject=["$anchorScroll","httpService"],n["default"]=o},{}],34:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=e("angular"),s=r(a),u=function(){function e(t,n,r){i(this,e),this.$http=t,this.$timeout=n,this.Upload=r,this.responseObservers=[],this.requestObservers=[]}return o(e,[{key:"init",value:function(e){this.url=e.url,this.saveSettingsParams={action:e.saveSettingsAction,nonce:e.saveSettingsNonce,tab:e.tab},this.customActionParams={action:e.customAction,nonce:e.customActionNonce}}},{key:"onRequest",value:function(e){this.requestObservers.push(e)}},{key:"onResponse",value:function(e){this.responseObservers.push(e)}},{key:"saveSettings",value:function(e){var t=s["default"].extend({},this.saveSettingsParams,{settings:e});return this.processRequest(t)}},{key:"customAction",value:function(e,t){var n=s["default"].extend({},this.customActionParams,{name:e,settings:t});return this.processRequest(n)}},{key:"uploadFile",value:function(e,t){var n=this,r=s["default"].extend({},this.customActionParams,{name:e,"import":t}),i=this.Upload.upload({url:this.url,data:r});this.requestObservers.forEach(function(e){e()}),i.then(function(e){var t=e.data;n.$timeout(function(){n.responseObservers.forEach(function(e){e(t)})})},function(e){e.status>0&&(n.errorMsg=e.status+": "+e.data)})}},{key:"processRequest",value:function(e){var t=this,n={method:"POST",url:this.url,params:e};return this.requestObservers.forEach(function(e){e()}),this.$http(n).then(function(e){var n=e.data;return t.responseObservers.forEach(function(e){e(n)}),n})}}]),e}();u.$inject=["$http","$timeout","Upload"],n["default"]=u},{angular:42}],35:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(n,"__esModule",{value:!0});var i=e("angular"),o=r(i),a=e("./http.service"),s=r(a),u=e("./link.service"),l=r(u),c=o["default"].module("services",[]).service("httpService",s["default"]).service("linkService",l["default"]).name;n["default"]=c},{"./http.service":34,"./link.service":36,angular:42}],36:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(u){i=!0,o=u}finally{try{!r&&s["return"]&&s["return"]()}finally{if(i)throw o}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=function(){function e(){r(this,e),this.baseLink=""}return o(e,[{key:"init",value:function(e){this.baseLink="?page="+e}},{key:"generateQuery",value:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(e,t){var n=i(t,2),r=n[0],o=n[1];return e+"&"+r+"="+o},this.baseLink)}}]),e}();a.$inject=[],n["default"]=a},{}],37:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}var i=e("./app/app");r(i);!function(e){e(document).ready(function(){})}(jQuery)},{"./app/app":3}],38:[function(e,t,n){angular.module("dndLists",[]).directive("dndDraggable",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){o.attr("draggable","true"),a.dndDisableIf&&i.$watch(a.dndDisableIf,function(e){o.attr("draggable",!e)}),o.on("dragstart",function(s){return s=s.originalEvent||s,"false"==o.attr("draggable")||(s.dataTransfer.setData("Text",angular.toJson(i.$eval(a.dndDraggable))),s.dataTransfer.effectAllowed=a.dndEffectAllowed||"move",o.addClass("dndDragging"),t(function(){o.addClass("dndDraggingSource")},0),n.dropEffect="none",r.isDragging=!0,r.dragType=a.dndType?i.$eval(a.dndType):void 0,s._dndHandle&&s.dataTransfer.setDragImage&&s.dataTransfer.setDragImage(o[0],0,0),e(a.dndDragstart)(i,{event:s}),void s.stopPropagation())}),o.on("dragend",function(s){s=s.originalEvent||s;var u=n.dropEffect;i.$apply(function(){switch(u){case"move":e(a.dndMoved)(i,{event:s});break;case"copy":e(a.dndCopied)(i,{event:s});break;case"none":e(a.dndCanceled)(i,{event:s})}e(a.dndDragend)(i,{event:s,dropEffect:u})}),o.removeClass("dndDragging"),t(function(){o.removeClass("dndDraggingSource")},0),r.isDragging=!1,s.stopPropagation()}),o.on("click",function(t){a.dndSelected&&(t=t.originalEvent||t,i.$apply(function(){e(a.dndSelected)(i,{event:t})}),t.stopPropagation())}),o.on("selectstart",function(){this.dragDrop&&this.dragDrop()})}}]).directive("dndList",["$parse","$timeout","dndDropEffectWorkaround","dndDragTypeWorkaround",function(e,t,n,r){return function(i,o,a){function s(e,t,n){var r=$?e.offsetX||e.layerX:e.offsetY||e.layerY,i=$?t.offsetWidth:t.offsetHeight,o=$?t.offsetLeft:t.offsetTop;return o=n?o:0,r<o+i/2}function u(){var e;return angular.forEach(o.children(),function(t){var n=angular.element(t);n.hasClass("dndPlaceholder")&&(e=n)}),e||angular.element("<li class='dndPlaceholder'></li>")}function l(){return Array.prototype.indexOf.call(v.children,g)}function c(e){if(!r.isDragging&&!m)return!1;if(!p(e.dataTransfer.types))return!1;if(a.dndAllowedTypes&&r.isDragging){var t=i.$eval(a.dndAllowedTypes);if(angular.isArray(t)&&t.indexOf(r.dragType)===-1)return!1}return!a.dndDisableIf||!i.$eval(a.dndDisableIf)}function f(){return h.remove(),o.removeClass("dndDragover"),!0}function d(t,n,o,a){return e(t)(i,{event:n,index:o,item:a||void 0,external:!r.isDragging,type:r.isDragging?r.dragType:void 0})}function p(e){if(!e)return!0;for(var t=0;t<e.length;t++)if("Text"===e[t]||"text/plain"===e[t])return!0;return!1}var h=u(),g=h[0],v=o[0];h.remove();var $=a.dndHorizontalList&&i.$eval(a.dndHorizontalList),m=a.dndExternalSources&&i.$eval(a.dndExternalSources);o.on("dragenter",function(e){return e=e.originalEvent||e,!c(e)||void e.preventDefault()}),o.on("dragover",function(e){if(e=e.originalEvent||e,!c(e))return!0;if(g.parentNode!=v&&o.append(h),e.target!==v){for(var t=e.target;t.parentNode!==v&&t.parentNode;)t=t.parentNode;t.parentNode===v&&t!==g&&(s(e,t)?v.insertBefore(g,t):v.insertBefore(g,t.nextSibling))}else if(s(e,g,!0))for(;g.previousElementSibling&&(s(e,g.previousElementSibling,!0)||0===g.previousElementSibling.offsetHeight);)v.insertBefore(g,g.previousElementSibling);else for(;g.nextElementSibling&&!s(e,g.nextElementSibling,!0);)v.insertBefore(g,g.nextElementSibling.nextElementSibling);return a.dndDragover&&!d(a.dndDragover,e,l())?f():(o.addClass("dndDragover"),e.preventDefault(),e.stopPropagation(),!1)}),o.on("drop",function(e){if(e=e.originalEvent||e,!c(e))return!0;e.preventDefault();var t,r=e.dataTransfer.getData("Text")||e.dataTransfer.getData("text/plain");try{t=JSON.parse(r)}catch(o){return f()}var s=l();return a.dndDrop&&(t=d(a.dndDrop,e,s,t),!t)?f():(t!==!0&&i.$apply(function(){i.$eval(a.dndList).splice(s,0,t)}),d(a.dndInserted,e,s,t),"none"===e.dataTransfer.dropEffect?"copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?n.dropEffect=e.dataTransfer.effectAllowed:n.dropEffect=e.ctrlKey?"copy":"move":n.dropEffect=e.dataTransfer.dropEffect,f(),e.stopPropagation(),!1)}),o.on("dragleave",function(e){e=e.originalEvent||e,o.removeClass("dndDragover"),t(function(){o.hasClass("dndDragover")||h.remove()},100)})}}]).directive("dndNodrag",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart",function(e){e=e.originalEvent||e,e._dndHandle||(e.dataTransfer.types&&e.dataTransfer.types.length||e.preventDefault(),e.stopPropagation())}),t.on("dragend",function(e){e=e.originalEvent||e,e._dndHandle||e.stopPropagation()})}}).directive("dndHandle",function(){return function(e,t,n){t.attr("draggable","true"),t.on("dragstart dragend",function(e){e=e.originalEvent||e,e._dndHandle=!0})}}).factory("dndDragTypeWorkaround",function(){return{}}).factory("dndDropEffectWorkaround",function(){return{}})},{}],39:[function(e,t,n){!function(e,t){"use strict";function n(){function n(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?u(i[n]):i[n]]=!0;return r}function r(t,n){null===t||void 0===t?t="":"string"!=typeof t&&(t=""+t),m.innerHTML=t;var r=5;do{if(0===r)throw d("uinput","Failed to sanitize html because the input is unstable");r--,e.document.documentMode&&v(m),t=m.innerHTML,m.innerHTML=t}while(t!==m.innerHTML);for(var i=m.firstChild;i;){switch(i.nodeType){case 1:n.start(i.nodeName.toLowerCase(),p(i.attributes));break;case 3:n.chars(i.textContent)}var o;if(!(o=i.firstChild)&&(1==i.nodeType&&n.end(i.nodeName.toLowerCase()),o=i.nextSibling,!o))for(;null==o&&(i=i.parentNode,i!==m);)o=i.nextSibling,1==i.nodeType&&n.end(i.nodeName.toLowerCase());i=o}for(;i=m.firstChild;)m.removeChild(i)}function p(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function h(e){return e.replace(/&/g,"&").replace(b,function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+(1024*(t-55296)+(n-56320)+65536)+";"}).replace(y,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"<").replace(/>/g,">")}function g(e,t){var n=!1,r=i(e,e.push);return{start:function(e,i){e=u(e),!n&&A[e]&&(n=e),n||O[e]!==!0||(r("<"),r(e),a(i,function(n,i){var o=u(i),a="img"===e&&"src"===o||"background"===o;T[o]!==!0||M[o]===!0&&!t(n,a)||(r(" "),r(i),r('="'),r(h(n)),r('"'))}),r(">"))},end:function(e){e=u(e),n||O[e]!==!0||w[e]===!0||(r("</"),r(e),r(">")),e==n&&(n=!1)},chars:function(e){n||r(h(e))}}}function v(t){if(t.nodeType===e.Node.ELEMENT_NODE)for(var n=t.attributes,r=0,i=n.length;r<i;r++){var o=n[r],a=o.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(t.removeAttributeNode(o),r--,i--)}var s=t.firstChild;s&&v(s),s=t.nextSibling,s&&v(s)}var $=!1;this.$get=["$$sanitizeUri",function(e){return $&&o(O,C),function(t){var n=[];return c(t,f(n,function(t,n){return!/^unsafe:/.test(e(t,n))})),n.join("")}}],this.enableSvg=function(e){return s(e)?($=e,this):$},i=t.bind,o=t.extend,a=t.forEach,s=t.isDefined,u=t.lowercase,l=t.noop,c=r,f=g;var m,b=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=/([^\#-~ |!])/g,w=n("area,br,col,hr,img,wbr"),x=n("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),_=n("rp,rt"),S=o({},_,x),k=o({},x,n("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),E=o({},_,n("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),C=n("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),A=n("script,style"),O=o({},w,k,E,S),M=n("background,cite,href,longdesc,src,xlink:href"),j=n("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),P=n("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),T=o({},M,P,j);!function(e){var t;if(!e.document||!e.document.implementation)throw d("noinert","Can't create an inert html document");t=e.document.implementation.createHTMLDocument("inert");var n=t.documentElement||t.getDocumentElement(),r=n.getElementsByTagName("body");if(1===r.length)m=r[0];else{var i=t.createElement("html");m=t.createElement("body"),i.appendChild(m),t.appendChild(i)}}(e)}function r(e){var t=[],n=f(t,l);return n.chars(e),t.join("")}var i,o,a,s,u,l,c,f,d=t.$$minErr("$sanitize");t.module("ngSanitize",[]).provider("$sanitize",n),t.module("ngSanitize").filter("linky",["$sanitize",function(e){var n=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,i=/^mailto:/i,o=t.$$minErr("linky"),a=t.isDefined,s=t.isFunction,u=t.isObject,l=t.isString;return function(t,c,f){function d(e){e&&b.push(r(e))}function p(e,t){var n,r=$(e);b.push("<a ");for(n in r)b.push(n+'="'+r[n]+'" ');!a(c)||"target"in r||b.push('target="',c,'" '),b.push('href="',e.replace(/"/g,"""),'">'),d(t),b.push("</a>")}if(null==t||""===t)return t;if(!l(t))throw o("notstring","Expected string but received: {0}",t);for(var h,g,v,$=s(f)?f:u(f)?function(){return f}:function(){return{}},m=t,b=[];h=m.match(n);)g=h[0],h[2]||h[4]||(g=(h[3]?"http://":"mailto:")+g),v=h.index,d(m.substr(0,v)),p(g,h[0].replace(i,"")),m=m.substring(v+h[0].length);return d(m),e(b.join(""))}}])}(window,window.angular)},{}],40:[function(e,t,n){e("./angular-sanitize"),t.exports="ngSanitize"},{"./angular-sanitize":39}],41:[function(e,t,n){!function(e){"use strict";function t(e,t){return t=t||Error,function(){var n,r,i=2,o=arguments,a=o[0],s="["+(e?e+":":"")+a+"] ",u=o[1];for(s+=u.replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1),n=t+i;return n<o.length?me(o[n]):e}),s+="\nhttp://errors.angularjs.org/1.5.8/"+(e?e+"/":"")+a,r=i,n="?";r<o.length;r++,n="&")s+=n+"p"+(r-i)+"="+encodeURIComponent(me(o[r]));return new t(s)}}function n(e){if(null==e||E(e))return!1;if(Kr(e)||w(e)||Rr&&e instanceof Rr)return!0;var t="length"in Object(e)&&e.length;return x(t)&&(t>=0&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function r(e,t,i){var o,a;if(e)if(S(e))for(o in e)"prototype"==o||"length"==o||"name"==o||e.hasOwnProperty&&!e.hasOwnProperty(o)||t.call(i,e[o],o,e);else if(Kr(e)||n(e)){var s="object"!=typeof e;for(o=0,a=e.length;o<a;o++)(s||o in e)&&t.call(i,e[o],o,e)}else if(e.forEach&&e.forEach!==r)e.forEach(t,i,e);else if(y(e))for(o in e)t.call(i,e[o],o,e);else if("function"==typeof e.hasOwnProperty)for(o in e)e.hasOwnProperty(o)&&t.call(i,e[o],o,e);else for(o in e)Pr.call(e,o)&&t.call(i,e[o],o,e);return e}function i(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function o(e){return function(t,n){e(n,t)}}function a(){return++Xr}function s(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function u(e,t,n){for(var r=e.$$hashKey,i=0,o=t.length;i<o;++i){var a=t[i];if(b(a)||S(a))for(var l=Object.keys(a),c=0,f=l.length;c<f;c++){var d=l[c],p=a[d];n&&b(p)?_(p)?e[d]=new Date(p.valueOf()):k(p)?e[d]=new RegExp(p):p.nodeName?e[d]=p.cloneNode(!0):F(p)?e[d]=p.clone():(b(e[d])||(e[d]=Kr(p)?[]:{}),u(e[d],[p],!0)):e[d]=p}}return s(e,r),e}function l(e){return u(e,zr.call(arguments,1),!1)}function c(e){return u(e,zr.call(arguments,1),!0)}function f(e){return parseInt(e,10)}function d(e,t){return l(Object.create(e),t)}function p(){}function h(e){return e}function g(e){return function(){return e}}function v(e){return S(e.toString)&&e.toString!==Hr}function $(e){return"undefined"==typeof e}function m(e){return"undefined"!=typeof e}function b(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!Br(e)}function w(e){return"string"==typeof e}function x(e){return"number"==typeof e}function _(e){return"[object Date]"===Hr.call(e)}function S(e){return"function"==typeof e}function k(e){return"[object RegExp]"===Hr.call(e)}function E(e){return e&&e.window===e}function C(e){return e&&e.$evalAsync&&e.$watch}function A(e){return"[object File]"===Hr.call(e)}function O(e){return"[object FormData]"===Hr.call(e)}function M(e){return"[object Blob]"===Hr.call(e)}function j(e){return"boolean"==typeof e}function P(e){return e&&S(e.then)}function T(e){return e&&x(e.length)&&Yr.test(Hr.call(e))}function D(e){return"[object ArrayBuffer]"===Hr.call(e)}function F(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function N(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}function I(e){return Tr(e.nodeName||e[0]&&e[0].nodeName)}function R(e,t){var n=e.indexOf(t);return n>=0&&e.splice(n,1),n}function U(e,t){function n(e,t){var n,r=t.$$hashKey;if(Kr(e))for(var o=0,a=e.length;o<a;o++)t.push(i(e[o]));else if(y(e))for(n in e)t[n]=i(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=i(e[n]));else for(n in e)Pr.call(e,n)&&(t[n]=i(e[n]));return s(t,r),t}function i(e){if(!b(e))return e;var t=a.indexOf(e);if(t!==-1)return u[t];if(E(e)||C(e))throw Wr("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var r=!1,i=o(e);return void 0===i&&(i=Kr(e)?[]:Object.create(Br(e)),r=!0),a.push(e),u.push(i),r?n(e,i):i}function o(e){switch(Hr.call(e)){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 e.constructor(i(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(!e.slice){var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t}return e.slice(0);case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^\/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(S(e.cloneNode))return e.cloneNode(!0)}var a=[],u=[];if(t){if(T(t)||D(t))throw Wr("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===t)throw Wr("cpi","Can't copy! Source and destination are identical.");return Kr(t)?t.length=0:r(t,function(e,n){"$$hashKey"!==n&&delete t[n]}),a.push(e),u.push(t),n(e,t)}return i(e)}function V(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!==e&&t!==t)return!0;var n,r,i,o=typeof e,a=typeof t;if(o==a&&"object"==o){if(!Kr(e)){if(_(e))return!!_(t)&&V(e.getTime(),t.getTime());if(k(e))return!!k(t)&&e.toString()==t.toString();if(C(e)||C(t)||E(e)||E(t)||Kr(t)||_(t)||k(t))return!1;i=he();for(r in e)if("$"!==r.charAt(0)&&!S(e[r])){if(!V(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&m(t[r])&&!S(t[r]))return!1;return!0}if(!Kr(t))return!1;if((n=e.length)==t.length){for(r=0;r<n;r++)if(!V(e[r],t[r]))return!1;return!0}}return!1}function z(e,t,n){return e.concat(zr.call(t,n))}function L(e,t){return zr.call(e,t||0)}function q(e,t){var n=arguments.length>2?L(arguments,2):[];return!S(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,z(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function H(t,n){var r=n;return"string"==typeof t&&"$"===t.charAt(0)&&"$"===t.charAt(1)?r=void 0:E(n)?r="$WINDOW":n&&e.document===n?r="$DOCUMENT":C(n)&&(r="$SCOPE"),r}function B(e,t){if(!$(e))return x(t)||(t=t?2:null),JSON.stringify(e,H,t)}function W(e){return w(e)?JSON.parse(e):e}function G(e,t){e=e.replace(ti,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function X(e,t){return e=new Date(e.getTime()),e.setMinutes(e.getMinutes()+t),e}function K(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset(),i=G(t,r);return X(e,n*(i-r))}function Y(e){e=Rr(e).clone();try{e.empty()}catch(t){}var n=Rr("<div>").append(e).html();try{return e[0].nodeType===si?Tr(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tr(t)})}catch(t){return Tr(n)}}function Z(e){try{return decodeURIComponent(e)}catch(t){}}function J(e){var t={};return r((e||"").split("&"),function(e){var n,r,i;e&&(r=e=e.replace(/\+/g,"%20"),n=e.indexOf("="),n!==-1&&(r=e.substring(0,n),i=e.substring(n+1)),r=Z(r),m(r)&&(i=!m(i)||Z(i),Pr.call(t,r)?Kr(t[r])?t[r].push(i):t[r]=[t[r],i]:t[r]=i))}),t}function Q(e){var t=[];return r(e,function(e,n){Kr(e)?r(e,function(e){t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}):t.push(te(n,!0)+(e===!0?"":"="+te(e,!0)))}),t.length?t.join("&"):""}function ee(e){return te(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function te(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}function ne(e,t){var n,r,i=ni.length;for(r=0;r<i;++r)if(n=ni[r]+t,w(n=e.getAttribute(n)))return n;return null}function re(e,t){var n,i,o={};r(ni,function(t){var r=t+"app";!n&&e.hasAttribute&&e.hasAttribute(r)&&(n=e,i=e.getAttribute(r))}),r(ni,function(t){var r,o=t+"app";!n&&(r=e.querySelector("["+o.replace(":","\\:")+"]"))&&(n=r,i=r.getAttribute(o))}),n&&(o.strictDi=null!==ne(n,"strict-di"),t(n,i?[i]:[],o))}function ie(t,n,i){b(i)||(i={});var o={strictDi:!1};i=l(o,i);var a=function(){if(t=Rr(t),t.injector()){var r=t[0]===e.document?"document":Y(t);throw Wr("btstrpd","App already bootstrapped with this element '{0}'",r.replace(/</,"<").replace(/>/,">"))}n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),i.debugInfoEnabled&&n.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),n.unshift("ng");var o=rt(n,i.strictDi);return o.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),o},s=/^NG_ENABLE_DEBUG_INFO!/,u=/^NG_DEFER_BOOTSTRAP!/;return e&&s.test(e.name)&&(i.debugInfoEnabled=!0,e.name=e.name.replace(s,"")),e&&!u.test(e.name)?a():(e.name=e.name.replace(u,""),Gr.resumeBootstrap=function(e){return r(e,function(e){n.push(e)}),a()},void(S(Gr.resumeDeferredBootstrap)&&Gr.resumeDeferredBootstrap()))}function oe(){e.name="NG_ENABLE_DEBUG_INFO!"+e.name,e.location.reload()}function ae(e){var t=Gr.element(e).injector();if(!t)throw Wr("test","no injector found for element argument to getTestability");return t.get("$$testability")}function se(e,t){return t=t||"_",e.replace(ri,function(e,n){return(n?t:"")+e.toLowerCase()})}function ue(){var t;if(!ii){var n=ei();Ur=$(n)?e.jQuery:n?e[n]:void 0,Ur&&Ur.fn.on?(Rr=Ur,l(Ur.fn,{scope:Ei.scope,isolateScope:Ei.isolateScope,controller:Ei.controller,injector:Ei.injector,inheritedData:Ei.inheritedData}),t=Ur.cleanData,Ur.cleanData=function(e){for(var n,r,i=0;null!=(r=e[i]);i++)n=Ur._data(r,"events"),n&&n.$destroy&&Ur(r).triggerHandler("$destroy");t(e)}):Rr=Oe,Gr.element=Rr,ii=!0}}function le(e,t,n){if(!e)throw Wr("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function ce(e,t,n){return n&&Kr(e)&&(e=e[e.length-1]),le(S(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function fe(e,t){if("hasOwnProperty"===e)throw Wr("badname","hasOwnProperty is not a valid {0} name",t)}function de(e,t,n){if(!t)return e;for(var r,i=t.split("."),o=e,a=i.length,s=0;s<a;s++)r=i[s],e&&(e=(o=e)[r]);return!n&&S(e)?q(o,e):e}function pe(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=Rr(zr.call(e,0,i))),t.push(n));return t||e}function he(){return Object.create(null)}function ge(e){function n(e,t,n){return e[t]||(e[t]=n())}var r=t("$injector"),i=t("ng"),o=n(e,"angular",Object);return o.$$minErr=o.$$minErr||t,n(o,"module",function(){var e={};return function(t,o,a){var s=function(e,t){if("hasOwnProperty"===e)throw i("badname","hasOwnProperty is not a valid {0} name",t)};return s(t,"module"),o&&e.hasOwnProperty(t)&&(e[t]=null),n(e,t,function(){function e(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),c}}function n(e,n){return function(r,o){return o&&S(o)&&(o.$$moduleName=t),i.push([e,n,arguments]),c}}if(!o)throw r("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",t);var i=[],s=[],u=[],l=e("$injector","invoke","push",s),c={_invokeQueue:i,_configBlocks:s,_runBlocks:u,requires:o,name:t,provider:n("$provide","provider"),factory:n("$provide","factory"),service:n("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),decorator:n("$provide","decorator"),animation:n("$animateProvider","register"),filter:n("$filterProvider","register"),controller:n("$controllerProvider","register"),directive:n("$compileProvider","directive"),component:n("$compileProvider","component"),config:l,run:function(e){return u.push(e),this}};return a&&l(a),c})}})}function ve(e,t){if(Kr(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(b(e)){t=t||{};for(var i in e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i])}return t||e}function $e(e){var t=[];return JSON.stringify(e,function(e,n){if(n=H(e,n),b(n)){if(t.indexOf(n)>=0)return"...";t.push(n)}return n})}function me(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):$(e)?"undefined":"string"!=typeof e?$e(e):e}function be(n){l(n,{bootstrap:ie,copy:U,extend:l,merge:c,equals:V,element:Rr,forEach:r,injector:rt,noop:p,bind:q,toJson:B,fromJson:W,identity:h,isUndefined:$,isDefined:m,isString:w,isFunction:S,isObject:b,isNumber:x,isElement:F,isArray:Kr,version:fi,isDate:_,lowercase:Tr,uppercase:Dr,callbacks:{$$counter:0},getTestability:ae,$$minErr:t,$$csp:Qr,reloadWithDebugInfo:oe}),(Vr=ge(e))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:kn}),e.provider("$compile",ht).directive({a:Fo,input:ea,textarea:ea,form:Vo,script:Ka,select:Ja,style:es,option:Qa,ngBind:ra,ngBindHtml:oa,ngBindTemplate:ia,ngClass:sa,ngClassEven:la,ngClassOdd:ua,ngCloak:ca,ngController:fa,ngForm:zo,ngHide:La,ngIf:ha,ngInclude:ga,ngInit:$a,ngNonBindable:Ta,ngPluralize:Ia,ngRepeat:Ra,ngShow:za,ngStyle:qa,ngSwitch:Ha,ngSwitchWhen:Ba,ngSwitchDefault:Wa,ngOptions:Na,ngTransclude:Xa,ngModel:Ma,ngList:ma,ngChange:aa,pattern:ns,ngPattern:ns,required:ts,ngRequired:ts,minlength:is,ngMinlength:is,maxlength:rs,ngMaxlength:rs,ngValue:na,ngModelOptions:Pa}).directive({ngInclude:va}).directive(No).directive(da),e.provider({$anchorScroll:it,$animate:Li,$animateCss:Bi,$$animateJs:Vi,$$animateQueue:zi,$$AnimateRunner:Hi,$$animateAsyncRun:qi,$browser:ct,$cacheFactory:ft,$controller:yt,$document:wt,$exceptionHandler:xt,$filter:Un,$$forceReflow:Zi,$interpolate:Nt,$interval:It,$http:Pt,$httpParamSerializer:St,$httpParamSerializerJQLike:kt,$httpBackend:Dt,$xhrFactory:Tt,$jsonpCallbacks:ao,$location:Jt,$log:Qt,$parse:bn,$rootScope:Sn,$q:yn,$$q:wn,$sce:On,$sceDelegate:An,$sniffer:Mn,$templateCache:dt,$templateRequest:jn,$$testability:Pn,$timeout:Tn,$window:Nn,$$rAF:_n,$$jqLite:Ye,$$HashMap:Mi,$$cookieReader:Rn})}])}function ye(){return++pi}function we(e){return e.replace(vi,function(e,t,n,r){return r?n.toUpperCase():n}).replace($i,"Moz$1")}function xe(e){return!wi.test(e)}function _e(e){var t=e.nodeType;return t===oi||!t||t===li}function Se(e){for(var t in di[e.ng339])return!0;return!1}function ke(e){for(var t=0,n=e.length;t<n;t++)Te(e[t])}function Ee(e,t){var n,i,o,a,s=t.createDocumentFragment(),u=[];if(xe(e))u.push(t.createTextNode(e));else{for(n=s.appendChild(t.createElement("div")),i=(xi.exec(e)||["",""])[1].toLowerCase(),o=Si[i]||Si._default,n.innerHTML=o[1]+e.replace(_i,"<$1></$2>")+o[2],a=o[0];a--;)n=n.lastChild;u=z(u,n.childNodes),n=s.firstChild,n.textContent=""}return s.textContent="",s.innerHTML="",r(u,function(e){s.appendChild(e)}),s}function Ce(t,n){n=n||e.document;var r;return(r=yi.exec(t))?[n.createElement(r[1])]:(r=Ee(t,n))?r.childNodes:[]}function Ae(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}function Oe(e){if(e instanceof Oe)return e;var t;if(w(e)&&(e=Zr(e),t=!0),!(this instanceof Oe)){if(t&&"<"!=e.charAt(0))throw bi("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");
|
3 |
+
return new Oe(e)}t?Ue(this,Ce(e)):Ue(this,e)}function Me(e){return e.cloneNode(!0)}function je(e,t){if(t||Te(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)Te(n[r])}function Pe(e,t,n,i){if(m(i))throw bi("offargs","jqLite#off() does not support the `selector` argument");var o=De(e),a=o&&o.events,s=o&&o.handle;if(s)if(t){var u=function(t){var r=a[t];m(n)&&R(r||[],n),m(n)&&r&&r.length>0||(gi(e,t,s),delete a[t])};r(t.split(" "),function(e){u(e),mi[e]&&u(mi[e])})}else for(t in a)"$destroy"!==t&&gi(e,t,s),delete a[t]}function Te(e,t){var n=e.ng339,r=n&&di[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Pe(e)),delete di[n],e.ng339=void 0}}function De(e,t){var n=e.ng339,r=n&&di[n];return t&&!r&&(e.ng339=n=ye(),r=di[n]={events:{},data:{},handle:void 0}),r}function Fe(e,t,n){if(_e(e)){var r=m(n),i=!r&&t&&!b(t),o=!t,a=De(e,!i),s=a&&a.data;if(r)s[t]=n;else{if(o)return s;if(i)return s&&s[t];l(s,t)}}}function Ne(e,t){return!!e.getAttribute&&(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function Ie(e,t){t&&e.setAttribute&&r(t.split(" "),function(t){e.setAttribute("class",Zr((" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Zr(t)+" "," ")))})}function Re(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");r(t.split(" "),function(e){e=Zr(e),n.indexOf(" "+e+" ")===-1&&(n+=e+" ")}),e.setAttribute("class",Zr(n))}}function Ue(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function Ve(e,t){return ze(e,"$"+(t||"ngController")+"Controller")}function ze(e,t,n){e.nodeType==li&&(e=e.documentElement);for(var r=Kr(t)?t:[t];e;){for(var i=0,o=r.length;i<o;i++)if(m(n=Rr.data(e,r[i])))return n;e=e.parentNode||e.nodeType===ci&&e.host}}function Le(e){for(je(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function qe(e,t){t||je(e);var n=e.parentNode;n&&n.removeChild(e)}function He(t,n){n=n||e,"complete"===n.document.readyState?n.setTimeout(t):Rr(n).on("load",t)}function Be(e,t){var n=Ci[t.toLowerCase()];return n&&Ai[I(e)]&&n}function We(e){return Oi[e]}function Ge(e,t){var n=function(n,r){n.isDefaultPrevented=function(){return n.defaultPrevented};var i=t[r||n.type],o=i?i.length:0;if(o){if($(n.immediatePropagationStopped)){var a=n.stopImmediatePropagation;n.stopImmediatePropagation=function(){n.immediatePropagationStopped=!0,n.stopPropagation&&n.stopPropagation(),a&&a.call(n)}}n.isImmediatePropagationStopped=function(){return n.immediatePropagationStopped===!0};var s=i.specialHandlerWrapper||Xe;o>1&&(i=ve(i));for(var u=0;u<o;u++)n.isImmediatePropagationStopped()||s(e,n,i[u])}};return n.elem=e,n}function Xe(e,t,n){n.call(e,t)}function Ke(e,t,n){var r=t.relatedTarget;r&&(r===e||ki.call(e,r))||n.call(e,t)}function Ye(){this.$get=function(){return l(Oe,{hasClass:function(e,t){return e.attr&&(e=e[0]),Ne(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),Re(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),Ie(e,t)}})}}function Ze(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"==r||"object"==r&&null!==e?e.$$hashKey=r+":"+(t||a)():r+":"+e}function Je(e,t){if(t){var n=0;this.nextUid=function(){return++n}}r(e,this.put,this)}function Qe(e){return Function.prototype.toString.call(e)+" "}function et(e){var t=Qe(e).replace(Fi,""),n=t.match(ji)||t.match(Pi);return n}function tt(e){var t=et(e);return t?"function("+(t[1]||"").replace(/[\s\r\n]+/," ")+")":"fn"}function nt(e,t,n){var i,o,a;if("function"==typeof e){if(!(i=e.$inject)){if(i=[],e.length){if(t)throw w(n)&&n||(n=e.name||tt(e)),Ni("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);o=et(e),r(o[1].split(Ti),function(e){e.replace(Di,function(e,t,n){i.push(n)})})}e.$inject=i}}else Kr(e)?(a=e.length-1,ce(e[a],"fn"),i=e.slice(0,a)):ce(e,"fn",!0);return i}function rt(e,t){function n(e){return function(t,n){return b(t)?void r(t,o(e)):e(t,n)}}function i(e,t){if(fe(e,"service"),(S(t)||Kr(t))&&(t=_.instantiate(t)),!t.$get)throw Ni("pget","Provider '{0}' must define $get factory method.",e);return x[e+v]=t}function a(e,t){return function(){var n=C.invoke(t,this);if($(n))throw Ni("undef","Provider '{0}' must return a value from $get factory method.",e);return n}}function s(e,t,n){return i(e,{$get:n!==!1?a(e,t):t})}function u(e,t){return s(e,["$injector",function(e){return e.instantiate(t)}])}function l(e,t){return s(e,g(t),!1)}function c(e,t){fe(e,"constant"),x[e]=t,k[e]=t}function f(e,t){var n=_.get(e+v),r=n.$get;n.$get=function(){var e=C.invoke(r,n);return C.invoke(t,null,{$delegate:e})}}function d(e){le($(e)||Kr(e),"modulesToLoad","not an array");var t,n=[];return r(e,function(e){function r(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=_.get(r[0]);i[r[1]].apply(i,r[2])}}if(!y.get(e)){y.put(e,!0);try{w(e)?(t=Vr(e),n=n.concat(d(t.requires)).concat(t._runBlocks),r(t._invokeQueue),r(t._configBlocks)):S(e)?n.push(_.invoke(e)):Kr(e)?n.push(_.invoke(e)):ce(e,"module")}catch(i){throw Kr(e)&&(e=e[e.length-1]),i.message&&i.stack&&i.stack.indexOf(i.message)==-1&&(i=i.message+"\n"+i.stack),Ni("modulerr","Failed to instantiate module {0} due to:\n{1}",e,i.stack||i.message||i)}}}),n}function p(e,n){function r(t,r){if(e.hasOwnProperty(t)){if(e[t]===h)throw Ni("cdep","Circular dependency found: {0}",t+" <- "+m.join(" <- "));return e[t]}try{return m.unshift(t),e[t]=h,e[t]=n(t,r)}catch(i){throw e[t]===h&&delete e[t],i}finally{m.shift()}}function i(e,n,i){for(var o=[],a=rt.$$annotate(e,t,i),s=0,u=a.length;s<u;s++){var l=a[s];if("string"!=typeof l)throw Ni("itkn","Incorrect injection token! Expected service name as string, got {0}",l);o.push(n&&n.hasOwnProperty(l)?n[l]:r(l,i))}return o}function o(e){return!(Ir<=11)&&("function"==typeof e&&/^(?:class\b|constructor\()/.test(Qe(e)))}function a(e,t,n,r){"string"==typeof n&&(r=n,n=null);var a=i(e,n,r);return Kr(e)&&(e=e[e.length-1]),o(e)?(a.unshift(null),new(Function.prototype.bind.apply(e,a))):e.apply(t,a)}function s(e,t,n){var r=Kr(e)?e[e.length-1]:e,o=i(e,t,n);return o.unshift(null),new(Function.prototype.bind.apply(r,o))}return{invoke:a,instantiate:s,get:r,annotate:rt.$$annotate,has:function(t){return x.hasOwnProperty(t+v)||e.hasOwnProperty(t)}}}t=t===!0;var h={},v="Provider",m=[],y=new Je([],(!0)),x={$provide:{provider:n(i),factory:n(s),service:n(u),value:n(l),constant:n(c),decorator:f}},_=x.$injector=p(x,function(e,t){throw Gr.isString(t)&&m.push(t),Ni("unpr","Unknown provider: {0}",m.join(" <- "))}),k={},E=p(k,function(e,t){var n=_.get(e+v,t);return C.invoke(n.$get,n,void 0,e)}),C=E;x["$injector"+v]={$get:g(E)};var A=d(e);return C=E.get("$injector"),C.strictDi=t,r(A,function(e){e&&C.invoke(e)}),C}function it(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,r){function i(e){var t=null;return Array.prototype.some.call(e,function(e){if("a"===I(e))return t=e,!0}),t}function o(){var e=s.yOffset;if(S(e))e=e();else if(F(e)){var n=e[0],r=t.getComputedStyle(n);e="fixed"!==r.position?0:n.getBoundingClientRect().bottom}else x(e)||(e=0);return e}function a(e){if(e){e.scrollIntoView();var n=o();if(n){var r=e.getBoundingClientRect().top;t.scrollBy(0,r-n)}}else t.scrollTo(0,0)}function s(e){e=w(e)?e:n.hash();var t;e?(t=u.getElementById(e))?a(t):(t=i(u.getElementsByName(e)))?a(t):"top"===e&&a(null):a(null)}var u=t.document;return e&&r.$watch(function(){return n.hash()},function(e,t){e===t&&""===e||He(function(){r.$evalAsync(s)})}),s}]}function ot(e,t){return e||t?e?t?(Kr(e)&&(e=e.join(" ")),Kr(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function at(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===Ri)return n}}function st(e){w(e)&&(e=e.split(" "));var t=he();return r(e,function(e){e.length&&(t[e]=!0)}),t}function ut(e){return b(e)?e:{}}function lt(e,t,n,i){function o(e){try{e.apply(null,L(arguments,1))}finally{if(m--,0===m)for(;b.length;)try{b.pop()()}catch(t){n.error(t)}}}function a(e){var t=e.indexOf("#");return t===-1?"":e.substr(t)}function s(){S=null,u(),l()}function u(){y=k(),y=$(y)?null:y,V(y,A)&&(y=A),A=y}function l(){x===c.url()&&w===y||(x=c.url(),w=y,r(E,function(e){e(c.url(),y)}))}var c=this,f=e.location,d=e.history,h=e.setTimeout,g=e.clearTimeout,v={};c.isMock=!1;var m=0,b=[];c.$$completeOutstandingRequest=o,c.$$incOutstandingRequestCount=function(){m++},c.notifyWhenNoOutstandingRequests=function(e){0===m?e():b.push(e)};var y,w,x=f.href,_=t.find("base"),S=null,k=i.history?function(){try{return d.state}catch(e){}}:p;u(),w=y,c.url=function(t,n,r){if($(r)&&(r=null),f!==e.location&&(f=e.location),d!==e.history&&(d=e.history),t){var o=w===r;if(x===t&&(!i.history||o))return c;var s=x&&qt(x)===qt(t);return x=t,w=r,!i.history||s&&o?(s||(S=t),n?f.replace(t):s?f.hash=a(t):f.href=t,f.href!==t&&(S=t)):(d[n?"replaceState":"pushState"](r,"",t),u(),w=y),S&&(S=t),c}return S||f.href.replace(/%27/g,"'")},c.state=function(){return y};var E=[],C=!1,A=null;c.onUrlChange=function(t){return C||(i.history&&Rr(e).on("popstate",s),Rr(e).on("hashchange",s),C=!0),E.push(t),t},c.$$applicationDestroyed=function(){Rr(e).off("hashchange popstate",s)},c.$$checkUrlChange=l,c.baseHref=function(){var e=_.attr("href");return e?e.replace(/^(https?\:)?\/\/[^\/]*/,""):""},c.defer=function(e,t){var n;return m++,n=h(function(){delete v[n],o(e)},t||0),v[n]=!0,n},c.defer.cancel=function(e){return!!v[e]&&(delete v[e],g(e),o(p),!0)}}function ct(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new lt(e,r,t,n)}]}function ft(){this.$get=function(){function e(e,r){function i(e){e!=d&&(p?p==e&&(p=e.n):p=e,o(e.n,e.p),o(e,d),d=e,d.n=null)}function o(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in n)throw t("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var a=0,s=l({},r,{id:e}),u=he(),c=r&&r.capacity||Number.MAX_VALUE,f=he(),d=null,p=null;return n[e]={put:function(e,t){if(!$(t)){if(c<Number.MAX_VALUE){var n=f[e]||(f[e]={key:e});i(n)}return e in u||a++,u[e]=t,a>c&&this.remove(p.key),t}},get:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;i(t)}return u[e]},remove:function(e){if(c<Number.MAX_VALUE){var t=f[e];if(!t)return;t==d&&(d=t.p),t==p&&(p=t.n),o(t.n,t.p),delete f[e]}e in u&&(delete u[e],a--)},removeAll:function(){u=he(),a=0,f=he(),d=p=null},destroy:function(){u=null,s=null,f=null,delete n[e]},info:function(){return l({},s,{size:a})}}}var n={};return e.info=function(){var e={};return r(n,function(t,n){e[n]=t.info()}),e},e.get=function(e){return n[e]},e}}function dt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function pt(){}function ht(t,n){function i(e,t,n){var i=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=he();return r(e,function(e,r){if(e in E)return void(o[r]=E[e]);var a=e.match(i);if(!a)throw Wi("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",t,r,e,n?"controller bindings definition":"isolate scope definition");o[r]={mode:a[1][0],collection:"*"===a[2],optional:"?"===a[3],attrName:a[4]||r},a[4]&&(E[e]=o[r])}),o}function a(e,t){var n={isolateScope:null,bindToController:null};if(b(e.scope)&&(e.bindToController===!0?(n.bindToController=i(e.scope,t,!0),n.isolateScope={}):n.isolateScope=i(e.scope,t,!1)),b(e.bindToController)&&(n.bindToController=i(e.bindToController,t,!0)),b(n.bindToController)){var r=e.controller,o=e.controllerAs;if(!r)throw Wi("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);if(!bt(r,o))throw Wi("noident","Cannot bind to controller without identifier for directive '{0}'.",t)}return n}function s(e){var t=e.charAt(0);if(!t||t!==Tr(t))throw Wi("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw Wi("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}function u(e){var t=e.require||e.controller&&e.name;return!Kr(t)&&b(t)&&r(t,function(e,n){var r=e.match(_),i=e.substring(r[0].length);i||(t[n]=r[0]+n)}),t}var c={},f="Directive",v=/^\s*directive\:\s*([\w\-]+)\s+(.*)$/,y=/(([\w\-]+)(?:\:([^;]+))?;?)/,x=N("ngSrc,ngSrcset,src,srcset"),_=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,k=/^(on[a-z]+|formaction)$/,E=he();this.directive=function M(e,n){return fe(e,"directive"),w(e)?(s(e),le(n,"directiveFactory"),c.hasOwnProperty(e)||(c[e]=[],t.factory(e+f,["$injector","$exceptionHandler",function(t,n){var i=[];return r(c[e],function(r,o){try{var a=t.invoke(r);S(a)?a={compile:g(a)}:!a.compile&&a.link&&(a.compile=g(a.link)),a.priority=a.priority||0,a.index=o,a.name=a.name||e,a.require=u(a),a.restrict=a.restrict||"EA",a.$$moduleName=r.$$moduleName,i.push(a)}catch(s){n(s)}}),i}])),c[e].push(n)):r(e,o(M)),this},this.component=function(e,t){function n(e){function n(t){return S(t)||Kr(t)?function(n,r){return e.invoke(t,this,{$element:n,$attrs:r})}:t}var o=t.template||t.templateUrl?t.template:"",a={controller:i,controllerAs:bt(t.controller)||t.controllerAs||"$ctrl",template:n(o),templateUrl:n(t.templateUrl),transclude:t.transclude,scope:{},bindToController:t.bindings||{},restrict:"E",require:t.require};return r(t,function(e,t){"$"===t.charAt(0)&&(a[t]=e)}),a}var i=t.controller||function(){};return r(t,function(e,t){"$"===t.charAt(0)&&(n[t]=e,S(i)&&(i[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return m(e)?(n.aHrefSanitizationWhitelist(e),this):n.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(n.imgSrcSanitizationWhitelist(e),this):n.imgSrcSanitizationWhitelist()};var A=!0;this.debugInfoEnabled=function(e){return m(e)?(A=e,this):A};var O=10;this.onChangesTtl=function(e){return arguments.length?(O=e,this):O},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(t,n,i,o,s,u,g,E,M,P){function T(){try{if(!--_e)throw be=void 0,Wi("infchng","{0} $onChanges() iterations reached. Aborting!\n",O);g.$apply(function(){for(var e=[],t=0,n=be.length;t<n;++t)try{be[t]()}catch(r){e.push(r)}if(be=void 0,e.length)throw e})}finally{_e++}}function D(e,t){if(t){var n,r,i,o=Object.keys(t);for(n=0,r=o.length;n<r;n++)i=o[n],this[i]=t[i]}else this.$attr={};this.$$element=e}function F(e,t,n){we.innerHTML="<span "+t+">";var r=we.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}function N(e,t){try{e.addClass(t)}catch(n){}}function U(t,n,r,i,o){t instanceof Rr||(t=Rr(t));for(var a=/\S+/,s=0,u=t.length;s<u;s++){var l=t[s];l.nodeType===si&&l.nodeValue.match(a)&&Ae(l,t[s]=e.document.createElement("span"))}var c=H(t,n,t,r,i,o);U.$$addScopeClass(t);var f=null;return function(e,n,r){le(e,"scope"),o&&o.needsNewScope&&(e=e.$parent.$new()),r=r||{};var i=r.parentBoundTranscludeFn,a=r.transcludeControllers,s=r.futureParentElement;i&&i.$$boundTransclude&&(i=i.$$boundTransclude),f||(f=z(s));var u;if(u="html"!==f?Rr(fe(f,Rr("<div>").append(t).html())):n?Ei.clone.call(t):t,a)for(var l in a)u.data("$"+l+"Controller",a[l].instance);return U.$$addScopeInfo(u,e),n&&n(u,e),c&&c(e,u,u,i),u}}function z(e){var t=e&&e[0];return t&&"foreignobject"!==I(t)&&Hr.call(t).match(/SVG/)?"svg":"html"}function H(e,t,n,r,i,o){function a(e,n,r,i){var o,a,s,u,l,c,f,d,g;if(p){var v=n.length;for(g=new Array(v),l=0;l<h.length;l+=3)f=h[l],g[f]=n[f]}else g=n;for(l=0,c=h.length;l<c;)s=g[h[l++]],o=h[l++],a=h[l++],o?(o.scope?(u=e.$new(),U.$$addScopeInfo(Rr(s),u)):u=e,d=o.transcludeOnThisElement?B(e,o.transclude,i):!o.templateOnThisElement&&i?i:!i&&t?B(e,t):null,o(a,u,s,r,d)):a&&a(e,s.childNodes,void 0,i)}for(var s,u,l,c,f,d,p,h=[],g=0;g<e.length;g++)s=new D,u=W(e[g],[],s,0===g?r:void 0,i),l=u.length?J(u,e[g],s,t,n,null,[],[],o):null,l&&l.scope&&U.$$addScopeClass(s.$$element),f=l&&l.terminal||!(c=e[g].childNodes)||!c.length?null:H(c,l?(l.transcludeOnThisElement||!l.templateOnThisElement)&&l.transclude:t),(l||f)&&(h.push(g,l,f),d=!0,p=p||l),o=null;return d?a:null}function B(e,t,n){function r(r,i,o,a,s){return r||(r=e.$new(!1,s),r.$$transcluded=!0),t(r,i,{parentBoundTranscludeFn:n,transcludeControllers:o,futureParentElement:a})}var i=r.$$slots=he();for(var o in t.$$slots)t.$$slots[o]?i[o]=B(e,t.$$slots[o],n):i[o]=null;return r}function W(e,t,n,r,i){var o,a,s=e.nodeType,u=n.$attr;switch(s){case oi:ne(t,vt(I(e)),"E",r,i);for(var l,c,f,d,p,h,g=e.attributes,v=0,$=g&&g.length;v<$;v++){var m=!1,x=!1;l=g[v],c=l.name,p=Zr(l.value),d=vt(c),(h=Ce.test(d))&&(c=c.replace(Xi,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var _=d.match(Oe);_&&re(_[1])&&(m=c,x=c.substr(0,c.length-5)+"end",c=c.substr(0,c.length-6)),f=vt(c.toLowerCase()),u[f]=c,!h&&n.hasOwnProperty(f)||(n[f]=p,Be(e,f)&&(n[f]=!0)),pe(e,t,p,f,h),ne(t,f,"A",r,i,m,x)}if(a=e.className,b(a)&&(a=a.animVal),w(a)&&""!==a)for(;o=y.exec(a);)f=vt(o[2]),ne(t,f,"C",r,i)&&(n[f]=Zr(o[3])),a=a.substr(o.index+o[0].length);break;case si:if(11===Ir)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===si;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);ce(t,e.nodeValue);break;case ui:G(e,t,n,r,i)}return t.sort(ae),t}function G(e,t,n,r,i){try{var o=v.exec(e.nodeValue);if(o){var a=vt(o[1]);ne(t,a,"M",r,i)&&(n[a]=Zr(o[2]))}}catch(s){}}function X(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t)){do{if(!e)throw Wi("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType==oi&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(i>0)}else r.push(e);return Rr(r)}function K(e,t,n){return function(r,i,o,a,s){return i=X(i[0],t,n),e(r,i,o,a,s)}}function Z(e,t,n,r,i,o){var a;return e?U(t,n,r,i,o):function(){return a||(a=U(t,n,r,i,o),t=n=o=null),a.apply(this,arguments)}}function J(e,t,n,o,a,s,u,c,f){function d(e,t,n,r){e&&(n&&(e=K(e,n,r)),e.require=h.require,e.directiveName=g,(k===h||h.$$isolateScope)&&(e=ve(e,{isolateScope:!0})),u.push(e)),t&&(n&&(t=K(t,n,r)),t.require=h.require,t.directiveName=g,(k===h||h.$$isolateScope)&&(t=ve(t,{isolateScope:!0})),c.push(t))}function p(e,o,a,s,f){function d(e,t,n,r){var i;if(C(e)||(r=n,n=t,t=e,e=void 0),j&&(i=y),n||(n=j?A.parent():A),!r)return f(e,t,i,n,R);var o=f.$$slots[r];if(o)return o(e,t,i,n,R);if($(o))throw Wi("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Y(A))}var p,h,g,v,m,y,w,A,O,M;t===a?(O=n,A=n.$$element):(A=Rr(a),O=new D(A,n)),m=o,k?v=o.$new(!0):x&&(m=o.$parent),f&&(w=d,w.$$boundTransclude=f,w.isSlotFilled=function(e){return!!f.$$slots[e]}),_&&(y=ee(A,O,w,_,v,o,k)),k&&(U.$$addScopeInfo(A,v,!0,!(E&&(E===k||E===k.$$originalDirective))),U.$$addScopeClass(A,!0),v.$$isolateBindings=k.$$isolateBindings,M=me(o,O,v,v.$$isolateBindings,k),M.removeWatches&&v.$on("$destroy",M.removeWatches));for(var P in y){var T=_[P],F=y[P],N=T.$$bindings.bindToController;F.identifier&&N?F.bindingInfo=me(m,O,F.instance,N,T):F.bindingInfo={};var I=F();I!==F.instance&&(F.instance=I,A.data("$"+T.name+"Controller",I),F.bindingInfo.removeWatches&&F.bindingInfo.removeWatches(),F.bindingInfo=me(m,O,F.instance,N,T))}for(r(_,function(e,t){var n=e.require;e.bindToController&&!Kr(n)&&b(n)&&l(y[t].instance,Q(t,n,A,y))}),r(y,function(e){var t=e.instance;if(S(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(n){i(n)}if(S(t.$onInit))try{t.$onInit()}catch(n){i(n)}S(t.$doCheck)&&(m.$watch(function(){t.$doCheck()}),t.$doCheck()),S(t.$onDestroy)&&m.$on("$destroy",function(){t.$onDestroy()})}),p=0,h=u.length;p<h;p++)g=u[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);var R=o;for(k&&(k.template||null===k.templateUrl)&&(R=v),e&&e(R,a.childNodes,void 0,f),p=c.length-1;p>=0;p--)g=c[p],$e(g,g.isolateScope?v:o,A,O,g.require&&Q(g.directiveName,g.require,A,y),w);r(y,function(e){var t=e.instance;S(t.$postLink)&&t.$postLink()})}f=f||{};for(var h,g,v,m,y,w=-Number.MAX_VALUE,x=f.newScopeDirective,_=f.controllerDirectives,k=f.newIsolateScopeDirective,E=f.templateDirective,A=f.nonTlbTranscludeDirective,O=!1,M=!1,j=f.hasElementTranscludeDirective,P=n.$$element=Rr(t),T=s,F=o,N=!1,R=!1,V=0,z=e.length;V<z;V++){h=e[V];var H=h.$$start,B=h.$$end;if(H&&(P=X(t,H,B)),v=void 0,w>h.priority)break;if((y=h.scope)&&(h.templateUrl||(b(y)?(ue("new/isolated scope",k||x,h,P),k=h):ue("new/isolated scope",k,h,P)),x=x||h),g=h.name,!N&&(h.replace&&(h.templateUrl||h.template)||h.transclude&&!h.$$tlb)){for(var G,J=V+1;G=e[J++];)if(G.transclude&&!G.$$tlb||G.replace&&(G.templateUrl||G.template)){R=!0;break}N=!0}if(!h.templateUrl&&h.controller&&(y=h.controller,_=_||he(),ue("'"+g+"' controller",_[g],h,P),_[g]=h),y=h.transclude)if(O=!0,h.$$tlb||(ue("transclusion",A,h,P),A=h),"element"==y)j=!0,w=h.priority,v=P,P=n.$$element=Rr(U.$$createComment(g,n[g])),t=P[0],ge(a,L(v),t),v[0].$$parentNode=v[0].parentNode,F=Z(R,v,o,w,T&&T.name,{nonTlbTranscludeDirective:A});else{var ne=he();if(v=Rr(Me(t)).contents(),b(y)){v=[];var re=he(),ae=he();r(y,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,re[e]=t,ne[t]=null,ae[t]=n}),r(P.contents(),function(e){var t=re[vt(I(e))];t?(ae[t]=!0,ne[t]=ne[t]||[],ne[t].push(e)):v.push(e)}),r(ae,function(e,t){if(!e)throw Wi("reqslot","Required transclusion slot `{0}` was not filled.",t)});for(var se in ne)ne[se]&&(ne[se]=Z(R,ne[se],o))}P.empty(),F=Z(R,v,o,void 0,void 0,{needsNewScope:h.$$isolateScope||h.$$newScope}),F.$$slots=ne}if(h.template)if(M=!0,ue("template",E,h,P),E=h,y=S(h.template)?h.template(P,n):h.template,y=Ee(y),h.replace){if(T=h,v=xe(y)?[]:mt(fe(h.templateNamespace,Zr(y))),t=v[0],1!=v.length||t.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g,"");ge(a,P,t);var le={$attr:{}},ce=W(t,[],le),de=e.splice(V+1,e.length-(V+1));(k||x)&&te(ce,k,x),e=e.concat(ce).concat(de),ie(n,le),z=e.length}else P.html(y);if(h.templateUrl)M=!0,ue("template",E,h,P),E=h,h.replace&&(T=h),p=oe(e.splice(V,e.length-V),P,n,a,O&&F,u,c,{controllerDirectives:_,newScopeDirective:x!==h&&x,newIsolateScopeDirective:k,templateDirective:E,nonTlbTranscludeDirective:A}),z=e.length;else if(h.compile)try{m=h.compile(P,n,F);var pe=h.$$originalDirective||h;S(m)?d(null,q(pe,m),H,B):m&&d(q(pe,m.pre),q(pe,m.post),H,B)}catch(be){i(be,Y(P))}h.terminal&&(p.terminal=!0,w=Math.max(w,h.priority))}return p.scope=x&&x.scope===!0,p.transcludeOnThisElement=O,p.templateOnThisElement=M,p.transclude=F,f.hasElementTranscludeDirective=j,p}function Q(e,t,n,i){var o;if(w(t)){var a=t.match(_),s=t.substring(a[0].length),u=a[1]||a[3],l="?"===a[2];if("^^"===u?n=n.parent():(o=i&&i[s],o=o&&o.instance),!o){var c="$"+s+"Controller";o=u?n.inheritedData(c):n.data(c)}if(!o&&!l)throw Wi("ctreq","Controller '{0}', required by directive '{1}', can't be found!",s,e)}else if(Kr(t)){o=[];for(var f=0,d=t.length;f<d;f++)o[f]=Q(e,t[f],n,i)}else b(t)&&(o={},r(t,function(t,r){o[r]=Q(e,t,n,i)}));return o||null}function ee(e,t,n,r,i,o,a){var s=he();for(var l in r){var c=r[l],f={$scope:c===a||c.$$isolateScope?i:o,$element:e,$attrs:t,$transclude:n},d=c.controller;"@"==d&&(d=t[c.name]);var p=u(d,f,!0,c.controllerAs);s[c.name]=p,e.data("$"+c.name+"Controller",p.instance)}return s}function te(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=d(e[r],{$$isolateScope:t,$$newScope:n})}function ne(e,n,r,o,s,u,l){if(n===s)return null;var p=null;if(c.hasOwnProperty(n))for(var h,g=t.get(n+f),v=0,m=g.length;v<m;v++)try{if(h=g[v],($(o)||o>h.priority)&&h.restrict.indexOf(r)!=-1){if(u&&(h=d(h,{$$start:u,$$end:l})),!h.$$bindings){var y=h.$$bindings=a(h,h.name);b(y.isolateScope)&&(h.$$isolateBindings=y.isolateScope)}e.push(h),p=h}}catch(w){i(w)}return p}function re(e){if(c.hasOwnProperty(e))for(var n,r=t.get(e+f),i=0,o=r.length;i<o;i++)if(n=r[i],n.multiElement)return!0;return!1}function ie(e,t){var n=t.$attr,i=e.$attr;e.$$element;r(e,function(r,i){"$"!=i.charAt(0)&&(t[i]&&t[i]!==r&&(r+=("style"===i?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){e.hasOwnProperty(r)||"$"===r.charAt(0)||(e[r]=t,"class"!==r&&"style"!==r&&(i[r]=n[r]))})}function oe(e,t,n,i,a,s,u,l){var c,f,p=[],h=t[0],g=e.shift(),v=d(g,{templateUrl:null,transclude:null,replace:null,$$originalDirective:g}),$=S(g.templateUrl)?g.templateUrl(t,n):g.templateUrl,m=g.templateNamespace;return t.empty(),o($).then(function(o){var d,y,w,x;if(o=Ee(o),g.replace){if(w=xe(o)?[]:mt(fe(m,Zr(o))),d=w[0],1!=w.length||d.nodeType!==oi)throw Wi("tplrt","Template for directive '{0}' must have exactly one root element. {1}",g.name,$);y={$attr:{}},ge(i,t,d);var _=W(d,[],y);b(g.scope)&&te(_,!0),e=_.concat(e),ie(n,y)}else d=h,t.html(o);for(e.unshift(v),c=J(e,d,n,a,t,g,s,u,l),r(i,function(e,n){e==d&&(i[n]=t[0])}),f=H(t[0].childNodes,a);p.length;){var S=p.shift(),k=p.shift(),E=p.shift(),C=p.shift(),A=t[0];if(!S.$$destroyed){if(k!==h){var O=k.className;l.hasElementTranscludeDirective&&g.replace||(A=Me(d)),ge(E,Rr(k),A),N(Rr(A),O)}x=c.transcludeOnThisElement?B(S,c.transclude,C):C,c(f,S,A,i,x)}}p=null}),function(e,t,n,r,i){var o=i;t.$$destroyed||(p?p.push(t,n,r,o):(c.transcludeOnThisElement&&(o=B(t,c.transclude,i)),c(f,t,n,r,o)))}}function ae(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function ue(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw Wi("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Y(r))}function ce(e,t){var r=n(t,!0);r&&e.push({priority:0,compile:function(e){var t=e.parent(),n=!!t.length;return n&&U.$$addBindingClass(t),function(e,t){var i=t.parent();n||U.$$addBindingClass(i),U.$$addBindingInfo(i,r.expressions),e.$watch(r,function(e){t[0].nodeValue=e})}}})}function fe(t,n){switch(t=Tr(t||"html")){case"svg":case"math":var r=e.document.createElement("div");return r.innerHTML="<"+t+">"+n+"</"+t+">",r.childNodes[0].childNodes;default:return n}}function de(e,t){if("srcdoc"==t)return E.HTML;var n=I(e);return"xlinkHref"==t||"form"==n&&"action"==t||"img"!=n&&("src"==t||"ngSrc"==t)?E.RESOURCE_URL:void 0}function pe(e,t,r,i,o){var a=de(e,i);o=x[i]||o;var s=n(r,!0,a,o);if(s){if("multiple"===i&&"select"===I(e))throw Wi("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Y(e));t.push({priority:100,compile:function(){return{pre:function(e,t,u){var l=u.$$observers||(u.$$observers=he());if(k.test(i))throw Wi("nodomevents","Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");var c=u[i];c!==r&&(s=c&&n(c,!0,a,o),r=c),s&&(u[i]=s(e),(l[i]||(l[i]=[])).$$inter=!0,(u.$$observers&&u.$$observers[i].$$scope||e).$watch(s,function(e,t){"class"===i&&e!=t?u.$updateClass(e,t):u.$set(i,e)}))}}}})}}function ge(t,n,r){var i,o,a=n[0],s=n.length,u=a.parentNode;if(t)for(i=0,o=t.length;i<o;i++)if(t[i]==a){t[i++]=r;for(var l=i,c=l+s-1,f=t.length;l<f;l++,c++)c<f?t[l]=t[c]:delete t[l];t.length-=s-1,t.context===a&&(t.context=r);break}u&&u.replaceChild(r,a);var d=e.document.createDocumentFragment();for(i=0;i<s;i++)d.appendChild(n[i]);for(Rr.hasData(a)&&(Rr.data(r,Rr.data(a)),Rr(a).off("$destroy")),Rr.cleanData(d.querySelectorAll("*")),i=1;i<s;i++)delete n[i];n[0]=r,n.length=1}function ve(e,t){return l(function(){return e.apply(null,arguments)},e,t)}function $e(e,t,n,r,o,a){try{e(t,n,r,o,a)}catch(s){i(s,Y(n))}}function me(e,t,i,o,a){function u(t,n,r){S(i.$onChanges)&&n!==r&&(be||(e.$$postDigest(T),be=[]),c||(c={},be.push(l)),c[t]&&(r=c[t].previousValue),c[t]=new gt(r,n))}function l(){i.$onChanges(c),c=void 0}var c,f=[],d={};return r(o,function(r,o){var l,c,h,g,v,$=r.attrName,m=r.optional,b=r.mode;switch(b){case"@":m||Pr.call(t,$)||(i[o]=t[$]=void 0),t.$observe($,function(e){if(w(e)||j(e)){var t=i[o];u(o,e,t),i[o]=e}}),t.$$observers[$].$$scope=e,l=t[$],w(l)?i[o]=n(l)(e):j(l)&&(i[o]=l),d[o]=new gt(Gi,i[o]);break;case"=":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]),g=c.literal?V:function(e,t){return e===t||e!==e&&t!==t},h=c.assign||function(){throw l=i[o]=c(e),Wi("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",t[$],$,a.name)},l=i[o]=c(e);var y=function(t){return g(t,i[o])||(g(t,l)?h(e,t=i[o]):i[o]=t),l=t};y.$stateful=!0,v=r.collection?e.$watchCollection(t[$],y):e.$watch(s(t[$],y),null,c.literal),f.push(v);break;case"<":if(!Pr.call(t,$)){if(m)break;t[$]=void 0}if(m&&!t[$])break;c=s(t[$]);var x=i[o]=c(e);d[o]=new gt(Gi,i[o]),v=e.$watch(c,function(e,t){if(t===e){if(t===x)return;t=x}u(o,e,t),i[o]=e},c.literal),f.push(v);break;case"&":if(c=t.hasOwnProperty($)?s(t[$]):p,c===p&&m)break;i[o]=function(t){return c(e,t)}}}),{initialChanges:d,removeWatches:f.length&&function(){for(var e=0,t=f.length;e<t;++e)f[e]()}}}var be,ye=/^\w/,we=e.document.createElement("div"),_e=O;D.prototype={$normalize:vt,$addClass:function(e){e&&e.length>0&&M.addClass(this.$$element,e)},$removeClass:function(e){e&&e.length>0&&M.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=$t(e,t);n&&n.length&&M.addClass(this.$$element,n);var r=$t(t,e);r&&r.length&&M.removeClass(this.$$element,r)},$set:function(e,t,n,o){var a,s=this.$$element[0],u=Be(s,e),l=We(e),c=e;if(u?(this.$$element.prop(e,t),o=u):l&&(this[l]=t,c=l),this[e]=t,o?this.$attr[e]=o:(o=this.$attr[e],o||(this.$attr[e]=o=se(e,"-"))),a=I(this.$$element),"a"===a&&("href"===e||"xlinkHref"===e)||"img"===a&&"src"===e)this[e]=t=P(t,"src"===e);else if("img"===a&&"srcset"===e&&m(t)){for(var f="",d=Zr(t),p=/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/,h=/\s/.test(d)?p:/(,)/,g=d.split(h),v=Math.floor(g.length/2),b=0;b<v;b++){var y=2*b;f+=P(Zr(g[y]),!0),f+=" "+Zr(g[y+1])}var w=Zr(g[2*b]).split(/\s/);f+=P(Zr(w[0]),!0),2===w.length&&(f+=" "+Zr(w[1])),this[e]=t=f}n!==!1&&(null===t||$(t)?this.$$element.removeAttr(o):ye.test(o)?this.$$element.attr(o,t):F(this.$$element[0],o,t));var x=this.$$observers;x&&r(x[c],function(e){try{e(t)}catch(n){i(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=he()),i=r[e]||(r[e]=[]);return i.push(t),g.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||$(n[e])||t(n[e])}),function(){R(i,t)}}};var Se=n.startSymbol(),ke=n.endSymbol(),Ee="{{"==Se&&"}}"==ke?h:function(e){return e.replace(/\{\{/g,Se).replace(/}}/g,ke)},Ce=/^ngAttr[A-Z]/,Oe=/^(.+)Start$/;return U.$$addBindingInfo=A?function(e,t){var n=e.data("$binding")||[];Kr(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:p,U.$$addBindingClass=A?function(e){N(e,"ng-binding")}:p,U.$$addScopeInfo=A?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:p,U.$$addScopeClass=A?function(e,t){N(e,t?"ng-isolate-scope":"ng-scope")}:p,U.$$createComment=function(t,n){var r="";return A&&(r=" "+(t||"")+": ",n&&(r+=n+" ")),e.document.createComment(r)},U}]}function gt(e,t){this.previousValue=e,this.currentValue=t}function vt(e){return we(e.replace(Xi,""))}function $t(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var o=0;o<r.length;o++){for(var a=r[o],s=0;s<i.length;s++)if(a==i[s])continue e;n+=(n.length>0?" ":"")+a}return n}function mt(e){e=Rr(e);var t=e.length;if(t<=1)return e;for(;t--;){var n=e[t];n.nodeType===ui&&Lr.call(e,t,1)}return e}function bt(e,t){if(t&&w(t))return t;if(w(e)){var n=Yi.exec(e);if(n)return n[3]}}function yt(){var e={},n=!1;this.has=function(t){return e.hasOwnProperty(t)},this.register=function(t,n){fe(t,"controller"),b(t)?l(e,t):e[t]=n},this.allowGlobals=function(){n=!0},this.$get=["$injector","$window",function(r,i){function o(e,n,r,i){if(!e||!b(e.$scope))throw t("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",i,n);e.$scope[n]=r}return function(t,a,s,u){var c,f,d,p;if(s=s===!0,u&&w(u)&&(p=u),w(t)){if(f=t.match(Yi),!f)throw Ki("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);d=f[1],p=p||f[3],t=e.hasOwnProperty(d)?e[d]:de(a.$scope,d,!0)||(n?de(i,d,!0):void 0),
|
4 |
+
ce(t,d,!0)}if(s){var h=(Kr(t)?t[t.length-1]:t).prototype;c=Object.create(h||null),p&&o(a,p,c,d||t.name);var g;return g=l(function(){var e=r.invoke(t,c,a,d);return e!==c&&(b(e)||S(e))&&(c=e,p&&o(a,p,c,d||t.name)),c},{instance:c,identifier:p})}return c=r.instantiate(t,a,d),p&&o(a,p,c,d||t.name),c}}]}function wt(){this.$get=["$window",function(e){return Rr(e.document)}]}function xt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function _t(e){return b(e)?_(e)?e.toISOString():B(e):e}function St(){this.$get=function(){return function(e){if(!e)return"";var t=[];return i(e,function(e,n){null===e||$(e)||(Kr(e)?r(e,function(e){t.push(te(n)+"="+te(_t(e)))}):t.push(te(n)+"="+te(_t(e))))}),t.join("&")}}}function kt(){this.$get=function(){return function(e){function t(e,o,a){null===e||$(e)||(Kr(e)?r(e,function(e,n){t(e,o+"["+(b(e)?n:"")+"]")}):b(e)&&!_(e)?i(e,function(e,n){t(e,o+(a?"":"[")+n+(a?"":"]"))}):n.push(te(o)+"="+te(_t(e))))}if(!e)return"";var n=[];return t(e,"",!0),n.join("&")}}}function Et(e,t){if(w(e)){var n=e.replace(no,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(Ji)||Ct(n))&&(e=W(n))}}return e}function Ct(e){var t=e.match(eo);return t&&to[t[0]].test(e)}function At(e){function t(e,t){e&&(i[e]=i[e]?i[e]+", "+t:t)}var n,i=he();return w(e)?r(e.split("\n"),function(e){n=e.indexOf(":"),t(Tr(Zr(e.substr(0,n))),Zr(e.substr(n+1)))}):b(e)&&r(e,function(e,n){t(Tr(n),Zr(e))}),i}function Ot(e){var t;return function(n){if(t||(t=At(e)),n){var r=t[Tr(n)];return void 0===r&&(r=null),r}return t}}function Mt(e,t,n,i){return S(i)?i(e,t,n):(r(i,function(r){e=r(e,t,n)}),e)}function jt(e){return 200<=e&&e<300}function Pt(){var e=this.defaults={transformResponse:[Et],transformRequest:[function(e){return!b(e)||A(e)||M(e)||O(e)?e:B(e)}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ve(Qi),put:ve(Qi),patch:ve(Qi)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},n=!1;this.useApplyAsync=function(e){return m(e)?(n=!!e,this):n};var i=!0;this.useLegacyPromiseExtensions=function(e){return m(e)?(i=!!e,this):i};var o=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(a,s,u,c,f,d){function p(n){function o(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],o=t[n++];e=e.then(i,o)}return t.length=0,e}function a(e,t){var n,i={};return r(e,function(e,r){S(e)?(n=e(t),null!=n&&(i[r]=n)):i[r]=e}),i}function s(t){var n,r,i,o=e.headers,s=l({},t.headers);o=l({},o.common,o[Tr(t.method)]);e:for(n in o){r=Tr(n);for(i in s)if(Tr(i)===r)continue e;s[n]=o[n]}return a(s,ve(t))}function u(t){var n=t.headers,i=Mt(t.data,Ot(n),void 0,t.transformRequest);return $(i)&&r(n,function(e,t){"content-type"===Tr(t)&&delete n[t]}),$(t.withCredentials)&&!$(e.withCredentials)&&(t.withCredentials=e.withCredentials),v(t,i).then(c,c)}function c(e){var t=l({},e);return t.data=Mt(e.data,e.headers,e.status,p.transformResponse),jt(e.status)?t:f.reject(t)}if(!b(n))throw t("$http")("badreq","Http request configuration must be an object. Received: {0}",n);if(!w(n.url))throw t("$http")("badreq","Http request configuration url must be a string. Received: {0}",n.url);var p=l({method:"get",transformRequest:e.transformRequest,transformResponse:e.transformResponse,paramSerializer:e.paramSerializer},n);p.headers=s(n),p.method=Dr(p.method),p.paramSerializer=w(p.paramSerializer)?d.get(p.paramSerializer):p.paramSerializer;var h=[],g=[],m=f.when(p);return r(_,function(e){(e.request||e.requestError)&&h.unshift(e.request,e.requestError),(e.response||e.responseError)&&g.push(e.response,e.responseError)}),m=o(m,h),m=m.then(u),m=o(m,g),i?(m.success=function(e){return ce(e,"fn"),m.then(function(t){e(t.data,t.status,t.headers,p)}),m},m.error=function(e){return ce(e,"fn"),m.then(null,function(t){e(t.data,t.status,t.headers,p)}),m}):(m.success=io("success"),m.error=io("error")),m}function h(e){r(arguments,function(e){p[e]=function(t,n){return p(l({},n||{},{method:e,url:t}))}})}function g(e){r(arguments,function(e){p[e]=function(t,n,r){return p(l({},r||{},{method:e,url:t,data:n}))}})}function v(t,i){function o(e){if(e){var t={};return r(e,function(e,r){t[r]=function(t){function r(){e(t)}n?c.$applyAsync(r):c.$$phase?r():c.$apply(r)}}),t}}function u(e,t,r,i){function o(){l(t,e,r,i)}g&&(jt(e)?g.put(k,[e,t,At(r),i]):g.remove(k)),n?c.$applyAsync(o):(o(),c.$$phase||c.$apply())}function l(e,n,r,i){n=n>=-1?n:0,(jt(n)?w.resolve:w.reject)({data:e,status:n,headers:Ot(r),config:t,statusText:i})}function d(e){l(e.data,e.status,ve(e.headers()),e.statusText)}function h(){var e=p.pendingRequests.indexOf(t);e!==-1&&p.pendingRequests.splice(e,1)}var g,v,w=f.defer(),_=w.promise,S=t.headers,k=y(t.url,t.paramSerializer(t.params));if(p.pendingRequests.push(t),_.then(h,h),!t.cache&&!e.cache||t.cache===!1||"GET"!==t.method&&"JSONP"!==t.method||(g=b(t.cache)?t.cache:b(e.cache)?e.cache:x),g&&(v=g.get(k),m(v)?P(v)?v.then(d,d):Kr(v)?l(v[1],v[0],ve(v[2]),v[3]):l(v,200,{},"OK"):g.put(k,_)),$(v)){var E=Fn(t.url)?s()[t.xsrfCookieName||e.xsrfCookieName]:void 0;E&&(S[t.xsrfHeaderName||e.xsrfHeaderName]=E),a(t.method,k,i,u,S,t.timeout,t.withCredentials,t.responseType,o(t.eventHandlers),o(t.uploadEventHandlers))}return _}function y(e,t){return t.length>0&&(e+=(e.indexOf("?")==-1?"?":"&")+t),e}var x=u("$http");e.paramSerializer=w(e.paramSerializer)?d.get(e.paramSerializer):e.paramSerializer;var _=[];return r(o,function(e){_.unshift(w(e)?d.get(e):d.invoke(e))}),p.pendingRequests=[],h("get","delete","head","jsonp"),g("post","put","patch"),p.defaults=e,p}]}function Tt(){this.$get=function(){return function(){return new e.XMLHttpRequest}}}function Dt(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return Ft(e,r,e.defer,t,n[0])}]}function Ft(e,t,n,i,o){function a(e,t,n){e=e.replace("JSON_CALLBACK",t);var r=o.createElement("script"),a=null;return r.type="text/javascript",r.src=e,r.async=!0,a=function(e){gi(r,"load",a),gi(r,"error",a),o.body.removeChild(r),r=null;var s=-1,u="unknown";e&&("load"!==e.type||i.wasCalled(t)||(e={type:"error"}),u=e.type,s="error"===e.type?404:200),n&&n(s,u)},hi(r,"load",a),hi(r,"error",a),o.body.appendChild(r),a}return function(o,s,u,l,c,f,d,h,g,v){function b(){x&&x(),_&&_.abort()}function y(t,r,i,o,a){m(E)&&n.cancel(E),x=_=null,t(r,i,o,a),e.$$completeOutstandingRequest(p)}if(e.$$incOutstandingRequestCount(),s=s||e.url(),"jsonp"===Tr(o))var w=i.createCallback(s),x=a(s,w,function(e,t){var n=200===e&&i.getResponse(w);y(l,e,n,"",t),i.removeCallback(w)});else{var _=t(o,s);_.open(o,s,!0),r(c,function(e,t){m(e)&&_.setRequestHeader(t,e)}),_.onload=function(){var e=_.statusText||"",t="response"in _?_.response:_.responseText,n=1223===_.status?204:_.status;0===n&&(n=t?200:"file"==Dn(s).protocol?404:0),y(l,n,t,_.getAllResponseHeaders(),e)};var S=function(){y(l,-1,null,null,"")};if(_.onerror=S,_.onabort=S,r(g,function(e,t){_.addEventListener(t,e)}),r(v,function(e,t){_.upload.addEventListener(t,e)}),d&&(_.withCredentials=!0),h)try{_.responseType=h}catch(k){if("json"!==h)throw k}_.send($(u)?null:u)}if(f>0)var E=n(b,f);else P(f)&&f.then(b)}}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse","$exceptionHandler","$sce",function(n,r,i){function o(e){return"\\\\\\"+e}function a(n){return n.replace(p,e).replace(h,t)}function s(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=B(e)}return e}function u(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function c(o,c,p,h){function v(e){try{return e=P(e),h&&!m(e)?e:s(e)}catch(t){r(oo.interr(o,t))}}if(!o.length||o.indexOf(e)===-1){var b;if(!c){var y=a(o);b=g(y),b.exp=o,b.expressions=[],b.$$watchDelegate=u}return b}h=!!h;for(var w,x,_,k=0,E=[],C=[],A=o.length,O=[],M=[];k<A;){if((w=o.indexOf(e,k))==-1||(x=o.indexOf(t,w+f))==-1){k!==A&&O.push(a(o.substring(k)));break}k!==w&&O.push(a(o.substring(k,w))),_=o.substring(w+f,x),E.push(_),C.push(n(_,v)),k=x+d,M.push(O.length),O.push("")}if(p&&O.length>1&&oo.throwNoconcat(o),!c||E.length){var j=function(e){for(var t=0,n=E.length;t<n;t++){if(h&&$(e[t]))return;O[M[t]]=e[t]}return O.join("")},P=function(e){return p?i.getTrusted(p,e):i.valueOf(e)};return l(function(e){var t=0,n=E.length,i=new Array(n);try{for(;t<n;t++)i[t]=C[t](e);return j(i)}catch(a){r(oo.interr(o,a))}},{exp:o,expressions:E,$$watchDelegate:function(e,t){var n;return e.$watchGroup(C,function(r,i){var o=j(r);S(t)&&t.call(this,o,r!==i?n:o,e),n=o})}})}}var f=e.length,d=t.length,p=new RegExp(e.replace(/./g,o),"g"),h=new RegExp(t.replace(/./g,o),"g");return c.startSymbol=function(){return e},c.endSymbol=function(){return t},c}]}function It(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(e,t,n,r,i){function o(o,s,u,l){function c(){f?o.apply(null,d):o(g)}var f=arguments.length>4,d=f?L(arguments,4):[],p=t.setInterval,h=t.clearInterval,g=0,v=m(l)&&!l,$=(v?r:n).defer(),b=$.promise;return u=m(u)?u:0,b.$$intervalId=p(function(){v?i.defer(c):e.$evalAsync(c),$.notify(g++),u>0&&g>=u&&($.resolve(g),h(b.$$intervalId),delete a[b.$$intervalId]),v||e.$apply()},s),a[b.$$intervalId]=$,b}var a={};return o.cancel=function(e){return!!(e&&e.$$intervalId in a)&&(a[e.$$intervalId].reject("canceled"),t.clearInterval(e.$$intervalId),delete a[e.$$intervalId],!0)},o}]}function Rt(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=ee(t[n]);return t.join("/")}function Ut(e,t){var n=Dn(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=f(n.port)||uo[n.protocol]||null}function Vt(e,t){var n="/"!==e.charAt(0);n&&(e="/"+e);var r=Dn(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=J(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!=t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function zt(e,t){return 0===e.lastIndexOf(t,0)}function Lt(e,t){if(zt(t,e))return t.substr(e.length)}function qt(e){var t=e.indexOf("#");return t==-1?e:e.substr(0,t)}function Ht(e){return e.replace(/(#.+)|#$/,"$1")}function Bt(e){return e.substr(0,qt(e).lastIndexOf("/")+1)}function Wt(e){return e.substring(0,e.indexOf("/",e.indexOf("//")+2))}function Gt(e,t,n){this.$$html5=!0,n=n||"",Ut(e,this),this.$$parse=function(e){var n=Lt(t,e);if(!w(n))throw lo("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,t);Vt(n,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),n=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=t+this.$$url.substr(1)},this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a,s;return m(o=Lt(e,r))?(a=o,s=m(o=Lt(n,o))?t+(Lt("/",o)||o):e+a):m(o=Lt(t,r))?s=t+o:t==r+"/"&&(s=t),s&&this.$$parse(s),!!s}}function Xt(e,t,n){Ut(e,this),this.$$parse=function(r){function i(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;return zt(t,n)&&(t=t.replace(n,"")),i.exec(t)?e:(r=i.exec(e),r?r[1]:e)}var o,a=Lt(e,r)||Lt(t,r);$(a)||"#"!==a.charAt(0)?this.$$html5?o=a:(o="",$(a)&&(e=r,this.replace())):(o=Lt(n,a),$(o)&&(o=a)),Vt(o,this),this.$$path=i(this.$$path,o,e),this.$$compose()},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+(this.$$url?n+this.$$url:"")},this.$$parseLinkUrl=function(t,n){return qt(e)==qt(t)&&(this.$$parse(t),!0)}}function Kt(e,t,n){this.$$html5=!0,Xt.apply(this,arguments),this.$$parseLinkUrl=function(r,i){if(i&&"#"===i[0])return this.hash(i.slice(1)),!0;var o,a;return e==qt(r)?o=r:(a=Lt(t,r))?o=e+n+a:t===r+"/"&&(o=t),o&&this.$$parse(o),!!o},this.$$compose=function(){var t=Q(this.$$search),r=this.$$hash?"#"+ee(this.$$hash):"";this.$$url=Rt(this.$$path)+(t?"?"+t:"")+r,this.$$absUrl=e+n+this.$$url}}function Yt(e){return function(){return this[e]}}function Zt(e,t){return function(n){return $(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Jt(){var e="",t={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(t){return m(t)?(e=t,this):e},this.html5Mode=function(e){return j(e)?(t.enabled=e,this):b(e)?(j(e.enabled)&&(t.enabled=e.enabled),j(e.requireBase)&&(t.requireBase=e.requireBase),j(e.rewriteLinks)&&(t.rewriteLinks=e.rewriteLinks),this):t},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(n,r,i,o,a){function s(e,t,n){var i=l.url(),o=l.$$state;try{r.url(e,t,n),l.$$state=r.state()}catch(a){throw l.url(i),l.$$state=o,a}}function u(e,t){n.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}var l,c,f,d=r.baseHref(),p=r.url();if(t.enabled){if(!d&&t.requireBase)throw lo("nobase","$location in HTML5 mode requires a <base> tag to be present!");f=Wt(p)+(d||"/"),c=i.history?Gt:Kt}else f=qt(p),c=Xt;var h=Bt(f);l=new c(f,h,"#"+e),l.$$parseLinkUrl(p,p),l.$$state=r.state();var g=/^\s*(javascript|mailto):/i;o.on("click",function(e){if(t.rewriteLinks&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!=e.which&&2!=e.button){for(var i=Rr(e.target);"a"!==I(i[0]);)if(i[0]===o[0]||!(i=i.parent())[0])return;var s=i.prop("href"),u=i.attr("href")||i.attr("xlink:href");b(s)&&"[object SVGAnimatedString]"===s.toString()&&(s=Dn(s.animVal).href),g.test(s)||!s||i.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(s,u)&&(e.preventDefault(),l.absUrl()!=r.url()&&(n.$apply(),a.angular["ff-684208-preventDefault"]=!0))}}),Ht(l.absUrl())!=Ht(p)&&r.url(l.absUrl(),!0);var v=!0;return r.onUrlChange(function(e,t){return $(Lt(h,e))?void(a.location.href=e):(n.$evalAsync(function(){var r,i=l.absUrl(),o=l.$$state;e=Ht(e),l.$$parse(e),l.$$state=t,r=n.$broadcast("$locationChangeStart",e,i,t,o).defaultPrevented,l.absUrl()===e&&(r?(l.$$parse(i),l.$$state=o,s(i,!1,o)):(v=!1,u(i,o)))}),void(n.$$phase||n.$digest()))}),n.$watch(function(){var e=Ht(r.url()),t=Ht(l.absUrl()),o=r.state(),a=l.$$replace,c=e!==t||l.$$html5&&i.history&&o!==l.$$state;(v||c)&&(v=!1,n.$evalAsync(function(){var t=l.absUrl(),r=n.$broadcast("$locationChangeStart",t,e,l.$$state,o).defaultPrevented;l.absUrl()===t&&(r?(l.$$parse(e),l.$$state=o):(c&&s(t,a,o===l.$$state?null:l.$$state),u(e,o)))})),l.$$replace=!1}),l}]}function Qt(){var e=!0,t=this;this.debugEnabled=function(t){return m(t)?(e=t,this):e},this.$get=["$window",function(n){function i(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function o(e){var t=n.console||{},o=t[e]||t.log||p,a=!1;try{a=!!o.apply}catch(s){}return a?function(){var e=[];return r(arguments,function(t){e.push(i(t))}),o.apply(t,e)}:function(e,t){o(e,null==t?"":t)}}return{log:o("log"),info:o("info"),warn:o("warn"),error:o("error"),debug:function(){var n=o("debug");return function(){e&&n.apply(t,arguments)}}()}}]}function en(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw fo("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function tn(e){return e+""}function nn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw fo("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw fo("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw fo("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function rn(e,t){if(e){if(e.constructor===e)throw fo("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===po||e===ho||e===go)throw fo("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function on(e,t){if(e&&(e===(0).constructor||e===(!1).constructor||e==="".constructor||e==={}.constructor||e===[].constructor||e===Function.constructor))throw fo("isecaf","Assigning to a constructor is disallowed! Expression: {0}",t)}function an(e,t){return"undefined"!=typeof e?e:t}function sn(e,t){return"undefined"==typeof e?t:"undefined"==typeof t?e:e+t}function un(e,t){var n=e(t);return!n.$stateful}function ln(e,t){var n,i;switch(e.type){case bo.Program:n=!0,r(e.body,function(e){ln(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case bo.Literal:e.constant=!0,e.toWatch=[];break;case bo.UnaryExpression:ln(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case bo.BinaryExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case bo.LogicalExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case bo.ConditionalExpression:ln(e.test,t),ln(e.alternate,t),ln(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case bo.Identifier:e.constant=!1,e.toWatch=[e];break;case bo.MemberExpression:ln(e.object,t),e.computed&&ln(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case bo.CallExpression:n=!!e.filter&&un(t,e.callee.name),i=[],r(e.arguments,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=e.filter&&un(t,e.callee.name)?i:[e];break;case bo.AssignmentExpression:ln(e.left,t),ln(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case bo.ArrayExpression:n=!0,i=[],r(e.elements,function(e){ln(e,t),n=n&&e.constant,e.constant||i.push.apply(i,e.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ObjectExpression:n=!0,i=[],r(e.properties,function(e){ln(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||i.push.apply(i,e.value.toWatch)}),e.constant=n,e.toWatch=i;break;case bo.ThisExpression:e.constant=!1,e.toWatch=[];break;case bo.LocalsExpression:e.constant=!1,e.toWatch=[]}}function cn(e){if(1==e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function fn(e){return e.type===bo.Identifier||e.type===bo.MemberExpression}function dn(e){if(1===e.body.length&&fn(e.body[0].expression))return{type:bo.AssignmentExpression,left:e.body[0].expression,right:{type:bo.NGValueParameter},operator:"="}}function pn(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===bo.Literal||e.body[0].expression.type===bo.ArrayExpression||e.body[0].expression.type===bo.ObjectExpression)}function hn(e){return e.constant}function gn(e,t){this.astBuilder=e,this.$filter=t}function vn(e,t){this.astBuilder=e,this.$filter=t}function $n(e){return"constructor"==e}function mn(e){return S(e.valueOf)?e.valueOf():wo.call(e)}function bn(){var e,t,n=he(),i=he(),o={"true":!0,"false":!1,"null":null,undefined:void 0};this.addLiteral=function(e,t){o[e]=t},this.setIdentifierFns=function(n,r){return e=n,t=r,this},this.$get=["$filter",function(a){function s(e,t,r){var o,s,l;switch(r=r||y,typeof e){case"string":e=e.trim(),l=e;var v=r?i:n;if(o=v[l],!o){":"===e.charAt(0)&&":"===e.charAt(1)&&(s=!0,e=e.substring(2));var m=r?b:$,w=new mo(m),x=new yo(w,a,m);o=x.parse(e),o.constant?o.$$watchDelegate=h:s?o.$$watchDelegate=o.literal?d:f:o.inputs&&(o.$$watchDelegate=c),r&&(o=u(o)),v[l]=o}return g(o,t);case"function":return g(e,t);default:return g(p,t)}}function u(e){function t(t,n,r,i){var o=y;y=!0;try{return e(t,n,r,i)}finally{y=o}}if(!e)return e;t.$$watchDelegate=e.$$watchDelegate,t.assign=u(e.assign),t.constant=e.constant,t.literal=e.literal;for(var n=0;e.inputs&&n<e.inputs.length;++n)e.inputs[n]=u(e.inputs[n]);return t.inputs=e.inputs,t}function l(e,t){return null==e||null==t?e===t:("object"!=typeof e||(e=mn(e),"object"!=typeof e))&&(e===t||e!==e&&t!==t)}function c(e,t,n,r,i){var o,a=r.inputs;if(1===a.length){var s=l;return a=a[0],e.$watch(function(e){var t=a(e);return l(t,s)||(o=r(e,void 0,void 0,[t]),s=t&&mn(t)),o},t,n,i)}for(var u=[],c=[],f=0,d=a.length;f<d;f++)u[f]=l,c[f]=null;return e.$watch(function(e){for(var t=!1,n=0,i=a.length;n<i;n++){var s=a[n](e);(t||(t=!l(s,u[n])))&&(c[n]=s,u[n]=s&&mn(s))}return t&&(o=r(e,void 0,void 0,c)),o},t,n,i)}function f(e,t,n,r){var i,o;return i=e.$watch(function(e){return r(e)},function(e,n,r){o=e,S(t)&&t.apply(this,arguments),m(e)&&r.$$postDigest(function(){m(o)&&i()})},n)}function d(e,t,n,i){function o(e){var t=!0;return r(e,function(e){m(e)||(t=!1)}),t}var a,s;return a=e.$watch(function(e){return i(e)},function(e,n,r){s=e,S(t)&&t.call(this,e,n,r),o(e)&&r.$$postDigest(function(){o(s)&&a()})},n)}function h(e,t,n,r){var i;return i=e.$watch(function(e){return i(),r(e)},t,n)}function g(e,t){if(!t)return e;var n=e.$$watchDelegate,r=!1,i=n!==d&&n!==f,o=i?function(n,i,o,a){var s=r&&a?a[0]:e(n,i,o,a);return t(s,n,i)}:function(n,r,i,o){var a=e(n,r,i,o),s=t(a,n,r);return m(a)?s:a};return e.$$watchDelegate&&e.$$watchDelegate!==c?o.$$watchDelegate=e.$$watchDelegate:t.$stateful||(o.$$watchDelegate=c,r=!e.inputs,o.inputs=e.inputs?e.inputs:[e]),o}var v=Qr().noUnsafeEval,$={csp:v,expensiveChecks:!1,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},b={csp:v,expensiveChecks:!0,literals:U(o),isIdentifierStart:S(e)&&e,isIdentifierContinue:S(t)&&t},y=!1;return s.$$runningExpensiveChecks=function(){return y},s}]}function yn(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return xn(function(t){e.$evalAsync(t)},t)}]}function wn(){this.$get=["$browser","$exceptionHandler",function(e,t){return xn(function(t){e.defer(t)},t)}]}function xn(e,n){function i(){this.$$state={status:0}}function o(e,t){return function(n){t.call(e,n)}}function a(e){var t,r,i;i=e.pending,e.processScheduled=!1,e.pending=void 0;for(var o=0,a=i.length;o<a;++o){r=i[o][0],t=i[o][e.status];try{S(t)?r.resolve(t(e.value)):1===e.status?r.resolve(e.value):r.reject(e.value)}catch(s){r.reject(s),n(s)}}}function s(t){!t.processScheduled&&t.pending&&(t.processScheduled=!0,e(function(){a(t)}))}function u(){this.promise=new i}function c(e){var t=new u,n=0,i=Kr(e)?[]:{};return r(e,function(e,r){n++,m(e).then(function(e){i.hasOwnProperty(r)||(i[r]=e,--n||t.resolve(i))},function(e){i.hasOwnProperty(r)||t.reject(e)})}),0===n&&t.resolve(i),t.promise}function f(e){var t=p();return r(e,function(e){m(e).then(t.resolve,t.reject)}),t.promise}var d=t("$q",TypeError),p=function(){var e=new u;return e.resolve=o(e,e.resolve),e.reject=o(e,e.reject),e.notify=o(e,e.notify),e};l(i.prototype,{then:function(e,t,n){if($(e)&&$(t)&&$(n))return this;var r=new u;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),this.$$state.status>0&&s(this.$$state),r.promise},"catch":function(e){return this.then(null,e)},"finally":function(e,t){return this.then(function(t){return v(t,!0,e)},function(t){return v(t,!1,e)},t)}}),l(u.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(d("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){function t(e){u||(u=!0,a.$$resolve(e))}function r(e){u||(u=!0,a.$$reject(e))}var i,a=this,u=!1;try{(b(e)||S(e))&&(i=e&&e.then),S(i)?(this.promise.$$state.status=-1,i.call(e,t,r,o(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(l){r(l),n(l)}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(t){var r=this.promise.$$state.pending;this.promise.$$state.status<=0&&r&&r.length&&e(function(){for(var e,i,o=0,a=r.length;o<a;o++){i=r[o][0],e=r[o][3];try{i.notify(S(e)?e(t):t)}catch(s){n(s)}}})}});var h=function(e){var t=new u;return t.reject(e),t.promise},g=function(e,t){var n=new u;return t?n.resolve(e):n.reject(e),n.promise},v=function(e,t,n){var r=null;try{S(n)&&(r=n())}catch(i){return g(i,!1)}return P(r)?r.then(function(){return g(e,t)},function(e){return g(e,!1)}):g(e,t)},m=function(e,t,n,r){var i=new u;return i.resolve(e),i.promise.then(t,n,r)},y=m,w=function(e){function t(e){r.resolve(e)}function n(e){r.reject(e)}if(!S(e))throw d("norslvr","Expected resolverFn, got '{0}'",e);var r=new u;return e(t,n),r.promise};return w.prototype=i.prototype,w.defer=p,w.reject=h,w.when=m,w.resolve=y,w.all=c,w.race=f,w}function _n(){this.$get=["$window","$timeout",function(e,t){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame,r=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,i=!!n,o=i?function(e){var t=n(e);return function(){r(t)}}:function(e){var n=t(e,16.66,!1);return function(){t.cancel(n)}};return o.supported=i,o}]}function Sn(){function e(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=a(),this.$$ChildScope=null}return t.prototype=e,t}var i=10,o=t("$rootScope"),s=null,u=null;this.digestTtl=function(e){return arguments.length&&(i=e),i},this.$get=["$exceptionHandler","$parse","$browser",function(t,l,c){function f(e){e.currentScope.$$destroyed=!0}function d(e){9===Ir&&(e.$$childHead&&d(e.$$childHead),e.$$nextSibling&&d(e.$$nextSibling)),e.$parent=e.$$nextSibling=e.$$prevSibling=e.$$childHead=e.$$childTail=e.$root=e.$$watchers=null}function h(){this.$id=a(),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 g(e){if(k.$$phase)throw o("inprog","{0} already in progress",k.$$phase);k.$$phase=e}function v(){k.$$phase=null}function m(e,t){do e.$$watchersCount+=t;while(e=e.$parent)}function y(e,t,n){do e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n];while(e=e.$parent)}function w(){}function x(){for(;A.length;)try{A.shift()()}catch(e){t(e)}u=null}function _(){null===u&&(u=c.defer(function(){k.$apply(x)}))}h.prototype={constructor:h,$new:function(t,n){var r;return n=n||this,t?(r=new h,r.$root=this.$root):(this.$$ChildScope||(this.$$ChildScope=e(this)),r=new this.$$ChildScope),r.$parent=n,r.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=r,n.$$childTail=r):n.$$childHead=n.$$childTail=r,(t||n!=this)&&r.$on("$destroy",f),r},$watch:function(e,t,n,r){var i=l(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var o=this,a=o.$$watchers,u={fn:t,last:w,get:i,exp:r||e,eq:!!n};return s=null,S(t)||(u.fn=p),a||(a=o.$$watchers=[]),a.unshift(u),m(this,1),function(){R(a,u)>=0&&m(o,-1),s=null}},$watchGroup:function(e,t){function n(){u=!1,l?(l=!1,t(o,o,s)):t(o,i,s)}var i=new Array(e.length),o=new Array(e.length),a=[],s=this,u=!1,l=!0;if(!e.length){var c=!0;return s.$evalAsync(function(){c&&t(o,o,s)}),function(){c=!1}}return 1===e.length?this.$watch(e[0],function(e,n,r){o[0]=e,i[0]=n,t(o,e===n?o:i,r)}):(r(e,function(e,t){var r=s.$watch(e,function(e,r){o[t]=e,i[t]=r,u||(u=!0,s.$evalAsync(n))});a.push(r)}),function(){for(;a.length;)a.shift()()})},$watchCollection:function(e,t){function r(e){o=e;var t,r,i,s,u;if(!$(o)){if(b(o))if(n(o)){a!==p&&(a=p,v=a.length=0,f++),t=o.length,v!==t&&(f++,a.length=v=t);for(var l=0;l<t;l++)u=a[l],s=o[l],i=u!==u&&s!==s,i||u===s||(f++,a[l]=s)}else{a!==h&&(a=h={},v=0,f++),t=0;for(r in o)Pr.call(o,r)&&(t++,s=o[r],u=a[r],r in a?(i=u!==u&&s!==s,i||u===s||(f++,a[r]=s)):(v++,a[r]=s,f++));if(v>t){f++;for(r in a)Pr.call(o,r)||(v--,delete a[r])}}else a!==o&&(a=o,f++);return f}}function i(){if(g?(g=!1,t(o,o,u)):t(o,s,u),c)if(b(o))if(n(o)){s=new Array(o.length);for(var e=0;e<o.length;e++)s[e]=o[e]}else{s={};for(var r in o)Pr.call(o,r)&&(s[r]=o[r])}else s=o}r.$stateful=!0;var o,a,s,u=this,c=t.length>1,f=0,d=l(e,r),p=[],h={},g=!0,v=0;return this.$watch(d,i)},$digest:function(){var e,n,r,a,l,f,d,p,h,$,m,b,y=i,_=this,A=[];g("$digest"),c.$$checkUrlChange(),this===k&&null!==u&&(c.defer.cancel(u),x()),s=null;do{p=!1,$=_;for(var M=0;M<E.length;M++){try{b=E[M],b.scope.$eval(b.expression,b.locals)}catch(j){t(j)}s=null}E.length=0;e:do{if(f=$.$$watchers)for(d=f.length;d--;)try{if(e=f[d])if(l=e.get,(n=l($))===(r=e.last)||(e.eq?V(n,r):"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))){if(e===s){p=!1;break e}}else p=!0,s=e,e.last=e.eq?U(n,null):n,a=e.fn,a(n,r===w?n:r,$),y<5&&(m=4-y,A[m]||(A[m]=[]),A[m].push({msg:S(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:n,oldVal:r}))}catch(j){t(j)}if(!(h=$.$$watchersCount&&$.$$childHead||$!==_&&$.$$nextSibling))for(;$!==_&&!(h=$.$$nextSibling);)$=$.$parent}while($=h);if((p||E.length)&&!y--)throw v(),o("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",i,A)}while(p||E.length);for(v();O<C.length;)try{C[O++]()}catch(j){t(j)}C.length=O=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===k&&c.$$applicationDestroyed(),m(this,-this.$$watchersCount);for(var t in this.$$listenerCount)y(this,this.$$listenerCount[t],t);e&&e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail==this&&(e.$$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=p,this.$on=this.$watch=this.$watchGroup=function(){return p},this.$$listeners={},this.$$nextSibling=null,d(this)}},$eval:function(e,t){return l(e)(this,t)},$evalAsync:function(e,t){k.$$phase||E.length||c.defer(function(){E.length&&k.$digest()}),E.push({scope:this,expression:l(e),locals:t})},$$postDigest:function(e){C.push(e)},$apply:function(e){try{g("$apply");try{return this.$eval(e)}finally{v()}}catch(n){t(n)}finally{try{k.$digest()}catch(n){throw t(n),n}}},$applyAsync:function(e){function t(){n.$eval(e)}var n=this;e&&A.push(t),e=l(e),_()},$on:function(e,t){var n=this.$$listeners[e];n||(this.$$listeners[e]=n=[]),n.push(t);var r=this;do r.$$listenerCount[e]||(r.$$listenerCount[e]=0),r.$$listenerCount[e]++;while(r=r.$parent);var i=this;return function(){var r=n.indexOf(t);r!==-1&&(n[r]=null,y(i,1,e))}},$emit:function(e,n){var r,i,o,a=[],s=this,u=!1,l={name:e,targetScope:s,stopPropagation:function(){u=!0},preventDefault:function(){l.defaultPrevented=!0},defaultPrevented:!1},c=z([l],arguments,1);do{for(r=s.$$listeners[e]||a,l.currentScope=s,i=0,o=r.length;i<o;i++)if(r[i])try{r[i].apply(null,c)}catch(f){t(f)}else r.splice(i,1),i--,o--;if(u)return l.currentScope=null,l;s=s.$parent}while(s);return l.currentScope=null,l},$broadcast:function(e,n){var r=this,i=r,o=r,a={name:e,targetScope:r,preventDefault:function(){a.defaultPrevented=!0},defaultPrevented:!1};if(!r.$$listenerCount[e])return a;for(var s,u,l,c=z([a],arguments,1);i=o;){for(a.currentScope=i,s=i.$$listeners[e]||[],u=0,l=s.length;u<l;u++)if(s[u])try{s[u].apply(null,c)}catch(f){t(f)}else s.splice(u,1),u--,l--;if(!(o=i.$$listenerCount[e]&&i.$$childHead||i!==r&&i.$$nextSibling))for(;i!==r&&!(o=i.$$nextSibling);)i=i.$parent}return a.currentScope=null,a}};var k=new h,E=k.$$asyncQueue=[],C=k.$$postDigestQueue=[],A=k.$$applyAsyncQueue=[],O=0;return k}]}function kn(){var e=/^\s*(https?|ftp|mailto|tel|file):/,t=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(t){return m(t)?(e=t,this):e},this.imgSrcSanitizationWhitelist=function(e){return m(e)?(t=e,this):t},this.$get=function(){return function(n,r){var i,o=r?t:e;return i=Dn(n).href,""===i||i.match(o)?n:"unsafe:"+i}}}function En(e){if("self"===e)return e;if(w(e)){if(e.indexOf("***")>-1)throw xo("iwcard","Illegal sequence *** in string matcher. String: {0}",e);return e=Jr(e).replace("\\*\\*",".*").replace("\\*","[^:/.?&;]*"),
|
5 |
+
new RegExp("^"+e+"$")}if(k(e))return new RegExp("^"+e.source+"$");throw xo("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}function Cn(e){var t=[];return m(e)&&r(e,function(e){t.push(En(e))}),t}function An(){this.SCE_CONTEXTS=_o;var e=["self"],t=[];this.resourceUrlWhitelist=function(t){return arguments.length&&(e=Cn(t)),e},this.resourceUrlBlacklist=function(e){return arguments.length&&(t=Cn(e)),t},this.$get=["$injector",function(n){function r(e,t){return"self"===e?Fn(t):!!e.exec(t.href)}function i(n){var i,o,a=Dn(n.toString()),s=!1;for(i=0,o=e.length;i<o;i++)if(r(e[i],a)){s=!0;break}if(s)for(i=0,o=t.length;i<o;i++)if(r(t[i],a)){s=!1;break}return s}function o(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}function a(e,t){var n=f.hasOwnProperty(e)?f[e]:null;if(!n)throw xo("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||$(t)||""===t)return t;if("string"!=typeof t)throw xo("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)}function s(e){return e instanceof c?e.$$unwrapTrustedValue():e}function u(e,t){if(null===t||$(t)||""===t)return t;var n=f.hasOwnProperty(e)?f[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===_o.RESOURCE_URL){if(i(t))return t;throw xo("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}",t.toString())}if(e===_o.HTML)return l(t);throw xo("unsafe","Attempting to use an unsafe value in a safe context.")}var l=function(e){throw xo("unsafe","Attempting to use an unsafe value in a safe context.")};n.has("$sanitize")&&(l=n.get("$sanitize"));var c=o(),f={};return f[_o.HTML]=o(c),f[_o.CSS]=o(c),f[_o.URL]=o(c),f[_o.JS]=o(c),f[_o.RESOURCE_URL]=o(f[_o.URL]),{trustAs:a,getTrusted:u,valueOf:s}}]}function On(){var e=!0;this.enabled=function(t){return arguments.length&&(e=!!t),e},this.$get=["$parse","$sceDelegate",function(t,n){if(e&&Ir<8)throw xo("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");var i=ve(_o);i.isEnabled=function(){return e},i.trustAs=n.trustAs,i.getTrusted=n.getTrusted,i.valueOf=n.valueOf,e||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=h),i.parseAs=function(e,n){var r=t(n);return r.literal&&r.constant?r:t(n,function(t){return i.getTrusted(e,t)})};var o=i.parseAs,a=i.getTrusted,s=i.trustAs;return r(_o,function(e,t){var n=Tr(t);i[we("parse_as_"+n)]=function(t){return o(e,t)},i[we("get_trusted_"+n)]=function(t){return a(e,t)},i[we("trust_as_"+n)]=function(t){return s(e,t)}}),i}]}function Mn(){this.$get=["$window","$document",function(e,t){var n,r,i={},o=e.chrome&&e.chrome.app&&e.chrome.app.runtime,a=!o&&e.history&&e.history.pushState,s=f((/android (\d+)/.exec(Tr((e.navigator||{}).userAgent))||[])[1]),u=/Boxee/i.test((e.navigator||{}).userAgent),l=t[0]||{},c=/^(Moz|webkit|ms)(?=[A-Z])/,d=l.body&&l.body.style,p=!1,h=!1;if(d){for(var g in d)if(r=c.exec(g)){n=r[0],n=n[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in d&&"webkit"),p=!!("transition"in d||n+"Transition"in d),h=!!("animation"in d||n+"Animation"in d),!s||p&&h||(p=w(d.webkitTransition),h=w(d.webkitAnimation))}return{history:!(!a||s<4||u),hasEvent:function(e){if("input"===e&&Ir<=11)return!1;if($(i[e])){var t=l.createElement("div");i[e]="on"+e in t}return i[e]},csp:Qr(),vendorPrefix:n,transitions:p,animations:h,android:s}}]}function jn(){var e;this.httpOptions=function(t){return t?(e=t,this):e},this.$get=["$templateCache","$http","$q","$sce",function(t,n,r,i){function o(a,s){function u(e){if(!s)throw So("tpload","Failed to load template: {0} (HTTP status: {1} {2})",a,e.status,e.statusText);return r.reject(e)}o.totalPendingRequests++,w(a)&&!$(t.get(a))||(a=i.getTrustedResourceUrl(a));var c=n.defaults&&n.defaults.transformResponse;return Kr(c)?c=c.filter(function(e){return e!==Et}):c===Et&&(c=null),n.get(a,l({cache:t,transformResponse:c},e))["finally"](function(){o.totalPendingRequests--}).then(function(e){return t.put(a,e.data),e.data},u)}return o.totalPendingRequests=0,o}]}function Pn(){this.$get=["$rootScope","$browser","$location",function(e,t,n){var i={};return i.findBindings=function(e,t,n){var i=e.getElementsByClassName("ng-binding"),o=[];return r(i,function(e){var i=Gr.element(e).data("$binding");i&&r(i,function(r){if(n){var i=new RegExp("(^|\\s)"+Jr(t)+"(\\s|\\||$)");i.test(r)&&o.push(e)}else r.indexOf(t)!=-1&&o.push(e)})}),o},i.findModels=function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var o=n?"=":"*=",a="["+r[i]+"model"+o+'"'+t+'"]',s=e.querySelectorAll(a);if(s.length)return s}},i.getLocation=function(){return n.url()},i.setLocation=function(t){t!==n.url()&&(n.url(t),e.$digest())},i.whenStable=function(e){t.notifyWhenNoOutstandingRequests(e)},i}]}function Tn(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(e,t,n,r,i){function o(o,s,u){S(o)||(u=s,s=o,o=p);var l,c=L(arguments,3),f=m(u)&&!u,d=(f?r:n).defer(),h=d.promise;return l=t.defer(function(){try{d.resolve(o.apply(null,c))}catch(t){d.reject(t),i(t)}finally{delete a[h.$$timeoutId]}f||e.$apply()},s),h.$$timeoutId=l,a[l]=d,h}var a={};return o.cancel=function(e){return!!(e&&e.$$timeoutId in a)&&(a[e.$$timeoutId].reject("canceled"),delete a[e.$$timeoutId],t.defer.cancel(e.$$timeoutId))},o}]}function Dn(e){var t=e;return Ir&&(ko.setAttribute("href",t),t=ko.href),ko.setAttribute("href",t),{href:ko.href,protocol:ko.protocol?ko.protocol.replace(/:$/,""):"",host:ko.host,search:ko.search?ko.search.replace(/^\?/,""):"",hash:ko.hash?ko.hash.replace(/^#/,""):"",hostname:ko.hostname,port:ko.port,pathname:"/"===ko.pathname.charAt(0)?ko.pathname:"/"+ko.pathname}}function Fn(e){var t=w(e)?Dn(e):e;return t.protocol===Eo.protocol&&t.host===Eo.host}function Nn(){this.$get=g(e)}function In(e){function t(e){try{return decodeURIComponent(e)}catch(t){return e}}var n=e[0]||{},r={},i="";return function(){var e,o,a,s,u,l=n.cookie||"";if(l!==i)for(i=l,e=i.split("; "),r={},a=0;a<e.length;a++)o=e[a],s=o.indexOf("="),s>0&&(u=t(o.substring(0,s)),$(r[u])&&(r[u]=t(o.substring(s+1))));return r}}function Rn(){this.$get=In}function Un(e){function t(i,o){if(b(i)){var a={};return r(i,function(e,n){a[n]=t(n,e)}),a}return e.factory(i+n,o)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",Hn),t("date",or),t("filter",Vn),t("json",ar),t("limitTo",sr),t("lowercase",To),t("number",Bn),t("orderBy",lr),t("uppercase",Do)}function Vn(){return function(e,r,i,o){if(!n(e)){if(null==e)return e;throw t("filter")("notarray","Expected array but received: {0}",e)}o=o||"$";var a,s,u=qn(r);switch(u){case"function":a=r;break;case"boolean":case"null":case"number":case"string":s=!0;case"object":a=zn(r,i,o,s);break;default:return e}return Array.prototype.filter.call(e,a)}}function zn(e,t,n,r){var i,o=b(e)&&n in e;return t===!0?t=V:S(t)||(t=function(e,t){return!$(e)&&(null===e||null===t?e===t:!(b(t)||b(e)&&!v(e))&&(e=Tr(""+e),t=Tr(""+t),e.indexOf(t)!==-1))}),i=function(i){return o&&!b(i)?Ln(i,e[n],t,n,!1):Ln(i,e,t,n,r)}}function Ln(e,t,n,r,i,o){var a=qn(e),s=qn(t);if("string"===s&&"!"===t.charAt(0))return!Ln(e,t.substring(1),n,r,i);if(Kr(e))return e.some(function(e){return Ln(e,t,n,r,i)});switch(a){case"object":var u;if(i){for(u in e)if("$"!==u.charAt(0)&&Ln(e[u],t,n,r,!0))return!0;return!o&&Ln(e,t,n,r,!1)}if("object"===s){for(u in t){var l=t[u];if(!S(l)&&!$(l)){var c=u===r,f=c?e:e[u];if(!Ln(f,l,n,r,c,c))return!1}}return!0}return n(e,t);case"function":return!1;default:return n(e,t)}}function qn(e){return null===e?"null":typeof e}function Hn(e){var t=e.NUMBER_FORMATS;return function(e,n,r){return $(n)&&(n=t.CURRENCY_SYM),$(r)&&(r=t.PATTERNS[1].maxFrac),null==e?e:Xn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,r).replace(/\u00A4/g,n)}}function Bn(e){var t=e.NUMBER_FORMATS;return function(e,n){return null==e?e:Xn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function Wn(e){var t,n,r,i,o,a=0;for((n=e.indexOf(Ao))>-1&&(e=e.replace(Ao,"")),(r=e.search(/e/i))>0?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)==Oo;r++);if(r==(o=e.length))t=[0],n=1;else{for(o--;e.charAt(o)==Oo;)o--;for(n-=r,t=[],i=0;r<=o;r++,i++)t[i]=+e.charAt(r)}return n>Co&&(t=t.splice(0,Co-1),a=n-1,n=1),{d:t,e:a,i:n}}function Gn(e,t,n,r){var i=e.d,o=i.length-e.i;t=$(t)?Math.min(Math.max(n,o),r):+t;var a=t+e.i,s=i[a];if(a>0){i.splice(Math.max(e.i,a));for(var u=a;u<i.length;u++)i[u]=0}else{o=Math.max(0,o),e.i=1,i.length=Math.max(1,a=t+1),i[0]=0;for(var l=1;l<a;l++)i[l]=0}if(s>=5)if(a-1<0){for(var c=0;c>a;c--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[a-1]++;for(;o<Math.max(0,t);o++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)}function Xn(e,t,n,r,i){if(!w(e)&&!x(e)||isNaN(e))return"";var o,a=!isFinite(e),s=!1,u=Math.abs(e)+"",l="";if(a)l="∞";else{o=Wn(u),Gn(o,i,t.minFrac,t.maxFrac);var c=o.d,f=o.i,d=o.e,p=[];for(s=c.reduce(function(e,t){return e&&!t},!0);f<0;)c.unshift(0),f++;f>0?p=c.splice(f,c.length):(p=c,c=[0]);var h=[];for(c.length>=t.lgSize&&h.unshift(c.splice(-t.lgSize,c.length).join(""));c.length>t.gSize;)h.unshift(c.splice(-t.gSize,c.length).join(""));c.length&&h.unshift(c.join("")),l=h.join(n),p.length&&(l+=r+p.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function Kn(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=-e+1:(e=-e,i="-")),e=""+e;e.length<t;)e=Oo+e;return n&&(e=e.substr(e.length-t)),i+e}function Yn(e,t,n,r,i){return n=n||0,function(o){var a=o["get"+e]();return(n>0||a>-n)&&(a+=n),0===a&&n==-12&&(a=12),Kn(a,t,r,i)}}function Zn(e,t,n){return function(r,i){var o=r["get"+e](),a=(n?"STANDALONE":"")+(t?"SHORT":""),s=Dr(a+e);return i[s][o]}}function Jn(e,t,n){var r=-1*n,i=r>=0?"+":"";return i+=Kn(Math[r>0?"floor":"ceil"](r/60),2)+Kn(Math.abs(r%60),2)}function Qn(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function er(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+(4-e.getDay()))}function tr(e){return function(t){var n=Qn(t.getFullYear()),r=er(t),i=+r-+n,o=1+Math.round(i/6048e5);return Kn(o,e)}}function nr(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]}function rr(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}function ir(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}function or(e){function t(e){var t;if(t=e.match(n)){var r=new Date(0),i=0,o=0,a=t[8]?r.setUTCFullYear:r.setFullYear,s=t[8]?r.setUTCHours:r.setHours;t[9]&&(i=f(t[9]+t[10]),o=f(t[9]+t[11])),a.call(r,f(t[1]),f(t[2])-1,f(t[3]));var u=f(t[4]||0)-i,l=f(t[5]||0)-o,c=f(t[6]||0),d=Math.round(1e3*parseFloat("0."+(t[7]||0)));return s.call(r,u,l,c,d),r}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i,o){var a,s,u="",l=[];if(i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i,w(n)&&(n=Po.test(n)?f(n):t(n)),x(n)&&(n=new Date(n)),!_(n)||!isFinite(n.getTime()))return n;for(;i;)s=jo.exec(i),s?(l=z(l,s,1),i=l.pop()):(l.push(i),i=null);var c=n.getTimezoneOffset();return o&&(c=G(o,c),n=K(n,o,!0)),r(l,function(t){a=Mo[t],u+=a?a(n,e.DATETIME_FORMATS,c):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),u}}function ar(){return function(e,t){return $(t)&&(t=2),B(e,t)}}function sr(){return function(e,t,r){return t=Math.abs(Number(t))===1/0?Number(t):f(t),isNaN(t)?e:(x(e)&&(e=e.toString()),n(e)?(r=!r||isNaN(r)?0:f(r),r=r<0?Math.max(0,e.length+r):r,t>=0?ur(e,r,r+t):0===r?ur(e,t,e.length):ur(e,Math.max(0,r+t),r)):e)}}function ur(e,t,n){return w(e)?e.slice(t,n):zr.call(e,t,n)}function lr(e){function r(t){return t.map(function(t){var n=1,r=h;if(S(t))r=t;else if(w(t)&&("+"!=t.charAt(0)&&"-"!=t.charAt(0)||(n="-"==t.charAt(0)?-1:1,t=t.substring(1)),""!==t&&(r=e(t),r.constant))){var i=r();r=function(e){return e[i]}}return{get:r,descending:n}})}function i(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function o(e){return S(e.valueOf)&&(e=e.valueOf(),i(e))?e:v(e)&&(e=e.toString(),i(e))?e:e}function a(e,t){var n=typeof e;return null===e?(n="string",e="null"):"object"===n&&(e=o(e)),{value:e,type:n,index:t}}function s(e,t){var n=0,r=e.type,i=t.type;if(r===i){var o=e.value,a=t.value;"string"===r?(o=o.toLowerCase(),a=a.toLowerCase()):"object"===r&&(b(o)&&(o=e.index),b(a)&&(a=t.index)),o!==a&&(n=o<a?-1:1)}else n=r<i?-1:1;return n}return function(e,i,o,u){function l(e,t){return{value:e,tieBreaker:{value:t,type:"number",index:t},predicateValues:f.map(function(n){return a(n.get(e),t)})}}function c(e,t){for(var n=0,r=f.length;n<r;n++){var i=p(e.predicateValues[n],t.predicateValues[n]);if(i)return i*f[n].descending*d}return p(e.tieBreaker,t.tieBreaker)*d}if(null==e)return e;if(!n(e))throw t("orderBy")("notarray","Expected array but received: {0}",e);Kr(i)||(i=[i]),0===i.length&&(i=["+"]);var f=r(i),d=o?-1:1,p=S(u)?u:s,h=Array.prototype.map.call(e,l);return h.sort(c),e=h.map(function(e){return e.value})}}function cr(e){return S(e)&&(e={link:e}),e.restrict=e.restrict||"AC",g(e)}function fr(e,t){e.$name=t}function dr(e,t,n,i,o){var a=this,s=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=o(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=Io,a.$rollbackViewValue=function(){r(s,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){r(s,function(e){e.$commitViewValue()})},a.$addControl=function(e){fe(e.$name,"input"),s.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],a[t]=e,e.$name=t},a.$removeControl=function(e){e.$name&&a[e.$name]===e&&delete a[e.$name],r(a.$pending,function(t,n){a.$setValidity(n,null,e)}),r(a.$error,function(t,n){a.$setValidity(n,null,e)}),r(a.$$success,function(t,n){a.$setValidity(n,null,e)}),R(s,e),e.$$parentForm=Io},Cr({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];if(r){var i=r.indexOf(n);i===-1&&r.push(n)}else e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(R(r,n),0===r.length&&delete e[t])},$animate:i}),a.$setDirty=function(){i.removeClass(e,wa),i.addClass(e,xa),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){i.setClass(e,wa,xa+" "+Ro),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,r(s,function(e){e.$setPristine()})},a.$setUntouched=function(){r(s,function(e){e.$setUntouched()})},a.$setSubmitted=function(){i.addClass(e,Ro),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}function pr(e){e.$formatters.push(function(t){return e.$isEmpty(t)?t:t.toString()})}function hr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r)}function gr(e,t,n,r,i,o){var a=Tr(t[0].type);if(!i.android){var s=!1;t.on("compositionstart",function(){s=!0}),t.on("compositionend",function(){s=!1,l()})}var u,l=function(e){if(u&&(o.defer.cancel(u),u=null),!s){var i=t.val(),l=e&&e.type;"password"===a||n.ngTrim&&"false"===n.ngTrim||(i=Zr(i)),(r.$viewValue!==i||""===i&&r.$$hasNativeValidators)&&r.$setViewValue(i,l)}};if(i.hasEvent("input"))t.on("input",l);else{var c=function(e,t,n){u||(u=o.defer(function(){u=null,t&&t.value===n||l(e)}))};t.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||c(e,this,this.value)}),i.hasEvent("paste")&&t.on("paste cut",c)}t.on("change",l),Jo[a]&&r.$$hasNativeValidators&&a===n.type&&t.on(Zo,function(e){if(!u){var t=this[jr],n=t.badInput,r=t.typeMismatch;u=o.defer(function(){u=null,t.badInput===n&&t.typeMismatch===r||l(e)})}}),r.$render=function(){var e=r.$isEmpty(r.$viewValue)?"":r.$viewValue;t.val()!==e&&t.val(e)}}function vr(e,t){if(_(e))return e;if(w(e)){Xo.lastIndex=0;var n=Xo.exec(e);if(n){var r=+n[1],i=+n[2],o=0,a=0,s=0,u=0,l=Qn(r),c=7*(i-1);return t&&(o=t.getHours(),a=t.getMinutes(),s=t.getSeconds(),u=t.getMilliseconds()),new Date(r,0,l.getDate()+c,o,a,s,u)}}return NaN}function $r(e,t){return function(n,i){var o,a;if(_(n))return n;if(w(n)){if('"'==n.charAt(0)&&'"'==n.charAt(n.length-1)&&(n=n.substring(1,n.length-1)),Lo.test(n))return new Date(n);if(e.lastIndex=0,o=e.exec(n))return o.shift(),a=i?{yyyy:i.getFullYear(),MM:i.getMonth()+1,dd:i.getDate(),HH:i.getHours(),mm:i.getMinutes(),ss:i.getSeconds(),sss:i.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(o,function(e,n){n<t.length&&(a[t[n]]=+e)}),new Date(a.yyyy,a.MM-1,a.dd,a.HH,a.mm,a.ss||0,1e3*a.sss||0)}return NaN}}function mr(e,t,n,r){return function(i,o,a,s,u,l,c){function f(e){return e&&!(e.getTime&&e.getTime()!==e.getTime())}function d(e){return m(e)&&!_(e)?n(e)||void 0:e}br(i,o,a,s),gr(i,o,a,s,u,l);var p,h=s&&s.$options&&s.$options.timezone;if(s.$$parserName=e,s.$parsers.push(function(e){if(s.$isEmpty(e))return null;if(t.test(e)){var r=n(e,p);return h&&(r=K(r,h)),r}}),s.$formatters.push(function(e){if(e&&!_(e))throw Aa("datefmt","Expected `{0}` to be a date",e);return f(e)?(p=e,p&&h&&(p=K(p,h,!0)),c("date")(e,r,h)):(p=null,"")}),m(a.min)||a.ngMin){var g;s.$validators.min=function(e){return!f(e)||$(g)||n(e)>=g},a.$observe("min",function(e){g=d(e),s.$validate()})}if(m(a.max)||a.ngMax){var v;s.$validators.max=function(e){return!f(e)||$(v)||n(e)<=v},a.$observe("max",function(e){v=d(e),s.$validate()})}}}function br(e,t,n,r){var i=t[0],o=r.$$hasNativeValidators=b(i.validity);o&&r.$parsers.push(function(e){var n=t.prop(jr)||{};return n.badInput||n.typeMismatch?void 0:e})}function yr(e,t,n,r,i,o){if(br(e,t,n,r),gr(e,t,n,r,i,o),r.$$parserName="number",r.$parsers.push(function(e){return r.$isEmpty(e)?null:Bo.test(e)?parseFloat(e):void 0}),r.$formatters.push(function(e){if(!r.$isEmpty(e)){if(!x(e))throw Aa("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e}),m(n.min)||n.ngMin){var a;r.$validators.min=function(e){return r.$isEmpty(e)||$(a)||e>=a},n.$observe("min",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),a=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}if(m(n.max)||n.ngMax){var s;r.$validators.max=function(e){return r.$isEmpty(e)||$(s)||e<=s},n.$observe("max",function(e){m(e)&&!x(e)&&(e=parseFloat(e)),s=x(e)&&!isNaN(e)?e:void 0,r.$validate()})}}function wr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||qo.test(n)}}function xr(e,t,n,r,i,o){gr(e,t,n,r,i,o),pr(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ho.test(n)}}function _r(e,t,n,r){$(n.name)&&t.attr("name",a());var i=function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)};t.on("click",i),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)}function Sr(e,t,n,r,i){var o;if(m(r)){if(o=e(r),!o.constant)throw Aa("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return o(t)}return i}function kr(e,t,n,r,i,o,a,s){var u=Sr(s,e,"ngTrueValue",n.ngTrueValue,!0),l=Sr(s,e,"ngFalseValue",n.ngFalseValue,!1),c=function(e){r.$setViewValue(t[0].checked,e&&e.type)};t.on("click",c),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return e===!1},r.$formatters.push(function(e){return V(e,u)}),r.$parsers.push(function(e){return e?u:l})}function Er(e,t){return e="ngClass"+e,["$animate",function(n){function i(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],o=0;o<t.length;o++)if(i==t[o])continue e;n.push(i)}return n}function o(e){var t=[];return Kr(e)?(r(e,function(e){t=t.concat(o(e))}),t):w(e)?e.split(" "):b(e)?(r(e,function(e,n){e&&(t=t.concat(n.split(" ")))}),t):e}return{restrict:"AC",link:function(a,s,u){function l(e){var t=f(e,1);u.$addClass(t)}function c(e){var t=f(e,-1);u.$removeClass(t)}function f(e,t){var n=s.data("$classCounts")||he(),i=[];return r(e,function(e){(t>0||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(t>0)&&i.push(e))}),s.data("$classCounts",n),i.join(" ")}function d(e,t){var r=i(t,e),o=i(e,t);r=f(r,1),o=f(o,-1),r&&r.length&&n.addClass(s,r),o&&o.length&&n.removeClass(s,o)}function p(e){if(t===!0||(1&a.$index)===t){var n=o(e||[]);if(h){if(!V(e,h)){var r=o(h);d(r,n)}}else l(n)}h=Kr(e)?e.map(function(e){return ve(e)}):ve(e)}var h;a.$watch(u[e],p,!0),u.$observe("class",function(t){p(a.$eval(u[e]))}),"ngClass"!==e&&a.$watch("$index",function(n,r){var i=1&n;if(i!==(1&r)){var s=o(a.$eval(u[e]));i===t?l(s):c(s)}})}}}]}function Cr(e){function t(e,t,s){$(t)?n("$pending",e,s):r("$pending",e,s),j(t)?t?(c(a.$error,e,s),l(a.$$success,e,s)):(l(a.$error,e,s),c(a.$$success,e,s)):(c(a.$error,e,s),c(a.$$success,e,s)),a.$pending?(i(ka,!0),a.$valid=a.$invalid=void 0,o("",null)):(i(ka,!1),a.$valid=Ar(a.$error),a.$invalid=!a.$valid,o("",a.$valid));var u;u=a.$pending&&a.$pending[e]?void 0:!a.$error[e]&&(!!a.$$success[e]||null),o(e,u),a.$$parentForm.$setValidity(e,u,a)}function n(e,t,n){a[e]||(a[e]={}),l(a[e],t,n)}function r(e,t,n){a[e]&&c(a[e],t,n),Ar(a[e])&&(a[e]=void 0)}function i(e,t){t&&!u[e]?(f.addClass(s,e),u[e]=!0):!t&&u[e]&&(f.removeClass(s,e),u[e]=!1)}function o(e,t){e=e?"-"+se(e,"-"):"",i(ba+e,t===!0),i(ya+e,t===!1)}var a=e.ctrl,s=e.$element,u={},l=e.set,c=e.unset,f=e.$animate;u[ya]=!(u[ba]=s.hasClass(ba)),a.$setValidity=t}function Ar(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function Or(e){e[0].hasAttribute("selected")&&(e[0].selected=!0)}var Mr=/^\/(.+)\/([a-z]*)$/,jr="validity",Pr=Object.prototype.hasOwnProperty,Tr=function(e){return w(e)?e.toLowerCase():e},Dr=function(e){return w(e)?e.toUpperCase():e},Fr=function(e){return w(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},Nr=function(e){return w(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(e.charCodeAt(0)&-33)}):e};"i"!=="I".toLowerCase()&&(Tr=Fr,Dr=Nr);var Ir,Rr,Ur,Vr,zr=[].slice,Lr=[].splice,qr=[].push,Hr=Object.prototype.toString,Br=Object.getPrototypeOf,Wr=t("ng"),Gr=e.angular||(e.angular={}),Xr=0;Ir=e.document.documentMode,p.$inject=[],h.$inject=[];var Kr=Array.isArray,Yr=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/,Zr=function(e){return w(e)?e.trim():e},Jr=function(e){return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},Qr=function(){function t(){try{return new Function(""),!1}catch(e){return!0}}if(!m(Qr.rules)){var n=e.document.querySelector("[ng-csp]")||e.document.querySelector("[data-ng-csp]");if(n){var r=n.getAttribute("ng-csp")||n.getAttribute("data-ng-csp");Qr.rules={noUnsafeEval:!r||r.indexOf("no-unsafe-eval")!==-1,noInlineStyle:!r||r.indexOf("no-inline-style")!==-1}}else Qr.rules={noUnsafeEval:t(),noInlineStyle:!1}}return Qr.rules},ei=function(){if(m(ei.name_))return ei.name_;var t,n,r,i,o=ni.length;for(n=0;n<o;++n)if(r=ni[n],t=e.document.querySelector("["+r.replace(":","\\:")+"jq]")){i=t.getAttribute(r+"jq");break}return ei.name_=i},ti=/:/g,ni=["ng-","data-ng-","ng:","x-ng-"],ri=/[A-Z]/g,ii=!1,oi=1,ai=2,si=3,ui=8,li=9,ci=11,fi={full:"1.5.8",major:1,minor:5,dot:8,codeName:"arbitrary-fallbacks"};Oe.expando="ng339";var di=Oe.cache={},pi=1,hi=function(e,t,n){e.addEventListener(t,n,!1)},gi=function(e,t,n){e.removeEventListener(t,n,!1)};Oe._data=function(e){return this.cache[e[this.expando]]||{}};var vi=/([\:\-\_]+(.))/g,$i=/^moz([A-Z])/,mi={mouseleave:"mouseout",mouseenter:"mouseover"},bi=t("jqLite"),yi=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,wi=/<|&#?\w+;/,xi=/<([\w:-]+)/,_i=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Si={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,"",""]};Si.optgroup=Si.option,Si.tbody=Si.tfoot=Si.colgroup=Si.caption=Si.thead,Si.th=Si.td;var ki=e.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))},Ei=Oe.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;"complete"===e.document.readyState?e.setTimeout(n):(this.on("DOMContentLoaded",n),Oe(e).on("load",n))},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return Rr(e>=0?this[e]:this[this.length+e])},length:0,push:qr,sort:[].sort,splice:[].splice},Ci={};r("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){Ci[Tr(e)]=e});var Ai={};r("input,select,option,textarea,button,form,details".split(","),function(e){Ai[e]=!0});var Oi={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};r({data:Fe,removeData:Te,hasData:Se,cleanData:ke},function(e,t){Oe[t]=e}),r({data:Fe,inheritedData:ze,scope:function(e){return Rr.data(e,"$scope")||ze(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return Rr.data(e,"$isolateScope")||Rr.data(e,"$isolateScopeNoTemplate")},controller:Ve,injector:function(e){return ze(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:Ne,css:function(e,t,n){return t=we(t),m(n)?void(e.style[t]=n):e.style[t]},attr:function(e,t,n){var r=e.nodeType;if(r!==si&&r!==ai&&r!==ui){var i=Tr(t);if(Ci[i]){if(!m(n))return e[t]||(e.attributes.getNamedItem(t)||p).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(m(n))e.setAttribute(t,n);else if(e.getAttribute){var o=e.getAttribute(t,2);return null===o?void 0:o}}},prop:function(e,t,n){return m(n)?void(e[t]=n):e[t]},text:function(){function e(e,t){if($(t)){var n=e.nodeType;return n===oi||n===si?e.textContent:""}e.textContent=t}return e.$dv="",e}(),val:function(e,t){if($(t)){if(e.multiple&&"select"===I(e)){var n=[];return r(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){return $(t)?e.innerHTML:(je(e,!0),void(e.innerHTML=t))},empty:Le},function(e,t){Oe.prototype[t]=function(t,n){var r,i,o=this.length;if(e!==Le&&$(2==e.length&&e!==Ne&&e!==Ve?t:n)){if(b(t)){for(r=0;r<o;r++)if(e===Fe)e(this[r],t);else for(i in t)e(this[r],i,t[i]);return this}for(var a=e.$dv,s=$(a)?Math.min(o,1):o,u=0;u<s;u++){var l=e(this[u],t,n);a=a?a+l:l}return a}for(r=0;r<o;r++)e(this[r],t,n);return this}}),r({removeData:Te,on:function(e,t,n,r){if(m(r))throw bi("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(_e(e)){var i=De(e,!0),o=i.events,a=i.handle;a||(a=i.handle=Ge(e,o));for(var s=t.indexOf(" ")>=0?t.split(" "):[t],u=s.length,l=function(t,r,i){var s=o[t];s||(s=o[t]=[],s.specialHandlerWrapper=r,"$destroy"===t||i||hi(e,t,a)),s.push(n)};u--;)t=s[u],mi[t]?(l(mi[t],Ke),l(t,void 0,!0)):l(t)}},off:Pe,one:function(e,t,n){e=Rr(e),e.on(t,function r(){e.off(t,n),e.off(t,r)}),e.on(t,n)},replaceWith:function(e,t){var n,i=e.parentNode;je(e),r(new Oe(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===oi&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===oi||n===ci){t=new Oe(t);for(var r=0,i=t.length;r<i;r++){var o=t[r];e.appendChild(o)}}},prepend:function(e,t){if(e.nodeType===oi){var n=e.firstChild;r(new Oe(t),function(t){e.insertBefore(t,n)})}},wrap:function(e,t){Ae(e,Rr(t).eq(0).clone()[0])},remove:qe,detach:function(e){qe(e,!0)},after:function(e,t){var n=e,r=e.parentNode;t=new Oe(t);for(var i=0,o=t.length;i<o;i++){var a=t[i];r.insertBefore(a,n.nextSibling),n=a}},addClass:Re,removeClass:Ie,toggleClass:function(e,t,n){t&&r(t.split(" "),function(t){var r=n;$(r)&&(r=!Ne(e,t)),(r?Re:Ie)(e,t)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==ci?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:Me,triggerHandler:function(e,t,n){var i,o,a,s=t.type||t,u=De(e),c=u&&u.events,f=c&&c[s];f&&(i={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return this.defaultPrevented===!0},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return this.immediatePropagationStopped===!0},stopPropagation:p,type:s,target:e},t.type&&(i=l(i,t)),o=ve(f),a=n?[i].concat(n):[i],r(o,function(t){i.isImmediatePropagationStopped()||t.apply(e,a)}))}},function(e,t){Oe.prototype[t]=function(t,n,r){for(var i,o=0,a=this.length;o<a;o++)$(i)?(i=e(this[o],t,n,r),m(i)&&(i=Rr(i))):Ue(i,e(this[o],t,n,r));return m(i)?i:this},Oe.prototype.bind=Oe.prototype.on,Oe.prototype.unbind=Oe.prototype.off}),Je.prototype={put:function(e,t){this[Ze(e,this.nextUid)]=t},get:function(e){return this[Ze(e,this.nextUid)]},remove:function(e){var t=this[e=Ze(e,this.nextUid)];return delete this[e],t}};var Mi=[function(){this.$get=[function(){return Je}]}],ji=/^([^\(]+?)=>/,Pi=/^[^\(]*\(\s*([^\)]*)\)/m,Ti=/,/,Di=/^\s*(_?)(\S+?)\1\s*$/,Fi=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Ni=t("$injector");rt.$$annotate=nt;var Ii=t("$animate"),Ri=1,Ui="ng-animate",Vi=function(){this.$get=p},zi=function(){var e=new Je,t=[];this.$get=["$$AnimateRunner","$rootScope",function(n,i){function o(e,t,n){var i=!1;return t&&(t=w(t)?t.split(" "):Kr(t)?t:[],r(t,function(t){t&&(i=!0,e[t]=n)})),i}function a(){r(t,function(t){var n=e.get(t);if(n){var i=st(t.attr("class")),o="",a="";r(n,function(e,t){var n=!!i[t];e!==n&&(e?o+=(o.length?" ":"")+t:a+=(a.length?" ":"")+t)}),r(t,function(e){o&&Re(e,o),a&&Ie(e,a)}),e.remove(t)}}),t.length=0}function s(n,r,s){var u=e.get(n)||{},l=o(u,r,!0),c=o(u,s,!1);(l||c)&&(e.put(n,u),t.push(n),1===t.length&&i.$$postDigest(a))}return{enabled:p,on:p,off:p,pin:p,push:function(e,t,r,i){i&&i(),r=r||{},r.from&&e.css(r.from),r.to&&e.css(r.to),(r.addClass||r.removeClass)&&s(e,r.addClass,r.removeClass);var o=new n;return o.complete(),o}}}]},Li=["$provide",function(e){var t=this;this.$$registeredAnimations=Object.create(null),this.register=function(n,r){if(n&&"."!==n.charAt(0))throw Ii("notcsel","Expecting class selector starting with '.' got '{0}'.",n);var i=n+"-animation";t.$$registeredAnimations[n.substr(1)]=i,e.factory(i,r)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter)){var t=new RegExp("(\\s+|\\/)"+Ui+"(\\s+|\\/)");if(t.test(this.$$classNameFilter.toString()))throw Ii("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',Ui)}return this.$$classNameFilter},this.$get=["$$animateQueue",function(e){function t(e,t,n){if(n){var r=at(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:e.on,off:e.off,pin:e.pin,enabled:e.enabled,cancel:function(e){e.end&&e.end()},enter:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"enter",ut(o))},move:function(n,r,i,o){return r=r&&Rr(r),i=i&&Rr(i),r=r||i.parent(),t(n,r,i),e.push(n,"move",ut(o))},leave:function(t,n){return e.push(t,"leave",ut(n),function(){t.remove()})},addClass:function(t,n,r){return r=ut(r),r.addClass=ot(r.addclass,n),e.push(t,"addClass",r)},removeClass:function(t,n,r){return r=ut(r),r.removeClass=ot(r.removeClass,n),e.push(t,"removeClass",r)},setClass:function(t,n,r,i){return i=ut(i),i.addClass=ot(i.addClass,n),i.removeClass=ot(i.removeClass,r),e.push(t,"setClass",i)},animate:function(t,n,r,i,o){return o=ut(o),o.from=o.from?l(o.from,n):n,o.to=o.to?l(o.to,r):r,i=i||"ng-inline-animate",o.tempClasses=ot(o.tempClasses,i),e.push(t,"animate",o)}}}]}],qi=function(){this.$get=["$$rAF",function(e){function t(t){n.push(t),n.length>1||e(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}var n=[];return function(){var e=!1;return t(function(){e=!0}),function(n){e?n():t(n)}}}]},Hi=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(e,t,n,i,o){
|
6 |
+
function a(e){this.setHost(e);var t=n(),r=function(e){o(e,0,!1)};this._doneCallbacks=[],this._tick=function(e){var n=i[0];n&&n.hidden?r(e):t(e)},this._state=0}var s=0,u=1,l=2;return a.chain=function(e,t){function n(){return r===e.length?void t(!0):void e[r](function(e){return e===!1?void t(!1):(r++,void n())})}var r=0;n()},a.all=function(e,t){function n(n){o=o&&n,++i===e.length&&t(o)}var i=0,o=!0;r(e,function(e){e.done(n)})},a.prototype={setHost:function(e){this.host=e||{}},done:function(e){this._state===l?e():this._doneCallbacks.push(e)},progress:p,getPromise:function(){if(!this.promise){var t=this;this.promise=e(function(e,n){t.done(function(t){t===!1?n():e()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},"catch":function(e){return this.getPromise()["catch"](e)},"finally":function(e){return this.getPromise()["finally"](e)},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(e){var t=this;t._state===s&&(t._state=u,t._tick(function(){t._resolve(e)}))},_resolve:function(e){this._state!==l&&(r(this._doneCallbacks,function(t){t(e)}),this._doneCallbacks.length=0,this._state=l)}},a}]},Bi=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(e,t,n){return function(t,r){function i(){return e(function(){o(),s||u.complete(),s=!0}),u}function o(){a.addClass&&(t.addClass(a.addClass),a.addClass=null),a.removeClass&&(t.removeClass(a.removeClass),a.removeClass=null),a.to&&(t.css(a.to),a.to=null)}var a=r||{};a.$$prepared||(a=U(a)),a.cleanupStyles&&(a.from=a.to=null),a.from&&(t.css(a.from),a.from=null);var s,u=new n;return{start:i,end:i}}}]},Wi=t("$compile"),Gi=new pt;ht.$inject=["$provide","$$sanitizeUriProvider"],gt.prototype.isFirstChange=function(){return this.previousValue===Gi};var Xi=/^((?:x|data)[\:\-_])/i,Ki=t("$controller"),Yi=/^(\S+)(\s+as\s+([\w$]+))?$/,Zi=function(){this.$get=["$document",function(e){return function(t){return t?!t.nodeType&&t instanceof Rr&&(t=t[0]):t=e[0].body,t.offsetWidth+1}}]},Ji="application/json",Qi={"Content-Type":Ji+";charset=utf-8"},eo=/^\[|^\{(?!\{)/,to={"[":/]$/,"{":/}$/},no=/^\)\]\}',?\n/,ro=t("$http"),io=function(e){return function(){throw ro("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}},oo=Gr.$interpolateMinErr=t("$interpolate");oo.throwNoconcat=function(e){throw oo("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce",e)},oo.interr=function(e,t){return oo("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var ao=function(){this.$get=["$window",function(e){function t(e){var t=function(e){t.data=e,t.called=!0};return t.id=e,t}var n=e.angular.callbacks,r={};return{createCallback:function(e){var i="_"+(n.$$counter++).toString(36),o="angular.callbacks."+i,a=t(i);return r[o]=n[i]=a,o},wasCalled:function(e){return r[e].called},getResponse:function(e){return r[e].data},removeCallback:function(e){var t=r[e];delete n[t.id],delete r[e]}}}]},so=/^([^\?#]*)(\?([^#]*))?(#(.*))?$/,uo={http:80,https:443,ftp:21},lo=t("$location"),co={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:Yt("$$absUrl"),url:function(e){if($(e))return this.$$url;var t=so.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:Yt("$$protocol"),host:Yt("$$host"),port:Yt("$$port"),path:Zt("$$path",function(e){return e=null!==e?e.toString():"","/"==e.charAt(0)?e:"/"+e}),search:function(e,t){switch(arguments.length){case 0:return this.$$search;case 1:if(w(e)||x(e))e=e.toString(),this.$$search=J(e);else{if(!b(e))throw lo("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");e=U(e,{}),r(e,function(t,n){null==t&&delete e[n]}),this.$$search=e}break;default:$(t)||null===t?delete this.$$search[e]:this.$$search[e]=t}return this.$$compose(),this},hash:Zt("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};r([Kt,Xt,Gt],function(e){e.prototype=Object.create(co),e.prototype.state=function(t){if(!arguments.length)return this.$$state;if(e!==Gt||!this.$$html5)throw lo("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=$(t)?null:t,this}});var fo=t("$parse"),po=Function.prototype.call,ho=Function.prototype.apply,go=Function.prototype.bind,vo=he();r("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){vo[e]=!0});var $o={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},mo=function(e){this.options=e};mo.prototype={constructor:mo,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=vo[t],o=vo[n],a=vo[r];if(i||o||a){var s=a?r:o?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return t.indexOf(e)!==-1},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\x0B"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return n>=55296&&n<=56319&&r>=56320&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=m(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw fo("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=Tr(this.text.charAt(this.index));if("."==n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"==n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"==e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!=e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var o=this.text.charAt(this.index);if(r+=o,i){if("u"===o){var a=this.text.substring(this.index+1,this.index+5);a.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+a+"]"),this.index+=4,n+=String.fromCharCode(parseInt(a,16))}else{var s=$o[o];n+=s||o}i=!1}else if("\\"===o)i=!0;else{if(o===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=o}this.index++}this.throwError("Unterminated quote",t)}};var bo=function(e,t){this.lexer=e,this.options=t};bo.Program="Program",bo.ExpressionStatement="ExpressionStatement",bo.AssignmentExpression="AssignmentExpression",bo.ConditionalExpression="ConditionalExpression",bo.LogicalExpression="LogicalExpression",bo.BinaryExpression="BinaryExpression",bo.UnaryExpression="UnaryExpression",bo.CallExpression="CallExpression",bo.MemberExpression="MemberExpression",bo.Identifier="Identifier",bo.Literal="Literal",bo.ArrayExpression="ArrayExpression",bo.Property="Property",bo.ObjectExpression="ObjectExpression",bo.ThisExpression="ThisExpression",bo.LocalsExpression="LocalsExpression",bo.NGValueParameter="NGValueParameter",bo.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:bo.Program,body:e}},expressionStatement:function(){return{type:bo.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e,t=this.expression();e=this.expect("|");)t=this.filter(t);return t},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();return this.expect("=")&&(e={type:bo.AssignmentExpression,left:e,right:this.assignment(),operator:"="}),e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:bo.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:bo.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:bo.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:bo.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:bo.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e;this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=U(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:bo.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());for(var t;t=this.expect("(","[",".");)"("===t.text?(e={type:bo.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:bo.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:bo.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:bo.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)do e.push(this.filterChain());while(this.expect(","));return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:bo.Identifier,name:e.text}},constant:function(){return{type:bo.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:bo.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:bo.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:bo.ObjectExpression,properties:t}},throwError:function(e,t){throw fo("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw fo("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var o=this.tokens[e],a=o.text;if(a===t||a===n||a===r||a===i||!t&&!n&&!r&&!i)return o}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{"this":{type:bo.ThisExpression},$locals:{type:bo.LocalsExpression}}},gn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},ln(i,n.$filter);var o,a="";if(this.stage="assign",o=dn(i)){this.state.computing="assign";var s=this.nextId();this.recurse(o,s),this.return_(s),a="fn.assign="+this.generateFunction("assign","s,v,l")}var u=cn(i.body);n.stage="inputs",r(u,function(e,t){var r="fn"+t;n.state[r]={vars:[],body:[],own:{}},n.state.computing=r;var i=n.nextId();n.recurse(e,i),n.return_(i),n.state.inputs.push(r),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(i);var l='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",c=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",l)(this.$filter,en,nn,rn,tn,on,an,sn,e);return this.state=this.stage=void 0,c.literal=pn(i),c.constant=hn(i),c},USE:"use",STRICT:"strict",watchFns:function(){var e=[],t=this.state.inputs,n=this;return r(t,function(t){e.push("var "+t+"="+n.generateFunction(t,"s"))}),t.length&&e.push("fn.inputs=["+t.join(",")+"];"),e.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var e=[],t=this;return r(this.state.filters,function(n,r){e.push(n+"=$filter("+t.escape(r)+")")}),e.length?"var "+e.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(e,t,n,i,o,a){var s,u,l,c,f,d=this;if(i=i||p,!a&&m(e.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",e.watchId)),this.lazyRecurse(e,t,n,i,o,!0));switch(e.type){case bo.Program:r(e.body,function(t,n){d.recurse(t.expression,void 0,void 0,function(e){u=e}),n!==e.body.length-1?d.current().body.push(u,";"):d.return_(u)});break;case bo.Literal:c=this.escape(e.value),this.assign(t,c),i(c);break;case bo.UnaryExpression:this.recurse(e.argument,void 0,void 0,function(e){u=e}),c=e.operator+"("+this.ifDefined(u,0)+")",this.assign(t,c),i(c);break;case bo.BinaryExpression:this.recurse(e.left,void 0,void 0,function(e){s=e}),this.recurse(e.right,void 0,void 0,function(e){u=e}),c="+"===e.operator?this.plus(s,u):"-"===e.operator?this.ifDefined(s,0)+e.operator+this.ifDefined(u,0):"("+s+")"+e.operator+"("+u+")",this.assign(t,c),i(c);break;case bo.LogicalExpression:t=t||this.nextId(),d.recurse(e.left,t),d.if_("&&"===e.operator?t:d.not(t),d.lazyRecurse(e.right,t)),i(t);break;case bo.ConditionalExpression:t=t||this.nextId(),d.recurse(e.test,t),d.if_(t,d.lazyRecurse(e.alternate,t),d.lazyRecurse(e.consequent,t)),i(t);break;case bo.Identifier:t=t||this.nextId(),n&&(n.context="inputs"===d.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",e.name)+"?l:s"),n.computed=!1,n.name=e.name),en(e.name),d.if_("inputs"===d.stage||d.not(d.getHasOwnProperty("l",e.name)),function(){d.if_("inputs"===d.stage||"s",function(){o&&1!==o&&d.if_(d.not(d.nonComputedMember("s",e.name)),d.lazyAssign(d.nonComputedMember("s",e.name),"{}")),d.assign(t,d.nonComputedMember("s",e.name))})},t&&d.lazyAssign(t,d.nonComputedMember("l",e.name))),(d.state.expensiveChecks||$n(e.name))&&d.addEnsureSafeObject(t),i(t);break;case bo.MemberExpression:s=n&&(n.context=this.nextId())||this.nextId(),t=t||this.nextId(),d.recurse(e.object,s,void 0,function(){d.if_(d.notNull(s),function(){o&&1!==o&&d.addEnsureSafeAssignContext(s),e.computed?(u=d.nextId(),d.recurse(e.property,u),d.getStringValue(u),d.addEnsureSafeMemberName(u),o&&1!==o&&d.if_(d.not(d.computedMember(s,u)),d.lazyAssign(d.computedMember(s,u),"{}")),c=d.ensureSafeObject(d.computedMember(s,u)),d.assign(t,c),n&&(n.computed=!0,n.name=u)):(en(e.property.name),o&&1!==o&&d.if_(d.not(d.nonComputedMember(s,e.property.name)),d.lazyAssign(d.nonComputedMember(s,e.property.name),"{}")),c=d.nonComputedMember(s,e.property.name),(d.state.expensiveChecks||$n(e.property.name))&&(c=d.ensureSafeObject(c)),d.assign(t,c),n&&(n.computed=!1,n.name=e.property.name))},function(){d.assign(t,"undefined")}),i(t)},!!o);break;case bo.CallExpression:t=t||this.nextId(),e.filter?(u=d.filter(e.callee.name),l=[],r(e.arguments,function(e){var t=d.nextId();d.recurse(e,t),l.push(t)}),c=u+"("+l.join(",")+")",d.assign(t,c),i(t)):(u=d.nextId(),s={},l=[],d.recurse(e.callee,u,s,function(){d.if_(d.notNull(u),function(){d.addEnsureSafeFunction(u),r(e.arguments,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(d.ensureSafeObject(e))})}),s.name?(d.state.expensiveChecks||d.addEnsureSafeObject(s.context),c=d.member(s.context,s.name,s.computed)+"("+l.join(",")+")"):c=u+"("+l.join(",")+")",c=d.ensureSafeObject(c),d.assign(t,c)},function(){d.assign(t,"undefined")}),i(t)}));break;case bo.AssignmentExpression:if(u=this.nextId(),s={},!fn(e.left))throw fo("lval","Trying to assign a value to a non l-value");this.recurse(e.left,void 0,s,function(){d.if_(d.notNull(s.context),function(){d.recurse(e.right,u),d.addEnsureSafeObject(d.member(s.context,s.name,s.computed)),d.addEnsureSafeAssignContext(s.context),c=d.member(s.context,s.name,s.computed)+e.operator+u,d.assign(t,c),i(t||c)})},1);break;case bo.ArrayExpression:l=[],r(e.elements,function(e){d.recurse(e,d.nextId(),void 0,function(e){l.push(e)})}),c="["+l.join(",")+"]",this.assign(t,c),i(c);break;case bo.ObjectExpression:l=[],f=!1,r(e.properties,function(e){e.computed&&(f=!0)}),f?(t=t||this.nextId(),this.assign(t,"{}"),r(e.properties,function(e){e.computed?(s=d.nextId(),d.recurse(e.key,s)):s=e.key.type===bo.Identifier?e.key.name:""+e.key.value,u=d.nextId(),d.recurse(e.value,u),d.assign(d.member(t,s,e.computed),u)})):(r(e.properties,function(t){d.recurse(t.value,e.constant?void 0:d.nextId(),void 0,function(e){l.push(d.escape(t.key.type===bo.Identifier?t.key.name:""+t.key.value)+":"+e)})}),c="{"+l.join(",")+"}",this.assign(t,c)),i(t||c);break;case bo.ThisExpression:this.assign(t,"s"),i("s");break;case bo.LocalsExpression:this.assign(t,"l"),i("l");break;case bo.NGValueParameter:this.assign(t,"v"),i("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(e===!0)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){var n=/[$_a-zA-Z][$_a-zA-Z0-9]*/,r=/[^$_a-zA-Z0-9]/g;return n.test(t)?e+"."+t:e+'["'+t.replace(r,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,o){var a=this;return function(){a.recurse(e,t,n,r,i,o)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(w(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(e))return e.toString();if(e===!0)return"true";if(e===!1)return"false";if(null===e)return"null";if("undefined"==typeof e)return"undefined";throw fo("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},vn.prototype={compile:function(e,t){var n=this,i=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,ln(i,n.$filter);var o,a;(o=dn(i))&&(a=this.recurse(o));var s,u=cn(i.body);u&&(s=[],r(u,function(e,t){var r=n.recurse(e);e.input=r,s.push(r),e.watchId=t}));var l=[];r(i.body,function(e){l.push(n.recurse(e.expression))});var c=0===i.body.length?p:1===i.body.length?l[0]:function(e,t){var n;return r(l,function(r){n=r(e,t)}),n};return a&&(c.assign=function(e,t,n){return a(e,n,t)}),s&&(c.inputs=s),c.literal=pn(i),c.constant=hn(i),c},recurse:function(e,t,n){var i,o,a,s=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case bo.Literal:return this.value(e.value,t);case bo.UnaryExpression:return o=this.recurse(e.argument),this["unary"+e.operator](o,t);case bo.BinaryExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.LogicalExpression:return i=this.recurse(e.left),o=this.recurse(e.right),this["binary"+e.operator](i,o,t);case bo.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),t);case bo.Identifier:return en(e.name,s.expression),s.identifier(e.name,s.expensiveChecks||$n(e.name),t,n,s.expression);case bo.MemberExpression:return i=this.recurse(e.object,!1,!!n),e.computed||(en(e.property.name,s.expression),o=e.property.name),e.computed&&(o=this.recurse(e.property)),e.computed?this.computedMember(i,o,t,n,s.expression):this.nonComputedMember(i,o,s.expensiveChecks,t,n,s.expression);case bo.CallExpression:return a=[],r(e.arguments,function(e){a.push(s.recurse(e))}),e.filter&&(o=this.$filter(e.callee.name)),e.filter||(o=this.recurse(e.callee,!0)),e.filter?function(e,n,r,i){for(var s=[],u=0;u<a.length;++u)s.push(a[u](e,n,r,i));var l=o.apply(void 0,s,i);return t?{context:void 0,name:void 0,value:l}:l}:function(e,n,r,i){var u,l=o(e,n,r,i);if(null!=l.value){nn(l.context,s.expression),rn(l.value,s.expression);for(var c=[],f=0;f<a.length;++f)c.push(nn(a[f](e,n,r,i),s.expression));u=nn(l.value.apply(l.context,c),s.expression)}return t?{value:u}:u};case bo.AssignmentExpression:return i=this.recurse(e.left,!0,1),o=this.recurse(e.right),function(e,n,r,a){var u=i(e,n,r,a),l=o(e,n,r,a);return nn(u.value,s.expression),on(u.context),u.context[u.name]=l,t?{value:l}:l};case bo.ArrayExpression:return a=[],r(e.elements,function(e){a.push(s.recurse(e))}),function(e,n,r,i){for(var o=[],s=0;s<a.length;++s)o.push(a[s](e,n,r,i));return t?{value:o}:o};case bo.ObjectExpression:return a=[],r(e.properties,function(e){e.computed?a.push({key:s.recurse(e.key),computed:!0,value:s.recurse(e.value)}):a.push({key:e.key.type===bo.Identifier?e.key.name:""+e.key.value,computed:!1,value:s.recurse(e.value)})}),function(e,n,r,i){for(var o={},s=0;s<a.length;++s)a[s].computed?o[a[s].key(e,n,r,i)]=a[s].value(e,n,r,i):o[a[s].key]=a[s].value(e,n,r,i);return t?{value:o}:o};case bo.ThisExpression:return function(e){return t?{value:e}:e};case bo.LocalsExpression:return function(e,n){return t?{value:n}:n};case bo.NGValueParameter:return function(e,n,r){return t?{value:r}:r}}},"unary+":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?+a:0,t?{value:a}:a}},"unary-":function(e,t){return function(n,r,i,o){var a=e(n,r,i,o);return a=m(a)?-a:0,t?{value:a}:a}},"unary!":function(e,t){return function(n,r,i,o){var a=!e(n,r,i,o);return t?{value:a}:a}},"binary+":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=sn(s,u);return n?{value:l}:l}},"binary-":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a),u=t(r,i,o,a),l=(m(s)?s:0)-(m(u)?u:0);return n?{value:l}:l}},"binary*":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)*t(r,i,o,a);return n?{value:s}:s}},"binary/":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)/t(r,i,o,a);return n?{value:s}:s}},"binary%":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)%t(r,i,o,a);return n?{value:s}:s}},"binary===":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)===t(r,i,o,a);return n?{value:s}:s}},"binary!==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!==t(r,i,o,a);return n?{value:s}:s}},"binary==":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)==t(r,i,o,a);return n?{value:s}:s}},"binary!=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)!=t(r,i,o,a);return n?{value:s}:s}},"binary<":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<t(r,i,o,a);return n?{value:s}:s}},"binary>":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>t(r,i,o,a);return n?{value:s}:s}},"binary<=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)<=t(r,i,o,a);return n?{value:s}:s}},"binary>=":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)>=t(r,i,o,a);return n?{value:s}:s}},"binary&&":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)&&t(r,i,o,a);return n?{value:s}:s}},"binary||":function(e,t,n){return function(r,i,o,a){var s=e(r,i,o,a)||t(r,i,o,a);return n?{value:s}:s}},"ternary?:":function(e,t,n,r){return function(i,o,a,s){var u=e(i,o,a,s)?t(i,o,a,s):n(i,o,a,s);return r?{value:u}:u}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(e,t,n,r,i){return function(o,a,s,u){var l=a&&e in a?a:o;r&&1!==r&&l&&!l[e]&&(l[e]={});var c=l?l[e]:void 0;return t&&nn(c,i),n?{context:l,name:e,value:c}:c}},computedMember:function(e,t,n,r,i){return function(o,a,s,u){var l,c,f=e(o,a,s,u);return null!=f&&(l=t(o,a,s,u),l=tn(l),en(l,i),r&&1!==r&&(on(f),f&&!f[l]&&(f[l]={})),c=f[l],nn(c,i)),n?{context:f,name:l,value:c}:c}},nonComputedMember:function(e,t,n,r,i,o){return function(a,s,u,l){var c=e(a,s,u,l);i&&1!==i&&(on(c),c&&!c[t]&&(c[t]={}));var f=null!=c?c[t]:void 0;return(n||$n(t))&&nn(f,o),r?{context:c,name:t,value:f}:f}},inputs:function(e,t){return function(n,r,i,o){return o?o[t]:e(n,r,i)}}};var yo=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new bo(e,n),this.astCompiler=n.csp?new vn(this.ast,t):new gn(this.ast,t)};yo.prototype={constructor:yo,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var wo=Object.prototype.valueOf,xo=t("$sce"),_o={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},So=t("$compile"),ko=e.document.createElement("a"),Eo=Dn(e.location.href);In.$inject=["$document"],Un.$inject=["$provide"];var Co=22,Ao=".",Oo="0";Hn.$inject=["$locale"],Bn.$inject=["$locale"];var Mo={yyyy:Yn("FullYear",4,0,!1,!0),yy:Yn("FullYear",2,0,!0,!0),y:Yn("FullYear",1,0,!1,!0),MMMM:Zn("Month"),MMM:Zn("Month",!0),MM:Yn("Month",2,1),M:Yn("Month",1,1),LLLL:Zn("Month",!1,!0),dd:Yn("Date",2),d:Yn("Date",1),HH:Yn("Hours",2),H:Yn("Hours",1),hh:Yn("Hours",2,-12),h:Yn("Hours",1,-12),mm:Yn("Minutes",2),m:Yn("Minutes",1),ss:Yn("Seconds",2),s:Yn("Seconds",1),sss:Yn("Milliseconds",3),EEEE:Zn("Day"),EEE:Zn("Day",!0),a:nr,Z:Jn,ww:tr(2),w:tr(1),G:rr,GG:rr,GGG:rr,GGGG:ir},jo=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Po=/^\-?\d+$/;or.$inject=["$locale"];var To=g(Tr),Do=g(Dr);lr.$inject=["$parse"];var Fo=g({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===Hr.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),No={};r(Ci,function(e,t){function n(e,n,i){e.$watch(i[r],function(e){i.$set(t,!!e)})}if("multiple"!=e){var r=vt("ng-"+t),i=n;"checked"===e&&(i=function(e,t,i){i.ngModel!==i[r]&&n(e,t,i)}),No[r]=function(){return{restrict:"A",priority:100,link:i}}}}),r(Oi,function(e,t){No[t]=function(){return{priority:100,link:function(e,n,r){if("ngPattern"===t&&"/"==r.ngPattern.charAt(0)){var i=r.ngPattern.match(Mr);if(i)return void r.$set("ngPattern",new RegExp(i[1],i[2]))}e.$watch(r[t],function(e){r.$set(t,e)})}}}}),r(["src","srcset","href"],function(e){var t=vt("ng-"+e);No[t]=function(){return{priority:99,link:function(n,r,i){var o=e,a=e;"href"===e&&"[object SVGAnimatedString]"===Hr.call(r.prop("href"))&&(a="xlinkHref",i.$attr[a]="xlink:href",o=null),i.$observe(t,function(t){return t?(i.$set(a,t),void(Ir&&o&&r.prop(o,i[a]))):void("href"===e&&i.$set(a,null))})}}}});var Io={$addControl:p,$$renameControl:fr,$removeControl:p,$setValidity:p,$setDirty:p,$setPristine:p,$setSubmitted:p},Ro="ng-submitted";dr.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Uo=function(e){return["$timeout","$parse",function(t,n){function r(e){return""===e?n('this[""]').assign:n(e).assign||p}var i={name:"form",restrict:e?"EAC":"E",require:["form","^^?form"],controller:dr,compile:function(n,i){n.addClass(wa).addClass(ba);var o=i.name?"name":!(!e||!i.ngForm)&&"ngForm";return{pre:function(e,n,i,a){var s=a[0];if(!("action"in i)){var u=function(t){e.$apply(function(){s.$commitViewValue(),s.$setSubmitted()}),t.preventDefault()};hi(n[0],"submit",u),n.on("$destroy",function(){t(function(){gi(n[0],"submit",u)},0,!1)})}var c=a[1]||s.$$parentForm;c.$addControl(s);var f=o?r(s.$name):p;
|
7 |
+
o&&(f(e,s),i.$observe(o,function(t){s.$name!==t&&(f(e,void 0),s.$$parentForm.$$renameControl(s,t),(f=r(s.$name))(e,s))})),n.on("$destroy",function(){s.$$parentForm.$removeControl(s),f(e,void 0),l(s,Io)})}}}};return i}]},Vo=Uo(),zo=Uo(!0),Lo=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,qo=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ho=/^(?=.{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])?)*$/,Bo=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Wo=/^(\d{4,})-(\d{2})-(\d{2})$/,Go=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Xo=/^(\d{4,})-W(\d\d)$/,Ko=/^(\d{4,})-(\d\d)$/,Yo=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Zo="keydown wheel mousedown",Jo=he();r("date,datetime-local,month,time,week".split(","),function(e){Jo[e]=!0});var Qo={text:hr,date:mr("date",Wo,$r(Wo,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":mr("datetimelocal",Go,$r(Go,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:mr("time",Yo,$r(Yo,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:mr("week",Xo,vr,"yyyy-Www"),month:mr("month",Ko,$r(Ko,["yyyy","MM"]),"yyyy-MM"),number:yr,url:wr,email:xr,radio:_r,checkbox:kr,hidden:p,button:p,submit:p,reset:p,file:p},ea=["$browser","$sniffer","$filter","$parse",function(e,t,n,r){return{restrict:"E",require:["?ngModel"],link:{pre:function(i,o,a,s){s[0]&&(Qo[Tr(a.type)]||Qo.text)(i,o,a,s[0],t,e,n,r)}}}}],ta=/^(true|false|\d+)$/,na=function(){return{restrict:"A",priority:100,compile:function(e,t){return ta.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},ra=["$compile",function(e){return{restrict:"AC",compile:function(t){return e.$$addBindingClass(t),function(t,n,r){e.$$addBindingInfo(n,r.ngBind),n=n[0],t.$watch(r.ngBind,function(e){n.textContent=$(e)?"":e})}}}}],ia=["$interpolate","$compile",function(e,t){return{compile:function(n){return t.$$addBindingClass(n),function(n,r,i){var o=e(r.attr(i.$attr.ngBindTemplate));t.$$addBindingInfo(r,o.expressions),r=r[0],i.$observe("ngBindTemplate",function(e){r.textContent=$(e)?"":e})}}}}],oa=["$sce","$parse","$compile",function(e,t,n){return{restrict:"A",compile:function(r,i){var o=t(i.ngBindHtml),a=t(i.ngBindHtml,function(t){return e.valueOf(t)});return n.$$addBindingClass(r),function(t,r,i){n.$$addBindingInfo(r,i.ngBindHtml),t.$watch(a,function(){var n=o(t);r.html(e.getTrustedHtml(n)||"")})}}}}],aa=g({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),sa=Er("",!0),ua=Er("Odd",0),la=Er("Even",1),ca=cr({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),fa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],da={},pa={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(e){var t=vt("ng-"+e);da[t]=["$parse","$rootScope",function(n,r){return{restrict:"A",compile:function(i,o){var a=n(o[t],null,!0);return function(t,n){n.on(e,function(n){var i=function(){a(t,{$event:n})};pa[e]&&r.$$phase?t.$evalAsync(i):t.$apply(i)})}}}}]});var ha=["$animate","$compile",function(e,t){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(n,r,i,o,a){var s,u,l;n.$watch(i.ngIf,function(n){n?u||a(function(n,o){u=o,n[n.length++]=t.$$createComment("end ngIf",i.ngIf),s={clone:n},e.enter(n,r.parent(),r)}):(l&&(l.remove(),l=null),u&&(u.$destroy(),u=null),s&&(l=pe(s.clone),e.leave(l).then(function(){l=null}),s=null))})}}}],ga=["$templateRequest","$anchorScroll","$animate",function(e,t,n){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Gr.noop,compile:function(r,i){var o=i.ngInclude||i.src,a=i.onload||"",s=i.autoscroll;return function(r,i,u,l,c){var f,d,p,h=0,g=function(){d&&(d.remove(),d=null),f&&(f.$destroy(),f=null),p&&(n.leave(p).then(function(){d=null}),d=p,p=null)};r.$watch(o,function(o){var u=function(){!m(s)||s&&!r.$eval(s)||t()},d=++h;o?(e(o,!0).then(function(e){if(!r.$$destroyed&&d===h){var t=r.$new();l.template=e;var s=c(t,function(e){g(),n.enter(e,null,i).then(u)});f=t,p=s,f.$emit("$includeContentLoaded",o),r.$eval(a)}},function(){r.$$destroyed||d===h&&(g(),r.$emit("$includeContentError",o))}),r.$emit("$includeContentRequested",o)):(g(),l.template=null)})}}}}],va=["$compile",function(t){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(n,r,i,o){return Hr.call(r[0]).match(/SVG/)?(r.empty(),void t(Ee(o.template,e.document).childNodes)(n,function(e){r.append(e)},{futureParentElement:r})):(r.html(o.template),void t(r.contents())(n))}}}],$a=cr({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),ma=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,i){var o=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,s=a?Zr(o):o,u=function(e){if(!$(e)){var t=[];return e&&r(e.split(s),function(e){e&&t.push(a?Zr(e):e)}),t}};i.$parsers.push(u),i.$formatters.push(function(e){if(Kr(e))return e.join(o)}),i.$isEmpty=function(e){return!e||!e.length}}}},ba="ng-valid",ya="ng-invalid",wa="ng-pristine",xa="ng-dirty",_a="ng-untouched",Sa="ng-touched",ka="ng-pending",Ea="ng-empty",Ca="ng-not-empty",Aa=t("ngModel"),Oa=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(e,t,n,i,o,a,s,u,l,c){this.$viewValue=Number.NaN,this.$modelValue=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=c(n.name||"",!1)(e),this.$$parentForm=Io;var f,d=o(n.ngModel),h=d.assign,g=d,v=h,b=null,y=this;this.$$setOptions=function(e){if(y.$options=e,e&&e.getterSetter){var t=o(n.ngModel+"()"),r=o(n.ngModel+"($$$p)");g=function(e){var n=d(e);return S(n)&&(n=t(e)),n},v=function(e,t){S(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Aa("nonassign","Expression '{0}' is non-assignable. Element: {1}",n.ngModel,Y(i))},this.$render=p,this.$isEmpty=function(e){return $(e)||""===e||null===e||e!==e},this.$$updateEmptyClasses=function(e){y.$isEmpty(e)?(a.removeClass(i,Ca),a.addClass(i,Ea)):(a.removeClass(i,Ea),a.addClass(i,Ca))};var w=0;Cr({ctrl:this,$element:i,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:a}),this.$setPristine=function(){y.$dirty=!1,y.$pristine=!0,a.removeClass(i,xa),a.addClass(i,wa)},this.$setDirty=function(){y.$dirty=!0,y.$pristine=!1,a.removeClass(i,wa),a.addClass(i,xa),y.$$parentForm.$setDirty()},this.$setUntouched=function(){y.$touched=!1,y.$untouched=!0,a.setClass(i,_a,Sa)},this.$setTouched=function(){y.$touched=!0,y.$untouched=!1,a.setClass(i,Sa,_a)},this.$rollbackViewValue=function(){s.cancel(b),y.$viewValue=y.$$lastCommittedViewValue,y.$render()},this.$validate=function(){if(!x(y.$modelValue)||!isNaN(y.$modelValue)){var e=y.$$lastCommittedViewValue,t=y.$$rawModelValue,n=y.$valid,r=y.$modelValue,i=y.$options&&y.$options.allowInvalid;y.$$runValidators(t,e,function(e){i||n===e||(y.$modelValue=e?t:void 0,y.$modelValue!==r&&y.$$writeModelToScope())})}},this.$$runValidators=function(e,t,n){function i(){var e=y.$$parserName||"parse";return $(f)?(s(e,null),!0):(f||(r(y.$validators,function(e,t){s(t,null)}),r(y.$asyncValidators,function(e,t){s(t,null)})),s(e,f),f)}function o(){var n=!0;return r(y.$validators,function(r,i){var o=r(e,t);n=n&&o,s(i,o)}),!!n||(r(y.$asyncValidators,function(e,t){s(t,null)}),!1)}function a(){var n=[],i=!0;r(y.$asyncValidators,function(r,o){var a=r(e,t);if(!P(a))throw Aa("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",a);s(o,void 0),n.push(a.then(function(){s(o,!0)},function(){i=!1,s(o,!1)}))}),n.length?l.all(n).then(function(){u(i)},p):u(!0)}function s(e,t){c===w&&y.$setValidity(e,t)}function u(e){c===w&&n(e)}w++;var c=w;return i()&&o()?void a():void u(!1)},this.$commitViewValue=function(){var e=y.$viewValue;s.cancel(b),(y.$$lastCommittedViewValue!==e||""===e&&y.$$hasNativeValidators)&&(y.$$updateEmptyClasses(e),y.$$lastCommittedViewValue=e,y.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){function t(){y.$modelValue!==o&&y.$$writeModelToScope()}var n=y.$$lastCommittedViewValue,r=n;if(f=!$(r)||void 0)for(var i=0;i<y.$parsers.length;i++)if(r=y.$parsers[i](r),$(r)){f=!1;break}x(y.$modelValue)&&isNaN(y.$modelValue)&&(y.$modelValue=g(e));var o=y.$modelValue,a=y.$options&&y.$options.allowInvalid;y.$$rawModelValue=r,a&&(y.$modelValue=r,t()),y.$$runValidators(r,y.$$lastCommittedViewValue,function(e){a||(y.$modelValue=e?r:void 0,t())})},this.$$writeModelToScope=function(){v(e,y.$modelValue),r(y.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}})},this.$setViewValue=function(e,t){y.$viewValue=e,y.$options&&!y.$options.updateOnDefault||y.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(t){var n,r=0,i=y.$options;i&&m(i.debounce)&&(n=i.debounce,x(n)?r=n:x(n[t])?r=n[t]:x(n["default"])&&(r=n["default"])),s.cancel(b),r?b=s(function(){y.$commitViewValue()},r):u.$$phase?y.$commitViewValue():e.$apply(function(){y.$commitViewValue()})},e.$watch(function(){var t=g(e);if(t!==y.$modelValue&&(y.$modelValue===y.$modelValue||t===t)){y.$modelValue=y.$$rawModelValue=t,f=void 0;for(var n=y.$formatters,r=n.length,i=t;r--;)i=n[r](i);y.$viewValue!==i&&(y.$$updateEmptyClasses(i),y.$viewValue=y.$$lastCommittedViewValue=i,y.$render(),y.$$runValidators(t,i,p))}return t})}],Ma=["$rootScope",function(e){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Oa,priority:1,compile:function(t){return t.addClass(wa).addClass(_a).addClass(ba),{pre:function(e,t,n,r){var i=r[0],o=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),o.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(t,n,r,i){var o=i[0];o.$options&&o.$options.updateOn&&n.on(o.$options.updateOn,function(e){o.$$debounceViewValueCommit(e&&e.type)}),n.on("blur",function(){o.$touched||(e.$$phase?t.$evalAsync(o.$setTouched):t.$apply(o.$setTouched))})}}}}}],ja=/(\s+|^)default(\s+|$)/,Pa=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=U(e.$eval(t.ngModelOptions)),m(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Zr(this.$options.updateOn.replace(ja,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}},Ta=cr({terminal:!0,priority:1e3}),Da=t("ngOptions"),Fa=/^\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]+?))?$/,Na=["$compile","$document","$parse",function(t,i,o){function a(e,t,r){function i(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function a(e){var t;if(!l&&n(e))t=e;else{t=[];for(var r in e)e.hasOwnProperty(r)&&"$"!==r.charAt(0)&&t.push(r)}return t}var s=e.match(Fa);if(!s)throw Da("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Y(t));var u=s[5]||s[7],l=s[6],c=/ as /.test(s[0])&&s[1],f=s[9],d=o(s[2]?s[1]:u),p=c&&o(c),h=p||d,g=f&&o(f),v=f?function(e,t){return g(r,t)}:function(e){return Ze(e)},$=function(e,t){return v(e,_(e,t))},m=o(s[2]||s[1]),b=o(s[3]||""),y=o(s[4]||""),w=o(s[8]),x={},_=l?function(e,t){return x[l]=t,x[u]=e,x}:function(e){return x[u]=e,x};return{trackBy:f,getTrackByValue:$,getWatchables:o(w,function(e){var t=[];e=e||[];for(var n=a(e),i=n.length,o=0;o<i;o++){var u=e===n?o:n[o],l=e[u],c=_(l,u),f=v(l,c);if(t.push(f),s[2]||s[1]){var d=m(r,c);t.push(d)}if(s[4]){var p=y(r,c);t.push(p)}}return t}),getOptions:function(){for(var e=[],t={},n=w(r)||[],o=a(n),s=o.length,u=0;u<s;u++){var l=n===o?u:o[u],c=n[l],d=_(c,l),p=h(r,d),g=v(p,d),x=m(r,d),S=b(r,d),k=y(r,d),E=new i(g,p,x,S,k);e.push(E),t[g]=E}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[$(e)]},getViewValueFromOption:function(e){return f?Gr.copy(e.viewValue):e.viewValue}}}}}function s(e,n,o,s){function c(e,t){var n=u.cloneNode(!1);t.appendChild(n),f(e,n)}function f(e,t){e.element=t,t.disabled=e.disabled,e.label!==t.label&&(t.label=e.label,t.textContent=e.label),e.value!==t.value&&(t.value=e.selectValue)}function d(){var e=_&&h.readValue();if(_)for(var t=_.items.length-1;t>=0;t--){var r=_.items[t];qe(m(r.group)?r.element.parentNode:r.element)}_=S.getOptions();var i={};if(w&&n.prepend(p),_.items.forEach(function(e){var t;m(e.group)?(t=i[e.group],t||(t=l.cloneNode(!1),k.appendChild(t),t.label=null===e.group?"null":e.group,i[e.group]=t),c(e,t)):c(e,k)}),n[0].appendChild(k),g.$render(),!g.$isEmpty(e)){var o=h.readValue(),a=S.trackBy||v;(a?V(e,o):e===o)||(g.$setViewValue(o),g.$render())}}for(var p,h=s[0],g=s[1],v=o.multiple,$=0,b=n.children(),y=b.length;$<y;$++)if(""===b[$].value){p=b.eq($);break}var w=!!p,x=Rr(u.cloneNode(!1));x.val("?");var _,S=a(o.ngOptions,n,e),k=i[0].createDocumentFragment(),E=function(){w||n.prepend(p),n.val(""),p.prop("selected",!0),p.attr("selected",!0)},C=function(){w||p.remove()},A=function(){n.prepend(x),n.val("?"),x.prop("selected",!0),x.attr("selected",!0)},O=function(){x.remove()};v?(g.$isEmpty=function(e){return!e||0===e.length},h.writeValue=function(e){_.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=_.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},h.readValue=function(){var e=n.val()||[],t=[];return r(e,function(e){var n=_.selectValueMap[e];n&&!n.disabled&&t.push(_.getViewValueFromOption(n))}),t},S.trackBy&&e.$watchCollection(function(){if(Kr(g.$viewValue))return g.$viewValue.map(function(e){return S.getTrackByValue(e)})},function(){g.$render()})):(h.writeValue=function(e){var t=_.getOptionFromViewValue(e);t?(n[0].value!==t.selectValue&&(O(),C(),n[0].value=t.selectValue,t.element.selected=!0),t.element.setAttribute("selected","selected")):null===e||w?(O(),E()):(C(),A())},h.readValue=function(){var e=_.selectValueMap[n.val()];return e&&!e.disabled?(C(),O(),_.getViewValueFromOption(e)):null},S.trackBy&&e.$watch(function(){return S.getTrackByValue(g.$viewValue)},function(){g.$render()})),w?(p.remove(),t(p)(e),p.removeClass("ng-scope")):p=Rr(u.cloneNode(!1)),n.empty(),d(),e.$watchCollection(S.getWatchables,d)}var u=e.document.createElement("option"),l=e.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=p},post:s}}}],Ia=["$locale","$interpolate","$log",function(e,t,n){var i=/{}/g,o=/^when(Minus)?(.+)$/;return{link:function(a,s,u){function l(e){s.text(e||"")}var c,f=u.count,d=u.$attr.when&&s.attr(u.$attr.when),h=u.offset||0,g=a.$eval(d)||{},v={},m=t.startSymbol(),b=t.endSymbol(),y=m+f+"-"+h+b,w=Gr.noop;r(u,function(e,t){var n=o.exec(t);if(n){var r=(n[1]?"-":"")+Tr(n[2]);g[r]=s.attr(u.$attr[t])}}),r(g,function(e,n){v[n]=t(e.replace(i,y))}),a.$watch(f,function(t){var r=parseFloat(t),i=isNaN(r);if(i||r in g||(r=e.pluralCat(r-h)),r!==c&&!(i&&x(c)&&isNaN(c))){w();var o=v[r];$(o)?(null!=t&&n.debug("ngPluralize: no rule defined for '"+r+"' in "+d),w=p,l()):w=a.$watch(o,l),c=r}})}}}],Ra=["$parse","$animate","$compile",function(e,i,o){var a="$$NG_REMOVED",s=t("ngRepeat"),u=function(e,t,n,r,i,o,a){e[n]=r,i&&(e[i]=o),e.$index=t,e.$first=0===t,e.$last=t===a-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0===(1&t))},l=function(e){return e.clone[0]},c=function(e){return e.clone[e.clone.length-1]};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(t,f){var d=f.ngRepeat,p=o.$$createComment("end ngRepeat",d),h=d.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!h)throw s("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",d);var g=h[1],v=h[2],$=h[3],m=h[4];if(h=g.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/),!h)throw s("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",g);var b=h[3]||h[1],y=h[2];if($&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test($)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test($)))throw s("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",$);var w,x,_,S,k={$id:Ze};return m?w=e(m):(_=function(e,t){return Ze(t)},S=function(e){return e}),function(e,t,o,f,h){w&&(x=function(t,n,r){return y&&(k[y]=t),k[b]=n,k.$index=r,w(e,k)});var g=he();e.$watchCollection(v,function(o){var f,v,m,w,k,E,C,A,O,M,j,P,T=t[0],D=he();if($&&(e[$]=o),n(o))O=o,A=x||_;else{A=x||S,O=[];for(var F in o)Pr.call(o,F)&&"$"!==F.charAt(0)&&O.push(F)}for(w=O.length,j=new Array(w),f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],C=A(k,E,f),g[C])M=g[C],delete g[C],D[C]=M,j[f]=M;else{if(D[C])throw r(j,function(e){e&&e.scope&&(g[e.id]=e)}),s("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",d,C,E);j[f]={id:C,scope:void 0,clone:void 0},D[C]=!0}for(var N in g){if(M=g[N],P=pe(M.clone),i.leave(P),P[0].parentNode)for(f=0,v=P.length;f<v;f++)P[f][a]=!0;M.scope.$destroy()}for(f=0;f<w;f++)if(k=o===O?f:O[f],E=o[k],M=j[f],M.scope){m=T;do m=m.nextSibling;while(m&&m[a]);l(M)!=m&&i.move(pe(M.clone),null,T),T=c(M),u(M.scope,f,b,E,y,k,w)}else h(function(e,t){M.scope=t;var n=p.cloneNode(!1);e[e.length++]=n,i.enter(e,null,T),T=n,M.clone=e,D[M.id]=M,u(M.scope,f,b,E,y,k,w)});g=D})}}}}],Ua="ng-hide",Va="ng-hide-animate",za=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngShow,function(t){e[t?"removeClass":"addClass"](n,Ua,{tempClasses:Va})})}}}],La=["$animate",function(e){return{restrict:"A",multiElement:!0,link:function(t,n,r){t.$watch(r.ngHide,function(t){e[t?"addClass":"removeClass"](n,Ua,{tempClasses:Va})})}}}],qa=cr(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),Ha=["$animate","$compile",function(e,t){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(n,i,o,a){var s=o.ngSwitch||o.on,u=[],l=[],c=[],f=[],d=function(e,t){return function(){e.splice(t,1)}};n.$watch(s,function(n){var i,o;for(i=0,o=c.length;i<o;++i)e.cancel(c[i]);for(c.length=0,i=0,o=f.length;i<o;++i){var s=pe(l[i].clone);f[i].$destroy();var p=c[i]=e.leave(s);p.then(d(c,i))}l.length=0,f.length=0,(u=a.cases["!"+n]||a.cases["?"])&&r(u,function(n){n.transclude(function(r,i){f.push(i);var o=n.element;r[r.length++]=t.$$createComment("end ngSwitchWhen");var a={clone:r};l.push(a),e.enter(r,o.parent(),o)})})})}}}],Ba=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["!"+n.ngSwitchWhen]=r.cases["!"+n.ngSwitchWhen]||[],r.cases["!"+n.ngSwitchWhen].push({transclude:i,element:t})}}),Wa=cr({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),Ga=t("ngTransclude"),Xa=["$compile",function(e){return{restrict:"EAC",terminal:!0,compile:function(t){var n=e(t.contents());return t.empty(),function(e,t,r,i,o){function a(e,n){e.length?t.append(e):(s(),n.$destroy())}function s(){n(e,function(e){t.append(e)})}if(!o)throw Ga("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Y(t));r.ngTransclude===r.$attr.ngTransclude&&(r.ngTransclude="");var u=r.ngTransclude||r.ngTranscludeSlot;o(a,null,u),u&&!o.isSlotFilled(u)&&s()}}}}],Ka=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){if("text/ng-template"==n.type){var r=n.id,i=t[0].text;e.put(r,i)}}}}],Ya={$setViewValue:p,$render:p},Za=["$element","$scope",function(t,n){var r=this,i=new Je;r.ngModelCtrl=Ya,r.unknownOption=Rr(e.document.createElement("option")),r.renderUnknownOption=function(e){var n="? "+Ze(e)+" ?";r.unknownOption.val(n),t.prepend(r.unknownOption),t.val(n)},n.$on("$destroy",function(){r.renderUnknownOption=p}),r.removeUnknownOption=function(){r.unknownOption.parent()&&r.unknownOption.remove()},r.readValue=function(){return r.removeUnknownOption(),t.val()},r.writeValue=function(e){r.hasOption(e)?(r.removeUnknownOption(),t.val(e),""===e&&r.emptyOption.prop("selected",!0)):null==e&&r.emptyOption?(r.removeUnknownOption(),t.val("")):r.renderUnknownOption(e)},r.addOption=function(e,t){if(t[0].nodeType!==ui){fe(e,'"option value"'),""===e&&(r.emptyOption=t);var n=i.get(e)||0;i.put(e,n+1),r.ngModelCtrl.$render(),Or(t)}},r.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(r.emptyOption=void 0)):i.put(e,t-1))},r.hasOption=function(e){return!!i.get(e)},r.registerOption=function(e,t,n,i,o){if(i){var a;n.$observe("value",function(e){m(a)&&r.removeOption(a),a=e,r.addOption(e,t)})}else o?e.$watch(o,function(e,i){n.$set("value",e),i!==e&&r.removeOption(i),r.addOption(e,t)}):r.addOption(n.value,t);t.on("$destroy",function(){r.removeOption(n.value),r.ngModelCtrl.$render()})}}],Ja=function(){function e(e,t,n,i){var o=i[1];if(o){var a=i[0];if(a.ngModelCtrl=o,t.on("change",function(){e.$apply(function(){o.$setViewValue(a.readValue())})}),n.multiple){a.readValue=function(){var e=[];return r(t.find("option"),function(t){t.selected&&e.push(t.value)}),e},a.writeValue=function(e){var n=new Je(e);r(t.find("option"),function(e){e.selected=m(n.get(e.value))})};var s,u=NaN;e.$watch(function(){u!==o.$viewValue||V(s,o.$viewValue)||(s=ve(o.$viewValue),o.$render()),u=o.$viewValue}),o.$isEmpty=function(e){return!e||0===e.length}}}}function t(e,t,n,r){var i=r[1];if(i){var o=r[0];i.$render=function(){o.writeValue(i.$viewValue)}}}return{restrict:"E",require:["select","?ngModel"],controller:Za,priority:1,link:{pre:e,post:t}}},Qa=["$interpolate",function(e){return{restrict:"E",priority:100,compile:function(t,n){if(m(n.value))var r=e(n.value,!0);else{var i=e(t.text(),!0);i||n.$set("value",t.text())}return function(e,t,n){var o="$selectController",a=t.parent(),s=a.data(o)||a.parent().data(o);s&&s.registerOption(e,t,n,r,i)}}}}],es=g({restrict:"E",terminal:!1}),ts=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},ns=function(){return{restrict:"A",require:"?ngModel",link:function(e,n,r,i){if(i){var o,a=r.ngPattern||r.pattern;r.$observe("pattern",function(e){if(w(e)&&e.length>0&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw t("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Y(n));o=e||void 0,i.$validate()}),i.$validators.pattern=function(e,t){return i.$isEmpty(t)||$(o)||o.test(t)}}}}},rs=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=f(e);i=isNaN(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},is=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=f(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};return e.angular.bootstrap?void(e.console&&console.log("WARNING: Tried to load angular more than once.")):(ue(),be(Gr),Gr.module("ngLocale",[],["$provide",function(e){function t(e){e+="";var t=e.indexOf(".");return t==-1?0:e.length-t-1}function n(e,n){var r=n;void 0===r&&(r=Math.min(t(e),3));var i=Math.pow(10,r),o=(e*i|0)%i;return{v:r,f:o}}var r={ZERO:"zero",ONE:"one",TWO:"two",FEW:"few",MANY:"many",OTHER:"other"};e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],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:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var i=0|e,o=n(e,t);return 1==i&&0==o.v?r.ONE:r.OTHER}})}]),void Rr(e.document).ready(function(){re(e.document,ie)}))}(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>')},{}],42:[function(e,t,n){e("./angular"),t.exports=angular},{"./angular":41}],43:[function(e,t,n){!function(){function e(e,t){window.XMLHttpRequest.prototype[e]=t(window.XMLHttpRequest.prototype[e])}function t(e,t,n){try{Object.defineProperty(e,t,{get:n})}catch(r){}}if(window.FileAPI||(window.FileAPI={}),!window.XMLHttpRequest)throw"AJAX is not supported. XMLHttpRequest is not defined.";if(FileAPI.shouldLoad=!window.FormData||FileAPI.forceLoad,FileAPI.shouldLoad){var n=function(e){if(!e.__listeners){e.upload||(e.upload={}),e.__listeners=[];var t=e.upload.addEventListener;e.upload.addEventListener=function(n,r){e.__listeners[n]=r,t&&t.apply(this,arguments)}}};e("open",function(e){return function(t,r,i){n(this),this.__url=r;try{e.apply(this,[t,r,i])}catch(o){o.message.indexOf("Access is denied")>-1&&(this.__origError=o,e.apply(this,[t,"_fix_for_ie_crossdomain__",i]))}}}),e("getResponseHeader",function(e){return function(t){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(t):null==e?null:e.apply(this,[t])}}),e("getAllResponseHeaders",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==e?null:e.apply(this)}}),e("abort",function(e){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==e?null:e.apply(this)}}),e("setRequestHeader",function(e){return function(t,r){if("__setXHR_"===t){n(this);var i=r(this);i instanceof Function&&i(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[t]=r,e.apply(this,arguments)}}),e("send",function(e){return function(){var n=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var r=arguments[0],i={url:n.__url,jsonp:!1,cache:!0,complete:function(e,r){e&&angular.isString(e)&&e.indexOf("#2174")!==-1&&(e=null),n.__completed=!0,!e&&n.__listeners.load&&n.__listeners.load({type:"load",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),!e&&n.__listeners.loadend&&n.__listeners.loadend({type:"loadend",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),"abort"===e&&n.__listeners.abort&&n.__listeners.abort({type:"abort",loaded:n.__loaded,total:n.__total,target:n,lengthComputable:!0}),void 0!==r.status&&t(n,"status",function(){return 0===r.status&&e&&"abort"!==e?500:r.status}),void 0!==r.statusText&&t(n,"statusText",function(){return r.statusText}),t(n,"readyState",function(){return 4}),void 0!==r.response&&t(n,"response",function(){return r.response});var i=r.responseText||(e&&0===r.status&&"abort"!==e?e:void 0);t(n,"responseText",function(){return i}),t(n,"response",function(){return i}),e&&t(n,"err",function(){return e}),n.__fileApiXHR=r,n.onreadystatechange&&n.onreadystatechange(),n.onload&&n.onload()},progress:function(e){if(e.target=n,n.__listeners.progress&&n.__listeners.progress(e),n.__total=e.total,n.__loaded=e.loaded,e.total===e.loaded){var t=this;setTimeout(function(){n.__completed||(n.getAllResponseHeaders=function(){},t.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:n.__requestHeaders};i.data={},i.files={};for(var o=0;o<r.data.length;o++){var a=r.data[o];null!=a.val&&null!=a.val.name&&null!=a.val.size&&null!=a.val.type?i.files[a.key]=a.val:i.data[a.key]=a.val}setTimeout(function(){if(!FileAPI.hasFlash)throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';n.__fileApiXHR=FileAPI.upload(i)},1)}else{if(this.__origError)throw this.__origError;e.apply(n,arguments)}}}),window.XMLHttpRequest.__isFileAPIShim=!0,window.FormData=FormData=function(){return{append:function(e,t,n){t.__isFileAPIBlobShim&&(t=t.data[0]),this.data.push({key:e,val:t,name:n})},data:[],__isFileAPIShim:!0}},window.Blob=Blob=function(e){return{data:e,__isFileAPIBlobShim:!0}}}}(),function(){function e(e){return"input"===e[0].tagName.toLowerCase()&&e.attr("type")&&"file"===e.attr("type").toLowerCase()}function t(){try{var e=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(e)return!0}catch(t){if(void 0!==navigator.mimeTypes["application/x-shockwave-flash"])return!0}return!1}function n(e){var t=0,n=0;if(window.jQuery)return jQuery(e).offset();if(e.offsetParent)do t+=e.offsetLeft-e.scrollLeft,n+=e.offsetTop-e.scrollTop,e=e.offsetParent;while(e);return{left:t,top:n}}if(FileAPI.shouldLoad){if(FileAPI.hasFlash=t(),FileAPI.forceLoad&&(FileAPI.html5=!1),!FileAPI.upload){var r,i,o,a,s,u=document.createElement("script"),l=document.getElementsByTagName("script");if(window.FileAPI.jsUrl)r=window.FileAPI.jsUrl;else if(window.FileAPI.jsPath)i=window.FileAPI.jsPath;else for(o=0;o<l.length;o++)if(s=l[o].src,a=s.search(/\/ng\-file\-upload[\-a-zA-z0-9\.]*\.js/),a>-1){i=s.substring(0,a+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=i),u.setAttribute("src",r||i+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(u)}FileAPI.ngfFixIE=function(r,i,o){if(!t())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var a=function(){var t=i.parent();r.attr("disabled")?t&&t.removeClass("js-fileapi-wrapper"):(i.attr("__ngf_flash_")||(i.unbind("change"),i.unbind("click"),i.bind("change",function(e){s.apply(this,[e]),o.apply(this,[e])}),i.attr("__ngf_flash_","true")),t.addClass("js-fileapi-wrapper"),e(r)||(t.css("position","absolute").css("top",n(r[0]).top+"px").css("left",n(r[0]).left+"px").css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",r.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),i.css("width",r[0].offsetWidth+"px").css("height",r[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};r.bind("mouseenter",a);var s=function(e){for(var t=FileAPI.getFiles(e),n=0;n<t.length;n++)void 0===t[n].size&&(t[n].size=0),void 0===t[n].name&&(t[n].name="file"),void 0===t[n].type&&(t[n].type="undefined");
|
8 |
+
e.target||(e.target={}),e.target.files=t,e.target.files!==t&&(e.__files_=t),(e.__files_||e.target.files).item=function(t){return(e.__files_||e.target.files)[t]||null}}},FileAPI.disableFileInput=function(e,t){t?e.removeClass("js-fileapi-wrapper"):e.addClass("js-fileapi-wrapper")}}}(),window.FileReader||(window.FileReader=function(){var e=this,t=!1;this.listeners={},this.addEventListener=function(t,n){e.listeners[t]=e.listeners[t]||[],e.listeners[t].push(n)},this.removeEventListener=function(t,n){e.listeners[t]&&e.listeners[t].splice(e.listeners[t].indexOf(n),1)},this.dispatchEvent=function(t){var n=e.listeners[t.type];if(n)for(var r=0;r<n.length;r++)n[r].call(e,t)},this.onabort=this.onerror=this.onload=this.onloadstart=this.onloadend=this.onprogress=null;var n=function(t,n){var r={type:t,target:e,loaded:n.loaded,total:n.total,error:n.error};return null!=n.result&&(r.target.result=n.result),r},r=function(r){t||(t=!0,e.onloadstart&&e.onloadstart(n("loadstart",r)));var i;"load"===r.type?(e.onloadend&&e.onloadend(n("loadend",r)),i=n("load",r),e.onload&&e.onload(i),e.dispatchEvent(i)):"progress"===r.type?(i=n("progress",r),e.onprogress&&e.onprogress(i),e.dispatchEvent(i)):(i=n("error",r),e.onerror&&e.onerror(i),e.dispatchEvent(i))};this.readAsDataURL=function(e){FileAPI.readAsDataURL(e,r)},this.readAsText=function(e){FileAPI.readAsText(e,r)}}),!window.XMLHttpRequest||window.FileAPI&&FileAPI.shouldLoad||(window.XMLHttpRequest.prototype.setRequestHeader=function(e){return function(t,n){if("__setXHR_"===t){var r=n(this);r instanceof Function&&r(this)}else e.apply(this,arguments)}}(window.XMLHttpRequest.prototype.setRequestHeader));var r=angular.module("ngFileUpload",[]);r.version="12.2.12",r.service("UploadBase",["$http","$q","$timeout",function(e,t,n){function i(r){function i(e){l.notify&&l.notify(e),c.progressFunc&&n(function(){c.progressFunc(e)})}function o(e){return null!=r._start&&s?{loaded:e.loaded+r._start,total:r._file&&r._file.size||e.total,type:e.type,config:r,lengthComputable:!0,target:e.target}:e}function u(){e(r).then(function(e){if(s&&r._chunkSize&&!r._finished&&r._file){var t=r._file&&r._file.size||0;i({loaded:Math.min(r._end,t),total:t,config:r,type:"progress"}),a.upload(r,!0)}else r._finished&&delete r._finished,l.resolve(e)},function(e){l.reject(e)},function(e){l.notify(e)})}r.method=r.method||"POST",r.headers=r.headers||{};var l=r._deferred=r._deferred||t.defer(),c=l.promise;return r.disableProgress||(r.headers.__setXHR_=function(){return function(e){e&&e.upload&&e.upload.addEventListener&&(r.__XHR=e,r.xhrFn&&r.xhrFn(e),e.upload.addEventListener("progress",function(e){e.config=r,i(o(e))},!1),e.upload.addEventListener("load",function(e){e.lengthComputable&&(e.config=r,i(o(e)))},!1))}}),s?r._chunkSize&&r._end&&!r._finished?(r._start=r._end,r._end+=r._chunkSize,u()):r.resumeSizeUrl?e.get(r.resumeSizeUrl).then(function(e){r.resumeSizeResponseReader?r._start=r.resumeSizeResponseReader(e.data):r._start=parseInt((null==e.data.size?e.data:e.data.size).toString()),r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):r.resumeSize?r.resumeSize().then(function(e){r._start=e,r._chunkSize&&(r._end=r._start+r._chunkSize),u()},function(e){throw e}):(r._chunkSize&&(r._start=0,r._end=r._start+r._chunkSize),u()):u(),c.success=function(e){return c.then(function(t){e(t.data,t.status,t.headers,r)}),c},c.error=function(e){return c.then(null,function(t){e(t.data,t.status,t.headers,r)}),c},c.progress=function(e){return c.progressFunc=e,c.then(null,null,function(t){e(t)}),c},c.abort=c.pause=function(){return r.__XHR&&n(function(){r.__XHR.abort()}),c},c.xhr=function(e){return r.xhrFn=function(t){return function(){t&&t.apply(c,arguments),e.apply(c,arguments)}}(r.xhrFn),c},a.promisesCount++,c["finally"]&&c["finally"]instanceof Function&&c["finally"](function(){a.promisesCount--}),c}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var a=this;a.promisesCount=0,this.isResumeSupported=function(){return window.Blob&&window.Blob.prototype.slice};var s=this.isResumeSupported();this.isUploadInProgress=function(){return a.promisesCount>0},this.rename=function(e,t){return e.ngfName=t,e},this.jsonBlob=function(e){null==e||angular.isString(e)||(e=JSON.stringify(e));var t=new window.Blob([e],{type:"application/json"});return t._ngfBlob=!0,t},this.json=function(e){return angular.toJson(e)},this.isFile=function(e){return null!=e&&(e instanceof window.Blob||e.flashId&&e.name&&e.size)},this.upload=function(e,t){function n(t,n){if(t._ngfBlob)return t;if(e._file=e._file||t,null!=e._start&&s){e._end&&e._end>=t.size&&(e._finished=!0,e._end=t.size);var r=t.slice(e._start,e._end||t.size);return r.name=t.name,r.ngfName=t.ngfName,e._chunkSize&&(n.append("_chunkSize",e._chunkSize),n.append("_currentChunkSize",e._end-e._start),n.append("_chunkNumber",Math.floor(e._start/e._chunkSize)),n.append("_totalSize",e._file.size)),r}return t}function r(t,i,o){if(void 0!==i)if(angular.isDate(i)&&(i=i.toISOString()),angular.isString(i))t.append(o,i);else if(a.isFile(i)){var s=n(i,t),u=o.split(",");u[1]&&(s.ngfName=u[1].replace(/^\s+|\s+$/g,""),o=u[0]),e._fileKey=e._fileKey||o,t.append(o,s,s.ngfName||s.name)}else if(angular.isObject(i)){if(i.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+o;i.$$ngfCircularDetection=!0;try{for(var l in i)if(i.hasOwnProperty(l)&&"$$ngfCircularDetection"!==l){var c=null==e.objectKey?"[i]":e.objectKey;i.length&&parseInt(l)>-1&&(c=null==e.arrayKey?c:e.arrayKey),r(t,i[l],o+c.replace(/[ik]/g,l))}}finally{delete i.$$ngfCircularDetection}}else t.append(o,i)}function u(){e._chunkSize=a.translateScalars(e.resumeChunkSize),e._chunkSize=e._chunkSize?parseInt(e._chunkSize.toString()):null,e.headers=e.headers||{},e.headers["Content-Type"]=void 0,e.transformRequest=e.transformRequest?angular.isArray(e.transformRequest)?e.transformRequest:[e.transformRequest]:[],e.transformRequest.push(function(t){var n,i=new window.FormData;t=t||e.fields||{},e.file&&(t.file=e.file);for(n in t)if(t.hasOwnProperty(n)){var o=t[n];e.formDataAppender?e.formDataAppender(i,n,o):r(i,o,n)}return i})}return t||(e=o(e)),e._isDigested||(e._isDigested=!0,u()),i(e)},this.http=function(t){return t=o(t),t.transformRequest=t.transformRequest||function(t){return window.ArrayBuffer&&t instanceof window.ArrayBuffer||t instanceof window.Blob?t:e.defaults.transformRequest[0].apply(this,arguments)},t._chunkSize=a.translateScalars(t.resumeChunkSize),t._chunkSize=t._chunkSize?parseInt(t._chunkSize.toString()):null,i(t)},this.translateScalars=function(e){if(angular.isString(e)){if(e.search(/kb/i)===e.length-2)return parseFloat(1024*e.substring(0,e.length-2));if(e.search(/mb/i)===e.length-2)return parseFloat(1048576*e.substring(0,e.length-2));if(e.search(/gb/i)===e.length-2)return parseFloat(1073741824*e.substring(0,e.length-2));if(e.search(/b/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/s/i)===e.length-1)return parseFloat(e.substring(0,e.length-1));if(e.search(/m/i)===e.length-1)return parseFloat(60*e.substring(0,e.length-1));if(e.search(/h/i)===e.length-1)return parseFloat(3600*e.substring(0,e.length-1))}return e},this.urlToBlob=function(n){var r=t.defer();return e({url:n,method:"get",responseType:"arraybuffer"}).then(function(e){var t=new Uint8Array(e.data),i=e.headers("content-type")||"image/WebP",o=new window.Blob([t],{type:i}),a=n.match(/.*\/(.+?)(\?.*)?$/);a.length>1&&(o.name=a[1]),r.resolve(o)},function(e){r.reject(e)}),r.promise},this.setDefaults=function(e){this.defaults=e||{}},this.defaults={},this.version=r.version}]),r.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(e,t,n,r,i){function o(e,t,n){var i=[u.emptyPromise()];return angular.forEach(e,function(r,o){0===r.type.indexOf("image/jpeg")&&u.attrGetter("ngfFixOrientation",t,n,{$file:r})&&i.push(u.happyPromise(u.applyExifRotation(r),r).then(function(t){e.splice(o,1,t)}))}),r.all(i)}function a(e,t,n,i){var o=u.attrGetter("ngfResize",t,n);if(!o||!u.isResizeSupported()||!e.length)return u.emptyPromise();if(o instanceof Function){var a=r.defer();return o(e).then(function(r){s(r,e,t,n,i).then(function(e){a.resolve(e)},function(e){a.reject(e)})},function(e){a.reject(e)})}return s(o,e,t,n,i)}function s(e,t,n,i,o){function a(r,a){if(0===r.type.indexOf("image")){if(e.pattern&&!u.validatePattern(r,e.pattern))return;e.resizeIf=function(e,t){return u.attrGetter("ngfResizeIf",n,i,{$width:e,$height:t,$file:r})};var l=u.resize(r,e);s.push(l),l.then(function(e){t.splice(a,1,e)},function(e){r.$error="resize",(r.$errorMessages=r.$errorMessages||{}).resize=!0,r.$errorParam=(e?(e.message?e.message:e)+": ":"")+(r&&r.name),o.$ngfValidations.push({name:"resize",valid:!1}),u.applyModelValidation(o,t)})}}for(var s=[u.emptyPromise()],l=0;l<t.length;l++)a(t[l],l);return r.all(s)}var u=i;return u.getAttrWithDefaults=function(e,t){if(null!=e[t])return e[t];var n=u.defaults[t];return null==n?n:angular.isString(n)?n:JSON.stringify(n)},u.attrGetter=function(t,n,r,i){var o=this.getAttrWithDefaults(n,t);if(!r)return o;try{return i?e(o)(r,i):e(o)(r)}catch(a){if(t.search(/min|max|pattern/i))return o;throw a}},u.shouldUpdateOn=function(e,t,n){var r=u.attrGetter("ngfModelOptions",t,n);return!r||!r.updateOn||r.updateOn.split(" ").indexOf(e)>-1},u.emptyPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.resolve.apply(e,n)}),e.promise},u.rejectPromise=function(){var e=r.defer(),n=arguments;return t(function(){e.reject.apply(e,n)}),e.promise},u.happyPromise=function(e,n){var i=r.defer();return e.then(function(e){i.resolve(e)},function(e){t(function(){throw e}),i.resolve(n)}),i.promise},u.updateModel=function(n,r,i,s,l,c,f){function d(o,a,l,f,d){r.$$ngfPrevValidFiles=o,r.$$ngfPrevInvalidFiles=a;var p=o&&o.length?o[0]:null,h=a&&a.length?a[0]:null;n&&(u.applyModelValidation(n,o),n.$setViewValue(d?p:o)),s&&e(s)(i,{$files:o,$file:p,$newFiles:l,$duplicateFiles:f,$invalidFiles:a,$invalidFile:h,$event:c});var g=u.attrGetter("ngfModelInvalid",r);g&&t(function(){e(g).assign(i,d?h:a)}),t(function(){})}function p(){function e(e,t){return e.name===t.name&&(e.$ngfOrigSize||e.size)===(t.$ngfOrigSize||t.size)&&e.type===t.type}function t(t){var n;for(n=0;n<$.length;n++)if(e(t,$[n]))return!0;for(n=0;n<m.length;n++)if(e(t,m[n]))return!0;return!1}if(l){v=[],b=[];for(var n=0;n<l.length;n++)t(l[n])?b.push(l[n]):v.push(l[n])}}function h(e){return angular.isArray(e)?e:[e]}function g(){function e(){t(function(){d(x?$.concat(w):w,x?m.concat(y):y,l,b,_)},k&&k.debounce?k.debounce.change||k.debounce:0)}var o=S?v:w;a(o,r,i,n).then(function(){S?u.validate(v,x?$.length:0,n,r,i).then(function(t){w=t.validsFiles,y=t.invalidsFiles,e()}):e()},function(){for(var t=0;t<o.length;t++){var n=o[t];if("resize"===n.$error){var r=w.indexOf(n);r>-1&&(w.splice(r,1),y.push(n)),e()}}})}var v,$,m,b=[],y=[],w=[];$=r.$$ngfPrevValidFiles||[],m=r.$$ngfPrevInvalidFiles||[],n&&n.$modelValue&&($=h(n.$modelValue));var x=u.attrGetter("ngfKeep",r,i);v=(l||[]).slice(0),"distinct"!==x&&u.attrGetter("ngfKeepDistinct",r,i)!==!0||p(r,i);var _=!x&&!u.attrGetter("ngfMultiple",r,i)&&!u.attrGetter("multiple",r);if(!x||v.length){u.attrGetter("ngfBeforeModelChange",r,i,{$files:l,$file:l&&l.length?l[0]:null,$newFiles:v,$duplicateFiles:b,$event:c});var S=u.attrGetter("ngfValidateAfterResize",r,i),k=u.attrGetter("ngfModelOptions",r,i);u.validate(v,x?$.length:0,n,r,i).then(function(e){f?d(v,[],l,b,_):(k&&k.allowInvalid||S?w=v:(w=e.validFiles,y=e.invalidFiles),u.attrGetter("ngfFixOrientation",r,i)&&u.isExifSupported()?o(w,r,i).then(function(){g()}):g())})}},u}]),r.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(e,t,n,r){function i(e){var t=e.match(/Android[^\d]*(\d+)\.(\d+)/);if(t&&t.length>2){var n=r.defaults.androidFixMinorVersion||4;return parseInt(t[1])<4||parseInt(t[1])===n&&parseInt(t[2])<n}return e.indexOf("Chrome")===-1&&/.*Windows.*Safari.*/.test(e)}function o(e,t,n,r,o,s,u,l){function c(){return"input"===t[0].tagName.toLowerCase()&&n.type&&"file"===n.type.toLowerCase()}function f(){return b("ngfChange")||b("ngfSelect")}function d(t){if(l.shouldUpdateOn("change",n,e)){var i=t.__files_||t.target&&t.target.files,o=[];if(!i)return;for(var a=0;a<i.length;a++)o.push(i[a]);l.updateModel(r,n,e,f(),o.length?o:null,t)}}function p(e,r){function i(t){e.attr("id","ngf-"+t),r.attr("id","ngf-label-"+t)}for(var o=0;o<t[0].attributes.length;o++){var a=t[0].attributes[o];"type"!==a.name&&"class"!==a.name&&"style"!==a.name&&("id"===a.name?(i(a.value),y.push(n.$observe("id",i))):e.attr(a.name,a.value||"required"!==a.name&&"multiple"!==a.name?a.value:a.name))}}function h(){if(c())return t;var e=angular.element('<input type="file">'),n=angular.element("<label>upload</label>");return n.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),p(e,n),a.push({el:t,ref:n}),document.body.appendChild(n.append(e)[0]),e}function g(n){if(t.attr("disabled"))return!1;if(!b("ngfSelectDisabled",e)){var r=v(n);if(null!=r)return r;$(n);try{c()||document.body.contains(_[0])||(a.push({el:t,ref:_.parent()}),document.body.appendChild(_.parent()[0]),_.bind("change",d))}catch(o){}return i(navigator.userAgent)?setTimeout(function(){_[0].click()},0):_[0].click(),!1}}function v(e){var t=e.changedTouches||e.originalEvent&&e.originalEvent.changedTouches;if(t){if("touchstart"===e.type)return x=t[0].clientX,w=t[0].clientY,!0;if("touchend"===e.type){var n=t[0].clientX,r=t[0].clientY;if(Math.abs(n-x)>20||Math.abs(r-w)>20)return e.stopPropagation(),e.preventDefault(),!1}return!0}}function $(t){l.shouldUpdateOn("click",n,e)&&_.val()&&(_.val(null),l.updateModel(r,n,e,f(),null,t,!0))}function m(e){if(_&&!_.attr("__ngf_ie10_Fix_")){if(!_[0].parentNode)return void(_=null);e.preventDefault(),e.stopPropagation(),_.unbind("click");var t=_.clone();return _.replaceWith(t),_=t,_.attr("__ngf_ie10_Fix_","true"),_.bind("change",d),_.bind("click",m),_[0].click(),!1}_.removeAttr("__ngf_ie10_Fix_")}var b=function(e,t){return l.attrGetter(e,n,t)};l.registerModelChangeValidator(r,n,e);var y=[];b("ngfMultiple")&&y.push(e.$watch(b("ngfMultiple"),function(){_.attr("multiple",b("ngfMultiple",e))})),b("ngfCapture")&&y.push(e.$watch(b("ngfCapture"),function(){_.attr("capture",b("ngfCapture",e))})),b("ngfAccept")&&y.push(e.$watch(b("ngfAccept"),function(){_.attr("accept",b("ngfAccept",e))})),y.push(n.$observe("accept",function(){_.attr("accept",b("accept"))}));var w=0,x=0,_=t;c()||(_=h()),_.bind("change",d),c()?t.bind("click",$):t.bind("click touchstart touchend",g),navigator.appVersion.indexOf("MSIE 10")!==-1&&_.bind("click",m),r&&r.$formatters.push(function(e){return null!=e&&0!==e.length||_.val()&&_.val(null),e}),e.$on("$destroy",function(){c()||_.parent().remove(),angular.forEach(y,function(e){e()})}),s(function(){for(var e=0;e<a.length;e++){var t=a[e];document.body.contains(t.el[0])||(a.splice(e,1),t.ref.remove())}}),window.FileAPI&&window.FileAPI.ngfFixIE&&window.FileAPI.ngfFixIE(t,_,d)}var a=[];return{restrict:"AEC",require:"?ngModel",link:function(i,a,s,u){o(i,a,s,u,e,t,n,r)}}}]),function(){function e(e){return"img"===e.tagName.toLowerCase()?"image":"audio"===e.tagName.toLowerCase()?"audio":"video"===e.tagName.toLowerCase()?"video":/./}function t(t,n,r,i,o,a,s,u){function l(e){var a=t.attrGetter("ngfNoObjectUrl",o,r);t.dataUrl(e,a)["finally"](function(){n(function(){var t=(a?e.$ngfDataUrl:e.$ngfBlobUrl)||e.$ngfDataUrl;u?i.css("background-image","url('"+(t||"")+"')"):i.attr("src",t),t?i.removeClass("ng-hide"):i.addClass("ng-hide")})})}n(function(){var n=r.$watch(o[a],function(n){var c=s;if("ngfThumbnail"===a&&(c||(c={width:i[0].naturalWidth||i[0].clientWidth,height:i[0].naturalHeight||i[0].clientHeight}),0===c.width&&window.getComputedStyle)){var f=getComputedStyle(i[0]);c={width:parseInt(f.width.slice(0,-2)),height:parseInt(f.height.slice(0,-2))}}return angular.isString(n)?(i.removeClass("ng-hide"),u?i.css("background-image","url('"+n+"')"):i.attr("src",n)):void(!n||!n.type||0!==n.type.search(e(i[0]))||u&&0!==n.type.indexOf("image")?i.addClass("ng-hide"):c&&t.isResizeSupported()?(c.resizeIf=function(e,i){return t.attrGetter("ngfResizeIf",o,r,{$width:e,$height:i,$file:n})},t.resize(n,c).then(function(e){l(e)},function(e){throw e})):l(n))});r.$on("$destroy",function(){n()})})}r.service("UploadDataUrl",["UploadBase","$timeout","$q",function(e,t,n){var r=e;return r.base64DataUrl=function(e){if(angular.isArray(e)){var t=n.defer(),i=0;return angular.forEach(e,function(n){r.dataUrl(n,!0)["finally"](function(){if(i++,i===e.length){var n=[];angular.forEach(e,function(e){n.push(e.$ngfDataUrl)}),t.resolve(n,e)}})}),t.promise}return r.dataUrl(e,!0)},r.dataUrl=function(e,i){if(!e)return r.emptyPromise(e,e);if(i&&null!=e.$ngfDataUrl||!i&&null!=e.$ngfBlobUrl)return r.emptyPromise(i?e.$ngfDataUrl:e.$ngfBlobUrl,e);var o=i?e.$$ngfDataUrlPromise:e.$$ngfBlobUrlPromise;if(o)return o;var a=n.defer();return t(function(){if(window.FileReader&&e&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 8")===-1||e.size<2e4)&&(!window.FileAPI||navigator.userAgent.indexOf("MSIE 9")===-1||e.size<4e6)){var n=window.URL||window.webkitURL;if(n&&n.createObjectURL&&!i){var o;try{o=n.createObjectURL(e)}catch(s){return void t(function(){e.$ngfBlobUrl="",a.reject()})}t(function(){if(e.$ngfBlobUrl=o,o){a.resolve(o,e),r.blobUrls=r.blobUrls||[],r.blobUrlsTotalSize=r.blobUrlsTotalSize||0,r.blobUrls.push({url:o,size:e.size}),r.blobUrlsTotalSize+=e.size||0;for(var t=r.defaults.blobUrlsMaxMemory||268435456,i=r.defaults.blobUrlsMaxQueueSize||200;(r.blobUrlsTotalSize>t||r.blobUrls.length>i)&&r.blobUrls.length>1;){var s=r.blobUrls.splice(0,1)[0];n.revokeObjectURL(s.url),r.blobUrlsTotalSize-=s.size}}})}else{var u=new FileReader;u.onload=function(n){t(function(){e.$ngfDataUrl=n.target.result,a.resolve(n.target.result,e),t(function(){delete e.$ngfDataUrl},1e3)})},u.onerror=function(){t(function(){e.$ngfDataUrl="",a.reject()})},u.readAsDataURL(e)}}else t(function(){e[i?"$ngfDataUrl":"$ngfBlobUrl"]="",a.reject()})}),o=i?e.$$ngfDataUrlPromise=a.promise:e.$$ngfBlobUrlPromise=a.promise,o["finally"](function(){delete e[i?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),o},r}]),r.directive("ngfSrc",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfSrc",e.attrGetter("ngfResize",o,r),!1)}}}]),r.directive("ngfBackground",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){t(e,n,r,i,o,"ngfBackground",e.attrGetter("ngfResize",o,r),!0)}}}]),r.directive("ngfThumbnail",["Upload","$timeout",function(e,n){return{restrict:"AE",link:function(r,i,o){var a=e.attrGetter("ngfSize",o,r);t(e,n,r,i,o,"ngfThumbnail",a,e.attrGetter("ngfAsBackground",o,r))}}}]),r.config(["$compileProvider",function(e){e.imgSrcSanitizationWhitelist&&e.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),e.aHrefSanitizationWhitelist&&e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),r.filter("ngfDataUrl",["UploadDataUrl","$sce",function(e,t){return function(n,r,i){if(angular.isString(n))return t.trustAsResourceUrl(n);var o=n&&((r?n.$ngfDataUrl:n.$ngfBlobUrl)||n.$ngfDataUrl);return n&&!o?(!n.$ngfDataUrlFilterInProgress&&angular.isObject(n)&&(n.$ngfDataUrlFilterInProgress=!0,e.dataUrl(n,r)),""):(n&&delete n.$ngfDataUrlFilterInProgress,(n&&o?i?t.trustAsResourceUrl(o):o:n)||"")}}])}(),r.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(e,t,n){function r(e){var t="",n=[];if(e.length>2&&"/"===e[0]&&"/"===e[e.length-1])t=e.substring(1,e.length-1);else{var i=e.split(",");if(i.length>1)for(var o=0;o<i.length;o++){var a=r(i[o]);a.regexp?(t+="("+a.regexp+")",o<i.length-1&&(t+="|")):n=n.concat(a.excludes)}else 0===e.indexOf("!")?n.push("^((?!"+r(e.substring(1)).regexp+").)*$"):(0===e.indexOf(".")&&(e="*"+e),t="^"+e.replace(new RegExp("[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]","g"),"\\$&")+"$",t=t.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:t,excludes:n}}function i(e,t){null==t||e.$dirty||(e.$setDirty?e.$setDirty():e.$dirty=!0)}var o=e;return o.validatePattern=function(e,t){if(!t)return!0;var n=r(t),i=!0;if(n.regexp&&n.regexp.length){var o=new RegExp(n.regexp,"i");i=null!=e.type&&o.test(e.type)||null!=e.name&&o.test(e.name)}for(var a=n.excludes.length;a--;){var s=new RegExp(n.excludes[a],"i");i=i&&(null==e.type||s.test(e.type))&&(null==e.name||s.test(e.name))}return i},o.ratioToFloat=function(e){var t=e.toString(),n=t.search(/[x:]/i);return t=n>-1?parseFloat(t.substring(0,n))/parseFloat(t.substring(n+1)):parseFloat(t)},o.registerModelChangeValidator=function(e,t,n){e&&e.$formatters.push(function(r){if(e.$dirty){var i=r;r&&!angular.isArray(r)&&(i=[r]),o.validate(i,0,e,t,n).then(function(){o.applyModelValidation(e,i)})}return r})},o.applyModelValidation=function(e,t){i(e,t),angular.forEach(e.$ngfValidations,function(t){e.$setValidity(t.name,t.valid)})},o.getValidationAttr=function(e,t,n,r,i){var a="ngf"+n[0].toUpperCase()+n.substr(1),s=o.attrGetter(a,e,t,{$file:i});if(null==s&&(s=o.attrGetter("ngfValidate",e,t,{$file:i}))){var u=(r||n).split(".");s=s[u[0]],u.length>1&&(s=s&&s[u[1]])}return s},o.validate=function(e,n,r,i,a){function s(t,n,s){if(e){for(var u=e.length,l=null;u--;){var p=e[u];if(p){var h=o.getValidationAttr(i,a,t,n,p);null!=h&&(s(p,h,u)||(c.indexOf(t)===-1?(p.$error=t,(p.$errorMessages=p.$errorMessages||{})[t]=!0,p.$errorParam=h,d.indexOf(p)===-1&&d.push(p),f||e.splice(u,1),l=!1):e.splice(u,1)))}}null!==l&&r.$ngfValidations.push({name:t,valid:l})}}function u(n,s,u,p,h){function g(t,r,i){function o(o){if(o())if(c.indexOf(n)===-1){if(r.$error=n,(r.$errorMessages=r.$errorMessages||{})[n]=!0,r.$errorParam=i,d.indexOf(r)===-1&&d.push(r),!f){var a=e.indexOf(r);a>-1&&e.splice(a,1)}t.resolve(!1)}else{var s=e.indexOf(r);s>-1&&e.splice(s,1),t.resolve(!0)}else t.resolve(!0)}null!=i?p(r,i).then(function(e){o(function(){return!h(e,i)})},function(){o(function(){return l("ngfValidateForce",{$file:r})})}):t.resolve(!0)}var v=[o.emptyPromise(!0)];e&&(e=void 0===e.length?[e]:e,angular.forEach(e,function(e){var r=t.defer();return v.push(r.promise),!u||null!=e.type&&0===e.type.search(u)?void("dimensions"===n&&null!=o.attrGetter("ngfDimensions",i)?o.imageDimensions(e).then(function(t){g(r,e,l("ngfDimensions",{$file:e,$width:t.width,$height:t.height}))},function(){r.resolve(!1)}):"duration"===n&&null!=o.attrGetter("ngfDuration",i)?o.mediaDuration(e).then(function(t){g(r,e,l("ngfDuration",{$file:e,$duration:t}))},function(){r.resolve(!1)}):g(r,e,o.getValidationAttr(i,a,n,s,e))):void r.resolve(!0)}));var $=t.defer();return t.all(v).then(function(e){for(var t=!0,i=0;i<e.length;i++)if(!e[i]){t=!1;break}r.$ngfValidations.push({name:n,valid:t}),$.resolve(t)}),$.promise}r=r||{},r.$ngfValidations=r.$ngfValidations||[],angular.forEach(r.$ngfValidations,function(e){e.valid=!0});var l=function(e,t){return o.attrGetter(e,i,a,t)},c=(o.attrGetter("ngfIgnoreInvalid",i,a)||"").split(" "),f=o.attrGetter("ngfRunAllValidations",i,a);if(null==e||0===e.length)return o.emptyPromise({validFiles:e,invalidFiles:[]});e=void 0===e.length?[e]:e.slice(0);var d=[];s("pattern",null,o.validatePattern),s("minSize","size.min",function(e,t){return e.size+.1>=o.translateScalars(t)}),s("maxSize","size.max",function(e,t){return e.size-.1<=o.translateScalars(t)});var p=0;if(s("maxTotalSize",null,function(t,n){return p+=t.size,!(p>o.translateScalars(n))||(e.splice(0,e.length),!1)}),s("validateFn",null,function(e,t){return t===!0||null===t||""===t}),!e.length)return o.emptyPromise({validFiles:[],invalidFiles:d});var h=t.defer(),g=[];return g.push(u("maxHeight","height.max",/image/,this.imageDimensions,function(e,t){return e.height<=t})),g.push(u("minHeight","height.min",/image/,this.imageDimensions,function(e,t){return e.height>=t})),g.push(u("maxWidth","width.max",/image/,this.imageDimensions,function(e,t){return e.width<=t})),g.push(u("minWidth","width.min",/image/,this.imageDimensions,function(e,t){return e.width>=t})),g.push(u("dimensions",null,/image/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("ratio",null,/image/,this.imageDimensions,function(e,t){for(var n=t.toString().split(","),r=!1,i=0;i<n.length;i++)Math.abs(e.width/e.height-o.ratioToFloat(n[i]))<.01&&(r=!0);return r})),g.push(u("maxRatio","ratio.max",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)<1e-4})),g.push(u("minRatio","ratio.min",/image/,this.imageDimensions,function(e,t){return e.width/e.height-o.ratioToFloat(t)>-1e-4})),g.push(u("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(e,t){return e<=o.translateScalars(t)})),g.push(u("minDuration","duration.min",/audio|video/,this.mediaDuration,function(e,t){return e>=o.translateScalars(t)})),g.push(u("duration",null,/audio|video/,function(e,t){return o.emptyPromise(t)},function(e){return e})),g.push(u("validateAsyncFn",null,null,function(e,t){return t},function(e){return e===!0||null===e||""===e})),t.all(g).then(function(){if(f)for(var t=0;t<e.length;t++){var r=e[t];r.$error&&e.splice(t--,1)}f=!1,s("maxFiles",null,function(e,t,r){return n+r<t}),h.resolve({validFiles:e,invalidFiles:d})}),h.promise},o.imageDimensions=function(e){if(e.$ngfWidth&&e.$ngfHeight){var r=t.defer();return n(function(){r.resolve({width:e.$ngfWidth,height:e.$ngfHeight})}),r.promise}if(e.$ngfDimensionPromise)return e.$ngfDimensionPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("image")?void i.reject("not image"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].naturalWidth||s[0].clientWidth,n=s[0].naturalHeight||s[0].clientHeight;s.remove(),e.$ngfWidth=t,e.$ngfHeight=n,i.resolve({width:t,height:n})}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].clientWidth?r():u++>10?o():a())},1e3)}var s=angular.element("<img>").attr("src",t).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");s.on("load",r),s.on("error",o);var u=0;a(),angular.element(document.getElementsByTagName("body")[0]).append(s)},function(){i.reject("load error")})}),e.$ngfDimensionPromise=i.promise,e.$ngfDimensionPromise["finally"](function(){delete e.$ngfDimensionPromise}),e.$ngfDimensionPromise},o.mediaDuration=function(e){if(e.$ngfDuration){var r=t.defer();return n(function(){r.resolve(e.$ngfDuration)}),r.promise}if(e.$ngfDurationPromise)return e.$ngfDurationPromise;var i=t.defer();return n(function(){return 0!==e.type.indexOf("audio")&&0!==e.type.indexOf("video")?void i.reject("not media"):void o.dataUrl(e).then(function(t){function r(){var t=s[0].duration;e.$ngfDuration=t,s.remove(),i.resolve(t)}function o(){s.remove(),i.reject("load error")}function a(){n(function(){s[0].parentNode&&(s[0].duration?r():u>10?o():a())},1e3)}var s=angular.element(0===e.type.indexOf("audio")?"<audio>":"<video>").attr("src",t).css("visibility","none").css("position","fixed");s.on("loadedmetadata",r),s.on("error",o);var u=0;a(),angular.element(document.body).append(s)},function(){i.reject("load error")})}),e.$ngfDurationPromise=i.promise,e.$ngfDurationPromise["finally"](function(){delete e.$ngfDurationPromise}),e.$ngfDurationPromise},o}]),r.service("UploadResize",["UploadValidate","$q",function(e,t){var n=e,r=function(e,t,n,r,i){var o=i?Math.max(n/e,r/t):Math.min(n/e,r/t);return{width:e*o,height:t*o,marginX:e*o-n,marginY:t*o-r}},i=function(e,i,o,a,s,u,l,c){var f=t.defer(),d=document.createElement("canvas"),p=document.createElement("img");return p.setAttribute("style","visibility:hidden;position:fixed;z-index:-100000"),document.body.appendChild(p),p.onload=function(){var e=p.width,t=p.height;if(p.parentNode.removeChild(p),null!=c&&c(e,t)===!1)return void f.reject("resizeIf");try{if(u){var h=n.ratioToFloat(u),g=e/t;g<h?(i=e,o=i/h):(o=t,i=o*h)}i||(i=e),o||(o=t);var v=r(e,t,i,o,l);d.width=Math.min(v.width,i),d.height=Math.min(v.height,o);var $=d.getContext("2d");$.drawImage(p,Math.min(0,-v.marginX/2),Math.min(0,-v.marginY/2),v.width,v.height),f.resolve(d.toDataURL(s||"image/WebP",a||.934))}catch(m){f.reject(m)}},p.onerror=function(){p.parentNode.removeChild(p),f.reject()},p.src=e,f.promise};return n.dataUrltoBlob=function(e,t,n){for(var r=e.split(","),i=r[0].match(/:(.*?);/)[1],o=atob(r[1]),a=o.length,s=new Uint8Array(a);a--;)s[a]=o.charCodeAt(a);var u=new window.Blob([s],{type:i});return u.name=t,u.$ngfOrigSize=n,u},n.isResizeSupported=function(){var e=document.createElement("canvas");return window.atob&&e.getContext&&e.getContext("2d")&&window.Blob},n.isResizeSupported()&&Object.defineProperty(window.Blob.prototype,"name",{get:function(){return this.$ngfName},set:function(e){this.$ngfName=e},configurable:!0}),n.resize=function(e,r){if(0!==e.type.indexOf("image"))return n.emptyPromise(e);var o=t.defer();return n.dataUrl(e,!0).then(function(t){i(t,r.width,r.height,r.quality,r.type||e.type,r.ratio,r.centerCrop,r.resizeIf).then(function(i){if("image/jpeg"===e.type&&r.restoreExif!==!1)try{i=n.restoreExif(t,i)}catch(a){setTimeout(function(){throw a},1)}try{var s=n.dataUrltoBlob(i,e.name,e.size);o.resolve(s)}catch(a){o.reject(a)}},function(t){"resizeIf"===t&&o.resolve(e),o.reject(t)})},function(e){o.reject(e)}),o.promise},n}]),function(){function e(e,n,r,i,o,a,s,u,l,c){function f(){return n.attr("disabled")||$("ngfDropDisabled",e)}function d(t,n){u.updateModel(i,r,e,$("ngfChange")||$("ngfDrop"),t,n)}function p(t,n){if(!u.shouldUpdateOn(t,r,e)||"string"!=typeof n)return u.rejectPromise([]);var i=[];n.replace(/<(img src|img [^>]* src) *=\"([^\"]*)\"/gi,function(e,t,n){i.push(n)});var o=[],a=[];if(i.length){angular.forEach(i,function(e){o.push(u.urlToBlob(e).then(function(e){a.push(e)}))});var s=c.defer();return c.all(o).then(function(){s.resolve(a)},function(e){s.reject(e)}),s.promise}return u.emptyPromise()}function h(e,t,n,r){var i=$("ngfDragOverClass",e,{$event:n}),o="dragover";if(angular.isString(i))o=i;else if(i&&(i.delay&&(w=i.delay),i.accept||i.reject)){var a=n.dataTransfer.items;if(null!=a&&a.length)for(var s=i.pattern||$("ngfPattern",e,{$event:n}),l=a.length;l--;){if(!u.validatePattern(a[l],s)){o=i.reject;break}o=i.accept}else o=i.accept}r(o)}function g(t,n,i,o){function a(e,t){var n=c.defer();if(null!=e)if(e.isDirectory){var r=[u.emptyPromise()];if(d){var i={type:"directory"};i.name=i.path=(t||"")+e.name,p.push(i)}var o=e.createReader(),s=[],g=function(){o.readEntries(function(i){try{i.length?(s=s.concat(Array.prototype.slice.call(i||[],0)),g()):(angular.forEach(s.slice(0),function(n){p.length<=l&&h<=f&&r.push(a(n,(t?t:"")+e.name+"/"))}),c.all(r).then(function(){n.resolve()},function(e){n.reject(e)}))}catch(o){n.reject(o)}},function(e){n.reject(e)})};g()}else e.file(function(e){try{e.path=(t?t:"")+e.name,d&&(e=u.rename(e,e.path)),p.push(e),h+=e.size,n.resolve()}catch(r){n.reject(r)}},function(e){n.reject(e)});return n.promise}var l=u.getValidationAttr(r,e,"maxFiles");null==l&&(l=Number.MAX_VALUE);var f=u.getValidationAttr(r,e,"maxTotalSize");null==f&&(f=Number.MAX_VALUE);var d=$("ngfIncludeDir",e),p=[],h=0,g=[u.emptyPromise()];if(t&&t.length>0&&"file:"!==s.location.protocol)for(var v=0;v<t.length;v++){if(t[v].webkitGetAsEntry&&t[v].webkitGetAsEntry()&&t[v].webkitGetAsEntry().isDirectory){var m=t[v].webkitGetAsEntry();if(m.isDirectory&&!i)continue;null!=m&&g.push(a(m))}else{var b=t[v].getAsFile();null!=b&&(p.push(b),h+=b.size)}if(p.length>l||h>f||!o&&p.length>0)break}else if(null!=n)for(var y=0;y<n.length;y++){var w=n.item(y);if((w.type||w.size>0)&&(p.push(w),h+=w.size),p.length>l||h>f||!o&&p.length>0)break}var x=c.defer();return c.all(g).then(function(){if(o||d||!p.length)x.resolve(p);else{for(var e=0;p[e]&&"directory"===p[e].type;)e++;x.resolve([p[e]])}},function(e){x.reject(e)}),x.promise}var v=t(),$=function(e,t,n){return u.attrGetter(e,r,t,n);
|
9 |
+
};if($("dropAvailable")&&a(function(){e[$("dropAvailable")]?e[$("dropAvailable")].value=v:e[$("dropAvailable")]=v}),!v)return void($("ngfHideOnDropNotAvailable",e)===!0&&n.css("display","none"));null==$("ngfSelect")&&u.registerModelChangeValidator(i,r,e);var m,b=null,y=o($("ngfStopPropagation")),w=1;n[0].addEventListener("dragover",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){if(t.preventDefault(),y(e)&&t.stopPropagation(),navigator.userAgent.indexOf("Chrome")>-1){var i=t.dataTransfer.effectAllowed;t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy"}a.cancel(b),m||(m="C",h(e,r,t,function(r){m=r,n.addClass(m),$("ngfDrag",e,{$isDragging:!0,$class:m,$event:t})}))}},!1),n[0].addEventListener("dragenter",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation())},!1),n[0].addEventListener("dragleave",function(t){!f()&&u.shouldUpdateOn("drop",r,e)&&(t.preventDefault(),y(e)&&t.stopPropagation(),b=a(function(){m&&n.removeClass(m),m=null,$("ngfDrag",e,{$isDragging:!1,$event:t})},w||100))},!1),n[0].addEventListener("drop",function(t){if(!f()&&u.shouldUpdateOn("drop",r,e)){t.preventDefault(),y(e)&&t.stopPropagation(),m&&n.removeClass(m),m=null;var i,o=t.dataTransfer.items;try{i=t.dataTransfer&&t.dataTransfer.getData&&t.dataTransfer.getData("text/html")}catch(a){}g(o,t.dataTransfer.files,$("ngfAllowDir",e)!==!1,$("multiple")||$("ngfMultiple",e)).then(function(e){e.length?d(e,t):p("dropUrl",i).then(function(e){d(e,t)})})}},!1),n[0].addEventListener("paste",function(t){if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&t.preventDefault(),!f()&&u.shouldUpdateOn("paste",r,e)){var n=[],i=t.clipboardData||t.originalEvent.clipboardData;if(i&&i.items)for(var o=0;o<i.items.length;o++)i.items[o].type.indexOf("image")!==-1&&n.push(i.items[o].getAsFile());n.length?d(n,t):p("pasteUrl",i).then(function(e){d(e,t)})}},!1),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&$("ngfEnableFirefoxPaste",e)&&(n.attr("contenteditable",!0),n.on("keypress",function(e){e.metaKey||e.ctrlKey||e.preventDefault()}))}function t(){var e=document.createElement("div");return"draggable"in e&&"ondrop"in e&&!/Edge\/12./i.test(navigator.userAgent)}r.directive("ngfDrop",["$parse","$timeout","$window","Upload","$http","$q",function(t,n,r,i,o,a){return{restrict:"AEC",require:"?ngModel",link:function(s,u,l,c){e(s,u,l,c,t,n,r,i,o,a)}}}]),r.directive("ngfNoFileDrop",function(){return function(e,n){t()&&n.css("display","none")}}),r.directive("ngfDropAvailable",["$parse","$timeout","Upload",function(e,n,r){return function(i,o,a){if(t()){var s=e(r.attrGetter("ngfDropAvailable",a));n(function(){s(i),s.assign&&s.assign(i,!0)})}}}])}(),r.service("UploadExif",["UploadResize","$q",function(e,t){function n(e,t,n,r){switch(t){case 2:return e.transform(-1,0,0,1,n,0);case 3:return e.transform(-1,0,0,-1,n,r);case 4:return e.transform(1,0,0,-1,0,r);case 5:return e.transform(0,1,1,0,0,0);case 6:return e.transform(0,1,-1,0,r,0);case 7:return e.transform(0,-1,-1,0,r,n);case 8:return e.transform(0,-1,1,0,0,n)}}function r(e){for(var t="",n=new Uint8Array(e),r=n.byteLength,i=0;i<r;i++)t+=String.fromCharCode(n[i]);return window.btoa(t)}var i=e;return i.isExifSupported=function(){return window.FileReader&&(new FileReader).readAsArrayBuffer&&i.isResizeSupported()},i.readOrientation=function(e){var n=t.defer(),r=new FileReader,i=e.slice?e.slice(0,65536):e;return r.readAsArrayBuffer(i),r.onerror=function(e){return n.reject(e)},r.onload=function(e){var t={orientation:1},r=new DataView(this.result);if(65496!==r.getUint16(0,!1))return n.resolve(t);for(var i=r.byteLength,o=2;o<i;){var a=r.getUint16(o,!1);if(o+=2,65505===a){if(1165519206!==r.getUint32(o+=2,!1))return n.resolve(t);var s=18761===r.getUint16(o+=6,!1);o+=r.getUint32(o+4,s);var u=r.getUint16(o,s);o+=2;for(var l=0;l<u;l++)if(274===r.getUint16(o+12*l,s)){var c=r.getUint16(o+12*l+8,s);return c>=2&&c<=8&&(r.setUint16(o+12*l+8,1,s),t.fixedArrayBuffer=e.target.result),t.orientation=c,n.resolve(t)}}else{if(65280!==(65280&a))break;o+=r.getUint16(o,!1)}}return n.resolve(t)},n.promise},i.applyExifRotation=function(e){if(0!==e.type.indexOf("image/jpeg"))return i.emptyPromise(e);var o=t.defer();return i.readOrientation(e).then(function(t){return t.orientation<2||t.orientation>8?o.resolve(e):void i.dataUrl(e,!0).then(function(a){var s=document.createElement("canvas"),u=document.createElement("img");u.onload=function(){try{s.width=t.orientation>4?u.height:u.width,s.height=t.orientation>4?u.width:u.height;var a=s.getContext("2d");n(a,t.orientation,u.width,u.height),a.drawImage(u,0,0);var l=s.toDataURL(e.type||"image/WebP",.934);l=i.restoreExif(r(t.fixedArrayBuffer),l);var c=i.dataUrltoBlob(l,e.name);o.resolve(c)}catch(f){return o.reject(f)}},u.onerror=function(){o.reject()},u.src=a},function(e){o.reject(e)})},function(e){o.reject(e)}),o.promise},i.restoreExif=function(e,t){var n={};return n.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n.encode64=function(e){var t,n,r,i,o,a="",s="",u="",l=0;do t=e[l++],n=e[l++],s=e[l++],r=t>>2,i=(3&t)<<4|n>>4,o=(15&n)<<2|s>>6,u=63&s,isNaN(n)?o=u=64:isNaN(s)&&(u=64),a=a+this.KEY_STR.charAt(r)+this.KEY_STR.charAt(i)+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(u),t=n=s="",r=i=o=u="";while(l<e.length);return a},n.restore=function(e,t){e.match("data:image/jpeg;base64,")&&(e=e.replace("data:image/jpeg;base64,",""));var n=this.decode64(e),r=this.slice2Segments(n),i=this.exifManipulation(t,r);return"data:image/jpeg;base64,"+this.encode64(i)},n.exifManipulation=function(e,t){var n=this.getExifArray(t),r=this.insertExif(e,n);return new Uint8Array(r)},n.getExifArray=function(e){for(var t,n=0;n<e.length;n++)if(t=e[n],255===t[0]&225===t[1])return t;return[]},n.insertExif=function(e,t){var n=e.replace("data:image/jpeg;base64,",""),r=this.decode64(n),i=r.indexOf(255,3),o=r.slice(0,i),a=r.slice(i),s=o;return s=s.concat(t),s=s.concat(a)},n.slice2Segments=function(e){for(var t=0,n=[];;){if(255===e[t]&218===e[t+1])break;if(255===e[t]&216===e[t+1])t+=2;else{var r=256*e[t+2]+e[t+3],i=t+r+2,o=e.slice(t,i);n.push(o),t=i}if(t>e.length)break}return n},n.decode64=function(e){var t,n,r,i,o,a="",s="",u=0,l=[],c=/[^A-Za-z0-9\+\/\=]/g;c.exec(e)&&console.log("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, NaNExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");do r=this.KEY_STR.indexOf(e.charAt(u++)),i=this.KEY_STR.indexOf(e.charAt(u++)),o=this.KEY_STR.indexOf(e.charAt(u++)),s=this.KEY_STR.indexOf(e.charAt(u++)),t=r<<2|i>>4,n=(15&i)<<4|o>>2,a=(3&o)<<6|s,l.push(t),64!==o&&l.push(n),64!==s&&l.push(a),t=n=a="",r=i=o=s="";while(u<e.length);return l},n.restore(e,t)},i}])},{}],44:[function(e,t,n){e("./dist/ng-file-upload-all"),t.exports="ngFileUpload"},{"./dist/ng-file-upload-all":43}]},{},[37]);
|
js/jpibfi.client.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button"}),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":5}],3:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(",").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return this.enabledClasses.every(function(e){return t.hasClass(e)})&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":7}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],6:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},c=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},l=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),h=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);case"center":default:return new f(c,l)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=h},{}],7:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),c=i(s),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},c=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(c).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){o.remove()},100))}})}}]),e}(c["default"]);n["default"]=l},{"./show-strategy":8}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),c=t("./positioner"),l=i(c),f=function h(t,e,n){r(this,h),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new l["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":2,"./image-filter":3,"./positioner":6}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./logger"),u=i(a),s=t("./hover"),c=i(s);!function(t){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"](/[?&]jpibfi_debug=/.test(location.search));i.logObject(n);var r=function(){var e=new c["default"](t,n,i);e.init()};t(document).ready(r)}(jQuery)},{"./hover":4,"./logger":10,"./settings":11}],10:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t);var r=e&&"undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){})}return r(t,[{key:"log",value:function(t){console.log("jpibfi debug: "+t)}},{key:"simplelogObject",value:function(t){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}]),t}();n["default"]=o},{}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){i(this,o),Object.assign(this,t),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[9]);
|
1 |
+
!function t(e,n,i){function r(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};e[a][0].call(l.exports,function(t){var n=e[a][1][t];return r(n?n:t)},l,l.exports,t,e,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.siteTitle,r=void 0===n?"":n;i(this,t),this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return r}}}return r(t,[{key:"getDescription",value:function(t,e){for(var n="",i=0;i<e.length&&!n;i++)n=this.desc_funcs[e[i]](t);return n}}]),t}();n["default"]=o},{}],2:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./link-generator"),u=i(a),s=function(){function t(e,n){r(this,t),this.$=e,this.settings=n,this.linkGenerator=new u["default"](n),this.$element=this.$("<a />",{target:"_blank","class":"pinit-button"}),this.size={height:n.pinImageHeight,width:n.pinImageWidth}}return o(t,[{key:"createButton",value:function(t){var e=this.$element.clone(!1);return e.attr("href",this.linkGenerator.generate(t)).click(function(t){t.preventDefault(),t.stopPropagation(),"#"!==t.currentTarget.href.slice(-1)&&window.open(t.currentTarget.href,"mw"+t.timeStamp,"left=20,top=20,width=500,height=500,toolbar=1,resizable=0")}),{$element:e,size:this.size}}}]),t}();n["default"]=s},{"./link-generator":5}],3:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t),this.settings=e,this.disabledClasses=this.createClassList(e.disabled_classes),this.enabledClasses=this.createClassList(e.enabled_classes),this.updateSizeConstraints(),window.addEventListener("resize",function(){return n.updateSizeConstraints()},!1)}return r(t,[{key:"createClassList",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(",").filter(function(t){return!!t})}},{key:"imageEligible",value:function(t){return this.enabledClasses.every(function(e){return t.hasClass(e)})&&!this.disabledClasses.some(function(e){return t.hasClass(e)})&&this.imageSizeIsOk(t)}},{key:"imageSizeIsOk",value:function(t){var e=t[0].clientWidth,n=t[0].clientHeight;return e>=this.minWidth&&n>=this.minHeight}},{key:"updateSizeConstraints",value:function(){this.minWidth=window.outerWidth<768?this.settings.min_image_width_small:this.settings.min_image_width,this.minHeight=window.outerWidth<768?this.settings.min_image_height_small:this.settings.min_image_height}}]),t}();n["default"]=o},{}],4:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./show-on-hover-strategy"),u=i(a),s=function(){function t(e,n,i){r(this,t),this.settings=n,this.$=e,this.logger=i}return o(t,[{key:"init",value:function(){this.showStrategy=this.getStrategy(),this.showStrategy.start()}},{key:"getStrategy",value:function(){var t=null;return new(t=u["default"])(this.$,this.settings,this.logger)}}]),t}();n["default"]=s},{"./show-on-hover-strategy":7}],5:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),a=t("./../common/description-helper"),u=i(a),s=function(){function t(e){r(this,t),this.descriptionHelper=new u["default"]({siteTitle:e.siteTitle}),this.pinLinkedImages=e.pinLinkedImages,this.description_option=e.description_option,this.desc_funcs={img_title:function(t){return t.attr("title")},img_alt:function(t){return t.attr("alt")},post_title:function(t){return t.attr("data-jpibfi-post-title")},img_description:function(t){return t.attr("data-jpibfi-description")},img_caption:function(t){return t.attr("data-jpibfi-caption")},site_title:function(){return e.siteTitle}}}return o(t,[{key:"getDescription",value:function(t){return this.descriptionHelper.getDescription(t,this.description_option)}},{key:"getImage",value:function(t){var e=t.attr("src");if(!this.pinLinkedImages)return e;var n=t.closest("a");if(0===n.length)return e;var i=e.split(".").pop(),r=n.attr("href"),o=r.split(".").pop();return o.toLowerCase()===i.toLowerCase()?r:e}},{key:"getUrl",value:function(t){return t.attr("data-jpibfi-post-url")||window.location.href}},{key:"generate",value:function(t){var e=encodeURIComponent(this.getDescription(t)),n=encodeURIComponent(this.getUrl(t)),i=encodeURIComponent(this.getImage(t));return"http://pinterest.com/pin/create/bookmarklet/?is_video=false&url="+n+"&media="+i+"&description="+e}}]),t}();n["default"]=s},{"./../common/description-helper":1}],6:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(t,e,n,i){return t.top+i.top},a=function(t,e,n,i){return t.left+i.left},u=function(t,e,n,i){return e.top-n.height-i.bottom},s=function(t,e,n,i){return e.left-i.right-n.width},c=function(t,e,n){return t.top+((e.top-t.top)/2-n.height/2)},l=function(t,e,n){return t.left+((e.left-t.left)/2-n.width/2)},f=function(){function t(e,n){i(this,t),this.topF=e,this.leftF=n}return r(t,[{key:"calculate",value:function(t,e,n,i){return{top:this.topF(t,e,n,i),left:this.leftF(t,e,n,i)}}}]),t}(),h=function(){function t(e,n){i(this,t),this.margins=n,this.positionCalculator=this.getPositionCalculator(e)}return r(t,[{key:"getPositionCalculator",value:function(t){switch(t){case"top-left":return new f(o,a);case"top-right":return new f(o,s);case"bottom-left":return new f(u,a);case"bottom-right":return new f(u,s);case"center":default:return new f(c,l)}}},{key:"calculatePosition",value:function(t,e,n){return this.positionCalculator.calculate(t,e,n,this.margins)}}]),t}();n["default"]=h},{}],7:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),s=t("./show-strategy"),c=i(s),l=function(t){function e(){return r(this,e),o(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return a(e,t),u(e,[{key:"init",value:function(){var t=this,e=function(){return t.$(".jpibfi").closest("div").addClass("jpibfi_container")};e()}},{key:"start",value:function(){var t=this;this.init();var e="data-jpibfi-timeout",n=0,i=function(e){return t.$("a.pinit-button["+t.indexerAttr+'="'+e+'"]')},r=this;r.$(document).delegate(this.settings.image_selector,"mouseenter",function(){var t=r.$(this);if(r.imageFilter.imageEligible(t)){t.addClass("pinit-hover");var o=t.attr(r.indexerAttr);o||(o=n++,t.attr(r.indexerAttr,o));var a=i(o);0===a.length?!function(){var n=r.buttonGenerator.createButton(t),i=n.$element,a=n.size,u=t.offset(),s={top:u.top+t[0].clientHeight,left:u.left+t[0].clientWidth},c=r.positioner.calculatePosition(u,s,a);t.after(i),i.attr(r.indexerAttr,o).css("visibility","hidden").show().offset(c).css("visibility","visible").hover(function(){return clearTimeout(i.attr(e))},function(){return i.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),i.remove()},100))})}():clearTimeout(a.attr(e))}}),r.$(document).delegate(this.settings.image_selector,"mouseleave",function(){var t=r.$(this),n=t.attr(r.indexerAttr);if(n){var o=i(n);o.attr(e,setTimeout(function(){t.removeClass("pinit-hover"),o.remove()},100))}})}}]),e}(c["default"]);n["default"]=l},{"./show-strategy":8}],8:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=t("./image-filter"),a=i(o),u=t("./button-generator"),s=i(u),c=t("./positioner"),l=i(c),f=function h(t,e,n){r(this,h),this.$=t,this.settings=e,this.logger=n,this.imageFilter=new a["default"](e),this.buttonGenerator=new s["default"](t,e);var i={left:e.button_margin_left,top:e.button_margin_top,right:e.button_margin_right,bottom:e.button_margin_bottom};this.positioner=new l["default"](e.button_position,i),this.indexerAttr="data-jpibfi-indexer"};n["default"]=f},{"./button-generator":2,"./image-filter":3,"./positioner":6}],9:[function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var r=t("./settings"),o=i(r),a=t("./logger"),u=i(a),s=t("./hover"),c=i(s);!function(t){var e=window.jpibfi_options,n=new o["default"](t.extend({pageUrl:document.URL,pageTitle:document.title,pageDescription:t('meta[name="description"]').attr("content")||""},e.hover)),i=new u["default"](/[?&]jpibfi_debug=/.test(location.search));i.logObject(n);var r=function(){var e=new c["default"](t,n,i);e.init()};t(document).ready(r)}(jQuery)},{"./hover":4,"./logger":10,"./settings":11}],10:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),o=function(){function t(e){var n=this;i(this,t);var r=e&&"undefined"!=typeof console&&"undefined"!=typeof console.log,o="undefined"!=typeof JSON&&"function"==typeof JSON.stringify;r?(this.logString=function(t){n.log(t)},this.logObject=o?function(t){n.log(JSON.stringify(t,null,4))}:function(t){return n.simplelogObject(t)}):(this.logString=function(){},this.logObject=function(){})}return r(t,[{key:"log",value:function(t){console.log("jpibfi debug: "+t)}},{key:"simplelogObject",value:function(t){var e=Object.keys(t).filter(function(e){return t.hasOwnPrototype(e)}).map(function(e){return e+": "+t[e]+"\n"}).join();this.log(e)}}]),t}();n["default"]=o},{}],11:[function(t,e,n){"use strict";function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var r=function o(t){i(this,o),Object.assign(this,t),this.isTouchDevice="ontouchstart"in window||{}.hasOwnProperty.call(navigator,"maxTouchPoints")};n["default"]=r},{}]},{},[9]);
|
languages/jquery-pin-it-button-for-images.pot
CHANGED
@@ -87,11 +87,11 @@ msgid "* - screen that is less than 768 pixels wide"
|
|
87 |
msgstr ""
|
88 |
|
89 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:19
|
90 |
-
msgid "For small screens* the \"Pin it\" button will show up if the image is at least
|
91 |
msgstr ""
|
92 |
|
93 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:21
|
94 |
-
msgid "Otherwise, the \"Pin it\" button will show up if the image is at least
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:25
|
@@ -102,43 +102,43 @@ msgstr ""
|
|
102 |
msgid "Selection"
|
103 |
msgstr ""
|
104 |
|
105 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
106 |
msgid "Image selector"
|
107 |
msgstr ""
|
108 |
|
109 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
110 |
msgid "jQuery selector for all the images that should have the \"Pin it\" button. Set the value to %s if you want the \"Pin it\" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors."
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
114 |
msgid "Disabled classes"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
118 |
msgid "Pictures with these CSS classes won't show the \"Pin it\" button. Please separate multiple classes with semicolons. Spaces are not accepted."
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
122 |
msgid "Enabled classes"
|
123 |
msgstr ""
|
124 |
|
125 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
126 |
msgid "Only pictures with these CSS classes will show the \"Pin it\" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button."
|
127 |
msgstr ""
|
128 |
|
129 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
130 |
msgid "Height"
|
131 |
msgstr ""
|
132 |
|
133 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
134 |
msgid "Width"
|
135 |
msgstr ""
|
136 |
|
137 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
138 |
msgid "Show on"
|
139 |
msgstr ""
|
140 |
|
141 |
-
#: includes/admin/settings/class-jpibfi-selection-settings.php:
|
142 |
msgid "Disable on"
|
143 |
msgstr ""
|
144 |
|
87 |
msgstr ""
|
88 |
|
89 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:19
|
90 |
+
msgid "For small screens* the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
|
91 |
msgstr ""
|
92 |
|
93 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:21
|
94 |
+
msgid "Otherwise, the \"Pin it\" button will show up if the image is at least %height% pixels high and %width% pixels wide."
|
95 |
msgstr ""
|
96 |
|
97 |
#: includes/admin/settings/class-jpibfi-selection-settings.php:25
|
102 |
msgid "Selection"
|
103 |
msgstr ""
|
104 |
|
105 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:93
|
106 |
msgid "Image selector"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:95
|
110 |
msgid "jQuery selector for all the images that should have the \"Pin it\" button. Set the value to %s if you want the \"Pin it\" button to appear only on images in content or %s to appear on all images on site (including sidebar, header and footer). If you know a thing or two about jQuery, you might use your own selector. %sClick here%s to read about jQuery selectors."
|
111 |
msgstr ""
|
112 |
|
113 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:115, includes/admin/settings/class-jpibfi-selection-settings.php:207
|
114 |
msgid "Disabled classes"
|
115 |
msgstr ""
|
116 |
|
117 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:117
|
118 |
msgid "Pictures with these CSS classes won't show the \"Pin it\" button. Please separate multiple classes with semicolons. Spaces are not accepted."
|
119 |
msgstr ""
|
120 |
|
121 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:127, includes/admin/settings/class-jpibfi-selection-settings.php:209
|
122 |
msgid "Enabled classes"
|
123 |
msgstr ""
|
124 |
|
125 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:129
|
126 |
msgid "Only pictures with these CSS classes will show the \"Pin it\" button. Please separate multiple classes with semicolons. If this field is empty, images with any (besides disabled ones) classes will show the Pin It button."
|
127 |
msgstr ""
|
128 |
|
129 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:137, includes/admin/settings/class-jpibfi-selection-settings.php:143, includes/admin/settings/class-jpibfi-visual-settings.php:225
|
130 |
msgid "Height"
|
131 |
msgstr ""
|
132 |
|
133 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:139, includes/admin/settings/class-jpibfi-selection-settings.php:145, includes/admin/settings/class-jpibfi-visual-settings.php:227
|
134 |
msgid "Width"
|
135 |
msgstr ""
|
136 |
|
137 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:153
|
138 |
msgid "Show on"
|
139 |
msgstr ""
|
140 |
|
141 |
+
#: includes/admin/settings/class-jpibfi-selection-settings.php:163
|
142 |
msgid "Disable on"
|
143 |
msgstr ""
|
144 |
|
readme.txt
CHANGED
@@ -68,6 +68,10 @@ Please report them in the plugin's support forum on Wordpress.org.
|
|
68 |
|
69 |
== Changelog ==
|
70 |
|
|
|
|
|
|
|
|
|
71 |
= 2.00 =
|
72 |
* Release 2016-10-02
|
73 |
* Complete code rewrite
|
@@ -250,6 +254,9 @@ Please report them in the plugin's support forum on Wordpress.org.
|
|
250 |
|
251 |
== Upgrade Notice ==
|
252 |
|
|
|
|
|
|
|
253 |
= 2.00 =
|
254 |
* Complete rewrite plus some changes in settings.
|
255 |
|
68 |
|
69 |
== Changelog ==
|
70 |
|
71 |
+
= 2.0.1 =
|
72 |
+
* Release 2016-10-04
|
73 |
+
* Fixes for version 2.0.0
|
74 |
+
|
75 |
= 2.00 =
|
76 |
* Release 2016-10-02
|
77 |
* Complete code rewrite
|
254 |
|
255 |
== Upgrade Notice ==
|
256 |
|
257 |
+
= 2.0.1 =
|
258 |
+
* Fixes for version 2.0.0
|
259 |
+
|
260 |
= 2.00 =
|
261 |
* Complete rewrite plus some changes in settings.
|
262 |
|