Version Description
- 06.04.2019 =
- NEW: Added some methods to the window.galleries object prototype for retrieving display settings
- Secured: Zip extraction process (thanks to Slavco Mihajloski / @mslavco)
- Changed: Removed the now-deprecated 'publish' link from the Manage Gallery image actions row
- Fixed: A PHP warning emitted on Gallery > Other Options if the current gallery path cannot be written to
- Fixed: Added compatibility check for the official FontAwesome plugin
- Fixed: Clicking a checkbox in the Insert Gallery Window's "Sort or exclude images" tab was not functioning
- Fixed: Resized images were becoming larger than the original in some circumstances
- Fixed: URL to static assets like JS and CSS files was incorrect when NextGen Gallery was a symlink
Download this release
Release Info
Developer | photocrati |
Plugin | NextGEN Gallery – WordPress Gallery Plugin |
Version | 3.2.4 |
Comparing to | |
See all releases |
Code changes from version 3.2.2 to 3.2.4
- changelog.txt +10 -0
- nggallery.php +2 -2
- products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_admin_page.css +4 -1
- products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_admin_page.min.css +1 -1
- products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php +126 -34
- products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php +9 -6
- products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js +97 -0
- products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js +3 -3
- products/photocrati_nextgen/modules/nextgen_other_options/package.module.nextgen_other_options.php +6 -13
- products/photocrati_nextgen/modules/nextgen_other_options/templates/image_options_tab.php +9 -2
- products/photocrati_nextgen/modules/ngglegacy/admin/manage.php +0 -49
- products/photocrati_nextgen/modules/ngglegacy/admin/publish.php +0 -64
- products/photocrati_nextgen/modules/static_assets/module.static_assets.php +9 -0
- readme.txt +12 -2
changelog.txt
CHANGED
@@ -1,6 +1,16 @@
|
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
= V3.2.2 - 05.09.2019 =
|
5 |
* Changed: Updated video Links
|
6 |
* Changed: Branding updates in Readme.txt file
|
1 |
NextGEN Gallery
|
2 |
by Imagely
|
3 |
|
4 |
+
= V3.2.4 - 06.04.2019 =
|
5 |
+
* NEW: Added some methods to the window.galleries object prototype for retrieving display settings
|
6 |
+
* Secured: Zip extraction process (thanks to Slavco Mihajloski / @mslavco)
|
7 |
+
* Changed: Removed the now-deprecated 'publish' link from the Manage Gallery image actions row
|
8 |
+
* Fixed: A PHP warning emitted on Gallery > Other Options if the current gallery path cannot be written to
|
9 |
+
* Fixed: Added compatibility check for the official FontAwesome plugin
|
10 |
+
* Fixed: Clicking a checkbox in the Insert Gallery Window's "Sort or exclude images" tab was not functioning
|
11 |
+
* Fixed: Resized images were becoming larger than the original in some circumstances
|
12 |
+
* Fixed: URL to static assets like JS and CSS files was incorrect when NextGen Gallery was a symlink
|
13 |
+
|
14 |
= V3.2.2 - 05.09.2019 =
|
15 |
* Changed: Updated video Links
|
16 |
* Changed: Branding updates in Readme.txt file
|
nggallery.php
CHANGED
@@ -4,7 +4,7 @@ if(preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) { die('You
|
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 25 million downloads.
|
7 |
-
* Version: 3.2.
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
@@ -725,7 +725,7 @@ class C_NextGEN_Bootstrap
|
|
725 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
726 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
727 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
728 |
-
define('NGG_PLUGIN_VERSION', '3.2.
|
729 |
|
730 |
define(
|
731 |
'NGG_SCRIPT_VERSION',
|
4 |
/**
|
5 |
* Plugin Name: NextGEN Gallery
|
6 |
* Description: The most popular gallery plugin for WordPress and one of the most popular plugins of all time with over 25 million downloads.
|
7 |
+
* Version: 3.2.4
|
8 |
* Author: Imagely
|
9 |
* Plugin URI: https://www.imagely.com/wordpress-gallery-plugin/nextgen-gallery/
|
10 |
* Author URI: https://www.imagely.com
|
725 |
define('NGG_PRODUCT_URL', path_join(str_replace("\\" , '/', NGG_PLUGIN_URL), 'products'));
|
726 |
define('NGG_MODULE_URL', path_join(str_replace("\\", '/', NGG_PRODUCT_URL), 'photocrati_nextgen/modules'));
|
727 |
define('NGG_PLUGIN_STARTED_AT', microtime());
|
728 |
+
define('NGG_PLUGIN_VERSION', '3.2.4');
|
729 |
|
730 |
define(
|
731 |
'NGG_SCRIPT_VERSION',
|
products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_admin_page.css
CHANGED
@@ -469,11 +469,14 @@ table.nextgen_settings_position {
|
|
469 |
padding-left: 10px;
|
470 |
box-shadow: none;
|
471 |
width: 200px;
|
472 |
-
-webkit-appearance: none;
|
473 |
-webkit-border-radius: 0px;
|
474 |
border-radius: 0;
|
475 |
}
|
476 |
|
|
|
|
|
|
|
|
|
477 |
#ngg_page_content .ngg_page_content_main select {
|
478 |
background-image: url(dropdown_arrow.png);
|
479 |
background-size: 10px 10px;
|
469 |
padding-left: 10px;
|
470 |
box-shadow: none;
|
471 |
width: 200px;
|
|
|
472 |
-webkit-border-radius: 0px;
|
473 |
border-radius: 0;
|
474 |
}
|
475 |
|
476 |
+
#ngg_page_content .ngg_page_content_main select {
|
477 |
+
-webkit-appearance: none;
|
478 |
+
}
|
479 |
+
|
480 |
#ngg_page_content .ngg_page_content_main select {
|
481 |
background-image: url(dropdown_arrow.png);
|
482 |
background-size: 10px 10px;
|
products/photocrati_nextgen/modules/nextgen_admin/static/nextgen_admin_page.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
.ngg-admin .notice,.ngg-admin div.error,.ngg-admin div.updated{margin:20px 15px 0 0}.ngg-admin #ngg_page_content .notice,.ngg-admin #ngg_page_content div.error,.ngg-admin #ngg_page_content div.updated{margin:20px 0}.hidden{display:none}.nextgen_advanced_toggle_link{font-size:11px;position:relative;bottom:5px;color:#444}.url_field{width:400px;max-width:100%}.nextgen_settings_field_colorpicker{width:85px!important;text-align:center;margin-left:50px}#ngg_page_content .wp-picker-container,#ngg_page_content .wp-picker-holder,#ngg_page_content .wp-picker-input-wrap{position:initial!important}#nextgen_settings_wmXpos,#nextgen_settings_wmYpos{width:65px!important}table.nextgen_settings_position{width:auto!important}#ngg_page_content label.tooltip,#ngg_page_content span.tooltip{outline:0;background-image:url(information.png);background-repeat:no-repeat;padding-left:22px;padding-bottom:4px;background-size:18px}#poststuff .ui-accordion h3{padding-left:25px}#lightbox_effects_content table tr td:first-child{vertical-align:top;text-align:right;padding-right:7px;padding-top:5px}#lightbox_effects_content tr{height:28px}.ngg-admin #screen-meta-links{padding-bottom:20px}.ngg-admin #wpbody{position:static}#ngg_page_content{background:#fff;box-shadow:0 0 12px 6px rgba(0,0,0,.03);box-sizing:border-box;font-family:lato,sans-serif;float:left;height:auto;margin-top:25px;padding:20px 40px;width:98%;color:#000;font-size:15px;letter-spacing:.3px;font-weight:500}#adminmenu .wp-submenu a[href*=ngg_pro_upgrade]{color:#9fbb1a;font-weight:600}.toplevel_page_nextgen-gallery #ngg_page_content{margin-top:20px}#ngg_page_content.ngg_settings_page,.ngg_gallery_sort,.ngg_manage_albums,.ngg_manage_galleries,.ngg_manage_images{background:#fff}#ngg_page_content .wrap{margin:0}#ngg_page_content .about-wrap{max-width:100%;float:left}.about-wrap [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap [class$="-col"] .col+.col{margin-left:20px}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .headline-feature{max-width:none;margin:0 0 40px}#ngg_page_content a{color:#9fbb1a}#ngg_page_content .button-primary,#ngg_page_content .button-secondary,#ngg_page_content button{background-color:#000;color:#fff!important;border:none!important;box-shadow:none!important;text-shadow:none!important;outline:0!important;height:35px!important;padding:0 24px!important;line-height:35px;width:auto!important;border-radius:0;text-transform:uppercase;letter-spacing:1px;font-size:11px;font-weight:700;font-family:Lato,sans-serif;vertical-align:middle}#ngg_page_content .button-primary:hover,#ngg_page_content .button-secondary:hover,#ngg_page_content button:hover{background-color:#383838;vertical-align:middle}#ngg_page_content .button-primary:disabled,#ngg_page_content .button-secondary:disabled,#ngg_page_content button:disabled{background:#bbb!important}#ngg_page_content .button-secondary{background-color:#888!important}.ngg-admin #ngg_page_content .notice button,.ngg-admin #ngg_page_content div.error button,.ngg-admin #ngg_page_content div.updated button{background-color:transparent!important;padding:0}#ngg_page_content button,.ngg-admin .notice button,.ngg-admin div.error button,.ngg-admin div.updated button{background:0 0}#ngg_page_content button.wp-color-result{height:24px!important;padding:0 0 0 30px!important;border:1px solid #ddd!important}#ngg_page_content button.wp-color-result:hover{background-color:transparent}#ngg_page_content input[type=checkbox]{height:16px!important;width:16px!important}#ngg_page_content.ngg_settings_page form>p{width:81%;background:#fff;margin:0;float:right}#ngg_page_content .ngg_save_settings_button{position:absolute;right:61px;top:128px}.ecommerce_page_ngg-ecommerce-instructions-page #ngg_page_content .ngg_save_settings_button{display:none}#ngg_page_content ::-webkit-input-placeholder{color:#aaa}#ngg_page_content :-ms-input-placeholder{color:#aaa}#ngg_page_content ::-moz-placeholder{color:#aaa;opacity:1}#ngg_page_content :-moz-placeholder{color:#aaa;opacity:1}.ngg-admin .select2-drop.select2-drop-above .select2-search input{width:100%}#ngg_page_content .ngg_page_content_header{height:80px;margin-top:-23px;margin-bottom:24px}#ngg_page_content .ngg_page_content_header img{height:60px;padding-top:10px;padding-right:20px;float:left;width:auto}#ngg_page_content .ngg_page_content_header h2,#ngg_page_content .ngg_page_content_header h3{line-height:80px;color:#000;font-size:18px;font-family:Lato,sans-serif;text-transform:uppercase;letter-spacing:2px;text-align:left;font-weight:900}#ngg_page_content .ngg_page_content_header p{float:right;margin:-98px 0 0;font-size:15px;font-weight:500;color:#000;line-height:80px;letter-spacing:.3px}#ngg_page_content .ngg_page_content_header .ngg_save_settings_button{margin:0!important}#ngg_page_content .ngg_page_content_menu{width:20%;float:left;padding:0;height:100%;background:0 0}#ngg_page_content .ngg_page_content_menu a{box-shadow:none!important;border-left:5px solid #fff;cursor:pointer;display:block;padding:10px 0 10px 20px;line-height:22px;margin:10px 0;text-decoration:none;color:#000;text-transform:uppercase;font-size:13px;font-weight:400;letter-spacing:1.2px}.responsive-menu-icon{cursor:pointer;display:none;margin-bottom:5px;text-align:left}.responsive-menu-icon::before{color:#000;content:'\f0c9';display:block;font:400 20px/1 'Font Awesome 5 Free';margin:0 auto;text-align:center;font-weight:900}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active,#ngg_page_content .ngg_page_content_menu a:active{outline:transparent 0;border-left:5px solid #9dbd1b;position:relative;color:#000;margin-right:-1px;font-weight:800}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active:after,#ngg_page_content .ngg_page_content_menu a:active:after{right:0;border:8px solid transparent;content:"";width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}#ngg_page_content .ngg_page_content_main{padding:0 20px 20px 30px;min-height:600px;float:left;box-sizing:border-box;width:100%}.gallery_page_nggallery-manage-album #ngg_page_content .ngg_page_content_main,.gallery_page_nggallery-manage-gallery #ngg_page_content .ngg_page_content_main{padding:0 10px 30px}#ngg_page_content .ngg_overview .ngg_page_content_main,#ngg_page_content.ngg_settings_page .ngg_page_content_main{width:80%}.gallery_page_ngg_display_settings #ngg_page_content.ngg_settings_page .ngg_page_content_main{min-height:1000px}.gallery_page_ngg_other_options #ngg_page_content.ngg_settings_page .ngg_page_content_main{min-height:400px}#ngg_page_content .ngg_manage_tags .ngg_page_content_main{padding:0}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main>div,#ngg_page_content .ngg_overview .ngg_page_content_main>div,#ngg_page_content.ngg_settings_page .ngg_page_content_main>div{display:none}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main>div:first-of-type,#ngg_page_content .ngg_overview .ngg_page_content_main>div:first-of-type,#ngg_page_content.ngg_settings_page .ngg_page_content_main>div:first-of-type{display:block}#ngg_page_content.ngg_settings_page .ngg_page_content_main h3{color:rgba(29,36,42,.85);font-size:18px;margin:20px 0 30px;text-transform:uppercase}#ngg_page_content .ngg_page_content_main input,#ngg_page_content .ngg_page_content_main select{color:#888;height:35px;border:1px solid #ddd;padding-left:10px;box-shadow:none;width:200px;-webkit-appearance:none;-webkit-border-radius:0;border-radius:0}#ngg_page_content .ngg_page_content_main select{background-image:url(dropdown_arrow.png);background-size:10px 10px;background-repeat:no-repeat;background-position:95% 55%}#ngg_page_content .ngg_page_content_main .select2-container{width:200px!important;line-height:0}#ngg_page_content .ngg_page_content_main .select2-selection--multiple,#ngg_page_content .ngg_page_content_main .select2-selection--single{border:1px solid #ddd;border-radius:0;height:35px;line-height:35px;padding-top:1px}#ngg_page_content .ngg_page_content_main .thumbnail_options .select2-selection--multiple{height:auto;padding-right:3px}#ngg_page_content .ngg_page_content_main .thumbnail_options .select2-selection--multiple .select2-search__field{width:100%!important}#ngg_page_content .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px;display:none}#ngg_page_content .ngg_page_content_main .select2-search{width:100%}#ngg_page_content .ngg_page_content_main .select2-search__field{border-radius:3px}#ngg_page_content .ngg_page_content_main .select2-selection__choice{background:#9fbb1a;border:none;box-shadow:none;color:#fff;line-height:20px;padding:7px 10px 7px 8px;width:92%}#ngg_page_content .ngg_page_content_main .select2-selection__choice__remove{color:#fff;margin-right:6px}#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] .select2-container,#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] input,#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] select{width:250px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main input[type=radio],#ngg_page_content.ngg_settings_page .ngg_page_content_main input[type=radio]{border-radius:50%!important;height:16px!important;width:16px!important;padding:0!important;vertical-align:middle}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main input[type=radio]:checked:before,#ngg_page_content.ngg_settings_page .ngg_page_content_main input[type=radio]:checked:before{background-color:#9FBB1A;border-radius:50%;color:transparent;content:"\2022";display:block;height:17px;margin:-1px 0 0 -1px;vertical-align:middle;width:17px}#tr_photocrati-nextgen_basic_imagebrowser_ngg_triggers_display,#tr_photocrati-nextgen_basic_slideshow_ngg_triggers_display,.ngg-post-type #screen-meta .metabox-prefs.view-mode,.ngg-post-type .notice,.ngg-post-type div#setting-error-tgmpa,.post-type-nextgen_proof #post-body-content .inside,.post-type-nextgen_proof.post-php #submitdiv,.post-type-nextgen_proof.post-php .toggle-indicator,.post-type-nextgen_proof.post-php .wp-heading-inline,.post-type-ngg_order.post-php #submitdiv,.post-type-ngg_order.post-php .toggle-indicator,.post-type-ngg_order.post-php .wp-heading-inline{display:none}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table,#ngg_page_content.ngg_settings_page .ngg_page_content_main table{color:rgba(29,36,42,.85);border-collapse:collapse;width:100%}#ngg_page_content table .sorting-indicator:before{color:#fff!important}#attach_to_post_tabs #displayed_tab #display_settings_tab_content table tr,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr{border:1px solid #f7f8f3;padding:5px 0!important;height:auto}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{line-height:30px;vertical-align:middle;padding:10px 20px;box-sizing:border-box}.ngg-admin #ngg_page_content .widefat td,.ngg-admin #ngg_page_content .widefat th{padding:10px;color:#aaa;vertical-align:middle}.ngg-admin #ngg_page_content .widefat tfoot th,.ngg-admin #ngg_page_content .widefat thead th{padding:0 10px;color:#fff;text-transform:uppercase}#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{font-weight:400!important;font-size:13px!important;line-height:1.5!important}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td:first-of-type{width:300px;text-align:left;font-weight:400;padding-top:8px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table table tr td:first-of-type,#ngg_page_content.ngg_settings_page .ngg_page_content_main table table tr td:first-of-type{width:auto;font-weight:400;padding:10px 20px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr:nth-of-type(2n),#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr:nth-of-type(2n){background-color:#f7f7f7}#ngg_page_content.ngg_settings_page .ngg_page_content_main tr.watermark_field{padding:10px 0!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table{border:1px solid #d3e1c8}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table td{padding:5px 15px!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table td:first-of-type{width:auto!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table tr{border:none;padding:0!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field img{max-width:100%}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main label,#ngg_page_content.ngg_settings_page .ngg_page_content_main label,#ngg_page_content.ngg_settings_page .ngg_page_content_main p.description{font-size:14px;color:#666}#ngg_page_content.ngg_settings_page .ngg_page_content_main label{margin-right:5px}#ngg_page_content.ngg_settings_page .ngg_page_content_main label:last-of-type{margin-right:15px}#ngg_page_content.ngg_settings_page .nextgen_settings_position td,#ngg_page_content.ngg_settings_page .nextgen_settings_position tr:nth-of-type(2n){border:none!important}#ngg_page_content.ngg_settings_page .nextgen_pro_lightbox_admin_header{background:#000!important;margin-top:20px}.nextgen_pro_lightbox_admin_header td{padding:10px 0!important}.nextgen_pro_lightbox_admin_header td h3{color:#fff!important;margin:0 0 0 20px!important;font-size:13px!important;letter-spacing:1.5px}.ngg_options_promo{background:#000;color:#fff;font-family:Lato,sans-serif;font-size:14px;font-weight:600}.ngg_options_promo a{text-decoration:none;font-weight:600;margin-left:6px}.gallery_page_ngg_other_options #ngg_page_content .ngg_page_content_main tbody tr td.ngg_options_promo{width:100%!important}.ngg-post-type .ngg_page_content_main .button,.ngg-post-type .ngg_page_content_main .page-title-action{background-color:#000!important;color:#fff!important;border:none!important;box-shadow:none!important;text-shadow:none!important;height:35px!important;padding:0 15px!important;line-height:35px;width:auto!important;text-transform:uppercase;letter-spacing:1px;font-size:11px}.ngg-post-type .ngg_page_content_main .button:hover,.ngg-post-type .ngg_page_content_main .page-title-action:hover{background-color:#383838!important}.ngg-post-type .ngg_page_content_main .page-title-action{padding:10px 18px!important;margin-left:10px;top:-4px}.ngg-post-type .ngg_page_content_main .tablenav{margin:0 0 20px}.ngg-post-type .ngg_page_content_main .tablenav .actions,.ngg-post-type .ngg_page_content_main .tablenav .tablenav-pages{margin:10px 0}.ngg-post-type .ngg_page_content_main .tablenav .tablenav-pages a,.ngg-post-type .ngg_page_content_main .tablenav-pages-navspan{background:#556472;border:none;color:#fff!important;margin:0 2px}.ngg-post-type #ngg_page_content .ngg_page_content_main .tablenav input.current-page{width:50px!important}.ngg-post-type .ngg_page_content_main table{box-shadow:none;table-layout:auto;border:1px solid rgba(159,187,26,.08)}.ngg-post-type .ngg_page_content_main table tfoot,.ngg-post-type .ngg_page_content_main table thead{background-color:#000;text-transform:uppercase}.ngg-post-type .ngg_page_content_main table tfoot{background-color:#000}.ngg-post-type .ngg_page_content_main table tfoot a,.ngg-post-type .ngg_page_content_main table thead a{padding:0}.ngg-post-type .ngg_page_content_main table tfoot span,.ngg-post-type .ngg_page_content_main table thead span{color:#fff;font-size:15px}.ngg-post-type .ngg_page_content_main table thead td,.ngg-post-type .ngg_page_content_main table thead th{background-color:transparent;border:none;color:#fff}.ngg-post-type .ngg_page_content_main table thead td{padding:12px 5px!important}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]{height:13px!important;width:13px!important;min-width:auto;margin-top:2px}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]:checked:before{color:#9FBB1A;margin:-5px 0 0 -5px}.ngg-post-type #ngg_page_content .sorting-indicator:before{color:#fff!important}.ngg-post-type .ngg_page_content_main .striped>tbody>:nth-child(odd){background-color:#f7f7f7}.ngg-post-type .ngg_page_content_main a.row-title{font-weight:400}.ngg-post-type .ngg_page_content_main .row-actions{left:0;padding-top:0}.ngg-post-type .ngg_page_content_main .row-actions a{color:#aaa!important}.ngg-post-type .ngg_page_content_main td.column-title strong{margin-bottom:0}.ngg-post-type #wpbody-content .quick-edit-row-page .inline-edit-col-left{width:100%}.ngg-post-type #ngg_page_content .widefat td,.ngg-post-type #ngg_page_content .widefat th{padding:10px;color:#aaa;vertical-align:middle}.ngg-post-type #ngg_page_content .widefat tfoot th,.ngg-post-type #ngg_page_content .widefat thead th{padding:0 10px;color:#fff;text-transform:uppercase}.ngg-post-type .ngg_page_content_main .tablenav.bottom{margin:10px 0 0}#ngg_page_content #titlediv input#title{font-size:22px;padding:24px 12px;color:#383838;letter-spacing:.5px;font-weight:400}.ngg-admin #postbox-container-2 h2.ui-sortable-handle,.ngg-post-type #ngg_page_content h3.accordion_tab{padding:10px;background:#000;margin-bottom:0}.ngg-admin #postbox-container-2 h2.ui-sortable-handle,.ngg-post-type #ngg_page_content h3.accordion_tab a{color:#fff;text-decoration:none;text-transform:uppercase;font-weight:400;font-size:15px;letter-spacing:2px;margin-left:6px}.ngg-admin #postbox-container-2 .postbox,.ngg-post-type .accordion>div{border-left:1px solid #eee;border-bottom:1px solid #eee;border-right:1px solid #eee;margin-bottom:30px;background-color:#fcfcfc}.ngg-post-type .accordion>div table,.post-type-nextgen_proof.post-php #side-sortables,.post-type-ngg_order.post-php #side-sortables{border:none}.ngg-post-type .accordion>div{padding:20px;margin-bottom:30px}.ngg-admin #postbox-container-2 .postbox .inside{margin:0}.ngg-admin #postbox-container-2 .postbox .inside a{color:#9fbb1a}.ngg-admin #postbox-container-2 .postbox .inside td,.ngg-admin #postbox-container-2 .postbox .inside th{padding:5px 10px}.ngg-admin #postbox-container-2 .postbox .inside .button-primary,.ngg-post-type .accordion>div .button-primary{margin:15px 0 0}.ngg-post-type table input[type=text]{margin:0}.post-type-nextgen_proof #ngg_page_content .ngg_page_content_main,.post-type-ngg_order #ngg_page_content .ngg_page_content_main{padding-left:10px}.post-type-nextgen_proof.post-php #poststuff #post-body.columns-2,.post-type-ngg_order.post-php #poststuff #post-body.columns-2{margin-right:100px}.post-type-nextgen_proof.post-php #post-body.columns-2 #postbox-container-1,.post-type-ngg_order.post-php #post-body.columns-2 #postbox-container-1{width:80px;margin-right:-100px}.post-type-ngg_order.post-php #post-body-content{margin-bottom:0}.post-type-ngg_order.post-php #post-body.columns-2 #postbox-container-2{float:none}.post-type-nextgen_proof.post-php #postbox-container-2 .postbox,.post-type-ngg_order.post-php #postbox-container-2 .postbox{background-color:#fff}.post-type-ngg_order.post-php #normal-sortables{min-height:10px!important}.post-type-nextgen_proof.post-php #postbox-container-2 h2.ui-sortable-handle,.post-type-ngg_order.post-php #postbox-container-2 h2.ui-sortable-handle{margin-left:0;padding-left:16px}.post-type-nextgen_proof.post-php .inside h4,.post-type-ngg_order.post-php .inside h4{padding:5px 10px;text-decoration:none!important;text-transform:uppercase;font-weight:400}.post-type-nextgen_proof.post-php .inside,.post-type-ngg_order.post-php .inside{padding:30px;font-size:14px}.post-type-nextgen_proof #normal-sortables .closed .inside{display:block!important}.post-type-nextgen_proof.post-php th,.post-type-ngg_order.post-php th{text-transform:uppercase;font-size:15px;letter-spacing:1px;font-weight:400;padding-bottom:10px!important;color:#000!important}.post-type-nextgen_proof.post-php.post-php table tfoot,.post-type-nextgen_proof.post-php.post-php table thead,.post-type-ngg_order.post-php table tfoot,.post-type-ngg_order.post-php table thead{background-color:transparent!important}.post-type-ngg_order .ngg_pro_order_info>table{max-width:1200px;background:#fcfcfc;box-shadow:none;font-size:14px}.post-type-nextgen_proof .row-actions .inline{display:none}#ngg_page_content .ngg_payment_gateway_enable_row{background:#000!important}@media (max-width:1030px){#ngg_page_content .ngg_page_content_header p{padding:0 20px}}@media (max-width:900px){#ngg_page_content .ngg_page_content_header p{display:none}}@media (max-width:782px){.about-wrap .three-col .col,.about-wrap .two-col .col{min-width:100%!important;margin-left:0;margin-top:1em}.ngg-post-type #ngg_page_content button.toggle-row{width:40px!important;height:40px!important;background:0 0!important}.ngg-post-type tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 8px 3px 35%}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]:checked:before{font:400 20px/1 dashicons!important}#ngg_page_content .ngg_page_content_header img{padding-right:10px}#ngg_page_content .ngg_overview .ngg_page_content_header h3,#ngg_page_content .ngg_page_content_header h3{font-size:14px}#ngg_page_content .ngg_overview .ngg_page_content_main,#ngg_page_content .ngg_page_content_menu,#ngg_page_content.ngg_settings_page .ngg_page_content_main{width:100%}#ngg_page_content .ngg_page_content_main,#ngg_page_content.ngg_settings_page .ngg_page_content_main{padding:20px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table,#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main tbody,#ngg_page_content.ngg_settings_page .ngg_page_content_main table,#ngg_page_content.ngg_settings_page .ngg_page_content_main tbody{display:block!important;max-width:100%}#attach_to_post_tabs #displayed_tab #ngg_page_content #slug_configuration,#ngg_page_content.ngg_settings_page .ngg_page_content_main tbody.hidden{display:none!important}#attach_to_post_tabs #displayed_tab #display_settings_tab_content table tr,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr{display:block!important;padding:10px 0 20px!important}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{display:block;padding:2px 10px}#ngg_page_content.ngg_settings_page .ngg_page_content_main table.nextgen_settings_position tr td{display:table-cell}#ngg_page_content.ngg_settings_page td.ngg_options_promo{line-height:20px!important;padding:20px!important}.ngg_options_promo a{margin-left:0}#ngg_page_content.ngg_settings_page .ngg_page_content_main h2,#ngg_page_content.ngg_settings_page .ngg_page_content_main h3{text-align:center}#ngg_page_content.ngg_settings_page form>p{width:100%;padding:15px;box-sizing:border-box}#ngg_page_content .ngg_page_content_main input,#ngg_page_content .ngg_page_content_main select{max-width:100%;margin:5px 0;box-sizing:border-box}#ngg_page_content .ngg_page_content_main .select2-container,#ngg_page_content .ngg_page_content_main input[type=number],#ngg_page_content .ngg_page_content_main input[type=text],#ngg_page_content .ngg_page_content_main select{width:100%!important}#ngg_page_content button.wp-color-result{width:auto!important}#ngg_page_content button.wp-color-result .wp-color-result-text{line-height:22px}.ngg-post-type .ngg_page_content_main .subsubsub,.ngg-post-type .ngg_page_content_main .tablenav .actions{width:100%}.ngg-post-type #ngg_page_content .ngg_page_content_main input,.ngg-post-type #ngg_page_content .ngg_page_content_main select{width:100%!important;max-width:100%;margin:5px 0;box-sizing:border-box}#ngg_page_content input[type=checkbox]{width:16px!important}#ngg_page_content .button-primary,#ngg_page_content .button-secondary,#ngg_page_content button{width:100%!important;margin:4px 0;display:block;text-align:center}#ngg_page_content .ngg_save_settings_button{position:static}.ngg-post-type .ngg_page_content_main .button,.ngg-post-type .ngg_page_content_main .page-title-action{width:80%!important;display:block;text-align:center;margin:10px auto 20px;padding:0!important}.ngg-post-type .ngg_page_content_main .displaying-num{display:none}#gallery_selection label{display:block;padding-bottom:8px}.post-type-ngg_pricelist .accordion table{width:100%!important}.post-type-ngg_pricelist .accordion #manual_shipping_options td{display:block;width:100%!important}.post-type-ngg_pricelist #ngg_page_content .accordion table input.shipping_rate{width:100%;max-width:100%}.post-type-ngg_pricelist .accordion input[type=checkbox]:checked:before{font:400 21px/1 dashicons}.ngg-post-type #ngg_page_content h1{text-align:center;display:block}#ngg_page_content .responsive-menu-icon{display:block;padding:10px 0 15px}#ngg_page_content .responsive-menu{display:none;margin:0}#ngg_page_content .responsive-menu a{display:block}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active:after,#ngg_page_content .ngg_page_content_menu a:active:after{display:none}}
|
1 |
+
.ngg-admin .notice,.ngg-admin div.error,.ngg-admin div.updated{margin:20px 15px 0 0}.ngg-admin #ngg_page_content .notice,.ngg-admin #ngg_page_content div.error,.ngg-admin #ngg_page_content div.updated{margin:20px 0}.hidden{display:none}.nextgen_advanced_toggle_link{font-size:11px;position:relative;bottom:5px;color:#444}.url_field{width:400px;max-width:100%}.nextgen_settings_field_colorpicker{width:85px!important;text-align:center;margin-left:50px}#ngg_page_content .wp-picker-container,#ngg_page_content .wp-picker-holder,#ngg_page_content .wp-picker-input-wrap{position:initial!important}#nextgen_settings_wmXpos,#nextgen_settings_wmYpos{width:65px!important}table.nextgen_settings_position{width:auto!important}#ngg_page_content label.tooltip,#ngg_page_content span.tooltip{outline:0;background-image:url(information.png);background-repeat:no-repeat;padding-left:22px;padding-bottom:4px;background-size:18px}#poststuff .ui-accordion h3{padding-left:25px}#lightbox_effects_content table tr td:first-child{vertical-align:top;text-align:right;padding-right:7px;padding-top:5px}#lightbox_effects_content tr{height:28px}.ngg-admin #screen-meta-links{padding-bottom:20px}.ngg-admin #wpbody{position:static}#ngg_page_content{background:#fff;box-shadow:0 0 12px 6px rgba(0,0,0,.03);box-sizing:border-box;font-family:lato,sans-serif;float:left;height:auto;margin-top:25px;padding:20px 40px;width:98%;color:#000;font-size:15px;letter-spacing:.3px;font-weight:500}#adminmenu .wp-submenu a[href*=ngg_pro_upgrade]{color:#9fbb1a;font-weight:600}.toplevel_page_nextgen-gallery #ngg_page_content{margin-top:20px}#ngg_page_content.ngg_settings_page,.ngg_gallery_sort,.ngg_manage_albums,.ngg_manage_galleries,.ngg_manage_images{background:#fff}#ngg_page_content .wrap{margin:0}#ngg_page_content .about-wrap{max-width:100%;float:left}.about-wrap [class$="-col"]{display:flex;justify-content:space-between;flex-wrap:wrap}.about-wrap [class$="-col"] .col{flex:1;align-self:flex-start}.about-wrap [class$="-col"] .col+.col{margin-left:20px}.about-wrap .two-col img{margin-bottom:1.5em}.about-wrap .headline-feature{max-width:none;margin:0 0 40px}#ngg_page_content a{color:#9fbb1a}#ngg_page_content .button-primary,#ngg_page_content .button-secondary,#ngg_page_content button{background-color:#000;color:#fff!important;border:none!important;box-shadow:none!important;text-shadow:none!important;outline:0!important;height:35px!important;padding:0 24px!important;line-height:35px;width:auto!important;border-radius:0;text-transform:uppercase;letter-spacing:1px;font-size:11px;font-weight:700;font-family:Lato,sans-serif;vertical-align:middle}#ngg_page_content .button-primary:hover,#ngg_page_content .button-secondary:hover,#ngg_page_content button:hover{background-color:#383838;vertical-align:middle}#ngg_page_content .button-primary:disabled,#ngg_page_content .button-secondary:disabled,#ngg_page_content button:disabled{background:#bbb!important}#ngg_page_content .button-secondary{background-color:#888!important}.ngg-admin #ngg_page_content .notice button,.ngg-admin #ngg_page_content div.error button,.ngg-admin #ngg_page_content div.updated button{background-color:transparent!important;padding:0}#ngg_page_content button,.ngg-admin .notice button,.ngg-admin div.error button,.ngg-admin div.updated button{background:0 0}#ngg_page_content button.wp-color-result{height:24px!important;padding:0 0 0 30px!important;border:1px solid #ddd!important}#ngg_page_content button.wp-color-result:hover{background-color:transparent}#ngg_page_content input[type=checkbox]{height:16px!important;width:16px!important}#ngg_page_content.ngg_settings_page form>p{width:81%;background:#fff;margin:0;float:right}#ngg_page_content .ngg_save_settings_button{position:absolute;right:61px;top:128px}.ecommerce_page_ngg-ecommerce-instructions-page #ngg_page_content .ngg_save_settings_button{display:none}#ngg_page_content ::-webkit-input-placeholder{color:#aaa}#ngg_page_content :-ms-input-placeholder{color:#aaa}#ngg_page_content ::-moz-placeholder{color:#aaa;opacity:1}#ngg_page_content :-moz-placeholder{color:#aaa;opacity:1}.ngg-admin .select2-drop.select2-drop-above .select2-search input{width:100%}#ngg_page_content .ngg_page_content_header{height:80px;margin-top:-23px;margin-bottom:24px}#ngg_page_content .ngg_page_content_header img{height:60px;padding-top:10px;padding-right:20px;float:left;width:auto}#ngg_page_content .ngg_page_content_header h2,#ngg_page_content .ngg_page_content_header h3{line-height:80px;color:#000;font-size:18px;font-family:Lato,sans-serif;text-transform:uppercase;letter-spacing:2px;text-align:left;font-weight:900}#ngg_page_content .ngg_page_content_header p{float:right;margin:-98px 0 0;font-size:15px;font-weight:500;color:#000;line-height:80px;letter-spacing:.3px}#ngg_page_content .ngg_page_content_header .ngg_save_settings_button{margin:0!important}#ngg_page_content .ngg_page_content_menu{width:20%;float:left;padding:0;height:100%;background:0 0}#ngg_page_content .ngg_page_content_menu a{box-shadow:none!important;border-left:5px solid #fff;cursor:pointer;display:block;padding:10px 0 10px 20px;line-height:22px;margin:10px 0;text-decoration:none;color:#000;text-transform:uppercase;font-size:13px;font-weight:400;letter-spacing:1.2px}.responsive-menu-icon{cursor:pointer;display:none;margin-bottom:5px;text-align:left}.responsive-menu-icon::before{color:#000;content:'\f0c9';display:block;font:400 20px/1 'Font Awesome 5 Free';margin:0 auto;text-align:center;font-weight:900}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active,#ngg_page_content .ngg_page_content_menu a:active{outline:transparent 0;border-left:5px solid #9dbd1b;position:relative;color:#000;margin-right:-1px;font-weight:800}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active:after,#ngg_page_content .ngg_page_content_menu a:active:after{right:0;border:8px solid transparent;content:"";width:0;position:absolute;pointer-events:none;border-right-color:#fff;top:50%;margin-top:-8px}#ngg_page_content .ngg_page_content_main{padding:0 20px 20px 30px;min-height:600px;float:left;box-sizing:border-box;width:100%}.gallery_page_nggallery-manage-album #ngg_page_content .ngg_page_content_main,.gallery_page_nggallery-manage-gallery #ngg_page_content .ngg_page_content_main{padding:0 10px 30px}#ngg_page_content .ngg_overview .ngg_page_content_main,#ngg_page_content.ngg_settings_page .ngg_page_content_main{width:80%}.gallery_page_ngg_display_settings #ngg_page_content.ngg_settings_page .ngg_page_content_main{min-height:1000px}.gallery_page_ngg_other_options #ngg_page_content.ngg_settings_page .ngg_page_content_main{min-height:400px}#ngg_page_content .ngg_manage_tags .ngg_page_content_main{padding:0}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main>div,#ngg_page_content .ngg_overview .ngg_page_content_main>div,#ngg_page_content.ngg_settings_page .ngg_page_content_main>div{display:none}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main>div:first-of-type,#ngg_page_content .ngg_overview .ngg_page_content_main>div:first-of-type,#ngg_page_content.ngg_settings_page .ngg_page_content_main>div:first-of-type{display:block}#ngg_page_content.ngg_settings_page .ngg_page_content_main h3{color:rgba(29,36,42,.85);font-size:18px;margin:20px 0 30px;text-transform:uppercase}#ngg_page_content .ngg_page_content_main input,#ngg_page_content .ngg_page_content_main select{color:#888;height:35px;border:1px solid #ddd;padding-left:10px;box-shadow:none;width:200px;-webkit-border-radius:0;border-radius:0}#ngg_page_content .ngg_page_content_main select{-webkit-appearance:none;background-image:url(dropdown_arrow.png);background-size:10px 10px;background-repeat:no-repeat;background-position:95% 55%}#ngg_page_content .ngg_page_content_main .select2-container{width:200px!important;line-height:0}#ngg_page_content .ngg_page_content_main .select2-selection--multiple,#ngg_page_content .ngg_page_content_main .select2-selection--single{border:1px solid #ddd;border-radius:0;height:35px;line-height:35px;padding-top:1px}#ngg_page_content .ngg_page_content_main .thumbnail_options .select2-selection--multiple{height:auto;padding-right:3px}#ngg_page_content .ngg_page_content_main .thumbnail_options .select2-selection--multiple .select2-search__field{width:100%!important}#ngg_page_content .select2-container--default .select2-selection--single .select2-selection__arrow{top:4px;display:none}#ngg_page_content .ngg_page_content_main .select2-search{width:100%}#ngg_page_content .ngg_page_content_main .select2-search__field{border-radius:3px}#ngg_page_content .ngg_page_content_main .select2-selection__choice{background:#9fbb1a;border:none;box-shadow:none;color:#fff;line-height:20px;padding:7px 10px 7px 8px;width:92%}#ngg_page_content .ngg_page_content_main .select2-selection__choice__remove{color:#fff;margin-right:6px}#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] .select2-container,#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] input,#ngg_page_content .ngg_page_content_main div[data-id=lightbox_effects] select{width:250px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main input[type=radio],#ngg_page_content.ngg_settings_page .ngg_page_content_main input[type=radio]{border-radius:50%!important;height:16px!important;width:16px!important;padding:0!important;vertical-align:middle}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main input[type=radio]:checked:before,#ngg_page_content.ngg_settings_page .ngg_page_content_main input[type=radio]:checked:before{background-color:#9FBB1A;border-radius:50%;color:transparent;content:"\2022";display:block;height:17px;margin:-1px 0 0 -1px;vertical-align:middle;width:17px}#tr_photocrati-nextgen_basic_imagebrowser_ngg_triggers_display,#tr_photocrati-nextgen_basic_slideshow_ngg_triggers_display,.ngg-post-type #screen-meta .metabox-prefs.view-mode,.ngg-post-type .notice,.ngg-post-type div#setting-error-tgmpa,.post-type-nextgen_proof #post-body-content .inside,.post-type-nextgen_proof.post-php #submitdiv,.post-type-nextgen_proof.post-php .toggle-indicator,.post-type-nextgen_proof.post-php .wp-heading-inline,.post-type-ngg_order.post-php #submitdiv,.post-type-ngg_order.post-php .toggle-indicator,.post-type-ngg_order.post-php .wp-heading-inline{display:none}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table,#ngg_page_content.ngg_settings_page .ngg_page_content_main table{color:rgba(29,36,42,.85);border-collapse:collapse;width:100%}#ngg_page_content table .sorting-indicator:before{color:#fff!important}#attach_to_post_tabs #displayed_tab #display_settings_tab_content table tr,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr{border:1px solid #f7f8f3;padding:5px 0!important;height:auto}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{line-height:30px;vertical-align:middle;padding:10px 20px;box-sizing:border-box}.ngg-admin #ngg_page_content .widefat td,.ngg-admin #ngg_page_content .widefat th{padding:10px;color:#aaa;vertical-align:middle}.ngg-admin #ngg_page_content .widefat tfoot th,.ngg-admin #ngg_page_content .widefat thead th{padding:0 10px;color:#fff;text-transform:uppercase}#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{font-weight:400!important;font-size:13px!important;line-height:1.5!important}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td:first-of-type{width:300px;text-align:left;font-weight:400;padding-top:8px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table table tr td:first-of-type,#ngg_page_content.ngg_settings_page .ngg_page_content_main table table tr td:first-of-type{width:auto;font-weight:400;padding:10px 20px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr:nth-of-type(2n),#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr:nth-of-type(2n){background-color:#f7f7f7}#ngg_page_content.ngg_settings_page .ngg_page_content_main tr.watermark_field{padding:10px 0!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table{border:1px solid #d3e1c8}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table td{padding:5px 15px!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table td:first-of-type{width:auto!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field table tr{border:none;padding:0!important}#ngg_page_content.ngg_settings_page .ngg_page_content_main .watermark_field img{max-width:100%}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main label,#ngg_page_content.ngg_settings_page .ngg_page_content_main label,#ngg_page_content.ngg_settings_page .ngg_page_content_main p.description{font-size:14px;color:#666}#ngg_page_content.ngg_settings_page .ngg_page_content_main label{margin-right:5px}#ngg_page_content.ngg_settings_page .ngg_page_content_main label:last-of-type{margin-right:15px}#ngg_page_content.ngg_settings_page .nextgen_settings_position td,#ngg_page_content.ngg_settings_page .nextgen_settings_position tr:nth-of-type(2n){border:none!important}#ngg_page_content.ngg_settings_page .nextgen_pro_lightbox_admin_header{background:#000!important;margin-top:20px}.nextgen_pro_lightbox_admin_header td{padding:10px 0!important}.nextgen_pro_lightbox_admin_header td h3{color:#fff!important;margin:0 0 0 20px!important;font-size:13px!important;letter-spacing:1.5px}.ngg_options_promo{background:#000;color:#fff;font-family:Lato,sans-serif;font-size:14px;font-weight:600}.ngg_options_promo a{text-decoration:none;font-weight:600;margin-left:6px}.gallery_page_ngg_other_options #ngg_page_content .ngg_page_content_main tbody tr td.ngg_options_promo{width:100%!important}.ngg-post-type .ngg_page_content_main .button,.ngg-post-type .ngg_page_content_main .page-title-action{background-color:#000!important;color:#fff!important;border:none!important;box-shadow:none!important;text-shadow:none!important;height:35px!important;padding:0 15px!important;line-height:35px;width:auto!important;text-transform:uppercase;letter-spacing:1px;font-size:11px}.ngg-post-type .ngg_page_content_main .button:hover,.ngg-post-type .ngg_page_content_main .page-title-action:hover{background-color:#383838!important}.ngg-post-type .ngg_page_content_main .page-title-action{padding:10px 18px!important;margin-left:10px;top:-4px}.ngg-post-type .ngg_page_content_main .tablenav{margin:0 0 20px}.ngg-post-type .ngg_page_content_main .tablenav .actions,.ngg-post-type .ngg_page_content_main .tablenav .tablenav-pages{margin:10px 0}.ngg-post-type .ngg_page_content_main .tablenav .tablenav-pages a,.ngg-post-type .ngg_page_content_main .tablenav-pages-navspan{background:#556472;border:none;color:#fff!important;margin:0 2px}.ngg-post-type #ngg_page_content .ngg_page_content_main .tablenav input.current-page{width:50px!important}.ngg-post-type .ngg_page_content_main table{box-shadow:none;table-layout:auto;border:1px solid rgba(159,187,26,.08)}.ngg-post-type .ngg_page_content_main table tfoot,.ngg-post-type .ngg_page_content_main table thead{background-color:#000;text-transform:uppercase}.ngg-post-type .ngg_page_content_main table tfoot{background-color:#000}.ngg-post-type .ngg_page_content_main table tfoot a,.ngg-post-type .ngg_page_content_main table thead a{padding:0}.ngg-post-type .ngg_page_content_main table tfoot span,.ngg-post-type .ngg_page_content_main table thead span{color:#fff;font-size:15px}.ngg-post-type .ngg_page_content_main table thead td,.ngg-post-type .ngg_page_content_main table thead th{background-color:transparent;border:none;color:#fff}.ngg-post-type .ngg_page_content_main table thead td{padding:12px 5px!important}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]{height:13px!important;width:13px!important;min-width:auto;margin-top:2px}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]:checked:before{color:#9FBB1A;margin:-5px 0 0 -5px}.ngg-post-type #ngg_page_content .sorting-indicator:before{color:#fff!important}.ngg-post-type .ngg_page_content_main .striped>tbody>:nth-child(odd){background-color:#f7f7f7}.ngg-post-type .ngg_page_content_main a.row-title{font-weight:400}.ngg-post-type .ngg_page_content_main .row-actions{left:0;padding-top:0}.ngg-post-type .ngg_page_content_main .row-actions a{color:#aaa!important}.ngg-post-type .ngg_page_content_main td.column-title strong{margin-bottom:0}.ngg-post-type #wpbody-content .quick-edit-row-page .inline-edit-col-left{width:100%}.ngg-post-type #ngg_page_content .widefat td,.ngg-post-type #ngg_page_content .widefat th{padding:10px;color:#aaa;vertical-align:middle}.ngg-post-type #ngg_page_content .widefat tfoot th,.ngg-post-type #ngg_page_content .widefat thead th{padding:0 10px;color:#fff;text-transform:uppercase}.ngg-post-type .ngg_page_content_main .tablenav.bottom{margin:10px 0 0}#ngg_page_content #titlediv input#title{font-size:22px;padding:24px 12px;color:#383838;letter-spacing:.5px;font-weight:400}.ngg-admin #postbox-container-2 h2.ui-sortable-handle,.ngg-post-type #ngg_page_content h3.accordion_tab{padding:10px;background:#000;margin-bottom:0}.ngg-admin #postbox-container-2 h2.ui-sortable-handle,.ngg-post-type #ngg_page_content h3.accordion_tab a{color:#fff;text-decoration:none;text-transform:uppercase;font-weight:400;font-size:15px;letter-spacing:2px;margin-left:6px}.ngg-admin #postbox-container-2 .postbox,.ngg-post-type .accordion>div{border-left:1px solid #eee;border-bottom:1px solid #eee;border-right:1px solid #eee;margin-bottom:30px;background-color:#fcfcfc}.ngg-post-type .accordion>div table,.post-type-nextgen_proof.post-php #side-sortables,.post-type-ngg_order.post-php #side-sortables{border:none}.ngg-post-type .accordion>div{padding:20px;margin-bottom:30px}.ngg-admin #postbox-container-2 .postbox .inside{margin:0}.ngg-admin #postbox-container-2 .postbox .inside a{color:#9fbb1a}.ngg-admin #postbox-container-2 .postbox .inside td,.ngg-admin #postbox-container-2 .postbox .inside th{padding:5px 10px}.ngg-admin #postbox-container-2 .postbox .inside .button-primary,.ngg-post-type .accordion>div .button-primary{margin:15px 0 0}.ngg-post-type table input[type=text]{margin:0}.post-type-nextgen_proof #ngg_page_content .ngg_page_content_main,.post-type-ngg_order #ngg_page_content .ngg_page_content_main{padding-left:10px}.post-type-nextgen_proof.post-php #poststuff #post-body.columns-2,.post-type-ngg_order.post-php #poststuff #post-body.columns-2{margin-right:100px}.post-type-nextgen_proof.post-php #post-body.columns-2 #postbox-container-1,.post-type-ngg_order.post-php #post-body.columns-2 #postbox-container-1{width:80px;margin-right:-100px}.post-type-ngg_order.post-php #post-body-content{margin-bottom:0}.post-type-ngg_order.post-php #post-body.columns-2 #postbox-container-2{float:none}.post-type-nextgen_proof.post-php #postbox-container-2 .postbox,.post-type-ngg_order.post-php #postbox-container-2 .postbox{background-color:#fff}.post-type-ngg_order.post-php #normal-sortables{min-height:10px!important}.post-type-nextgen_proof.post-php #postbox-container-2 h2.ui-sortable-handle,.post-type-ngg_order.post-php #postbox-container-2 h2.ui-sortable-handle{margin-left:0;padding-left:16px}.post-type-nextgen_proof.post-php .inside h4,.post-type-ngg_order.post-php .inside h4{padding:5px 10px;text-decoration:none!important;text-transform:uppercase;font-weight:400}.post-type-nextgen_proof.post-php .inside,.post-type-ngg_order.post-php .inside{padding:30px;font-size:14px}.post-type-nextgen_proof #normal-sortables .closed .inside{display:block!important}.post-type-nextgen_proof.post-php th,.post-type-ngg_order.post-php th{text-transform:uppercase;font-size:15px;letter-spacing:1px;font-weight:400;padding-bottom:10px!important;color:#000!important}.post-type-nextgen_proof.post-php.post-php table tfoot,.post-type-nextgen_proof.post-php.post-php table thead,.post-type-ngg_order.post-php table tfoot,.post-type-ngg_order.post-php table thead{background-color:transparent!important}.post-type-ngg_order .ngg_pro_order_info>table{max-width:1200px;background:#fcfcfc;box-shadow:none;font-size:14px}.post-type-nextgen_proof .row-actions .inline{display:none}#ngg_page_content .ngg_payment_gateway_enable_row{background:#000!important}@media (max-width:1030px){#ngg_page_content .ngg_page_content_header p{padding:0 20px}}@media (max-width:900px){#ngg_page_content .ngg_page_content_header p{display:none}}@media (max-width:782px){.about-wrap .three-col .col,.about-wrap .two-col .col{min-width:100%!important;margin-left:0;margin-top:1em}.ngg-post-type #ngg_page_content button.toggle-row{width:40px!important;height:40px!important;background:0 0!important}.ngg-post-type tr:not(.inline-edit-row):not(.no-items) td.column-primary~td:not(.check-column){padding:3px 8px 3px 35%}.ngg-post-type #ngg_page_content .ngg_page_content_main input[type=checkbox]:checked:before{font:400 20px/1 dashicons!important}#ngg_page_content .ngg_page_content_header img{padding-right:10px}#ngg_page_content .ngg_overview .ngg_page_content_header h3,#ngg_page_content .ngg_page_content_header h3{font-size:14px}#ngg_page_content .ngg_overview .ngg_page_content_main,#ngg_page_content .ngg_page_content_menu,#ngg_page_content.ngg_settings_page .ngg_page_content_main{width:100%}#ngg_page_content .ngg_page_content_main,#ngg_page_content.ngg_settings_page .ngg_page_content_main{padding:20px}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table,#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main tbody,#ngg_page_content.ngg_settings_page .ngg_page_content_main table,#ngg_page_content.ngg_settings_page .ngg_page_content_main tbody{display:block!important;max-width:100%}#attach_to_post_tabs #displayed_tab #ngg_page_content #slug_configuration,#ngg_page_content.ngg_settings_page .ngg_page_content_main tbody.hidden{display:none!important}#attach_to_post_tabs #displayed_tab #display_settings_tab_content table tr,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr{display:block!important;padding:10px 0 20px!important}#attach_to_post_tabs #displayed_tab #ngg_page_content .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr td,#ngg_page_content.ngg_settings_page .ngg_page_content_main table tr th{display:block;padding:2px 10px}#ngg_page_content.ngg_settings_page .ngg_page_content_main table.nextgen_settings_position tr td{display:table-cell}#ngg_page_content.ngg_settings_page td.ngg_options_promo{line-height:20px!important;padding:20px!important}.ngg_options_promo a{margin-left:0}#ngg_page_content.ngg_settings_page .ngg_page_content_main h2,#ngg_page_content.ngg_settings_page .ngg_page_content_main h3{text-align:center}#ngg_page_content.ngg_settings_page form>p{width:100%;padding:15px;box-sizing:border-box}#ngg_page_content .ngg_page_content_main input,#ngg_page_content .ngg_page_content_main select{max-width:100%;margin:5px 0;box-sizing:border-box}#ngg_page_content .ngg_page_content_main .select2-container,#ngg_page_content .ngg_page_content_main input[type=number],#ngg_page_content .ngg_page_content_main input[type=text],#ngg_page_content .ngg_page_content_main select{width:100%!important}#ngg_page_content button.wp-color-result{width:auto!important}#ngg_page_content button.wp-color-result .wp-color-result-text{line-height:22px}.ngg-post-type .ngg_page_content_main .subsubsub,.ngg-post-type .ngg_page_content_main .tablenav .actions{width:100%}.ngg-post-type #ngg_page_content .ngg_page_content_main input,.ngg-post-type #ngg_page_content .ngg_page_content_main select{width:100%!important;max-width:100%;margin:5px 0;box-sizing:border-box}#ngg_page_content input[type=checkbox]{width:16px!important}#ngg_page_content .button-primary,#ngg_page_content .button-secondary,#ngg_page_content button{width:100%!important;margin:4px 0;display:block;text-align:center}#ngg_page_content .ngg_save_settings_button{position:static}.ngg-post-type .ngg_page_content_main .button,.ngg-post-type .ngg_page_content_main .page-title-action{width:80%!important;display:block;text-align:center;margin:10px auto 20px;padding:0!important}.ngg-post-type .ngg_page_content_main .displaying-num{display:none}#gallery_selection label{display:block;padding-bottom:8px}.post-type-ngg_pricelist .accordion table{width:100%!important}.post-type-ngg_pricelist .accordion #manual_shipping_options td{display:block;width:100%!important}.post-type-ngg_pricelist #ngg_page_content .accordion table input.shipping_rate{width:100%;max-width:100%}.post-type-ngg_pricelist .accordion input[type=checkbox]:checked:before{font:400 21px/1 dashicons}.ngg-post-type #ngg_page_content h1{text-align:center;display:block}#ngg_page_content .responsive-menu-icon{display:block;padding:10px 0 15px}#ngg_page_content .responsive-menu{display:none;margin:0}#ngg_page_content .responsive-menu a{display:block}#ngg_page_content .ngg_page_content_menu .ngg_page_content_menu_active:after,#ngg_page_content .ngg_page_content_menu a:active:after{display:none}}
|
products/photocrati_nextgen/modules/nextgen_data/package.module.nextgen_data.php
CHANGED
@@ -3386,6 +3386,7 @@ class C_NggLegacy_Thumbnail
|
|
3386 |
/**
|
3387 |
* Basic gallery storage methods; please consult the other available mixin.gallerystorage_base_(.*).php files before
|
3388 |
* adding new methods to this class: new methods may be more appropriately defined in other mixins.
|
|
|
3389 |
*/
|
3390 |
class Mixin_GalleryStorage_Base extends Mixin
|
3391 |
{
|
@@ -3416,7 +3417,7 @@ class Mixin_GalleryStorage_Base extends Mixin
|
|
3416 |
function render_image($image, $size = FALSE)
|
3417 |
{
|
3418 |
$format_list = $this->object->get_image_format_list();
|
3419 |
-
$abspath = $this->get_image_abspath($image, $size, true);
|
3420 |
if ($abspath == null) {
|
3421 |
$thumbnail = $this->object->generate_image_size($image, $size);
|
3422 |
if ($thumbnail != null) {
|
@@ -3518,6 +3519,7 @@ class Mixin_GalleryStorage_Base extends Mixin
|
|
3518 |
}
|
3519 |
/**
|
3520 |
* Provides methods to C_Gallery_Storage related to dynamic images, thumbnails, clones, etc
|
|
|
3521 |
*/
|
3522 |
class Mixin_GalleryStorage_Base_Dynamic extends Mixin
|
3523 |
{
|
@@ -3825,6 +3827,30 @@ class Mixin_GalleryStorage_Base_Dynamic extends Mixin
|
|
3825 |
// Something went wrong...
|
3826 |
return null;
|
3827 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3828 |
$result['clone_path'] = $clone_path;
|
3829 |
$result['clone_directory'] = $clone_dir;
|
3830 |
$result['clone_suffix'] = $clone_suffix;
|
@@ -4103,6 +4129,7 @@ class Mixin_GalleryStorage_Base_Dynamic extends Mixin
|
|
4103 |
}
|
4104 |
/**
|
4105 |
* Provides getter methods to C_Gallery_Storage for determining absolute paths, URL, etc
|
|
|
4106 |
*/
|
4107 |
class Mixin_GalleryStorage_Base_Getters extends Mixin
|
4108 |
{
|
@@ -4724,6 +4751,7 @@ class Mixin_GalleryStorage_Base_Getters extends Mixin
|
|
4724 |
}
|
4725 |
/**
|
4726 |
* Provides the basic methods of gallery management to C_Gallery_Storage
|
|
|
4727 |
*/
|
4728 |
class Mixin_GalleryStorage_Base_Management extends Mixin
|
4729 |
{
|
@@ -4961,6 +4989,7 @@ class Mixin_GalleryStorage_Base_Management extends Mixin
|
|
4961 |
}
|
4962 |
/**
|
4963 |
* This class contains methods C_Gallery_Storage needs to interact with (like say, importing from) the WP Media Library
|
|
|
4964 |
*/
|
4965 |
class Mixin_GalleryStorage_Base_MediaLibrary extends Mixin
|
4966 |
{
|
@@ -5006,6 +5035,7 @@ class Mixin_GalleryStorage_Base_MediaLibrary extends Mixin
|
|
5006 |
}
|
5007 |
/**
|
5008 |
* Delete the given NGG image from the media library
|
|
|
5009 |
*/
|
5010 |
function delete_from_media_library($imageId)
|
5011 |
{
|
@@ -5044,6 +5074,7 @@ class Mixin_GalleryStorage_Base_MediaLibrary extends Mixin
|
|
5044 |
}
|
5045 |
/**
|
5046 |
* Provides upload-related methods used by C_Gallery_Storage
|
|
|
5047 |
*/
|
5048 |
class Mixin_GalleryStorage_Base_Upload extends Mixin
|
5049 |
{
|
@@ -5122,6 +5153,16 @@ class Mixin_GalleryStorage_Base_Upload extends Mixin
|
|
5122 |
}
|
5123 |
return FALSE;
|
5124 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5125 |
function is_current_user_over_quota()
|
5126 |
{
|
5127 |
$retval = FALSE;
|
@@ -5385,52 +5426,103 @@ class Mixin_GalleryStorage_Base_Upload extends Mixin
|
|
5385 |
}
|
5386 |
return $retval;
|
5387 |
}
|
|
|
|
|
|
|
|
|
5388 |
function upload_zip($gallery_id)
|
5389 |
{
|
|
|
|
|
|
|
|
|
5390 |
$memory_limit = intval(ini_get('memory_limit'));
|
5391 |
if (!extension_loaded('suhosin') && $memory_limit < 256) {
|
5392 |
@ini_set('memory_limit', '256M');
|
5393 |
}
|
5394 |
-
$
|
5395 |
-
|
5396 |
-
|
5397 |
-
|
5398 |
-
|
5399 |
-
|
5400 |
-
|
5401 |
-
|
5402 |
-
|
5403 |
-
|
5404 |
-
|
5405 |
-
|
5406 |
-
|
5407 |
-
|
5408 |
-
|
5409 |
-
|
5410 |
-
|
5411 |
-
|
5412 |
-
|
5413 |
-
|
5414 |
-
|
5415 |
-
|
5416 |
-
|
5417 |
-
|
5418 |
-
|
5419 |
-
|
5420 |
-
|
5421 |
-
|
5422 |
-
}
|
5423 |
-
} else {
|
5424 |
-
$retval = $this->object->import_gallery_from_fs($dest_path, $gallery_id);
|
5425 |
-
}
|
5426 |
-
}
|
5427 |
$this->object->delete_directory($dest_path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5428 |
}
|
|
|
5429 |
if (!extension_loaded('suhosin')) {
|
5430 |
@ini_set('memory_limit', $memory_limit . 'M');
|
5431 |
}
|
5432 |
return $retval;
|
5433 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5434 |
}
|
5435 |
/**
|
5436 |
* Class Mixin_NextGen_Table_Extras
|
3386 |
/**
|
3387 |
* Basic gallery storage methods; please consult the other available mixin.gallerystorage_base_(.*).php files before
|
3388 |
* adding new methods to this class: new methods may be more appropriately defined in other mixins.
|
3389 |
+
* @property C_Gallery_Storage $object
|
3390 |
*/
|
3391 |
class Mixin_GalleryStorage_Base extends Mixin
|
3392 |
{
|
3417 |
function render_image($image, $size = FALSE)
|
3418 |
{
|
3419 |
$format_list = $this->object->get_image_format_list();
|
3420 |
+
$abspath = $this->object->get_image_abspath($image, $size, true);
|
3421 |
if ($abspath == null) {
|
3422 |
$thumbnail = $this->object->generate_image_size($image, $size);
|
3423 |
if ($thumbnail != null) {
|
3519 |
}
|
3520 |
/**
|
3521 |
* Provides methods to C_Gallery_Storage related to dynamic images, thumbnails, clones, etc
|
3522 |
+
* @property C_Gallery_Storage $object
|
3523 |
*/
|
3524 |
class Mixin_GalleryStorage_Base_Dynamic extends Mixin
|
3525 |
{
|
3827 |
// Something went wrong...
|
3828 |
return null;
|
3829 |
}
|
3830 |
+
// We now need to estimate the 'quality' or level of compression applied to the original JPEG: *IF* the
|
3831 |
+
// original image has a quality lower than the $quality parameter we will end up generating a new image
|
3832 |
+
// that is MUCH larger than the original. 'Quality' as an EXIF or IPTC property is quite unreliable
|
3833 |
+
// and not all software honors or treats it the same way. This calculation is simple: just compare the size
|
3834 |
+
// that our image could become to what it currently is. '3' is important here as JPEG uses 3 bytes per pixel.
|
3835 |
+
//
|
3836 |
+
// First we attempt to use ImageMagick if we can; it has a more robust method of calculation.
|
3837 |
+
if (!empty($dimensions['mime']) && $dimensions['mime'] == 'image/jpeg') {
|
3838 |
+
$possible_quality = NULL;
|
3839 |
+
if (extension_loaded('imagick') && class_exists('Imagick')) {
|
3840 |
+
$img = new Imagick($image_path);
|
3841 |
+
if (method_exists($img, 'getImageCompressionQuality')) {
|
3842 |
+
$possible_quality = $img->getImageCompressionQuality();
|
3843 |
+
}
|
3844 |
+
}
|
3845 |
+
// ImageMagick wasn't available so we guess it from the dimensions and filesize
|
3846 |
+
if ($possible_quality === NULL) {
|
3847 |
+
$filesize = filesize($image_path);
|
3848 |
+
$possible_quality = 101 - $width * $height * 3 / $filesize;
|
3849 |
+
}
|
3850 |
+
if ($possible_quality !== NULL && $possible_quality < $quality) {
|
3851 |
+
$quality = $possible_quality;
|
3852 |
+
}
|
3853 |
+
}
|
3854 |
$result['clone_path'] = $clone_path;
|
3855 |
$result['clone_directory'] = $clone_dir;
|
3856 |
$result['clone_suffix'] = $clone_suffix;
|
4129 |
}
|
4130 |
/**
|
4131 |
* Provides getter methods to C_Gallery_Storage for determining absolute paths, URL, etc
|
4132 |
+
* @property C_Gallery_Storage $object
|
4133 |
*/
|
4134 |
class Mixin_GalleryStorage_Base_Getters extends Mixin
|
4135 |
{
|
4751 |
}
|
4752 |
/**
|
4753 |
* Provides the basic methods of gallery management to C_Gallery_Storage
|
4754 |
+
* @property C_Gallery_Storage $object
|
4755 |
*/
|
4756 |
class Mixin_GalleryStorage_Base_Management extends Mixin
|
4757 |
{
|
4989 |
}
|
4990 |
/**
|
4991 |
* This class contains methods C_Gallery_Storage needs to interact with (like say, importing from) the WP Media Library
|
4992 |
+
* * @property C_Gallery_Storage $object
|
4993 |
*/
|
4994 |
class Mixin_GalleryStorage_Base_MediaLibrary extends Mixin
|
4995 |
{
|
5035 |
}
|
5036 |
/**
|
5037 |
* Delete the given NGG image from the media library
|
5038 |
+
* @var int|stdClass $imageId
|
5039 |
*/
|
5040 |
function delete_from_media_library($imageId)
|
5041 |
{
|
5074 |
}
|
5075 |
/**
|
5076 |
* Provides upload-related methods used by C_Gallery_Storage
|
5077 |
+
* @property C_Gallery_Storage $object
|
5078 |
*/
|
5079 |
class Mixin_GalleryStorage_Base_Upload extends Mixin
|
5080 |
{
|
5153 |
}
|
5154 |
return FALSE;
|
5155 |
}
|
5156 |
+
/**
|
5157 |
+
* @param string $filename
|
5158 |
+
* @return bool
|
5159 |
+
*/
|
5160 |
+
public function is_allowed_image_extension($filename)
|
5161 |
+
{
|
5162 |
+
$extension = pathinfo($filename, PATHINFO_EXTENSION);
|
5163 |
+
$allowed_extensions = apply_filters('ngg_allowed_file_types', array('jpeg', 'jpg', 'png', 'gif'));
|
5164 |
+
return in_array($extension, $allowed_extensions);
|
5165 |
+
}
|
5166 |
function is_current_user_over_quota()
|
5167 |
{
|
5168 |
$retval = FALSE;
|
5426 |
}
|
5427 |
return $retval;
|
5428 |
}
|
5429 |
+
/**
|
5430 |
+
* @param int $gallery_id
|
5431 |
+
* @return array|bool
|
5432 |
+
*/
|
5433 |
function upload_zip($gallery_id)
|
5434 |
{
|
5435 |
+
if (!$this->object->is_zip()) {
|
5436 |
+
return FALSE;
|
5437 |
+
}
|
5438 |
+
$retval = FALSE;
|
5439 |
$memory_limit = intval(ini_get('memory_limit'));
|
5440 |
if (!extension_loaded('suhosin') && $memory_limit < 256) {
|
5441 |
@ini_set('memory_limit', '256M');
|
5442 |
}
|
5443 |
+
$fs = C_Fs::get_instance();
|
5444 |
+
// Uses the WordPress ZIP abstraction API
|
5445 |
+
include_once $fs->join_paths(ABSPATH, 'wp-admin', 'includes', 'file.php');
|
5446 |
+
WP_Filesystem(FALSE, get_temp_dir(), TRUE);
|
5447 |
+
// Ensure that we truly have the gallery id
|
5448 |
+
$gallery_id = $this->object->_get_gallery_id($gallery_id);
|
5449 |
+
$zipfile = $_FILES['file']['tmp_name'];
|
5450 |
+
$dest_path = implode(DIRECTORY_SEPARATOR, array(rtrim(get_temp_dir(), "/\\"), 'unpacked-' . M_I18n::mb_basename($zipfile)));
|
5451 |
+
// Attempt to extract the zip file into the normal system directory
|
5452 |
+
$extracted = $this->object->extract_zip($zipfile, $dest_path);
|
5453 |
+
// Now verify it worked. get_temp_dir() will check each of the following directories to ensure they are
|
5454 |
+
// a directory and against wp_is_writable(). Should ALL of those options fail we will fallback to wp_upload_dir().
|
5455 |
+
//
|
5456 |
+
// WP_TEMP_DIR
|
5457 |
+
// sys_get_temp_dir()
|
5458 |
+
// ini/upload_tmp_dir
|
5459 |
+
// WP_CONTENT_DIR
|
5460 |
+
// /tmp
|
5461 |
+
$size = 0;
|
5462 |
+
$files = glob($dest_path . DIRECTORY_SEPARATOR . '*');
|
5463 |
+
foreach ($files as $file) {
|
5464 |
+
if (is_array(stat($file))) {
|
5465 |
+
$size += filesize($file);
|
5466 |
+
}
|
5467 |
+
}
|
5468 |
+
// Extraction failed; attempt again with wp_upload_dir()
|
5469 |
+
if ($size == 0) {
|
5470 |
+
// Remove the empty directory we may have possibly created but could not write to
|
|
|
|
|
|
|
|
|
|
|
5471 |
$this->object->delete_directory($dest_path);
|
5472 |
+
$destination = wp_upload_dir();
|
5473 |
+
$destination_path = $destination['basedir'];
|
5474 |
+
$dest_path = implode(DIRECTORY_SEPARATOR, array(rtrim($destination_path, "/\\"), rand(), 'unpacked-' . M_I18n::mb_basename($zipfile)));
|
5475 |
+
$extracted = $this->object->extract_zip($zipfile, $dest_path);
|
5476 |
+
}
|
5477 |
+
if ($extracted) {
|
5478 |
+
$retval = $this->object->import_gallery_from_fs($dest_path, $gallery_id);
|
5479 |
}
|
5480 |
+
$this->object->delete_directory($dest_path);
|
5481 |
if (!extension_loaded('suhosin')) {
|
5482 |
@ini_set('memory_limit', $memory_limit . 'M');
|
5483 |
}
|
5484 |
return $retval;
|
5485 |
}
|
5486 |
+
/**
|
5487 |
+
* @param string $zipfile
|
5488 |
+
* @param string $dest_path
|
5489 |
+
* @return bool FALSE on failure
|
5490 |
+
*/
|
5491 |
+
public function extract_zip($zipfile, $dest_path)
|
5492 |
+
{
|
5493 |
+
wp_mkdir_p($dest_path);
|
5494 |
+
if (class_exists('ZipArchive', FALSE) && apply_filters('unzip_file_use_ziparchive', TRUE)) {
|
5495 |
+
$zipObj = new ZipArchive();
|
5496 |
+
if ($zipObj->open($zipfile) === FALSE) {
|
5497 |
+
return FALSE;
|
5498 |
+
}
|
5499 |
+
for ($i = 0; $i < $zipObj->numFiles; $i++) {
|
5500 |
+
$filename = $zipObj->getNameIndex($i);
|
5501 |
+
if (!$this->object->is_allowed_image_extension($filename)) {
|
5502 |
+
continue;
|
5503 |
+
}
|
5504 |
+
$zipObj->extractTo($dest_path, array($zipObj->getNameIndex($i)));
|
5505 |
+
}
|
5506 |
+
} else {
|
5507 |
+
require_once ABSPATH . 'wp-admin/includes/class-pclzip.php';
|
5508 |
+
$zipObj = new PclZip($zipfile);
|
5509 |
+
$zipContent = $zipObj->listContent();
|
5510 |
+
$indexesToExtract = array();
|
5511 |
+
foreach ($zipContent as $zipItem) {
|
5512 |
+
if ($zipItem['folder']) {
|
5513 |
+
continue;
|
5514 |
+
}
|
5515 |
+
if (!$this->object->is_allowed_image_extension($zipItem['stored_filename'])) {
|
5516 |
+
continue;
|
5517 |
+
}
|
5518 |
+
$indexesToExtract[] = $zipItem['index'];
|
5519 |
+
}
|
5520 |
+
if (!$zipObj->extractByIndex(implode(',', $indexesToExtract), $dest_path)) {
|
5521 |
+
return FALSE;
|
5522 |
+
}
|
5523 |
+
}
|
5524 |
+
return TRUE;
|
5525 |
+
}
|
5526 |
}
|
5527 |
/**
|
5528 |
* Class Mixin_NextGen_Table_Extras
|
products/photocrati_nextgen/modules/nextgen_gallery_display/module.nextgen_gallery_display.php
CHANGED
@@ -194,6 +194,10 @@ class M_Gallery_Display extends C_Base_Module
|
|
194 |
|
195 |
static function enqueue_fontawesome()
|
196 |
{
|
|
|
|
|
|
|
|
|
197 |
wp_register_script(
|
198 |
'fontawesome_v4_shim',
|
199 |
'https://use.fontawesome.com/releases/v5.3.1/js/v4-shims.js',
|
@@ -203,12 +207,12 @@ class M_Gallery_Display extends C_Base_Module
|
|
203 |
if (!wp_script_is('fontawesome', 'registered'))
|
204 |
{
|
205 |
add_filter('script_loader_tag', 'M_Gallery_Display::fix_fontawesome_script_tag', 10, 2);
|
206 |
-
|
207 |
-
|
208 |
'https://use.fontawesome.com/releases/v5.3.1/js/all.js',
|
209 |
-
|
210 |
'5.3.1'
|
211 |
-
|
212 |
}
|
213 |
|
214 |
if (!wp_style_is('fontawesome', 'registered'))
|
@@ -223,9 +227,8 @@ class M_Gallery_Display extends C_Base_Module
|
|
223 |
);
|
224 |
}
|
225 |
|
226 |
-
|
227 |
wp_enqueue_script('fontawesome');
|
228 |
-
|
229 |
}
|
230 |
|
231 |
/**
|
194 |
|
195 |
static function enqueue_fontawesome()
|
196 |
{
|
197 |
+
// The official plugin is active, we don't need to do anything outside of the wp-admin
|
198 |
+
if (defined('FONT_AWESOME_OFFICIAL_LOADED') && !is_admin())
|
199 |
+
return;
|
200 |
+
|
201 |
wp_register_script(
|
202 |
'fontawesome_v4_shim',
|
203 |
'https://use.fontawesome.com/releases/v5.3.1/js/v4-shims.js',
|
207 |
if (!wp_script_is('fontawesome', 'registered'))
|
208 |
{
|
209 |
add_filter('script_loader_tag', 'M_Gallery_Display::fix_fontawesome_script_tag', 10, 2);
|
210 |
+
wp_enqueue_script(
|
211 |
+
'fontawesome',
|
212 |
'https://use.fontawesome.com/releases/v5.3.1/js/all.js',
|
213 |
+
array('fontawesome_v4_shim'),
|
214 |
'5.3.1'
|
215 |
+
);
|
216 |
}
|
217 |
|
218 |
if (!wp_style_is('fontawesome', 'registered'))
|
227 |
);
|
228 |
}
|
229 |
|
230 |
+
wp_enqueue_script('fontawesome_v4_shim');
|
231 |
wp_enqueue_script('fontawesome');
|
|
|
232 |
}
|
233 |
|
234 |
/**
|
products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.js
CHANGED
@@ -141,4 +141,101 @@
|
|
141 |
}
|
142 |
};
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
})(jQuery);
|
141 |
}
|
142 |
};
|
143 |
|
144 |
+
// Polyfill for older browsers
|
145 |
+
Object.setPrototypeOf = Object.setPrototypeOf || function(obj, proto) {
|
146 |
+
obj.__proto__ = proto;
|
147 |
+
return obj;
|
148 |
+
};
|
149 |
+
|
150 |
+
Object.setPrototypeOf(
|
151 |
+
window.galleries,
|
152 |
+
{
|
153 |
+
get_api_version: function() {
|
154 |
+
return '0.1';
|
155 |
+
},
|
156 |
+
|
157 |
+
get_from_id: function (gallery_id) {
|
158 |
+
var self = this;
|
159 |
+
var retval = null;
|
160 |
+
var keys = Object.keys(this);
|
161 |
+
|
162 |
+
for (var i = 1; i <= keys.length; i++) {
|
163 |
+
var gallery = self[keys[i - 1]];
|
164 |
+
if (gallery.ID === gallery_id || gallery.ID === 'gallery_' + gallery_id || gallery.ID === parseInt(gallery_id)) {
|
165 |
+
retval = gallery;
|
166 |
+
break;
|
167 |
+
}
|
168 |
+
}
|
169 |
+
|
170 |
+
return retval;
|
171 |
+
},
|
172 |
+
|
173 |
+
get_from_slug: function (slug) {
|
174 |
+
var self = this;
|
175 |
+
var retval = null;
|
176 |
+
var keys = Object.keys(this);
|
177 |
+
|
178 |
+
for (var i = 1; i <= keys.length; i++) {
|
179 |
+
var gallery = self[keys[i - 1]];
|
180 |
+
if (gallery.slug === slug) {
|
181 |
+
retval = gallery;
|
182 |
+
break;
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
+
return retval;
|
187 |
+
},
|
188 |
+
|
189 |
+
get_setting: function(gallery_id, name, def) {
|
190 |
+
var tmp = '';
|
191 |
+
var gallery = this.get_from_id(gallery_id);
|
192 |
+
if (gallery && typeof gallery[name] !== 'undefined') {
|
193 |
+
tmp = gallery[name];
|
194 |
+
} else {
|
195 |
+
tmp = def;
|
196 |
+
}
|
197 |
+
|
198 |
+
if (tmp === 1) tmp = true;
|
199 |
+
if (tmp === 0) tmp = false;
|
200 |
+
if (tmp === '1') tmp = true;
|
201 |
+
if (tmp === '0') tmp = false;
|
202 |
+
if (tmp === 'false') tmp = false;
|
203 |
+
if (tmp === 'true') tmp = true;
|
204 |
+
|
205 |
+
return tmp;
|
206 |
+
},
|
207 |
+
|
208 |
+
get_display_setting: function(gallery_id, name, def) {
|
209 |
+
var tmp = '';
|
210 |
+
var gallery = this.get_from_id(gallery_id);
|
211 |
+
if (gallery && typeof gallery.display_settings[name] !== 'undefined') {
|
212 |
+
tmp = gallery.display_settings[name];
|
213 |
+
} else {
|
214 |
+
tmp = def;
|
215 |
+
}
|
216 |
+
|
217 |
+
if (tmp === 1) tmp = true;
|
218 |
+
if (tmp === 0) tmp = false;
|
219 |
+
if (tmp === '1') tmp = true;
|
220 |
+
if (tmp === '0') tmp = false;
|
221 |
+
if (tmp === 'false') tmp = false;
|
222 |
+
if (tmp === 'true') tmp = true;
|
223 |
+
|
224 |
+
return tmp;
|
225 |
+
},
|
226 |
+
|
227 |
+
is_widget: function(gallery_id) {
|
228 |
+
var retval = false;
|
229 |
+
var gallery = this.get_from_id(gallery_id);
|
230 |
+
var slug = gallery.slug;
|
231 |
+
|
232 |
+
if (slug) {
|
233 |
+
return slug.indexOf('widget-ngg-images') !== -1;
|
234 |
+
}
|
235 |
+
|
236 |
+
return retval;
|
237 |
+
}
|
238 |
+
}
|
239 |
+
);
|
240 |
+
|
241 |
})(jQuery);
|
products/photocrati_nextgen/modules/nextgen_gallery_display/static/common.min.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return i(n||t)},u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(t){a=t}var c=t("./schedule"),l=t("./queue"),u=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){u.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},u.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){return n(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=o;else if(c){var n=s(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);N.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||E(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function m(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function C(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function E(t,e,n){if("undefined"!=typeof console){var r;if(N.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function k(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){I.throwLater(t)}"unhandledRejection"===t?tt(t,n,r)||i||E(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){return t.length<41?t:t.substr(0,38)+"..."}function T(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,V=e._getDomain,I=e._async,L=t("./errors").Warning,N=t("./util"),H=N.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),z=!(0==N.env("BLUEBIRD_WARNINGS")||!G&&!N.env("BLUEBIRD_WARNINGS")),X=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),I.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){k("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),k("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=V();A="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=V();O="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(I.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),I.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),I.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!N.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!N.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),Y=function(){return N.isNode?function(){return process.emit.apply(process,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),n=N.global[e];return!!n&&(n.apply(N.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(t){I.throwLater(t),e=!0}var n=!1;try{n=J(t,Z[t].apply(null,arguments))}catch(t){I.throwLater(t),n=!0}return n||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,N.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(I.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),m(r),N.notEnumerableProp(t,"stack",g(n,r)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(D=function(t){console.warn(t)},N.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:N.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(t){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(d.prototype[v[y]]=Array.prototype[v[y]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(t){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new e(r))._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=f(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=f(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&null===(o=a(o,this._yieldHandlers,this._promise)))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){
|
2 |
-
if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj,e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}return++this._totalResolved>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+f.classString(e));if(t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new g(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),g=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var m=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),E=t("./promise_array")(i,b,j,p,n),k=t("./context")(i),F=k.create,x=t("./debuggability")(i,k),T=(x.CapturedTrace,t("./finally")(i,j)),P=t("./catch_filter")(C),R=t("./nodeback"),S=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new E(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new E(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!=(50397184&u)){var h,_,d=l._settlePromiseCtx;0!=(33554432&u)?(_=l._rejectionHandler0,h=t):0!=(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0==(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(r._value());else if(0!=(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,!!e&&i),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0==(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();0==(65536&(i=r._bitField))&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!=(134217728&a);0!=(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof E?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new i(b),resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,E,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,E,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,E,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,E,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,E,p,j,b,x),t("./settle.js")(i,E,x),t("./some.js")(i,E,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");return c.isArray,c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(n,o){var a=r(this._values,this._promise);if(a instanceof e){a=a._target();var l=a._bitField;if(this._values=a,0==(50397184&l))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(a._reason()):this._cancel();a=a._value()}if(null===(a=c.asArray(a))){var u=i("expecting an array or an iterable object but got "+c.classString(a)).reason();return void this._promise._rejectCallback(u,!1)}return 0===a.length?void(-5===o?this._resolveEmptyArray():this._resolve(s(o))):void this._iterate(a)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0==(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!=(33554432&s)?this._promiseFulfilled(c._value(),a):0!=(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!b.test(t)}function i(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function o(t,e,n){var r=h.getDataPropertyOrDefault(t,e+n,g);return!!r&&i(r)}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new y("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=h.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],f=r===w||w(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,f)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===p&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=f(o,a);try{s.apply(i,_(arguments,c))}catch(t){o._rejectCallback(d(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),h.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(C(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],f=s[c+1],_=u+e;if(r===j)t[_]=j(u,p,u,f,e,i);else{var d=r(f,function(){return j(u,p,u,f,e,i)});h.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return h.toFastProperties(t),t}function u(t,e,n){return j(t,e,void 0,t,null,n)}var p={},h=t("./util"),f=t("./nodeback"),_=h.withAppended,d=h.maybeWrapAsError,v=h.canEvaluate,y=t("./errors").TypeError,g={__isPromisified__:!0},m=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],b=new RegExp("^(?:"+m.join("|")+")$"),w=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},C=function(t){return t.replace(/([$])/,"\\$")},j=v?void 0:c;e.promisify=function(t,e){if("function"!=typeof t)throw new y("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?p:e.context,o=!!e.multiArgs,s=u(t,n,o);return h.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new y("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var i=e.filter;"function"!=typeof i&&(i=w);var o=e.promisifier;if("function"!=typeof o&&(o=j),!h.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=h.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&h.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();o>i;++i)n[this._values[i+r]]=this._values[i]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,r(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(null===(t=s.asArray(t)))return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){return"function"!=typeof e?r("expecting a function but got "+f.classString(e)):new a(t,e,n,i).promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;(o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),n=!1}).observe(r,e);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),i()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection;t("./util").inherits(i,n),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values)
|
3 |
-
;!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return l.e=t,l}}function s(t){try{return p.call(t,"_promise0")}catch(t){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(t){return a(t)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,g=_.tryCatch,m={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==m?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=g(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=F;return F=null,t.apply(this,arguments)}catch(t){return P.e=t,P}}function i(t){return F=t,r}function o(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=x.names(t.prototype),n=x.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&x.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(t){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(t){}}function m(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function b(t){return y(t)&&x.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=x.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{x.defineProperty(e,o,x.getDescriptor(t,o))}catch(t){}}}function j(t){return H?process.env[t]:void 0}function E(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function k(t,e){return t.bind(e)}var F,x=t("./es5"),T="undefined"==typeof navigator,P={e:{}},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(x.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(t){return r}for(var s=0;s<o.length;++s){var a=o[s];if(!i[a]){i[a]=!0;var c=Object.getOwnPropertyDescriptor(t,a);null!=c&&null==c.get&&null==c.set&&r.push(a)}}t=x.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,V=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(t){return t}}}(),I=function(t){return x.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};I=function(t){return x.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var N="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),H="undefined"!=typeof process&&void 0!==process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:x.isArray,asArray:I,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:T,errorObj:P,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:V,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:j,global:R,getNativePromise:E,domainBind:k};B.isRecentNode=B.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(t){B.lastLineError=t}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t){window.NggPaginatedGallery=function(e,n){this.displayed_gallery_id=e,this.container=t(n),this.container_name=n,this.get_displayed_gallery_obj=function(){var t="gallery_"+this.displayed_gallery_id;return void 0!==window.galleries[t]&&window.galleries[t]},this.enable_ajax_pagination=function(){var e=this;t("body").on("click","a.ngg-browser-prev, a.ngg-browser-next",function(r){var i=!0;t(this).parents(n).each(function(){if(t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id)return!0;i=!1}),i||(r.preventDefault(),window.ngg_ajax_operaton_count++,t("body, a").css("cursor","wait"),t.get(t(this).attr("href"),function(n){if(window.ngg_ajax_operaton_count--,window.ngg_ajax_operaton_count<=0&&(window.ngg_ajax_operaton_count=0,t("body, a").css("cursor","auto")),n){var r=t(n),i=!1;r.find(e.container_name).each(function(){return!!i||(t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id||void(i=t(this)))}),i&&e.container.each(function(){var n=t(this);if(n.data("nextgen-gallery-id")!=e.displayed_gallery_id)return!0;var r=t(i.html()),o=r.find("img").toArray().map(function(e){return new Promise(function(n,r){var i=new Image;i.src=e.src,t(i).on("load",n)})});return Promise.all(o).then(function(){n.html(r),t(document).trigger("refreshed")}),!0})}}))})};var r=this.get_displayed_gallery_obj();r&&void 0!==r.display_settings.ajax_pagination&&parseInt(r.display_settings.ajax_pagination)&&this.enable_ajax_pagination(),void 0===window.ngg_ajax_operation_count&&(window.ngg_ajax_operaton_count=0)}}(jQuery);
|
1 |
+
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Promise=t()}}(function(){return function t(e,n,r){function i(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof _dereq_&&_dereq_;if(!a&&c)return c(s,!0);if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return i(n||t)},u,u.exports,t,e,n,r)}return n[s].exports}for(var o="function"==typeof _dereq_&&_dereq_,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(t,e,n){"use strict";e.exports=function(t){function e(t){var e=new n(t),r=e.promise();return e.setHowMany(1),e.setUnwrap(),e.init(),r}var n=t._SomePromiseArray;t.any=function(t){return e(t)},t.prototype.any=function(){return e(this)}}},{}],2:[function(t,e,n){"use strict";function r(){this._customScheduler=!1,this._isTickUsed=!1,this._lateQueue=new l(16),this._normalQueue=new l(16),this._haveDrainedQueues=!1,this._trampolineEnabled=!0;var t=this;this.drainQueues=function(){t._drainQueues()},this._schedule=c}function i(t,e,n){this._lateQueue.push(t,e,n),this._queueTick()}function o(t,e,n){this._normalQueue.push(t,e,n),this._queueTick()}function s(t){this._normalQueue._pushOne(t),this._queueTick()}var a;try{throw new Error}catch(t){a=t}var c=t("./schedule"),l=t("./queue"),u=t("./util");r.prototype.setScheduler=function(t){var e=this._schedule;return this._schedule=t,this._customScheduler=!0,e},r.prototype.hasCustomScheduler=function(){return this._customScheduler},r.prototype.enableTrampoline=function(){this._trampolineEnabled=!0},r.prototype.disableTrampolineIfNecessary=function(){u.hasDevTools&&(this._trampolineEnabled=!1)},r.prototype.haveItemsQueued=function(){return this._isTickUsed||this._haveDrainedQueues},r.prototype.fatalError=function(t,e){e?(process.stderr.write("Fatal "+(t instanceof Error?t.stack:t)+"\n"),process.exit(2)):this.throwLater(t)},r.prototype.throwLater=function(t,e){if(1===arguments.length&&(e=t,t=function(){throw e}),"undefined"!=typeof setTimeout)setTimeout(function(){t(e)},0);else try{this._schedule(function(){t(e)})}catch(t){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")}},u.hasDevTools?(r.prototype.invokeLater=function(t,e,n){this._trampolineEnabled?i.call(this,t,e,n):this._schedule(function(){setTimeout(function(){t.call(e,n)},100)})},r.prototype.invoke=function(t,e,n){this._trampolineEnabled?o.call(this,t,e,n):this._schedule(function(){t.call(e,n)})},r.prototype.settlePromises=function(t){this._trampolineEnabled?s.call(this,t):this._schedule(function(){t._settlePromises()})}):(r.prototype.invokeLater=i,r.prototype.invoke=o,r.prototype.settlePromises=s),r.prototype._drainQueue=function(t){for(;t.length()>0;){var e=t.shift();if("function"==typeof e){var n=t.shift(),r=t.shift();e.call(n,r)}else e._settlePromises()}},r.prototype._drainQueues=function(){this._drainQueue(this._normalQueue),this._reset(),this._haveDrainedQueues=!0,this._drainQueue(this._lateQueue)},r.prototype._queueTick=function(){this._isTickUsed||(this._isTickUsed=!0,this._schedule(this.drainQueues))},r.prototype._reset=function(){this._isTickUsed=!1},e.exports=r,e.exports.firstLineError=a},{"./queue":26,"./schedule":29,"./util":36}],3:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){var i=!1,o=function(t,e){this._reject(e)},s=function(t,e){e.promiseRejectionQueued=!0,e.bindingPromise._then(o,o,null,this,t)},a=function(t,e){0==(50397184&this._bitField)&&this._resolveCallback(e.target)},c=function(t,e){e.promiseRejectionQueued||this._reject(t)};t.prototype.bind=function(o){i||(i=!0,t.prototype._propagateFrom=r.propagateFromFunction(),t.prototype._boundValue=r.boundValueFunction());var l=n(o),u=new t(e);u._propagateFrom(this,1);var p=this._target();if(u._setBoundTo(l),l instanceof t){var h={promiseRejectionQueued:!1,promise:u,target:p,bindingPromise:l};p._then(e,s,void 0,u,h),l._then(a,c,void 0,u,h),u._setOnCancel(l)}else u._resolveCallback(p);return u},t.prototype._setBoundTo=function(t){void 0!==t?(this._bitField=2097152|this._bitField,this._boundTo=t):this._bitField=-2097153&this._bitField},t.prototype._isBound=function(){return 2097152==(2097152&this._bitField)},t.bind=function(e,n){return t.resolve(n).bind(e)}}},{}],4:[function(t,e,n){"use strict";function r(){try{Promise===o&&(Promise=i)}catch(t){}return o}var i;"undefined"!=typeof Promise&&(i=Promise);var o=t("./promise")();o.noConflict=r,e.exports=o},{"./promise":22}],5:[function(t,e,n){"use strict";var r=Object.create;if(r){var i=r(null),o=r(null);i[" size"]=o[" size"]=0}e.exports=function(e){function n(t,n){var r;if(null!=t&&(r=t[n]),"function"!=typeof r){var i="Object "+a.classString(t)+" has no method '"+a.toString(n)+"'";throw new e.TypeError(i)}return r}function r(t){return n(t,this.pop()).apply(t,this)}function i(t){return t[this]}function o(t){var e=+this;return 0>e&&(e=Math.max(0,e+t.length)),t[e]}var s,a=t("./util"),c=a.canEvaluate;a.isIdentifier,e.prototype.call=function(t){var e=[].slice.call(arguments,1);return e.push(t),this._then(r,void 0,void 0,e,void 0)},e.prototype.get=function(t){var e;if("number"==typeof t)e=o;else if(c){var n=s(t);e=null!==n?n:i}else e=i;return this._then(e,void 0,void 0,t,void 0)}}},{"./util":36}],6:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){var o=t("./util"),s=o.tryCatch,a=o.errorObj,c=e._async;e.prototype.break=e.prototype.cancel=function(){if(!i.cancellation())return this._warn("cancellation is disabled");for(var t=this,e=t;t._isCancellable();){if(!t._cancelBy(e)){e._isFollowing()?e._followee().cancel():e._cancelBranched();break}var n=t._cancellationParent;if(null==n||!n._isCancellable()){t._isFollowing()?t._followee().cancel():t._cancelBranched();break}t._isFollowing()&&t._followee().cancel(),t._setWillBeCancelled(),e=t,t=n}},e.prototype._branchHasCancelled=function(){this._branchesRemainingToCancel--},e.prototype._enoughBranchesHaveCancelled=function(){return void 0===this._branchesRemainingToCancel||this._branchesRemainingToCancel<=0},e.prototype._cancelBy=function(t){return t===this?(this._branchesRemainingToCancel=0,this._invokeOnCancel(),!0):(this._branchHasCancelled(),!!this._enoughBranchesHaveCancelled()&&(this._invokeOnCancel(),!0))},e.prototype._cancelBranched=function(){this._enoughBranchesHaveCancelled()&&this._cancel()},e.prototype._cancel=function(){this._isCancellable()&&(this._setCancelled(),c.invoke(this._cancelPromises,this,void 0))},e.prototype._cancelPromises=function(){this._length()>0&&this._settlePromises()},e.prototype._unsetOnCancel=function(){this._onCancelField=void 0},e.prototype._isCancellable=function(){return this.isPending()&&!this._isCancelled()},e.prototype.isCancellable=function(){return this.isPending()&&!this.isCancelled()},e.prototype._doInvokeOnCancel=function(t,e){if(o.isArray(t))for(var n=0;n<t.length;++n)this._doInvokeOnCancel(t[n],e);else if(void 0!==t)if("function"==typeof t){if(!e){var r=s(t).call(this._boundValue());r===a&&(this._attachExtraTrace(r.e),c.throwLater(r.e))}}else t._resultCancelled(this)},e.prototype._invokeOnCancel=function(){var t=this._onCancel();this._unsetOnCancel(),c.invoke(this._doInvokeOnCancel,this,t)},e.prototype._invokeInternalOnCancel=function(){this._isCancellable()&&(this._doInvokeOnCancel(this._onCancel(),!0),this._unsetOnCancel())},e.prototype._resultCancelled=function(){this.cancel()}}},{"./util":36}],7:[function(t,e,n){"use strict";e.exports=function(e){function n(t,n,a){return function(c){var l=a._boundValue();t:for(var u=0;u<t.length;++u){var p=t[u];if(p===Error||null!=p&&p.prototype instanceof Error){if(c instanceof p)return o(n).call(l,c)}else if("function"==typeof p){var h=o(p).call(l,c);if(h===s)return h;if(h)return o(n).call(l,c)}else if(r.isObject(c)){for(var f=i(p),_=0;_<f.length;++_){var d=f[_];if(p[d]!=c[d])continue t}return o(n).call(l,c)}}return e}}var r=t("./util"),i=t("./es5").keys,o=r.tryCatch,s=r.errorObj;return n}},{"./es5":13,"./util":36}],8:[function(t,e,n){"use strict";e.exports=function(t){function e(){this._trace=new e.CapturedTrace(r())}function n(){return i?new e:void 0}function r(){var t=o.length-1;return t>=0?o[t]:void 0}var i=!1,o=[];return t.prototype._promiseCreated=function(){},t.prototype._pushContext=function(){},t.prototype._popContext=function(){return null},t._peekContext=t.prototype._peekContext=function(){},e.prototype._pushContext=function(){void 0!==this._trace&&(this._trace._promiseCreated=null,o.push(this._trace))},e.prototype._popContext=function(){if(void 0!==this._trace){var t=o.pop(),e=t._promiseCreated;return t._promiseCreated=null,e}return null},e.CapturedTrace=null,e.create=n,e.deactivateLongStackTraces=function(){},e.activateLongStackTraces=function(){var n=t.prototype._pushContext,o=t.prototype._popContext,s=t._peekContext,a=t.prototype._peekContext,c=t.prototype._promiseCreated;e.deactivateLongStackTraces=function(){t.prototype._pushContext=n,t.prototype._popContext=o,t._peekContext=s,t.prototype._peekContext=a,t.prototype._promiseCreated=c,i=!1},i=!0,t.prototype._pushContext=e.prototype._pushContext,t.prototype._popContext=e.prototype._popContext,t._peekContext=t.prototype._peekContext=r,t.prototype._promiseCreated=function(){var t=this._peekContext();t&&null==t._promiseCreated&&(t._promiseCreated=this)}},e}},{}],9:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e){return{promise:e}}function i(){return!1}function o(t,e,n){var r=this;try{t(e,n,function(t){if("function"!=typeof t)throw new TypeError("onCancel must be a function, got: "+N.toString(t));r._attachCancellationCallback(t)})}catch(t){return t}}function s(t){if(!this._isCancellable())return this;var e=this._onCancel();void 0!==e?N.isArray(e)?e.push(t):this._setOnCancel([e,t]):this._setOnCancel(t)}function a(){return this._onCancelField}function c(t){this._onCancelField=t}function l(){this._cancellationParent=void 0,this._onCancelField=void 0}function u(t,e){if(0!=(1&e)){this._cancellationParent=t;var n=t._branchesRemainingToCancel;void 0===n&&(n=0),t._branchesRemainingToCancel=n+1}0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function p(t,e){0!=(2&e)&&t._isBound()&&this._setBoundTo(t._boundTo)}function h(){var t=this._boundTo;return void 0!==t&&t instanceof e?t.isFulfilled()?t.value():void 0:t}function f(){this._trace=new S(this._peekContext())}function _(t,e){if(H(t)){var n=this._trace;if(void 0!==n&&e&&(n=n._parent),void 0!==n)n.attachExtraTrace(t);else if(!t.__stackCleaned__){var r=j(t);N.notEnumerableProp(t,"stack",r.message+"\n"+r.stack.join("\n")),N.notEnumerableProp(t,"__stackCleaned__",!0)}}}function d(t,e,n,r,i){if(void 0===t&&null!==e&&W){if(void 0!==i&&i._returnedNonUndefined())return;if(0==(65535&r._bitField))return;n&&(n+=" ");var o="",s="";if(e._trace){for(var a=e._trace.stack.split("\n"),c=w(a),l=c.length-1;l>=0;--l){var u=c[l];if(!U.test(u)){var p=u.match(M);p&&(o="at "+p[1]+":"+p[2]+":"+p[3]+" ");break}}if(c.length>0)for(var h=c[0],l=0;l<a.length;++l)if(a[l]===h){l>0&&(s="\n"+a[l-1]);break}}var f="a promise was created in a "+n+"handler "+o+"but was not returned from it, see http://goo.gl/rRqMUw"+s;r._warn(f,!0,e)}}function v(t,e){var n=t+" is deprecated and will be removed in a future version.";return e&&(n+=" Use "+e+" instead."),y(n)}function y(t,n,r){if(ot.warnings){var i,o=new L(t);if(n)r._attachExtraTrace(o);else if(ot.longStackTraces&&(i=e._peekContext()))i.attachExtraTrace(o);else{var s=j(o);o.stack=s.message+"\n"+s.stack.join("\n")}tt("warning",o)||k(o,"",!0)}}function g(t,e){for(var n=0;n<e.length-1;++n)e[n].push("From previous event:"),e[n]=e[n].join("\n");return n<e.length&&(e[n]=e[n].join("\n")),t+"\n"+e.join("\n")}function m(t){for(var e=0;e<t.length;++e)(0===t[e].length||e+1<t.length&&t[e][0]===t[e+1][0])&&(t.splice(e,1),e--)}function b(t){for(var e=t[0],n=1;n<t.length;++n){for(var r=t[n],i=e.length-1,o=e[i],s=-1,a=r.length-1;a>=0;--a)if(r[a]===o){s=a;break}for(var a=s;a>=0;--a){var c=r[a];if(e[i]!==c)break;e.pop(),i--}e=r}}function w(t){for(var e=[],n=0;n<t.length;++n){var r=t[n],i=" (No stack trace)"===r||q.test(r),o=i&&nt(r);i&&!o&&($&&" "!==r.charAt(0)&&(r=" "+r),e.push(r))}return e}function C(t){for(var e=t.stack.replace(/\s+$/g,"").split("\n"),n=0;n<e.length;++n){var r=e[n];if(" (No stack trace)"===r||q.test(r))break}return n>0&&"SyntaxError"!=t.name&&(e=e.slice(n)),e}function j(t){var e=t.stack,n=t.toString();return e="string"==typeof e&&e.length>0?C(t):[" (No stack trace)"],{message:n,stack:"SyntaxError"==t.name?e:w(e)}}function k(t,e,n){if("undefined"!=typeof console){var r;if(N.isObject(t)){var i=t.stack;r=e+Q(i,t)}else r=e+String(t);"function"==typeof D?D(r,n):("function"==typeof console.log||"object"==typeof console.log)&&console.log(r)}}function E(t,e,n,r){var i=!1;try{"function"==typeof e&&(i=!0,"rejectionHandled"===t?e(r):e(n,r))}catch(t){V.throwLater(t)}"unhandledRejection"===t?tt(t,n,r)||i||k(n,"Unhandled rejection "):tt(t,r)}function F(t){var e;if("function"==typeof t)e="[function "+(t.name||"anonymous")+"]";else{e=t&&"function"==typeof t.toString?t.toString():N.toString(t);if(/\[object [a-zA-Z0-9$_]+\]/.test(e))try{e=JSON.stringify(t)}catch(t){}0===e.length&&(e="(empty array)")}return"(<"+x(e)+">, no stack trace)"}function x(t){return t.length<41?t:t.substr(0,38)+"..."}function T(){return"function"==typeof it}function P(t){var e=t.match(rt);return e?{fileName:e[1],line:parseInt(e[2],10)}:void 0}function R(t,e){if(T()){for(var n,r,i=t.stack.split("\n"),o=e.stack.split("\n"),s=-1,a=-1,c=0;c<i.length;++c){var l=P(i[c]);if(l){n=l.fileName,s=l.line;break}}for(var c=0;c<o.length;++c){var l=P(o[c]);if(l){r=l.fileName,a=l.line;break}}0>s||0>a||!n||!r||n!==r||s>=a||(nt=function(t){if(B.test(t))return!0;var e=P(t);return!!(e&&e.fileName===n&&s<=e.line&&e.line<=a)})}}function S(t){this._parent=t,this._promisesCreated=0;var e=this._length=1+(void 0===t?0:t._length);it(this,S),e>32&&this.uncycle()}var O,A,D,I=e._getDomain,V=e._async,L=t("./errors").Warning,N=t("./util"),H=N.canAttachTrace,B=/[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/,U=/\((?:timers\.js):\d+:\d+\)/,M=/[\/<\(](.+?):(\d+):(\d+)\)?\s*$/,q=null,Q=null,$=!1,G=!(0==N.env("BLUEBIRD_DEBUG")||!N.env("BLUEBIRD_DEBUG")&&"development"!==N.env("NODE_ENV")),z=!(0==N.env("BLUEBIRD_WARNINGS")||!G&&!N.env("BLUEBIRD_WARNINGS")),X=!(0==N.env("BLUEBIRD_LONG_STACK_TRACES")||!G&&!N.env("BLUEBIRD_LONG_STACK_TRACES")),W=0!=N.env("BLUEBIRD_W_FORGOTTEN_RETURN")&&(z||!!N.env("BLUEBIRD_W_FORGOTTEN_RETURN"));e.prototype.suppressUnhandledRejections=function(){var t=this._target();t._bitField=-1048577&t._bitField|524288},e.prototype._ensurePossibleRejectionHandled=function(){0==(524288&this._bitField)&&(this._setRejectionIsUnhandled(),V.invokeLater(this._notifyUnhandledRejection,this,void 0))},e.prototype._notifyUnhandledRejectionIsHandled=function(){E("rejectionHandled",O,void 0,this)},e.prototype._setReturnedNonUndefined=function(){this._bitField=268435456|this._bitField},e.prototype._returnedNonUndefined=function(){return 0!=(268435456&this._bitField)},e.prototype._notifyUnhandledRejection=function(){if(this._isRejectionUnhandled()){var t=this._settledValue();this._setUnhandledRejectionIsNotified(),E("unhandledRejection",A,t,this)}},e.prototype._setUnhandledRejectionIsNotified=function(){this._bitField=262144|this._bitField},e.prototype._unsetUnhandledRejectionIsNotified=function(){this._bitField=-262145&this._bitField},e.prototype._isUnhandledRejectionNotified=function(){return(262144&this._bitField)>0},e.prototype._setRejectionIsUnhandled=function(){this._bitField=1048576|this._bitField},e.prototype._unsetRejectionIsUnhandled=function(){this._bitField=-1048577&this._bitField,this._isUnhandledRejectionNotified()&&(this._unsetUnhandledRejectionIsNotified(),this._notifyUnhandledRejectionIsHandled())},e.prototype._isRejectionUnhandled=function(){return(1048576&this._bitField)>0},e.prototype._warn=function(t,e,n){return y(t,e,n||this)},e.onPossiblyUnhandledRejection=function(t){var e=I();A="function"==typeof t?null===e?t:N.domainBind(e,t):void 0},e.onUnhandledRejectionHandled=function(t){var e=I();O="function"==typeof t?null===e?t:N.domainBind(e,t):void 0};var K=function(){};e.longStackTraces=function(){if(V.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");if(!ot.longStackTraces&&T()){var t=e.prototype._captureStackTrace,r=e.prototype._attachExtraTrace;ot.longStackTraces=!0,K=function(){if(V.haveItemsQueued()&&!ot.longStackTraces)throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n");e.prototype._captureStackTrace=t,e.prototype._attachExtraTrace=r,n.deactivateLongStackTraces(),V.enableTrampoline(),ot.longStackTraces=!1},e.prototype._captureStackTrace=f,e.prototype._attachExtraTrace=_,n.activateLongStackTraces(),V.disableTrampolineIfNecessary()}},e.hasLongStackTraces=function(){return ot.longStackTraces&&T()};var J=function(){try{if("function"==typeof CustomEvent){var t=new CustomEvent("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new CustomEvent(t.toLowerCase(),{detail:e,cancelable:!0});return!N.global.dispatchEvent(n)}}if("function"==typeof Event){var t=new Event("CustomEvent");return N.global.dispatchEvent(t),function(t,e){var n=new Event(t.toLowerCase(),{cancelable:!0});return n.detail=e,!N.global.dispatchEvent(n)}}var t=document.createEvent("CustomEvent");return t.initCustomEvent("testingtheevent",!1,!0,{}),N.global.dispatchEvent(t),function(t,e){var n=document.createEvent("CustomEvent");return n.initCustomEvent(t.toLowerCase(),!1,!0,e),!N.global.dispatchEvent(n)}}catch(t){}return function(){return!1}}(),Y=function(){return N.isNode?function(){return process.emit.apply(process,arguments)}:N.global?function(t){var e="on"+t.toLowerCase(),n=N.global[e];return!!n&&(n.apply(N.global,[].slice.call(arguments,1)),!0)}:function(){return!1}}(),Z={promiseCreated:r,promiseFulfilled:r,promiseRejected:r,promiseResolved:r,promiseCancelled:r,promiseChained:function(t,e,n){return{promise:e,child:n}},warning:function(t,e){return{warning:e}},unhandledRejection:function(t,e,n){return{reason:e,promise:n}},rejectionHandled:r},tt=function(t){var e=!1;try{e=Y.apply(null,arguments)}catch(t){V.throwLater(t),e=!0}var n=!1;try{n=J(t,Z[t].apply(null,arguments))}catch(t){V.throwLater(t),n=!0}return n||e};e.config=function(t){if(t=Object(t),"longStackTraces"in t&&(t.longStackTraces?e.longStackTraces():!t.longStackTraces&&e.hasLongStackTraces()&&K()),"warnings"in t){var n=t.warnings;ot.warnings=!!n,W=ot.warnings,N.isObject(n)&&"wForgottenReturn"in n&&(W=!!n.wForgottenReturn)}if("cancellation"in t&&t.cancellation&&!ot.cancellation){if(V.haveItemsQueued())throw new Error("cannot enable cancellation after promises are in use");e.prototype._clearCancellationData=l,e.prototype._propagateFrom=u,e.prototype._onCancel=a,e.prototype._setOnCancel=c,e.prototype._attachCancellationCallback=s,e.prototype._execute=o,et=u,ot.cancellation=!0}return"monitoring"in t&&(t.monitoring&&!ot.monitoring?(ot.monitoring=!0,e.prototype._fireEvent=tt):!t.monitoring&&ot.monitoring&&(ot.monitoring=!1,e.prototype._fireEvent=i)),e},e.prototype._fireEvent=i,e.prototype._execute=function(t,e,n){try{t(e,n)}catch(t){return t}},e.prototype._onCancel=function(){},e.prototype._setOnCancel=function(t){},e.prototype._attachCancellationCallback=function(t){},e.prototype._captureStackTrace=function(){},e.prototype._attachExtraTrace=function(){},e.prototype._clearCancellationData=function(){},e.prototype._propagateFrom=function(t,e){};var et=p,nt=function(){return!1},rt=/[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/;N.inherits(S,Error),n.CapturedTrace=S,S.prototype.uncycle=function(){var t=this._length;if(!(2>t)){for(var e=[],n={},r=0,i=this;void 0!==i;++r)e.push(i),i=i._parent;t=this._length=r;for(var r=t-1;r>=0;--r){var o=e[r].stack;void 0===n[o]&&(n[o]=r)}for(var r=0;t>r;++r){var s=e[r].stack,a=n[s];if(void 0!==a&&a!==r){a>0&&(e[a-1]._parent=void 0,e[a-1]._length=1),e[r]._parent=void 0,e[r]._length=1;var c=r>0?e[r-1]:this;t-1>a?(c._parent=e[a+1],c._parent.uncycle(),c._length=c._parent._length+1):(c._parent=void 0,c._length=1);for(var l=c._length+1,u=r-2;u>=0;--u)e[u]._length=l,l++;return}}}},S.prototype.attachExtraTrace=function(t){if(!t.__stackCleaned__){this.uncycle();for(var e=j(t),n=e.message,r=[e.stack],i=this;void 0!==i;)r.push(w(i.stack.split("\n"))),i=i._parent;b(r),m(r),N.notEnumerableProp(t,"stack",g(n,r)),N.notEnumerableProp(t,"__stackCleaned__",!0)}};var it=function(){var t=/^\s*at\s*/,e=function(t,e){return"string"==typeof t?t:void 0!==e.name&&void 0!==e.message?e.toString():F(e)};if("number"==typeof Error.stackTraceLimit&&"function"==typeof Error.captureStackTrace){Error.stackTraceLimit+=6,q=t,Q=e;var n=Error.captureStackTrace;return nt=function(t){return B.test(t)},function(t,e){Error.stackTraceLimit+=6,n(t,e),Error.stackTraceLimit-=6}}var r=new Error;if("string"==typeof r.stack&&r.stack.split("\n")[0].indexOf("stackDetection@")>=0)return q=/@/,Q=e,$=!0,function(t){t.stack=(new Error).stack};var i;try{throw new Error}catch(t){i="stack"in t}return"stack"in r||!i||"number"!=typeof Error.stackTraceLimit?(Q=function(t,e){return"string"==typeof t?t:"object"!=typeof e&&"function"!=typeof e||void 0===e.name||void 0===e.message?F(e):e.toString()},null):(q=t,Q=e,function(t){Error.stackTraceLimit+=6;try{throw new Error}catch(e){t.stack=e.stack}Error.stackTraceLimit-=6})}();"undefined"!=typeof console&&void 0!==console.warn&&(D=function(t){console.warn(t)},N.isNode&&process.stderr.isTTY?D=function(t,e){var n=e?"[33m":"[31m";console.warn(n+t+"[0m\n")}:N.isNode||"string"!=typeof(new Error).stack||(D=function(t,e){console.warn("%c"+t,e?"color: darkorange":"color: red")}));var ot={warnings:z,longStackTraces:!1,cancellation:!1,monitoring:!1};return X&&e.longStackTraces(),{longStackTraces:function(){return ot.longStackTraces},warnings:function(){return ot.warnings},cancellation:function(){return ot.cancellation},monitoring:function(){return ot.monitoring},propagateFromFunction:function(){return et},boundValueFunction:function(){return h},checkForgottenReturns:d,setBounds:R,warn:y,deprecated:v,CapturedTrace:S,fireDomEvent:J,fireGlobalEvent:Y}}},{"./errors":12,"./util":36}],10:[function(t,e,n){"use strict";e.exports=function(t){function e(){return this.value}function n(){throw this.reason}t.prototype.return=t.prototype.thenReturn=function(n){return n instanceof t&&n.suppressUnhandledRejections(),this._then(e,void 0,void 0,{value:n},void 0)},t.prototype.throw=t.prototype.thenThrow=function(t){return this._then(n,void 0,void 0,{reason:t},void 0)},t.prototype.catchThrow=function(t){if(arguments.length<=1)return this._then(void 0,n,void 0,{reason:t},void 0);var e=arguments[1],r=function(){throw e};return this.caught(t,r)},t.prototype.catchReturn=function(n){if(arguments.length<=1)return n instanceof t&&n.suppressUnhandledRejections(),this._then(void 0,e,void 0,{value:n},void 0);var r=arguments[1];r instanceof t&&r.suppressUnhandledRejections();var i=function(){return r};return this.caught(n,i)}}},{}],11:[function(t,e,n){"use strict";e.exports=function(t,e){function n(){return o(this)}function r(t,n){return i(t,n,e,e)}var i=t.reduce,o=t.all;t.prototype.each=function(t){return i(this,t,e,0)._then(n,void 0,void 0,this,void 0)},t.prototype.mapSeries=function(t){return i(this,t,e,e)},t.each=function(t,r){return i(t,r,e,0)._then(n,void 0,void 0,t,void 0)},t.mapSeries=r}},{}],12:[function(t,e,n){"use strict";function r(t,e){function n(r){return this instanceof n?(p(this,"message","string"==typeof r?r:e),p(this,"name",t),void(Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):Error.call(this))):new n(r)}return u(n,Error),n}function i(t){return this instanceof i?(p(this,"name","OperationalError"),p(this,"message",t),this.cause=t,this.isOperational=!0,void(t instanceof Error?(p(this,"message",t.message),p(this,"stack",t.stack)):Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor))):new i(t)}var o,s,a=t("./es5"),c=a.freeze,l=t("./util"),u=l.inherits,p=l.notEnumerableProp,h=r("Warning","warning"),f=r("CancellationError","cancellation error"),_=r("TimeoutError","timeout error"),d=r("AggregateError","aggregate error");try{o=TypeError,s=RangeError}catch(t){o=r("TypeError","type error"),s=r("RangeError","range error")}for(var v="join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "),y=0;y<v.length;++y)"function"==typeof Array.prototype[v[y]]&&(d.prototype[v[y]]=Array.prototype[v[y]]);a.defineProperty(d.prototype,"length",{value:0,configurable:!1,writable:!0,enumerable:!0}),d.prototype.isOperational=!0;var g=0;d.prototype.toString=function(){var t=Array(4*g+1).join(" "),e="\n"+t+"AggregateError of:\n";g++,t=Array(4*g+1).join(" ");for(var n=0;n<this.length;++n){for(var r=this[n]===this?"[Circular AggregateError]":this[n]+"",i=r.split("\n"),o=0;o<i.length;++o)i[o]=t+i[o];r=i.join("\n"),e+=r+"\n"}return g--,e},u(i,Error);var m=Error.__BluebirdErrorTypes__;m||(m=c({CancellationError:f,TimeoutError:_,OperationalError:i,RejectionError:i,AggregateError:d}),a.defineProperty(Error,"__BluebirdErrorTypes__",{value:m,writable:!1,enumerable:!1,configurable:!1})),e.exports={Error:Error,TypeError:o,RangeError:s,CancellationError:m.CancellationError,OperationalError:m.OperationalError,TimeoutError:m.TimeoutError,AggregateError:m.AggregateError,Warning:h}},{"./es5":13,"./util":36}],13:[function(t,e,n){var r=function(){"use strict";return void 0===this}();if(r)e.exports={freeze:Object.freeze,defineProperty:Object.defineProperty,getDescriptor:Object.getOwnPropertyDescriptor,keys:Object.keys,names:Object.getOwnPropertyNames,getPrototypeOf:Object.getPrototypeOf,isArray:Array.isArray,isES5:r,propertyIsWritable:function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return!(n&&!n.writable&&!n.set)}};else{var i={}.hasOwnProperty,o={}.toString,s={}.constructor.prototype,a=function(t){var e=[];for(var n in t)i.call(t,n)&&e.push(n);return e},c=function(t,e){return{value:t[e]}},l=function(t,e,n){return t[e]=n.value,t},u=function(t){return t},p=function(t){try{return Object(t).constructor.prototype}catch(t){return s}},h=function(t){try{return"[object Array]"===o.call(t)}catch(t){return!1}};e.exports={isArray:h,keys:a,names:a,defineProperty:l,getDescriptor:c,freeze:u,getPrototypeOf:p,isES5:r,propertyIsWritable:function(){return!0}}}},{}],14:[function(t,e,n){"use strict";e.exports=function(t,e){var n=t.map;t.prototype.filter=function(t,r){return n(this,t,r,e)},t.filter=function(t,r,i){return n(t,r,i,e)}}},{}],15:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,e,n){this.promise=t,this.type=e,this.handler=n,this.called=!1,this.cancelPromise=null}function i(t){this.finallyHandler=t}function o(t,e){return null!=t.cancelPromise&&(arguments.length>1?t.cancelPromise._reject(e):t.cancelPromise._cancel(),t.cancelPromise=null,!0)}function s(){return c.call(this,this.promise._target()._settledValue())}function a(t){return o(this,t)?void 0:(p.e=t,p)}function c(t){var r=this.promise,c=this.handler;if(!this.called){this.called=!0;var l=this.isFinallyHandler()?c.call(r._boundValue()):c.call(r._boundValue(),t);if(void 0!==l){r._setReturnedNonUndefined();var h=n(l,r);if(h instanceof e){if(null!=this.cancelPromise){if(h._isCancelled()){var f=new u("late cancellation observer");return r._attachExtraTrace(f),p.e=f,p}h.isPending()&&h._attachCancellationCallback(new i(this))}return h._then(s,a,void 0,this,void 0)}}}return r.isRejected()?(o(this),p.e=t,p):(o(this),t)}var l=t("./util"),u=e.CancellationError,p=l.errorObj;return r.prototype.isFinallyHandler=function(){return 0===this.type},i.prototype._resultCancelled=function(){o(this.finallyHandler)},e.prototype._passThrough=function(t,e,n,i){return"function"!=typeof t?this.then():this._then(n,i,void 0,new r(this,e,t),void 0)},e.prototype.lastly=e.prototype.finally=function(t){return this._passThrough(t,0,c,c)},e.prototype.tap=function(t){return this._passThrough(t,1,c)},r}},{"./util":36}],16:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r){for(var o=0;o<n.length;++o){r._pushContext();var s=f(n[o])(t);if(r._popContext(),s===h){r._pushContext();var a=e.reject(h.e);return r._popContext(),a}var c=i(s,r);if(c instanceof e)return c}return null}function c(t,n,i,o){if(s.cancellation()){var a=new e(r),c=this._finallyPromise=new e(r);this._promise=a.lastly(function(){return c}),a._captureStackTrace(),a._setOnCancel(this)}else{(this._promise=new e(r))._captureStackTrace()}this._stack=o,this._generatorFunction=t,this._receiver=n,this._generator=void 0,this._yieldHandlers="function"==typeof i?[i].concat(_):_,this._yieldedPromise=null,this._cancellationPhase=!1}var l=t("./errors"),u=l.TypeError,p=t("./util"),h=p.errorObj,f=p.tryCatch,_=[];p.inherits(c,o),c.prototype._isResolved=function(){return null===this._promise},c.prototype._cleanup=function(){this._promise=this._generator=null,s.cancellation()&&null!==this._finallyPromise&&(this._finallyPromise._fulfill(),this._finallyPromise=null)},c.prototype._promiseCancelled=function(){if(!this._isResolved()){var t;if(void 0!==this._generator.return)this._promise._pushContext(),t=f(this._generator.return).call(this._generator,void 0),this._promise._popContext();else{var n=new e.CancellationError("generator .return() sentinel");e.coroutine.returnSentinel=n,this._promise._attachExtraTrace(n),this._promise._pushContext(),t=f(this._generator.throw).call(this._generator,n),this._promise._popContext()}this._cancellationPhase=!0,this._yieldedPromise=null,this._continue(t)}},c.prototype._promiseFulfilled=function(t){this._yieldedPromise=null,this._promise._pushContext();var e=f(this._generator.next).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._promiseRejected=function(t){this._yieldedPromise=null,this._promise._attachExtraTrace(t),this._promise._pushContext();var e=f(this._generator.throw).call(this._generator,t);this._promise._popContext(),this._continue(e)},c.prototype._resultCancelled=function(){if(this._yieldedPromise instanceof e){var t=this._yieldedPromise;this._yieldedPromise=null,t.cancel()}},c.prototype.promise=function(){return this._promise},c.prototype._run=function(){this._generator=this._generatorFunction.call(this._receiver),this._receiver=this._generatorFunction=void 0,this._promiseFulfilled(void 0)},c.prototype._continue=function(t){var n=this._promise;if(t===h)return this._cleanup(),this._cancellationPhase?n.cancel():n._rejectCallback(t.e,!1);var r=t.value;if(!0===t.done)return this._cleanup(),this._cancellationPhase?n.cancel():n._resolveCallback(r);var o=i(r,this._promise);if(!(o instanceof e)&&null===(o=a(o,this._yieldHandlers,this._promise)))return void this._promiseRejected(new u("A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s",r)+"From coroutine:\n"+this._stack.split("\n").slice(1,-7).join("\n")));o=o._target();var s=o._bitField;0==(50397184&s)?(this._yieldedPromise=o,o._proxy(this,null)):0!=(33554432&s)?e._async.invoke(this._promiseFulfilled,this,o._value()):0!=(16777216&s)?e._async.invoke(this._promiseRejected,this,o._reason()):this._promiseCancelled()},e.coroutine=function(t,e){if("function"!=typeof t)throw new u("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var n=Object(e).yieldHandler,r=c,i=(new Error).stack;return function(){var e=t.apply(this,arguments),o=new r(void 0,void 0,n,i),s=o.promise();return o._generator=e,o._promiseFulfilled(void 0),s}},e.coroutine.addYieldHandler=function(t){
|
2 |
+
if("function"!=typeof t)throw new u("expecting a function but got "+p.classString(t));_.push(t)},e.spawn=function(t){if(s.deprecated("Promise.spawn()","Promise.coroutine()"),"function"!=typeof t)return n("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n");var r=new c(t,this),i=r.promise();return r._run(e.spawn),i}}},{"./errors":12,"./util":36}],17:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){var a=t("./util");a.canEvaluate,a.tryCatch,a.errorObj,e.join=function(){var t,e=arguments.length-1;if(e>0&&"function"==typeof arguments[e]){t=arguments[e];var r}var i=[].slice.call(arguments);t&&i.pop();var r=new n(i).promise();return void 0!==t?r.spread(t):r}}},{"./util":36}],18:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,e,n,r){this.constructor$(t),this._promise._captureStackTrace();var i=l();this._callback=null===i?e:u.domainBind(i,e),this._preservedValues=r===o?new Array(this.length()):null,this._limit=n,this._inFlight=0,this._queue=[],f.invoke(this._asyncInit,this,void 0)}function c(t,n,i,o){if("function"!=typeof n)return r("expecting a function but got "+u.classString(n));var s=0;if(void 0!==i){if("object"!=typeof i||null===i)return e.reject(new TypeError("options argument must be an object but it is "+u.classString(i)));if("number"!=typeof i.concurrency)return e.reject(new TypeError("'concurrency' must be a number but it is "+u.classString(i.concurrency)));s=i.concurrency}return s="number"==typeof s&&isFinite(s)&&s>=1?s:0,new a(t,n,s,o).promise()}var l=e._getDomain,u=t("./util"),p=u.tryCatch,h=u.errorObj,f=e._async;u.inherits(a,n),a.prototype._asyncInit=function(){this._init$(void 0,-2)},a.prototype._init=function(){},a.prototype._promiseFulfilled=function(t,n){var r=this._values,o=this.length(),a=this._preservedValues,c=this._limit;if(0>n){if(n=-1*n-1,r[n]=t,c>=1&&(this._inFlight--,this._drainQueue(),this._isResolved()))return!0}else{if(c>=1&&this._inFlight>=c)return r[n]=t,this._queue.push(n),!1;null!==a&&(a[n]=t);var l=this._promise,u=this._callback,f=l._boundValue();l._pushContext();var _=p(u).call(f,t,n,o),d=l._popContext();if(s.checkForgottenReturns(_,d,null!==a?"Promise.filter":"Promise.map",l),_===h)return this._reject(_.e),!0;var v=i(_,this._promise);if(v instanceof e){v=v._target();var y=v._bitField;if(0==(50397184&y))return c>=1&&this._inFlight++,r[n]=v,v._proxy(this,-1*(n+1)),!1;if(0==(33554432&y))return 0!=(16777216&y)?(this._reject(v._reason()),!0):(this._cancel(),!0);_=v._value()}r[n]=_}return++this._totalResolved>=o&&(null!==a?this._filter(r,a):this._resolve(r),!0)},a.prototype._drainQueue=function(){for(var t=this._queue,e=this._limit,n=this._values;t.length>0&&this._inFlight<e;){if(this._isResolved())return;var r=t.pop();this._promiseFulfilled(n[r],r)}},a.prototype._filter=function(t,e){for(var n=e.length,r=new Array(n),i=0,o=0;n>o;++o)t[o]&&(r[i++]=e[o]);r.length=i,this._resolve(r)},a.prototype.preservedValues=function(){return this._preservedValues},e.prototype.map=function(t,e){return c(this,t,e,null)},e.map=function(t,e,n,r){return c(t,e,n,r)}}},{"./util":36}],19:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){var s=t("./util"),a=s.tryCatch;e.method=function(t){if("function"!=typeof t)throw new e.TypeError("expecting a function but got "+s.classString(t));return function(){var r=new e(n);r._captureStackTrace(),r._pushContext();var i=a(t).apply(this,arguments),s=r._popContext();return o.checkForgottenReturns(i,s,"Promise.method",r),r._resolveFromSyncValue(i),r}},e.attempt=e.try=function(t){if("function"!=typeof t)return i("expecting a function but got "+s.classString(t));var r=new e(n);r._captureStackTrace(),r._pushContext();var c;if(arguments.length>1){o.deprecated("calling Promise.try with more than 1 argument");var l=arguments[1],u=arguments[2];c=s.isArray(l)?a(t).apply(u,l):a(t).call(u,l)}else c=a(t)();var p=r._popContext();return o.checkForgottenReturns(c,p,"Promise.try",r),r._resolveFromSyncValue(c),r},e.prototype._resolveFromSyncValue=function(t){t===s.errorObj?this._rejectCallback(t.e,!1):this._resolveCallback(t,!0)}}},{"./util":36}],20:[function(t,e,n){"use strict";function r(t){return t instanceof Error&&u.getPrototypeOf(t)===Error.prototype}function i(t){var e;if(r(t)){e=new l(t),e.name=t.name,e.message=t.message,e.stack=t.stack;for(var n=u.keys(t),i=0;i<n.length;++i){var o=n[i];p.test(o)||(e[o]=t[o])}return e}return s.markAsOriginatingFromRejection(t),t}function o(t,e){return function(n,r){if(null!==t){if(n){var o=i(a(n));t._attachExtraTrace(o),t._reject(o)}else if(e){var s=[].slice.call(arguments,1);t._fulfill(s)}else t._fulfill(r);t=null}}}var s=t("./util"),a=s.maybeWrapAsError,c=t("./errors"),l=c.OperationalError,u=t("./es5"),p=/^(?:name|message|stack|cause)$/;e.exports=o},{"./errors":12,"./es5":13,"./util":36}],21:[function(t,e,n){"use strict";e.exports=function(e){function n(t,e){var n=this;if(!o.isArray(t))return r.call(n,t,e);var i=a(e).apply(n._boundValue(),[null].concat(t));i===c&&s.throwLater(i.e)}function r(t,e){var n=this,r=n._boundValue(),i=void 0===t?a(e).call(r,null):a(e).call(r,null,t);i===c&&s.throwLater(i.e)}function i(t,e){var n=this;if(!t){var r=new Error(t+"");r.cause=t,t=r}var i=a(e).call(n._boundValue(),t);i===c&&s.throwLater(i.e)}var o=t("./util"),s=e._async,a=o.tryCatch,c=o.errorObj;e.prototype.asCallback=e.prototype.nodeify=function(t,e){if("function"==typeof t){var o=r;void 0!==e&&Object(e).spread&&(o=n),this._then(o,i,void 0,this,t)}return this}}},{"./util":36}],22:[function(t,e,n){"use strict";e.exports=function(){function n(){}function r(t,e){if("function"!=typeof e)throw new g("expecting a function but got "+f.classString(e));if(t.constructor!==i)throw new g("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n")}function i(t){this._bitField=0,this._fulfillmentHandler0=void 0,this._rejectionHandler0=void 0,this._promise0=void 0,this._receiver0=void 0,t!==b&&(r(this,t),this._resolveFromExecutor(t)),this._promiseCreated(),this._fireEvent("promiseCreated",this)}function o(t){this.promise._resolveCallback(t)}function s(t){this.promise._rejectCallback(t,!1)}function a(t){var e=new i(b);e._fulfillmentHandler0=t,e._rejectionHandler0=t,e._promise0=t,e._receiver0=t}var c,l=function(){return new g("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n")},u=function(){return new i.PromiseInspection(this._target())},p=function(t){return i.reject(new g(t))},h={},f=t("./util");c=f.isNode?function(){var t=process.domain;return void 0===t&&(t=null),t}:function(){return null},f.notEnumerableProp(i,"_getDomain",c);var _=t("./es5"),d=t("./async"),v=new d;_.defineProperty(i,"_async",{value:v});var y=t("./errors"),g=i.TypeError=y.TypeError;i.RangeError=y.RangeError;var m=i.CancellationError=y.CancellationError;i.TimeoutError=y.TimeoutError,i.OperationalError=y.OperationalError,i.RejectionError=y.OperationalError,i.AggregateError=y.AggregateError;var b=function(){},w={},C={},j=t("./thenables")(i,b),k=t("./promise_array")(i,b,j,p,n),E=t("./context")(i),F=E.create,x=t("./debuggability")(i,E),T=(x.CapturedTrace,t("./finally")(i,j)),P=t("./catch_filter")(C),R=t("./nodeback"),S=f.errorObj,O=f.tryCatch;return i.prototype.toString=function(){return"[object Promise]"},i.prototype.caught=i.prototype.catch=function(t){var e=arguments.length;if(e>1){var n,r=new Array(e-1),i=0;for(n=0;e-1>n;++n){var o=arguments[n];if(!f.isObject(o))return p("expecting an object but got A catch statement predicate "+f.classString(o));r[i++]=o}return r.length=i,t=arguments[n],this.then(void 0,P(r,t,this))}return this.then(void 0,t)},i.prototype.reflect=function(){return this._then(u,u,void 0,this,void 0)},i.prototype.then=function(t,e){if(x.warnings()&&arguments.length>0&&"function"!=typeof t&&"function"!=typeof e){var n=".then() only accepts functions but was passed: "+f.classString(t);arguments.length>1&&(n+=", "+f.classString(e)),this._warn(n)}return this._then(t,e,void 0,void 0,void 0)},i.prototype.done=function(t,e){this._then(t,e,void 0,void 0,void 0)._setIsFinal()},i.prototype.spread=function(t){return"function"!=typeof t?p("expecting a function but got "+f.classString(t)):this.all()._then(t,void 0,void 0,w,void 0)},i.prototype.toJSON=function(){var t={isFulfilled:!1,isRejected:!1,fulfillmentValue:void 0,rejectionReason:void 0};return this.isFulfilled()?(t.fulfillmentValue=this.value(),t.isFulfilled=!0):this.isRejected()&&(t.rejectionReason=this.reason(),t.isRejected=!0),t},i.prototype.all=function(){return arguments.length>0&&this._warn(".all() was passed arguments but it does not take any"),new k(this).promise()},i.prototype.error=function(t){return this.caught(f.originatesFromRejection,t)},i.getNewLibraryCopy=e.exports,i.is=function(t){return t instanceof i},i.fromNode=i.fromCallback=function(t){var e=new i(b);e._captureStackTrace();var n=arguments.length>1&&!!Object(arguments[1]).multiArgs,r=O(t)(R(e,n));return r===S&&e._rejectCallback(r.e,!0),e._isFateSealed()||e._setAsyncGuaranteed(),e},i.all=function(t){return new k(t).promise()},i.cast=function(t){var e=j(t);return e instanceof i||(e=new i(b),e._captureStackTrace(),e._setFulfilled(),e._rejectionHandler0=t),e},i.resolve=i.fulfilled=i.cast,i.reject=i.rejected=function(t){var e=new i(b);return e._captureStackTrace(),e._rejectCallback(t,!0),e},i.setScheduler=function(t){if("function"!=typeof t)throw new g("expecting a function but got "+f.classString(t));return v.setScheduler(t)},i.prototype._then=function(t,e,n,r,o){var s=void 0!==o,a=s?o:new i(b),l=this._target(),u=l._bitField;s||(a._propagateFrom(this,3),a._captureStackTrace(),void 0===r&&0!=(2097152&this._bitField)&&(r=0!=(50397184&u)?this._boundValue():l===this?void 0:this._boundTo),this._fireEvent("promiseChained",this,a));var p=c();if(0!=(50397184&u)){var h,_,d=l._settlePromiseCtx;0!=(33554432&u)?(_=l._rejectionHandler0,h=t):0!=(16777216&u)?(_=l._fulfillmentHandler0,h=e,l._unsetRejectionIsUnhandled()):(d=l._settlePromiseLateCancellationObserver,_=new m("late cancellation observer"),l._attachExtraTrace(_),h=e),v.invoke(d,l,{handler:null===p?h:"function"==typeof h&&f.domainBind(p,h),promise:a,receiver:r,value:_})}else l._addCallbacks(t,e,a,r,p);return a},i.prototype._length=function(){return 65535&this._bitField},i.prototype._isFateSealed=function(){return 0!=(117506048&this._bitField)},i.prototype._isFollowing=function(){return 67108864==(67108864&this._bitField)},i.prototype._setLength=function(t){this._bitField=-65536&this._bitField|65535&t},i.prototype._setFulfilled=function(){this._bitField=33554432|this._bitField,this._fireEvent("promiseFulfilled",this)},i.prototype._setRejected=function(){this._bitField=16777216|this._bitField,this._fireEvent("promiseRejected",this)},i.prototype._setFollowing=function(){this._bitField=67108864|this._bitField,this._fireEvent("promiseResolved",this)},i.prototype._setIsFinal=function(){this._bitField=4194304|this._bitField},i.prototype._isFinal=function(){return(4194304&this._bitField)>0},i.prototype._unsetCancelled=function(){this._bitField=-65537&this._bitField},i.prototype._setCancelled=function(){this._bitField=65536|this._bitField,this._fireEvent("promiseCancelled",this)},i.prototype._setWillBeCancelled=function(){this._bitField=8388608|this._bitField},i.prototype._setAsyncGuaranteed=function(){v.hasCustomScheduler()||(this._bitField=134217728|this._bitField)},i.prototype._receiverAt=function(t){var e=0===t?this._receiver0:this[4*t-4+3];return e===h?void 0:void 0===e&&this._isBound()?this._boundValue():e},i.prototype._promiseAt=function(t){return this[4*t-4+2]},i.prototype._fulfillmentHandlerAt=function(t){return this[4*t-4+0]},i.prototype._rejectionHandlerAt=function(t){return this[4*t-4+1]},i.prototype._boundValue=function(){},i.prototype._migrateCallback0=function(t){var e=(t._bitField,t._fulfillmentHandler0),n=t._rejectionHandler0,r=t._promise0,i=t._receiverAt(0);void 0===i&&(i=h),this._addCallbacks(e,n,r,i,null)},i.prototype._migrateCallbackAt=function(t,e){var n=t._fulfillmentHandlerAt(e),r=t._rejectionHandlerAt(e),i=t._promiseAt(e),o=t._receiverAt(e);void 0===o&&(o=h),this._addCallbacks(n,r,i,o,null)},i.prototype._addCallbacks=function(t,e,n,r,i){var o=this._length();if(o>=65531&&(o=0,this._setLength(0)),0===o)this._promise0=n,this._receiver0=r,"function"==typeof t&&(this._fulfillmentHandler0=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this._rejectionHandler0=null===i?e:f.domainBind(i,e));else{var s=4*o-4;this[s+2]=n,this[s+3]=r,"function"==typeof t&&(this[s+0]=null===i?t:f.domainBind(i,t)),"function"==typeof e&&(this[s+1]=null===i?e:f.domainBind(i,e))}return this._setLength(o+1),o},i.prototype._proxy=function(t,e){this._addCallbacks(void 0,void 0,e,t,null)},i.prototype._resolveCallback=function(t,e){if(0==(117506048&this._bitField)){if(t===this)return this._rejectCallback(l(),!1);var n=j(t,this);if(!(n instanceof i))return this._fulfill(t);e&&this._propagateFrom(n,2);var r=n._target();if(r===this)return void this._reject(l());var o=r._bitField;if(0==(50397184&o)){var s=this._length();s>0&&r._migrateCallback0(this);for(var a=1;s>a;++a)r._migrateCallbackAt(this,a);this._setFollowing(),this._setLength(0),this._setFollowee(r)}else if(0!=(33554432&o))this._fulfill(r._value());else if(0!=(16777216&o))this._reject(r._reason());else{var c=new m("late cancellation observer");r._attachExtraTrace(c),this._reject(c)}}},i.prototype._rejectCallback=function(t,e,n){var r=f.ensureErrorObject(t),i=r===t;if(!i&&!n&&x.warnings()){var o="a promise was rejected with a non-error: "+f.classString(t);this._warn(o,!0)}this._attachExtraTrace(r,!!e&&i),this._reject(t)},i.prototype._resolveFromExecutor=function(t){var e=this;this._captureStackTrace(),this._pushContext();var n=!0,r=this._execute(t,function(t){e._resolveCallback(t)},function(t){e._rejectCallback(t,n)});n=!1,this._popContext(),void 0!==r&&e._rejectCallback(r,!0)},i.prototype._settlePromiseFromHandler=function(t,e,n,r){var i=r._bitField;if(0==(65536&i)){r._pushContext();var o;e===w?n&&"number"==typeof n.length?o=O(t).apply(this._boundValue(),n):(o=S,o.e=new g("cannot .spread() a non-array: "+f.classString(n))):o=O(t).call(e,n);var s=r._popContext();0==(65536&(i=r._bitField))&&(o===C?r._reject(n):o===S?r._rejectCallback(o.e,!1):(x.checkForgottenReturns(o,s,"",r,this),r._resolveCallback(o)))}},i.prototype._target=function(){for(var t=this;t._isFollowing();)t=t._followee();return t},i.prototype._followee=function(){return this._rejectionHandler0},i.prototype._setFollowee=function(t){this._rejectionHandler0=t},i.prototype._settlePromise=function(t,e,r,o){var s=t instanceof i,a=this._bitField,c=0!=(134217728&a);0!=(65536&a)?(s&&t._invokeInternalOnCancel(),r instanceof T&&r.isFinallyHandler()?(r.cancelPromise=t,O(e).call(r,o)===S&&t._reject(S.e)):e===u?t._fulfill(u.call(r)):r instanceof n?r._promiseCancelled(t):s||t instanceof k?t._cancel():r.cancel()):"function"==typeof e?s?(c&&t._setAsyncGuaranteed(),this._settlePromiseFromHandler(e,r,o,t)):e.call(r,o,t):r instanceof n?r._isResolved()||(0!=(33554432&a)?r._promiseFulfilled(o,t):r._promiseRejected(o,t)):s&&(c&&t._setAsyncGuaranteed(),0!=(33554432&a)?t._fulfill(o):t._reject(o))},i.prototype._settlePromiseLateCancellationObserver=function(t){var e=t.handler,n=t.promise,r=t.receiver,o=t.value;"function"==typeof e?n instanceof i?this._settlePromiseFromHandler(e,r,o,n):e.call(r,o,n):n instanceof i&&n._reject(o)},i.prototype._settlePromiseCtx=function(t){this._settlePromise(t.promise,t.handler,t.receiver,t.value)},i.prototype._settlePromise0=function(t,e,n){var r=this._promise0,i=this._receiverAt(0);this._promise0=void 0,this._receiver0=void 0,this._settlePromise(r,t,i,e)},i.prototype._clearCallbackDataAtIndex=function(t){var e=4*t-4;this[e+2]=this[e+3]=this[e+0]=this[e+1]=void 0},i.prototype._fulfill=function(t){var e=this._bitField;if(!((117506048&e)>>>16)){if(t===this){var n=l();return this._attachExtraTrace(n),this._reject(n)}this._setFulfilled(),this._rejectionHandler0=t,(65535&e)>0&&(0!=(134217728&e)?this._settlePromises():v.settlePromises(this))}},i.prototype._reject=function(t){var e=this._bitField;if(!((117506048&e)>>>16))return this._setRejected(),this._fulfillmentHandler0=t,this._isFinal()?v.fatalError(t,f.isNode):void((65535&e)>0?v.settlePromises(this):this._ensurePossibleRejectionHandled())},i.prototype._fulfillPromises=function(t,e){for(var n=1;t>n;n++){var r=this._fulfillmentHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._rejectPromises=function(t,e){for(var n=1;t>n;n++){var r=this._rejectionHandlerAt(n),i=this._promiseAt(n),o=this._receiverAt(n);this._clearCallbackDataAtIndex(n),this._settlePromise(i,r,o,e)}},i.prototype._settlePromises=function(){var t=this._bitField,e=65535&t;if(e>0){if(0!=(16842752&t)){var n=this._fulfillmentHandler0;this._settlePromise0(this._rejectionHandler0,n,t),this._rejectPromises(e,n)}else{var r=this._rejectionHandler0;this._settlePromise0(this._fulfillmentHandler0,r,t),this._fulfillPromises(e,r)}this._setLength(0)}this._clearCancellationData()},i.prototype._settledValue=function(){var t=this._bitField;return 0!=(33554432&t)?this._rejectionHandler0:0!=(16777216&t)?this._fulfillmentHandler0:void 0},i.defer=i.pending=function(){return x.deprecated("Promise.defer","new Promise"),{promise:new i(b),resolve:o,reject:s}},f.notEnumerableProp(i,"_makeSelfResolutionError",l),t("./method")(i,b,j,p,x),t("./bind")(i,b,j,x),t("./cancel")(i,k,p,x),t("./direct_resolve")(i),t("./synchronous_inspection")(i),t("./join")(i,k,j,b,v,c),i.Promise=i,i.version="3.4.7",t("./map.js")(i,k,p,j,b,x),t("./call_get.js")(i),t("./using.js")(i,p,j,F,b,x),t("./timers.js")(i,b,x),t("./generators.js")(i,p,b,j,n,x),t("./nodeify.js")(i),t("./promisify.js")(i,b),t("./props.js")(i,k,j,p),t("./race.js")(i,b,j,p),t("./reduce.js")(i,k,p,j,b,x),t("./settle.js")(i,k,x),t("./some.js")(i,k,p),t("./filter.js")(i,b),t("./each.js")(i,b),t("./any.js")(i),f.toFastProperties(i),f.toFastProperties(i.prototype),a({a:1}),a({b:2}),a({c:3}),a(1),a(function(){}),a(void 0),a(!1),a(new i(b)),x.setBounds(d.firstLineError,f.lastLineError),i}},{"./any.js":1,"./async":2,"./bind":3,"./call_get.js":5,"./cancel":6,"./catch_filter":7,"./context":8,"./debuggability":9,"./direct_resolve":10,"./each.js":11,"./errors":12,"./es5":13,"./filter.js":14,"./finally":15,"./generators.js":16,"./join":17,"./map.js":18,"./method":19,"./nodeback":20,"./nodeify.js":21,"./promise_array":23,"./promisify.js":24,"./props.js":25,"./race.js":27,"./reduce.js":28,"./settle.js":30,"./some.js":31,"./synchronous_inspection":32,"./thenables":33,"./timers.js":34,"./using.js":35,"./util":36}],23:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o){function s(t){switch(t){case-2:return[];case-3:return{}}}function a(t){var r=this._promise=new e(n);t instanceof e&&r._propagateFrom(t,3),r._setOnCancel(this),this._values=t,this._length=0,this._totalResolved=0,this._init(void 0,-2)}var c=t("./util");return c.isArray,c.inherits(a,o),a.prototype.length=function(){return this._length},a.prototype.promise=function(){return this._promise},a.prototype._init=function t(n,o){var a=r(this._values,this._promise);if(a instanceof e){a=a._target();var l=a._bitField;if(this._values=a,0==(50397184&l))return this._promise._setAsyncGuaranteed(),a._then(t,this._reject,void 0,this,o);if(0==(33554432&l))return 0!=(16777216&l)?this._reject(a._reason()):this._cancel();a=a._value()}if(null===(a=c.asArray(a))){var u=i("expecting an array or an iterable object but got "+c.classString(a)).reason();return void this._promise._rejectCallback(u,!1)}return 0===a.length?void(-5===o?this._resolveEmptyArray():this._resolve(s(o))):void this._iterate(a)},a.prototype._iterate=function(t){var n=this.getActualLength(t.length);this._length=n,this._values=this.shouldCopyValues()?new Array(n):this._values;for(var i=this._promise,o=!1,s=null,a=0;n>a;++a){var c=r(t[a],i);c instanceof e?(c=c._target(),s=c._bitField):s=null,o?null!==s&&c.suppressUnhandledRejections():null!==s?0==(50397184&s)?(c._proxy(this,a),this._values[a]=c):o=0!=(33554432&s)?this._promiseFulfilled(c._value(),a):0!=(16777216&s)?this._promiseRejected(c._reason(),a):this._promiseCancelled(a):o=this._promiseFulfilled(c,a)}o||i._setAsyncGuaranteed()},a.prototype._isResolved=function(){return null===this._values},a.prototype._resolve=function(t){this._values=null,this._promise._fulfill(t)},a.prototype._cancel=function(){!this._isResolved()&&this._promise._isCancellable()&&(this._values=null,this._promise._cancel())},a.prototype._reject=function(t){this._values=null,this._promise._rejectCallback(t,!1)},a.prototype._promiseFulfilled=function(t,e){return this._values[e]=t,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},a.prototype._promiseCancelled=function(){return this._cancel(),!0},a.prototype._promiseRejected=function(t){return this._totalResolved++,this._reject(t),!0},a.prototype._resultCancelled=function(){if(!this._isResolved()){var t=this._values;if(this._cancel(),t instanceof e)t.cancel();else for(var n=0;n<t.length;++n)t[n]instanceof e&&t[n].cancel()}},a.prototype.shouldCopyValues=function(){return!0},a.prototype.getActualLength=function(t){return t},a}},{"./util":36}],24:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t){return!b.test(t)}function i(t){try{return!0===t.__isPromisified__}catch(t){return!1}}function o(t,e,n){var r=h.getDataPropertyOrDefault(t,e+n,g);return!!r&&i(r)}function s(t,e,n){for(var r=0;r<t.length;r+=2){var i=t[r];if(n.test(i))for(var o=i.replace(n,""),s=0;s<t.length;s+=2)if(t[s]===o)throw new y("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s",e))}}function a(t,e,n,r){for(var a=h.inheritedDataKeys(t),c=[],l=0;l<a.length;++l){var u=a[l],p=t[u],f=r===w||w(u,p,t);"function"!=typeof p||i(p)||o(t,u,e)||!r(u,p,t,f)||c.push(u,p)}return s(c,e,n),c}function c(t,r,i,o,s,a){function c(){var i=r;r===p&&(i=this);var o=new e(n);o._captureStackTrace();var s="string"==typeof u&&this!==l?this[u]:t,c=f(o,a);try{s.apply(i,_(arguments,c))}catch(t){o._rejectCallback(d(t),!0,!0)}return o._isFateSealed()||o._setAsyncGuaranteed(),o}var l=function(){return this}(),u=t;return"string"==typeof u&&(t=o),h.notEnumerableProp(c,"__isPromisified__",!0),c}function l(t,e,n,r,i){for(var o=new RegExp(C(e)+"$"),s=a(t,e,o,n),c=0,l=s.length;l>c;c+=2){var u=s[c],f=s[c+1],_=u+e;if(r===j)t[_]=j(u,p,u,f,e,i);else{var d=r(f,function(){return j(u,p,u,f,e,i)});h.notEnumerableProp(d,"__isPromisified__",!0),t[_]=d}}return h.toFastProperties(t),t}function u(t,e,n){return j(t,e,void 0,t,null,n)}var p={},h=t("./util"),f=t("./nodeback"),_=h.withAppended,d=h.maybeWrapAsError,v=h.canEvaluate,y=t("./errors").TypeError,g={__isPromisified__:!0},m=["arity","length","name","arguments","caller","callee","prototype","__isPromisified__"],b=new RegExp("^(?:"+m.join("|")+")$"),w=function(t){return h.isIdentifier(t)&&"_"!==t.charAt(0)&&"constructor"!==t},C=function(t){return t.replace(/([$])/,"\\$")},j=v?void 0:c;e.promisify=function(t,e){if("function"!=typeof t)throw new y("expecting a function but got "+h.classString(t));if(i(t))return t;e=Object(e);var n=void 0===e.context?p:e.context,o=!!e.multiArgs,s=u(t,n,o);return h.copyDescriptors(t,s,r),s},e.promisifyAll=function(t,e){if("function"!=typeof t&&"object"!=typeof t)throw new y("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n");e=Object(e);var n=!!e.multiArgs,r=e.suffix;"string"!=typeof r&&(r="Async");var i=e.filter;"function"!=typeof i&&(i=w);var o=e.promisifier;if("function"!=typeof o&&(o=j),!h.isIdentifier(r))throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n");for(var s=h.inheritedDataKeys(t),a=0;a<s.length;++a){var c=t[s[a]];"constructor"!==s[a]&&h.isClass(c)&&(l(c.prototype,r,i,o,n),l(c,r,i,o,n))}return l(t,r,i,o,n)}}},{"./errors":12,"./nodeback":20,"./util":36}],25:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t){var e,n=!1;if(void 0!==a&&t instanceof a)e=p(t),n=!0;else{var r=u.keys(t),i=r.length;e=new Array(2*i);for(var o=0;i>o;++o){var s=r[o];e[o]=t[s],e[o+i]=s}}this.constructor$(e),this._isMap=n,this._init$(void 0,-3)}function s(t){var n,s=r(t);return l(s)?(n=s instanceof e?s._then(e.props,void 0,void 0,void 0,void 0):new o(s).promise(),s instanceof e&&n._propagateFrom(s,2),n):i("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n")}var a,c=t("./util"),l=c.isObject,u=t("./es5");"function"==typeof Map&&(a=Map);var p=function(){function t(t,r){this[e]=t,this[e+n]=r,e++}var e=0,n=0;return function(r){n=r.size,e=0;var i=new Array(2*r.size);return r.forEach(t,i),i}}(),h=function(t){for(var e=new a,n=t.length/2|0,r=0;n>r;++r){var i=t[n+r],o=t[r];e.set(i,o)}return e};c.inherits(o,n),o.prototype._init=function(){},o.prototype._promiseFulfilled=function(t,e){if(this._values[e]=t,++this._totalResolved>=this._length){var n;if(this._isMap)n=h(this._values);else{n={};for(var r=this.length(),i=0,o=this.length();o>i;++i)n[this._values[i+r]]=this._values[i]}return this._resolve(n),!0}return!1},o.prototype.shouldCopyValues=function(){return!1},o.prototype.getActualLength=function(t){return t>>1},e.prototype.props=function(){return s(this)},e.props=function(t){return s(t)}}},{"./es5":13,"./util":36}],26:[function(t,e,n){"use strict";function r(t,e,n,r,i){for(var o=0;i>o;++o)n[o+r]=t[o+e],t[o+e]=void 0}function i(t){this._capacity=t,this._length=0,this._front=0}i.prototype._willBeOverCapacity=function(t){return this._capacity<t},i.prototype._pushOne=function(t){var e=this.length();this._checkCapacity(e+1),this[this._front+e&this._capacity-1]=t,this._length=e+1},i.prototype.push=function(t,e,n){var r=this.length()+3;if(this._willBeOverCapacity(r))return this._pushOne(t),this._pushOne(e),void this._pushOne(n);var i=this._front+r-3;this._checkCapacity(r);var o=this._capacity-1;this[i+0&o]=t,this[i+1&o]=e,this[i+2&o]=n,this._length=r},i.prototype.shift=function(){var t=this._front,e=this[t];return this[t]=void 0,this._front=t+1&this._capacity-1,this._length--,e},i.prototype.length=function(){return this._length},i.prototype._checkCapacity=function(t){this._capacity<t&&this._resizeTo(this._capacity<<1)},i.prototype._resizeTo=function(t){var e=this._capacity;this._capacity=t,r(this,0,this,e,this._front+this._length&e-1)},e.exports=i},{}],27:[function(t,e,n){"use strict";e.exports=function(e,n,r,i){function o(t,o){var c=r(t);if(c instanceof e)return a(c);if(null===(t=s.asArray(t)))return i("expecting an array or an iterable object but got "+s.classString(t));var l=new e(n);void 0!==o&&l._propagateFrom(o,3);for(var u=l._fulfill,p=l._reject,h=0,f=t.length;f>h;++h){var _=t[h];(void 0!==_||h in t)&&e.cast(_)._then(u,p,void 0,l,null)}return l}var s=t("./util"),a=function(t){return t.then(function(e){return o(e,t)})};e.race=function(t){return o(t,void 0)},e.prototype.race=function(){return o(this,void 0)}}},{"./util":36}],28:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t,n,r,i){this.constructor$(t);var s=h();this._fn=null===s?n:f.domainBind(s,n),void 0!==r&&(r=e.resolve(r),r._attachCancellationCallback(this)),this._initialValue=r,this._currentCancellable=null,this._eachValues=i===o?Array(this._length):0===i?null:void 0,this._promise._captureStackTrace(),this._init$(void 0,-5)}function c(t,e){this.isFulfilled()?e._resolve(t):e._reject(t)}function l(t,e,n,i){return"function"!=typeof e?r("expecting a function but got "+f.classString(e)):new a(t,e,n,i).promise()}function u(t){this.accum=t,this.array._gotAccum(t);var n=i(this.value,this.array._promise);return n instanceof e?(this.array._currentCancellable=n,n._then(p,void 0,void 0,this,void 0)):p.call(this,n)}function p(t){var n=this.array,r=n._promise,i=_(n._fn);r._pushContext();var o;(o=void 0!==n._eachValues?i.call(r._boundValue(),t,this.index,this.length):i.call(r._boundValue(),this.accum,t,this.index,this.length))instanceof e&&(n._currentCancellable=o);var a=r._popContext();return s.checkForgottenReturns(o,a,void 0!==n._eachValues?"Promise.each":"Promise.reduce",r),o}var h=e._getDomain,f=t("./util"),_=f.tryCatch;f.inherits(a,n),a.prototype._gotAccum=function(t){void 0!==this._eachValues&&null!==this._eachValues&&t!==o&&this._eachValues.push(t)},a.prototype._eachComplete=function(t){return null!==this._eachValues&&this._eachValues.push(t),this._eachValues},a.prototype._init=function(){},a.prototype._resolveEmptyArray=function(){this._resolve(void 0!==this._eachValues?this._eachValues:this._initialValue)},a.prototype.shouldCopyValues=function(){return!1},a.prototype._resolve=function(t){this._promise._resolveCallback(t),this._values=null},a.prototype._resultCancelled=function(t){return t===this._initialValue?this._cancel():void(this._isResolved()||(this._resultCancelled$(),this._currentCancellable instanceof e&&this._currentCancellable.cancel(),this._initialValue instanceof e&&this._initialValue.cancel()))},a.prototype._iterate=function(t){this._values=t;var n,r,i=t.length;if(void 0!==this._initialValue?(n=this._initialValue,r=0):(n=e.resolve(t[0]),r=1),this._currentCancellable=n,!n.isRejected())for(;i>r;++r){var o={accum:null,value:t[r],index:r,length:i,array:this};n=n._then(u,void 0,void 0,o,void 0)}void 0!==this._eachValues&&(n=n._then(this._eachComplete,void 0,void 0,this,void 0)),n._then(c,c,void 0,n,this)},e.prototype.reduce=function(t,e){return l(this,t,e,null)},e.reduce=function(t,e,n,r){return l(t,e,n,r)}}},{"./util":36}],29:[function(t,e,n){"use strict";var r,i=t("./util"),o=function(){throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n")},s=i.getNativePromise();if(i.isNode&&"undefined"==typeof MutationObserver){var a=global.setImmediate,c=process.nextTick;r=i.isRecentNode?function(t){a.call(global,t)}:function(t){c.call(process,t)}}else if("function"==typeof s&&"function"==typeof s.resolve){var l=s.resolve();r=function(t){l.then(t)}}else r="undefined"==typeof MutationObserver||"undefined"!=typeof window&&window.navigator&&(window.navigator.standalone||window.cordova)?"undefined"!=typeof setImmediate?function(t){setImmediate(t)}:"undefined"!=typeof setTimeout?function(t){setTimeout(t,0)}:o:function(){var t=document.createElement("div"),e={attributes:!0},n=!1,r=document.createElement("div");new MutationObserver(function(){t.classList.toggle("foo"),n=!1}).observe(r,e);var i=function(){n||(n=!0,r.classList.toggle("foo"))};return function(n){var r=new MutationObserver(function(){r.disconnect(),n()});r.observe(t,e),i()}}();e.exports=r},{"./util":36}],30:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t)}var o=e.PromiseInspection;t("./util").inherits(i,n),i.prototype._promiseResolved=function(t,e){return this._values[t]=e,++this._totalResolved>=this._length&&(this._resolve(this._values),!0)},i.prototype._promiseFulfilled=function(t,e){var n=new o;return n._bitField=33554432,n._settledValueField=t,this._promiseResolved(e,n)},i.prototype._promiseRejected=function(t,e){var n=new o;return n._bitField=16777216,n._settledValueField=t,this._promiseResolved(e,n)},e.settle=function(t){return r.deprecated(".settle()",".reflect()"),new i(t).promise()},e.prototype.settle=function(){return e.settle(this)}}},{"./util":36}],31:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.constructor$(t),this._howMany=0,this._unwrap=!1,this._initialized=!1}function o(t,e){if((0|e)!==e||0>e)return r("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n");var n=new i(t),o=n.promise();return n.setHowMany(e),n.init(),o}var s=t("./util"),a=t("./errors").RangeError,c=t("./errors").AggregateError,l=s.isArray,u={};s.inherits(i,n),i.prototype._init=function(){if(this._initialized){if(0===this._howMany)return void this._resolve([]);this._init$(void 0,-5);var t=l(this._values)
|
3 |
+
;!this._isResolved()&&t&&this._howMany>this._canPossiblyFulfill()&&this._reject(this._getRangeError(this.length()))}},i.prototype.init=function(){this._initialized=!0,this._init()},i.prototype.setUnwrap=function(){this._unwrap=!0},i.prototype.howMany=function(){return this._howMany},i.prototype.setHowMany=function(t){this._howMany=t},i.prototype._promiseFulfilled=function(t){return this._addFulfilled(t),this._fulfilled()===this.howMany()&&(this._values.length=this.howMany(),1===this.howMany()&&this._unwrap?this._resolve(this._values[0]):this._resolve(this._values),!0)},i.prototype._promiseRejected=function(t){return this._addRejected(t),this._checkOutcome()},i.prototype._promiseCancelled=function(){return this._values instanceof e||null==this._values?this._cancel():(this._addRejected(u),this._checkOutcome())},i.prototype._checkOutcome=function(){if(this.howMany()>this._canPossiblyFulfill()){for(var t=new c,e=this.length();e<this._values.length;++e)this._values[e]!==u&&t.push(this._values[e]);return t.length>0?this._reject(t):this._cancel(),!0}return!1},i.prototype._fulfilled=function(){return this._totalResolved},i.prototype._rejected=function(){return this._values.length-this.length()},i.prototype._addRejected=function(t){this._values.push(t)},i.prototype._addFulfilled=function(t){this._values[this._totalResolved++]=t},i.prototype._canPossiblyFulfill=function(){return this.length()-this._rejected()},i.prototype._getRangeError=function(t){var e="Input array must contain at least "+this._howMany+" items but contains only "+t+" items";return new a(e)},i.prototype._resolveEmptyArray=function(){this._reject(this._getRangeError(0))},e.some=function(t,e){return o(t,e)},e.prototype.some=function(t){return o(this,t)},e._SomePromiseArray=i}},{"./errors":12,"./util":36}],32:[function(t,e,n){"use strict";e.exports=function(t){function e(t){void 0!==t?(t=t._target(),this._bitField=t._bitField,this._settledValueField=t._isFateSealed()?t._settledValue():void 0):(this._bitField=0,this._settledValueField=void 0)}e.prototype._settledValue=function(){return this._settledValueField};var n=e.prototype.value=function(){if(!this.isFulfilled())throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},r=e.prototype.error=e.prototype.reason=function(){if(!this.isRejected())throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n");return this._settledValue()},i=e.prototype.isFulfilled=function(){return 0!=(33554432&this._bitField)},o=e.prototype.isRejected=function(){return 0!=(16777216&this._bitField)},s=e.prototype.isPending=function(){return 0==(50397184&this._bitField)},a=e.prototype.isResolved=function(){return 0!=(50331648&this._bitField)};e.prototype.isCancelled=function(){return 0!=(8454144&this._bitField)},t.prototype.__isCancelled=function(){return 65536==(65536&this._bitField)},t.prototype._isCancelled=function(){return this._target().__isCancelled()},t.prototype.isCancelled=function(){return 0!=(8454144&this._target()._bitField)},t.prototype.isPending=function(){return s.call(this._target())},t.prototype.isRejected=function(){return o.call(this._target())},t.prototype.isFulfilled=function(){return i.call(this._target())},t.prototype.isResolved=function(){return a.call(this._target())},t.prototype.value=function(){return n.call(this._target())},t.prototype.reason=function(){var t=this._target();return t._unsetRejectionIsUnhandled(),r.call(t)},t.prototype._value=function(){return this._settledValue()},t.prototype._reason=function(){return this._unsetRejectionIsUnhandled(),this._settledValue()},t.PromiseInspection=e}},{}],33:[function(t,e,n){"use strict";e.exports=function(e,n){function r(t,r){if(u(t)){if(t instanceof e)return t;var i=o(t);if(i===l){r&&r._pushContext();var c=e.reject(i.e);return r&&r._popContext(),c}if("function"==typeof i){if(s(t)){var c=new e(n);return t._then(c._fulfill,c._reject,void 0,c,null),c}return a(t,i,r)}}return t}function i(t){return t.then}function o(t){try{return i(t)}catch(t){return l.e=t,l}}function s(t){try{return p.call(t,"_promise0")}catch(t){return!1}}function a(t,r,i){function o(t){a&&(a._resolveCallback(t),a=null)}function s(t){a&&(a._rejectCallback(t,p,!0),a=null)}var a=new e(n),u=a;i&&i._pushContext(),a._captureStackTrace(),i&&i._popContext();var p=!0,h=c.tryCatch(r).call(t,o,s);return p=!1,a&&h===l&&(a._rejectCallback(h.e,!0,!0),a=null),u}var c=t("./util"),l=c.errorObj,u=c.isObject,p={}.hasOwnProperty;return r}},{"./util":36}],34:[function(t,e,n){"use strict";e.exports=function(e,n,r){function i(t){this.handle=t}function o(t){return clearTimeout(this.handle),t}function s(t){throw clearTimeout(this.handle),t}var a=t("./util"),c=e.TimeoutError;i.prototype._resultCancelled=function(){clearTimeout(this.handle)};var l=function(t){return u(+this).thenReturn(t)},u=e.delay=function(t,o){var s,a;return void 0!==o?(s=e.resolve(o)._then(l,null,null,t,void 0),r.cancellation()&&o instanceof e&&s._setOnCancel(o)):(s=new e(n),a=setTimeout(function(){s._fulfill()},+t),r.cancellation()&&s._setOnCancel(new i(a)),s._captureStackTrace()),s._setAsyncGuaranteed(),s};e.prototype.delay=function(t){return u(t,this)};var p=function(t,e,n){var r;r="string"!=typeof e?e instanceof Error?e:new c("operation timed out"):new c(e),a.markAsOriginatingFromRejection(r),t._attachExtraTrace(r),t._reject(r),null!=n&&n.cancel()};e.prototype.timeout=function(t,e){t=+t;var n,a,c=new i(setTimeout(function(){n.isPending()&&p(n,e,a)},t));return r.cancellation()?(a=this.then(),n=a._then(o,s,void 0,c,void 0),n._setOnCancel(c)):n=this._then(o,s,void 0,c,void 0),n}}},{"./util":36}],35:[function(t,e,n){"use strict";e.exports=function(e,n,r,i,o,s){function a(t){setTimeout(function(){throw t},0)}function c(t){var e=r(t);return e!==t&&"function"==typeof t._isDisposable&&"function"==typeof t._getDisposer&&t._isDisposable()&&e._setDisposable(t._getDisposer()),e}function l(t,n){function i(){if(s>=l)return u._fulfill();var o=c(t[s++]);if(o instanceof e&&o._isDisposable()){try{o=r(o._getDisposer().tryDispose(n),t.promise)}catch(t){return a(t)}if(o instanceof e)return o._then(i,a,null,null,null)}i()}var s=0,l=t.length,u=new e(o);return i(),u}function u(t,e,n){this._data=t,this._promise=e,this._context=n}function p(t,e,n){this.constructor$(t,e,n)}function h(t){return u.isDisposer(t)?(this.resources[this.index]._setDisposable(t),t.promise()):t}function f(t){this.length=t,this.promise=null,this[t-1]=null}var _=t("./util"),d=t("./errors").TypeError,v=t("./util").inherits,y=_.errorObj,g=_.tryCatch,m={};u.prototype.data=function(){return this._data},u.prototype.promise=function(){return this._promise},u.prototype.resource=function(){return this.promise().isFulfilled()?this.promise().value():m},u.prototype.tryDispose=function(t){var e=this.resource(),n=this._context;void 0!==n&&n._pushContext();var r=e!==m?this.doDispose(e,t):null;return void 0!==n&&n._popContext(),this._promise._unsetDisposable(),this._data=null,r},u.isDisposer=function(t){return null!=t&&"function"==typeof t.resource&&"function"==typeof t.tryDispose},v(p,u),p.prototype.doDispose=function(t,e){return this.data().call(t,t,e)},f.prototype._resultCancelled=function(){for(var t=this.length,n=0;t>n;++n){var r=this[n];r instanceof e&&r.cancel()}},e.using=function(){var t=arguments.length;if(2>t)return n("you must pass at least 2 arguments to Promise.using");var i=arguments[t-1];if("function"!=typeof i)return n("expecting a function but got "+_.classString(i));var o,a=!0;2===t&&Array.isArray(arguments[0])?(o=arguments[0],t=o.length,a=!1):(o=arguments,t--);for(var c=new f(t),p=0;t>p;++p){var d=o[p];if(u.isDisposer(d)){var v=d;d=d.promise(),d._setDisposable(v)}else{var m=r(d);m instanceof e&&(d=m._then(h,null,null,{resources:c,index:p},void 0))}c[p]=d}for(var b=new Array(c.length),p=0;p<b.length;++p)b[p]=e.resolve(c[p]).reflect();var w=e.all(b).then(function(t){for(var e=0;e<t.length;++e){var n=t[e];if(n.isRejected())return y.e=n.error(),y;if(!n.isFulfilled())return void w.cancel();t[e]=n.value()}C._pushContext(),i=g(i);var r=a?i.apply(void 0,t):i(t),o=C._popContext();return s.checkForgottenReturns(r,o,"Promise.using",C),r}),C=w.lastly(function(){var t=new e.PromiseInspection(w);return l(c,t)});return c.promise=C,C._setOnCancel(c),C},e.prototype._setDisposable=function(t){this._bitField=131072|this._bitField,this._disposer=t},e.prototype._isDisposable=function(){return(131072&this._bitField)>0},e.prototype._getDisposer=function(){return this._disposer},e.prototype._unsetDisposable=function(){this._bitField=-131073&this._bitField,this._disposer=void 0},e.prototype.disposer=function(t){if("function"==typeof t)return new p(t,this,i());throw new d}}},{"./errors":12,"./util":36}],36:[function(t,e,n){"use strict";function r(){try{var t=F;return F=null,t.apply(this,arguments)}catch(t){return P.e=t,P}}function i(t){return F=t,r}function o(t){return null==t||!0===t||!1===t||"string"==typeof t||"number"==typeof t}function s(t){return"function"==typeof t||"object"==typeof t&&null!==t}function a(t){return o(t)?new Error(v(t)):t}function c(t,e){var n,r=t.length,i=new Array(r+1);for(n=0;r>n;++n)i[n]=t[n];return i[n]=e,i}function l(t,e,n){if(!x.isES5)return{}.hasOwnProperty.call(t,e)?t[e]:void 0;var r=Object.getOwnPropertyDescriptor(t,e);return null!=r?null==r.get&&null==r.set?r.value:n:void 0}function u(t,e,n){if(o(t))return t;var r={value:n,configurable:!0,enumerable:!1,writable:!0};return x.defineProperty(t,e,r),t}function p(t){throw t}function h(t){try{if("function"==typeof t){var e=x.names(t.prototype),n=x.isES5&&e.length>1,r=e.length>0&&!(1===e.length&&"constructor"===e[0]),i=A.test(t+"")&&x.names(t).length>0;if(n||r||i)return!0}return!1}catch(t){return!1}}function f(t){function e(){}e.prototype=t;for(var n=8;n--;)new e;return t}function _(t){return D.test(t)}function d(t,e,n){for(var r=new Array(t),i=0;t>i;++i)r[i]=e+i+n;return r}function v(t){try{return t+""}catch(t){return"[no string representation]"}}function y(t){return null!==t&&"object"==typeof t&&"string"==typeof t.message&&"string"==typeof t.name}function g(t){try{u(t,"isOperational",!0)}catch(t){}}function m(t){return null!=t&&(t instanceof Error.__BluebirdErrorTypes__.OperationalError||!0===t.isOperational)}function b(t){return y(t)&&x.propertyIsWritable(t,"stack")}function w(t){return{}.toString.call(t)}function C(t,e,n){for(var r=x.names(t),i=0;i<r.length;++i){var o=r[i];if(n(o))try{x.defineProperty(e,o,x.getDescriptor(t,o))}catch(t){}}}function j(t){return H?process.env[t]:void 0}function k(){if("function"==typeof Promise)try{var t=new Promise(function(){});if("[object Promise]"==={}.toString.call(t))return Promise}catch(t){}}function E(t,e){return t.bind(e)}var F,x=t("./es5"),T="undefined"==typeof navigator,P={e:{}},R="undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0!==this?this:null,S=function(t,e){function n(){this.constructor=t,this.constructor$=e;for(var n in e.prototype)r.call(e.prototype,n)&&"$"!==n.charAt(n.length-1)&&(this[n+"$"]=e.prototype[n])}var r={}.hasOwnProperty;return n.prototype=e.prototype,t.prototype=new n,t.prototype},O=function(){var t=[Array.prototype,Object.prototype,Function.prototype],e=function(e){for(var n=0;n<t.length;++n)if(t[n]===e)return!0;return!1};if(x.isES5){var n=Object.getOwnPropertyNames;return function(t){for(var r=[],i=Object.create(null);null!=t&&!e(t);){var o;try{o=n(t)}catch(t){return r}for(var s=0;s<o.length;++s){var a=o[s];if(!i[a]){i[a]=!0;var c=Object.getOwnPropertyDescriptor(t,a);null!=c&&null==c.get&&null==c.set&&r.push(a)}}t=x.getPrototypeOf(t)}return r}}var r={}.hasOwnProperty;return function(n){if(e(n))return[];var i=[];t:for(var o in n)if(r.call(n,o))i.push(o);else{for(var s=0;s<t.length;++s)if(r.call(t[s],o))continue t;i.push(o)}return i}}(),A=/this\s*\.\s*\S+\s*=/,D=/^[a-z$_][a-z$_0-9]*$/i,I=function(){return"stack"in new Error?function(t){return b(t)?t:new Error(v(t))}:function(t){if(b(t))return t;try{throw new Error(v(t))}catch(t){return t}}}(),V=function(t){return x.isArray(t)?t:null};if("undefined"!=typeof Symbol&&Symbol.iterator){var L="function"==typeof Array.from?function(t){return Array.from(t)}:function(t){for(var e,n=[],r=t[Symbol.iterator]();!(e=r.next()).done;)n.push(e.value);return n};V=function(t){return x.isArray(t)?t:null!=t&&"function"==typeof t[Symbol.iterator]?L(t):null}}var N="undefined"!=typeof process&&"[object process]"===w(process).toLowerCase(),H="undefined"!=typeof process&&void 0!==process.env,B={isClass:h,isIdentifier:_,inheritedDataKeys:O,getDataPropertyOrDefault:l,thrower:p,isArray:x.isArray,asArray:V,notEnumerableProp:u,isPrimitive:o,isObject:s,isError:y,canEvaluate:T,errorObj:P,tryCatch:i,inherits:S,withAppended:c,maybeWrapAsError:a,toFastProperties:f,filledRange:d,toString:v,canAttachTrace:b,ensureErrorObject:I,originatesFromRejection:m,markAsOriginatingFromRejection:g,classString:w,copyDescriptors:C,hasDevTools:"undefined"!=typeof chrome&&chrome&&"function"==typeof chrome.loadTimes,isNode:N,hasEnvVariables:H,env:j,global:R,getNativePromise:k,domainBind:E};B.isRecentNode=B.isNode&&function(){var t=process.versions.node.split(".").map(Number);return 0===t[0]&&t[1]>10||t[0]>0}(),B.isNode&&B.toFastProperties(process);try{throw new Error}catch(t){B.lastLineError=t}e.exports=B},{"./es5":13}]},{},[4])(4)}),"undefined"!=typeof window&&null!==window?window.P=window.Promise:"undefined"!=typeof self&&null!==self&&(self.P=self.Promise),function(t){window.NggPaginatedGallery=function(e,n){this.displayed_gallery_id=e,this.container=t(n),this.container_name=n,this.get_displayed_gallery_obj=function(){var t="gallery_"+this.displayed_gallery_id;return void 0!==window.galleries[t]&&window.galleries[t]},this.enable_ajax_pagination=function(){var e=this;t("body").on("click","a.ngg-browser-prev, a.ngg-browser-next",function(r){var i=!0;t(this).parents(n).each(function(){if(t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id)return!0;i=!1}),i||(r.preventDefault(),window.ngg_ajax_operaton_count++,t("body, a").css("cursor","wait"),t.get(t(this).attr("href"),function(n){if(window.ngg_ajax_operaton_count--,window.ngg_ajax_operaton_count<=0&&(window.ngg_ajax_operaton_count=0,t("body, a").css("cursor","auto")),n){var r=t(n),i=!1;r.find(e.container_name).each(function(){return!!i||(t(this).data("nextgen-gallery-id")!=e.displayed_gallery_id||void(i=t(this)))}),i&&e.container.each(function(){var n=t(this);if(n.data("nextgen-gallery-id")!=e.displayed_gallery_id)return!0;var r=t(i.html()),o=r.find("img").toArray().map(function(e){return new Promise(function(n,r){var i=new Image;i.src=e.src,t(i).on("load",n)})});return Promise.all(o).then(function(){n.html(r),t(document).trigger("refreshed")}),!0})}}))})};var r=this.get_displayed_gallery_obj();r&&void 0!==r.display_settings.ajax_pagination&&parseInt(r.display_settings.ajax_pagination)&&this.enable_ajax_pagination(),void 0===window.ngg_ajax_operation_count&&(window.ngg_ajax_operaton_count=0)},Object.setPrototypeOf=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},Object.setPrototypeOf(window.galleries,{get_api_version:function(){return"0.1"},get_from_id:function(t){for(var e=this,n=null,r=Object.keys(this),i=1;i<=r.length;i++){var o=e[r[i-1]];if(o.ID===t||o.ID==="gallery_"+t||o.ID===parseInt(t)){n=o;break}}return n},get_from_slug:function(t){for(var e=this,n=null,r=Object.keys(this),i=1;i<=r.length;i++){var o=e[r[i-1]];if(o.slug===t){n=o;break}}return n},get_setting:function(t,e,n){var r="",i=this.get_from_id(t);return r=i&&void 0!==i[e]?i[e]:n,1===r&&(r=!0),0===r&&(r=!1),"1"===r&&(r=!0),"0"===r&&(r=!1),"false"===r&&(r=!1),"true"===r&&(r=!0),r},get_display_setting:function(t,e,n){var r="",i=this.get_from_id(t);return r=i&&void 0!==i.display_settings[e]?i.display_settings[e]:n,1===r&&(r=!0),0===r&&(r=!1),"1"===r&&(r=!0),"0"===r&&(r=!1),"false"===r&&(r=!1),"true"===r&&(r=!0),r},is_widget:function(t){var e=this.get_from_id(t),n=e.slug;return!!n&&-1!==n.indexOf("widget-ngg-images")}})}(jQuery);
|
products/photocrati_nextgen/modules/nextgen_other_options/package.module.nextgen_other_options.php
CHANGED
@@ -119,33 +119,26 @@ class A_Image_Options_Form extends Mixin
|
|
119 |
}
|
120 |
/**
|
121 |
* Tries to create the gallery storage directory if it doesn't exist already
|
122 |
-
* @
|
123 |
-
* @return bool|string
|
124 |
*/
|
125 |
-
function _create_gallery_storage_dir(
|
126 |
{
|
127 |
-
$retval = TRUE;
|
128 |
-
if (!$gallerypath) {
|
129 |
-
$gallerypath = $this->object->get_model()->get('gallerypath');
|
130 |
-
}
|
131 |
$fs = C_Fs::get_instance();
|
|
|
132 |
$gallerypath = $fs->join_paths($fs->get_document_root('galleries'), $gallerypath);
|
133 |
if (!@file_exists($gallerypath)) {
|
134 |
@mkdir($gallerypath);
|
135 |
-
|
136 |
}
|
137 |
-
return
|
138 |
}
|
139 |
/**
|
140 |
* Renders the form
|
141 |
*/
|
142 |
function render()
|
143 |
{
|
144 |
-
if (!$this->object->_create_gallery_storage_dir()) {
|
145 |
-
$this->object->get_model()->add_error(__('Gallery path does not exist and could not be created', 'nggallery'), 'gallerypath');
|
146 |
-
}
|
147 |
$settings = $this->object->get_model();
|
148 |
-
return $this->render_partial('photocrati-nextgen_other_options#image_options_tab', array('gallery_path_label' => __('Where would you like galleries stored?', 'nggallery'), 'gallery_path_help' => __('Where galleries and their images are stored', 'nggallery'), 'gallery_path' => $settings->gallerypath, 'delete_image_files_label' => __('Delete Image Files?', 'nggallery'), 'delete_image_files_help' => __('When enabled, image files will be removed after a Gallery has been deleted', 'nggallery'), 'delete_image_files' => $settings->deleteImg, 'show_related_images_label' => __('Show Related Images on Posts?', 'nggallery'), 'show_related_images_help' => __('When enabled, related images will be appended to each post by matching the posts tags/categories to image tags', 'nggallery'), 'show_related_images' => $settings->activateTags, 'related_images_hidden_label' => __('(Show Customization Settings)', 'nggallery'), 'related_images_active_label' => __('(Hide Customization Settings)', 'nggallery'), 'match_related_images_label' => __('How should related images be matched?', 'nggallery'), 'match_related_images' => $settings->appendType, 'match_related_image_options' => $this->object->_get_related_image_match_options(), 'max_related_images_label' => __('Maximum # of related images to display', 'nggallery'), 'max_related_images' => $settings->maxImages, 'related_images_heading_label' => __('Heading for related images', 'nggallery'), 'related_images_heading' => $settings->relatedHeading, 'sorting_order_label' => __("What's the default sorting method?", 'nggallery'), 'sorting_order_options' => $this->object->_get_image_sorting_options(), 'sorting_order' => $settings->galSort, 'sorting_direction_label' => __('Sort in what direction?', 'nggallery'), 'sorting_direction_options' => $this->object->_get_sorting_direction_options(), 'sorting_direction' => $settings->galSortDir, 'automatic_resize_label' => __('Automatically resize images after upload', 'nggallery'), 'automatic_resize_help' => __('It is recommended that your images be resized to be web friendly', 'nggallery'), 'automatic_resize' => $settings->imgAutoResize, 'resize_images_label' => __('What should images be resized to?', 'nggallery'), 'resize_images_help' => __('After images are uploaded, they will be resized to the above dimensions and quality', 'nggallery'), 'resized_image_width_label' => __('Width:', 'nggallery'), 'resized_image_height_label' => __('Height:', 'nggallery'), 'resized_image_quality_label' => __('Quality:', 'nggallery'), 'resized_image_width' => $settings->imgWidth, 'resized_image_height' => $settings->imgHeight, 'resized_image_quality' => $settings->imgQuality, 'backup_images_label' => __('Backup the original images?', 'nggallery'), 'backup_images_yes_label' => __('Yes'), 'backup_images_no_label' => __('No'), 'backup_images' => $settings->imgBackup), TRUE);
|
149 |
}
|
150 |
function save_action($image_options)
|
151 |
{
|
119 |
}
|
120 |
/**
|
121 |
* Tries to create the gallery storage directory if it doesn't exist already
|
122 |
+
* @return bool
|
|
|
123 |
*/
|
124 |
+
function _create_gallery_storage_dir()
|
125 |
{
|
|
|
|
|
|
|
|
|
126 |
$fs = C_Fs::get_instance();
|
127 |
+
$gallerypath = $this->object->get_model()->get('gallerypath');
|
128 |
$gallerypath = $fs->join_paths($fs->get_document_root('galleries'), $gallerypath);
|
129 |
if (!@file_exists($gallerypath)) {
|
130 |
@mkdir($gallerypath);
|
131 |
+
return @file_exists($gallerypath);
|
132 |
}
|
133 |
+
return TRUE;
|
134 |
}
|
135 |
/**
|
136 |
* Renders the form
|
137 |
*/
|
138 |
function render()
|
139 |
{
|
|
|
|
|
|
|
140 |
$settings = $this->object->get_model();
|
141 |
+
return $this->render_partial('photocrati-nextgen_other_options#image_options_tab', array('gallery_path_label' => __('Where would you like galleries stored?', 'nggallery'), 'gallery_path_help' => __('Where galleries and their images are stored', 'nggallery'), 'gallery_path' => $settings->gallerypath, 'gallery_path_error_state' => !$this->object->_create_gallery_storage_dir(), 'gallery_path_error_message' => __('Gallery path does not exist and could not be created', 'nggallery'), 'delete_image_files_label' => __('Delete Image Files?', 'nggallery'), 'delete_image_files_help' => __('When enabled, image files will be removed after a Gallery has been deleted', 'nggallery'), 'delete_image_files' => $settings->deleteImg, 'show_related_images_label' => __('Show Related Images on Posts?', 'nggallery'), 'show_related_images_help' => __('When enabled, related images will be appended to each post by matching the posts tags/categories to image tags', 'nggallery'), 'show_related_images' => $settings->activateTags, 'related_images_hidden_label' => __('(Show Customization Settings)', 'nggallery'), 'related_images_active_label' => __('(Hide Customization Settings)', 'nggallery'), 'match_related_images_label' => __('How should related images be matched?', 'nggallery'), 'match_related_images' => $settings->appendType, 'match_related_image_options' => $this->object->_get_related_image_match_options(), 'max_related_images_label' => __('Maximum # of related images to display', 'nggallery'), 'max_related_images' => $settings->maxImages, 'related_images_heading_label' => __('Heading for related images', 'nggallery'), 'related_images_heading' => $settings->relatedHeading, 'sorting_order_label' => __("What's the default sorting method?", 'nggallery'), 'sorting_order_options' => $this->object->_get_image_sorting_options(), 'sorting_order' => $settings->galSort, 'sorting_direction_label' => __('Sort in what direction?', 'nggallery'), 'sorting_direction_options' => $this->object->_get_sorting_direction_options(), 'sorting_direction' => $settings->galSortDir, 'automatic_resize_label' => __('Automatically resize images after upload', 'nggallery'), 'automatic_resize_help' => __('It is recommended that your images be resized to be web friendly', 'nggallery'), 'automatic_resize' => $settings->imgAutoResize, 'resize_images_label' => __('What should images be resized to?', 'nggallery'), 'resize_images_help' => __('After images are uploaded, they will be resized to the above dimensions and quality', 'nggallery'), 'resized_image_width_label' => __('Width:', 'nggallery'), 'resized_image_height_label' => __('Height:', 'nggallery'), 'resized_image_quality_label' => __('Quality:', 'nggallery'), 'resized_image_width' => $settings->imgWidth, 'resized_image_height' => $settings->imgHeight, 'resized_image_quality' => $settings->imgQuality, 'backup_images_label' => __('Backup the original images?', 'nggallery'), 'backup_images_yes_label' => __('Yes'), 'backup_images_no_label' => __('No'), 'backup_images' => $settings->imgBackup), TRUE);
|
142 |
}
|
143 |
function save_action($image_options)
|
144 |
{
|
products/photocrati_nextgen/modules/nextgen_other_options/templates/image_options_tab.php
CHANGED
@@ -16,8 +16,15 @@
|
|
16 |
type="text"
|
17 |
name="image_options[gallerypath]"
|
18 |
data-original-value='<?php echo esc_attr($gallery_path); ?>'
|
19 |
-
value="<?php echo esc_attr($gallery_path) ?>"
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</td>
|
22 |
</tr>
|
23 |
<?php
|
16 |
type="text"
|
17 |
name="image_options[gallerypath]"
|
18 |
data-original-value='<?php echo esc_attr($gallery_path); ?>'
|
19 |
+
value="<?php echo esc_attr($gallery_path) ?>"/>
|
20 |
+
<?php if ($gallery_path_error_state) { ?>
|
21 |
+
<br/>
|
22 |
+
<div class="error">
|
23 |
+
<p>
|
24 |
+
<?php print $gallery_path_error_message; ?>
|
25 |
+
</p>
|
26 |
+
</div>
|
27 |
+
<?php } ?>
|
28 |
</td>
|
29 |
</tr>
|
30 |
<?php
|
products/photocrati_nextgen/modules/ngglegacy/admin/manage.php
CHANGED
@@ -36,9 +36,6 @@ class nggManageGallery {
|
|
36 |
// Should be only called via a edit single gallery page
|
37 |
if ( isset($_POST['nggpage']) && $_POST['nggpage'] == 'manage-images' )
|
38 |
$this->post_processor_images();
|
39 |
-
// Should be called via a publish dialog
|
40 |
-
if ( isset($_POST['nggpage']) && $_POST['nggpage'] == 'publish-post' )
|
41 |
-
$this->publish_post();
|
42 |
|
43 |
//Look for other POST process
|
44 |
if ( !empty($_POST) || !empty($_GET) )
|
@@ -262,7 +259,6 @@ class nggManageGallery {
|
|
262 |
'meta' => array(&$this, 'render_meta_action_link'),
|
263 |
'custom_thumb' => array(&$this, 'render_custom_thumb_action_link'),
|
264 |
'rotate' => array(&$this, 'render_rotate_action_link'),
|
265 |
-
'publish' => array(&$this, 'render_publish_action_link'),
|
266 |
'recover' => array(&$this, 'render_recover_action_link'),
|
267 |
'delete' => array(&$this, 'render_delete_action_link')
|
268 |
));
|
@@ -332,17 +328,6 @@ class nggManageGallery {
|
|
332 |
return "<a href='{$url}' class='ngg-dialog' title='{$title}'>{$label}</a>";
|
333 |
}
|
334 |
|
335 |
-
function render_publish_action_link($id, $picture)
|
336 |
-
{
|
337 |
-
if (!current_user_can('publish_posts')) return FALSE;
|
338 |
-
|
339 |
-
$url = nextgen_esc_url(NGGALLERY_URLPATH.'admin/publish.php?h=230&id='.$picture->pid);
|
340 |
-
$title = esc_attr__('Publish this image', 'nggallery');
|
341 |
-
$label = esc_html__('Publish', 'nggallery');
|
342 |
-
|
343 |
-
return "<a href='{$url}' class='ngg-dialog' title='{$title}'>{$label}</a>";
|
344 |
-
}
|
345 |
-
|
346 |
function render_recover_action_link($id, $picture)
|
347 |
{
|
348 |
if (!file_exists($picture->imagePath . '_backup'))
|
@@ -919,40 +904,6 @@ class nggManageGallery {
|
|
919 |
}
|
920 |
}
|
921 |
|
922 |
-
/**
|
923 |
-
* Publish a new post with the shortcode from the selected image
|
924 |
-
*
|
925 |
-
* @since 1.7.0
|
926 |
-
* @return void
|
927 |
-
*/
|
928 |
-
function publish_post() {
|
929 |
-
|
930 |
-
check_admin_referer('publish-post');
|
931 |
-
|
932 |
-
// Create a WP page
|
933 |
-
global $user_ID, $ngg;
|
934 |
-
|
935 |
-
$ngg->options['publish_width'] = (int) $_POST['width'];
|
936 |
-
$ngg->options['publish_height'] = (int) $_POST['height'];
|
937 |
-
$ngg->options['publish_align'] = $_POST['align'];
|
938 |
-
$align = ( $ngg->options['publish_align'] == 'none') ? '' : 'float='.$ngg->options['publish_align'];
|
939 |
-
|
940 |
-
//save the new values for the next operation
|
941 |
-
update_option('ngg_options', $ngg->options);
|
942 |
-
|
943 |
-
$post['post_type'] = 'post';
|
944 |
-
$post['post_content'] = '[singlepic id=' . intval($_POST['pid']) . ' w=' . $ngg->options['publish_width'] . ' h=' . $ngg->options['publish_height'] . ' ' . $align . ']';
|
945 |
-
$post['post_author'] = $user_ID;
|
946 |
-
$post['post_status'] = isset ( $_POST['publish'] ) ? 'publish' : 'draft';
|
947 |
-
$post['post_title'] = $_POST['post_title'];
|
948 |
-
$post = apply_filters('ngg_add_new_post', $post, $_POST['pid']);
|
949 |
-
|
950 |
-
$post_id = wp_insert_post ($post);
|
951 |
-
|
952 |
-
if ($post_id != 0)
|
953 |
-
nggGallery::show_message( __('Published a new post', 'nggallery') );
|
954 |
-
}
|
955 |
-
|
956 |
function can_user_manage_gallery()
|
957 |
{
|
958 |
$retval = FALSE;
|
36 |
// Should be only called via a edit single gallery page
|
37 |
if ( isset($_POST['nggpage']) && $_POST['nggpage'] == 'manage-images' )
|
38 |
$this->post_processor_images();
|
|
|
|
|
|
|
39 |
|
40 |
//Look for other POST process
|
41 |
if ( !empty($_POST) || !empty($_GET) )
|
259 |
'meta' => array(&$this, 'render_meta_action_link'),
|
260 |
'custom_thumb' => array(&$this, 'render_custom_thumb_action_link'),
|
261 |
'rotate' => array(&$this, 'render_rotate_action_link'),
|
|
|
262 |
'recover' => array(&$this, 'render_recover_action_link'),
|
263 |
'delete' => array(&$this, 'render_delete_action_link')
|
264 |
));
|
328 |
return "<a href='{$url}' class='ngg-dialog' title='{$title}'>{$label}</a>";
|
329 |
}
|
330 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
function render_recover_action_link($id, $picture)
|
332 |
{
|
333 |
if (!file_exists($picture->imagePath . '_backup'))
|
904 |
}
|
905 |
}
|
906 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
907 |
function can_user_manage_gallery()
|
908 |
{
|
909 |
$retval = FALSE;
|
products/photocrati_nextgen/modules/ngglegacy/admin/publish.php
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname( dirname(__FILE__) ) . '/ngg-config.php');
|
4 |
-
require_once( NGGALLERY_ABSPATH . '/lib/image.php' );
|
5 |
-
|
6 |
-
if ( !is_user_logged_in() )
|
7 |
-
die(__('Cheatin’ uh?'));
|
8 |
-
|
9 |
-
if ( !current_user_can('NextGEN Manage gallery') )
|
10 |
-
die(__('Cheatin’ uh?'));
|
11 |
-
|
12 |
-
if ( !current_user_can( 'publish_posts' ) )
|
13 |
-
die(__('Cheatin’ uh?'));
|
14 |
-
|
15 |
-
global $wpdb;
|
16 |
-
|
17 |
-
$id = (int) $_GET['id'];
|
18 |
-
|
19 |
-
// let's get the image data
|
20 |
-
$picture = nggdb::find_image($id);
|
21 |
-
|
22 |
-
// use defaults the first time
|
23 |
-
$width = empty ($ngg->options['publish_width']) ? $ngg->options['thumbwidth'] : $ngg->options['publish_width'];
|
24 |
-
$height = empty ($ngg->options['publish_height']) ? $ngg->options['thumbheight'] : $ngg->options['publish_height'];
|
25 |
-
$align = empty ($ngg->options['publish_align']) ? 'none' : $ngg->options['publish_align'];
|
26 |
-
|
27 |
-
?>
|
28 |
-
|
29 |
-
<form id="form-publish-post" method="POST" accept-charset="utf-8">
|
30 |
-
<?php wp_nonce_field('publish-post') ?>
|
31 |
-
<input type="hidden" name="page" value="publish-post" />
|
32 |
-
<input type="hidden" name="pid" value="<?php echo $picture->pid; ?>" />
|
33 |
-
<table width="100%" border="0" cellspacing="3" cellpadding="3" >
|
34 |
-
<tr valign="top">
|
35 |
-
<th align="left"><?php _e('Post title','nggallery') ?></th>
|
36 |
-
<td><input type="text" size="70" name="post_title" value="<?php echo esc_attr( $picture->alttext); ?>" />
|
37 |
-
<br /><small><?php _e('Enter the post title ','nggallery') ?></small></td>
|
38 |
-
</tr>
|
39 |
-
<tr valign="top">
|
40 |
-
<th align="left"><?php _e('Width x height (in pixel)','nggallery') ?></th>
|
41 |
-
<td><input type="text" size="5" maxlength="5" name="width" value="<?php echo $width; ?>" /> x <input type="text" size="5" maxlength="5" name="height" value="<?php echo $height; ?>" />
|
42 |
-
<br /><small><?php _e('Size of the image','nggallery') ?></small></td>
|
43 |
-
</tr>
|
44 |
-
<tr valign="top">
|
45 |
-
<th align="left"><?php _e('Alignment','nggallery') ?></th>
|
46 |
-
<td><input type="radio" value="none" <?php checked('none', $align); ?> id="image-align-none" name="align"/>
|
47 |
-
<label class="align" for="image-align-none"><?php _e('None','nggallery'); ?></label>
|
48 |
-
<input type="radio" value="left" <?php checked('left', $align); ?> id="image-align-left" name="align"/>
|
49 |
-
<label class="align" for="image-align-left"><?php _e('Left','nggallery'); ?></label>
|
50 |
-
<input type="radio" value="center" <?php checked('center', $align); ?> id="image-align-center" name="align"/>
|
51 |
-
<label class="align" for="image-align-center"><?php _e('Center','nggallery'); ?></label>
|
52 |
-
<input type="radio" value="right" <?php checked('right', $align); ?> id="image-align-right" name="align"/>
|
53 |
-
<label class="align" for="image-align-right"><?php _e('Right','nggallery'); ?></label>
|
54 |
-
</td>
|
55 |
-
</tr>
|
56 |
-
<tr align="right">
|
57 |
-
<td colspan="2" class="submit">
|
58 |
-
<input class="button-primary" type="submit" name="publish" value="<?php _e('Publish', 'nggallery');?>" />
|
59 |
-
|
60 |
-
<input class="button-secondary" type="submit" name="draft" value=" <?php _e('Draft', 'nggallery'); ?> " />
|
61 |
-
</td>
|
62 |
-
</tr>
|
63 |
-
</table>
|
64 |
-
</form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
products/photocrati_nextgen/modules/static_assets/module.static_assets.php
CHANGED
@@ -61,6 +61,15 @@ class M_Static_Assets extends C_Base_Module
|
|
61 |
);
|
62 |
|
63 |
$module_dir = wp_normalize_path(C_Component_Registry::get_instance()->get_module_dir($module));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
$static_dir = self::trim_preceding_slash(C_NextGen_Settings::get_instance()->mvc_static_dir);
|
65 |
|
66 |
$override_dir = wp_normalize_path(self::get_static_override_dir($module));
|
61 |
);
|
62 |
|
63 |
$module_dir = wp_normalize_path(C_Component_Registry::get_instance()->get_module_dir($module));
|
64 |
+
|
65 |
+
// In case NextGen is in a symlink we make $mod_dir relative to the NGG parent root and then rebuild it
|
66 |
+
// using WP_PLUGIN_DIR; without this NGG-in-symlink creates URL that reference the file abspath
|
67 |
+
if (is_link(path_join(WP_PLUGIN_DIR, basename(NGG_PLUGIN_DIR))))
|
68 |
+
{
|
69 |
+
$module_dir = ltrim(str_replace(dirname(NGG_PLUGIN_DIR), '', $module_dir), DIRECTORY_SEPARATOR);
|
70 |
+
$module_dir = path_join(WP_PLUGIN_DIR, $module_dir);
|
71 |
+
}
|
72 |
+
|
73 |
$static_dir = self::trim_preceding_slash(C_NextGen_Settings::get_instance()->mvc_static_dir);
|
74 |
|
75 |
$override_dir = wp_normalize_path(self::get_static_override_dir($module));
|
readme.txt
CHANGED
@@ -2,8 +2,8 @@
|
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
-
Stable tag: 3.2.
|
6 |
-
Tested up to: 5.2
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 25 million downloads.
|
@@ -179,6 +179,16 @@ For more information, feel free to visit the official website for the NextGEN Ga
|
|
179 |
|
180 |
== Changelog ==
|
181 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
= V3.2.2 - 05.09.2019 =
|
183 |
* Changed: Updated video Links
|
184 |
* Changed: Branding updates in Readme.txt file
|
2 |
Contributors: photocrati, imagely
|
3 |
Tags: wordpress gallery plugin, gallery, nextgen, nextgen gallery, photo gallery, image gallery, photography, slideshow, images, photo, photo album, watermark
|
4 |
Requires at least: 4.0.0
|
5 |
+
Stable tag: 3.2.4
|
6 |
+
Tested up to: 5.2.1
|
7 |
License: GPLv2
|
8 |
|
9 |
The most popular WordPress gallery plugin and one of the most popular plugins of all time with over 25 million downloads.
|
179 |
|
180 |
== Changelog ==
|
181 |
|
182 |
+
= V3.2.4 - 06.04.2019 =
|
183 |
+
* NEW: Added some methods to the window.galleries object prototype for retrieving display settings
|
184 |
+
* Secured: Zip extraction process (thanks to Slavco Mihajloski / @mslavco)
|
185 |
+
* Changed: Removed the now-deprecated 'publish' link from the Manage Gallery image actions row
|
186 |
+
* Fixed: A PHP warning emitted on Gallery > Other Options if the current gallery path cannot be written to
|
187 |
+
* Fixed: Added compatibility check for the official FontAwesome plugin
|
188 |
+
* Fixed: Clicking a checkbox in the Insert Gallery Window's "Sort or exclude images" tab was not functioning
|
189 |
+
* Fixed: Resized images were becoming larger than the original in some circumstances
|
190 |
+
* Fixed: URL to static assets like JS and CSS files was incorrect when NextGen Gallery was a symlink
|
191 |
+
|
192 |
= V3.2.2 - 05.09.2019 =
|
193 |
* Changed: Updated video Links
|
194 |
* Changed: Branding updates in Readme.txt file
|